Summary
The root README's SDK quick-start documents a Doc wrapper API that neither
checked-in SDK exports.
The Python example starts with:
from officecli import Doc
and the Node example starts with:
import { Doc } from "@officecli/sdk";
Both fail before any OfficeCLI command is sent. The SDKs expose a thin
resident-pipe surface (create / open → Document → send / batch),
not the documented Doc.add(...) / Doc.get(...) wrapper.
Reproduction
From the repository root:
PYTHONPATH=sdk/python python3 -c 'from officecli import Doc'
Actual:
ImportError: cannot import name 'Doc' from 'officecli'
For Node:
node --input-type=module -e \
"import * as sdk from './sdk/node/index.js'; console.log('Doc' in sdk, Object.keys(sdk).sort().join(','))"
Actual:
false Document,OfficeCliError,create,default,install,module.exports,open,pipePaths
Expected
The root README should show code that works with the SDKs currently shipped in
this repository:
- Python:
import officecli, then officecli.create(...) or
officecli.open(...), followed by doc.send(...) / doc.batch(...).
- Node:
const oc = require('@officecli/sdk'), then await oc.create(...)
or await oc.open(...), followed by doc.send(...) / doc.batch(...).
The SDK-local READMEs already document those two surfaces correctly.
Impact
A user following either root-README example hits an import/export error
immediately. The examples also imply a second, higher-level vocabulary that
the SDKs intentionally do not maintain, so the failure is not a small spelling
error: the documented API shape is different from the shipped one.
Verification
After the README is corrected:
PYTHONPATH=sdk/python python3 -c 'import officecli; print(officecli.Document)'
node --input-type=module -e \
"import * as sdk from './sdk/node/index.js'; console.log(typeof sdk.create, typeof sdk.open)"
Both commands should succeed, and the root examples should match the
corresponding SDK README quick-starts.
Summary
The root README's SDK quick-start documents a
Docwrapper API that neitherchecked-in SDK exports.
The Python example starts with:
and the Node example starts with:
Both fail before any OfficeCLI command is sent. The SDKs expose a thin
resident-pipe surface (
create/open→Document→send/batch),not the documented
Doc.add(...)/Doc.get(...)wrapper.Reproduction
From the repository root:
PYTHONPATH=sdk/python python3 -c 'from officecli import Doc'Actual:
For Node:
node --input-type=module -e \ "import * as sdk from './sdk/node/index.js'; console.log('Doc' in sdk, Object.keys(sdk).sort().join(','))"Actual:
Expected
The root README should show code that works with the SDKs currently shipped in
this repository:
import officecli, thenofficecli.create(...)orofficecli.open(...), followed bydoc.send(...)/doc.batch(...).const oc = require('@officecli/sdk'), thenawait oc.create(...)or
await oc.open(...), followed bydoc.send(...)/doc.batch(...).The SDK-local READMEs already document those two surfaces correctly.
Impact
A user following either root-README example hits an import/export error
immediately. The examples also imply a second, higher-level vocabulary that
the SDKs intentionally do not maintain, so the failure is not a small spelling
error: the documented API shape is different from the shipped one.
Verification
After the README is corrected:
Both commands should succeed, and the root examples should match the
corresponding SDK README quick-starts.