@workerkit/core 0.3.19 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +17 -1
- package/dist/contract-provenance.d.ts +2 -2
- package/dist/contract-provenance.js +2 -2
- package/dist/contract-provenance.js.map +1 -1
- package/dist/descriptors/actions.js +14 -6
- package/dist/descriptors/actions.js.map +1 -1
- package/dist/descriptors/decision-authoring.js +15 -2
- package/dist/descriptors/decision-authoring.js.map +1 -1
- package/dist/descriptors/directory.js +8 -5
- package/dist/descriptors/directory.js.map +1 -1
- package/dist/descriptors/knowledge.d.ts +2 -0
- package/dist/descriptors/knowledge.js +79 -0
- package/dist/descriptors/knowledge.js.map +1 -0
- package/dist/descriptors/manage.js +86 -22
- package/dist/descriptors/manage.js.map +1 -1
- package/dist/guidance-coverage.js +10 -1
- package/dist/guidance-coverage.js.map +1 -1
- package/dist/guidance.d.ts +5 -1
- package/dist/guidance.js +5 -1
- package/dist/guidance.js.map +1 -1
- package/dist/instructions.d.ts +3 -1
- package/dist/instructions.js +23 -8
- package/dist/instructions.js.map +1 -1
- package/dist/profiles.d.ts +2 -1
- package/dist/profiles.js +9 -1
- package/dist/profiles.js.map +1 -1
- package/dist/scopes.d.ts +1 -1
- package/dist/scopes.js +5 -3
- package/dist/scopes.js.map +1 -1
- package/dist/text-audit.js +2 -1
- package/dist/text-audit.js.map +1 -1
- package/package.json +2 -2
package/dist/text-audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-audit.js","sourceRoot":"","sources":["../src/text-audit.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,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wF,CAAC;IACtM,2BAA2B,EAAE,QAAQ,CAAC,mBAAmB,CAAC,eAAe,EAAC,aAAa,EAAC,SAAS,EAAC,+DAA+D,CAAC;IAClK,2BAA2B,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,EAAC,WAAW,CAAC,EAAC,aAAa,EAAC,MAAM,CAAC,QAAQ,EAAC,WAAW,CAAC,EAAC,gFAAgF,CAAC;IACvM,gCAAgC,EAAE,QAAQ,CAAC,0BAA0B,EAAC,aAAa,EAAC,MAAM,CAAC,CAAC,sBAAsB,EAAC,wBAAwB,CAAC,EAAC,YAAY,CAAC,EAAC,uEAAuE,CAAC;IACnO,kBAAkB,EAAE,QAAQ,CAAC,YAAY,EAAC,UAAU,EAAC,CAAC,iCAAiC,EAAC,wDAAwD,CAAC,EAAC,qFAAqF,CAAC;IACxO,qBAAqB,EAAE,QAAQ,CAAC,KAAK,CAAC,wBAAwB,EAAC,MAAM,CAAC,EAAC,YAAY,EAAC,CAAC,wCAAwC,EAAC,8CAA8C,CAAC,EAAC,oGAAoG,CAAC;IACnR,0BAA0B,EAAE,QAAQ,CAAC,oBAAoB,EAAC,WAAW,EAAC,CAAC,kBAAkB,EAAC,iBAAiB,EAAC,gBAAgB,EAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAA,GAAG,CAAC,8CAA8C,CAAC,EAAC,6HAA6H,CAAC;CACzU,CAAC","sourcesContent":["// Generated from the backend agent contract. Edit the backend source and re-import; do not edit here.\nimport { allDescriptors, byName } from \"./descriptors/index.js\";\nimport { manageTextFragments } from \"./descriptors/manage.js\";\nimport { githubPagingText } from \"./descriptors/app-discovery.js\";\nimport { apiAppOperationsText } from \"./descriptors/api-apps.js\";\nimport { guidance, workerCreationTimezoneHint, runModelHint } from \"./guidance.js\";\n\n/** Advisory reporting policy; never truncate or remove text to meet these values. */\nconst complexTools = new Set([\"worker_run\", \"kit_install\", \"kit_install_preview\", \"kit_publish\", \"kit_validate\", \"delivery_create\", \"worker_deploy\", \"mcp_server_create\"]);\nexport const textAuditPolicy = {\n minimumRepeatedClauseChars: 120,\n // Plain operations have up to two inputs; 3+ inputs use the multi-parameter\n // guide, except the eight explicitly reviewed complex operations above.\n descriptionGuidance: Object.fromEntries(allDescriptors.map(d => {\n const category = complexTools.has(d.name) ? \"complex\" : Object.keys(d.schema).length > 2 ? \"multi\" : \"plain\";\n return [d.name, { category, chars: category === \"complex\" ? 1200 : category === \"multi\" ? 700 : 500 }];\n })),\n uppercaseTerms: {\n API:\"API terminology\", HTTP:\"HTTP protocol\", HTTPS:\"HTTPS protocol\", JSON:\"JSON format\",\n UTC:\"UTC timezone\", IANA:\"Timezone database\", UUID:\"UUID identifier\", GUID:\"GUID identifier\",\n URL:\"URL format\", URLs:\"URL format\", ISO:\"Date format\", RFC:\"Protocol references\",\n MCP:\"Model Context Protocol\", LLM:\"Language model\", BYOK:\"Billing mode\",\n GET:\"HTTP method\", POST:\"HTTP method\", PUT:\"HTTP method\", PATCH:\"HTTP method\", DELETE:\"HTTP method\",\n XOR:\"Exclusive inputs\", AND:\"Filter conjunction\", OR:\"Alternative requirements\",\n RUNTIME_NOT_ENABLED:\"Runtime gate wire code\", OPERATION_NOT_ALLOWED:\"Authority wire code\",\n },\n} as const;\n\nexport interface ReviewedTextFragment {\n text: string;\n ruleId: string;\n locations: readonly string[];\n reason: string;\n}\nconst fields = (tools: string[], field: string) => tools.map(t=>`${t}.properties.${field}`);\nconst param = (tool: string, field: string): string => {\n const text = byName(tool)?.schema[field]?.description;\n if (!text) throw Error(`Missing reviewed parameter: ${tool}.${field}`);\n return text;\n};\nconst fragment = (text: string, ruleId: string, locations: string[], reason: string): ReviewedTextFragment =>\n ({text:text.trim(),ruleId,locations,reason});\nconst listing = [\"kit_publish\",\"kit_replace\",\"kit_update\",\"kit_validate\"];\nconst authored = [\"kit_publish\",\"kit_replace\",\"kit_validate\"];\nconst schedules = [\"schedule_create\",\"schedule_update\"];\nconst clones = [\"worker_clone\",\"worker_clone_bulk\",\"worker_clone_preview\"];\nconst delivery = [\"delivery_create\",\"delivery_update\"];\n\n// Each value references its actual canonical constant or shared schema. Reasons\n// apply only at these reviewed destinations; an extra destination needs review.\nexport const reviewedTextFragments: Readonly<Record<string, ReviewedTextFragment>> = {\n \"schema.kit.appDescriptions\": fragment(param(\"kit_publish\",\"appDescriptions\"),\"KIT-01\",fields(listing,\"appDescriptions\"),\"Pinned-app notes must describe granted operations; each mutation can be discovered independently.\"),\n \"schema.delivery.target\": fragment(param(\"delivery_create\",\"target\"),\"DELIVERY-01\",fields(delivery,\"target\"),\"Create and update each need channel-specific shape and mutual exclusions before a write.\"),\n \"schema.classifier.profile\": fragment(param(\"worker_run\",\"decisionProfileId\"),\"DECISION-01\",[...fields([\"worker_run\",\"worker_deploy\",\"deployment_update\"],\"decisionProfileId\"),\"run_bulk.properties.workers.items.properties.decisionProfileId\"],\"Classifier selection and funding differ from the language model on every supplied-field path.\"),\n \"schema.kit.content\": fragment(param(\"kit_publish\",\"content\"),\"KIT-01\",fields(authored,\"content\"),\"Opaque content needs its guide prerequisite, kind rules and exclusions on every authoring entry point.\"),\n \"schema.kit.protection\": fragment(param(\"kit_publish\",\"isProtected\"),\"PROTECTED-01\",fields(listing,\"isProtected\"),\"The disclosure choice affects installed workers and withheld publisher content.\"),\n \"guidance.spendCap\": fragment(guidance.spendCap,\"RECEIPT-01\",[\"worker_run\",\"run_get\",\"run_bulk\"],\"A receipt alone does not identify the spend ceiling; each direct receipt path needs the distinction.\"),\n \"schema.kit.visibility\": fragment(param(\"kit_publish\",\"visibility\"),\"KIT-01\",fields(authored,\"visibility\"),\"Private/public changes scan and installation behavior before publication.\"),\n \"guidance.scores\": fragment(manageTextFragments.score,\"SCORE-01\",[\"run_get\",\"worker_runs\",\"run_score\"],\"Null is not zero and human scoring overrides self-report wherever scores are read or written.\"),\n \"schema.clone.instruction\": fragment(param(\"worker_clone\",\"includeInstruction\"),\"PROTECTED-01\",[...fields([\"worker_clone\",\"worker_clone_preview\"],\"includeInstruction\"),\"worker_clone_bulk.properties.workers.items.properties.includeInstruction\"],\"Protected instructions require an explicit exclusion for preview, single and bulk clone.\"),\n \"guidance.clone\": fragment(manageTextFragments.clone,\"DELIVERY-01\",clones,\"Copying rules, memory, schedules, delivery and budgets has consequences on every clone path.\"),\n \"schema.schedule.type\": fragment(manageTextFragments.scheduleType,\"DELIVERY-01\",[...schedules,...fields(schedules,\"scheduleType\")],\"Cross-field type requirements and future/DST semantics are not all encoded in the optional-field schema.\"),\n \"guidance.schedule.gates\": fragment(manageTextFragments.scheduleGate,\"DELIVERY-01\",schedules,\"Both schedule mutations can hit cadence/count plan walls with different remedies.\"),\n \"schema.app.provider\": fragment(param(\"app_connect\",\"provider\"),\"AUTH-01\",fields([\"app_connect\",\"app_disconnect\"],\"provider\"),\"Connection and disconnection require the exact provider/MCP namespace.\"),\n \"guidance.budget.window\": fragment(manageTextFragments.budgetWindow,\"FLEET-01\",[\"budget_get\",\"budget_set\"],\"Dollar windows and local run-count windows differ on both read and update.\"),\n \"guidance.github.paging\": fragment(githubPagingText,\"EVIDENCE-01\",[\"app_github_repos\",\"app_github_branches\"],\"Page filtering can return empty nonterminal pages; failures do not all mean reconnect.\"),\n \"guidance.schedule.overlap\": fragment(manageTextFragments.scheduleOverlap,\"DELIVERY-01\",schedules,\"Schedule non-overlap differs from on-demand plan concurrency.\"),\n \"schema.delivery.condition\": fragment(param(\"delivery_create\",\"condition\"),\"DELIVERY-01\",fields(delivery,\"condition\"),\"Condition values have outcome-specific routing including webhook-only Skipped.\"),\n \"schema.worker.creationTimezone\": fragment(workerCreationTimezoneHint,\"SETTINGS-01\",fields([\"action_worker_create\",\"decision_worker_create\"],\"timeZoneId\"),\"Both creation flows must ask the creator and explain the UTC default.\"),\n \"schema.run.model\": fragment(runModelHint,\"MONEY-01\",[\"worker_run.properties.modelSlug\",\"run_bulk.properties.workers.items.properties.modelSlug\"],\"A per-run override does not edit the saved deployment, in single or bulk execution.\"),\n \"schema.quality.spec\": fragment(param(\"worker_quality_preview\",\"spec\"),\"QUALITY-01\",[\"worker_quality_preview.properties.spec\",\"worker_quality_set.properties.evaluationSpec\"],\"Preview and save accept the same definition shape, and either can be discovered without the other.\"),\n \"schema.apiApp.operations\": fragment(apiAppOperationsText,\"APIAPP-01\",[\"api_app_validate\",\"api_app_preview\",\"api_app_create\",\"api_app_update\"].map(t=>`${t}.properties.definition.properties.operations`),\"Validate, preview, create and update accept the same closed operation shape, and each can be discovered without the others.\"),\n};\n"]}
|
|
1
|
+
{"version":3,"file":"text-audit.js","sourceRoot":"","sources":["../src/text-audit.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,0BAA0B,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAEjH,qFAAqF;AACrF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;AAC3K,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,0BAA0B,EAAE,GAAG;IAC/B,4EAA4E;IAC5E,wEAAwE;IACxE,mBAAmB,EAAE,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QAC7D,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CA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wC,EAAC,8CAA8C,CAAC,EAAC,oGAAoG,CAAC;IACnR,0BAA0B,EAAE,QAAQ,CAAC,oBAAoB,EAAC,WAAW,EAAC,CAAC,kBAAkB,EAAC,iBAAiB,EAAC,gBAAgB,EAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA,EAAE,CAAA,GAAG,CAAC,8CAA8C,CAAC,EAAC,6HAA6H,CAAC;IACxU,sCAAsC,EAAE,QAAQ,CAAC,4BAA4B,EAAC,cAAc,EAAC,CAAC,aAAa,EAAC,eAAe,CAAC,EAAC,oIAAoI,CAAC;CACnQ,CAAC","sourcesContent":["// Generated from the backend agent contract. Edit the backend source and re-import; do not edit here.\nimport { allDescriptors, byName } from \"./descriptors/index.js\";\nimport { manageTextFragments } from \"./descriptors/manage.js\";\nimport { githubPagingText } from \"./descriptors/app-discovery.js\";\nimport { apiAppOperationsText } from \"./descriptors/api-apps.js\";\nimport { guidance, workerCreationTimezoneHint, runModelHint, publicPublisherIdentityPause } from \"./guidance.js\";\n\n/** Advisory reporting policy; never truncate or remove text to meet these values. */\nconst complexTools = new Set([\"worker_run\", \"kit_install\", \"kit_install_preview\", \"kit_publish\", \"kit_validate\", \"delivery_create\", \"worker_deploy\", \"mcp_server_create\"]);\nexport const textAuditPolicy = {\n minimumRepeatedClauseChars: 120,\n // Plain operations have up to two inputs; 3+ inputs use the multi-parameter\n // guide, except the eight explicitly reviewed complex operations above.\n descriptionGuidance: Object.fromEntries(allDescriptors.map(d => {\n const category = complexTools.has(d.name) ? \"complex\" : Object.keys(d.schema).length > 2 ? \"multi\" : \"plain\";\n return [d.name, { category, chars: category === \"complex\" ? 1200 : category === \"multi\" ? 700 : 500 }];\n })),\n uppercaseTerms: {\n API:\"API terminology\", HTTP:\"HTTP protocol\", HTTPS:\"HTTPS protocol\", JSON:\"JSON format\",\n UTC:\"UTC timezone\", IANA:\"Timezone database\", UUID:\"UUID identifier\", GUID:\"GUID identifier\",\n URL:\"URL format\", URLs:\"URL format\", ISO:\"Date format\", RFC:\"Protocol references\",\n MCP:\"Model Context Protocol\", LLM:\"Language model\", BYOK:\"Billing mode\",\n GET:\"HTTP method\", POST:\"HTTP method\", PUT:\"HTTP method\", PATCH:\"HTTP method\", DELETE:\"HTTP method\",\n XOR:\"Exclusive inputs\", AND:\"Filter conjunction\", OR:\"Alternative requirements\",\n RUNTIME_NOT_ENABLED:\"Runtime gate wire code\", OPERATION_NOT_ALLOWED:\"Authority wire code\",\n },\n} as const;\n\nexport interface ReviewedTextFragment {\n text: string;\n ruleId: string;\n locations: readonly string[];\n reason: string;\n}\nconst fields = (tools: string[], field: string) => tools.map(t=>`${t}.properties.${field}`);\nconst param = (tool: string, field: string): string => {\n const text = byName(tool)?.schema[field]?.description;\n if (!text) throw Error(`Missing reviewed parameter: ${tool}.${field}`);\n return text;\n};\nconst fragment = (text: string, ruleId: string, locations: string[], reason: string): ReviewedTextFragment =>\n ({text:text.trim(),ruleId,locations,reason});\nconst listing = [\"kit_publish\",\"kit_replace\",\"kit_update\",\"kit_validate\"];\nconst authored = [\"kit_publish\",\"kit_replace\",\"kit_validate\"];\nconst schedules = [\"schedule_create\",\"schedule_update\"];\nconst clones = [\"worker_clone\",\"worker_clone_bulk\",\"worker_clone_preview\"];\nconst delivery = [\"delivery_create\",\"delivery_update\"];\n\n// Each value references its actual canonical constant or shared schema. Reasons\n// apply only at these reviewed destinations; an extra destination needs review.\nexport const reviewedTextFragments: Readonly<Record<string, ReviewedTextFragment>> = {\n \"schema.kit.appDescriptions\": fragment(param(\"kit_publish\",\"appDescriptions\"),\"KIT-01\",fields(listing,\"appDescriptions\"),\"Pinned-app notes must describe granted operations; each mutation can be discovered independently.\"),\n \"schema.delivery.target\": fragment(param(\"delivery_create\",\"target\"),\"DELIVERY-01\",fields(delivery,\"target\"),\"Create and update each need channel-specific shape and mutual exclusions before a write.\"),\n \"schema.classifier.profile\": fragment(param(\"worker_run\",\"decisionProfileId\"),\"DECISION-01\",[...fields([\"worker_run\",\"worker_deploy\",\"deployment_update\"],\"decisionProfileId\"),\"run_bulk.properties.workers.items.properties.decisionProfileId\"],\"Classifier selection and funding differ from the language model on every supplied-field path.\"),\n \"schema.kit.content\": fragment(param(\"kit_publish\",\"content\"),\"KIT-01\",fields(authored,\"content\"),\"Opaque content needs its guide prerequisite, kind rules and exclusions on every authoring entry point.\"),\n \"schema.kit.protection\": fragment(param(\"kit_publish\",\"isProtected\"),\"PROTECTED-01\",fields(listing,\"isProtected\"),\"The disclosure choice affects installed workers and withheld publisher content.\"),\n \"guidance.spendCap\": fragment(guidance.spendCap,\"RECEIPT-01\",[\"worker_run\",\"run_get\",\"run_bulk\"],\"A receipt alone does not identify the spend ceiling; each direct receipt path needs the distinction.\"),\n \"schema.kit.visibility\": fragment(param(\"kit_publish\",\"visibility\"),\"KIT-01\",fields(authored,\"visibility\"),\"Private/public changes scan and installation behavior before publication.\"),\n \"guidance.scores\": fragment(manageTextFragments.score,\"SCORE-01\",[\"run_get\",\"worker_runs\",\"run_score\"],\"Null is not zero and human scoring overrides self-report wherever scores are read or written.\"),\n \"schema.clone.instruction\": fragment(param(\"worker_clone\",\"includeInstruction\"),\"PROTECTED-01\",[...fields([\"worker_clone\",\"worker_clone_preview\"],\"includeInstruction\"),\"worker_clone_bulk.properties.workers.items.properties.includeInstruction\"],\"Protected instructions require an explicit exclusion for preview, single and bulk clone.\"),\n \"guidance.clone\": fragment(manageTextFragments.clone,\"DELIVERY-01\",clones,\"Copying rules, memory, schedules, delivery and budgets has consequences on every clone path.\"),\n \"schema.schedule.type\": fragment(manageTextFragments.scheduleType,\"DELIVERY-01\",[...schedules,...fields(schedules,\"scheduleType\")],\"Cross-field type requirements and future/DST semantics are not all encoded in the optional-field schema.\"),\n \"guidance.schedule.gates\": fragment(manageTextFragments.scheduleGate,\"DELIVERY-01\",schedules,\"Both schedule mutations can hit cadence/count plan walls with different remedies.\"),\n \"schema.app.provider\": fragment(param(\"app_connect\",\"provider\"),\"AUTH-01\",fields([\"app_connect\",\"app_disconnect\"],\"provider\"),\"Connection and disconnection require the exact provider/MCP namespace.\"),\n \"guidance.budget.window\": fragment(manageTextFragments.budgetWindow,\"FLEET-01\",[\"budget_get\",\"budget_set\"],\"Dollar windows and local run-count windows differ on both read and update.\"),\n \"guidance.github.paging\": fragment(githubPagingText,\"EVIDENCE-01\",[\"app_github_repos\",\"app_github_branches\"],\"Page filtering can return empty nonterminal pages; failures do not all mean reconnect.\"),\n \"guidance.schedule.overlap\": fragment(manageTextFragments.scheduleOverlap,\"DELIVERY-01\",schedules,\"Schedule non-overlap differs from on-demand plan concurrency.\"),\n \"schema.delivery.condition\": fragment(param(\"delivery_create\",\"condition\"),\"DELIVERY-01\",fields(delivery,\"condition\"),\"Condition values have outcome-specific routing including webhook-only Skipped.\"),\n \"schema.worker.creationTimezone\": fragment(workerCreationTimezoneHint,\"SETTINGS-01\",fields([\"action_worker_create\",\"decision_worker_create\"],\"timeZoneId\"),\"Both creation flows must ask the creator and explain the UTC default.\"),\n \"schema.run.model\": fragment(runModelHint,\"MONEY-01\",[\"worker_run.properties.modelSlug\",\"run_bulk.properties.workers.items.properties.modelSlug\"],\"A per-run override does not edit the saved deployment, in single or bulk execution.\"),\n \"schema.quality.spec\": fragment(param(\"worker_quality_preview\",\"spec\"),\"QUALITY-01\",[\"worker_quality_preview.properties.spec\",\"worker_quality_set.properties.evaluationSpec\"],\"Preview and save accept the same definition shape, and either can be discovered without the other.\"),\n \"schema.apiApp.operations\": fragment(apiAppOperationsText,\"APIAPP-01\",[\"api_app_validate\",\"api_app_preview\",\"api_app_create\",\"api_app_update\"].map(t=>`${t}.properties.definition.properties.operations`),\"Validate, preview, create and update accept the same closed operation shape, and each can be discovered without the others.\"),\n \"guidance.directory.publisherIdentity\": fragment(publicPublisherIdentityPause,\"DIRECTORY-01\",[\"kits_search\",\"publisher_get\"],\"Search cards carry the blank publisher fields and profile lookups return 404, and either tool can be discovered without the other.\"),\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workerkit/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"description": "API client and tool descriptors for WorkerKit: manage AI workers and browse the public kits directory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"node": ">=22.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"undici": "7.
|
|
65
|
+
"undici": "7.30.1",
|
|
66
66
|
"zod": "3.25.76"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|