You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add LibreOffice runtime probing and conversion helpers
- Introduced `libreoffice_runtime.py` to encapsulate functions for probing and converting documents using LibreOffice.
- Implemented functions to validate LibreOffice binaries, run conversions, and handle isolated runtime environments.
- Enhanced test suite to cover scenarios for detecting and handling unusable LibreOffice installations.
- Updated workspace bootstrap tests to rewrite LibreOffice runtime paths and validate conversion capabilities.
baseline_gap_detail="$baseline_gap_detail at \`$LIBREOFFICE_CANDIDATE_BINARY\`"
509
+
fi
510
+
baseline_gap_detail="$baseline_gap_detail, but the current bootstrap path cannot execute the required smoke probe yet because no supported helper Python or bootstrap runtime is available."
MACHINE_BASELINE_HOST_ACCESS_REASON="Native Codex machine baseline cannot yet validate LibreOffice for the current Office corpus because no supported helper Python or bootstrap runtime is available."
MACHINE_BASELINE_HOST_ACCESS_REASON="Native Codex machine baseline detected LibreOffice, but it is not currently usable for the current Office corpus and needs machine-level repair."
525
+
else
526
+
baseline_gap_detail="Native Codex machine baseline is missing ${missing[*]} for the current Office corpus."
527
+
MACHINE_BASELINE_HOST_ACCESS_REASON="Native Codex machine baseline is missing ${missing[*]} for the current Office corpus and needs machine-level installation."
528
+
fi
467
529
if [[ "$FULL_MACHINE_ACCESS"=="true" ]];then
468
530
MACHINE_BASELINE_STATUS="install-required"
469
-
MACHINE_BASELINE_DETAIL="Native Codex machine baseline is missing ${missing[*]} for the current Office corpus."
if [[ "$PERMISSION_MODE"=="default-permissions" ]];then
473
-
MACHINE_BASELINE_DETAIL="Native Codex machine baseline is missing ${missing[*]} for the current Office corpus, and the current thread is still in \`Default permissions\`."
535
+
MACHINE_BASELINE_DETAIL="$baseline_gap_detail The current thread is still in \`Default permissions\`."
474
536
else
475
-
MACHINE_BASELINE_DETAIL="Native Codex machine baseline is missing ${missing[*]} for the current Office corpus, and the current turn does not expose \`Full access\` yet."
537
+
MACHINE_BASELINE_DETAIL="$baseline_gap_detail The current turn does not expose \`Full access\` yet."
Copy file name to clipboardExpand all lines: skills/canonical/knowledge-base-sync/SKILL.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ If the agent cannot run local commands or inspect the resulting artifacts, stop
29
29
- if `sync_status=waiting-shared-job`, treat the existing shared sync job as the legal owner and wait or retry rather than starting a second path
30
30
- if `sync_status=action-required`, surface the blocker directly
31
31
- when the blocker is missing sync capability, route the operator to `prepare`
32
+
- when the blocker is a repairable Office machine-baseline gap and the host can provide `Full access`, continue through `docmason prepare --yes --json` and then resume the same sync task instead of stopping at a passive blocker report
32
33
4. Treat successful `sync` as the deterministic truth-building path.
33
34
- detect source changes
34
35
- rebuild or reuse staged evidence
@@ -54,7 +55,7 @@ If the agent cannot run local commands or inspect the resulting artifacts, stop
54
55
## Escalation Rules
55
56
56
57
- Do not invent a second approval surface. The public approval command is `docmason sync --yes`.
57
-
- If Office rendering is required but unavailable, stop and return the concrete install step.
58
+
- If Office rendering is required but unavailable, stop only when the governed `prepare` path still cannot repair or install LibreOffice honestly; otherwise continue through that repair path first.
58
59
- If staged or hybrid follow-up work requires per-source editing, that bounded work may be parallelized, but the final rerun and final judgment remain on the main path.
59
60
- Do not silently trigger this workflow from an ordinary answer path without surfacing the governed state transition.
Copy file name to clipboardExpand all lines: skills/canonical/workspace-bootstrap/SKILL.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,10 +42,11 @@ If the agent cannot perform these capabilities, stop and explain that the enviro
42
42
5. Run `docmason prepare --json --yes` when the launcher was not used, or when bootstrap needs an explicit rerun to repair or complete the repo-local environment.
43
43
6. If `prepare` reports a degraded result, follow the reported next steps and rerun only the necessary deterministic command.
44
44
7. Use `docs/setup/manual-workspace-recovery.md` only when the launcher or `prepare` still cannot finish honestly after the governed automatic path has already had enough access.
45
-
8. If the corpus already contains PPTX, DOCX, or XLSX files and LibreOffice is missing:
45
+
8. If the corpus already contains PPTX, DOCX, or XLSX files and LibreOffice is missing or detected but unusable:
46
46
- LibreOffice is required only for an Office-rendering corpus; it is not a universal machine baseline dependency
47
47
- on macOS with Homebrew already present, DocMason may use `brew install --cask libreoffice-still`
48
48
- on macOS without Homebrew, DocMason should use the official LibreOffice installer path instead of trying to install Homebrew first
49
+
- on macOS, if LibreOffice is already detected but fails the governed smoke probe, `prepare --yes` should treat that as a repair or reinstall case rather than as a fake ready state
49
50
- on Linux, install LibreOffice with the distro package manager or the official packages, then ensure `soffice` is on `PATH`
50
51
9. Run `docmason status --json` when you need to confirm the resulting workspace stage.
51
52
10. Recommend `docmason sync --json` when source files are present and the user needs a usable knowledge base next.
@@ -59,7 +60,7 @@ If the agent cannot perform these capabilities, stop and explain that the enviro
59
60
- If the platform or Python version is unsupported, stop and surface that blocker directly.
60
61
- If `prepare` can only proceed through a higher-intrusion install step, explain it explicitly rather than hiding it inside automation.
61
62
- If system-level installation requires additional permissions, request them when the current platform supports that flow; otherwise give the user the exact command or GUI step to run.
62
-
- On native Codex/macOS, if the thread is still in `Default permissions` and higher access is required for downloads or machine-level setup, stop once with an explicit `Full access` upgrade instruction. Do not keep asking lower-level machine-inspection questions.
63
+
- On native Codex/macOS, if the thread is still in `Default permissions` and higher access is required for downloads or machine-level setup, stop once with an explicit `Full access` upgrade instruction. After `Full access` is available, continue through the governed automatic repair or reinstall path instead of stopping at diagnosis alone.
63
64
- For Claude Code or another compatibility host, keep the fallback wording short and host-generic; do not expand it into a second native bootstrap story.
64
65
- Deterministic shell setup steps may run as background or main-agent commands, but the final environment judgment returns to the main agent.
65
66
@@ -72,6 +73,7 @@ If the agent cannot perform these capabilities, stop and explain that the enviro
72
73
-`prepare` bootstraps repo-local state only.
73
74
-`./scripts/bootstrap-workspace.sh --yes` is the preferred zero-to-working launcher from a raw checkout because it can prepare `.venv` before the package is importable from the `src/` layout.
74
75
- The launcher now performs governed preflight first, then probes bootstrap-Python liveness in bounded time and prefers repo-local candidates before shared ones.
76
+
- The launcher and `prepare` now trust real LibreOffice smoke conversion, not only `soffice --version`, before declaring an Office-rendering machine baseline ready.
75
77
-`runtime/bootstrap_state.json` is the cached ready marker that ordinary ask-time work should reuse.
76
78
- The steady-state runtime is repo-local managed Python `3.13` under `.docmason/toolchain/python/`.
77
79
- On the native Codex path, bootstrap should refresh repo-local skill shims under `.agents/skills/` rather than writing into `~/.codex/skills`.
0 commit comments