@cursor/july 0.1.14 → 0.1.15
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/channels/slack/post-update-delivery.d.ts +85 -0
- package/dist/channels/slack/post-update-delivery.d.ts.map +1 -0
- package/dist/docs/404.html +1 -1
- package/dist/docs/ab.html +2 -2
- package/dist/docs/assets/{app.CKFFLL4Z.js → app.DpdGZTLe.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.D2d8CfFS.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BXk19JBN.js → VPLocalSearchBox.IB-0QqIT.js} +1 -1
- package/dist/docs/assets/chunks/{theme.BXSPBMyn.js → theme.-fYBoNtR.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/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/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/troubleshooting.html +2 -2
- package/dist/evals.d.ts +8 -0
- package/dist/evals.d.ts.map +1 -1
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +5 -2
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +7 -0
- package/dist/internal/eval-runner.d.ts +2 -0
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +14 -0
- package/dist/internal/evals-client.d.ts.map +1 -1
- package/dist/internal/evals-client.js +1 -1
- package/dist/internal/persistence-coordinator.d.ts +127 -0
- package/dist/internal/persistence-coordinator.d.ts.map +1 -0
- package/dist/persistence.d.ts +184 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/playground/assets/{index-DeyYpOit.js → index-BVMOoiek.js} +46 -46
- package/dist/playground/assets/index-DYmP4b--.css +1 -0
- package/dist/playground/index.html +2 -2
- package/package.json +1 -1
- package/skills/evals/SKILL.md +10 -0
- package/src/evals.ts +8 -0
- package/src/internal/cli-ax.ts +3 -0
- package/src/internal/eval-run-store.ts +8 -0
- package/src/internal/eval-runner.ts +16 -0
- package/src/internal/evals-client.ts +1 -0
- package/dist/channels/github/instrument.d.ts +0 -20
- package/dist/channels/github/instrument.d.ts.map +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DGWkvXJc.js +0 -1
- package/dist/internal/json-dir-store.js +0 -100
- package/dist/playground/assets/index-CuXb4j4V.css +0 -1
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
10
10
|
<title>agent-serve playground</title>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-BVMOoiek.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DYmP4b--.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cursor/july",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
package/skills/evals/SKILL.md
CHANGED
|
@@ -168,9 +168,19 @@ export default defineEvalConfig({
|
|
|
168
168
|
Options: `workspaceDir`, `workspaceFiles` (`{ path: contents }` seeded
|
|
169
169
|
before the first turn). Multiple `t.send` calls share the session.
|
|
170
170
|
- `t.reply` / `t.events` / `t.sessionId` for assertions and correlation.
|
|
171
|
+
- `t.metric(name, value)` — structured scores on the case snapshot (playground
|
|
172
|
+
badges + CLI). Prefer this over encoding scores only in `t.log`.
|
|
171
173
|
- Builders: `includes(string | RegExp)`, `equals(value)`,
|
|
172
174
|
`satisfies(predicate, label)`.
|
|
173
175
|
|
|
176
|
+
### Playground customization (optional)
|
|
177
|
+
|
|
178
|
+
Drop `agent/playground/evals.tsx` exporting `agentName` (must match
|
|
179
|
+
`defineAgent({ name })`) and
|
|
180
|
+
`default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
|
|
181
|
+
loads these via Vite glob (`examples/*` and `factory/*`). Without a
|
|
182
|
+
module, cases still show default `t.metric` badges.
|
|
183
|
+
|
|
174
184
|
## What good cases assert
|
|
175
185
|
|
|
176
186
|
Gate **decisions and shape, not prose**. Model wording varies run to run;
|
package/src/evals.ts
CHANGED
|
@@ -129,6 +129,12 @@ export interface EvalTestContext {
|
|
|
129
129
|
check(value: unknown, assertion: Expectation): void;
|
|
130
130
|
/** Debug line (surfaced under `agent-serve eval --verbose`). */
|
|
131
131
|
log(message: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Structured score for the playground (and CLI). Values appear on the
|
|
134
|
+
* case card; agents can further customize rendering via
|
|
135
|
+
* `agent/playground/evals.tsx`.
|
|
136
|
+
*/
|
|
137
|
+
metric(name: string, value: string | number): void;
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
/** Hard ceiling for {@link EvalConfig.iterations} / case `iterations`. */
|
|
@@ -364,6 +370,8 @@ export interface EvalCaseSnapshot {
|
|
|
364
370
|
durationMs?: number;
|
|
365
371
|
error?: string;
|
|
366
372
|
logs?: string[];
|
|
373
|
+
/** Structured scores from {@link EvalTestContext.metric}. */
|
|
374
|
+
metrics?: Record<string, string | number>;
|
|
367
375
|
inputs?: string[];
|
|
368
376
|
finalText?: string;
|
|
369
377
|
tools?: string[];
|
package/src/internal/cli-ax.ts
CHANGED
|
@@ -1412,6 +1412,9 @@ function printEvalResults(
|
|
|
1412
1412
|
}\n`
|
|
1413
1413
|
);
|
|
1414
1414
|
}
|
|
1415
|
+
for (const [name, value] of Object.entries(r.metrics ?? {})) {
|
|
1416
|
+
process.stdout.write(` metric ${name}=${String(value)}\n`);
|
|
1417
|
+
}
|
|
1415
1418
|
for (const line of r.logs ?? []) {
|
|
1416
1419
|
process.stdout.write(` ${line}\n`);
|
|
1417
1420
|
}
|
|
@@ -383,6 +383,10 @@ export class EvalRunStore {
|
|
|
383
383
|
c.inputs = [];
|
|
384
384
|
c.toolCalls = [];
|
|
385
385
|
c.finalText = undefined;
|
|
386
|
+
c.metrics = undefined;
|
|
387
|
+
c.logs = undefined;
|
|
388
|
+
c.assertions = undefined;
|
|
389
|
+
c.error = undefined;
|
|
386
390
|
}
|
|
387
391
|
},
|
|
388
392
|
onCaseEvent: (id, event) => {
|
|
@@ -473,6 +477,10 @@ export class EvalRunStore {
|
|
|
473
477
|
c.assertions = result.assertions;
|
|
474
478
|
c.durationMs = result.durationMs;
|
|
475
479
|
c.logs = result.logs;
|
|
480
|
+
c.metrics =
|
|
481
|
+
Object.keys(result.metrics).length > 0
|
|
482
|
+
? { ...result.metrics }
|
|
483
|
+
: undefined;
|
|
476
484
|
c.inputs = result.inputs;
|
|
477
485
|
if (result.toolCalls !== undefined) {
|
|
478
486
|
c.toolCalls = result.toolCalls;
|
|
@@ -63,6 +63,8 @@ export interface EvalRunResult {
|
|
|
63
63
|
}>;
|
|
64
64
|
error?: string;
|
|
65
65
|
logs: string[];
|
|
66
|
+
/** Structured scores from {@link import("../evals.js").EvalTestContext.metric}. */
|
|
67
|
+
metrics: Record<string, string | number>;
|
|
66
68
|
durationMs: number;
|
|
67
69
|
}
|
|
68
70
|
|
|
@@ -342,6 +344,7 @@ async function runOneEval(
|
|
|
342
344
|
}
|
|
343
345
|
): Promise<EvalRunResult> {
|
|
344
346
|
const logs: string[] = [];
|
|
347
|
+
const metrics: Record<string, string | number> = {};
|
|
345
348
|
const assertions: EvalAssertionResult[] = [];
|
|
346
349
|
const def = discovered.definition;
|
|
347
350
|
const timeoutMs = def.timeoutMs ?? opts.defaultTimeoutMs;
|
|
@@ -364,6 +367,7 @@ async function runOneEval(
|
|
|
364
367
|
assertions,
|
|
365
368
|
error: "cancelled",
|
|
366
369
|
logs,
|
|
370
|
+
metrics,
|
|
367
371
|
inputs,
|
|
368
372
|
toolCalls: [],
|
|
369
373
|
tools: [],
|
|
@@ -491,6 +495,16 @@ async function runOneEval(
|
|
|
491
495
|
process.stderr.write(` ${message}\n`);
|
|
492
496
|
}
|
|
493
497
|
},
|
|
498
|
+
metric(name: string, value: string | number) {
|
|
499
|
+
const key = name.trim();
|
|
500
|
+
if (key === "") {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
metrics[key] = value;
|
|
504
|
+
if (opts.verbose) {
|
|
505
|
+
process.stderr.write(` metric ${key}=${String(value)}\n`);
|
|
506
|
+
}
|
|
507
|
+
},
|
|
494
508
|
};
|
|
495
509
|
|
|
496
510
|
try {
|
|
@@ -510,6 +524,7 @@ async function runOneEval(
|
|
|
510
524
|
assertions,
|
|
511
525
|
error: message,
|
|
512
526
|
logs,
|
|
527
|
+
metrics,
|
|
513
528
|
inputs,
|
|
514
529
|
toolCalls: toolCallIo(),
|
|
515
530
|
...(sessionId === undefined ? {} : { sessionId }),
|
|
@@ -532,6 +547,7 @@ async function runOneEval(
|
|
|
532
547
|
ok,
|
|
533
548
|
assertions,
|
|
534
549
|
logs,
|
|
550
|
+
metrics,
|
|
535
551
|
inputs,
|
|
536
552
|
toolCalls: toolCallIo(),
|
|
537
553
|
...(sessionId === undefined ? {} : { sessionId }),
|
|
@@ -489,6 +489,7 @@ export function snapshotToEvalRunResults(
|
|
|
489
489
|
...(c.toolCalls === undefined ? {} : { toolCalls: c.toolCalls }),
|
|
490
490
|
...(c.error === undefined ? {} : { error: c.error }),
|
|
491
491
|
logs: c.logs ?? [],
|
|
492
|
+
metrics: c.metrics ?? {},
|
|
492
493
|
durationMs: c.durationMs ?? 0,
|
|
493
494
|
}));
|
|
494
495
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-request observability for GitHub channel Octokit clients.
|
|
3
|
-
*
|
|
4
|
-
* Every Octokit built by `createGitHubOctokit` / `callGitHubApi` gets one
|
|
5
|
-
* structured `[agentkit/github]` line per GitHub API request (REST and
|
|
6
|
-
* GraphQL), including rate-limit headers so installation-quota pressure can
|
|
7
|
-
* be attributed to agentkit deployments from hosted-runtime logs.
|
|
8
|
-
*/
|
|
9
|
-
import type { Octokit } from "@octokit/rest";
|
|
10
|
-
export type GitHubRequestLogWrite = (line: string) => void;
|
|
11
|
-
/** Best-effort GraphQL operation name (`query Foo` / `mutation Bar`). */
|
|
12
|
-
export declare function parseGraphQLOperationName(query: unknown): string | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Wrap an Octokit so every request emits one structured log line. Returns
|
|
15
|
-
* the same instance for call-through convenience. Idempotent per instance.
|
|
16
|
-
*/
|
|
17
|
-
export declare function instrumentGitHubOctokit(octokit: Octokit, input?: {
|
|
18
|
-
write?: GitHubRequestLogWrite;
|
|
19
|
-
}): Octokit;
|
|
20
|
-
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.d.ts","sourceRoot":"","sources":["../../../src/channels/github/instrument.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAI7C,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AA4C3D,yEAAyE;AACzE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAQ5E;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;CAAE,GACxC,OAAO,CAmDT"}
|