@desplega.ai/agent-swarm 2.4.0 → 2.4.2
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/README.md +1 -1
- package/dist/{acp-adapter-kedstxx6.js → acp-adapter-dv7hmx4r.js} +9 -9
- package/dist/{actions-vget6r1k.js → actions-51nc1gny.js} +21 -21
- package/dist/{amp-adapter-xeb5mktv.js → amp-adapter-abp5tdx8.js} +4 -4
- package/dist/{app-mqap8t8m.js → app-9h14qvr6.js} +3 -3
- package/dist/{assistant-h0gv97mv.js → assistant-wv1gz3mt.js} +22 -22
- package/dist/{boot-reembed-qr8a894z.js → boot-reembed-6yn53ms9.js} +1 -1
- package/dist/{boot-reembed-rj85jjhw.js → boot-reembed-7fcka4z5.js} +1 -1
- package/dist/{boot-scrub-sweep-eyfvn6v9.js → boot-scrub-sweep-pm1580ax.js} +4 -4
- package/dist/{boot-seeds-xs9a8dx1.js → boot-seeds-g5hfc1x8.js} +4 -4
- package/dist/{claude-adapter-bm23cye7.js → claude-adapter-gf3kxhf0.js} +9 -9
- package/dist/{claude-managed-adapter-1mwrsm9d.js → claude-managed-adapter-h2y889ge.js} +2 -2
- package/dist/{claude-managed-setup-gkfgks4j.js → claude-managed-setup-h00hsgtz.js} +2 -2
- package/dist/{claude-sdk-session-apb4ypz3.js → claude-sdk-session-s2k1qd8y.js} +13 -13
- package/dist/{cli-tj4j2ts4.js → cli-02qm7src.js} +8 -8
- package/dist/{cli-1cevz46c.js → cli-0qvtffe9.js} +6 -6
- package/dist/{cli-avmqhatn.js → cli-10hhg0km.js} +8 -8
- package/dist/{cli-7gh7020n.js → cli-1dmcq2eh.js} +1 -1
- package/dist/{cli-kz116kvw.js → cli-239yjk27.js} +7 -7
- package/dist/{cli-7ayprxp7.js → cli-2dfbv8qr.js} +8 -0
- package/dist/{cli-a49vpbf3.js → cli-5kqnemen.js} +1 -1
- package/dist/{cli-x719j3vs.js → cli-5rk36sjf.js} +442 -205
- package/dist/{cli-fb6t92v8.js → cli-6x9ma5w5.js} +1 -1
- package/dist/{cli-c8fwpgqb.js → cli-7225gwj7.js} +2 -2
- package/dist/{cli-5s5hx57y.js → cli-7awf1fp8.js} +1 -1
- package/dist/{cli-bn26xbcs.js → cli-8nyhf7za.js} +1 -1
- package/dist/{cli-ywyrffff.js → cli-8sxqsbbq.js} +1 -1
- package/dist/{cli-rsd7ga7v.js → cli-8zwe9mpk.js} +11 -11
- package/dist/{cli-y83zk5sb.js → cli-a0kcty51.js} +4 -4
- package/dist/{cli-8b9wvjps.js → cli-a4gvwttf.js} +4 -4
- package/dist/{cli-jhp7w1fy.js → cli-a5ebc95n.js} +2 -2
- package/dist/{cli-mvg2hf8p.js → cli-ahtpy9kf.js} +14 -7
- package/dist/{cli-x1p5dhq2.js → cli-bcj753sq.js} +3 -3
- package/dist/{cli-p22zdvnt.js → cli-bn0rewsy.js} +3 -3
- package/dist/{cli-p1m2b6gc.js → cli-d2mb5s8a.js} +7 -7
- package/dist/{cli-rg7ntypm.js → cli-d3qqdy4c.js} +456 -94
- package/dist/{cli-c5sbmw1v.js → cli-d82btycs.js} +94 -15
- package/dist/{cli-02vhhssk.js → cli-efaqv1c7.js} +5 -5
- package/dist/{cli-vjfpshn3.js → cli-ejs3m1sx.js} +1 -1
- package/dist/{cli-kk2r80n5.js → cli-faypxz7q.js} +4 -4
- package/dist/{cli-a1esmmee.js → cli-fpmsqq59.js} +7 -2
- package/dist/{cli-wrv09v7q.js → cli-ftyypbg5.js} +1 -1
- package/dist/{cli-zvze9rbm.js → cli-fyzjmseb.js} +3 -3
- package/dist/{cli-8rwvksbc.js → cli-g0hgtz4p.js} +5 -5
- package/dist/{cli-nrrg0fvy.js → cli-h38rjv87.js} +133 -12
- package/dist/{cli-tg9ksbn8.js → cli-h93c9vb3.js} +2 -2
- package/dist/{cli-eqgfs202.js → cli-hqhzg1qq.js} +2 -2
- package/dist/{cli-bhwa8rzc.js → cli-hyfw2j1e.js} +13 -12
- package/dist/{cli-3wjs22x3.js → cli-j4rqdf2n.js} +2 -2
- package/dist/{cli-6ftrrwm1.js → cli-n85dqg6d.js} +5 -5
- package/dist/{cli-8cxkw1f5.js → cli-nmqdc2t3.js} +2 -2
- package/dist/{cli-4fhyq711.js → cli-nn47d7e8.js} +13 -13
- package/dist/{cli-x3en6ct3.js → cli-nwyw3zhg.js} +1 -1
- package/dist/{cli-3avfh5az.js → cli-pemywhfq.js} +2 -2
- package/dist/{cli-xfe63zx3.js → cli-pkht5hap.js} +2 -2
- package/dist/{cli-sppc0cmw.js → cli-pnp2j5zg.js} +2 -2
- package/dist/{cli-wk8ccrz6.js → cli-pw7v69vp.js} +2 -2
- package/dist/{cli-tgvpmnwz.js → cli-r99kc9yq.js} +5 -5
- package/dist/{cli-bfc3k1x5.js → cli-rdyw3mct.js} +9 -9
- package/dist/{cli-b80a1100.js → cli-s6vr7r2d.js} +2 -2
- package/dist/{cli-zv4vy2b0.js → cli-s95dknxh.js} +1 -1
- package/dist/{cli-ttaz6c7m.js → cli-saw9a6f6.js} +6 -5
- package/dist/{cli-mz1ezzzh.js → cli-shvfedvm.js} +3 -3
- package/dist/{cli-rdr166ht.js → cli-smvcw9z5.js} +1 -1
- package/dist/{cli-2rwet3r7.js → cli-sv5gb0yb.js} +1 -1
- package/dist/{cli-5ff2sjyt.js → cli-t30yj95q.js} +2 -2
- package/dist/{cli-ptkpaqfy.js → cli-wt645v7q.js} +1 -1
- package/dist/{cli-f3nx1h8z.js → cli-wxbn3yfx.js} +2 -2
- package/dist/{cli-wyrr38xm.js → cli-x5mq1fyq.js} +1 -1
- package/dist/{cli-ccn0eybf.js → cli-xbzvet96.js} +6 -6
- package/dist/{cli-4mkvwgzr.js → cli-xf234ws8.js} +1 -1
- package/dist/{cli-nme7wery.js → cli-y2x52gs2.js} +46 -13
- package/dist/{cli-ffbrkh1r.js → cli-y8n5k515.js} +46 -38
- package/dist/{cli-ecshf504.js → cli-z4wd2ftv.js} +7 -7
- package/dist/{cli-dsgj3e7a.js → cli-zfg9enh9.js} +2 -2
- package/dist/{cli-yxqag76b.js → cli-zw88zjba.js} +1 -1
- package/dist/cli.js +20 -20
- package/dist/{codex-adapter-pp2gq8gr.js → codex-adapter-ttygw382.js} +6 -6
- package/dist/{codex-hook-qwzccd64.js → codex-hook-x7nejyrr.js} +7 -4
- package/dist/{codex-login-35p4sk85.js → codex-login-m819c41r.js} +1 -1
- package/dist/{codex-session-runner-0vzn09t8.js → codex-session-runner-60b58vv3.js} +7 -7
- package/dist/{commands-psqhkttb.js → commands-edmdwa4x.js} +2 -2
- package/dist/{controller-t20vz2k8.js → controller-m263fg43.js} +4 -4
- package/dist/{controllers-connect-gkxmqw9d.js → controllers-connect-5fym8sw1.js} +23 -23
- package/dist/{cursor-adapter-3v542qe5.js → cursor-adapter-cz6nm6mj.js} +3 -3
- package/dist/{db-nc1rd869.js → db-2y0mgstc.js} +3 -3
- package/dist/{db-2xbyenjr.js → db-nn0hcmx5.js} +6 -2
- package/dist/{devin-adapter-7egzmt0k.js → devin-adapter-zgqadvnm.js} +1 -1
- package/dist/{dispatcher-ewceb8ts.js → dispatcher-0a9wwjcx.js} +20 -20
- package/dist/{docker-njavd3fb.js → docker-fkgtr75t.js} +2 -2
- package/dist/{dsh-adapter-75xwh78t.js → dsh-adapter-3n3net33.js} +3 -3
- package/dist/{e2b-5r6a5jeb.js → e2b-7am6tmq6.js} +2 -2
- package/dist/{e2b-pw1nvtmh.js → e2b-thdcxtjd.js} +2 -2
- package/dist/{easter-egg-3d-xsc47jwf.js → easter-egg-3d-5cgynaja.js} +1 -1
- package/dist/{event-bus-101fenkh.js → event-bus-9vpk8gmq.js} +1 -1
- package/dist/{execute-gzmw1mnw.js → execute-t4e6m3rw.js} +1 -1
- package/dist/{external-channel-a5dsmxn4.js → external-channel-zhvt95n3.js} +2 -2
- package/dist/{grok-adapter-vj88xr23.js → grok-adapter-qnr1hp2y.js} +10 -10
- package/dist/handlers-dkcarkd0.js +39 -0
- package/dist/{heartbeat-t2m9r3wa.js → heartbeat-gz97r7ac.js} +23 -23
- package/dist/{hook-xa677f8r.js → hook-1mmdgjqs.js} +16 -9
- package/dist/{hook-8femx1bg.js → hook-x8rthca4.js} +6 -6
- package/dist/{http-xpmmq028.js → http-r8f85xr9.js} +274 -160
- package/dist/index-5jecgp3n.js +41 -0
- package/dist/index-aex0eba9.js +40 -0
- package/dist/{index-syztqdt6.js → index-g6tbb6ve.js} +1 -1
- package/dist/{index-cdzyfrsp.js → index-smxyk04s.js} +1 -1
- package/dist/{index-dg2tmj99.js → index-vzvfqzfj.js} +20 -20
- package/dist/{index-s7ckdajq.js → index-y7rbcrc1.js} +10 -10
- package/dist/{keepalive-3nr4st3r.js → keepalive-64c0f34c.js} +4 -4
- package/dist/lead-b1da0f97.js +78 -0
- package/dist/{maintenance-verwpe2c.js → maintenance-mnxpar12.js} +1 -1
- package/dist/{oauth-refresh-sweep-9q2t0y3q.js → oauth-refresh-sweep-36hs2v4h.js} +3 -3
- package/dist/{onboard-aytqedmq.js → onboard-xes8de61.js} +3 -3
- package/dist/{opencode-adapter-f4hryjny.js → opencode-adapter-3s7ax02e.js} +7 -7
- package/dist/{otel-impl-hckw4wt1.js → otel-impl-fzc57kcq.js} +2 -2
- package/dist/{pi-mono-adapter-hxby0ce1.js → pi-mono-adapter-ytp7gz8b.js} +22 -11
- package/dist/{pricing-refresh-5nvme3sm.js → pricing-refresh-1nek2w7b.js} +3 -3
- package/dist/{rbac-roles-vbpy21mg.js → rbac-roles-sqefb5hw.js} +2 -2
- package/dist/{rbac-roles-pd8c26m1.js → rbac-roles-ttyfaep2.js} +1 -1
- package/dist/{render-v2-7nqgvk2q.js → render-v2-vb527jwn.js} +3 -3
- package/dist/{resume-b6djcj3c.js → resume-jcdzg1bn.js} +10 -8
- package/dist/{runtime-txrxc9za.js → runtime-xe3aqy4x.js} +1 -1
- package/dist/{session-access-fc3f9y12.js → session-access-zsp4wsp0.js} +4 -4
- package/dist/{setup-n39szm6b.js → setup-1nb2zqd3.js} +1 -1
- package/dist/{virtual-modules-wyp2k6z3.js → virtual-modules-4r3zkc20.js} +2 -2
- package/dist/{work-objects-jem2fre0.js → work-objects-61w08fwr.js} +23 -23
- package/dist/worker-c1e68hpa.js +78 -0
- package/dist/{x-8ewt8gxn.js → x-y45mthwn.js} +2 -2
- package/openapi.json +491 -52
- package/package.json +3 -3
- package/src/apps/action-runner.ts +146 -0
- package/src/apps/catalog.generated.json +3 -2
- package/src/apps/definition.ts +152 -4
- package/src/apps/row-store.ts +23 -9
- package/src/apps/schema-migrate.ts +14 -6
- package/src/apps/script-types.ts +2 -1
- package/src/apps/sync.ts +20 -19
- package/src/be/db/tasks/read.ts +112 -0
- package/src/be/db.ts +16 -4
- package/src/be/fleet-benchmark-stats.ts +10 -5
- package/src/be/models-catalog.ts +4 -0
- package/src/be/onboarding.ts +6 -0
- package/src/be/scripts/typecheck.ts +13 -0
- package/src/be/swarm-config-guard.ts +25 -1
- package/src/be/telemetry-enable.ts +1 -1
- package/src/commands/provider-credentials.ts +12 -2
- package/src/commands/runner.ts +3 -0
- package/src/heartbeat/heartbeat.ts +2 -2
- package/src/hooks/codex-hook.ts +6 -2
- package/src/hooks/hook.ts +7 -0
- package/src/hooks/pr-body-guard.ts +38 -11
- package/src/hooks/pr-room-guard.ts +88 -0
- package/src/http/agents.ts +1 -0
- package/src/http/apps.ts +99 -183
- package/src/http/fleet-benchmark.ts +79 -30
- package/src/http/global-config.ts +7 -0
- package/src/http/ranking.ts +24 -40
- package/src/http/status.ts +49 -43
- package/src/http/tasks.ts +49 -1
- package/src/http/telemetry-ui.ts +1 -1
- package/src/http/used-by.ts +55 -19
- package/src/http/users.ts +2 -2
- package/src/providers/acp-targets.ts +1 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/pi-mono-adapter.ts +15 -0
- package/src/providers/reasoning-effort.ts +2 -1
- package/src/providers/types.ts +2 -0
- package/src/ranking/telemetry-ranking.ts +5 -33
- package/src/scripts-runtime/sdk-allowlist.ts +7 -0
- package/src/scripts-runtime/types/stdlib.d.ts +31 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +31 -0
- package/src/server.ts +4 -0
- package/src/telemetry-context.ts +19 -1
- package/src/telemetry-contract/EVENTS.md +42 -8
- package/src/telemetry-contract/SOURCE.json +6 -5
- package/src/telemetry-contract/catalog.json +225 -5
- package/src/telemetry-contract/ranking/fixtures/valid/no-claim.json +10 -0
- package/src/telemetry-contract/ranking/listing.v1.schema.json +2 -2
- package/src/telemetry-contract/types.gen.ts +225 -27
- package/src/telemetry-identity.ts +47 -9
- package/src/telemetry-snapshot.ts +9 -1
- package/src/telemetry-ui-events.ts +9 -2
- package/src/telemetry.ts +29 -6
- package/src/tests/app-action-run-tool.test.ts +178 -0
- package/src/tests/app-row-tools.test.ts +385 -0
- package/src/tests/apps-json-column.test.ts +611 -0
- package/src/tests/apps-script-types.test.ts +2 -0
- package/src/tests/apps-sync-engine.test.ts +42 -0
- package/src/tests/check-pr-body.test.ts +0 -23
- package/src/tests/credential-check.test.ts +38 -0
- package/src/tests/db-task-read-contract.test.ts +4 -0
- package/src/tests/db-task-write-contract.test.ts +2 -0
- package/src/tests/docs-index-footprint.test.js +2 -2
- package/src/tests/fleet-benchmark.test.ts +122 -2
- package/src/tests/http-users.test.ts +62 -1
- package/src/tests/model-catalog-table.test.ts +63 -0
- package/src/tests/model-profiles-api.test.ts +19 -7
- package/src/tests/models-catalog.test.ts +50 -0
- package/src/tests/onboarding.test.ts +21 -0
- package/src/tests/org-website.test.ts +62 -0
- package/src/tests/pi-mono-adapter.test.ts +23 -0
- package/src/tests/pr-body-leaks.test.ts +4 -0
- package/src/tests/pr-room-guard.test.ts +242 -0
- package/src/tests/ranking-listing.test.ts +8 -23
- package/src/tests/ranking-route.test.ts +49 -47
- package/src/tests/reasoning-effort.test.ts +39 -3
- package/src/tests/runner-harness-telemetry-env.test.ts +62 -1
- package/src/tests/status.test.ts +158 -9
- package/src/tests/swarm-tool-result-gate.test.ts +2 -4
- package/src/tests/task-lineage.test.ts +180 -0
- package/src/tests/telemetry-context.test.ts +128 -2
- package/src/tests/telemetry-init.test.ts +62 -5
- package/src/tests/telemetry-ui-route.test.ts +123 -0
- package/src/tests/tool-annotations.test.ts +3 -2
- package/src/tests/used-by-route.test.ts +144 -10
- package/src/tests/user-token-rest-auth.test.ts +38 -0
- package/src/tests/workflow-agent-task-retry.test.ts +130 -4
- package/src/tests/workflow-wait-recovery.test.ts +116 -4
- package/src/tools/app-action-run.ts +63 -0
- package/src/tools/app-rows.ts +239 -0
- package/src/tools/model-catalog/index.ts +1 -1
- package/src/tools/tool-config.ts +8 -0
- package/src/tools/utils.ts +1 -1
- package/src/tools/workflows/retry-workflow-run.ts +1 -1
- package/src/types.ts +17 -0
- package/src/utils/company-profile.ts +24 -0
- package/src/utils/org-website.ts +58 -21
- package/src/workflows/recovery.ts +10 -22
- package/src/workflows/resume.ts +16 -0
- package/src/workflows/task-step-routing.ts +47 -7
- package/templates/skills/apps/SKILL.md +44 -4
- package/templates/skills/apps/content.md +44 -4
- package/dist/handlers-zbs90bny.js +0 -39
- package/dist/index-8pwc1jc8.js +0 -40
- package/dist/index-nxa6me0q.js +0 -41
- package/dist/lead-td8h2sfn.js +0 -78
- package/dist/worker-wr6xgfr2.js +0 -78
- package/src/tests/check-ranking-entry.test.ts +0 -146
|
@@ -18,6 +18,14 @@ Swarm Apps are persistent, agent-authored internal applications: a schema-backed
|
|
|
18
18
|
| `app-upsert` | Create an app, or replace an existing app's entire definition when you intentionally have the full desired state. |
|
|
19
19
|
| `app-patch` | Make a focused change while preserving everything not mentioned in the patch. Prefer this for iteration. |
|
|
20
20
|
| `app-query` | Run one declared named query and return its rows. Use this when an agent or saved script needs to consume app data rather than render the app UI. |
|
|
21
|
+
| `app-rows-list` | List rows with typed equality filters, sorting, and a limit. Returns `{ rows, total }`. |
|
|
22
|
+
| `app-row-get` | Read a row by `rowId`. Returns `{ row }`. |
|
|
23
|
+
| `app-row-create` | Create a row from `values`. Returns `{ row }`. |
|
|
24
|
+
| `app-rows-create` | Create 1 to 500 rows from a `rows: values[]` array, within 10 MiB. Returns `{ rows }`. |
|
|
25
|
+
| `app-row-patch` | Patch a row by `rowId` with `values`. Returns `{ row }`. |
|
|
26
|
+
| `app-row-delete` | Delete a row by `rowId`. Returns `{ ok: true }`. |
|
|
27
|
+
| `app-rows-delete` | Delete matching rows with a non-empty `equals` filter. Returns `{ deleted }`. |
|
|
28
|
+
| `app-action-run` | Run a declared script, task, or sync action with `{ appId, action, input? }`. Agents can invoke it through MCP only. |
|
|
21
29
|
| `app-history` | List definition snapshots and their compact model/column digests before choosing a restore point. |
|
|
22
30
|
| `app-diff` | Show a unified definition diff; defaults to newest snapshot → CURRENT. |
|
|
23
31
|
| `app-rollback` | Restore a snapshot through the normal schema-migration engine. |
|
|
@@ -28,7 +36,24 @@ For every edit: `app-get` -> modify the smallest coherent subtree -> `app-patch`
|
|
|
28
36
|
|
|
29
37
|
### Reading an app's callable surface
|
|
30
38
|
|
|
31
|
-
One `app-get` returns everything needed to drive an app you did not write: `definition.queries` are runnable with `app-query` (supply every `$param` the query references), and `definition.actions` are invocable with `POST /api/apps/<id>/actions/<name>` (a `script` action runs its script, a `task` action spawns a task, a `sync` action refreshes sources). Read
|
|
39
|
+
One `app-get` returns everything needed to drive an app you did not write: `definition.queries` are runnable with `app-query` (supply every `$param` the query references), and `definition.actions` are invocable with `app-action-run` or `POST /api/apps/<id>/actions/<name>` (a `script` action runs its script, a `task` action spawns a task, a `sync` action refreshes sources). Read the query parameters and action arguments from the definition before invocation. Do not guess parameter names.
|
|
40
|
+
|
|
41
|
+
### Verified action caller
|
|
42
|
+
|
|
43
|
+
Script actions receive `caller` as a reserved, server-stamped argument. The server overwrites `caller` from definition defaults and request input.
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
type AppActionCaller = {
|
|
47
|
+
kind: "user" | "agent" | "operator" | "guest";
|
|
48
|
+
id: string | null;
|
|
49
|
+
name?: string;
|
|
50
|
+
pageId?: string;
|
|
51
|
+
};
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The caller identifies the authenticated user or agent. Operator and guest callers have `id: null`. A signed page session adds `pageId`.
|
|
55
|
+
With the swarm key, a registered `X-Agent-ID` produces an agent caller and `agent:<id>` row provenance. Missing or unknown agent IDs remain operator callers.
|
|
56
|
+
Task actions include the same caller as server-verified JSON in the task prompt. Script execution still uses the saved script owner's bindings.
|
|
32
57
|
|
|
33
58
|
### Verified action caller
|
|
34
59
|
|
|
@@ -200,6 +225,7 @@ Each column is `{ "kind": ..., "required"?: boolean, "default"?: ..., "index"?:
|
|
|
200
225
|
| `boolean` | Boolean; set `index: true` only when equality lookups need it. |
|
|
201
226
|
| `date` | ISO-8601 string; never indexed. |
|
|
202
227
|
| `enum` | String from the non-empty unique `enum` list; always indexed, without `index: true`. |
|
|
228
|
+
| `json` | Any JSON value (object, array, nested) up to 256 KB serialized by default (`APPS_JSON_COLUMN_MAX_BYTES`); never indexed, and a named query cannot `filter` or `sort` on it. Not allowed for `userConfig` fields or element props. |
|
|
203
229
|
|
|
204
230
|
`default` must match the column kind (and be one of the enum values). `required: true` rejects missing/null values unless a default supplies the value. `id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` — and the sync envelope `source`, `syncedAt`, `stale` — are system columns and reserved names. An app created before the sync envelope that declared ordinary columns with these names surfaces `definitionError` after upgrade until they are renamed: patch in a fresh column with a `{from}` migration directive, then purge the old one. Rows always expose `id`/`createdAt`/`updatedAt`; `createdBy`/`updatedBy` record the acting principal (`user:<id>`, `agent:<id>`, `operator`, or `sync:<source>` for engine writes) and are system-managed on every row write.
|
|
205
231
|
|
|
@@ -296,7 +322,7 @@ A named query is:
|
|
|
296
322
|
}
|
|
297
323
|
```
|
|
298
324
|
|
|
299
|
-
`filter` is a strict AND of equality checks. A filter may target a declared model column or a system column (`id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, and on synced models `source`, `syncedAt`, `stale`) — filtering on `id` is the universal way to select one row for a detail view, and `{ "stale": true }` selects rows a complete pull stopped confirming. A literal value must match the column's kind; date filters compare the stored raw ISO string, not parsed instants. Omit `limit` for the default 200 rows, or set an integer from 1 through 1000. `sort.column` is a model column, `createdAt`, `updatedAt`, or `syncedAt`; `dir` is `asc` or `desc`. Query runtime state is `{ data, loading, error }` under `/queries/<queryName>`.
|
|
325
|
+
`filter` is a strict AND of equality checks. A filter may target a declared model column or a system column (`id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, and on synced models `source`, `syncedAt`, `stale`) — filtering on `id` is the universal way to select one row for a detail view, and `{ "stale": true }` selects rows a complete pull stopped confirming. A literal value must match the column's kind; date filters compare the stored raw ISO string, not parsed instants. Omit `limit` for the default 200 rows, or set an integer from 1 through 1000. `sort.column` is a non-`json` model column, `createdAt`, `updatedAt`, or `syncedAt`; `dir` is `asc` or `desc`. Query runtime state is `{ data, loading, error }` under `/queries/<queryName>`.
|
|
300
326
|
|
|
301
327
|
A filter value may instead be exactly `{ "$param": "<name>" }`. At execution, the caller supplies that name and the server coerces its value to the filtered column's kind before equality matching:
|
|
302
328
|
|
|
@@ -372,7 +398,7 @@ Use a task action named Tackle when a person should hand one issue row to the sw
|
|
|
372
398
|
|
|
373
399
|
For direct MCP calls, `app-query` accepts `{ appId, query, params? }` and returns rows from that declared named query; every supplied param must be referenced by a `$param` filter in that query. Use it when an agent needs to read app state without scraping the UI.
|
|
374
400
|
|
|
375
|
-
Saved scripts use the generated SDK name `ctx.swarm.app_query({ appId, query, params? })`. Use `app_query` in scripts or workflows that turn current app rows into reports, digests, or follow-up work. Saved scripts also get generated per-app types automatically: each app contributes an `App_<Name>` namespace with one row interface per model (enum columns as literal unions) and a typed `app_query` overload per named query, all visible via `script-query-types`. Actions
|
|
401
|
+
Saved scripts use the generated SDK name `ctx.swarm.app_query({ appId, query, params? })`. Use `app_query` in scripts or workflows that turn current app rows into reports, digests, or follow-up work. Saved scripts also get generated per-app types automatically: each app contributes an `App_<Name>` namespace with one row interface per model (enum columns as literal unions) and a typed `app_query` overload per named query, all visible via `script-query-types`. Scripts can create, list, get, patch, and delete rows with the seven row tools. Actions remain REST/MCP-only and have no script SDK method.
|
|
376
402
|
|
|
377
403
|
### Pages, routes, and page trees
|
|
378
404
|
|
|
@@ -495,7 +521,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
|
|
|
495
521
|
|
|
496
522
|
Table details:
|
|
497
523
|
|
|
498
|
-
- `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, or `
|
|
524
|
+
- `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
|
|
499
525
|
- `status`: lifecycle values (`pending`, `in_progress`, `running`, `completed`, `failed`, `cancelled`, `paused`, `reviewing`, ...) render the dashboard status chip with its icon; other values use `tones` like `badge`.
|
|
500
526
|
- `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: an http(s) URL opening in a new tab (other values render as text).
|
|
501
527
|
- `switch`: a toggle. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the switch is read-only.
|
|
@@ -764,3 +790,17 @@ The tool returns `{ appId, url: "/apps/<id>" }`. Open that URL to verify the liv
|
|
|
764
790
|
- Logged-in browser: a fresh dashboard has no connection and redirects to /setup. Seed the localStorage key `agent-swarm-connections` with `{connections:[{id,name,apiUrl,apiKey}],activeId}`. Build the value from an env var and pipe it to `agent-browser eval --stdin`, so the key never reaches a command line. Reload, then pick a user in the "Who are you?" dialog.
|
|
765
791
|
- Apps scroll inside an inner canvas, so a full-page screenshot captures only the viewport. Scroll the canvas or raise the viewport height. For mobile, set a 375px-wide viewport before the screenshot.
|
|
766
792
|
- App definitions: `GET /api/apps` and `GET /api/apps/<id>` with the API key as Bearer.
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
### Rows from agents and scripts
|
|
796
|
+
|
|
797
|
+
Every row tool requires `appId` and `model`. Scripts use underscore names, such as `ctx.swarm.app_row_create` and `ctx.swarm.app_rows_list`.
|
|
798
|
+
Results use the usual `data` wrapper, so scripts read `res?.data ?? res`. Rows contain system fields and declared columns at the top level.
|
|
799
|
+
Writes record `agent:<agentId>` in `createdBy` and `updatedBy`. Source projections and join keys remain read-only. Each row input must fit within 1 MiB.
|
|
800
|
+
|
|
801
|
+
`app-rows-list` accepts `equals`, `sort: "<column>:asc|desc"`, and `limit` from 1 to 1000 (default 200).
|
|
802
|
+
Equality filters accept declared columns and system columns. Filter values must match the column kind and use strict equality.
|
|
803
|
+
`app-rows-delete` requires at least one equality filter and accepts a limit from 1 to 1000 (default 1000).
|
|
804
|
+
|
|
805
|
+
`app-action-run` returns the REST action body under `data`. Script actions run with the script owner's identity and receive the verified invoking agent as `caller`.
|
|
806
|
+
Scripts and extensions cannot invoke `app-action-run`.
|
|
@@ -13,6 +13,14 @@ Swarm Apps are persistent, agent-authored internal applications: a schema-backed
|
|
|
13
13
|
| `app-upsert` | Create an app, or replace an existing app's entire definition when you intentionally have the full desired state. |
|
|
14
14
|
| `app-patch` | Make a focused change while preserving everything not mentioned in the patch. Prefer this for iteration. |
|
|
15
15
|
| `app-query` | Run one declared named query and return its rows. Use this when an agent or saved script needs to consume app data rather than render the app UI. |
|
|
16
|
+
| `app-rows-list` | List rows with typed equality filters, sorting, and a limit. Returns `{ rows, total }`. |
|
|
17
|
+
| `app-row-get` | Read a row by `rowId`. Returns `{ row }`. |
|
|
18
|
+
| `app-row-create` | Create a row from `values`. Returns `{ row }`. |
|
|
19
|
+
| `app-rows-create` | Create 1 to 500 rows from a `rows: values[]` array, within 10 MiB. Returns `{ rows }`. |
|
|
20
|
+
| `app-row-patch` | Patch a row by `rowId` with `values`. Returns `{ row }`. |
|
|
21
|
+
| `app-row-delete` | Delete a row by `rowId`. Returns `{ ok: true }`. |
|
|
22
|
+
| `app-rows-delete` | Delete matching rows with a non-empty `equals` filter. Returns `{ deleted }`. |
|
|
23
|
+
| `app-action-run` | Run a declared script, task, or sync action with `{ appId, action, input? }`. Agents can invoke it through MCP only. |
|
|
16
24
|
| `app-history` | List definition snapshots and their compact model/column digests before choosing a restore point. |
|
|
17
25
|
| `app-diff` | Show a unified definition diff; defaults to newest snapshot → CURRENT. |
|
|
18
26
|
| `app-rollback` | Restore a snapshot through the normal schema-migration engine. |
|
|
@@ -23,7 +31,24 @@ For every edit: `app-get` -> modify the smallest coherent subtree -> `app-patch`
|
|
|
23
31
|
|
|
24
32
|
### Reading an app's callable surface
|
|
25
33
|
|
|
26
|
-
One `app-get` returns everything needed to drive an app you did not write: `definition.queries` are runnable with `app-query` (supply every `$param` the query references), and `definition.actions` are invocable with `POST /api/apps/<id>/actions/<name>` (a `script` action runs its script, a `task` action spawns a task, a `sync` action refreshes sources). Read
|
|
34
|
+
One `app-get` returns everything needed to drive an app you did not write: `definition.queries` are runnable with `app-query` (supply every `$param` the query references), and `definition.actions` are invocable with `app-action-run` or `POST /api/apps/<id>/actions/<name>` (a `script` action runs its script, a `task` action spawns a task, a `sync` action refreshes sources). Read the query parameters and action arguments from the definition before invocation. Do not guess parameter names.
|
|
35
|
+
|
|
36
|
+
### Verified action caller
|
|
37
|
+
|
|
38
|
+
Script actions receive `caller` as a reserved, server-stamped argument. The server overwrites `caller` from definition defaults and request input.
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
type AppActionCaller = {
|
|
42
|
+
kind: "user" | "agent" | "operator" | "guest";
|
|
43
|
+
id: string | null;
|
|
44
|
+
name?: string;
|
|
45
|
+
pageId?: string;
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The caller identifies the authenticated user or agent. Operator and guest callers have `id: null`. A signed page session adds `pageId`.
|
|
50
|
+
With the swarm key, a registered `X-Agent-ID` produces an agent caller and `agent:<id>` row provenance. Missing or unknown agent IDs remain operator callers.
|
|
51
|
+
Task actions include the same caller as server-verified JSON in the task prompt. Script execution still uses the saved script owner's bindings.
|
|
27
52
|
|
|
28
53
|
### Verified action caller
|
|
29
54
|
|
|
@@ -195,6 +220,7 @@ Each column is `{ "kind": ..., "required"?: boolean, "default"?: ..., "index"?:
|
|
|
195
220
|
| `boolean` | Boolean; set `index: true` only when equality lookups need it. |
|
|
196
221
|
| `date` | ISO-8601 string; never indexed. |
|
|
197
222
|
| `enum` | String from the non-empty unique `enum` list; always indexed, without `index: true`. |
|
|
223
|
+
| `json` | Any JSON value (object, array, nested) up to 256 KB serialized by default (`APPS_JSON_COLUMN_MAX_BYTES`); never indexed, and a named query cannot `filter` or `sort` on it. Not allowed for `userConfig` fields or element props. |
|
|
198
224
|
|
|
199
225
|
`default` must match the column kind (and be one of the enum values). `required: true` rejects missing/null values unless a default supplies the value. `id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy` — and the sync envelope `source`, `syncedAt`, `stale` — are system columns and reserved names. An app created before the sync envelope that declared ordinary columns with these names surfaces `definitionError` after upgrade until they are renamed: patch in a fresh column with a `{from}` migration directive, then purge the old one. Rows always expose `id`/`createdAt`/`updatedAt`; `createdBy`/`updatedBy` record the acting principal (`user:<id>`, `agent:<id>`, `operator`, or `sync:<source>` for engine writes) and are system-managed on every row write.
|
|
200
226
|
|
|
@@ -291,7 +317,7 @@ A named query is:
|
|
|
291
317
|
}
|
|
292
318
|
```
|
|
293
319
|
|
|
294
|
-
`filter` is a strict AND of equality checks. A filter may target a declared model column or a system column (`id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, and on synced models `source`, `syncedAt`, `stale`) — filtering on `id` is the universal way to select one row for a detail view, and `{ "stale": true }` selects rows a complete pull stopped confirming. A literal value must match the column's kind; date filters compare the stored raw ISO string, not parsed instants. Omit `limit` for the default 200 rows, or set an integer from 1 through 1000. `sort.column` is a model column, `createdAt`, `updatedAt`, or `syncedAt`; `dir` is `asc` or `desc`. Query runtime state is `{ data, loading, error }` under `/queries/<queryName>`.
|
|
320
|
+
`filter` is a strict AND of equality checks. A filter may target a declared model column or a system column (`id`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, and on synced models `source`, `syncedAt`, `stale`) — filtering on `id` is the universal way to select one row for a detail view, and `{ "stale": true }` selects rows a complete pull stopped confirming. A literal value must match the column's kind; date filters compare the stored raw ISO string, not parsed instants. Omit `limit` for the default 200 rows, or set an integer from 1 through 1000. `sort.column` is a non-`json` model column, `createdAt`, `updatedAt`, or `syncedAt`; `dir` is `asc` or `desc`. Query runtime state is `{ data, loading, error }` under `/queries/<queryName>`.
|
|
295
321
|
|
|
296
322
|
A filter value may instead be exactly `{ "$param": "<name>" }`. At execution, the caller supplies that name and the server coerces its value to the filtered column's kind before equality matching:
|
|
297
323
|
|
|
@@ -367,7 +393,7 @@ Use a task action named Tackle when a person should hand one issue row to the sw
|
|
|
367
393
|
|
|
368
394
|
For direct MCP calls, `app-query` accepts `{ appId, query, params? }` and returns rows from that declared named query; every supplied param must be referenced by a `$param` filter in that query. Use it when an agent needs to read app state without scraping the UI.
|
|
369
395
|
|
|
370
|
-
Saved scripts use the generated SDK name `ctx.swarm.app_query({ appId, query, params? })`. Use `app_query` in scripts or workflows that turn current app rows into reports, digests, or follow-up work. Saved scripts also get generated per-app types automatically: each app contributes an `App_<Name>` namespace with one row interface per model (enum columns as literal unions) and a typed `app_query` overload per named query, all visible via `script-query-types`. Actions
|
|
396
|
+
Saved scripts use the generated SDK name `ctx.swarm.app_query({ appId, query, params? })`. Use `app_query` in scripts or workflows that turn current app rows into reports, digests, or follow-up work. Saved scripts also get generated per-app types automatically: each app contributes an `App_<Name>` namespace with one row interface per model (enum columns as literal unions) and a typed `app_query` overload per named query, all visible via `script-query-types`. Scripts can create, list, get, patch, and delete rows with the seven row tools. Actions remain REST/MCP-only and have no script SDK method.
|
|
371
397
|
|
|
372
398
|
### Pages, routes, and page trees
|
|
373
399
|
|
|
@@ -490,7 +516,7 @@ Tones: Badge, Metric and Progress `tone` take `neutral`, `success`, `active`, `e
|
|
|
490
516
|
|
|
491
517
|
Table details:
|
|
492
518
|
|
|
493
|
-
- `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, or `
|
|
519
|
+
- `columns[]`: `{ key, label?, kind?, tones?: {value: badgeTone}, width?: number, pinned?: "left" or "right", align?: "start" or "end", truncate?: "end" or "middle", icon?, tooltip?: "<row field>", max?: number, onChange?: chain }`. `kind` is `text`, `string`, `enum`, `number`, `boolean`, `date`, `badge`, `status`, `user`, `agent`, `relative`, `duration`, `progress`, `copy`, `switch`, `link`, or `json`; `string` and `enum` render as text, and `json` renders a truncated single-line `JSON.stringify` preview. Pin id/actions columns so they survive horizontal scroll on narrow viewports.
|
|
494
520
|
- `status`: lifecycle values (`pending`, `in_progress`, `running`, `completed`, `failed`, `cancelled`, `paused`, `reviewing`, ...) render the dashboard status chip with its icon; other values use `tones` like `badge`.
|
|
495
521
|
- `user` / `agent`: avatar plus name. `relative` (and `date`): smart time, exact time on hover. `duration`: milliseconds as `1m 23s`. `progress`: a bar against `max` (default 100). `copy`: the value plus a copy button. `link`: an http(s) URL opening in a new tab (other values render as text).
|
|
496
522
|
- `switch`: a toggle. `onChange` runs with `$row` = the row with this column already set to the new value, e.g. `[{ "action": "app.mutate", "params": { "model": "m", "op": "update", "rowId": { "$row": "id" }, "values": { "enabled": { "$row": "enabled" } } } }]`. Without `onChange` the switch is read-only.
|
|
@@ -759,3 +785,17 @@ The tool returns `{ appId, url: "/apps/<id>" }`. Open that URL to verify the liv
|
|
|
759
785
|
- Logged-in browser: a fresh dashboard has no connection and redirects to /setup. Seed the localStorage key `agent-swarm-connections` with `{connections:[{id,name,apiUrl,apiKey}],activeId}`. Build the value from an env var and pipe it to `agent-browser eval --stdin`, so the key never reaches a command line. Reload, then pick a user in the "Who are you?" dialog.
|
|
760
786
|
- Apps scroll inside an inner canvas, so a full-page screenshot captures only the viewport. Scroll the canvas or raise the viewport height. For mobile, set a 375px-wide viewport before the screenshot.
|
|
761
787
|
- App definitions: `GET /api/apps` and `GET /api/apps/<id>` with the API key as Bearer.
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
### Rows from agents and scripts
|
|
791
|
+
|
|
792
|
+
Every row tool requires `appId` and `model`. Scripts use underscore names, such as `ctx.swarm.app_row_create` and `ctx.swarm.app_rows_list`.
|
|
793
|
+
Results use the usual `data` wrapper, so scripts read `res?.data ?? res`. Rows contain system fields and declared columns at the top level.
|
|
794
|
+
Writes record `agent:<agentId>` in `createdBy` and `updatedBy`. Source projections and join keys remain read-only. Each row input must fit within 1 MiB.
|
|
795
|
+
|
|
796
|
+
`app-rows-list` accepts `equals`, `sort: "<column>:asc|desc"`, and `limit` from 1 to 1000 (default 200).
|
|
797
|
+
Equality filters accept declared columns and system columns. Filter values must match the column kind and use strict equality.
|
|
798
|
+
`app-rows-delete` requires at least one equality filter and accepts a limit from 1 to 1000 (default 1000).
|
|
799
|
+
|
|
800
|
+
`app-action-run` returns the REST action body under `data`. Script actions run with the script owner's identity and receive the verified invoking agent as `caller`.
|
|
801
|
+
Scripts and extensions cannot invoke `app-action-run`.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isUserAllowed2,
|
|
3
|
-
registerMessageHandler2
|
|
4
|
-
} from "./cli-avmqhatn.js";
|
|
5
|
-
import"./cli-1cevz46c.js";
|
|
6
|
-
import"./cli-x1p5dhq2.js";
|
|
7
|
-
import"./cli-x719j3vs.js";
|
|
8
|
-
import"./cli-rdr166ht.js";
|
|
9
|
-
import"./cli-2rwet3r7.js";
|
|
10
|
-
import"./cli-qz93y3x5.js";
|
|
11
|
-
import"./cli-3h26v7yj.js";
|
|
12
|
-
import"./cli-7a91w22y.js";
|
|
13
|
-
import"./cli-ttaz6c7m.js";
|
|
14
|
-
import"./cli-nrrg0fvy.js";
|
|
15
|
-
import"./cli-3ggwdtb0.js";
|
|
16
|
-
import"./cli-b80a1100.js";
|
|
17
|
-
import"./cli-kk2r80n5.js";
|
|
18
|
-
import"./cli-tg9ksbn8.js";
|
|
19
|
-
import"./cli-qje9k2nh.js";
|
|
20
|
-
import"./cli-nme7wery.js";
|
|
21
|
-
import"./cli-tj4j2ts4.js";
|
|
22
|
-
import"./cli-bn26xbcs.js";
|
|
23
|
-
import"./cli-vjfpshn3.js";
|
|
24
|
-
import"./cli-02vhhssk.js";
|
|
25
|
-
import"./cli-13p25grh.js";
|
|
26
|
-
import"./cli-0adyhvq2.js";
|
|
27
|
-
import"./cli-4fhyq711.js";
|
|
28
|
-
import"./cli-xfe63zx3.js";
|
|
29
|
-
import"./cli-6ftrrwm1.js";
|
|
30
|
-
import"./cli-8cxkw1f5.js";
|
|
31
|
-
import"./cli-445c1vp7.js";
|
|
32
|
-
import"./cli-kvzgak7c.js";
|
|
33
|
-
import"./cli-5s5hx57y.js";
|
|
34
|
-
import"./cli-rg7ntypm.js";
|
|
35
|
-
import"./cli-ptkpaqfy.js";
|
|
36
|
-
export {
|
|
37
|
-
isUserAllowed2 as isUserAllowed,
|
|
38
|
-
registerMessageHandler2 as registerMessageHandler
|
|
39
|
-
};
|
package/dist/index-8pwc1jc8.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
calculateNextRun2,
|
|
3
|
-
startScheduler2,
|
|
4
|
-
stopScheduler2,
|
|
5
|
-
runScheduleNow2
|
|
6
|
-
} from "./cli-x719j3vs.js";
|
|
7
|
-
import"./cli-rdr166ht.js";
|
|
8
|
-
import"./cli-2rwet3r7.js";
|
|
9
|
-
import"./cli-qz93y3x5.js";
|
|
10
|
-
import"./cli-3h26v7yj.js";
|
|
11
|
-
import"./cli-7a91w22y.js";
|
|
12
|
-
import"./cli-ttaz6c7m.js";
|
|
13
|
-
import"./cli-nrrg0fvy.js";
|
|
14
|
-
import"./cli-3ggwdtb0.js";
|
|
15
|
-
import"./cli-b80a1100.js";
|
|
16
|
-
import"./cli-kk2r80n5.js";
|
|
17
|
-
import"./cli-tg9ksbn8.js";
|
|
18
|
-
import"./cli-qje9k2nh.js";
|
|
19
|
-
import"./cli-nme7wery.js";
|
|
20
|
-
import"./cli-tj4j2ts4.js";
|
|
21
|
-
import"./cli-bn26xbcs.js";
|
|
22
|
-
import"./cli-vjfpshn3.js";
|
|
23
|
-
import"./cli-02vhhssk.js";
|
|
24
|
-
import"./cli-13p25grh.js";
|
|
25
|
-
import"./cli-0adyhvq2.js";
|
|
26
|
-
import"./cli-4fhyq711.js";
|
|
27
|
-
import"./cli-xfe63zx3.js";
|
|
28
|
-
import"./cli-6ftrrwm1.js";
|
|
29
|
-
import"./cli-8cxkw1f5.js";
|
|
30
|
-
import"./cli-445c1vp7.js";
|
|
31
|
-
import"./cli-kvzgak7c.js";
|
|
32
|
-
import"./cli-5s5hx57y.js";
|
|
33
|
-
import"./cli-rg7ntypm.js";
|
|
34
|
-
import"./cli-ptkpaqfy.js";
|
|
35
|
-
export {
|
|
36
|
-
calculateNextRun2 as calculateNextRun,
|
|
37
|
-
runScheduleNow2 as runScheduleNow,
|
|
38
|
-
startScheduler2 as startScheduler,
|
|
39
|
-
stopScheduler2 as stopScheduler
|
|
40
|
-
};
|
package/dist/index-nxa6me0q.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import"./cli-ns59dc6r.js";
|
|
2
|
-
import {
|
|
3
|
-
startHeartbeat2,
|
|
4
|
-
stopHeartbeat2
|
|
5
|
-
} from "./cli-bhwa8rzc.js";
|
|
6
|
-
import"./cli-rsd7ga7v.js";
|
|
7
|
-
import"./cli-eqgfs202.js";
|
|
8
|
-
import"./cli-x719j3vs.js";
|
|
9
|
-
import"./cli-rdr166ht.js";
|
|
10
|
-
import"./cli-2rwet3r7.js";
|
|
11
|
-
import"./cli-qz93y3x5.js";
|
|
12
|
-
import"./cli-3h26v7yj.js";
|
|
13
|
-
import"./cli-7a91w22y.js";
|
|
14
|
-
import"./cli-ttaz6c7m.js";
|
|
15
|
-
import"./cli-nrrg0fvy.js";
|
|
16
|
-
import"./cli-3ggwdtb0.js";
|
|
17
|
-
import"./cli-b80a1100.js";
|
|
18
|
-
import"./cli-kk2r80n5.js";
|
|
19
|
-
import"./cli-tg9ksbn8.js";
|
|
20
|
-
import"./cli-qje9k2nh.js";
|
|
21
|
-
import"./cli-nme7wery.js";
|
|
22
|
-
import"./cli-tj4j2ts4.js";
|
|
23
|
-
import"./cli-bn26xbcs.js";
|
|
24
|
-
import"./cli-vjfpshn3.js";
|
|
25
|
-
import"./cli-02vhhssk.js";
|
|
26
|
-
import"./cli-13p25grh.js";
|
|
27
|
-
import"./cli-0adyhvq2.js";
|
|
28
|
-
import"./cli-4fhyq711.js";
|
|
29
|
-
import"./cli-xfe63zx3.js";
|
|
30
|
-
import"./cli-6ftrrwm1.js";
|
|
31
|
-
import"./cli-8cxkw1f5.js";
|
|
32
|
-
import"./cli-445c1vp7.js";
|
|
33
|
-
import"./cli-kvzgak7c.js";
|
|
34
|
-
import"./cli-b2mz5mjc.js";
|
|
35
|
-
import"./cli-5s5hx57y.js";
|
|
36
|
-
import"./cli-rg7ntypm.js";
|
|
37
|
-
import"./cli-ptkpaqfy.js";
|
|
38
|
-
export {
|
|
39
|
-
startHeartbeat2 as startHeartbeat,
|
|
40
|
-
stopHeartbeat2 as stopHeartbeat
|
|
41
|
-
};
|
package/dist/lead-td8h2sfn.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import"./cli-qz93y3x5.js";
|
|
2
|
-
import {
|
|
3
|
-
getEnabledCapabilities
|
|
4
|
-
} from "./cli-x719j3vs.js";
|
|
5
|
-
import"./cli-v1sjhn52.js";
|
|
6
|
-
import"./cli-rg7ntypm.js";
|
|
7
|
-
import"./cli-5s5hx57y.js";
|
|
8
|
-
import"./cli-kk2r80n5.js";
|
|
9
|
-
import"./cli-tg9ksbn8.js";
|
|
10
|
-
import"./cli-ttaz6c7m.js";
|
|
11
|
-
import"./cli-2rwet3r7.js";
|
|
12
|
-
import"./cli-nme7wery.js";
|
|
13
|
-
import"./cli-nrrg0fvy.js";
|
|
14
|
-
import"./cli-b80a1100.js";
|
|
15
|
-
import"./cli-3ggwdtb0.js";
|
|
16
|
-
import"./cli-4fhyq711.js";
|
|
17
|
-
import"./cli-xfe63zx3.js";
|
|
18
|
-
import"./cli-tj4j2ts4.js";
|
|
19
|
-
import"./cli-bn26xbcs.js";
|
|
20
|
-
import"./cli-kvzgak7c.js";
|
|
21
|
-
import"./cli-445c1vp7.js";
|
|
22
|
-
import"./cli-vjfpshn3.js";
|
|
23
|
-
import"./cli-ptkpaqfy.js";
|
|
24
|
-
import"./cli-02vhhssk.js";
|
|
25
|
-
import"./cli-7a91w22y.js";
|
|
26
|
-
import"./cli-qje9k2nh.js";
|
|
27
|
-
import"./cli-6ftrrwm1.js";
|
|
28
|
-
import"./cli-3h26v7yj.js";
|
|
29
|
-
import"./cli-rdr166ht.js";
|
|
30
|
-
import"./cli-0xk505e8.js";
|
|
31
|
-
import"./cli-p22zdvnt.js";
|
|
32
|
-
import"./cli-77cd6gy8.js";
|
|
33
|
-
import"./cli-wrv09v7q.js";
|
|
34
|
-
import {
|
|
35
|
-
runAgent
|
|
36
|
-
} from "./cli-ffbrkh1r.js";
|
|
37
|
-
import"./cli-jhp7w1fy.js";
|
|
38
|
-
import"./cli-gx4rm0qx.js";
|
|
39
|
-
import"./cli-a49vpbf3.js";
|
|
40
|
-
import"./cli-jc1g9ndz.js";
|
|
41
|
-
import"./cli-tgvpmnwz.js";
|
|
42
|
-
import"./cli-c8fwpgqb.js";
|
|
43
|
-
import"./cli-sppc0cmw.js";
|
|
44
|
-
import"./cli-c5sbmw1v.js";
|
|
45
|
-
import"./cli-0726awxw.js";
|
|
46
|
-
import"./cli-mvg2hf8p.js";
|
|
47
|
-
import"./cli-kz116kvw.js";
|
|
48
|
-
import"./cli-4bd1rck6.js";
|
|
49
|
-
import"./cli-vbhgkw9h.js";
|
|
50
|
-
import"./cli-er83cjbn.js";
|
|
51
|
-
import"./cli-y83zk5sb.js";
|
|
52
|
-
import"./cli-kr5tjjtz.js";
|
|
53
|
-
import"./cli-bfc3k1x5.js";
|
|
54
|
-
import"./cli-8rwvksbc.js";
|
|
55
|
-
import"./cli-zv4vy2b0.js";
|
|
56
|
-
import"./cli-8b9wvjps.js";
|
|
57
|
-
import"./cli-ecshf504.js";
|
|
58
|
-
import"./cli-dsgj3e7a.js";
|
|
59
|
-
import"./cli-ccn0eybf.js";
|
|
60
|
-
import"./cli-zvze9rbm.js";
|
|
61
|
-
import"./cli-4zsenjhy.js";
|
|
62
|
-
import"./cli-13p25grh.js";
|
|
63
|
-
import"./cli-0adyhvq2.js";
|
|
64
|
-
import"./cli-8cxkw1f5.js";
|
|
65
|
-
|
|
66
|
-
// src/commands/lead.ts
|
|
67
|
-
var leadConfig = {
|
|
68
|
-
role: "lead",
|
|
69
|
-
defaultPrompt: "/start-leader",
|
|
70
|
-
metadataType: "lead_metadata",
|
|
71
|
-
capabilities: getEnabledCapabilities()
|
|
72
|
-
};
|
|
73
|
-
async function runLead(opts) {
|
|
74
|
-
return runAgent(leadConfig, opts);
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
runLead
|
|
78
|
-
};
|
package/dist/worker-wr6xgfr2.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import"./cli-qz93y3x5.js";
|
|
2
|
-
import {
|
|
3
|
-
getEnabledCapabilities
|
|
4
|
-
} from "./cli-x719j3vs.js";
|
|
5
|
-
import"./cli-v1sjhn52.js";
|
|
6
|
-
import"./cli-rg7ntypm.js";
|
|
7
|
-
import"./cli-5s5hx57y.js";
|
|
8
|
-
import"./cli-kk2r80n5.js";
|
|
9
|
-
import"./cli-tg9ksbn8.js";
|
|
10
|
-
import"./cli-ttaz6c7m.js";
|
|
11
|
-
import"./cli-2rwet3r7.js";
|
|
12
|
-
import"./cli-nme7wery.js";
|
|
13
|
-
import"./cli-nrrg0fvy.js";
|
|
14
|
-
import"./cli-b80a1100.js";
|
|
15
|
-
import"./cli-3ggwdtb0.js";
|
|
16
|
-
import"./cli-4fhyq711.js";
|
|
17
|
-
import"./cli-xfe63zx3.js";
|
|
18
|
-
import"./cli-tj4j2ts4.js";
|
|
19
|
-
import"./cli-bn26xbcs.js";
|
|
20
|
-
import"./cli-kvzgak7c.js";
|
|
21
|
-
import"./cli-445c1vp7.js";
|
|
22
|
-
import"./cli-vjfpshn3.js";
|
|
23
|
-
import"./cli-ptkpaqfy.js";
|
|
24
|
-
import"./cli-02vhhssk.js";
|
|
25
|
-
import"./cli-7a91w22y.js";
|
|
26
|
-
import"./cli-qje9k2nh.js";
|
|
27
|
-
import"./cli-6ftrrwm1.js";
|
|
28
|
-
import"./cli-3h26v7yj.js";
|
|
29
|
-
import"./cli-rdr166ht.js";
|
|
30
|
-
import"./cli-0xk505e8.js";
|
|
31
|
-
import"./cli-p22zdvnt.js";
|
|
32
|
-
import"./cli-77cd6gy8.js";
|
|
33
|
-
import"./cli-wrv09v7q.js";
|
|
34
|
-
import {
|
|
35
|
-
runAgent
|
|
36
|
-
} from "./cli-ffbrkh1r.js";
|
|
37
|
-
import"./cli-jhp7w1fy.js";
|
|
38
|
-
import"./cli-gx4rm0qx.js";
|
|
39
|
-
import"./cli-a49vpbf3.js";
|
|
40
|
-
import"./cli-jc1g9ndz.js";
|
|
41
|
-
import"./cli-tgvpmnwz.js";
|
|
42
|
-
import"./cli-c8fwpgqb.js";
|
|
43
|
-
import"./cli-sppc0cmw.js";
|
|
44
|
-
import"./cli-c5sbmw1v.js";
|
|
45
|
-
import"./cli-0726awxw.js";
|
|
46
|
-
import"./cli-mvg2hf8p.js";
|
|
47
|
-
import"./cli-kz116kvw.js";
|
|
48
|
-
import"./cli-4bd1rck6.js";
|
|
49
|
-
import"./cli-vbhgkw9h.js";
|
|
50
|
-
import"./cli-er83cjbn.js";
|
|
51
|
-
import"./cli-y83zk5sb.js";
|
|
52
|
-
import"./cli-kr5tjjtz.js";
|
|
53
|
-
import"./cli-bfc3k1x5.js";
|
|
54
|
-
import"./cli-8rwvksbc.js";
|
|
55
|
-
import"./cli-zv4vy2b0.js";
|
|
56
|
-
import"./cli-8b9wvjps.js";
|
|
57
|
-
import"./cli-ecshf504.js";
|
|
58
|
-
import"./cli-dsgj3e7a.js";
|
|
59
|
-
import"./cli-ccn0eybf.js";
|
|
60
|
-
import"./cli-zvze9rbm.js";
|
|
61
|
-
import"./cli-4zsenjhy.js";
|
|
62
|
-
import"./cli-13p25grh.js";
|
|
63
|
-
import"./cli-0adyhvq2.js";
|
|
64
|
-
import"./cli-8cxkw1f5.js";
|
|
65
|
-
|
|
66
|
-
// src/commands/worker.ts
|
|
67
|
-
var workerConfig = {
|
|
68
|
-
role: "worker",
|
|
69
|
-
defaultPrompt: "/start-worker",
|
|
70
|
-
metadataType: "worker_metadata",
|
|
71
|
-
capabilities: getEnabledCapabilities()
|
|
72
|
-
};
|
|
73
|
-
async function runWorker(opts) {
|
|
74
|
-
return runAgent(workerConfig, opts);
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
runWorker
|
|
78
|
-
};
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import {
|
|
3
|
-
checkRankingEntries,
|
|
4
|
-
type Entry,
|
|
5
|
-
isEntryPath,
|
|
6
|
-
parseEntry,
|
|
7
|
-
type Verification,
|
|
8
|
-
} from "../../scripts/check-ranking-entry";
|
|
9
|
-
|
|
10
|
-
const CLAIM = "rk_3f9a1c0e7b2d4a6f8e1c3b5d7f9a2c4e";
|
|
11
|
-
const OTHER_CLAIM = "rk_00000000000000000000000000000001";
|
|
12
|
-
const file = (domain: string, claim = CLAIM) =>
|
|
13
|
-
JSON.stringify({ $schema: "./schema.json", domain, claim });
|
|
14
|
-
|
|
15
|
-
const VERIFIED: Verification = {
|
|
16
|
-
verified: true,
|
|
17
|
-
reasons: [],
|
|
18
|
-
telemetryActive7d: true,
|
|
19
|
-
websiteMatchesDomain: true,
|
|
20
|
-
listing: {
|
|
21
|
-
name: "Acme",
|
|
22
|
-
domain: "acme.dev",
|
|
23
|
-
category: "engineering",
|
|
24
|
-
subcategory: "qa-testing",
|
|
25
|
-
description: "QA | release automation",
|
|
26
|
-
sourceCodeUrl: null,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
describe("parseEntry", () => {
|
|
31
|
-
test("accepts the opt-in file", () => {
|
|
32
|
-
expect(parseEntry("acme.dev.json", file("acme.dev"))).toEqual({
|
|
33
|
-
domain: "acme.dev",
|
|
34
|
-
claim: CLAIM,
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
test.each([
|
|
39
|
-
["acme.dev.json", "{", "valid JSON"],
|
|
40
|
-
["acme.dev.json", "[]", "JSON object"],
|
|
41
|
-
[
|
|
42
|
-
"acme.dev.json",
|
|
43
|
-
JSON.stringify({ domain: "acme.dev", claim: CLAIM, name: "Acme" }),
|
|
44
|
-
"unknown keys",
|
|
45
|
-
],
|
|
46
|
-
["www.acme.dev.json", file("www.acme.dev"), "bare lowercase hostname"],
|
|
47
|
-
["Acme.ba.json", file("Acme.ba"), "bare lowercase hostname"],
|
|
48
|
-
["other.ba.json", file("acme.dev"), "must be named acme.dev.json"],
|
|
49
|
-
["acme.dev.json", file("acme.dev", "rk_short"), "claim"],
|
|
50
|
-
])("rejects %s %s", (name, text, message) => {
|
|
51
|
-
expect(() => parseEntry(name, text)).toThrow(message);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
test("README and schema are not entries", () => {
|
|
55
|
-
expect(isEntryPath("community/ranking/acme.dev.json")).toBe(true);
|
|
56
|
-
expect(isEntryPath("community/ranking/schema.json")).toBe(false);
|
|
57
|
-
expect(isEntryPath("community/ranking/README.md")).toBe(false);
|
|
58
|
-
expect(isEntryPath("community/ranking/nested/acme.dev.json")).toBe(false);
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
describe("checkRankingEntries", () => {
|
|
63
|
-
const files: Record<string, string> = {
|
|
64
|
-
"community/ranking/acme.dev.json": file("acme.dev"),
|
|
65
|
-
"community/ranking/acme.com.json": file("acme.com", CLAIM),
|
|
66
|
-
};
|
|
67
|
-
const run = (
|
|
68
|
-
paths: string[],
|
|
69
|
-
verify: (entry: Entry) => Promise<Verification>,
|
|
70
|
-
all = ["acme.dev.json"],
|
|
71
|
-
) =>
|
|
72
|
-
checkRankingEntries({
|
|
73
|
-
changes: paths.map((path) => ({ status: "A", path })),
|
|
74
|
-
readEntry: (path) => files[path] ?? "",
|
|
75
|
-
allEntries: all.map((name) => [name, files[`community/ranking/${name}`] ?? ""]),
|
|
76
|
-
verify,
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
test("a verified entry passes and the summary shows the listing", async () => {
|
|
80
|
-
const asked: Entry[] = [];
|
|
81
|
-
const result = await run(["community/ranking/acme.dev.json"], async (entry) => {
|
|
82
|
-
asked.push(entry);
|
|
83
|
-
return VERIFIED;
|
|
84
|
-
});
|
|
85
|
-
expect(result.problems).toEqual([]);
|
|
86
|
-
expect(asked).toEqual([{ domain: "acme.dev", claim: CLAIM }]);
|
|
87
|
-
const summary = result.summary.join("\n");
|
|
88
|
-
expect(summary).toContain("### acme.dev: verified");
|
|
89
|
-
expect(summary).toContain(
|
|
90
|
-
"| Acme | engineering | qa-testing | QA \\| release automation | — |",
|
|
91
|
-
);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
test("an unverified entry fails with the proxy's reasons", async () => {
|
|
95
|
-
const result = await run(["community/ranking/acme.dev.json"], async () => ({
|
|
96
|
-
...VERIFIED,
|
|
97
|
-
verified: false,
|
|
98
|
-
reasons: ["telemetry_inactive_7d"],
|
|
99
|
-
}));
|
|
100
|
-
expect(result.problems).toHaveLength(1);
|
|
101
|
-
expect(result.problems[0]).toContain("telemetry_inactive_7d");
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
test("a proxy error fails without throwing", async () => {
|
|
105
|
-
const result = await run(["community/ranking/acme.dev.json"], async () => {
|
|
106
|
-
throw new Error("the proxy answered 503");
|
|
107
|
-
});
|
|
108
|
-
expect(result.problems[0]).toContain("503");
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
test("a claim shared with another entry fails before verify", async () => {
|
|
112
|
-
let called = false;
|
|
113
|
-
const result = await run(["community/ranking/acme.com.json"], async () => {
|
|
114
|
-
called = true;
|
|
115
|
-
return VERIFIED;
|
|
116
|
-
}, ["acme.dev.json", "acme.com.json"]);
|
|
117
|
-
expect(called).toBe(false);
|
|
118
|
-
expect(result.problems[0]).toContain("acme.dev.json");
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
test("a removal needs no proof, and README edits are ignored", async () => {
|
|
122
|
-
const result = await checkRankingEntries({
|
|
123
|
-
changes: [
|
|
124
|
-
{ status: "D", path: "community/ranking/acme.dev.json" },
|
|
125
|
-
{ status: "M", path: "community/ranking/README.md" },
|
|
126
|
-
],
|
|
127
|
-
readEntry: () => "",
|
|
128
|
-
allEntries: [],
|
|
129
|
-
verify: async () => {
|
|
130
|
-
throw new Error("must not be called");
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
expect(result.problems).toEqual([]);
|
|
134
|
-
expect(result.summary).toEqual(["- Removed `acme.dev.json`."]);
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
test("the claim differs per entry in a valid two-entry PR", async () => {
|
|
138
|
-
files["community/ranking/acme.com.json"] = file("acme.com", OTHER_CLAIM);
|
|
139
|
-
const result = await run(
|
|
140
|
-
["community/ranking/acme.com.json", "community/ranking/acme.dev.json"],
|
|
141
|
-
async () => VERIFIED,
|
|
142
|
-
["acme.dev.json", "acme.com.json"],
|
|
143
|
-
);
|
|
144
|
-
expect(result.problems).toEqual([]);
|
|
145
|
-
});
|
|
146
|
-
});
|