Repository navigation
feat: Yandex Disk as a documents source, live files commands and the api group - #1
Merged
Merged
Conversation
- spec/ydisk: the resource listing and the five declarations the CLI uses (disk, resources, public/resources, trash/resources, operations), each with its URL and SHA-256 in provenance.json; sync-spec fetches Swagger 1.2. - spec-model: keys each declaration by its listing path and upgrades with upgradeToOpenApi3(listing, declarations); the Yandex 360 admin settings entry is left out with its reason. swagger-converter 2.1.0 added as a devDependency, as cli-base's peer. - generate: names from paths without the /v1/disk prefix, eight mapped by hand (GET /v1/disk would be `list`, the group's own command); group `files` with deletingFlags permanently and overwrite, shares publish, unpublish and public-settings; offset pagination detected for five reads; sign-in `Authorization: OAuth <token>` from the quickstart page. - identity: hosts cloud-api.yandex.net, downloader.disk.yandex.ru and *.disk.yandex.net; the sample host stays until the sample goes. - api.test: every operation against fakeApi with the OAuth header, the delete key on both deletes, overwrite=true refused by files.delete, and publish refused by files.share. - Regenerated src/generated, coverage, commands page, skill API pages and contracts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fake and the CLI share manifestBaseUrl, so a doubled slash between the server and the path would pass the host check alone. Also drop an unverified claim about the public-key reads from the sign-in reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sk sign-in The template's sample is gone; ydisk now talks to Yandex Disk's REST API: - session start checks a pasted OAuth token with GET /v1/disk and keeps it in the keyring; the token goes only to cloud-api.yandex.net, as `Authorization: OAuth <token>`. - The source (src/yandex/source.ts) is a FeedlessDocumentSource: ids are resource_id, the path rides in providerMetadata, each sync walks the chosen folders and reads only files whose MD5 changed, and a download whose bytes do not match the listed MD5 is retried later instead of saved under the wrong id. cli-core's documentLibraryCommands mounts folders (with folders browse), sync, status, documents, search, catalog and knowledge. - files list|show|download|upload|copy|move|create|delete|restore|publish|unpublish, by Disk path, through the profile's guard and send journal, never retried. Over MCP, download answers a file's text and cannot write a path (--output is owner-only); upload refuses credential files unless the owner adds --allow-any-file. Downloads stream to a temporary file; links go through linkFetch without the token. - The api group leaves out the three operations that answer a download or upload link, and takes `file`, `preview` and `sizes` out of every answer. - cli-core 0.689.0, cli-base 0.110.0; coverage leaves out src/generated; a gitleaks rule for Yandex tokens; lint overrides with reasons for the folder web link and files list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ict fakes - src/testing/fake-disk.ts, an in-memory Disk that refuses an unknown path or parameter, a call without `OAuth <token>`, and a download that carries the token; src/testing/disk-api.ts, cli-base's fakeApi from the whole generated spec, with knobs for lost, hung and failed writes. - cli-core's documentSourceContract and documentCommandsContract over the source and the CLI. - The template sample's transport, session and write-path tests, ported to the Disk. - The review findings as tests: an upload whose answer is lost is outcome_unknown, a credential file is refused, MCP cannot pass --output, a download with other bytes than the listed MD5 is not saved, the api answers carry no download link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fragment README, docs/index.md, docs/security.md and the agent skill say what the CLI does for a person and an agent; docs/dev/DESIGN.md keeps the owner's answers, the differences from drive-cli with their reasons, and how the source handles paths, the missing change feed and links. changes/feat-source.md is the release's entry. Generated pages are refreshed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e added again Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e test Disk lacks it The owner prepares only the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first live check got a link on mds.storage.yandex.net, a host Yandex's docs do not name, and the CLI refused it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The first build of
ydisk: Yandex Disk as a WireCat documents source, live file commands and the generatedapigroup, on the shared foundation (cli-template 0.25.0, cli-core 0.690.0, cli-base 0.110.0).What it does
folders add/list/browse/remove,sync,status, and cli-core's shared documents, search, catalog and knowledge commands. Yandex has no change feed, so each sync walks the chosen folders and reads only files whose MD5 changed.files list/show/download/upload/copy/move/create/delete/restore/publish/unpublish, guarded by the keysfiles.deleteandfiles.share.api: 20 operations generated from Yandex's Swagger 1.2. The three that answer a file link are left out.Design: docs/dev/DESIGN.md. Measurement: cli-testing#381 (1,437 hand-written production lines against notion-cli's 4,531).
Reviews
Three fresh-agent reviews ran before the push. Every finding is fixed with a test: an MCP path that could overwrite or upload any local file, a file saved under another file's id after a replace during sync, a lost upload answer reported as a network error, and download links in
apioutput.Conformance
0.0.0 decad7d712f98d7611ebdc20bd7d7f68b947c0ea 2026-11-17 scripts/live.sh v2:ea8d71e5ea60b1f0d88654e3e4eb33df1c087493ae33ff4d10d4f7c115107f68Local: typecheck, lint, 172 tests,
contracts:check,docs:check. The live check (bin/live) is the owner's and has not run yet.🤖 Generated with Claude Code