- Document the argument and filesystem failure text in the Model Experience
section of the tool-office README.
- Pin the invalid arguments prefix with full-text assertions.
- Assert the OfficeKitError cause for an absent Office service, and check the
agentless refusal in one execution.
- Keep OfficeToolError internal; the entry exports only its code type.
- Limit the OfficeKitError JSDoc to the wire and localization role of its code.
Refs #7869
Office tool failures now throw HarnessError subclasses so tool/result keeps
error.name and error.code:
- OfficeKitError failures map to OfficeToolError OFFICE_* codes at the tool
boundary, keeping the OfficeKitError as cause.
- A model route without image input is OfficeToolError
MODEL_DOES_NOT_SUPPORT_IMAGES; oversized images are OFFICE_OUTPUT_TOO_LARGE;
a remote workspace is OFFICE_UNSUPPORTED_REMOTE_WORKSPACE.
- Missing Agent, attachment store, or model route is ToolContextUnavailableError.
- Missing or non-regular inputs are FsError FS_NOT_FOUND / FS_NOT_REGULAR_FILE.
- Hand-checked argument rules are ToolArgsError INVALID_ARGS.
- Attachment store refusals keep their AttachmentError code.
Refs #7869