Repository navigation
Conversation
folders, sync, status, documents list|show|export|context, search, catalog, tags, relationships, notes, memories, facts, identities and mirrors now come from @wirecat/cli-core/documents/cli. drive passes its ports, its words (Google, Google Drive, the remote word "google") and its own wording where it differs, and keeps its own parts: the profile lock, the policy and --read-only, its MCP server, documents add across profiles, folders browse, the status coverage text, the mirror config and Google targets, and the Google owners behind identities. Commands, options, arguments, effects, examples and --json fields are unchanged. The entity names that commands --json declares become the shared ones (drive_document -> document, view imported; drive_catalog -> catalog; drive_document_tag -> document_tag, and so on). catalog tree has no total cap, so catalog.tree-limit is gone. The catalog, mirror and export.exists reasons are cli-core's now. Needs the cli-core release with the shared documents commands; the pin moves when it is out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared document_identity has one schema in every documents CLI, so identities list answers remote_id and provider (google-drive) where it answered google_id, and takes remote_id:<id>. The mirrors sync text keeps drive's wording through words.text, and listing.too-large is cli-core's reason now. The changelog fragment lists what callers see change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
Move drive onto cli-core's shared documents commands (WireCatLabs/cli-core#2966), with no change to its commands, options,
--jsonfields or error reasons.Draft until WireCatLabs/cli-core#2966 is released. This branch pins cli-core 0.662.0 (main's pin), which does not have
@wirecat/cli-core/documents/cliyet, so CI stays red until then. The next step is to bump the pin to the release that carries WireCatLabs/cli-core#2966 and push once.Why
notion-cli needs the same documents commands as drive. With them in cli-core, both CLIs answer the same way, and a fix lands once.
What
folders,sync,status,documents list|show|export|context,search,catalog,tags,relationships,notes,memories,facts,identitiesandmirrorsnow come from cli-core.src/commands/*.tsonly bind drive's ports and words (DRIVE_WORDSinsrc/commands/context.ts).src/knowledge-query.ts, the tree code insrc/catalog.ts, the moved rows insrc/list-queries.ts,ageOf/staleCopyinsrc/age.ts, the notes and search shell overrides, and the catalog, mirror andexport.existsreasons.--read-only, and its own MCP server. These go against the handbook, so they were not moved into the shared code.documents addacross several profiles,folders browse(entitydrive_remote_folder), thestatuscoverage text, the mirror config and the Google targets, and the Google owners behindidentities. These are Drive-only.Changed for callers (fragment
changes/refactor-shared-documents-commands.md, under "Changed — may break callers"):commands --jsondeclares:drive_document→document(viewimported),drive_catalog→catalog,drive_document_tag→document_tag,drive_document_relationship→document_relationship,drive_document_identity→document_identity,drive_selected_folder→selected_folder,drive_mirror→mirror.identities listanswersremote_idandprovider(google-drive) instead ofgoogle_id, and takesremote_id:<id>.catalog treereads only the folder it shows. Over 10 000 entries it still fails withcatalog.tree-limit, and the message says to name a smaller folder or lower--depth. An entry in two folders is shown in full once and markedrepeated: trueelsewhere.export.existsandlisting.too-largereasons are cli-core's, and their messages name no provider.commands info --jsonloses thenotesandsearchoverride entries: those are shared commands now.documents listparses its query before it loads the profile. The reason changes only when both are wrong.Testing
On a local pack of WireCatLabs/cli-core#2966:
commands --jsondiff against drive@main: only the entity and view names and the identity fields above change. Every description, option, argument, effect and example is identical.pnpm generate:contracts/wirecat.jsonanddocs/commands.mdchange only by the entity names, plus one "Next usually" line.contracts/own-catalogue.jsonloses the 42 paths that cli-core now owns.contracts:check(help.snap),test:matrix(0 missing),lint,lint:commandsanddocs:checkpass.cli-dev audit(scripts/audit.sh): drive's rows and the list of 24 blocking findings are identical to the baseline before this change.🤖 Generated with Claude Code