@cursor/july 0.1.15 → 0.1.16

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.
Files changed (74) hide show
  1. package/dist/docs/404.html +2 -2
  2. package/dist/docs/ab.html +3 -3
  3. package/dist/docs/assets/{app.DpdGZTLe.js → app.DjHC-Ggf.js} +1 -1
  4. package/dist/docs/assets/chunks/@localSearchIndexroot.DZtu0ZIc.js +1 -0
  5. package/dist/docs/assets/chunks/{VPLocalSearchBox.IB-0QqIT.js → VPLocalSearchBox.DwviwmIq.js} +1 -1
  6. package/dist/docs/assets/chunks/{theme.-fYBoNtR.js → theme.BIpeYSon.js} +2 -2
  7. package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.js → example-agents_index.md.D2PEVSXl.js} +2 -2
  8. package/dist/docs/assets/{example-agents_index.md.BPXjUtRB.lean.js → example-agents_index.md.D2PEVSXl.lean.js} +1 -1
  9. package/dist/docs/assets/example-agents_security-reviewer.md.BZSNycMf.js +19 -0
  10. package/dist/docs/assets/{example-agents_security-reviewer.md.CE9v-aKm.lean.js → example-agents_security-reviewer.md.BZSNycMf.lean.js} +1 -1
  11. package/dist/docs/building-with-agents.html +3 -3
  12. package/dist/docs/concepts.html +3 -3
  13. package/dist/docs/deployment.html +3 -3
  14. package/dist/docs/evals.html +3 -3
  15. package/dist/docs/example-agents/approval-buddy.html +3 -3
  16. package/dist/docs/example-agents/benny.html +3 -3
  17. package/dist/docs/example-agents/bugbot.html +3 -3
  18. package/dist/docs/example-agents/codebase-wiki.html +3 -3
  19. package/dist/docs/example-agents/codeowners-review.html +3 -3
  20. package/dist/docs/example-agents/concierge.html +3 -3
  21. package/dist/docs/example-agents/fsd.html +3 -3
  22. package/dist/docs/example-agents/index.html +5 -5
  23. package/dist/docs/example-agents/knowledge-base.html +3 -3
  24. package/dist/docs/example-agents/oncall.html +3 -3
  25. package/dist/docs/example-agents/security-reviewer.html +14 -14
  26. package/dist/docs/example-agents/slack-agent.html +3 -3
  27. package/dist/docs/example-agents/weather-agent.html +3 -3
  28. package/dist/docs/guides/agent-to-agent.html +3 -3
  29. package/dist/docs/guides/cloud-runtime.html +3 -3
  30. package/dist/docs/guides/github.html +3 -3
  31. package/dist/docs/guides/human-in-the-loop.html +3 -3
  32. package/dist/docs/guides/mcp-oauth.html +3 -3
  33. package/dist/docs/guides/slack.html +3 -3
  34. package/dist/docs/guides/webhooks.html +3 -3
  35. package/dist/docs/hashmap.json +1 -1
  36. package/dist/docs/hillclimbing.html +3 -3
  37. package/dist/docs/index.html +3 -3
  38. package/dist/docs/quickstart.html +3 -3
  39. package/dist/docs/reference/agent-config.html +3 -3
  40. package/dist/docs/reference/channels.html +3 -3
  41. package/dist/docs/reference/cli.html +3 -3
  42. package/dist/docs/reference/connections.html +3 -3
  43. package/dist/docs/reference/hooks.html +3 -3
  44. package/dist/docs/reference/http-api.html +3 -3
  45. package/dist/docs/reference/instructions.html +3 -3
  46. package/dist/docs/reference/playground.html +3 -3
  47. package/dist/docs/reference/project-layout.html +3 -3
  48. package/dist/docs/reference/prompt.html +3 -3
  49. package/dist/docs/reference/schedules.html +3 -3
  50. package/dist/docs/reference/sessions.html +3 -3
  51. package/dist/docs/reference/skills.html +3 -3
  52. package/dist/docs/reference/subagents.html +3 -3
  53. package/dist/docs/reference/tools.html +3 -3
  54. package/dist/docs/scaffolding-agents.html +3 -3
  55. package/dist/docs/storage.html +3 -3
  56. package/dist/docs/troubleshooting.html +3 -3
  57. package/dist/evals.d.ts +18 -0
  58. package/dist/evals.d.ts.map +1 -1
  59. package/dist/evals.js +30 -0
  60. package/dist/internal/eval-runner.d.ts.map +1 -1
  61. package/dist/internal/eval-runner.js +3 -2
  62. package/dist/internal/evals-client.d.ts.map +1 -1
  63. package/dist/internal/evals-client.js +3 -2
  64. package/dist/playground/assets/{index-BVMOoiek.js → index-Bwl4Onx4.js} +46 -47
  65. package/dist/playground/assets/{index-DYmP4b--.css → index-ByV4nfch.css} +1 -1
  66. package/dist/playground/index.html +2 -2
  67. package/docs/example-agents/index.md +1 -1
  68. package/docs/example-agents/security-reviewer.md +23 -21
  69. package/package.json +1 -1
  70. package/src/evals.ts +44 -0
  71. package/src/internal/eval-runner.ts +6 -1
  72. package/src/internal/evals-client.ts +9 -2
  73. package/dist/docs/assets/chunks/@localSearchIndexroot.D2d8CfFS.js +0 -1
  74. package/dist/docs/assets/example-agents_security-reviewer.md.CE9v-aKm.js +0 -19
@@ -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-BVMOoiek.js"></script>
12
- <link rel="stylesheet" crossorigin href="./assets/index-DYmP4b--.css">
11
+ <script type="module" crossorigin src="./assets/index-Bwl4Onx4.js"></script>
12
+ <link rel="stylesheet" crossorigin href="./assets/index-ByV4nfch.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
@@ -26,7 +26,7 @@ The source projects live under
26
26
  | [Alert investigator](./oncall.md) | Local | Watched Slack alerts channel | Bot-post channel watching, per-thread debounce, reminder tools, and host Slack calls | Every alert gets a thread-pinned investigation that schedules its own re-checks. |
27
27
  | [PR evidence reviewer](./bugbot.md) | Local | Custom HTTP and Slack | Host tool, skill, seeded workspaces, and an eval | The model receives a prepared diff-first evidence tree instead of a checkout. |
28
28
  | [Approval Buddy](./approval-buddy.md) | Local | GitHub and Slack | Policy tools, two subagents, durable storage, and evals | Code decides whether a PR may be approved. Reviews stay informational. |
29
- | [Security Reviewer](./security-reviewer.md) | Local host pipeline | GitHub and chat | Staged tools, parallel SDK agents, progress UI, durable storage, A/B, and evals | Reviewers and triage overlap while the playground shows every stage. |
29
+ | [Security Reviewer](./security-reviewer.md) | Local host pipeline | GitHub and chat | Staged tools, parallel SDK agents, progress UI, durable storage, A/B, and evals | Lives in `factory/security-reviewer/`. Reviewers and triage overlap while the playground shows every stage. |
30
30
  | [Remote PR coordinator](./fsd.md) | Local coordinator and remote PR sessions | HTTP, GitHub, and Slack | Remote handoff, hooks, affinity, buffering, reminders, and workflow MCP | One remote conversation follows a PR across chat, webhooks, and timed wakes. |
31
31
  | [Knowledge base](./knowledge-base.md) | Local | Built-in HTTP chat | Durable host-side state, a conventions skill, a schedule, unit tests, and evals | People curate shared facts in chat, and fresh sessions retrieve them from markdown. |
32
32
  | [Codebase wiki](./codebase-wiki.md) | Local | GitHub and chat | Task-dispatch webhooks, seeded digests, a mapping skill, a schedule, and evals | Merged PRs accumulate into per-feature wiki pages with a daily digest. |
@@ -13,7 +13,9 @@ confirmed findings, writes artifacts, and may publish a GitHub review.
13
13
  Use this example when the workflow needs several model workers, but the host
14
14
  must own orchestration, progress, artifacts, and the final write.
15
15
 
16
- [Browse the Security Reviewer source.](../../examples/security-reviewer/)
16
+ Source lives under [`factory/security-reviewer/`](../../../../factory/security-reviewer/) (factory agent, not under `examples/`).
17
+
18
+ [Browse the Security Reviewer source.](../../../../factory/security-reviewer/)
17
19
 
18
20
  ## Run a three-stage host pipeline
19
21
 
@@ -65,15 +67,15 @@ status from the finding count even when the review posting result says
65
67
 
66
68
  | Capability | Source | Role |
67
69
  | --- | --- | --- |
68
- | Root agent | [`agent/agent.ts`](../../examples/security-reviewer/agent/agent.ts), [`agent/instructions.md`](../../examples/security-reviewer/agent/instructions.md) | Configure local chat and explain the three-stage contract. |
69
- | Server tools | [`agent/tools/`](../../examples/security-reviewer/agent/tools/) | Expose each review stage to chat and host orchestration. |
70
- | GitHub channel | [`agent/channels/github.ts`](../../examples/security-reviewer/agent/channels/github.ts) | Filter wakes, run background tasks, and publish status. |
71
- | Progress channel | [`agent/channels/asr-progress.ts`](../../examples/security-reviewer/agent/channels/asr-progress.ts) | Serve live reviewer and triage state by `runId`. |
72
- | Playground renderer | [`agent/playground/tools/run_reviewers.tsx`](../../examples/security-reviewer/agent/playground/tools/run_reviewers.tsx) | Replace the generic tool chip with live module rows. |
73
- | SDK review pipeline | [`agent/lib/asr/`](../../examples/security-reviewer/agent/lib/asr/), [`review-stages.ts`](../../examples/security-reviewer/agent/lib/review-stages.ts) | Select modules, call model workers, triage, deduplicate, and write artifacts. |
74
- | Storage | [`agent/storage.ts`](../../examples/security-reviewer/agent/storage.ts) | Persist framework sessions with `cursorHostedStorage` (lazy restore). |
75
- | A/B | [`agent/ab.ts`](../../examples/security-reviewer/agent/ab.ts), [`agent/ab.config.ts`](../../examples/security-reviewer/agent/ab.config.ts) | Compare all-severity versus high-only GitHub comments. |
76
- | Eval | [`evals/`](../../examples/security-reviewer/evals/) | Check stage-tool presence against a pinned sample. |
70
+ | Root agent | [`agent/agent.ts`](../../../../factory/security-reviewer/agent/agent.ts), [`agent/instructions.md`](../../../../factory/security-reviewer/agent/instructions.md) | Configure local chat and explain the three-stage contract. |
71
+ | Server tools | [`agent/tools/`](../../../../factory/security-reviewer/agent/tools/) | Expose each review stage to chat and host orchestration. |
72
+ | GitHub channel | [`agent/channels/github.ts`](../../../../factory/security-reviewer/agent/channels/github.ts) | Filter wakes, run background tasks, and publish status. |
73
+ | Progress channel | [`agent/channels/asr-progress.ts`](../../../../factory/security-reviewer/agent/channels/asr-progress.ts) | Serve live reviewer and triage state by `runId`. |
74
+ | Playground renderer | [`agent/playground/tools/run_reviewers.tsx`](../../../../factory/security-reviewer/agent/playground/tools/run_reviewers.tsx) | Replace the generic tool chip with live module rows. |
75
+ | SDK review pipeline | [`agent/lib/asr/`](../../../../factory/security-reviewer/agent/lib/asr/), [`review-stages.ts`](../../../../factory/security-reviewer/agent/lib/review-stages.ts) | Select modules, call model workers, triage, deduplicate, and write artifacts. |
76
+ | Storage | [`agent/storage.ts`](../../../../factory/security-reviewer/agent/storage.ts) | Persist framework sessions with `cursorHostedStorage` (lazy restore). |
77
+ | A/B | [`agent/ab.ts`](../../../../factory/security-reviewer/agent/ab.ts) | Compare all-severity versus high-only GitHub comments. |
78
+ | Eval | [`evals/`](../../../../factory/security-reviewer/evals/) | Check stage-tool presence against a pinned sample. |
77
79
 
78
80
  There is no Slack channel, authored skill, discovered subagent, MCP
79
81
  connection, schedule, reminder, hook, tool approval, or cloud runtime.
@@ -95,14 +97,14 @@ The pipeline exposes settings for:
95
97
  - prior-comment loading.
96
98
 
97
99
  The active names live beside the orchestration in
98
- [`review-stages.ts`](../../examples/security-reviewer/agent/lib/review-stages.ts).
100
+ [`review-stages.ts`](../../../../factory/security-reviewer/agent/lib/review-stages.ts).
99
101
 
100
102
  ## Validate the discovered agent
101
103
 
102
104
  ```bash
103
- agentkit validate --dir examples/security-reviewer
104
- agentkit info --dir examples/security-reviewer --json
105
- agentkit eval --dir examples/security-reviewer --list
105
+ agentkit validate --dir ../../factory/security-reviewer
106
+ agentkit info --dir ../../factory/security-reviewer --json
107
+ agentkit eval --dir ../../factory/security-reviewer --list
106
108
  ```
107
109
 
108
110
  The manifest should show four server tools, two authored channels, one
@@ -128,15 +130,15 @@ Call each stage and pass `postComment: false` yourself:
128
130
 
129
131
  ```bash
130
132
  agentkit call prepare_review \
131
- --dir examples/security-reviewer \
133
+ --dir ../../factory/security-reviewer \
132
134
  --input '{"prUrl":"https://github.com/owner/repo/pull/123"}'
133
135
 
134
136
  agentkit call run_reviewers \
135
- --dir examples/security-reviewer \
137
+ --dir ../../factory/security-reviewer \
136
138
  --input '{"runId":"<run-id>"}'
137
139
 
138
140
  agentkit call finalize_review \
139
- --dir examples/security-reviewer \
141
+ --dir ../../factory/security-reviewer \
140
142
  --input '{"runId":"<run-id>","postComment":false}'
141
143
  ```
142
144
 
@@ -152,7 +154,7 @@ stages can open the prepared `runId`.
152
154
  Run the dev server:
153
155
 
154
156
  ```bash
155
- agentkit dev examples/security-reviewer
157
+ agentkit dev ../../factory/security-reviewer
156
158
  ```
157
159
 
158
160
  Open the printed playground and start a review. The custom
@@ -233,7 +235,7 @@ Inspect its event surface:
233
235
 
234
236
  ```bash
235
237
  agentkit github events \
236
- --dir examples/security-reviewer \
238
+ --dir ../../factory/security-reviewer \
237
239
  --json
238
240
  ```
239
241
 
@@ -243,7 +245,7 @@ Replay reaches the full publishing path:
243
245
  TEST_PR_URL=https://github.com/your-org/allowlisted-test-repo/pull/123
244
246
  agentkit github replay \
245
247
  "$TEST_PR_URL" \
246
- --dir examples/security-reviewer \
248
+ --dir ../../factory/security-reviewer \
247
249
  --action opened
248
250
  ```
249
251
 
@@ -254,7 +256,7 @@ status and may post findings.
254
256
  ## Inspect the eval before running it
255
257
 
256
258
  ```bash
257
- agentkit eval --dir examples/security-reviewer --list
259
+ agentkit eval --dir ../../factory/security-reviewer --list
258
260
  ```
259
261
 
260
262
  The case reads pinned metadata from the committed fixture and checks for all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
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/src/evals.ts CHANGED
@@ -340,6 +340,50 @@ export function matchesEvalIdFilter(caseId: string, filter: string): boolean {
340
340
  return caseId === filter || caseId.startsWith(`${filter}/`);
341
341
  }
342
342
 
343
+ /**
344
+ * Tag for suite-aggregator datapoints that wait on sibling cases from the
345
+ * same eval file (e.g. `deepsec-recall/overall`). Selecting a summary case
346
+ * alone expands the batch to the whole file via
347
+ * {@link expandSummarySuiteSelection}.
348
+ */
349
+ export const EVAL_SUMMARY_TAG = "summary";
350
+
351
+ /** True when `tags` marks a suite-aggregator case. */
352
+ export function isEvalSummaryCase(
353
+ tags: readonly string[] | undefined
354
+ ): boolean {
355
+ return tags?.includes(EVAL_SUMMARY_TAG) ?? false;
356
+ }
357
+
358
+ /**
359
+ * If `selected` includes any summary-tagged suite aggregator, pull in every
360
+ * other datapoint from the same `fileId` so the aggregator is not run alone.
361
+ * Preserves discovery order from `all`.
362
+ */
363
+ export function expandSummarySuiteSelection<
364
+ T extends { id: string; fileId: string },
365
+ >(
366
+ all: readonly T[],
367
+ selected: readonly T[],
368
+ isSummary: (item: T) => boolean
369
+ ): T[] {
370
+ const fileIdsNeedingSuite = new Set(
371
+ selected.filter((item) => isSummary(item)).map((item) => item.fileId)
372
+ );
373
+ if (fileIdsNeedingSuite.size === 0) {
374
+ return [...selected];
375
+ }
376
+ const selectedIds = new Set(selected.map((item) => item.id));
377
+ const extras = all.filter(
378
+ (item) => fileIdsNeedingSuite.has(item.fileId) && !selectedIds.has(item.id)
379
+ );
380
+ if (extras.length === 0) {
381
+ return [...selected];
382
+ }
383
+ const want = new Set([...selectedIds, ...extras.map((item) => item.id)]);
384
+ return all.filter((item) => want.has(item.id));
385
+ }
386
+
343
387
  /**
344
388
  * Hard ceiling for concurrent eval cases.
345
389
  *
@@ -25,6 +25,8 @@ import type {
25
25
  import {
26
26
  EVAL_MAX_CONCURRENCY_LIMIT,
27
27
  expandEvalDefinition,
28
+ expandSummarySuiteSelection,
29
+ isEvalSummaryCase,
28
30
  matchesEvalIdFilter,
29
31
  normalizeEvalMaxConcurrency,
30
32
  } from "../evals.js";
@@ -208,7 +210,10 @@ export function filterDiscoveredEvals(
208
210
  (e.definition.tags ?? []).some((t) => options.tags!.includes(t))
209
211
  );
210
212
  }
211
- return selected;
213
+ // Suite aggregators (`summary` tag) need sibling cases from the same file.
214
+ return expandSummarySuiteSelection(evals, selected, (e) =>
215
+ isEvalSummaryCase(e.definition.tags)
216
+ );
212
217
  }
213
218
 
214
219
  export async function runDiscoveredEvals(
@@ -8,7 +8,11 @@
8
8
  */
9
9
 
10
10
  import type { EvalRunSnapshot } from "../evals.js";
11
- import { matchesEvalIdFilter } from "../evals.js";
11
+ import {
12
+ expandSummarySuiteSelection,
13
+ isEvalSummaryCase,
14
+ matchesEvalIdFilter,
15
+ } from "../evals.js";
12
16
  import type { EvalRunResult } from "./eval-runner.js";
13
17
  import { mergeRequestHeaders, type RequestAuth } from "./request-headers.js";
14
18
 
@@ -170,7 +174,10 @@ export async function listRemoteEvals(args: {
170
174
  (e.tags ?? []).some((t) => args.tags!.includes(t))
171
175
  );
172
176
  }
173
- return selected;
177
+ // Match server-side filterDiscoveredEvals: summary → whole file.
178
+ return expandSummarySuiteSelection(listed, selected, (e) =>
179
+ isEvalSummaryCase(e.tags)
180
+ );
174
181
  }
175
182
 
176
183
  export async function startRemoteEvalRun(args: {