@cursor/july 0.1.46 → 0.1.48
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 +30 -35
- package/dist/docs/404.html +1 -1
- package/dist/docs/ab.html +2 -2
- package/dist/docs/assets/{app.C2NFTb-h.js → app.BC1P20xI.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DV5SAHnQ.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.o1_FJGip.js → VPLocalSearchBox.C_900xn2.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BcGduE7g.js → theme.CT135Jhh.js} +2 -2
- package/dist/docs/building-with-agents.html +2 -2
- package/dist/docs/concepts.html +2 -2
- package/dist/docs/deployment.html +2 -2
- package/dist/docs/evals.html +2 -2
- package/dist/docs/example-agents/approval-buddy.html +2 -2
- package/dist/docs/example-agents/benny.html +2 -2
- package/dist/docs/example-agents/bugbot.html +2 -2
- package/dist/docs/example-agents/codebase-wiki.html +2 -2
- package/dist/docs/example-agents/codeowners-review.html +2 -2
- package/dist/docs/example-agents/concierge.html +2 -2
- package/dist/docs/example-agents/fsd.html +2 -2
- package/dist/docs/example-agents/index.html +2 -2
- package/dist/docs/example-agents/knowledge-base.html +2 -2
- package/dist/docs/example-agents/oncall.html +2 -2
- package/dist/docs/example-agents/security-reviewer.html +2 -2
- package/dist/docs/example-agents/slack-agent.html +2 -2
- package/dist/docs/example-agents/weather-agent.html +2 -2
- package/dist/docs/guides/agent-to-agent.html +2 -2
- package/dist/docs/guides/cloud-runtime.html +2 -2
- package/dist/docs/guides/github.html +2 -2
- package/dist/docs/guides/human-in-the-loop.html +2 -2
- package/dist/docs/guides/mcp-oauth.html +2 -2
- package/dist/docs/guides/opentelemetry.html +2 -2
- package/dist/docs/guides/slack.html +2 -2
- package/dist/docs/guides/webhooks.html +2 -2
- package/dist/docs/hillclimbing.html +2 -2
- package/dist/docs/index.html +2 -2
- package/dist/docs/quickstart.html +2 -2
- package/dist/docs/reference/agent-config.html +2 -2
- package/dist/docs/reference/artifacts.html +2 -2
- package/dist/docs/reference/channels.html +2 -2
- package/dist/docs/reference/cli.html +2 -2
- package/dist/docs/reference/connections.html +2 -2
- package/dist/docs/reference/hooks.html +2 -2
- package/dist/docs/reference/http-api.html +2 -2
- package/dist/docs/reference/instructions.html +2 -2
- package/dist/docs/reference/playground.html +2 -2
- package/dist/docs/reference/project-layout.html +2 -2
- package/dist/docs/reference/prompt.html +2 -2
- package/dist/docs/reference/schedules.html +2 -2
- package/dist/docs/reference/sessions.html +2 -2
- package/dist/docs/reference/skills.html +2 -2
- package/dist/docs/reference/subagents.html +2 -2
- package/dist/docs/reference/tools.html +2 -2
- package/dist/docs/scaffolding-agents.html +2 -2
- package/dist/docs/storage.html +2 -2
- package/dist/docs/templates/triage.html +2 -2
- package/dist/docs/troubleshooting.html +2 -2
- package/dist/internal/authored-loaders.d.ts +19 -0
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +39 -0
- package/dist/internal/cli-deploy.d.ts +2 -1
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +97 -1
- package/dist/internal/deploy-client.d.ts +7 -2
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +12 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +2 -8
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +3 -8
- package/dist/internal/logs-client.d.ts +1 -1
- package/dist/internal/logs-client.d.ts.map +1 -1
- package/dist/internal/logs-client.js +3 -0
- package/dist/internal/sdk-runner.d.ts +21 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +34 -1
- package/dist/internal/serve-restart.d.ts +42 -0
- package/dist/internal/serve-restart.d.ts.map +1 -0
- package/dist/internal/serve-restart.js +85 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +7 -2
- package/dist/playground/assets/index-CiCmH6R-.css +1 -0
- package/dist/playground/assets/{index-6wW6SAc4.js → index-DEVTyeOu.js} +46 -46
- package/dist/playground/index.html +2 -2
- package/package.json +1 -1
- package/src/bin/agent-serve.ts +39 -38
- package/src/internal/authored-loaders.ts +45 -0
- package/src/internal/cli-deploy.ts +103 -1
- package/src/internal/deploy-client.ts +19 -1
- package/src/internal/discovery.ts +5 -12
- package/src/internal/eval-runner.ts +3 -12
- package/src/internal/logs-client.ts +4 -0
- package/src/internal/sdk-runner.ts +46 -1
- package/src/internal/serve-restart.ts +120 -0
- package/src/internal/server.ts +11 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.B-FxvuoI.js +0 -1
- package/dist/playground/assets/index-CSRYDAFw.css +0 -1
package/dist/bin/agent-serve.js
CHANGED
|
@@ -24,15 +24,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
|
+
import { spawn } from "node:child_process";
|
|
27
28
|
import { readFile } from "node:fs/promises";
|
|
28
29
|
import { resolve } from "node:path";
|
|
29
30
|
import { parseArgs } from "node:util";
|
|
30
31
|
import { formatDiagnostics, projectInfo, resolveAgentMounts, serve, } from "../index.js";
|
|
31
32
|
import { registerAuthoredModuleLoaders } from "../internal/authored-loaders.js";
|
|
32
33
|
import { cmdCall, cmdChat, cmdCost, cmdEval, cmdEvalCancel, cmdEvalStatus, cmdInit, cmdLogs, cmdPlayground, cmdResume, cmdRun, cmdSession, cmdSessions, cmdTrajectory, } from "../internal/cli-ax.js";
|
|
33
|
-
import { cmdDeploy, cmdDeploymentStatus, cmdDeployments, cmdRotatePodCredential, cmdRotateToken, cmdSecretsList, cmdSecretsSet, cmdSecretsUnset, cmdStop, } from "../internal/cli-deploy.js";
|
|
34
|
+
import { cmdDelete, cmdDeploy, cmdDeploymentStatus, cmdDeployments, cmdRotatePodCredential, cmdRotateToken, cmdSecretsList, cmdSecretsSet, cmdSecretsUnset, cmdStop, } from "../internal/cli-deploy.js";
|
|
34
35
|
import { CLI_COMMAND_NAME as CLI, PACKAGE_NAME, packageVersion, } from "../internal/distribution.js";
|
|
35
36
|
import { loadAgentLocalEnv } from "../internal/local-env.js";
|
|
37
|
+
import { ENTER_RESTART_EXIT_CODE, isServeRestartWorker, runEnterRestartSupervisor, } from "../internal/serve-restart.js";
|
|
36
38
|
import { clearTerminal, stdoutPalette } from "../internal/terminal-style.js";
|
|
37
39
|
import { cmdUpdate, warnIfOutdated } from "../internal/update-check.js";
|
|
38
40
|
const HELP = `${CLI} — serve a filesystem-defined Cursor agent over channels
|
|
@@ -104,6 +106,7 @@ Usage:
|
|
|
104
106
|
${CLI} deployments [--team <id>] [--json]
|
|
105
107
|
${CLI} deployment <slug> [--team <id>] [--json]
|
|
106
108
|
${CLI} stop <slug> [--team <id>] [--json] [--no-wait]
|
|
109
|
+
${CLI} delete <slug> [--team <id>] [--json] [--no-wait]
|
|
107
110
|
${CLI} rotate-token <slug> [--team <id>]
|
|
108
111
|
${CLI} rotate-pod-credential <slug> [--team <id>]
|
|
109
112
|
${CLI} secrets set <slug> NAME... | list <slug> | unset <slug> NAME
|
|
@@ -113,7 +116,8 @@ Usage:
|
|
|
113
116
|
|
|
114
117
|
Commands:
|
|
115
118
|
serve Serve agents under /<slug>/... (index at /). On a TTY, press
|
|
116
|
-
Enter to restart (
|
|
119
|
+
Enter to restart (re-executes this process so agent code, evals,
|
|
120
|
+
and Vite reload).
|
|
117
121
|
dev Local development: same as \`${CLI} serve --dev\` (manual
|
|
118
122
|
schedule/reminder dispatch, unsigned GitHub loopback, Vite HMR).
|
|
119
123
|
chat Interactive REPL against a running server (follow-ups keep the
|
|
@@ -222,6 +226,8 @@ Commands:
|
|
|
222
226
|
deployments List the team's deployments (slug, status, generation, kind).
|
|
223
227
|
deployment Show one deployment in full (status, lastError, engine info).
|
|
224
228
|
stop Stop a deployment and wait until it reports stopped.
|
|
229
|
+
delete Delete a deployment (teardown + purge the record) and wait
|
|
230
|
+
until GET 404s. The slug is then free to redeploy.
|
|
225
231
|
rotate-token Mint a new alias token for a deployment (shown once); the old
|
|
226
232
|
token stops working immediately.
|
|
227
233
|
rotate-pod-credential
|
|
@@ -520,7 +526,10 @@ function main(argv) {
|
|
|
520
526
|
// Best-effort, cached, and silent on failure. `update` does its own fresh
|
|
521
527
|
// lookup, --json runs stay quiet for machine consumers, and `mcp` skips it
|
|
522
528
|
// so MCP client spawns stay fast (stdout there is the protocol wire).
|
|
523
|
-
if (command !== "update" &&
|
|
529
|
+
if (command !== "update" &&
|
|
530
|
+
command !== "mcp" &&
|
|
531
|
+
values.json !== true &&
|
|
532
|
+
!isServeRestartWorker()) {
|
|
524
533
|
yield warnIfOutdated();
|
|
525
534
|
}
|
|
526
535
|
switch (command) {
|
|
@@ -663,6 +672,9 @@ function main(argv) {
|
|
|
663
672
|
case "stop": {
|
|
664
673
|
return cmdStop(positionals[0], deployOptionsFromValues(values));
|
|
665
674
|
}
|
|
675
|
+
case "delete": {
|
|
676
|
+
return cmdDelete(positionals[0], deployOptionsFromValues(values));
|
|
677
|
+
}
|
|
666
678
|
case "rotate-token": {
|
|
667
679
|
return cmdRotateToken(positionals[0], deployOptionsFromValues(values));
|
|
668
680
|
}
|
|
@@ -1032,6 +1044,14 @@ function main(argv) {
|
|
|
1032
1044
|
},
|
|
1033
1045
|
};
|
|
1034
1046
|
const enterToRestart = process.stdin.isTTY === true;
|
|
1047
|
+
if (enterToRestart && !isServeRestartWorker()) {
|
|
1048
|
+
return runEnterRestartSupervisor({
|
|
1049
|
+
spawn: (command, args, spawnOptions) => spawn(command, args, spawnOptions),
|
|
1050
|
+
onRestart: () => {
|
|
1051
|
+
clearTerminal();
|
|
1052
|
+
},
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1035
1055
|
const bannerOpts = {
|
|
1036
1056
|
noPlayground: values["no-playground"] === true,
|
|
1037
1057
|
dev,
|
|
@@ -1047,9 +1067,9 @@ function main(argv) {
|
|
|
1047
1067
|
}
|
|
1048
1068
|
return next;
|
|
1049
1069
|
});
|
|
1050
|
-
|
|
1070
|
+
const handle = yield start();
|
|
1051
1071
|
let closing = false;
|
|
1052
|
-
let
|
|
1072
|
+
let restartRequested = false;
|
|
1053
1073
|
yield new Promise((resolve) => {
|
|
1054
1074
|
const shutdown = () => {
|
|
1055
1075
|
if (closing) {
|
|
@@ -1067,37 +1087,17 @@ function main(argv) {
|
|
|
1067
1087
|
process.stdin.resume();
|
|
1068
1088
|
process.stdin.on("data", (chunk) => {
|
|
1069
1089
|
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
1070
|
-
if (!isEnterOnly(text) || closing
|
|
1090
|
+
if (!isEnterOnly(text) || closing) {
|
|
1071
1091
|
return;
|
|
1072
1092
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
// Hold the "restarting…" frame briefly so a fast close doesn't look
|
|
1076
|
-
// like Enter did nothing.
|
|
1093
|
+
closing = true;
|
|
1094
|
+
restartRequested = true;
|
|
1077
1095
|
clearTerminal();
|
|
1078
1096
|
process.stdout.write(style.dim("restarting…\n"));
|
|
1079
|
-
void
|
|
1080
|
-
.then(() => {
|
|
1081
|
-
clearTerminal();
|
|
1082
|
-
return start();
|
|
1083
|
-
})
|
|
1084
|
-
.then((next) => {
|
|
1085
|
-
handle = next;
|
|
1086
|
-
})
|
|
1087
|
-
.catch((error) => {
|
|
1088
|
-
var _a;
|
|
1089
|
-
process.stderr.write(`[agent-sdk] restart failed: ${error instanceof Error
|
|
1090
|
-
? ((_a = error.stack) !== null && _a !== void 0 ? _a : error.message)
|
|
1091
|
-
: String(error)}\n`);
|
|
1092
|
-
closing = true;
|
|
1093
|
-
resolve();
|
|
1094
|
-
})
|
|
1095
|
-
.finally(() => {
|
|
1096
|
-
restarting = false;
|
|
1097
|
-
});
|
|
1097
|
+
void handle.close().finally(resolve);
|
|
1098
1098
|
});
|
|
1099
1099
|
});
|
|
1100
|
-
return 0;
|
|
1100
|
+
return restartRequested ? ENTER_RESTART_EXIT_CODE : 0;
|
|
1101
1101
|
}
|
|
1102
1102
|
default: {
|
|
1103
1103
|
process.stderr.write(`Unknown command "${command}"\n\n${HELP}`);
|
|
@@ -1215,11 +1215,6 @@ function section(title, items) {
|
|
|
1215
1215
|
function isEnterOnly(text) {
|
|
1216
1216
|
return text.length > 0 && [...text].every((ch) => ch === "\n" || ch === "\r");
|
|
1217
1217
|
}
|
|
1218
|
-
function sleep(ms) {
|
|
1219
|
-
return new Promise((resolve) => {
|
|
1220
|
-
setTimeout(resolve, ms);
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
1218
|
/**
|
|
1224
1219
|
* `dev [path]` takes a positional project root; `serve` keeps `--dir` only.
|
|
1225
1220
|
* Reject mixing a positional with an explicit `--dir`, and extra args on `dev`.
|
package/dist/docs/404.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.CK3hwt6q.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/docs/assets/app.
|
|
12
|
+
<script type="module" src="/docs/assets/app.BC1P20xI.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
14
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
15
15
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
package/dist/docs/ab.html
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/docs/assets/style.CK3hwt6q.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/docs/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/docs/assets/app.
|
|
12
|
+
<script type="module" src="/docs/assets/app.BC1P20xI.js"></script>
|
|
13
13
|
<link rel="preload" href="/docs/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
-
<link rel="modulepreload" href="/docs/assets/chunks/theme.
|
|
14
|
+
<link rel="modulepreload" href="/docs/assets/chunks/theme.CT135Jhh.js">
|
|
15
15
|
<link rel="modulepreload" href="/docs/assets/chunks/framework.CAZyNGu9.js">
|
|
16
16
|
<link rel="modulepreload" href="/docs/assets/ab.md.hdxsvX5M.lean.js">
|
|
17
17
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p}from"./chunks/theme.
|
|
1
|
+
import{t as p}from"./chunks/theme.CT135Jhh.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.CAZyNGu9.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|