This repository vendors the engine of OfficeCLI (upstream repository
iOfficeAI/OfficeCLI) as a separate Library project that the OfficeTool
adapter references: the in-process document manipulation layer (Core + Handlers)
compiles into its own officecli.dll, without the CLI shell.
| Field | Value |
|---|---|
| Upstream repository | https://github.com/iOfficeAI/OfficeCLI |
| Upstream version | v1.0.144 |
| Upstream commit | 1ced45e900782c5083ed550ddf328ee974e425e7 |
| Sync date | 2026-08-15 |
| Upstream license | Apache-2.0 (see NOTICE.md) |
The sync pipeline updates the version, commit and date rows above automatically — never edit them by hand.
| Here | Upstream | Content |
|---|---|---|
ExternalDependencies/officecli/ |
src/officecli/ |
entire project tree, byte-identical, minus Program.cs (the CLI entry point; the only allowed DELETE) |
skills/ |
skills/ |
agent skills (embedded by the officecli csproj as skills/… resources) |
schemas/help/ |
schemas/help/ |
help schemas (embedded as schemas/help/… resources) |
The vendored officecli.csproj is the upstream one with one structural change
applied by the sync: OutputType Exe → Library (+ removal of the console-only
publish props PublishSingleFile/SelfContained/PublishTrimmed/CETCompat) and an
InternalsVisibleTo grant to OfficeTool/OfficeTool.Tests. The embedded resources
stay wired exactly as upstream (same LogicalNames), so the engine resolves them
unchanged. The adapter (OfficeTool.csproj + OfficeTool.cs) references the engine
via ProjectReference and is regenerated by update-vendor.ps1 from the
deterministic analysis of the vendored commands — it contains no engine code.
- Zero modifications to vendored files. No reformat, rename, "improvement" or
inline fix: any divergence breaks the diff against upstream.
- A fix/feature we need that upstream lacks → propose it upstream first, then bring it here with the next sync.
- An unavoidable local workaround → isolate it in
patches/, applied by the sync script, never mixed into vendored files.
- The only allowed operations on vendored files are DELETE and the csproj
transform.
Program.cs(and whateversync-exclude.txtlists) is deleted; theofficecli.csprojis convertedExe→Library+InternalsVisibleTo(nothing else: the transform is regex-driven and never touches the EmbeddedResource blocks). A deleted file shows ingit diff; a modified one does not. - Version traceability: the Current sync table records upstream version + commit. The value of a sync is that the next upstream release shows as a diff between two recorded versions.
The sync downloads the "Source code (zip)" of the upstream GitHub release
(https://github.com/iOfficeAI/OfficeCLI/releases), never the repository default
branch. This keeps the vendor on the stable release — no in-progress work, no
unreleased commits. The commit recorded in the table is the release's
target_commitish (the exact commit the tag points to).
.\sync-from-upstream.ps1 # latest release
.\sync-from-upstream.ps1 -Tag v1.0.144 # pin a specific release
It downloads the release zip, vendors src/officecli → ExternalDependencies/officecli
/ skills / schemas (pruning files gone from the release), applies the csproj
transform, saves the pristine upstream csproj as
ExternalDependencies/officecli/officecli.csproj.upstream (gitignored, the
resource-parity reference), verifies byte-identical parity (SHA-256 of every
vendored file except the transformed csproj), updates the version/commit/date rows,
and prints git diff --stat.
.\update-vendor.ps1 # sync + analysis + generation + build + tests
.\update-vendor.ps1 -Tag v1.0.144 # pin a specific release
update-vendor.ps1 is the fully automatic updater: after the sync it
- surface analysis — parses the vendored
CommandBuilder*.csfor the CLI commands (literalnew Command("x")registrations +Build*Commandfactory names) and the view modes; this is the deterministic pass that decides which methods the adapter must expose (they can change between vendor versions); - generation — emits the adapter surface block (methods + XML docs) from the
method templates embedded in the script (the adapter logic) into
OfficeTool.csbetween its@@ADAPTER_SURFACEmarkers; a method is emitted only when its command/ mode exists in the vendored surface; - coherence checks — every found command/view-mode must be mapped (template,
excluded-with-reason, or a NEW-command warning), the generated
LoadSkillsurface must match the unified contract, and the vendored csproj embedded-resource blocks must equal the pristine upstream ones; - builds the plugin (Release, surfaces engine API / adapter drift);
- runs
OfficeTool.Tests(the deterministic harness, docx/xlsx/pptx); - packs (
SkipNuGetPush) and verifies the nupkg carries both assemblies (OfficeTool.dll+officecli.dll) with noofficecliNuGet dependency.
Nothing is committed or pushed. After a green run:
- Read
sync-gap-report.mdand thegit diff(sync verified byte-identity). - If the report lists new commands/view modes: add a template to
update-vendor.ps1(Commands + Code) — nothing else to touch. - Bump the version in
NOTICE.mdto the new release tag. - Commit and push to
Graphene-Lab/OfficeTool— the CI workflow (.github/workflows/publish.yml) packs and publishes the NuGet package, which AIOrchestrator/AgentBridge hosts pick up viaPackageReference 1.*where the sibling project is absent.
.\sync-from-upstream.ps1 -UpstreamPath <dir>syncs from a local source tree (release zip extract or git checkout) without downloading.- The parity check must report "OK — N files byte-identical". A
DIFFERS/MISSINGline means a vendored file was hand-edited or the sync was interrupted — investigate before committing.
dotnet build OfficeTool.csproj -c Release— 0 errors.dotnet run --project OfficeTool.Tests— ALL TESTS PASSED.- The parity line in the sync output — byte-identical.
- The nupkg content line —
OfficeTool.dll: True | officecli.dll: True.