@cursor/july 0.1.42 → 0.1.45
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/AGENTS.md +1 -0
- package/dist/bin/agent-serve.js +3 -1
- package/dist/channels/github/api.d.ts +5 -0
- package/dist/channels/github/api.d.ts.map +1 -1
- package/dist/channels/github/api.js +18 -0
- package/dist/channels/github/defaults.d.ts +4 -5
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +27 -1
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +41 -10
- package/dist/channels/github/index.d.ts +1 -0
- package/dist/channels/github/index.d.ts.map +1 -1
- package/dist/channels/github/index.js +1 -0
- package/dist/channels/github/progress.d.ts +54 -0
- package/dist/channels/github/progress.d.ts.map +1 -0
- package/dist/channels/github/progress.js +168 -0
- package/dist/channels/github/state.d.ts +2 -0
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/state.js +1 -1
- package/dist/channels/github/types.d.ts +16 -4
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.d.ts +4 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +4 -0
- package/dist/channels.d.ts +17 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +31 -0
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.C4-Gwi7g.js → app.fHnNXEJ6.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BMT0xM4I.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DDoLm843.js → VPLocalSearchBox.Cf6ghfFY.js} +1 -1
- package/dist/docs/assets/chunks/{theme.SbjGIiM0.js → theme.B_5-VLe8.js} +2 -2
- package/dist/docs/assets/{deployment.md.BHVjVqRa.js → deployment.md.Cdp4rTE4.js} +1 -1
- package/dist/docs/assets/{guides_github.md.R2QlpR75.js → guides_github.md.DSg0j9qj.js} +29 -3
- package/dist/docs/assets/{guides_github.md.R2QlpR75.lean.js → guides_github.md.DSg0j9qj.lean.js} +1 -1
- package/dist/docs/assets/guides_opentelemetry.md.Csn7ZI25.js +27 -0
- package/dist/docs/assets/guides_opentelemetry.md.Csn7ZI25.lean.js +1 -0
- package/dist/docs/assets/index.md.COeoSkcF.js +5 -0
- package/dist/docs/assets/index.md.COeoSkcF.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.rIbfahJM.js → quickstart.md.DZxBu44y.js} +18 -49
- package/dist/docs/assets/quickstart.md.DZxBu44y.lean.js +1 -0
- package/dist/docs/assets/{reference_agent-config.md.CRmkoxd6.js → reference_agent-config.md.XRpxctsA.js} +9 -4
- package/dist/docs/assets/{reference_agent-config.md.CRmkoxd6.lean.js → reference_agent-config.md.XRpxctsA.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.BIabFUAI.js → reference_channels.md.MN8iDy8V.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DqEqQpGn.js → reference_cli.md.BDmjPPAm.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.B40QAG6m.js → reference_hooks.md.4cbRRIIu.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.B40QAG6m.lean.js → reference_hooks.md.4cbRRIIu.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md._XdeMahr.js → reference_project-layout.md.D3MdHM2z.js} +2 -1
- package/dist/docs/assets/{reference_tools.md.lSrsTxYJ.js → reference_tools.md.kJfJAP2m.js} +1 -1
- package/dist/docs/assets/templates_triage.md.CConZt1z.js +11 -0
- package/dist/docs/assets/templates_triage.md.CConZt1z.lean.js +1 -0
- package/dist/docs/building-with-agents.html +5 -5
- package/dist/docs/concepts.html +5 -5
- package/dist/docs/deployment.html +6 -6
- package/dist/docs/evals.html +4 -4
- package/dist/docs/example-agents/approval-buddy.html +4 -4
- package/dist/docs/example-agents/benny.html +4 -4
- package/dist/docs/example-agents/bugbot.html +4 -4
- package/dist/docs/example-agents/codebase-wiki.html +4 -4
- package/dist/docs/example-agents/codeowners-review.html +4 -4
- package/dist/docs/example-agents/concierge.html +4 -4
- package/dist/docs/example-agents/fsd.html +4 -4
- package/dist/docs/example-agents/index.html +5 -5
- package/dist/docs/example-agents/knowledge-base.html +4 -4
- package/dist/docs/example-agents/oncall.html +4 -4
- package/dist/docs/example-agents/security-reviewer.html +4 -4
- package/dist/docs/example-agents/slack-agent.html +4 -4
- package/dist/docs/example-agents/weather-agent.html +4 -4
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +5 -5
- package/dist/docs/guides/github.html +33 -7
- 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 +51 -0
- 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 +8 -27
- package/dist/docs/quickstart.html +24 -55
- package/dist/docs/reference/agent-config.html +12 -7
- package/dist/docs/reference/artifacts.html +4 -4
- package/dist/docs/reference/channels.html +6 -6
- package/dist/docs/reference/cli.html +7 -7
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/hooks.html +6 -6
- 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 +7 -6
- 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 +6 -6
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/templates/triage.html +35 -0
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/internal/cli-ax.d.ts +1 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +20 -5
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +38 -7
- package/dist/internal/deploy-client.d.ts +8 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +5 -2
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +82 -13
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +1 -0
- package/dist/internal/host-otel.d.ts +25 -0
- package/dist/internal/host-otel.d.ts.map +1 -0
- package/dist/internal/host-otel.js +162 -0
- package/dist/internal/init-project.d.ts +24 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +136 -17
- package/dist/internal/otel/attrs.d.ts +7 -0
- package/dist/internal/otel/attrs.d.ts.map +1 -0
- package/dist/internal/otel/attrs.js +13 -0
- package/dist/internal/otel/collector.d.ts +21 -0
- package/dist/internal/otel/collector.d.ts.map +1 -0
- package/dist/internal/otel/collector.js +605 -0
- package/dist/internal/otel/config.d.ts +42 -0
- package/dist/internal/otel/config.d.ts.map +1 -0
- package/dist/internal/otel/config.js +236 -0
- package/dist/internal/otel/http.d.ts +11 -0
- package/dist/internal/otel/http.d.ts.map +1 -0
- package/dist/internal/otel/http.js +97 -0
- package/dist/internal/otel/runtime.d.ts +21 -0
- package/dist/internal/otel/runtime.d.ts.map +1 -0
- package/dist/internal/otel/runtime.js +188 -0
- package/dist/internal/sdk-runner.d.ts +1 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +26 -1
- package/dist/internal/session-engine.d.ts +15 -2
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +58 -7
- package/dist/memory.d.ts +4 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +4 -0
- package/dist/otel.d.ts +88 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +64 -0
- package/dist/playground/assets/index-CZH9EFvO.css +1 -0
- package/dist/playground/assets/{index-B3HBneZZ.js → index-Dces8BDp.js} +34 -34
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +103 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +35 -105
- package/docs/deployment.md +2 -1
- package/docs/guides/github.md +79 -6
- package/docs/guides/opentelemetry.md +214 -0
- package/docs/quickstart.md +89 -227
- package/docs/reference/agent-config.md +52 -0
- package/docs/reference/channels.md +3 -1
- package/docs/reference/cli.md +2 -2
- package/docs/reference/hooks.md +21 -4
- package/docs/reference/project-layout.md +2 -0
- package/docs/reference/tools.md +5 -4
- package/docs/templates/triage.md +147 -0
- package/package.json +24 -2
- package/skills/create-agent/SKILL.md +2 -2
- package/skills/framework-map/SKILL.md +2 -0
- package/skills/otel/SKILL.md +98 -0
- package/src/bin/agent-serve.ts +3 -1
- package/src/channels/github/api.ts +22 -0
- package/src/channels/github/defaults.ts +27 -6
- package/src/channels/github/github-channel.ts +36 -1
- package/src/channels/github/index.ts +1 -0
- package/src/channels/github/progress.ts +243 -0
- package/src/channels/github/state.ts +3 -0
- package/src/channels/github/types.ts +12 -4
- package/src/channels/slack/slack-channel.ts +4 -0
- package/src/channels.ts +38 -0
- package/src/index.ts +7 -0
- package/src/internal/cli-ax.ts +21 -3
- package/src/internal/cli-deploy.ts +58 -3
- package/src/internal/deploy-client.ts +11 -0
- package/src/internal/discovery.ts +108 -4
- package/src/internal/distribution.ts +1 -0
- package/src/internal/host-otel.ts +252 -0
- package/src/internal/init-project.ts +160 -17
- package/src/internal/otel/attrs.ts +18 -0
- package/src/internal/otel/collector.ts +881 -0
- package/src/internal/otel/config.ts +307 -0
- package/src/internal/otel/http.ts +126 -0
- package/src/internal/otel/runtime.ts +271 -0
- package/src/internal/sdk-runner.ts +6 -0
- package/src/internal/server.ts +39 -1
- package/src/internal/session-engine.ts +83 -2
- package/src/memory.ts +4 -0
- package/src/otel.ts +155 -0
- package/src/types.ts +109 -3
- package/templates/triage/README.md +48 -0
- package/templates/triage/agent/agent.ts +14 -0
- package/templates/triage/agent/channels/intake.ts +20 -0
- package/templates/triage/agent/channels/slack.ts +3 -0
- package/templates/triage/agent/hooks/memory.ts +3 -0
- package/templates/triage/agent/instructions.md +27 -0
- package/templates/triage/agent/skills/triage-rubric.md +43 -0
- package/templates/triage/agent/tools/record_triage.ts +23 -0
- package/templates/triage/evals/evals.config.ts +5 -0
- package/templates/triage/evals/triage.eval.ts +43 -0
- package/templates/triage/package.json +18 -0
- package/templates/triage/tsconfig.json +12 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.BlU3A8EB.js +0 -1
- package/dist/docs/assets/index.md.BKpbkCa6.js +0 -24
- package/dist/docs/assets/index.md.BKpbkCa6.lean.js +0 -1
- package/dist/docs/assets/quickstart.md.rIbfahJM.lean.js +0 -1
- package/dist/playground/assets/index-Bqk9nplh.css +0 -1
- /package/dist/docs/assets/{deployment.md.BHVjVqRa.lean.js → deployment.md.Cdp4rTE4.lean.js} +0 -0
- /package/dist/docs/assets/{reference_channels.md.BIabFUAI.lean.js → reference_channels.md.MN8iDy8V.lean.js} +0 -0
- /package/dist/docs/assets/{reference_cli.md.DqEqQpGn.lean.js → reference_cli.md.BDmjPPAm.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md._XdeMahr.lean.js → reference_project-layout.md.D3MdHM2z.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.lSrsTxYJ.lean.js → reference_tools.md.kJfJAP2m.lean.js} +0 -0
|
@@ -18,6 +18,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
import { basename, resolve } from "node:path";
|
|
21
|
+
import { isPublicEndpointPolicy } from "../channels.js";
|
|
21
22
|
import { isCursorAccountTransport, } from "../types.js";
|
|
22
23
|
import { CursorBackendClient } from "./cursor/backend-client.js";
|
|
23
24
|
import { cursorExternalApiUrl, resolveApiKey, SIGN_IN_HINT, } from "./cursor/credentials.js";
|
|
@@ -357,7 +358,7 @@ export function promptChooseDeployTargets(agents, options) {
|
|
|
357
358
|
}
|
|
358
359
|
function deployOne(ctx, options, target, extras) {
|
|
359
360
|
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
361
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
361
362
|
const { dir, slug } = target;
|
|
362
363
|
// Fill --repo/--ref/--path from the local git checkout when omitted so
|
|
363
364
|
// `agent-sdk deploy` inside an agent directory is enough. Only probe git
|
|
@@ -419,7 +420,8 @@ function deployOne(ctx, options, target, extras) {
|
|
|
419
420
|
// truth for egress domains and expected secret names; flags override or
|
|
420
421
|
// augment it. Directories without an agent project (static placeholder
|
|
421
422
|
// deploys) simply have no manifest. The same load supplies the
|
|
422
|
-
// cursorAccount connection refs for the post-deploy connector auth
|
|
423
|
+
// cursorAccount connection refs for the post-deploy connector auth and
|
|
424
|
+
// the channels declared public via `publicEndpoint()`.
|
|
423
425
|
const manifest = isAgent ? yield readDeployManifest(dir) : undefined;
|
|
424
426
|
const hosting = manifest === null || manifest === void 0 ? void 0 : manifest.hosting;
|
|
425
427
|
const egressAllowedDomains = [
|
|
@@ -428,12 +430,21 @@ function deployOne(ctx, options, target, extras) {
|
|
|
428
430
|
...((_f = options.allowDomains) !== null && _f !== void 0 ? _f : []),
|
|
429
431
|
]),
|
|
430
432
|
];
|
|
433
|
+
const publicRoutePaths = ((_g = manifest === null || manifest === void 0 ? void 0 : manifest.publicChannelIds) !== null && _g !== void 0 ? _g : []).map((channelId) => `/v1/channels/${channelId}`);
|
|
434
|
+
if (!ctx.json && (manifest === null || manifest === void 0 ? void 0 : manifest.httpChannelPublicEndpoint) === true) {
|
|
435
|
+
ctx.err(`warning: publicEndpoint() on the built-in HTTP channel has no effect on hosting — only custom channels (/v1/channels/…) can be public; the session API always requires the alias token.\n`);
|
|
436
|
+
}
|
|
437
|
+
if (!ctx.json && publicRoutePaths.length > 0) {
|
|
438
|
+
// Security-relevant surface change: say exactly what will be reachable
|
|
439
|
+
// without the alias token before the deploy is accepted.
|
|
440
|
+
ctx.err(` public: ${publicRoutePaths.join(", ")} (served WITHOUT the alias token — these channels authenticate requests themselves)\n`);
|
|
441
|
+
}
|
|
431
442
|
// Today's only source shape: the control plane builds from a git ref (or
|
|
432
443
|
// serves the static placeholder). See DeploySource for the artifact seam.
|
|
433
|
-
const source = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ kind: "git-ref" }, (gitRepoUrl === undefined ? {} : { gitRepoUrl })), (gitRef === undefined ? {} : { gitRef })), (agentPath === undefined ? {} : { agentPath })), (options.cursorEventsRepos === undefined ||
|
|
444
|
+
const source = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ kind: "git-ref" }, (gitRepoUrl === undefined ? {} : { gitRepoUrl })), (gitRef === undefined ? {} : { gitRef })), (agentPath === undefined ? {} : { agentPath })), (options.cursorEventsRepos === undefined ||
|
|
434
445
|
options.cursorEventsRepos.length === 0
|
|
435
446
|
? {}
|
|
436
|
-
: { cursorEventRepos: options.cursorEventsRepos })), (egressAllowedDomains.length === 0 ? {} : { egressAllowedDomains }));
|
|
447
|
+
: { cursorEventRepos: options.cursorEventsRepos })), (egressAllowedDomains.length === 0 ? {} : { egressAllowedDomains })), { publicRoutePaths: publicRoutePaths.length === 0 ? undefined : publicRoutePaths });
|
|
437
448
|
let accepted;
|
|
438
449
|
try {
|
|
439
450
|
accepted = yield ctx.client.deploy({ teamId: ctx.teamId, slug, source });
|
|
@@ -485,16 +496,22 @@ function deployOne(ctx, options, target, extras) {
|
|
|
485
496
|
ctx.err(`Deployment ${slug} ended ${detail.status}${errorDetail}\n`);
|
|
486
497
|
return 1;
|
|
487
498
|
}
|
|
499
|
+
const deployedPublicRoutes = (_h = detail.publicRoutePaths) !== null && _h !== void 0 ? _h : [];
|
|
488
500
|
ctx.out(`Deployed ${slug} (team ${ctx.teamId})\n` +
|
|
489
501
|
` status: running\n` +
|
|
490
502
|
` generation: ${detail.generation}\n` +
|
|
491
503
|
` kind: ${detail.deploymentKind}\n` +
|
|
492
504
|
` alias: ${aliasUrl}\n` +
|
|
493
505
|
` playground: ${aliasUrl}/playground (sign in with the alias token)\n` +
|
|
494
|
-
` open: ${CLI} playground --prod --slug ${slug} --team ${ctx.teamId}\n`
|
|
506
|
+
` open: ${CLI} playground --prod --slug ${slug} --team ${ctx.teamId}\n` +
|
|
507
|
+
// Paste-ready webhook URLs: these subtrees skip the alias token, so
|
|
508
|
+
// the channel handler must verify deliveries (webhook signatures).
|
|
509
|
+
deployedPublicRoutes
|
|
510
|
+
.map((path) => ` public: ${aliasUrl}${path} (no alias token)\n`)
|
|
511
|
+
.join(""));
|
|
495
512
|
yield runPostDeployConnectorAuth(ctx, options, {
|
|
496
513
|
slug,
|
|
497
|
-
connections: (
|
|
514
|
+
connections: (_j = manifest === null || manifest === void 0 ? void 0 : manifest.cursorAccountConnections) !== null && _j !== void 0 ? _j : [],
|
|
498
515
|
serviceAccountId: deploymentServiceAccountId(detail),
|
|
499
516
|
});
|
|
500
517
|
return 0;
|
|
@@ -565,16 +582,22 @@ function runPostDeployConnectorAuth(ctx, options, args) {
|
|
|
565
582
|
}
|
|
566
583
|
/**
|
|
567
584
|
* Read the deploy-relevant bits of the project manifest at `dir` in one
|
|
568
|
-
* load: the `hosting` block
|
|
585
|
+
* load: the `hosting` block, the agent's cursorAccount connections, and the
|
|
586
|
+
* channels declared public via `publicEndpoint()`.
|
|
569
587
|
*/
|
|
570
588
|
function readDeployManifest(dir) {
|
|
571
589
|
return __awaiter(this, void 0, void 0, function* () {
|
|
590
|
+
var _a;
|
|
572
591
|
const project = yield loadAgentProject(dir);
|
|
573
592
|
return {
|
|
574
593
|
hosting: project.agent.hosting,
|
|
575
594
|
cursorAccountConnections: project.agent.connections.flatMap((connection) => isCursorAccountTransport(connection.transport)
|
|
576
595
|
? [{ name: connection.name, servers: connection.transport.servers }]
|
|
577
596
|
: []),
|
|
597
|
+
publicChannelIds: project.channels
|
|
598
|
+
.filter((channel) => { var _a; return ((_a = channel.definition.auth) !== null && _a !== void 0 ? _a : []).some(isPublicEndpointPolicy); })
|
|
599
|
+
.map((channel) => channel.id),
|
|
600
|
+
httpChannelPublicEndpoint: ((_a = project.httpChannel.auth) !== null && _a !== void 0 ? _a : []).some(isPublicEndpointPolicy),
|
|
578
601
|
};
|
|
579
602
|
});
|
|
580
603
|
}
|
|
@@ -685,6 +708,14 @@ export function cmdDeploymentStatus(slug, options) {
|
|
|
685
708
|
detail.egressAllowedDomains.length > 0) {
|
|
686
709
|
lines.push(` egress: ${detail.egressAllowedDomains.join(", ")}`);
|
|
687
710
|
}
|
|
711
|
+
if (detail.publicRoutePaths !== undefined &&
|
|
712
|
+
detail.publicRoutePaths.length > 0) {
|
|
713
|
+
// Served through the alias WITHOUT X-Agent-Alias-Token (the channel
|
|
714
|
+
// authenticates deliveries itself).
|
|
715
|
+
for (const path of detail.publicRoutePaths) {
|
|
716
|
+
lines.push(` public: ${aliasUrl}${path} (no alias token)`);
|
|
717
|
+
}
|
|
718
|
+
}
|
|
688
719
|
if (detail.secretNames !== undefined && detail.secretNames.length > 0) {
|
|
689
720
|
lines.push(` secrets: ${detail.secretNames.join(", ")}`);
|
|
690
721
|
}
|
|
@@ -34,6 +34,12 @@ export type DeploySource = {
|
|
|
34
34
|
* deploys — the backend 400s when set on a static deploy.
|
|
35
35
|
*/
|
|
36
36
|
egressAllowedDomains?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* `/v1/channels/…` subtrees the stable alias serves WITHOUT
|
|
39
|
+
* `X-Agent-Alias-Token` (channels authored with `publicEndpoint()`).
|
|
40
|
+
* Only valid on repo-backed deploys.
|
|
41
|
+
*/
|
|
42
|
+
publicRoutePaths?: string[];
|
|
37
43
|
};
|
|
38
44
|
/** Returns a human error message, or undefined when the slug is valid. */
|
|
39
45
|
export declare function validateDeploymentSlug(slug: string): string | undefined;
|
|
@@ -94,6 +100,8 @@ export interface Deployment {
|
|
|
94
100
|
cursorEventRepos?: string[];
|
|
95
101
|
/** Normalized egress allowlist for the engine pod. */
|
|
96
102
|
egressAllowedDomains?: string[];
|
|
103
|
+
/** Channel subtrees the alias serves without `X-Agent-Alias-Token`. */
|
|
104
|
+
publicRoutePaths?: string[];
|
|
97
105
|
/** Service-account id (`sa_…`); null on legacy rows. */
|
|
98
106
|
serviceAccountId?: string | number | null;
|
|
99
107
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-client.d.ts","sourceRoot":"","sources":["../../src/internal/deploy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,CAAC;AAEd,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,gBAAgB,CAKjE,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B;;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129
|
lastReconciledAt: z.string().nullable().optional(),
|
|
130
130
|
cursorEventRepos: z.array(z.string()).optional(),
|
|
131
131
|
egressAllowedDomains: z.array(z.string()).optional(),
|
|
132
|
+
publicRoutePaths: z.array(z.string()).optional(),
|
|
132
133
|
// String ids (`sa_…`) in prod; older mocks/fixtures used numbers. Null on
|
|
133
134
|
// legacy rows that predate service-account-backed deploys.
|
|
134
135
|
serviceAccountId: z.union([z.string(), z.number()]).nullable().optional(),
|
|
@@ -224,7 +225,7 @@ export class AgentServeDeployClient {
|
|
|
224
225
|
}
|
|
225
226
|
// Only the git-ref member exists today; a future artifact member would
|
|
226
227
|
// upload the build first and post a different body from this branch.
|
|
227
|
-
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug }, (args.source.gitRepoUrl === undefined
|
|
228
|
+
const body = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ teamId: args.teamId, slug: args.slug }, (args.source.gitRepoUrl === undefined
|
|
228
229
|
? {}
|
|
229
230
|
: { gitRepoUrl: args.source.gitRepoUrl })), (args.source.gitRef === undefined
|
|
230
231
|
? {}
|
|
@@ -234,7 +235,9 @@ export class AgentServeDeployClient {
|
|
|
234
235
|
? {}
|
|
235
236
|
: { cursorEventRepos: args.source.cursorEventRepos })), (args.source.egressAllowedDomains === undefined
|
|
236
237
|
? {}
|
|
237
|
-
: { egressAllowedDomains: args.source.egressAllowedDomains }))
|
|
238
|
+
: { egressAllowedDomains: args.source.egressAllowedDomains })), {
|
|
239
|
+
// JSON.stringify drops undefined keys.
|
|
240
|
+
publicRoutePaths: args.source.publicRoutePaths });
|
|
238
241
|
const raw = yield this.request({
|
|
239
242
|
method: "POST",
|
|
240
243
|
path: "/internal/agent-serve/deployments",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/internal/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
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AAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,YAAY,CAAC,CAmEvB;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAElE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAOnE;AAmuBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiB3E;AAgyBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAwJnE"}
|
|
@@ -213,6 +213,7 @@ export function loadAgentProject(dir_1) {
|
|
|
213
213
|
const abConfig = yield loadABConfig(ctx, agentDir);
|
|
214
214
|
const storage = yield loadStorage(ctx, agentDir);
|
|
215
215
|
const artifacts = yield loadArtifacts(ctx, agentDir);
|
|
216
|
+
const otel = yield loadOtel(ctx, agentDir);
|
|
216
217
|
yield appendArtifactTool(ctx, agentDir, agent, artifacts);
|
|
217
218
|
if (agentDir !== rootDir) {
|
|
218
219
|
yield warnUnknownSlots(ctx, agentDir);
|
|
@@ -230,6 +231,7 @@ export function loadAgentProject(dir_1) {
|
|
|
230
231
|
abConfig,
|
|
231
232
|
storage,
|
|
232
233
|
artifacts,
|
|
234
|
+
otel,
|
|
233
235
|
diagnostics,
|
|
234
236
|
};
|
|
235
237
|
});
|
|
@@ -273,6 +275,13 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
273
275
|
message: "builtinTools is not supported on subagents; ignoring.",
|
|
274
276
|
});
|
|
275
277
|
}
|
|
278
|
+
if ((config === null || config === void 0 ? void 0 : config.tools) !== undefined) {
|
|
279
|
+
ctx.diagnostics.push({
|
|
280
|
+
severity: "warning",
|
|
281
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
282
|
+
message: "tools is not supported on subagents (they keep the harness task-tool toolset); ignoring.",
|
|
283
|
+
});
|
|
284
|
+
}
|
|
276
285
|
const artifactsPath = yield findModuleFile(agentDir, "artifacts");
|
|
277
286
|
if (artifactsPath !== undefined) {
|
|
278
287
|
ctx.diagnostics.push({
|
|
@@ -297,6 +306,41 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
297
306
|
const localCwd = resolveAgentCwd(ctx, (_a = config === null || config === void 0 ? void 0 : config.local) === null || _a === void 0 ? void 0 : _a.cwd);
|
|
298
307
|
const localWorkspaceDir = resolveAgentCwd(ctx, (_b = config === null || config === void 0 ? void 0 : config.local) === null || _b === void 0 ? void 0 : _b.workspaceDir);
|
|
299
308
|
const localSandbox = ((_c = config === null || config === void 0 ? void 0 : config.local) === null || _c === void 0 ? void 0 : _c.sandbox) === true;
|
|
309
|
+
// Built-in tool allowlist (top-level `tools`). `[]` is meaningful (no
|
|
310
|
+
// native built-in tools), so presence is keyed on the field, not on
|
|
311
|
+
// emptiness. "mcp" is always granted alongside a configured allowlist:
|
|
312
|
+
// it is transport, not capability — this kit's own server tools ride the
|
|
313
|
+
// SDK custom-tool MCP path, so omitting it silently breaks
|
|
314
|
+
// `agent/tools/`, and what MCP actually exposes stays controlled by the
|
|
315
|
+
// second layer (authored tools, mcp-connections, the harness cwd's
|
|
316
|
+
// ambient config).
|
|
317
|
+
const authoredAllowlist = config === null || config === void 0 ? void 0 : config.tools;
|
|
318
|
+
const allowedTools = authoredAllowlist === undefined || authoredAllowlist.includes("mcp")
|
|
319
|
+
? authoredAllowlist
|
|
320
|
+
: [...authoredAllowlist, "mcp"];
|
|
321
|
+
// The allowlist states runtime-agnostic intent, but the SDK cannot
|
|
322
|
+
// enforce tool restrictions on cloud agents yet — a cloud-runtime agent
|
|
323
|
+
// that declares one must fail at serve start, never run unrestricted.
|
|
324
|
+
// (Hybrid per-send cloud sessions fail closed in the session engine.)
|
|
325
|
+
if (allowedTools !== undefined && runtime === "cloud") {
|
|
326
|
+
ctx.diagnostics.push({
|
|
327
|
+
severity: "error",
|
|
328
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
329
|
+
message: 'tools cannot be enforced on runtime: "cloud" yet (the Cursor SDK rejects tool restrictions on cloud agents). Remove `tools` or run the agent on the local runtime.',
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
// `execution: "agent"` tool scripts run through the shell tool. Shell is
|
|
333
|
+
// a real capability, so it is never injected — but an allowlist that
|
|
334
|
+
// strands authored scripts deserves a loud diagnostic, not silence.
|
|
335
|
+
if (allowedTools !== undefined &&
|
|
336
|
+
!allowedTools.includes("shell") &&
|
|
337
|
+
tools.some((tool) => tool.execution === "agent")) {
|
|
338
|
+
ctx.diagnostics.push({
|
|
339
|
+
severity: "warning",
|
|
340
|
+
path: displayPath(ctx, join(agentDir, "agent.ts")),
|
|
341
|
+
message: '`tools` omits "shell" but this agent has execution: "agent" tools, which run as shell scripts; the model will not be able to run them.',
|
|
342
|
+
});
|
|
343
|
+
}
|
|
300
344
|
if (localCwd !== undefined && localWorkspaceDir !== undefined) {
|
|
301
345
|
ctx.diagnostics.push({
|
|
302
346
|
severity: "warning",
|
|
@@ -323,24 +367,19 @@ function loadAgent(ctx, agentDir, options) {
|
|
|
323
367
|
});
|
|
324
368
|
}
|
|
325
369
|
appendBuiltinTools(ctx, agentDir, tools, config === null || config === void 0 ? void 0 : config.builtinTools);
|
|
326
|
-
return {
|
|
327
|
-
name,
|
|
328
|
-
description: config === null || config === void 0 ? void 0 : config.description,
|
|
370
|
+
return Object.assign(Object.assign({ name, description: config === null || config === void 0 ? void 0 : config.description,
|
|
329
371
|
// Root agents always get a concrete model: authored value or DEFAULT_MODEL.
|
|
330
|
-
model: isValidModelSetting(config === null || config === void 0 ? void 0 : config.model) ? config.model : DEFAULT_MODEL,
|
|
331
|
-
instructions,
|
|
372
|
+
model: isValidModelSetting(config === null || config === void 0 ? void 0 : config.model) ? config.model : DEFAULT_MODEL, instructions,
|
|
332
373
|
runtime,
|
|
333
374
|
cloud,
|
|
334
|
-
local,
|
|
335
|
-
hosting,
|
|
375
|
+
local }, (allowedTools === undefined ? {} : { allowedTools })), { hosting,
|
|
336
376
|
concurrency,
|
|
337
377
|
serving,
|
|
338
378
|
tools,
|
|
339
379
|
skills,
|
|
340
380
|
connections,
|
|
341
381
|
subagents,
|
|
342
|
-
seedFiles
|
|
343
|
-
};
|
|
382
|
+
seedFiles });
|
|
344
383
|
});
|
|
345
384
|
}
|
|
346
385
|
/**
|
|
@@ -1411,6 +1450,19 @@ function loadStorage(ctx, agentDir) {
|
|
|
1411
1450
|
});
|
|
1412
1451
|
}
|
|
1413
1452
|
// ============================================================================
|
|
1453
|
+
// OpenTelemetry (agent/otel.ts)
|
|
1454
|
+
// ============================================================================
|
|
1455
|
+
function loadOtel(ctx, agentDir) {
|
|
1456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1457
|
+
const path = yield findModuleFile(agentDir, "otel");
|
|
1458
|
+
if (path === undefined) {
|
|
1459
|
+
return undefined;
|
|
1460
|
+
}
|
|
1461
|
+
const definition = yield importDefault(ctx, path, "otel");
|
|
1462
|
+
return definition;
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
// ============================================================================
|
|
1414
1466
|
// Artifacts (agent/artifacts.ts)
|
|
1415
1467
|
// ============================================================================
|
|
1416
1468
|
function loadArtifacts(ctx, agentDir) {
|
|
@@ -1617,6 +1669,11 @@ export function projectInfo(project) {
|
|
|
1617
1669
|
kinds: Object.keys((_e = project.artifacts.kinds) !== null && _e !== void 0 ? _e : {}),
|
|
1618
1670
|
agentTool: project.artifacts.agentTool === true,
|
|
1619
1671
|
max: resolveArtifactsMax(project.artifacts),
|
|
1672
|
+
}, otel: project.otel === undefined
|
|
1673
|
+
? undefined
|
|
1674
|
+
: {
|
|
1675
|
+
enabled: true,
|
|
1676
|
+
serviceName: project.otel.serviceName,
|
|
1620
1677
|
}, diagnostics: project.diagnostics });
|
|
1621
1678
|
}
|
|
1622
1679
|
// ============================================================================
|
|
@@ -1624,7 +1681,6 @@ export function projectInfo(project) {
|
|
|
1624
1681
|
// ============================================================================
|
|
1625
1682
|
function importDefault(ctx, modulePath, expectedKind) {
|
|
1626
1683
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1627
|
-
var _a;
|
|
1628
1684
|
let mod;
|
|
1629
1685
|
try {
|
|
1630
1686
|
mod = yield ctx.importModule(modulePath);
|
|
@@ -1639,9 +1695,7 @@ function importDefault(ctx, modulePath, expectedKind) {
|
|
|
1639
1695
|
}
|
|
1640
1696
|
const kind = getDefinitionKind(mod.default);
|
|
1641
1697
|
if (kind !== expectedKind) {
|
|
1642
|
-
const helper = expectedKind
|
|
1643
|
-
? "defineAB"
|
|
1644
|
-
: `define${(_a = expectedKind[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()}${expectedKind.slice(1)}`;
|
|
1698
|
+
const helper = DEFINE_HELPER_NAME[expectedKind];
|
|
1645
1699
|
ctx.diagnostics.push({
|
|
1646
1700
|
severity: "error",
|
|
1647
1701
|
path: displayPath(ctx, modulePath),
|
|
@@ -1654,6 +1708,21 @@ function importDefault(ctx, modulePath, expectedKind) {
|
|
|
1654
1708
|
return mod.default;
|
|
1655
1709
|
});
|
|
1656
1710
|
}
|
|
1711
|
+
const DEFINE_HELPER_NAME = {
|
|
1712
|
+
agent: "defineAgent",
|
|
1713
|
+
instructions: "defineInstructions",
|
|
1714
|
+
tool: "defineTool",
|
|
1715
|
+
skill: "defineSkill",
|
|
1716
|
+
connection: "defineConnection",
|
|
1717
|
+
channel: "defineChannel",
|
|
1718
|
+
"http-channel": "httpChannel",
|
|
1719
|
+
schedule: "defineSchedule",
|
|
1720
|
+
hook: "defineHook",
|
|
1721
|
+
ab: "defineAB",
|
|
1722
|
+
storage: "defineStorage",
|
|
1723
|
+
artifacts: "defineArtifacts",
|
|
1724
|
+
otel: "defineOtel",
|
|
1725
|
+
};
|
|
1657
1726
|
function warnUnknownSlots(ctx, agentDir) {
|
|
1658
1727
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1659
1728
|
const known = new Set([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CA0BzC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Author-facing OpenTelemetry surface for {@link HostContext.otel}.
|
|
3
|
+
*
|
|
4
|
+
* Always present on `ctx.host`. Counters and histograms no-op when no meter
|
|
5
|
+
* is running. `setAttributes` still tags the open session when a collector
|
|
6
|
+
* is attached. `forSession` is engine-only so a tool cannot retarget another
|
|
7
|
+
* conversation's tags.
|
|
8
|
+
*/
|
|
9
|
+
import type { Meter } from "@opentelemetry/api";
|
|
10
|
+
import type { HostOtelApi } from "../types.js";
|
|
11
|
+
import type { OtelCollector } from "./otel/collector.js";
|
|
12
|
+
export interface CreateHostOtelApiOptions {
|
|
13
|
+
agentName: string;
|
|
14
|
+
meter?: Meter;
|
|
15
|
+
collector?: OtelCollector;
|
|
16
|
+
/** Session bound for join tags; prefer {@link HostOtelSessionApi.forSession}. */
|
|
17
|
+
sessionId?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Engine-only binding. Not part of the public {@link HostOtelApi}. */
|
|
20
|
+
export interface HostOtelSessionApi extends HostOtelApi {
|
|
21
|
+
forSession(sessionId: string): HostOtelSessionApi;
|
|
22
|
+
}
|
|
23
|
+
/** Build the host OpenTelemetry API for one agent process. */
|
|
24
|
+
export declare function createHostOtelApi(options: CreateHostOtelApiOptions): HostOtelSessionApi;
|
|
25
|
+
//# sourceMappingURL=host-otel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-otel.d.ts","sourceRoot":"","sources":["../../src/internal/host-otel.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAsB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AAGnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAqBzD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACnD;AAsBD,8DAA8D;AAC9D,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,kBAAkB,CAYpB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Author-facing OpenTelemetry surface for {@link HostContext.otel}.
|
|
3
|
+
*
|
|
4
|
+
* Always present on `ctx.host`. Counters and histograms no-op when no meter
|
|
5
|
+
* is running. `setAttributes` still tags the open session when a collector
|
|
6
|
+
* is attached. `forSession` is engine-only so a tool cannot retarget another
|
|
7
|
+
* conversation's tags.
|
|
8
|
+
*/
|
|
9
|
+
import { attrs } from "./otel/attrs.js";
|
|
10
|
+
const METRIC_NAME = /^[A-Za-z][A-Za-z0-9_./-]*$/;
|
|
11
|
+
const RESERVED_METRICS = new Set([
|
|
12
|
+
"cursor.token.usage",
|
|
13
|
+
"cursor.tool.calls",
|
|
14
|
+
"cursor.cost.usage",
|
|
15
|
+
"agent_sdk.session.count",
|
|
16
|
+
"agent_sdk.turn.count",
|
|
17
|
+
"agent_sdk.subagent.count",
|
|
18
|
+
"agent_sdk.http.duration",
|
|
19
|
+
]);
|
|
20
|
+
const RESERVED_ATTRIBUTES = new Set([
|
|
21
|
+
"cursor.conversation.id",
|
|
22
|
+
"agent_sdk.agent",
|
|
23
|
+
"agent_sdk.turn_id",
|
|
24
|
+
"agent_sdk.framework",
|
|
25
|
+
]);
|
|
26
|
+
/** Build the host OpenTelemetry API for one agent process. */
|
|
27
|
+
export function createHostOtelApi(options) {
|
|
28
|
+
return createBoundHostOtelApi({
|
|
29
|
+
shared: {
|
|
30
|
+
agentName: options.agentName,
|
|
31
|
+
meter: options.meter,
|
|
32
|
+
collector: options.collector,
|
|
33
|
+
instruments: new Map(),
|
|
34
|
+
sessionTags: new Map(),
|
|
35
|
+
},
|
|
36
|
+
sessionId: options.sessionId,
|
|
37
|
+
localTags: {},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function createBoundHostOtelApi(state) {
|
|
41
|
+
const api = {
|
|
42
|
+
get enabled() {
|
|
43
|
+
return state.shared.meter !== undefined;
|
|
44
|
+
},
|
|
45
|
+
setAttributes(attributes) {
|
|
46
|
+
var _a;
|
|
47
|
+
const cleaned = validateAttributes(attributes);
|
|
48
|
+
if (state.sessionId === undefined) {
|
|
49
|
+
Object.assign(state.localTags, cleaned);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
mergeSessionTags(state, state.sessionId, cleaned);
|
|
53
|
+
(_a = state.shared.collector) === null || _a === void 0 ? void 0 : _a.setSessionAttributes(state.sessionId, cleaned);
|
|
54
|
+
},
|
|
55
|
+
increment(name, valueOrAttributes, maybeAttributes) {
|
|
56
|
+
var _a;
|
|
57
|
+
const value = typeof valueOrAttributes === "number" ? valueOrAttributes : 1;
|
|
58
|
+
const attributes = typeof valueOrAttributes === "number"
|
|
59
|
+
? maybeAttributes
|
|
60
|
+
: valueOrAttributes;
|
|
61
|
+
(_a = counter(state.shared, name)) === null || _a === void 0 ? void 0 : _a.add(value, emitAttributes(state, attributes));
|
|
62
|
+
},
|
|
63
|
+
record(name, value, attributes) {
|
|
64
|
+
var _a;
|
|
65
|
+
(_a = histogram(state.shared, name)) === null || _a === void 0 ? void 0 : _a.record(value, emitAttributes(state, attributes));
|
|
66
|
+
},
|
|
67
|
+
forSession(sessionId) {
|
|
68
|
+
const trimmed = sessionId.trim();
|
|
69
|
+
if (trimmed === "") {
|
|
70
|
+
throw new Error("host.otel.forSession requires a non-empty session id");
|
|
71
|
+
}
|
|
72
|
+
return createBoundHostOtelApi({
|
|
73
|
+
shared: state.shared,
|
|
74
|
+
sessionId: trimmed,
|
|
75
|
+
localTags: {},
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
return api;
|
|
80
|
+
}
|
|
81
|
+
function mergeSessionTags(state, sessionId, incoming) {
|
|
82
|
+
var _a;
|
|
83
|
+
const bag = (_a = state.shared.sessionTags.get(sessionId)) !== null && _a !== void 0 ? _a : {};
|
|
84
|
+
Object.assign(bag, incoming);
|
|
85
|
+
state.shared.sessionTags.set(sessionId, bag);
|
|
86
|
+
}
|
|
87
|
+
function emitAttributes(state, callSite) {
|
|
88
|
+
return attrs(Object.assign(Object.assign(Object.assign(Object.assign({}, sessionBag(state)), validateAttributes(callSite)), { "agent_sdk.agent": state.shared.agentName }), (state.sessionId === undefined
|
|
89
|
+
? {}
|
|
90
|
+
: { "cursor.conversation.id": state.sessionId })));
|
|
91
|
+
}
|
|
92
|
+
function sessionBag(state) {
|
|
93
|
+
var _a;
|
|
94
|
+
var _b;
|
|
95
|
+
if (state.sessionId === undefined) {
|
|
96
|
+
return state.localTags;
|
|
97
|
+
}
|
|
98
|
+
const fromCollector = (_a = state.shared.collector) === null || _a === void 0 ? void 0 : _a.getSessionAttributes(state.sessionId);
|
|
99
|
+
const fromShared = (_b = state.shared.sessionTags.get(state.sessionId)) !== null && _b !== void 0 ? _b : {};
|
|
100
|
+
return Object.assign(Object.assign(Object.assign({}, fromShared), (fromCollector !== null && fromCollector !== void 0 ? fromCollector : {})), state.localTags);
|
|
101
|
+
}
|
|
102
|
+
function counter(shared, name) {
|
|
103
|
+
validateMetricName(name);
|
|
104
|
+
if (shared.meter === undefined) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
const existing = shared.instruments.get(name);
|
|
108
|
+
if (existing !== undefined) {
|
|
109
|
+
if (existing.kind !== "counter") {
|
|
110
|
+
throw new Error(`host.otel metric "${name}" is already a histogram`);
|
|
111
|
+
}
|
|
112
|
+
return existing.instrument;
|
|
113
|
+
}
|
|
114
|
+
const instrument = shared.meter.createCounter(name);
|
|
115
|
+
shared.instruments.set(name, { kind: "counter", instrument });
|
|
116
|
+
return instrument;
|
|
117
|
+
}
|
|
118
|
+
function histogram(shared, name) {
|
|
119
|
+
validateMetricName(name);
|
|
120
|
+
if (shared.meter === undefined) {
|
|
121
|
+
return undefined;
|
|
122
|
+
}
|
|
123
|
+
const existing = shared.instruments.get(name);
|
|
124
|
+
if (existing !== undefined) {
|
|
125
|
+
if (existing.kind !== "histogram") {
|
|
126
|
+
throw new Error(`host.otel metric "${name}" is already a counter`);
|
|
127
|
+
}
|
|
128
|
+
return existing.instrument;
|
|
129
|
+
}
|
|
130
|
+
const instrument = shared.meter.createHistogram(name);
|
|
131
|
+
shared.instruments.set(name, { kind: "histogram", instrument });
|
|
132
|
+
return instrument;
|
|
133
|
+
}
|
|
134
|
+
function validateMetricName(name) {
|
|
135
|
+
if (!METRIC_NAME.test(name)) {
|
|
136
|
+
throw new Error(`host.otel metric name "${name}" must match [A-Za-z][A-Za-z0-9_./-]*`);
|
|
137
|
+
}
|
|
138
|
+
if (RESERVED_METRICS.has(name)) {
|
|
139
|
+
throw new Error(`host.otel metric name "${name}" is reserved`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function validateAttributes(attributes) {
|
|
143
|
+
if (attributes === undefined) {
|
|
144
|
+
return {};
|
|
145
|
+
}
|
|
146
|
+
const out = {};
|
|
147
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
148
|
+
if (value === undefined) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (RESERVED_ATTRIBUTES.has(key)) {
|
|
152
|
+
throw new Error(`host.otel attribute "${key}" is reserved; the runtime always sets it`);
|
|
153
|
+
}
|
|
154
|
+
if (typeof value !== "string" &&
|
|
155
|
+
typeof value !== "number" &&
|
|
156
|
+
typeof value !== "boolean") {
|
|
157
|
+
throw new Error(`host.otel attribute "${key}" must be a string, number, or boolean`);
|
|
158
|
+
}
|
|
159
|
+
out[key] = value;
|
|
160
|
+
}
|
|
161
|
+
return out;
|
|
162
|
+
}
|
|
@@ -8,6 +8,7 @@ export interface InitProjectOptions {
|
|
|
8
8
|
name?: string;
|
|
9
9
|
/** Model id override written into agent.ts. */
|
|
10
10
|
model?: string;
|
|
11
|
+
templateDir?: string;
|
|
11
12
|
}
|
|
12
13
|
export type InitFileAction = "create" | "exist";
|
|
13
14
|
export interface InitFileEntry {
|
|
@@ -23,6 +24,29 @@ export interface InitProjectResult {
|
|
|
23
24
|
/** Paths left alone because they already existed. */
|
|
24
25
|
skipped: string[];
|
|
25
26
|
}
|
|
27
|
+
export declare function availableTemplates(): string[];
|
|
28
|
+
export type TemplateResolution = {
|
|
29
|
+
ok: true;
|
|
30
|
+
name: string;
|
|
31
|
+
dir: string;
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
export declare function resolveTemplate(name: string): TemplateResolution;
|
|
37
|
+
export type InitTargetCheck = {
|
|
38
|
+
ok: true;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Re-init must keep the mode the project was scaffolded with: template
|
|
45
|
+
* scaffolds stamp `cursorAgentTemplate` into package.json, and a mismatch
|
|
46
|
+
* here would silently mix default-scaffold files into a template project
|
|
47
|
+
* (or the reverse).
|
|
48
|
+
*/
|
|
49
|
+
export declare function checkInitTarget(rootDir: string, template: string | undefined): InitTargetCheck;
|
|
26
50
|
export declare function initProject(options: InitProjectOptions): Promise<InitProjectResult>;
|
|
27
51
|
export declare function isEexist(error: unknown): boolean;
|
|
28
52
|
export interface InstallScaffoldDependenciesOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAa7C;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC,wBAAgB,eAAe,CAAC,I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