@cursor/july 0.1.101 → 0.1.102
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/README.md +27 -0
- package/dist/channels/slack/api.d.ts +1 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +3 -1
- package/dist/channels/slack/assistant.d.ts +1 -1
- package/dist/channels/slack/assistant.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.d.ts +3 -2
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +28 -8
- package/dist/channels/slack/inbound.d.ts +8 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +28 -0
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +2 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.BASO9Kih.js → app.CLA03RCz.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.FAqdWIXo.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DwkqxoE0.js → VPLocalSearchBox.ifxv-cJV.js} +1 -1
- package/dist/docs/assets/chunks/{theme.CCil_13e.js → theme.DWCwM6p-.js} +2 -2
- package/dist/docs/assets/concepts.md.rPzW2HZN.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.js +9 -0
- package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.lean.js +1 -0
- package/dist/docs/assets/{guides_cloud-runtime.md.CkYbjnAX.js → guides_cloud-runtime.md.BRirbRAN.js} +1 -1
- package/dist/docs/assets/index.md.Kiht7ell.js +5 -0
- package/dist/docs/assets/{index.md.Bb4k8kUm.lean.js → index.md.Kiht7ell.lean.js} +1 -1
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.js +56 -0
- package/dist/docs/assets/reference_extensions.md.9WQMZe1l.lean.js +1 -0
- package/dist/docs/assets/{reference_project-layout.md.Bv4KOtlB.js → reference_project-layout.md.CA6QP6Lw.js} +2 -2
- package/dist/docs/assets/{reference_project-layout.md.Bv4KOtlB.lean.js → reference_project-layout.md.CA6QP6Lw.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.BFW9retM.js → reference_skills.md.l2ezAcaN.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.CvAHsdSp.js → reference_tools.md.B1up2r9W.js} +1 -1
- package/dist/docs/assets/skills_framework-map.md.DDa4MeEW.js +1 -0
- package/dist/docs/assets/{skills_framework-map.md.BTi817yv.lean.js → skills_framework-map.md.DDa4MeEW.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/concepts.md +3 -3
- package/dist/docs/deployment.html +4 -4
- package/dist/docs/evals.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-agents.html +35 -0
- package/dist/docs/guides/cloud-agents.md +93 -0
- package/dist/docs/guides/cloud-runtime.html +6 -6
- package/dist/docs/guides/cloud-runtime.md +2 -0
- package/dist/docs/guides/convert-automation.html +4 -4
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/mcp-oauth.html +4 -4
- package/dist/docs/guides/opentelemetry.html +5 -5
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +6 -6
- package/dist/docs/index.md +5 -1
- package/dist/docs/llms-full.txt +321 -4
- package/dist/docs/llms.txt +2 -0
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +5 -5
- package/dist/docs/reference/cli.html +4 -4
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/extensions.html +82 -0
- package/dist/docs/reference/extensions.md +200 -0
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +6 -6
- package/dist/docs/reference/project-layout.md +3 -0
- package/dist/docs/reference/prompt.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +6 -6
- package/dist/docs/reference/skills.md +2 -0
- package/dist/docs/reference/subagents.html +5 -5
- package/dist/docs/reference/tools.html +6 -6
- package/dist/docs/reference/tools.md +2 -0
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/skills/ab.html +4 -4
- package/dist/docs/skills/create-agent.html +4 -4
- package/dist/docs/skills/debug.html +4 -4
- package/dist/docs/skills/evals.html +4 -4
- package/dist/docs/skills/framework-map.html +5 -5
- package/dist/docs/skills/framework-map.md +1 -0
- package/dist/docs/skills/github.html +4 -4
- package/dist/docs/skills/hillclimb.html +4 -4
- package/dist/docs/skills/index.html +4 -4
- package/dist/docs/skills/mcp-auth.html +4 -4
- package/dist/docs/skills/otel.html +4 -4
- package/dist/docs/skills/setup-slack.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/agentic-owners.html +4 -4
- package/dist/docs/templates/agents-md.html +4 -4
- package/dist/docs/templates/code-wiki.html +4 -4
- package/dist/docs/templates/demo.html +4 -4
- package/dist/docs/templates/pr-autofixer.html +4 -4
- package/dist/docs/templates/security-help.html +4 -4
- package/dist/docs/templates/security-reviewer.html +4 -4
- package/dist/docs/templates/triage.html +4 -4
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +9 -7
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +9 -7
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +78 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +286 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +5 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/inputs.js +4 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts +8 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +15 -0
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +21 -7
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/cancel.js +26 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/dump.js +54 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/get.js +25 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +14 -38
- package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/reply.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/{follow_up.js → reply.js} +12 -14
- package/dist/extensions.d.ts +38 -14
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +49 -12
- package/dist/files-backends/cursor-hosted.d.ts +0 -8
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +1 -11
- package/dist/files.d.ts +5 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +22 -18
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +13 -15
- package/dist/internal/cursor/backend-client.d.ts +8 -1
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +25 -9
- package/dist/internal/cursor/hosted-store-secrets.d.ts +11 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +15 -0
- package/dist/internal/discovery/ab.d.ts +9 -0
- package/dist/internal/discovery/ab.d.ts.map +1 -0
- package/dist/internal/discovery/ab.js +101 -0
- package/dist/internal/discovery/agent-config.d.ts +35 -0
- package/dist/internal/discovery/agent-config.d.ts.map +1 -0
- package/dist/internal/discovery/agent-config.js +173 -0
- package/dist/internal/discovery/agent.d.ts +11 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -0
- package/dist/internal/discovery/agent.js +306 -0
- package/dist/internal/discovery/channels.d.ts +10 -0
- package/dist/internal/discovery/channels.d.ts.map +1 -0
- package/dist/internal/discovery/channels.js +97 -0
- package/dist/internal/discovery/connections.d.ts +17 -0
- package/dist/internal/discovery/connections.d.ts.map +1 -0
- package/dist/internal/discovery/connections.js +436 -0
- package/dist/internal/discovery/context.d.ts +20 -0
- package/dist/internal/discovery/context.d.ts.map +1 -0
- package/dist/internal/discovery/context.js +30 -0
- package/dist/internal/discovery/cursor-plugin.d.ts +25 -0
- package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -0
- package/dist/internal/discovery/cursor-plugin.js +570 -0
- package/dist/internal/discovery/extensions.d.ts +19 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -0
- package/dist/internal/discovery/extensions.js +238 -0
- package/dist/internal/discovery/fs.d.ts +15 -0
- package/dist/internal/discovery/fs.d.ts.map +1 -0
- package/dist/internal/discovery/fs.js +115 -0
- package/dist/internal/discovery/hooks.d.ts +7 -0
- package/dist/internal/discovery/hooks.d.ts.map +1 -0
- package/dist/internal/discovery/hooks.js +48 -0
- package/dist/internal/discovery/info.d.ts +6 -0
- package/dist/internal/discovery/info.d.ts.map +1 -0
- package/dist/internal/discovery/info.js +141 -0
- package/dist/internal/discovery/instructions.d.ts +7 -0
- package/dist/internal/discovery/instructions.d.ts.map +1 -0
- package/dist/internal/discovery/instructions.js +95 -0
- package/dist/internal/discovery/modules.d.ts +20 -0
- package/dist/internal/discovery/modules.d.ts.map +1 -0
- package/dist/internal/discovery/modules.js +101 -0
- package/dist/internal/discovery/names.d.ts +12 -0
- package/dist/internal/discovery/names.d.ts.map +1 -0
- package/dist/internal/discovery/names.js +36 -0
- package/dist/internal/discovery/project.d.ts +53 -0
- package/dist/internal/discovery/project.d.ts.map +1 -0
- package/dist/internal/discovery/project.js +239 -0
- package/dist/internal/discovery/runtime.d.ts +34 -0
- package/dist/internal/discovery/runtime.d.ts.map +1 -0
- package/dist/internal/discovery/runtime.js +98 -0
- package/dist/internal/discovery/schedules.d.ts +7 -0
- package/dist/internal/discovery/schedules.d.ts.map +1 -0
- package/dist/internal/discovery/schedules.js +97 -0
- package/dist/internal/discovery/seed-files.d.ts +7 -0
- package/dist/internal/discovery/seed-files.d.ts.map +1 -0
- package/dist/internal/discovery/seed-files.js +41 -0
- package/dist/internal/discovery/services.d.ts +17 -0
- package/dist/internal/discovery/services.d.ts.map +1 -0
- package/dist/internal/discovery/services.js +104 -0
- package/dist/internal/discovery/skills.d.ts +16 -0
- package/dist/internal/discovery/skills.d.ts.map +1 -0
- package/dist/internal/discovery/skills.js +151 -0
- package/dist/internal/discovery/subagent.d.ts +13 -0
- package/dist/internal/discovery/subagent.d.ts.map +1 -0
- package/dist/internal/discovery/subagent.js +19 -0
- package/dist/internal/discovery/tools.d.ts +18 -0
- package/dist/internal/discovery/tools.d.ts.map +1 -0
- package/dist/internal/discovery/tools.js +159 -0
- package/dist/internal/discovery.d.ts +8 -62
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +8 -2505
- package/dist/internal/framework-file-storage.js +6 -6
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +8 -7
- package/dist/internal/frontmatter.d.ts +11 -3
- package/dist/internal/frontmatter.d.ts.map +1 -1
- package/dist/internal/frontmatter.js +29 -3
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +37 -20
- package/dist/internal/otel/collector.d.ts +13 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +84 -17
- package/dist/internal/otel/http.d.ts.map +1 -1
- package/dist/internal/otel/http.js +2 -10
- package/dist/internal/otel/mcp.d.ts +16 -0
- package/dist/internal/otel/mcp.d.ts.map +1 -0
- package/dist/internal/otel/mcp.js +68 -0
- package/dist/internal/otel/propagation.d.ts +6 -0
- package/dist/internal/otel/propagation.d.ts.map +1 -0
- package/dist/internal/otel/propagation.js +14 -0
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +2 -0
- package/dist/internal/session-engine.d.ts +5 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +68 -32
- package/dist/internal/session-run-log.d.ts +2 -1
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +13 -14
- package/dist/internal/start-log-store.d.ts +1 -1
- package/dist/internal/start-log-store.d.ts.map +1 -1
- package/dist/internal/start-log-store.js +12 -14
- package/dist/internal/storage-coordinator.d.ts +4 -1
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +15 -13
- package/dist/internal/tool-catalog.d.ts.map +1 -1
- package/dist/internal/tool-catalog.js +9 -6
- package/dist/internal/turn-cost.d.ts +14 -0
- package/dist/internal/turn-cost.d.ts.map +1 -1
- package/dist/internal/turn-cost.js +41 -9
- package/dist/internal/v2-hosting.d.ts +22 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -0
- package/dist/internal/v2-hosting.js +23 -0
- package/dist/otel.d.ts +16 -0
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +26 -0
- package/dist/playground/assets/index-B6C9S9nG.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-protocol.d.ts +24 -23
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +68 -65
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/tools.d.ts +9 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +9 -0
- package/dist/types.d.ts +39 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +5 -1
- package/docs/concepts.md +3 -3
- package/docs/guides/cloud-agents.md +98 -0
- package/docs/guides/cloud-runtime.md +2 -0
- package/docs/reference/extensions.md +205 -0
- package/docs/reference/project-layout.md +3 -0
- package/docs/reference/skills.md +2 -0
- package/docs/reference/tools.md +2 -0
- package/package.json +1 -1
- package/skills/framework-map/SKILL.md +1 -0
- package/src/channels/slack/api.ts +4 -2
- package/src/channels/slack/assistant.ts +1 -1
- package/src/channels/slack/dispatch.ts +27 -2
- package/src/channels/slack/inbound.ts +37 -0
- package/src/channels/slack/manifest.ts +2 -1
- package/src/extensions/cursor-cloud-agents/extension.ts +9 -7
- package/src/extensions/cursor-cloud-agents/lib/backend.ts +395 -0
- package/src/extensions/cursor-cloud-agents/lib/inputs.ts +5 -0
- package/src/extensions/cursor-cloud-agents/lib/transcript.ts +23 -0
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +21 -7
- package/src/extensions/cursor-cloud-agents/tools/cancel.ts +19 -0
- package/src/extensions/cursor-cloud-agents/tools/dump.ts +51 -0
- package/src/extensions/cursor-cloud-agents/tools/get.ts +18 -0
- package/src/extensions/cursor-cloud-agents/tools/launch.ts +22 -42
- package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
- package/src/extensions/cursor-cloud-agents/tools/reply.ts +34 -0
- package/src/extensions.ts +55 -12
- package/src/files-backends/cursor-hosted.ts +1 -17
- package/src/files.ts +43 -34
- package/src/index.ts +10 -1
- package/src/internal/conversation-mirror.ts +23 -18
- package/src/internal/cursor/backend-client.ts +32 -10
- package/src/internal/cursor/hosted-store-secrets.ts +27 -0
- package/src/internal/discovery/ab.ts +111 -0
- package/src/internal/discovery/agent-config.ts +222 -0
- package/src/internal/discovery/agent.ts +360 -0
- package/src/internal/discovery/channels.ts +103 -0
- package/src/internal/discovery/connections.ts +540 -0
- package/src/internal/discovery/context.ts +46 -0
- package/src/internal/discovery/cursor-plugin.ts +708 -0
- package/src/internal/discovery/extensions.ts +348 -0
- package/src/internal/discovery/fs.ts +108 -0
- package/src/internal/discovery/hooks.ts +45 -0
- package/src/internal/discovery/info.ts +179 -0
- package/src/internal/discovery/instructions.ts +113 -0
- package/src/internal/discovery/modules.ts +107 -0
- package/src/internal/discovery/names.ts +44 -0
- package/src/internal/discovery/project.ts +270 -0
- package/src/internal/discovery/runtime.ts +159 -0
- package/src/internal/discovery/schedules.ts +94 -0
- package/src/internal/discovery/seed-files.ts +37 -0
- package/src/internal/discovery/services.ts +124 -0
- package/src/internal/discovery/skills.ts +176 -0
- package/src/internal/discovery/subagent.ts +29 -0
- package/src/internal/discovery/tools.ts +182 -0
- package/src/internal/discovery.ts +20 -3081
- package/src/internal/framework-file-storage.ts +6 -6
- package/src/internal/framework-storage-selection.ts +9 -9
- package/src/internal/frontmatter.ts +36 -3
- package/src/internal/mcp-host.ts +84 -31
- package/src/internal/otel/collector.ts +125 -25
- package/src/internal/otel/http.ts +2 -12
- package/src/internal/otel/mcp.ts +69 -0
- package/src/internal/otel/propagation.ts +17 -0
- package/src/internal/otel/runtime.ts +2 -0
- package/src/internal/session-engine.ts +96 -11
- package/src/internal/session-run-log.ts +17 -16
- package/src/internal/start-log-store.ts +13 -16
- package/src/internal/storage-coordinator.ts +19 -16
- package/src/internal/tool-catalog.ts +9 -6
- package/src/internal/turn-cost.ts +47 -4
- package/src/internal/v2-hosting.ts +38 -0
- package/src/otel.ts +38 -0
- package/src/storage-protocol.ts +101 -91
- package/src/storage.ts +4 -0
- package/src/tools.ts +18 -0
- package/src/types.ts +43 -2
- package/dist/docs/assets/chunks/@localSearchIndexroot.DbFXINq2.js +0 -1
- package/dist/docs/assets/concepts.md.lwAgBIMI.js +0 -1
- package/dist/docs/assets/index.md.Bb4k8kUm.js +0 -5
- package/dist/docs/assets/skills_framework-map.md.BTi817yv.js +0 -1
- package/dist/extensions/cursor-cloud-agents/lib/cloud.d.ts +0 -30
- package/dist/extensions/cursor-cloud-agents/lib/cloud.d.ts.map +0 -1
- package/dist/extensions/cursor-cloud-agents/lib/cloud.js +0 -45
- package/dist/extensions/cursor-cloud-agents/tools/follow_up.d.ts +0 -4
- package/dist/extensions/cursor-cloud-agents/tools/follow_up.d.ts.map +0 -1
- package/dist/extensions/cursor-cloud-agents/tools/status.d.ts +0 -4
- package/dist/extensions/cursor-cloud-agents/tools/status.d.ts.map +0 -1
- package/dist/extensions/cursor-cloud-agents/tools/status.js +0 -41
- package/dist/playground/assets/index-DBQCwFp0.css +0 -1
- package/src/extensions/cursor-cloud-agents/lib/cloud.ts +0 -79
- package/src/extensions/cursor-cloud-agents/tools/follow_up.ts +0 -29
- package/src/extensions/cursor-cloud-agents/tools/status.ts +0 -39
- /package/dist/docs/assets/{concepts.md.lwAgBIMI.lean.js → concepts.md.rPzW2HZN.lean.js} +0 -0
- /package/dist/docs/assets/{guides_cloud-runtime.md.CkYbjnAX.lean.js → guides_cloud-runtime.md.BRirbRAN.lean.js} +0 -0
- /package/dist/docs/assets/{reference_skills.md.BFW9retM.lean.js → reference_skills.md.l2ezAcaN.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.CvAHsdSp.lean.js → reference_tools.md.B1up2r9W.lean.js} +0 -0
- /package/dist/playground/assets/{index-BnNN1-EK.js → index-ZqNoT8Ie.js} +0 -0
package/src/storage-protocol.ts
CHANGED
|
@@ -1,119 +1,129 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Durable session KV contract: key families plus a tolerant SessionRecord
|
|
3
|
-
* decoder.
|
|
4
|
-
*
|
|
5
|
-
* list can read Bugbot KV without importing `@cursor/july`.
|
|
3
|
+
* decoder. Architecture v1 remains in lockstep with the Bugbot-backed control
|
|
4
|
+
* plane. Architecture v2 uses the same key shape under its AgentSDK root.
|
|
6
5
|
*
|
|
7
6
|
* Additive JSON only — unknown fields are ignored.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { createHash } from "node:crypto";
|
|
11
10
|
|
|
11
|
+
/** Legacy architecture-v1 storage root. */
|
|
12
|
+
export const STORAGE_KEY_ROOT = "agentkit/v1" as const;
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
|
-
*
|
|
14
|
-
* prefix
|
|
15
|
+
* Architecture-v2 storage root. Hard cutoff: v2 writes and reads this
|
|
16
|
+
* prefix only. Existing `agentkit/v1` v2 objects are not migrated.
|
|
15
17
|
*/
|
|
16
|
-
export const
|
|
18
|
+
export const AGENTSDK_STORAGE_KEY_ROOT = "agentsdk/v1" as const;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
|
-
* Exact session-record keys: `agentkit/v1/{agent}/session/{sessionId}`.
|
|
21
|
+
* Exact session-record keys: `{agentkit|agentsdk}/v1/{agent}/session/{sessionId}`.
|
|
20
22
|
* Rejects `session-events/` and the CP-owned `_cp` agent name.
|
|
21
23
|
*/
|
|
22
24
|
const DURABLE_SESSION_RECORD_KEY_RE =
|
|
23
|
-
/^agentkit\/v1\/([^/]+)\/session\/([^/]+)$/;
|
|
25
|
+
/^(agentkit|agentsdk)\/v1\/([^/]+)\/session\/([^/]+)$/;
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* to a database). Channel ids and continuation tokens are the only segments
|
|
30
|
-
* that may contain caller-controlled characters; they are URI-encoded, and
|
|
31
|
-
* a segment whose encoding exceeds {@link MAX_KEY_SEGMENT_BYTES} is replaced
|
|
32
|
-
* by a `sha256:…` digest — so every minted key has a bounded length that any
|
|
33
|
-
* backend (VARCHAR columns, btree index tuples, S3 key limits) can store,
|
|
34
|
-
* no matter what a caller stuffs into a token. The substitution is
|
|
35
|
-
* deterministic: writes and continuation lookups build the same key.
|
|
28
|
+
* Build the framework-owned key scheme under one versioned root. Channel ids
|
|
29
|
+
* and continuation tokens are URI-encoded, and oversized segments are
|
|
30
|
+
* replaced by a deterministic `sha256:…` digest.
|
|
36
31
|
*
|
|
37
32
|
* | Key | Value |
|
|
38
33
|
* | --- | --- |
|
|
39
|
-
* | `
|
|
40
|
-
* | `
|
|
41
|
-
* | `
|
|
42
|
-
* | `
|
|
43
|
-
* | `
|
|
44
|
-
* | `
|
|
34
|
+
* | `{root}/{agent}/session/{sessionId}` | `SessionRecord` |
|
|
35
|
+
* | `{root}/{agent}/session-events/{sessionId}/{index}` | `SessionEvent[]` chunk (index = first event's index, zero-padded) |
|
|
36
|
+
* | `{root}/{agent}/session-runs/{sessionPublicId}` | One session-level hosted-execution log (executions[] + lastFailure) |
|
|
37
|
+
* | `{root}/{agent}/logs/{logId}` | Hosted engine stdout/stderr tee (on-disk `start.log`; `ses_…` after send, `wf:{workflowId}` on admission failure) |
|
|
38
|
+
* | `{root}/{agent}/continuation/{channelId}/{token}` | `{ sessionId }` |
|
|
39
|
+
* | `{root}/{agent}/kv/{key}` | Author JSON via `HostContext.kv` |
|
|
45
40
|
*
|
|
46
41
|
* The `eval-runs` / `ab-samples` / `ab-snapshot` families are minted only
|
|
47
42
|
* by the tables `defineStorage` derives over the KV core; a backend that
|
|
48
43
|
* authors dedicated `StorageConfig.evals` / `StorageConfig.abs` groups never
|
|
49
44
|
* sees them.
|
|
50
45
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`${
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
46
|
+
function createStorageKeys(root: string) {
|
|
47
|
+
return {
|
|
48
|
+
session: (agent: string, sessionId: string): string =>
|
|
49
|
+
`${root}/${agent}/session/${sessionId}`,
|
|
50
|
+
sessionPrefix: (agent: string): string => `${root}/${agent}/session/`,
|
|
51
|
+
sessionEvents: (
|
|
52
|
+
agent: string,
|
|
53
|
+
sessionId: string,
|
|
54
|
+
firstIndex: number
|
|
55
|
+
): string =>
|
|
56
|
+
`${root}/${agent}/session-events/${sessionId}/${String(firstIndex).padStart(8, "0")}`,
|
|
57
|
+
sessionEventsPrefix: (agent: string, sessionId: string): string =>
|
|
58
|
+
`${root}/${agent}/session-events/${sessionId}/`,
|
|
59
|
+
/**
|
|
60
|
+
* One session-level hosted-execution log (v2 only). `sessionPublicId` is
|
|
61
|
+
* the factory `ses_…` so a throw that never minted a July session still
|
|
62
|
+
* lands under a stable key. Per-execution rows live inside the document.
|
|
63
|
+
*/
|
|
64
|
+
sessionRun: (agent: string, sessionPublicId: string): string =>
|
|
65
|
+
`${root}/${agent}/session-runs/${keySegment(sessionPublicId)}`,
|
|
66
|
+
sessionRunsPrefix: (agent: string): string =>
|
|
67
|
+
`${root}/${agent}/session-runs/`,
|
|
68
|
+
/**
|
|
69
|
+
* The v2 customer log: the engine stdout/stderr tee (on-disk `start.log`).
|
|
70
|
+
* `logId` is the factory `ses_…` after a `send`, or
|
|
71
|
+
* `wf:{workflowId}` / `wf:{workflowId}/{runId}` when admission fails
|
|
72
|
+
* before a session exists. Skip/task admissions do not write this key.
|
|
73
|
+
* Stored as raw UTF-8, not JSON — the file store accepts 64 MiB
|
|
74
|
+
* objects, and this key is flushed in snapshots, not per line.
|
|
75
|
+
*/
|
|
76
|
+
log: (agent: string, logId: string): string =>
|
|
77
|
+
`${root}/${agent}/logs/${keySegment(logId)}`,
|
|
78
|
+
logsPrefix: (agent: string): string => `${root}/${agent}/logs/`,
|
|
79
|
+
continuation: (
|
|
80
|
+
agent: string,
|
|
81
|
+
channelId: string,
|
|
82
|
+
continuationKey: string
|
|
83
|
+
): string =>
|
|
84
|
+
`${root}/${agent}/continuation/${keySegment(channelId)}/${keySegment(continuationKey)}`,
|
|
85
|
+
/**
|
|
86
|
+
* Author-facing opaque JSON (see `HostContext.kv`). `key` is URI-encoded /
|
|
87
|
+
* digested like other caller-controlled segments.
|
|
88
|
+
*/
|
|
89
|
+
kv: (agent: string, key: string): string =>
|
|
90
|
+
`${root}/${agent}/kv/${keySegment(key)}`,
|
|
91
|
+
kvPrefix: (agent: string): string => `${root}/${agent}/kv/`,
|
|
92
|
+
/** One playground eval-run snapshot (derived `evals` table). */
|
|
93
|
+
evalRun: (agent: string, runId: string): string =>
|
|
94
|
+
`${root}/${agent}/eval-runs/${keySegment(runId)}`,
|
|
95
|
+
evalRunsPrefix: (agent: string): string => `${root}/${agent}/eval-runs/`,
|
|
96
|
+
/**
|
|
97
|
+
* One A/B metric sample (derived `abs` table); the segments mirror the
|
|
98
|
+
* dedicated table's row identity (experiment + sessionId + at).
|
|
99
|
+
*/
|
|
100
|
+
abSample: (
|
|
101
|
+
agent: string,
|
|
102
|
+
experiment: string,
|
|
103
|
+
sessionId: string,
|
|
104
|
+
at: string
|
|
105
|
+
): string =>
|
|
106
|
+
`${root}/${agent}/ab-samples/${keySegment(experiment)}/${keySegment(sessionId)}/${keySegment(at)}`,
|
|
107
|
+
/** Latest aggregate A/B snapshot (derived `abs` table, LWW). */
|
|
108
|
+
abSnapshot: (agent: string): string => `${root}/${agent}/ab-snapshot`,
|
|
109
|
+
} as const;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type StorageKeys = ReturnType<typeof createStorageKeys>;
|
|
113
|
+
|
|
114
|
+
/** Architecture-v1 keys. Kept stable for existing deployments. */
|
|
115
|
+
export const storageKeys: StorageKeys = createStorageKeys(STORAGE_KEY_ROOT);
|
|
116
|
+
|
|
117
|
+
/** Architecture-v2 keys. Hard cutoff onto {@link AGENTSDK_STORAGE_KEY_ROOT}. */
|
|
118
|
+
export const agentSdkStorageKeys: StorageKeys = createStorageKeys(
|
|
119
|
+
AGENTSDK_STORAGE_KEY_ROOT
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
export function storageKeysForArchitecture(
|
|
123
|
+
architecture: "v1" | "v2" | undefined
|
|
124
|
+
): StorageKeys {
|
|
125
|
+
return architecture === "v2" ? agentSdkStorageKeys : storageKeys;
|
|
126
|
+
}
|
|
117
127
|
|
|
118
128
|
/**
|
|
119
129
|
* Max bytes a caller-controlled key segment may occupy after URI-encoding.
|
|
@@ -164,7 +174,7 @@ export function keySegment(raw: string): string {
|
|
|
164
174
|
|
|
165
175
|
export function isDurableSessionRecordKey(key: string): boolean {
|
|
166
176
|
const match = DURABLE_SESSION_RECORD_KEY_RE.exec(key);
|
|
167
|
-
return match !== null && match[
|
|
177
|
+
return match !== null && match[2] !== "_cp";
|
|
168
178
|
}
|
|
169
179
|
|
|
170
180
|
/** List fields of a persisted `SessionRecord`. Unknown properties are dropped. */
|
package/src/storage.ts
CHANGED
|
@@ -61,8 +61,11 @@ import type { JsonValue, KvCasResult, KvVersionedEntry } from "./types.js";
|
|
|
61
61
|
export type {
|
|
62
62
|
DurableSessionRecord,
|
|
63
63
|
DurableSessionSummary,
|
|
64
|
+
StorageKeys,
|
|
64
65
|
} from "./storage-protocol.js";
|
|
65
66
|
export {
|
|
67
|
+
AGENTSDK_STORAGE_KEY_ROOT,
|
|
68
|
+
agentSdkStorageKeys,
|
|
66
69
|
frameworkStartLogId,
|
|
67
70
|
GOLDEN_DURABLE_SESSION_RECORD,
|
|
68
71
|
isDurableSessionRecordKey,
|
|
@@ -71,6 +74,7 @@ export {
|
|
|
71
74
|
parseDurableSessionRecord,
|
|
72
75
|
STORAGE_KEY_ROOT,
|
|
73
76
|
storageKeys,
|
|
77
|
+
storageKeysForArchitecture,
|
|
74
78
|
summarizeDurableSessionRecord,
|
|
75
79
|
} from "./storage-protocol.js";
|
|
76
80
|
|
package/src/tools.ts
CHANGED
|
@@ -53,7 +53,13 @@
|
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
55
|
import type { z } from "zod";
|
|
56
|
+
import {
|
|
57
|
+
forwardTimeArgument,
|
|
58
|
+
missingTimeWindow,
|
|
59
|
+
schemaTimeWindowKeys,
|
|
60
|
+
} from "./internal/as-of.js";
|
|
56
61
|
import { brandDefinition } from "./internal/brand.js";
|
|
62
|
+
import { classifyAnnotationsEffect } from "./internal/tool-policy.js";
|
|
57
63
|
import type {
|
|
58
64
|
JsonObject,
|
|
59
65
|
JsonSchemaObject,
|
|
@@ -78,6 +84,18 @@ export type {
|
|
|
78
84
|
ToolNeedsApproval,
|
|
79
85
|
ToolResultContent,
|
|
80
86
|
} from "./types.js";
|
|
87
|
+
/**
|
|
88
|
+
* Time-window and effect classifiers the host applies to every tool call.
|
|
89
|
+
* Re-exported for tools that reach other tools themselves (change-monitor
|
|
90
|
+
* `script`): inner calls skip the host gate, so the sandbox applies the same
|
|
91
|
+
* forward-time, omitted-window, and read-only filters.
|
|
92
|
+
*/
|
|
93
|
+
export {
|
|
94
|
+
classifyAnnotationsEffect,
|
|
95
|
+
forwardTimeArgument,
|
|
96
|
+
missingTimeWindow,
|
|
97
|
+
schemaTimeWindowKeys,
|
|
98
|
+
};
|
|
81
99
|
|
|
82
100
|
/** Input type for `execute`: inferred from a zod schema, JSON otherwise. */
|
|
83
101
|
export type ToolInput<TSchema> = TSchema extends z.ZodTypeAny
|
package/src/types.ts
CHANGED
|
@@ -52,6 +52,7 @@ export type DefinitionKind =
|
|
|
52
52
|
| "skill"
|
|
53
53
|
| "extension"
|
|
54
54
|
| "disabled-tool"
|
|
55
|
+
| "disabled-connection"
|
|
55
56
|
| "connection"
|
|
56
57
|
| "channel"
|
|
57
58
|
| "http-channel"
|
|
@@ -884,6 +885,13 @@ export interface ToolContext {
|
|
|
884
885
|
emit?: (payload: SessionEventPayload) => void;
|
|
885
886
|
/** The session's frozen `asOf`, or the wall clock. Use instead of `Date.now()`. */
|
|
886
887
|
now(): Date;
|
|
888
|
+
/**
|
|
889
|
+
* The session's frozen instant (ISO-8601), when it has one. Present exactly
|
|
890
|
+
* when this is an `asOf` session. A tool that reaches other tools itself —
|
|
891
|
+
* the script sandbox — reads it to apply the same forward-time guard to the
|
|
892
|
+
* calls it makes, which do not pass back through the host's gate.
|
|
893
|
+
*/
|
|
894
|
+
asOf?: string;
|
|
887
895
|
}
|
|
888
896
|
|
|
889
897
|
/**
|
|
@@ -1134,24 +1142,53 @@ export interface Extension<TConfig = undefined, TInput = TConfig>
|
|
|
1134
1142
|
readonly config: TConfig;
|
|
1135
1143
|
}
|
|
1136
1144
|
|
|
1137
|
-
/** The mount-independent part of an {@link Extension}. */
|
|
1145
|
+
/** The mount-independent part of an {@link Extension}: an agent-shaped tree. */
|
|
1138
1146
|
export interface ExtensionDeclaration {
|
|
1139
1147
|
readonly root: string;
|
|
1140
1148
|
readonly description: string | undefined;
|
|
1141
1149
|
}
|
|
1142
1150
|
|
|
1151
|
+
/** A Cursor plugin directory declared by `cursorPlugin`. */
|
|
1152
|
+
export interface CursorPluginDeclaration extends ExtensionDeclaration {
|
|
1153
|
+
readonly layout: "cursor-plugin";
|
|
1154
|
+
readonly variables: Record<string, string>;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1143
1157
|
/** What `agent/extensions/<ns>.ts` default-exports. */
|
|
1144
1158
|
export interface ExtensionMount extends BrandedDefinition<"extension"> {
|
|
1145
|
-
readonly extension: ExtensionDeclaration;
|
|
1159
|
+
readonly extension: ExtensionDeclaration | CursorPluginDeclaration;
|
|
1146
1160
|
readonly config: unknown;
|
|
1147
1161
|
}
|
|
1148
1162
|
|
|
1163
|
+
/** `cursorPlugin({ ... })`: mount a Cursor plugin directory as an extension. */
|
|
1164
|
+
export interface CursorPluginOptions {
|
|
1165
|
+
/**
|
|
1166
|
+
* The plugin directory: the one holding `.cursor-plugin/plugin.json`
|
|
1167
|
+
* (or `.claude-plugin/plugin.json` / `plugin.json`). A relative path
|
|
1168
|
+
* resolves against the project root.
|
|
1169
|
+
*/
|
|
1170
|
+
path: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* Values for the `${NAME}` placeholders in the plugin's MCP config, the
|
|
1173
|
+
* variables a Cursor install prompts for. Names the mount omits fall back
|
|
1174
|
+
* to `process.env`; a placeholder nothing resolves fails discovery.
|
|
1175
|
+
*/
|
|
1176
|
+
variables?: Record<string, string>;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1149
1179
|
/**
|
|
1150
1180
|
* `export default disableTool()` in a directory mount's `tools/<name>.ts`
|
|
1151
1181
|
* removes the extension's `<ns>__<name>`.
|
|
1152
1182
|
*/
|
|
1153
1183
|
export type DisabledToolDefinition = BrandedDefinition<"disabled-tool">;
|
|
1154
1184
|
|
|
1185
|
+
/**
|
|
1186
|
+
* `export default disableConnection()` in a directory mount's
|
|
1187
|
+
* `mcp-connections/<server>.ts` removes the extension's `<ns>__<server>`.
|
|
1188
|
+
*/
|
|
1189
|
+
export type DisabledConnectionDefinition =
|
|
1190
|
+
BrandedDefinition<"disabled-connection">;
|
|
1191
|
+
|
|
1155
1192
|
/** One mounted extension and the names it contributed. */
|
|
1156
1193
|
export interface DiscoveredExtension {
|
|
1157
1194
|
/** Mount namespace: the filename stem or directory name under `agent/extensions/`. */
|
|
@@ -1161,6 +1198,10 @@ export interface DiscoveredExtension {
|
|
|
1161
1198
|
tools: string[];
|
|
1162
1199
|
/** Composed skill names (`<ns>__<name>`), overrides applied. */
|
|
1163
1200
|
skills: string[];
|
|
1201
|
+
/** Composed MCP connection names (`<ns>__<server>`); Cursor plugin mounts. */
|
|
1202
|
+
connections: string[];
|
|
1203
|
+
/** Composed subagent names (`<ns>__<agent>`); Cursor plugin mounts. */
|
|
1204
|
+
subagents: string[];
|
|
1164
1205
|
}
|
|
1165
1206
|
|
|
1166
1207
|
// ============================================================================
|