@cursor/july 0.1.100 → 0.1.101
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/dist/bin/agent-serve.js +3 -2
- package/dist/channels/deployments/deployments-channel.d.ts +41 -5
- package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.js +88 -8
- package/dist/channels/deployments/types.d.ts +4 -3
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/origin/defaults.d.ts +43 -0
- package/dist/channels/origin/defaults.d.ts.map +1 -0
- package/dist/channels/origin/defaults.js +111 -0
- package/dist/channels/origin/index.d.ts +2 -0
- package/dist/channels/origin/index.d.ts.map +1 -1
- package/dist/channels/origin/index.js +2 -0
- package/dist/channels/origin/origin-channel.d.ts +2 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +24 -3
- package/dist/channels/origin/state.d.ts +32 -0
- package/dist/channels/origin/state.d.ts.map +1 -0
- package/dist/channels/origin/state.js +23 -0
- package/dist/channels/origin/types.d.ts +23 -1
- package/dist/channels/origin/types.d.ts.map +1 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +2 -1
- package/dist/channels/slack/code-fences.d.ts +17 -0
- package/dist/channels/slack/code-fences.d.ts.map +1 -0
- package/dist/channels/slack/code-fences.js +168 -0
- package/dist/channels/slack/index.d.ts +1 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +1 -0
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +11 -4
- package/dist/connections.d.ts +18 -2
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +18 -2
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.DZ1e0Ycq.js → app.BASO9Kih.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DbFXINq2.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.l8omwc6D.js → VPLocalSearchBox.DwkqxoE0.js} +1 -1
- package/dist/docs/assets/chunks/{theme.JVcD6gel.js → theme.CCil_13e.js} +2 -2
- package/dist/docs/assets/{reference_connections.md.BiGoBAk2.js → reference_connections.md.Di6jJAXF.js} +12 -2
- package/dist/docs/assets/{reference_connections.md.BiGoBAk2.lean.js → reference_connections.md.Di6jJAXF.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.BEJx9XVj.js → reference_http-api.md.oySXBO8o.js} +1 -1
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- 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-runtime.html +4 -4
- 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 +4 -4
- 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 +4 -4
- package/dist/docs/llms-full.txt +32 -1
- 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 +4 -4
- package/dist/docs/reference/cli.html +4 -4
- package/dist/docs/reference/connections.html +16 -6
- package/dist/docs/reference/connections.md +31 -0
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +6 -6
- package/dist/docs/reference/http-api.md +1 -1
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- 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 +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- 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 +4 -4
- 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 +55 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/extension.js +64 -0
- package/dist/extensions/cursor-cloud-agents/lib/cloud.d.ts +30 -0
- package/dist/extensions/cursor-cloud-agents/lib/cloud.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/cloud.js +45 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts +25 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +85 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts +15 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +55 -0
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +27 -0
- package/dist/extensions/cursor-cloud-agents/tools/follow_up.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/follow_up.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/follow_up.js +37 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +83 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/list.js +36 -0
- package/dist/extensions/cursor-cloud-agents/tools/status.d.ts +4 -0
- package/dist/extensions/cursor-cloud-agents/tools/status.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/tools/status.js +41 -0
- package/dist/extensions.d.ts +49 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +75 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/internal/advertise-tools.d.ts +4 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +20 -1
- package/dist/internal/as-of.d.ts +18 -0
- package/dist/internal/as-of.d.ts.map +1 -1
- package/dist/internal/as-of.js +131 -0
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +64 -19
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +3 -1
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts +16 -0
- package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -0
- package/dist/internal/cursor/hosted-deployment-secrets.js +61 -0
- package/dist/internal/cursor-deployment-relay.d.ts +15 -1
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +46 -7
- package/dist/internal/deploy-client.d.ts +23 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +54 -12
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +415 -120
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +5 -0
- package/dist/internal/framework-file-storage.d.ts +3 -3
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +34 -5
- package/dist/internal/hosted-delivery.d.ts +3 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +19 -32
- package/dist/internal/hosted-execution-diag.d.ts +5 -0
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +5 -0
- package/dist/internal/hosted-execution-flush.d.ts +46 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -0
- package/dist/internal/hosted-execution-flush.js +81 -0
- package/dist/internal/mcp-endpoint.js +1 -0
- package/dist/internal/mcp-host.d.ts +2 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +35 -15
- package/dist/internal/review-comments.d.ts +1 -1
- package/dist/internal/review-comments.d.ts.map +1 -1
- package/dist/internal/review-comments.js +4 -4
- package/dist/internal/server.d.ts +3 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +79 -104
- package/dist/internal/session-engine.d.ts +9 -7
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +45 -34
- 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 +2 -1
- package/dist/internal/start-log-store.d.ts +60 -0
- package/dist/internal/start-log-store.d.ts.map +1 -0
- package/dist/internal/start-log-store.js +151 -0
- package/dist/internal/tool-policy.d.ts +8 -0
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +19 -7
- package/dist/playground/assets/{index-DVs98vPL.js → index-BnNN1-EK.js} +45 -45
- package/dist/playground/assets/index-DBQCwFp0.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage-protocol.d.ts +24 -0
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +33 -0
- package/dist/storage.d.ts +1 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/types.d.ts +118 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +29 -1
- package/docs/reference/connections.md +31 -0
- package/docs/reference/http-api.md +1 -1
- package/package.json +18 -4
- package/src/bin/agent-serve.ts +11 -2
- package/src/channels/deployments/deployments-channel.ts +117 -8
- package/src/channels/deployments/types.ts +4 -3
- package/src/channels/origin/defaults.ts +143 -0
- package/src/channels/origin/index.ts +2 -0
- package/src/channels/origin/origin-channel.ts +37 -1
- package/src/channels/origin/state.ts +54 -0
- package/src/channels/origin/types.ts +24 -0
- package/src/channels/slack/api.ts +2 -1
- package/src/channels/slack/code-fences.ts +183 -0
- package/src/channels/slack/index.ts +1 -0
- package/src/channels/slack/live-delivery.ts +16 -13
- package/src/connections.ts +18 -1
- package/src/extensions/cursor-cloud-agents/extension.ts +118 -0
- package/src/extensions/cursor-cloud-agents/lib/cloud.ts +79 -0
- package/src/extensions/cursor-cloud-agents/lib/fleet.ts +109 -0
- package/src/extensions/cursor-cloud-agents/lib/repos.ts +81 -0
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +27 -0
- package/src/extensions/cursor-cloud-agents/tools/follow_up.ts +29 -0
- package/src/extensions/cursor-cloud-agents/tools/launch.ts +84 -0
- package/src/extensions/cursor-cloud-agents/tools/list.ts +31 -0
- package/src/extensions/cursor-cloud-agents/tools/status.ts +39 -0
- package/src/extensions.ts +98 -0
- package/src/index.ts +2 -0
- package/src/internal/advertise-tools.ts +37 -12
- package/src/internal/as-of.ts +163 -0
- package/src/internal/cli-deploy.ts +86 -23
- package/src/internal/continuation-identity.ts +3 -1
- package/src/internal/cursor/hosted-deployment-secrets.ts +72 -0
- package/src/internal/cursor-deployment-relay.ts +65 -8
- package/src/internal/deploy-client.ts +73 -18
- package/src/internal/discovery.ts +470 -113
- package/src/internal/distribution.ts +5 -0
- package/src/internal/framework-file-storage.ts +39 -5
- package/src/internal/hosted-delivery.ts +38 -63
- package/src/internal/hosted-execution-diag.ts +6 -0
- package/src/internal/hosted-execution-flush.ts +142 -0
- package/src/internal/mcp-endpoint.ts +1 -0
- package/src/internal/mcp-host.ts +40 -14
- package/src/internal/review-comments.ts +5 -2
- package/src/internal/server.ts +81 -100
- package/src/internal/session-engine.ts +56 -28
- package/src/internal/session-run-log.ts +2 -1
- package/src/internal/start-log-store.ts +177 -0
- package/src/internal/tool-policy.ts +39 -9
- package/src/storage-protocol.ts +37 -0
- package/src/storage.ts +1 -0
- package/src/types.ts +172 -14
- package/dist/docs/assets/chunks/@localSearchIndexroot.j70vvPL4.js +0 -1
- package/dist/playground/assets/index-BszoQDc6.css +0 -1
- /package/dist/docs/assets/{reference_http-api.md.BEJx9XVj.lean.js → reference_http-api.md.oySXBO8o.lean.js} +0 -0
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* session key with `processDeath: true` and the real throw. Soft-fail on
|
|
15
15
|
* persist so a store outage never changes the hosted-execution HTTP reply.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* Same flush moments as `hosted-execution.json` and the start.log tee —
|
|
18
|
+
* see `hosted-execution-flush.ts`. Keys: {@link storageKeys.sessionRun}.
|
|
18
19
|
*/
|
|
19
20
|
import type { FileSink } from "../files.js";
|
|
20
21
|
import type { AgentProject } from "../types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-run-log.d.ts","sourceRoot":"","sources":["../../src/internal/session-run-log.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"session-run-log.d.ts","source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BD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAa3E;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,YAAY,EAAE,CAOhB;AA6FD,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,SAAS,mBAAmB,EAAE,GACzC,qBAAqB,GAAG,SAAS,CAgBnC;AAuFD,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,qBAAqB,GAAG,SAAS,CAkCnC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,SAAS,YAAY,EAAE,CAAC;CAC9C,GAAG,kBAAkB,CA8GrB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,SAAS,YAAY,EAAE,CAAC;CAC9C,GAAG,kBAAkB,GAAG,SAAS,CAoBjC"}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* session key with `processDeath: true` and the real throw. Soft-fail on
|
|
15
15
|
* persist so a store outage never changes the hosted-execution HTTP reply.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* Same flush moments as `hosted-execution.json` and the start.log tee —
|
|
18
|
+
* see `hosted-execution-flush.ts`. Keys: {@link storageKeys.sessionRun}.
|
|
18
19
|
*/
|
|
19
20
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20
21
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable hosted `start.log` on the framework file store. **v2 only.**
|
|
3
|
+
*
|
|
4
|
+
* The engine tees stdout/stderr to a local file. That file is the v2
|
|
5
|
+
* customer log (errors, traces, debug). It is NOT written to S3 per line:
|
|
6
|
+
* callers snapshot the local buffer and PUT once. The Temporal host does
|
|
7
|
+
* a last catch-up at the end of the delivery so the object is complete
|
|
8
|
+
* after park/discard.
|
|
9
|
+
*
|
|
10
|
+
* Same flush moments as `hosted-execution.json` and session-runs —
|
|
11
|
+
* see `hosted-execution-flush.ts`. Keys: {@link storageKeys.log}.
|
|
12
|
+
* Values are raw UTF-8, not JSON.
|
|
13
|
+
*/
|
|
14
|
+
import type { FileSink } from "../files.js";
|
|
15
|
+
import type { AgentProject } from "../types.js";
|
|
16
|
+
/**
|
|
17
|
+
* Last N bytes flushed to the store. Matches the Temporal catch-up cap
|
|
18
|
+
* so guest snapshots and host catch-up stay interchangeable. The store
|
|
19
|
+
* allows 64 MiB; this keeps the dashboard snapshot bounded.
|
|
20
|
+
*/
|
|
21
|
+
export declare const START_LOG_STORE_MAX_BYTES: number;
|
|
22
|
+
/** Same path the hosted start command tees. Overridable in tests. */
|
|
23
|
+
export declare const DEFAULT_ENGINE_START_LOG_PATH = "/workspace/.agent-serve/start.log";
|
|
24
|
+
export interface StartLogStore {
|
|
25
|
+
persist(startLogId: string, contents: string): Promise<void>;
|
|
26
|
+
read(startLogId: string): Promise<string | undefined>;
|
|
27
|
+
}
|
|
28
|
+
export declare function tailStartLogText(raw: string, maxBytes: number): string;
|
|
29
|
+
export declare function resolveEngineStartLogPath(env?: NodeJS.ProcessEnv): string;
|
|
30
|
+
/**
|
|
31
|
+
* Read the local engine tee. Missing/empty is `undefined` (no store write).
|
|
32
|
+
* Soft-fail: a local read error must not change hosted-execution HTTP.
|
|
33
|
+
*/
|
|
34
|
+
export declare function readLocalStartLogText(args?: {
|
|
35
|
+
path?: string;
|
|
36
|
+
maxBytes?: number;
|
|
37
|
+
}): Promise<string | undefined>;
|
|
38
|
+
export declare function createStartLogStore(input: {
|
|
39
|
+
sink: FileSink;
|
|
40
|
+
agentName: string;
|
|
41
|
+
logger?: (line: string) => void;
|
|
42
|
+
}): StartLogStore;
|
|
43
|
+
/**
|
|
44
|
+
* Same selection as the session-run log: architecture-v2 hosted engines.
|
|
45
|
+
*/
|
|
46
|
+
export declare function selectStartLogStore(input: {
|
|
47
|
+
project: AgentProject;
|
|
48
|
+
logger?: (line: string) => void;
|
|
49
|
+
env?: Record<string, string | undefined>;
|
|
50
|
+
}): StartLogStore | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Snapshot the local tee into the store. No-op when the file is missing
|
|
53
|
+
* or empty. Soft-fail inside {@link StartLogStore.persist}.
|
|
54
|
+
*/
|
|
55
|
+
export declare function flushLocalStartLog(args: {
|
|
56
|
+
store: StartLogStore;
|
|
57
|
+
startLogId: string;
|
|
58
|
+
path?: string;
|
|
59
|
+
}): Promise<void>;
|
|
60
|
+
//# sourceMappingURL=start-log-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-log-store.d.ts","sourceRoot":"","sources":["../../src/internal/start-log-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAM5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAwB,CAAC;AAEjE,qEAAqE;AACrE,eAAO,MAAM,6BAA6B,sCACL,CAAC;AAEtC,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACvD;AAMD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQtE;AAED,wBAAgB,yBAAyB,CACvC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAKR;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAoB9B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,GAAG,aAAa,CAkChB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C,GAAG,aAAa,GAAG,SAAS,CAiB5B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable hosted `start.log` on the framework file store. **v2 only.**
|
|
3
|
+
*
|
|
4
|
+
* The engine tees stdout/stderr to a local file. That file is the v2
|
|
5
|
+
* customer log (errors, traces, debug). It is NOT written to S3 per line:
|
|
6
|
+
* callers snapshot the local buffer and PUT once. The Temporal host does
|
|
7
|
+
* a last catch-up at the end of the delivery so the object is complete
|
|
8
|
+
* after park/discard.
|
|
9
|
+
*
|
|
10
|
+
* Same flush moments as `hosted-execution.json` and session-runs —
|
|
11
|
+
* see `hosted-execution-flush.ts`. Keys: {@link storageKeys.log}.
|
|
12
|
+
* Values are raw UTF-8, not JSON.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import { readFile } from "node:fs/promises";
|
|
24
|
+
import { cursorFrameworkStoreSourceId, cursorHostedFiles, } from "../files-backends/cursor-hosted.js";
|
|
25
|
+
import { storageKeys } from "../storage-protocol.js";
|
|
26
|
+
import { resolveApiKeySync } from "./cursor/credentials.js";
|
|
27
|
+
import { AGENT_SERVE_GENERATION_ENV_VAR } from "./cursor-relay-core.js";
|
|
28
|
+
import { describeError } from "./describe-error.js";
|
|
29
|
+
/**
|
|
30
|
+
* Last N bytes flushed to the store. Matches the Temporal catch-up cap
|
|
31
|
+
* so guest snapshots and host catch-up stay interchangeable. The store
|
|
32
|
+
* allows 64 MiB; this keeps the dashboard snapshot bounded.
|
|
33
|
+
*/
|
|
34
|
+
export const START_LOG_STORE_MAX_BYTES = 2 * 1024 * 1024;
|
|
35
|
+
/** Same path the hosted start command tees. Overridable in tests. */
|
|
36
|
+
export const DEFAULT_ENGINE_START_LOG_PATH = "/workspace/.agent-serve/start.log";
|
|
37
|
+
function decodeSinkBody(body) {
|
|
38
|
+
return body instanceof Uint8Array ? body : body.body;
|
|
39
|
+
}
|
|
40
|
+
export function tailStartLogText(raw, maxBytes) {
|
|
41
|
+
const encoded = new TextEncoder().encode(raw);
|
|
42
|
+
if (encoded.byteLength <= maxBytes) {
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
return new TextDecoder().decode(encoded.subarray(encoded.byteLength - maxBytes));
|
|
46
|
+
}
|
|
47
|
+
export function resolveEngineStartLogPath(env = process.env) {
|
|
48
|
+
var _a;
|
|
49
|
+
const configured = (_a = env.AGENT_SERVE_ENGINE_START_LOG_PATH) === null || _a === void 0 ? void 0 : _a.trim();
|
|
50
|
+
return configured !== undefined && configured.length > 0
|
|
51
|
+
? configured
|
|
52
|
+
: DEFAULT_ENGINE_START_LOG_PATH;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Read the local engine tee. Missing/empty is `undefined` (no store write).
|
|
56
|
+
* Soft-fail: a local read error must not change hosted-execution HTTP.
|
|
57
|
+
*/
|
|
58
|
+
export function readLocalStartLogText(args) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const path = (_a = args === null || args === void 0 ? void 0 : args.path) !== null && _a !== void 0 ? _a : resolveEngineStartLogPath();
|
|
62
|
+
const maxBytes = (_b = args === null || args === void 0 ? void 0 : args.maxBytes) !== null && _b !== void 0 ? _b : START_LOG_STORE_MAX_BYTES;
|
|
63
|
+
try {
|
|
64
|
+
const raw = yield readFile(path, "utf8");
|
|
65
|
+
if (raw.length === 0) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
return tailStartLogText(raw, maxBytes);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (error !== null &&
|
|
72
|
+
typeof error === "object" &&
|
|
73
|
+
"code" in error &&
|
|
74
|
+
error.code === "ENOENT") {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export function createStartLogStore(input) {
|
|
82
|
+
var _a;
|
|
83
|
+
const { sink, agentName } = input;
|
|
84
|
+
const logger = (_a = input.logger) !== null && _a !== void 0 ? _a : (() => { });
|
|
85
|
+
return {
|
|
86
|
+
persist(startLogId, contents) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
const key = storageKeys.log(agentName, startLogId);
|
|
89
|
+
const body = tailStartLogText(contents, START_LOG_STORE_MAX_BYTES);
|
|
90
|
+
try {
|
|
91
|
+
yield sink.put(key, new TextEncoder().encode(body));
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
logger(`[agent-sdk] start-log: persist failed for ${startLogId} (${describeError(error)})`);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
read(startLogId) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const key = storageKeys.log(agentName, startLogId);
|
|
101
|
+
try {
|
|
102
|
+
const body = yield sink.get(key);
|
|
103
|
+
if (body === undefined) {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
const text = new TextDecoder().decode(decodeSinkBody(body));
|
|
107
|
+
return text.length === 0 ? undefined : text;
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
logger(`[agent-sdk] start-log: read failed for ${startLogId} (${describeError(error)})`);
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Same selection as the session-run log: architecture-v2 hosted engines.
|
|
119
|
+
*/
|
|
120
|
+
export function selectStartLogStore(input) {
|
|
121
|
+
var _a;
|
|
122
|
+
if (input.project.agent.architecture !== "v2") {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const env = (_a = input.env) !== null && _a !== void 0 ? _a : process.env;
|
|
126
|
+
if (env[AGENT_SERVE_GENERATION_ENV_VAR] === undefined) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const envSnapshot = env;
|
|
130
|
+
return createStartLogStore({
|
|
131
|
+
sink: cursorHostedFiles({
|
|
132
|
+
resolveStoreSourceId: () => cursorFrameworkStoreSourceId(envSnapshot),
|
|
133
|
+
resolveApiKey: () => { var _a; return (_a = resolveApiKeySync()) === null || _a === void 0 ? void 0 : _a.apiKey; },
|
|
134
|
+
}),
|
|
135
|
+
agentName: input.project.name,
|
|
136
|
+
logger: input.logger,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Snapshot the local tee into the store. No-op when the file is missing
|
|
141
|
+
* or empty. Soft-fail inside {@link StartLogStore.persist}.
|
|
142
|
+
*/
|
|
143
|
+
export function flushLocalStartLog(args) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
const contents = yield readLocalStartLogText(args.path === undefined ? undefined : { path: args.path });
|
|
146
|
+
if (contents === undefined) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
yield args.store.persist(args.startLogId, contents);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
@@ -68,6 +68,14 @@ export interface ToolCallFacts {
|
|
|
68
68
|
asOf?: string;
|
|
69
69
|
/** The tool's declared time-bound argument names, if it made them. */
|
|
70
70
|
timeArgs?: readonly string[];
|
|
71
|
+
/**
|
|
72
|
+
* String-typed time-window property names a vendor tool's own input schema
|
|
73
|
+
* declares (`from`/`to`/`since`/...). In a frozen session a call that omits
|
|
74
|
+
* one is refused: the vendor fills an omitted window with a live default
|
|
75
|
+
* the argument walker can never see. Advertised/bridged MCP tools only —
|
|
76
|
+
* authored tools declare {@link timeArgs} instead.
|
|
77
|
+
*/
|
|
78
|
+
timeWindow?: readonly string[];
|
|
71
79
|
}
|
|
72
80
|
/**
|
|
73
81
|
* The effect of one specific call.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-policy.d.ts","sourceRoot":"","sources":["../../src/internal/tool-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-policy.d.ts","sourceRoot":"","sources":["../../src/internal/tool-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAOrB,6CAA6C;AAC7C,MAAM,MAAM,YAAY;AACtB,yBAAyB;AACvB;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE;AACjB,uDAAuD;GACrD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE;AAC/C;;;;;GAKG;GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AACrC;;;GAGG;GACD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3C,2DAA2D;AAC3D,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,MAAM,EAAE,OAAO,CAAC;IAChB,8CAA8C;IAC9C,MAAM,EAAE,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IACjD;;;;;;OAMG;IACH,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,kBAAkB,CAAA;KAAE,CAAC;IAC7D,yEAAyE;IACzE,YAAY,CAAC,EAAE,iBAAiB,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,iBAAiB,CAAC,CAAC;IACzE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAUD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,qBAAqB,CAAC,KAAK,CAAC,GAAG,SAAS,EAChD,KAAK,EAAE,OAAO,GACb,UAAU,CAIZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,kBAAkB,GAAG,SAAS,GAC1C,UAAU,GAAG,SAAS,CAiBxB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,aAAa,GAAG,YAAY,CAAC,EACvE,KAAK,EAAE,OAAO,GACb,UAAU,GAAG,SAAS,CAKxB;AAkBD,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAyDjE"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* decision lives here, in one pure function, and every path asks it rather
|
|
9
9
|
* than re-implementing it.
|
|
10
10
|
*/
|
|
11
|
-
import { timeArgViolation } from "./as-of.js";
|
|
11
|
+
import { forwardTimeArgument, missingTimeWindow, timeArgViolation, } from "./as-of.js";
|
|
12
12
|
/**
|
|
13
13
|
* What a stubbed write answers. Deliberately not self-describing: a model told
|
|
14
14
|
* mid-turn that its writes are not real starts hedging its conclusions, and
|
|
@@ -82,12 +82,24 @@ function unclassifiedRefusal(toolName) {
|
|
|
82
82
|
export function decideToolCall(facts) {
|
|
83
83
|
// Before the dry-run split: a frozen session bounds its reads whether or
|
|
84
84
|
// not its writes are stubbed.
|
|
85
|
-
if (facts.asOf !== undefined
|
|
86
|
-
facts.timeArgs !== undefined &&
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
if (facts.asOf !== undefined) {
|
|
86
|
+
if (facts.timeArgs !== undefined && facts.timeArgs.length > 0) {
|
|
87
|
+
const violation = timeArgViolation(facts.input, facts.timeArgs, facts.asOf);
|
|
88
|
+
if (violation !== undefined) {
|
|
89
|
+
return { kind: "unbounded", message: violation };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const forward = forwardTimeArgument(facts.input, facts.asOf);
|
|
93
|
+
if (forward !== undefined) {
|
|
94
|
+
return { kind: "unbounded", message: forward };
|
|
95
|
+
}
|
|
96
|
+
// Present values are checked above; absent ones are the vendor's live
|
|
97
|
+
// default window, which no walker can see. Require them explicitly.
|
|
98
|
+
if (facts.timeWindow !== undefined) {
|
|
99
|
+
const omitted = missingTimeWindow(facts.input, facts.timeWindow, facts.asOf);
|
|
100
|
+
if (omitted !== undefined) {
|
|
101
|
+
return { kind: "unbounded", message: omitted };
|
|
102
|
+
}
|
|
91
103
|
}
|
|
92
104
|
}
|
|
93
105
|
if (!facts.dryRun) {
|