feat(server): space bundle export/import — Genesis .tsk app kits (66 → 68) - #71
Open
johnxie wants to merge 5 commits into
Open
feat(server): space bundle export/import — Genesis .tsk app kits (66 → 68)#71johnxie wants to merge 5 commits into
johnxie wants to merge 5 commits into
Conversation
…→ 68) Refresh the 14-month-stale vendored v1 OpenAPI spec (64 ops live vs 57 vendored), patch 12 malformed root-relative $refs from the upstream spec generator to absolute pointers so the spec dereferences cleanly, and enable the two JSON bundle operations as tools: bundleExport + bundleImport. Schema drift from a year of API evolution updates 6 existing tools' input schemas (intended). Zip/media raw-binary ops stay disabled.
🦋 Changeset detectedLatest commit: 9dae1f5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
Author
|
Inherited the #70 review fixes via merge (7b0c4e7 merges b64aa52), plus one branch-local cleanup (de4de0a):
Gates: |
Member
Author
Code reviewFound 1 issue:
Lines 270 to 272 in d051fc7 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
…point note (code-review finding)
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.
Partially addresses #12.
What
Refreshes the vendored v1 OpenAPI spec — 14 months stale (last synced 2025-05, live spec now has 64 operations vs the vendored 57) — and enables the two JSON space-bundle operations as tools:
bundleExportGET /bundles/{spaceId}/exportreadOnlyHint: truebundleImportPOST /bundles/{workspaceId}/import66 → 68 tools (59 v1 + 9 v2). Bundles are the "Workspace DNA" format behind Genesis
.tskapp kits (the ZIP export endpoint supportsformat=tsk).Not enabled (out of scope — raw binary request/response bodies need a handwritten wrapper, MCP tools here are JSON-only):
bundleExportZip,bundleImportZip,mediaUpload,mediaDownload,mediaDownloadAll.Plan-quota note:
bundleImportinstalls projects/agents/automations into the target workspace; the API enforces plan limits server-side, so an over-quota import failing with a4XXerror is expected behavior, not a tool bug. The spec documents a generic4XXerror response for both ops. (The spec makes no claim about secret handling in exports, so the README doesn't either.)Upstream spec-generator bug: 12 malformed
$refs (patched here, to be filed internally)The live YAML from
https://www.taskade.com/api/documentation/v1/yamlcontains 12$refs that are relative to the enclosing JSON-schema root instead of the OpenAPI document root (they start with#/properties/...). They crash@readme/openapi-parserwithMissingPointerError, soyarn buildfails on the raw fetch. This PR patches each to the equivalent absolute pointer (resolved against the nearest ancestor node where the pointer is valid — verified unique for all 12). A fully-dereferenced deep-compare of the patched spec vs an independently patched copy (inlining instead of repointing) is byte-identical, and the full v1 codegen runs clean.Until the upstream generator is fixed, re-running
yarn fetch:openapiwill re-introduce the broken refs — the 12 patches below must be re-applied after any refetch.$refcomponents/schemas/Field/…/fillerConfig/anyOf/1/properties/sourceRef#/properties/data/anyOf/1/properties/fillerConfig/anyOf/0/properties/sourceRefcomponents/schemas/Field/…/fillerConfig/anyOf/2/properties/sourceRefcomponents/schemas/Field/…/fillerConfig/anyOf/4/properties/sourceRefcomponents/schemas/Field/properties/data/anyOf/5/properties/fillerConfig#/properties/data/anyOf/1/properties/fillerConfigcomponents/schemas/Field/properties/data/anyOf/7/properties/fillerConfigGET /agents/{agentId}/public-agent200 →…/preferences/meta/image/allOf/0#/properties/item/properties/data/properties/avatar/anyOf/0/properties/data/properties/fileGET /agents/{agentId}/public-agent200 →…/preferences/launcherIcon/anyOf/1/imagePATCH /agents/{agentId}/public-agentrequestBody →…/preferences/launcherIcon/anyOf/1/image#/properties/preferences/properties/meta/properties/imagePATCH /agents/{agentId}/public-agent200 →…/preferences/meta/image/allOf/0PATCH /agents/{agentId}/public-agent200 →…/preferences/launcherIcon/anyOf/1/imageGET /public-agents/{publicAgentId}200 →…/preferences/meta/image/allOf/0GET /public-agents/{publicAgentId}200 →…/preferences/launcherIcon/anyOf/1/image(5 under
components/schemas/Field, 7 under the/agents/{agentId}/public-agent+/public-agents/{publicAgentId}paths.)Schema drift in existing tools (intended — this PR is not additive-only)
Regenerating from the fresh spec updates the input schemas of 6 existing tools (a year of Field/Block/Task/Date/SpaceAgent evolution):
projectBlocksGetafter/beforelose.uuid()(now plain strings)projectTasksGetlimitgains.lte(1000)taskPutDateDateschema:date/timegain format descriptions;timezone(IANA) documented on start/endfolderCreateAgentDesigner,Brainstormer,Builder,ResearchAnalyst, …), skilldescriptionfield,inputPlaceholdernow nullableagentUpdateagentPublicUpdateTwo tools the drift was expected to touch —
agentPublicGet,publicAgentGet— are unchanged: their inputs are path-params only, and their drift (the avatar/file response schemas, incl. refs 6–12 above) lives in response schemas, which MCP tool definitions don't embed.Assertions
["bundleExport","bundleImport"]; removed[]; zero renames.bundleExporthasreadOnlyHint: true.tsx scripts/gen-taskade-mcp-tools.tscompletes with noMissingPointerError;yarn build→Lerna (powered by Nx) Successfully ran target build for project @taskade/mcp-server, and a post-commit rebuild leavesgit status --porcelainempty. Dereferenced patched spec is deep-equal to the independently verified fixed spec.git grep -nE '6[26] tools'finds no live claims (only the previous PR's own changeset entry "62 → 66 tools", which is that change's accurate history); "68 tools" present in rootREADME.md(3×),packages/server/README.md, andserver.json.CI gates
yarn build(regen both tool files + esbuild + lint:fix, tree stays clean) ·yarn lint·yarn test(23/23) — all green locally.Manual live-QA checklist (needs a real
TASKADE_API_KEY)bundleExporta small test space → responseok: true,item.version === "1",item.itemskeyed map withspace-bundle-*-itemtypesbundleImportthat bundle into a scratch workspace →ok: true+BundleInstallationcounts match the exported items4XXerror surfaced as a tool error (not a crash)