@desplega.ai/agent-swarm 1.164.1 → 1.166.0
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-yzfxn8vj.js +23 -0
- package/dist/{actions-hp2h32dx.js → actions-qz3m692w.js} +24 -28
- package/dist/{amp-adapter-zfd7djyx.js → amp-adapter-j1xbmsqz.js} +7 -7
- package/dist/{app-w2d26h4f.js → app-43vrdmv8.js} +9 -10
- package/dist/{assistant-45pc4en7.js → assistant-ertffmka.js} +25 -29
- package/dist/{boot-reembed-k1q2s4fc.js → boot-reembed-998jtpdg.js} +12 -15
- package/dist/{boot-reembed-6rhcpsjf.js → boot-reembed-s7k7c6v2.js} +13 -15
- package/dist/boot-scrub-sweep-nepsk4t1.js +211 -0
- package/dist/{boot-seeds-ex93edx7.js → boot-seeds-vvzs1zhk.js} +12 -12
- package/dist/{claude-adapter-hcxd0szm.js → claude-adapter-2zvmekrp.js} +15 -17
- package/dist/{claude-managed-adapter-fz7xps2r.js → claude-managed-adapter-s49wbk8t.js} +5 -5
- package/dist/{claude-managed-setup-xx6f15h9.js → claude-managed-setup-cvhqq8qn.js} +4 -4
- package/dist/{claude-sdk-session-6nb9raem.js → claude-sdk-session-kkbxtw5q.js} +2624 -2606
- package/dist/{cli-etbrt8x1.js → cli-0nhdwxd5.js} +4 -4
- package/dist/{cli-jeefgppq.js → cli-0qjcsxgz.js} +7 -7
- package/dist/{cli-6behs2bt.js → cli-32bca7nr.js} +1 -1
- package/dist/{cli-gt8v96qx.js → cli-3ddybbbx.js} +4 -4
- package/dist/{acp-adapter-rxvek4ym.js → cli-3qn4r334.js} +317 -35
- package/dist/{cli-1d3w4xm3.js → cli-4r1sjfc4.js} +14 -6
- package/dist/{cli-691f2rxm.js → cli-66zh26sp.js} +68 -16
- package/dist/{cli-et8wdyqh.js → cli-68r1j4sg.js} +9 -9
- package/dist/{cli-xb7kyanp.js → cli-8kgvmkak.js} +3 -3
- package/dist/{cli-fdpkw8vk.js → cli-8t229cmr.js} +8 -8
- package/dist/{cli-gc54qc0p.js → cli-aqcey741.js} +1 -1
- package/dist/{cli-4q4cmr4t.js → cli-cpfmqz3n.js} +8 -8
- package/dist/{cli-a9bw0xxt.js → cli-df56tqdw.js} +997 -408
- package/dist/{cli-n7h1kqpf.js → cli-dmtrxqhg.js} +6 -1
- package/dist/{cli-xfb7333f.js → cli-dw2q9f7g.js} +5 -5
- package/dist/{cli-4drstbb9.js → cli-ecknp7p1.js} +81 -23
- package/dist/{cli-v0pvvhfq.js → cli-efnd2kce.js} +36 -1
- package/dist/{cli-1wetf34q.js → cli-f2n17zhp.js} +1 -1
- package/dist/{cli-2c8eky5y.js → cli-feh3dkah.js} +1 -1
- package/dist/cli-fn697bnt.js +126 -0
- package/dist/{cli-v5pr2fgt.js → cli-gt8azyet.js} +3 -3
- package/dist/{cli-dbszf3rw.js → cli-h3x613ze.js} +4 -4
- package/dist/{cli-nwhb8y2e.js → cli-hf5s9pgf.js} +1 -1
- package/dist/cli-j2jbr8af.js +516 -0
- package/dist/{cli-agjzafns.js → cli-jhm6hzjn.js} +593 -10
- package/dist/{cli-j0tmc908.js → cli-jvj6a0cv.js} +484 -477
- package/dist/{cli-xxz89c2n.js → cli-mb75wpxf.js} +1 -1
- package/dist/{cli-07s39g1n.js → cli-mv2520nm.js} +1 -1
- package/dist/{cli-v90vfwyb.js → cli-mwegs4af.js} +5 -5
- package/dist/{cli-bz1gbac9.js → cli-p4ztb80h.js} +2 -2
- package/dist/{cli-1wd1n2ya.js → cli-rfphkzh5.js} +1 -1
- package/dist/{cli-976r1zqx.js → cli-rggdq8wq.js} +5 -5
- package/dist/{cli-3ajw5v5v.js → cli-rsy933yz.js} +6 -6
- package/dist/{cli-yj790e19.js → cli-tadfgd0t.js} +8 -1
- package/dist/{cli-cn53e7vc.js → cli-ttbsse3f.js} +6 -1
- package/dist/{cli-dyqsrqcf.js → cli-v2a8x45d.js} +4 -4
- package/dist/{cli-wbvnn6tk.js → cli-v6vv7dy8.js} +91 -9
- package/dist/{cli-z2ap2c0c.js → cli-vzc73wet.js} +90 -55
- package/dist/cli-wt7ccy4r.js +2654 -0
- package/dist/{cli-4cn19jvn.js → cli-x7kpr72a.js} +3 -3
- package/dist/{cli-003785v9.js → cli-xvc3q9br.js} +1 -1
- package/dist/{cli-v0e7jpr5.js → cli-xvdgasgy.js} +13 -4
- package/dist/{cli-asqeg4ve.js → cli-y59h2pk9.js} +2 -2
- package/dist/{cli-0wn3ypqv.js → cli-yshaazs1.js} +14121 -3478
- package/dist/{cli-wg8yjqtw.js → cli-ysnyhws9.js} +16 -3
- package/dist/cli-zp67qg5x.js +92 -0
- package/dist/{cli-g3qgrzck.js → cli-zsh093hk.js} +71 -3
- package/dist/{cli-ma3zvh39.js → cli-zy7vwsne.js} +6066 -5829
- package/dist/cli.js +79 -26
- package/dist/{codex-adapter-pcxdn10v.js → codex-adapter-dw1wxqt8.js} +10 -10
- package/dist/{codex-hook-b1fb7c2k.js → codex-hook-d2rkvf39.js} +1 -1
- package/dist/{codex-login-059nm145.js → codex-login-terbdsqq.js} +2 -2
- package/dist/{codex-session-runner-xzwwddp8.js → codex-session-runner-3cgb8y1g.js} +10 -10
- package/dist/{commands-98at8mkn.js → commands-mhxam6z2.js} +9 -9
- package/dist/{cursor-adapter-dkg6qnkp.js → cursor-adapter-2qda3st7.js} +6 -6
- package/dist/{db-01g8wtvw.js → db-sjks418k.js} +11 -9
- package/dist/{devin-adapter-qmttt2fz.js → devin-adapter-bffjj5n4.js} +2 -2
- package/dist/{dispatcher-nn2k1wxd.js → dispatcher-1es759rn.js} +22 -26
- package/dist/{dsh-adapter-w4d4vwdq.js → dsh-adapter-bek4cyw9.js} +6 -6
- package/dist/{e2b-9e4g2hvt.js → e2b-nd50eccg.js} +1 -1
- package/dist/{event-bus-z7v2t26e.js → event-bus-vnfthafg.js} +2 -2
- package/dist/grok-adapter-ar9cw9jg.js +29 -0
- package/dist/{handlers-b0kqsbg8.js → handlers-1gkbhktr.js} +25 -29
- package/dist/{hook-sap7v1aj.js → hook-ds2zxq9v.js} +16 -18
- package/dist/{hook-pz50gqep.js → hook-vxa3tcsy.js} +10 -12
- package/dist/{http-ncr8rmd0.js → http-3h21z9md.js} +679 -227
- package/dist/{index-c4aqcyz1.js → index-9b65j1m5.js} +11 -11
- package/dist/{index-r46s01nq.js → index-bn6cy8ps.js} +22 -26
- package/dist/{index-38kqdt3e.js → index-dkfxpkmm.js} +23 -27
- package/dist/{index-630kj5vd.js → index-f8xnqrye.js} +55 -43
- package/dist/{index-fdk1t4d6.js → index-n0rxa4ca.js} +11962 -9900
- package/dist/{index-9nrj7797.js → index-n99fycq7.js} +22 -26
- package/dist/{keepalive-31613r2h.js → keepalive-3xspa9jw.js} +14 -11
- package/dist/{lead-mx59tr5s.js → lead-6qphc124.js} +43 -43
- package/dist/{maintenance-55ff39ca.js → maintenance-0teem1bb.js} +10 -12
- package/dist/{node-f0ykebbv.js → node-9sg7ajby.js} +25 -7
- package/dist/{oauth-refresh-sweep-anma954w.js → oauth-refresh-sweep-sh9q25xp.js} +13 -10
- package/dist/{onboard-b2fy8ftb.js → onboard-54qmnqxe.js} +4 -3
- package/dist/{opencode-adapter-p1s92tmy.js → opencode-adapter-wjfa2wvd.js} +6 -6
- package/dist/{otel-impl-9brvt7xv.js → otel-impl-ycqzp2a1.js} +2 -2
- package/dist/{pi-mono-adapter-kz4rrwvd.js → pi-mono-adapter-e77e9zst.js} +6 -6
- package/dist/{pricing-refresh-7w8mbmva.js → pricing-refresh-atnkngqs.js} +10 -10
- package/dist/{rbac-roles-ejp7qwvb.js → rbac-roles-9pjphh9q.js} +10 -10
- package/dist/{rbac-roles-nhk4r7bc.js → rbac-roles-j78wdksm.js} +10 -10
- package/dist/{render-v2-2gzt8skq.js → render-v2-pxjs49fx.js} +9 -10
- package/dist/{setup-5et8t412.js → setup-ymej0xtx.js} +2 -2
- package/dist/{work-objects-tb0er7qa.js → work-objects-3nh4ymzb.js} +26 -30
- package/dist/{worker-62cv075d.js → worker-qa9fkz5s.js} +43 -43
- package/dist/{x-vbxb31jr.js → x-ma4gnfgy.js} +2 -2
- package/openapi.json +457 -31
- package/package.json +14 -6
- package/plugin/commands/create-pr.md +7 -1
- package/plugin/pi-skills/create-pr/SKILL.md +7 -1
- package/src/agentmail/app.ts +5 -4
- package/src/be/automation-preflight.ts +11 -9
- package/src/be/boot-scrub-sweep.ts +302 -0
- package/src/be/connector-codes.ts +81 -0
- package/src/be/crypto/key-bootstrap.ts +1 -1
- package/src/be/db/approvals.ts +15 -1
- package/src/be/db/codex-oauth-device-flows.ts +40 -0
- package/src/be/db/config-secrets.ts +31 -0
- package/src/be/db/runtime.ts +4 -0
- package/src/be/db/script-runs.ts +15 -0
- package/src/be/db/tasks/write.ts +1 -1
- package/src/be/db-queries/mcp-oauth.ts +5 -0
- package/src/be/db-queries/oauth.ts +77 -0
- package/src/be/db.ts +162 -59
- package/src/be/events.ts +17 -1
- package/src/be/memory/index-content.ts +2 -2
- package/src/be/memory/providers/sqlite-store.ts +63 -11
- package/src/be/memory/types.ts +14 -0
- package/src/be/migrations/197_connector_codes.sql +23 -0
- package/src/be/migrations/198_permission_audit_guest.sql +33 -0
- package/src/be/migrations/200_backfill_auto_memory_expiry.sql +20 -0
- package/src/be/migrations/201_workflow_replay_columns.sql +10 -0
- package/src/be/migrations/202_codex_oauth_device_flows.sql +24 -0
- package/src/be/model-tier-resolution.ts +2 -1
- package/src/be/model-validation.ts +1 -1
- package/src/be/pricing-normalize.ts +3 -0
- package/src/be/rbac-audit.ts +2 -1
- package/src/be/scripts/db.ts +28 -4
- package/src/be/scripts/source-secrets.ts +37 -0
- package/src/be/scripts/typecheck.ts +23 -2
- package/src/be/scrub-json.ts +32 -0
- package/src/be/sealed-json.ts +59 -0
- package/src/be/secret-registry.ts +131 -0
- package/src/be/seed-pricing.ts +14 -0
- package/src/be/users.ts +7 -1
- package/src/be/workflow-replay.ts +77 -0
- package/src/cli.tsx +7 -0
- package/src/commands/provider-credentials.ts +46 -8
- package/src/commands/runner.ts +2 -10
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/github/app.ts +4 -4
- package/src/heartbeat/heartbeat.ts +20 -8
- package/src/hooks/pr-body-guard.ts +1 -1
- package/src/http/agents.ts +1 -0
- package/src/http/approval-requests.ts +1 -0
- package/src/http/apps.ts +3 -0
- package/src/http/auth.ts +4 -1
- package/src/http/codex-oauth-device.ts +8 -10
- package/src/http/codex-oauth-keep-warm.ts +2 -2
- package/src/http/config-values.ts +59 -0
- package/src/http/config.ts +5 -0
- package/src/http/db-query-bounded.ts +3 -0
- package/src/http/db-query-shared.ts +107 -15
- package/src/http/db-query.ts +10 -2
- package/src/http/extensions.ts +1 -0
- package/src/http/index.ts +23 -6
- package/src/http/integrations.ts +1 -38
- package/src/http/ip-rate-limit.ts +82 -0
- package/src/http/kv.ts +38 -4
- package/src/http/mcp-servers.ts +1 -0
- package/src/http/memory.ts +9 -0
- package/src/http/models-catalog.ts +2 -0
- package/src/http/operator-actor.ts +4 -0
- package/src/http/page-proxy.ts +22 -0
- package/src/http/pages.ts +4 -2
- package/src/http/realtime.ts +1 -1
- package/src/http/request-principal.ts +14 -1
- package/src/http/script-connections.ts +8 -0
- package/src/http/script-runs.ts +12 -4
- package/src/http/scripts.ts +15 -0
- package/src/http/session-cost-recompute.ts +3 -2
- package/src/http/tasks.ts +9 -0
- package/src/http/users.ts +226 -0
- package/src/http/workflows.ts +3 -2
- package/src/http.ts +1 -0
- package/src/integrations/kapso/client.ts +3 -1
- package/src/jira/app.ts +2 -2
- package/src/kv-view.ts +324 -0
- package/src/linear/app.ts +2 -2
- package/src/oauth/mcp-wrapper.ts +1 -1
- package/src/prompts/memories.ts +42 -1
- package/src/providers/acp-adapter.ts +85 -24
- package/src/providers/acp-target-catalog.ts +54 -1
- package/src/providers/acp-targets.ts +358 -4
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/cursor-adapter.ts +1 -1
- package/src/providers/grok-adapter.ts +186 -0
- package/src/providers/index.ts +5 -1
- package/src/providers/pricing-sources.md +6 -0
- package/src/providers/reasoning-effort.ts +17 -1
- package/src/providers/types.ts +2 -1
- package/src/rbac/can.ts +4 -3
- package/src/rbac/legacy-policy.ts +3 -3
- package/src/rbac/types.ts +6 -0
- package/src/script-workflows/supervisor.ts +11 -2
- package/src/scripts-runtime/eval-harness.ts +2 -12
- package/src/scripts-runtime/executors/quickjs-bundle.ts +152 -0
- package/src/scripts-runtime/executors/quickjs-prelude.ts +285 -0
- package/src/scripts-runtime/executors/quickjs-runner.ts +580 -0
- package/src/scripts-runtime/executors/quickjs-worker.ts +81 -0
- package/src/scripts-runtime/executors/quickjs.ts +196 -0
- package/src/scripts-runtime/executors/registry.ts +2 -0
- package/src/scripts-runtime/executors/sourcemap.ts +79 -0
- package/src/scripts-runtime/script-error-hints.ts +14 -0
- package/src/scripts-runtime/swarm-sdk.ts +9 -2
- package/src/scripts-runtime/types/stdlib.d.ts +27 -8
- package/src/scripts-runtime/types/swarm-extension.d.ts +3 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +27 -8
- package/src/server-user.ts +2 -20
- package/src/server.ts +3 -1
- package/src/slack/app.ts +4 -0
- package/src/slack/config.ts +3 -1
- package/src/slack/egress-scrub.ts +87 -0
- package/src/tests/acp-adapter.test.ts +191 -2
- package/src/tests/boot-scrub-sweep.test.ts +390 -0
- package/src/tests/budget-user-scope.test.ts +7 -21
- package/src/tests/check-pr-body.test.ts +149 -6
- package/src/tests/check-text-columns.test.ts +145 -0
- package/src/tests/claude-adapter-binary.test.ts +1 -1
- package/src/tests/claude-sdk-process.fixture.ts +13 -2
- package/src/tests/codex-oauth-device.test.ts +23 -37
- package/src/tests/codex-oauth-keep-warm.test.ts +29 -0
- package/src/tests/console-scrub.test.ts +141 -0
- package/src/tests/credential-check.test.ts +90 -0
- package/src/tests/db-query-denylist.test.ts +202 -0
- package/src/tests/db-task-read-contract.test.ts +1 -0
- package/src/tests/db-task-write-contract.test.ts +1 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/entrypoint-acp-target-binary.test.ts +44 -1
- package/src/tests/events-scrub.test.ts +88 -0
- package/src/tests/explicit-model-validation.test.ts +81 -0
- package/src/tests/extensions-pre-task.test.ts +33 -1
- package/src/tests/fixtures/grok/acp-updates-recorded.jsonl +53 -0
- package/src/tests/fixtures/grok/prompt-response-meta.json +36 -0
- package/src/tests/fixtures/secret-corpus.ts +320 -0
- package/src/tests/grok-adapter.test.ts +647 -0
- package/src/tests/heartbeat-checklist.test.ts +44 -0
- package/src/tests/integration-disable-flags.test.ts +156 -0
- package/src/tests/kv-http.test.ts +34 -0
- package/src/tests/kv-tool.test.ts +274 -1
- package/src/tests/kv-view.test.ts +147 -0
- package/src/tests/mcp-user-route.test.ts +257 -15
- package/src/tests/memory-injection-outcome.test.ts +143 -0
- package/src/tests/model-tier-resolution.test.ts +76 -3
- package/src/tests/page-guest-session.test.ts +424 -0
- package/src/tests/page-proxy.test.ts +1 -1
- package/src/tests/page-viewer-auth.test.ts +22 -1
- package/src/tests/pr-body-leaks.test.ts +157 -2
- package/src/tests/preload.ts +10 -0
- package/src/tests/provider-registration.test.ts +3 -1
- package/src/tests/rbac-audit.test.ts +32 -0
- package/src/tests/rbac-mcp-admission-e2e.test.ts +4 -62
- package/src/tests/script-connections.test.ts +9 -0
- package/src/tests/script-executor-conformance.test.ts +3 -0
- package/src/tests/script-executor-quickjs.test.ts +442 -0
- package/src/tests/script-executor-registry.test.ts +6 -1
- package/src/tests/script-runs-http.test.ts +126 -1
- package/src/tests/script-runs-scrub.test.ts +275 -0
- package/src/tests/scripts-http.test.ts +82 -1
- package/src/tests/scripts-mcp-e2e.test.ts +42 -6
- package/src/tests/scripts-runtime.test.ts +37 -0
- package/src/tests/scrubbed-text-12e.test.ts +289 -0
- package/src/tests/sealed-key-guard.test.ts +166 -0
- package/src/tests/secret-canary-sweep.test.ts +958 -0
- package/src/tests/secret-registry.test.ts +355 -0
- package/src/tests/secret-rules.test.ts +230 -0
- package/src/tests/secret-scrubber.test.ts +317 -1
- package/src/tests/session-costs-golden.test.ts +17 -0
- package/src/tests/slack-egress-scrub.test.ts +216 -0
- package/src/tests/swarm-tool-result-gate.test.ts +143 -30
- package/src/tests/task-tools-ctx.test.ts +3 -0
- package/src/tests/user-token-routes.test.ts +342 -3
- package/src/tests/workflow-replay.test.ts +518 -0
- package/src/tests/workflow-scrub.test.ts +242 -0
- package/src/tests/workflow-system-one-decision-providers.test.ts +737 -0
- package/src/tools/db-query.ts +1 -1
- package/src/tools/inject-learning.ts +1 -1
- package/src/tools/kv/kv-get.ts +136 -6
- package/src/tools/send-task.ts +61 -17
- package/src/tools/utils.ts +186 -43
- package/src/tools/workflows/get-workflow-run.ts +3 -2
- package/src/types.ts +16 -1
- package/src/utils/console-scrub-install.ts +5 -0
- package/src/utils/console-scrub.ts +57 -0
- package/src/utils/credentials.ts +8 -0
- package/src/utils/page-session.ts +6 -2
- package/src/utils/pr-body-leaks.ts +149 -10
- package/src/utils/request-auth-context.ts +2 -0
- package/src/utils/secret-rules.generated.ts +2055 -0
- package/src/utils/secret-scrubber.ts +662 -36
- package/src/workflows/engine.ts +39 -4
- package/src/workflows/executors/notify.ts +6 -1
- package/src/workflows/executors/system-one-decision.ts +31 -12
- package/src/workflows/executors/system-one-openai-wire.ts +168 -0
- package/src/workflows/executors/system-one-providers.ts +112 -11
- package/src/workflows/executors/system-one-wire.ts +79 -0
- package/src/workflows/recovery.ts +10 -1
- package/src/workflows/resume.ts +62 -3
- package/src/workflows/retry-poller.ts +3 -0
- package/templates/ai-toolbox.manifest.json +2 -2
- package/templates/skills/agent-browser/SKILL.md +5 -5
- package/templates/skills/agent-browser/config.json +1 -1
- package/templates/skills/agent-browser/content.md +4 -4
- package/templates/skills/artifacts/content.md +17 -7
- package/templates/skills/jira-interaction/config.json +1 -1
- package/templates/skills/jira-interaction/content.md +56 -205
- package/templates/skills/linear-interaction/config.json +1 -1
- package/templates/skills/linear-interaction/content.md +31 -50
- package/templates/skills/pages/content.md +8 -4
- package/templates/skills/qa/content.md +2 -2
- package/templates/skills/workflow-iterate/content.md +4 -4
- package/tsconfig.json +3 -3
- package/dist/boot-scrub-logs-t8xg7wd7.js +0 -99
- package/dist/cli-0a7r5331.js +0 -168
- package/dist/cli-93rxw9yd.js +0 -951
- package/dist/cli-cvk6yzw5.js +0 -40
- package/dist/cli-dgnj0zcc.js +0 -40
- package/dist/cli-qt5wzq6v.js +0 -256
- package/dist/cli-v7fqehqd.js +0 -9281
- package/dist/cli-vbr859rz.js +0 -572
- package/src/be/boot-scrub-logs.ts +0 -132
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{"title":"List swarm agents via get-swarm MCP","sessionUpdate":"session_info_update"}
|
|
2
|
+
{"content":{"text":"I need to use the agent-swarm","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
3
|
+
{"content":{"text":" MCP tool get-swarm ","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
4
|
+
{"content":{"text":"to list the agents in","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
5
|
+
{"content":{"text":" this swarm.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
6
|
+
{"content":{"text":"\n\nThe swarm MCP server","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
7
|
+
{"content":{"text":" is still connecting. I cannot use the get-swarm tool yet.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
8
|
+
{"toolCallId":"call-b49d82b0-719a-4c2e-9dd6-674c104c1852-0","title":"search_tool","rawInput":{"query":"get-swarm","limit":5},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call"}
|
|
9
|
+
{"toolCallId":"call-b49d82b0-719a-4c2e-9dd6-674c104c1852-0","kind":"other","title":"Search tools: \"get-swarm\"","locations":[],"rawInput":{"variant":"SearchTool","query":"get-swarm","limit":5},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call_update"}
|
|
10
|
+
{"toolCallId":"call-b49d82b0-719a-4c2e-9dd6-674c104c1852-0","status":"completed","content":[{"content":{"text":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__get-swarm\",\n \"description\": \"Returns a list of agents in the swarm without their tasks. Identity markdown (claudeMd/soulMd/identityMd/toolsMd/heartbeatMd/setupScript) is omitted by default — pass includeFull:true to include it.\",\n \"score\": 1.0,\n \"input_schema\": {\n …[trimmed]","type":"text"},"type":"content"}],"rawOutput":{"type":"SearchTool","result_count":1,"content":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__get-swarm\",\n \"description\": \"Returns a list of agents in the swarm without their tasks. Identity markdown (claudeMd/soulMd/identityMd/toolsMd/heartbeatMd/setupScript) is omitted by default — pass includeFull:true to include it.\",\n \"score\": 1.0,\n \"input_schema\": {\n …[trimmed]"},"sessionUpdate":"tool_call_update"}
|
|
11
|
+
{"content":{"text":"I will use the agent-swarm","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
12
|
+
{"content":{"text":" MCP tool get-swarm ","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
13
|
+
{"content":{"text":"to list the agents in","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
14
|
+
{"content":{"text":" this swarm.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
15
|
+
{"content":{"text":"\n\nI located the `swarm__get-swarm`","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
16
|
+
{"content":{"text":" tool and retrieved ","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
17
|
+
{"content":{"text":"its schema. It includes","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
18
|
+
{"content":{"text":" an `a` parameter and","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
19
|
+
{"content":{"text":" an `includeFull` boolean.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
20
|
+
{"content":{"text":"\n\nThe tool returns agent names without their tasks. I will call it with the full name `swarm__get-swarm`.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
21
|
+
{"toolCallId":"call-ff683c2b-000e-4932-9fdf-ffcff67cc8c4-1","title":"search_tool","rawInput":{"query":"swarm__get-swarm","limit":3},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call"}
|
|
22
|
+
{"toolCallId":"call-ff683c2b-000e-4932-9fdf-ffcff67cc8c4-1","kind":"other","title":"Search tools: \"swarm__get-swarm\"","locations":[],"rawInput":{"variant":"SearchTool","query":"swarm__get-swarm","limit":3},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call_update"}
|
|
23
|
+
{"toolCallId":"call-ff683c2b-000e-4932-9fdf-ffcff67cc8c4-1","status":"completed","content":[{"content":{"text":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__get-swarm\",\n \"description\": \"Returns a list of agents in the swarm without their tasks. Identity markdown (claudeMd/soulMd/identityMd/toolsMd/heartbeatMd/setupScript) is omitted by default — pass includeFull:true to include it.\",\n \"score\": 1.0,\n \"input_schema\": {\n …[trimmed]","type":"text"},"type":"content"}],"rawOutput":{"type":"SearchTool","result_count":1,"content":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__get-swarm\",\n \"description\": \"Returns a list of agents in the swarm without their tasks. Identity markdown (claudeMd/soulMd/identityMd/toolsMd/heartbeatMd/setupScript) is omitted by default — pass includeFull:true to include it.\",\n \"score\": 1.0,\n \"input_schema\": {\n …[trimmed]"},"sessionUpdate":"tool_call_update"}
|
|
24
|
+
{"toolCallId":"call-704f508e-5927-48d0-82e9-ffd8a8395e59-2","title":"use_tool","rawInput":{"tool_name":"swarm__get-swarm","tool_input":{}},"_meta":{"x.ai/tool":{"version":1,"name":"use_tool","kind":"use_tool","namespace":"grok_build","label":"Use Tool","read_only":false}},"sessionUpdate":"tool_call"}
|
|
25
|
+
{"toolCallId":"call-704f508e-5927-48d0-82e9-ffd8a8395e59-2","kind":"other","title":"swarm__get-swarm","locations":[],"rawInput":{"variant":"UseTool","tool_name":"swarm__get-swarm","tool_input":{}},"_meta":{"x.ai/tool":{"version":1,"name":"use_tool","kind":"use_tool","namespace":"grok_build","label":"Use Tool","read_only":false}},"sessionUpdate":"tool_call_update"}
|
|
26
|
+
{"toolCallId":"call-704f508e-5927-48d0-82e9-ffd8a8395e59-2","status":"completed","rawOutput":{"type":"MCP","tool_name":"get-swarm","server_name":"swarm","output":{"OkayOutput":"Found 1 agent(s) in the swarm. Requested by session: b2b617ab-50d6-4923-b360-abad5ef26478\n\n- grok-worker (busy) — id: agent-1\n{\"yourAgentId\":\"agent-1\",\"agents\":[{\"id\":\"agent-1\",\"name\":\"grok-worker\",\"isLead\":false,\"status\":\"busy\",\"capabilities\":[],\"maxTasks\":1,\"emptyPollCount\":0,\"provider\":\"grok\",\"harnessProvider\":\"grok\",\"createdAt\":\"2026-10-07T17:05:51.141Z\",\"lastUpdatedAt\":\"2026-10-07T17:07:33.83…[trimmed]"}},"sessionUpdate":"tool_call_update"}
|
|
27
|
+
{"content":{"text":"I need to use the agent-swarm","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
28
|
+
{"content":{"text":" MCP tool get-swarm ","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
29
|
+
{"content":{"text":"to list the agents in","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
30
|
+
{"content":{"text":" this swarm.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
31
|
+
{"toolCallId":"call-b0a44d16-3ba0-4e88-9ceb-2e2969d4adf1-3","title":"search_tool","rawInput":{"query":"store-progress","limit":5},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call"}
|
|
32
|
+
{"toolCallId":"call-b0a44d16-3ba0-4e88-9ceb-2e2969d4adf1-3","kind":"other","title":"Search tools: \"store-progress\"","locations":[],"rawInput":{"variant":"SearchTool","query":"store-progress","limit":5},"_meta":{"x.ai/tool":{"version":1,"name":"search_tool","kind":"search_tool","namespace":"grok_build","label":"Search Tools","read_only":false}},"sessionUpdate":"tool_call_update"}
|
|
33
|
+
{"toolCallId":"call-b0a44d16-3ba0-4e88-9ceb-2e2969d4adf1-3","status":"completed","content":[{"content":{"text":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__store-progress\",\n \"description\": \"Stores the progress of a specific task. Can also mark task as completed or failed, which will set the agent back to idle.\",\n \"score\": 1.0,\n \"input_schema\": {\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n …[trimmed]","type":"text"},"type":"content"}],"rawOutput":{"type":"SearchTool","result_count":1,"content":"{\n \"results\": [\n {\n \"server\": \"swarm\",\n \"tools\": [\n {\n \"tool_name\": \"swarm__store-progress\",\n \"description\": \"Stores the progress of a specific task. Can also mark task as completed or failed, which will set the agent back to idle.\",\n \"score\": 1.0,\n \"input_schema\": {\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n …[trimmed]"},"sessionUpdate":"tool_call_update"}
|
|
34
|
+
{"content":{"text":"I will use the agent-swarm","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
35
|
+
{"content":{"text":" MCP tool get-swarm ","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
36
|
+
{"content":{"text":"to list the agents in","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
37
|
+
{"content":{"text":" this swarm.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
38
|
+
{"content":{"text":"\n\nThe swarm contains","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
39
|
+
{"content":{"text":" 1 agent: grok-worker.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
40
|
+
{"content":{"text":" I will reply with that","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
41
|
+
{"content":{"text":" count and name, then","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
42
|
+
{"content":{"text":" mark the task as completed.","type":"text"},"sessionUpdate":"agent_thought_chunk"}
|
|
43
|
+
{"toolCallId":"call-01d44fe9-c8a4-4ca8-a3b7-c40cf2f53e03-4","title":"use_tool","rawInput":{"tool_name":"swarm__store-progress","tool_input":{"taskId":"task-1","status":"completed","output":"1: grok-worker"}},"_meta":{"x.ai/tool":{"version":1,"name":"use_tool","kind":"use_tool","namespace":"grok_build","label":"Use Tool","read_only":false}},"sessionUpdate":"tool_call"}
|
|
44
|
+
{"toolCallId":"call-01d44fe9-c8a4-4ca8-a3b7-c40cf2f53e03-4","kind":"other","title":"swarm__store-progress","locations":[],"rawInput":{"variant":"UseTool","tool_name":"swarm__store-progress","tool_input":{"taskId":"task-1","status":"completed","output":"1: grok-worker"}},"_meta":{"x.ai/tool":{"version":1,"name":"use_tool","kind":"use_tool","namespace":"grok_build","label":"Use Tool","read_only":false}},"sessionUpdate":"tool_call_update"}
|
|
45
|
+
{"toolCallId":"call-01d44fe9-c8a4-4ca8-a3b7-c40cf2f53e03-4","status":"completed","rawOutput":{"type":"MCP","tool_name":"store-progress","server_name":"swarm","output":{"OkayOutput":"Task \"task-1\" marked as completed.\n\n{\n \"yourAgentId\": \"agent-1\",\n \"task\": {\n \"id\": \"task-1\",\n \"status\": \"completed\",\n \"finishedAt\": \"2026-10-07T17:07:40.097Z\"\n }\n}\n{\"yourAgentId\":\"agent-1\",\"task\":{\"id\":\"task-1\",\"status\":\"completed\",\"finishedAt\":\"2026-10-07T17:07:40.097Z\"},\"success\":true,\"message\":\"Task \\\"task-1\\\" marked as completed.\"}"}},"sessionUpdate":"tool_call_update"}
|
|
46
|
+
{"content":{"text":"1","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
47
|
+
{"content":{"text":":","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
48
|
+
{"content":{"text":" gro","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
49
|
+
{"content":{"text":"k","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
50
|
+
{"content":{"text":"-e","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
51
|
+
{"content":{"text":"2","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
52
|
+
{"content":{"text":"e","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
53
|
+
{"content":{"text":"-worker","type":"text"},"sessionUpdate":"agent_message_chunk"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sessionId": "redacted",
|
|
3
|
+
"requestId": "redacted",
|
|
4
|
+
"promptId": "redacted",
|
|
5
|
+
"totalTokens": 25028,
|
|
6
|
+
"modelId": "grok-build-0.1",
|
|
7
|
+
"inputTokens": 24929,
|
|
8
|
+
"outputTokens": 8,
|
|
9
|
+
"cachedReadTokens": 24576,
|
|
10
|
+
"reasoningTokens": 91,
|
|
11
|
+
"usage": {
|
|
12
|
+
"inputTokens": 134378,
|
|
13
|
+
"outputTokens": 144,
|
|
14
|
+
"totalTokens": 134522,
|
|
15
|
+
"cachedReadTokens": 109504,
|
|
16
|
+
"cacheCreationTokens": 0,
|
|
17
|
+
"reasoningTokens": 1827,
|
|
18
|
+
"modelCalls": 6,
|
|
19
|
+
"apiDurationMs": 14319,
|
|
20
|
+
"costUsdTicks": 507168000,
|
|
21
|
+
"modelUsage": {
|
|
22
|
+
"grok-build-0.1": {
|
|
23
|
+
"inputTokens": 134378,
|
|
24
|
+
"outputTokens": 144,
|
|
25
|
+
"totalTokens": 134522,
|
|
26
|
+
"cachedReadTokens": 109504,
|
|
27
|
+
"cacheCreationTokens": 0,
|
|
28
|
+
"reasoningTokens": 1827,
|
|
29
|
+
"modelCalls": 6,
|
|
30
|
+
"apiDurationMs": 14319,
|
|
31
|
+
"costUsdTicks": 507168000
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"numTurns": 6
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scrubber corpus: credential shapes that must redact, and real-looking
|
|
3
|
+
* non-secrets that must survive untouched.
|
|
4
|
+
*
|
|
5
|
+
* Positives are built at runtime from random bytes, never written as
|
|
6
|
+
* literals, so repo secret scanners and GitHub push protection never flag
|
|
7
|
+
* this file. Negatives are deterministic (hash-derived where they need to look
|
|
8
|
+
* random) so a false positive reproduces on every run.
|
|
9
|
+
*/
|
|
10
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
11
|
+
|
|
12
|
+
const ALNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
13
|
+
const UPPER_ALNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
14
|
+
const LOWER_ALNUM = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
15
|
+
const LOWER = "abcdefghijklmnopqrstuvwxyz";
|
|
16
|
+
const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
17
|
+
const HEX = "0123456789abcdef";
|
|
18
|
+
const DIGITS = "0123456789";
|
|
19
|
+
const URLSAFE = `${ALNUM}_-`;
|
|
20
|
+
|
|
21
|
+
/** `len` random chars from `alphabet`. */
|
|
22
|
+
function rand(alphabet: string, len: number): string {
|
|
23
|
+
const bytes = randomBytes(len);
|
|
24
|
+
let out = "";
|
|
25
|
+
for (let i = 0; i < len; i++) out += alphabet[(bytes[i] as number) % alphabet.length];
|
|
26
|
+
return out;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const join = (...parts: string[]) => parts.join("");
|
|
30
|
+
|
|
31
|
+
export interface CorpusPositive {
|
|
32
|
+
/** Shape name, for test titles. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** The credential itself; it must not survive `scrubSecrets`. */
|
|
35
|
+
secret: string;
|
|
36
|
+
/** The credential in context, as it would reach a log. */
|
|
37
|
+
text: string;
|
|
38
|
+
/** Set when pass 5 (gitleaks) is the pass that must catch it. */
|
|
39
|
+
gitleaksRule?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function positive(
|
|
43
|
+
name: string,
|
|
44
|
+
secret: string,
|
|
45
|
+
opts: { context?: (secret: string) => string; gitleaksRule?: string } = {},
|
|
46
|
+
): CorpusPositive {
|
|
47
|
+
const context = opts.context ?? ((s: string) => `the response included ${s} in its body`);
|
|
48
|
+
return { name, secret, text: context(secret), gitleaksRule: opts.gitleaksRule };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The vendor shapes an audit probe found unredacted after the structural
|
|
53
|
+
* passes, plus the providers this repo integrates with.
|
|
54
|
+
*/
|
|
55
|
+
export function buildPositives(): CorpusPositive[] {
|
|
56
|
+
return [
|
|
57
|
+
// Audit probe shapes.
|
|
58
|
+
positive("stripe secret key", join("sk", "_live_", rand(ALNUM, 24)), {
|
|
59
|
+
gitleaksRule: "stripe-access-token",
|
|
60
|
+
}),
|
|
61
|
+
positive("stripe restricted key", join("rk", "_live_", rand(ALNUM, 24)), {
|
|
62
|
+
gitleaksRule: "stripe-access-token",
|
|
63
|
+
}),
|
|
64
|
+
positive("sendgrid", join("SG", ".", rand(URLSAFE, 22), ".", rand(URLSAFE, 43)), {
|
|
65
|
+
gitleaksRule: "sendgrid-api-token",
|
|
66
|
+
}),
|
|
67
|
+
positive("hugging face", join("hf", "_", rand(LOWER, 34)), {
|
|
68
|
+
gitleaksRule: "huggingface-access-token",
|
|
69
|
+
}),
|
|
70
|
+
positive(
|
|
71
|
+
"resend",
|
|
72
|
+
join("re", "_", rand(DIGITS, 2), rand(UPPER_ALNUM, 6), "_", rand(ALNUM, 24)),
|
|
73
|
+
),
|
|
74
|
+
positive("google oauth access token", join("ya29", ".", rand(URLSAFE, 120))),
|
|
75
|
+
positive("google refresh token", join("1/", "/0", rand(URLSAFE, 100))),
|
|
76
|
+
positive(
|
|
77
|
+
"discord webhook",
|
|
78
|
+
join("https://discord.com/api/", "webhooks/", rand(DIGITS, 18), "/", rand(URLSAFE, 68)),
|
|
79
|
+
),
|
|
80
|
+
positive(
|
|
81
|
+
"slack webhook",
|
|
82
|
+
join("https://hooks.", "slack.com/services/", rand(UPPER_ALNUM, 44)),
|
|
83
|
+
{ gitleaksRule: "slack-webhook-url" },
|
|
84
|
+
),
|
|
85
|
+
positive(
|
|
86
|
+
"telegram bot token",
|
|
87
|
+
join(rand("123456789", 1), rand(DIGITS, 9), ":", "AA", rand(URLSAFE, 33)),
|
|
88
|
+
),
|
|
89
|
+
positive(
|
|
90
|
+
"telegram bot token by keyword",
|
|
91
|
+
join(rand("123456789", 1), rand(DIGITS, 9), ":", "A", rand(LOWER_ALNUM, 34)),
|
|
92
|
+
{ context: (s) => `telegram bot: ${s}`, gitleaksRule: "telegram-bot-api-token" },
|
|
93
|
+
),
|
|
94
|
+
positive("xai", join("xai", "-", rand(ALNUM, 80))),
|
|
95
|
+
|
|
96
|
+
// Providers we integrate with.
|
|
97
|
+
positive("github classic pat", join("ghp", "_", rand(ALNUM, 36))),
|
|
98
|
+
positive("github fine-grained pat", join("github", "_pat_", rand(ALNUM, 82))),
|
|
99
|
+
positive("github oauth", join("gho", "_", rand(ALNUM, 36))),
|
|
100
|
+
positive("gitlab pat", join("glpat", "-", rand(ALNUM, 20))),
|
|
101
|
+
positive(
|
|
102
|
+
"slack bot token",
|
|
103
|
+
join("xoxb", "-", rand(DIGITS, 12), "-", rand(DIGITS, 12), "-", rand(ALNUM, 24)),
|
|
104
|
+
),
|
|
105
|
+
positive(
|
|
106
|
+
"slack app token",
|
|
107
|
+
join("xapp", "-1-", rand(UPPER_ALNUM, 11), "-", rand(DIGITS, 13), "-", rand(HEX, 64)),
|
|
108
|
+
),
|
|
109
|
+
positive("linear api key", join("lin", "_api_", rand(ALNUM, 40))),
|
|
110
|
+
positive("anthropic api key", join("sk-ant", "-api03-", rand(URLSAFE, 93), "AA")),
|
|
111
|
+
positive(
|
|
112
|
+
"openai project key",
|
|
113
|
+
join("sk-proj", "-", rand(URLSAFE, 58), "T3Blbk", "FJ", rand(URLSAFE, 58)),
|
|
114
|
+
),
|
|
115
|
+
positive("aws access key id", join("AKIA", rand("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", 16))),
|
|
116
|
+
positive("google api key", join("AIza", rand(URLSAFE, 35))),
|
|
117
|
+
positive("npm token", join("npm", "_", rand(ALNUM, 36))),
|
|
118
|
+
positive("atlassian api token", join("ATATT3", rand(URLSAFE, 186))),
|
|
119
|
+
positive("notion", join("ntn", "_", rand(DIGITS, 11), rand(ALNUM, 35)), {
|
|
120
|
+
gitleaksRule: "notion-api-token",
|
|
121
|
+
}),
|
|
122
|
+
positive("fly.io", join("fo1", "_", rand(URLSAFE, 43)), { gitleaksRule: "flyio-access-token" }),
|
|
123
|
+
positive("doppler", join("dp", ".pt.", rand(ALNUM, 43)), { gitleaksRule: "doppler-api-token" }),
|
|
124
|
+
positive("grafana service account", join("glsa", "_", rand(ALNUM, 32), "_", rand(HEX, 8)), {
|
|
125
|
+
gitleaksRule: "grafana-service-account-token",
|
|
126
|
+
}),
|
|
127
|
+
positive("postman", join("PMAK", "-", rand(HEX, 24), "-", rand(HEX, 34)), {
|
|
128
|
+
gitleaksRule: "postman-api-token",
|
|
129
|
+
}),
|
|
130
|
+
positive("shopify", join("shpat", "_", rand(HEX, 32)), {
|
|
131
|
+
gitleaksRule: "shopify-access-token",
|
|
132
|
+
}),
|
|
133
|
+
positive("digitalocean", join("dop", "_v1_", rand(HEX, 64)), {
|
|
134
|
+
gitleaksRule: "digitalocean-pat",
|
|
135
|
+
}),
|
|
136
|
+
positive("databricks", join("dapi", rand(HEX, 32)), { gitleaksRule: "databricks-api-token" }),
|
|
137
|
+
positive("pypi", join("pypi", "-AgEIcHlwaS5vcmc", rand(URLSAFE, 70)), {
|
|
138
|
+
gitleaksRule: "pypi-upload-token",
|
|
139
|
+
}),
|
|
140
|
+
positive("sentry user token", join("sntryu", "_", rand(HEX, 64)), {
|
|
141
|
+
gitleaksRule: "sentry-user-token",
|
|
142
|
+
}),
|
|
143
|
+
positive("heroku", join("HRKU", "-AA", rand(URLSAFE, 58)), {
|
|
144
|
+
gitleaksRule: "heroku-api-key-v2",
|
|
145
|
+
}),
|
|
146
|
+
positive("twilio", join("SK", rand(HEX, 32)), { gitleaksRule: "twilio-api-key" }),
|
|
147
|
+
positive("mailgun", join("key", "-", rand(HEX, 32)), {
|
|
148
|
+
context: (s) => `mailgun: ${s}`,
|
|
149
|
+
gitleaksRule: "mailgun-private-api-token",
|
|
150
|
+
}),
|
|
151
|
+
positive("new relic", join("NRAK", "-", rand(UPPER_ALNUM, 27)), {
|
|
152
|
+
context: (s) => `newrelic = ${s}`,
|
|
153
|
+
gitleaksRule: "new-relic-user-api-key",
|
|
154
|
+
}),
|
|
155
|
+
positive("vault service token", join("hvs", ".", rand(ALNUM, 96)), {
|
|
156
|
+
gitleaksRule: "vault-service-token",
|
|
157
|
+
}),
|
|
158
|
+
// gitleaks' `s\.[A-Za-z]{24}` allowlist used to fire inside a token whose
|
|
159
|
+
// first 24 characters after "hvs." are all letters (~1.5% of real tokens).
|
|
160
|
+
positive(
|
|
161
|
+
"vault service token, letters-only head",
|
|
162
|
+
join("hvs", ".", rand(LETTERS, 24), rand(ALNUM, 72)),
|
|
163
|
+
{
|
|
164
|
+
gitleaksRule: "vault-service-token",
|
|
165
|
+
},
|
|
166
|
+
),
|
|
167
|
+
positive("sourcegraph", join("sgp", "_", rand(HEX, 40)), {
|
|
168
|
+
gitleaksRule: "sourcegraph-access-token",
|
|
169
|
+
}),
|
|
170
|
+
positive("sourcegraph instance", join("sgp", "_", rand(HEX, 16), "_", rand(HEX, 40)), {
|
|
171
|
+
gitleaksRule: "sourcegraph-access-token",
|
|
172
|
+
}),
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const sha1 = (seed: string) => createHash("sha1").update(seed).digest("hex");
|
|
177
|
+
const sha256 = (seed: string) => createHash("sha256").update(seed).digest("hex");
|
|
178
|
+
const uuid = (seed: string) => {
|
|
179
|
+
const h = sha256(seed);
|
|
180
|
+
return `${h.slice(0, 8)}-${h.slice(8, 12)}-4${h.slice(13, 16)}-a${h.slice(17, 20)}-${h.slice(20, 32)}`;
|
|
181
|
+
};
|
|
182
|
+
const b64 = (seed: string, bytes: number) => {
|
|
183
|
+
let buf = Buffer.alloc(0);
|
|
184
|
+
for (let i = 0; buf.length < bytes; i++) {
|
|
185
|
+
buf = Buffer.concat([buf, createHash("sha256").update(`${seed}:${i}`).digest()]);
|
|
186
|
+
}
|
|
187
|
+
return buf.subarray(0, bytes).toString("base64");
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/** Real-looking strings an agent log carries that are not credentials. */
|
|
191
|
+
export function buildNegatives(): string[] {
|
|
192
|
+
const out: string[] = [];
|
|
193
|
+
for (let i = 0; i < 10; i++) {
|
|
194
|
+
out.push(`commit ${sha1(`commit-${i}`)}`);
|
|
195
|
+
out.push(`task ${uuid(`task-${i}`)} completed`);
|
|
196
|
+
}
|
|
197
|
+
for (let i = 0; i < 5; i++) {
|
|
198
|
+
out.push(`git checkout ${sha1(`short-${i}`).slice(0, 7)}`);
|
|
199
|
+
out.push(`image sha256:${sha256(`image-${i}`)}`);
|
|
200
|
+
out.push(`{"id":"${uuid(`json-${i}`)}","parentTaskId":"${uuid(`parent-${i}`)}"}`);
|
|
201
|
+
}
|
|
202
|
+
// Provider keywords in prose next to commit SHAs, digests and UUIDs. The
|
|
203
|
+
// keyword gate only needs the word somewhere in the text, so a rule with a
|
|
204
|
+
// bare hex or UUID branch would redact these.
|
|
205
|
+
for (const [i, kw] of [
|
|
206
|
+
"sourcegraph",
|
|
207
|
+
"heroku",
|
|
208
|
+
"twilio",
|
|
209
|
+
"mailgun",
|
|
210
|
+
"databricks",
|
|
211
|
+
"sentry",
|
|
212
|
+
"datadog",
|
|
213
|
+
"github",
|
|
214
|
+
"gitlab",
|
|
215
|
+
"linear",
|
|
216
|
+
"okta",
|
|
217
|
+
"azure",
|
|
218
|
+
].entries()) {
|
|
219
|
+
out.push(
|
|
220
|
+
`${kw} searched commit ${sha1(`kw-commit-${i}`)} for references`,
|
|
221
|
+
`${kw} deploy ${uuid(`kw-deploy-${i}`)} finished`,
|
|
222
|
+
`${kw} run ${sha256(`kw-run-${i}`)} passed`,
|
|
223
|
+
`${kw} request id ${sha256(`kw-req-${i}`).slice(0, 32)}`,
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
out.push(
|
|
227
|
+
`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA${b64("png", 600)}`,
|
|
228
|
+
`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ${b64("jpeg", 900)}`,
|
|
229
|
+
`"thumbnail": "${b64("thumb", 300)}"`,
|
|
230
|
+
"claude-opus-5-5",
|
|
231
|
+
"claude-sonnet-5-5",
|
|
232
|
+
"claude-haiku-4-5-20251001",
|
|
233
|
+
"google/gemini-3-flash-preview",
|
|
234
|
+
"anthropic/claude-sonnet-4.5",
|
|
235
|
+
"openai/gpt-5.1-codex-mini",
|
|
236
|
+
"meta-llama/llama-3.3-70b-instruct",
|
|
237
|
+
"v1.4.0",
|
|
238
|
+
"1.62.3-beta.2+build.4711",
|
|
239
|
+
"^5.9.2",
|
|
240
|
+
"bun 1.4.0 (linux-x64)",
|
|
241
|
+
"https://github.com/desplega-ai/agent-swarm/pull/1918",
|
|
242
|
+
"https://github.com/desplega-ai/agent-swarm/actions/runs/18234567890/job/52012345678",
|
|
243
|
+
"https://docs.stripe.com/keys#obtain-api-keys",
|
|
244
|
+
"https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct/resolve/main/config.json",
|
|
245
|
+
"https://api.telegram.org/bot<token>/getMe",
|
|
246
|
+
"https://hooks.slack.com/services/",
|
|
247
|
+
"https://www.npmjs.com/package/@modelcontextprotocol/sdk?activeTab=versions",
|
|
248
|
+
"http://localhost:3013/api/tasks?status=in_progress&limit=50",
|
|
249
|
+
"postgres://localhost:5432/agent_swarm",
|
|
250
|
+
"/workspace/personal/worktrees/agent-swarm-gitleaks-rules/src/utils/secret-scrubber.ts",
|
|
251
|
+
"src/utils/secret-rules.generated.ts:120:5",
|
|
252
|
+
"2026-10-07T00:36:49.123Z",
|
|
253
|
+
"Wed Oct 7 02:36:49 CEST 2026",
|
|
254
|
+
"NODE_ENV=production",
|
|
255
|
+
"LOG_LEVEL=debug",
|
|
256
|
+
"PORT=3013",
|
|
257
|
+
"MCP_BASE_URL=http://localhost:3013",
|
|
258
|
+
"HARNESS_PROVIDER=claude",
|
|
259
|
+
"export PATH=/usr/local/bin:$PATH",
|
|
260
|
+
"the monkey keyed the lock and they left",
|
|
261
|
+
"okta: enabled for SSO, see the okta admin page",
|
|
262
|
+
"jira: DES-1234 moved to In Review",
|
|
263
|
+
"the sumo wrestler won 3 bouts",
|
|
264
|
+
"telegram channel @desplega_updates has 120 members",
|
|
265
|
+
"heroku: deployed my-app-123 to the eu region",
|
|
266
|
+
"cohere: model command-r-plus-08-2024",
|
|
267
|
+
"slack: posted to #swarm-dev-2",
|
|
268
|
+
"github: desplega-ai/agent-swarm#1918",
|
|
269
|
+
"const keys = Object.keys(this.state.items);",
|
|
270
|
+
"s.length > 0 && s.startsWith('x')",
|
|
271
|
+
"pat.name === 'default'",
|
|
272
|
+
"pip install scikit-learn==1.5.2",
|
|
273
|
+
"sk-learn is not a package name",
|
|
274
|
+
"ask the risky task skill",
|
|
275
|
+
"api-docs and api-reference live under docs-site/",
|
|
276
|
+
"rk_tests_helper.ts",
|
|
277
|
+
"re_validate_payload_and_retry_failed_steps",
|
|
278
|
+
"ya29 is a prefix, not a token",
|
|
279
|
+
"1//0 is not a refresh token",
|
|
280
|
+
"xai-grok-4",
|
|
281
|
+
"the api key is stored in swarm_config, not in env",
|
|
282
|
+
"Authorization header omitted",
|
|
283
|
+
"Bearer token rotation runs nightly",
|
|
284
|
+
"password reset email sent to user@example.com",
|
|
285
|
+
"token count: 128000",
|
|
286
|
+
"secret scanning is enabled on the repo",
|
|
287
|
+
"SKU-2024-ABCDEF-001",
|
|
288
|
+
"AKIA is the prefix of an AWS access key id",
|
|
289
|
+
"AIza is the prefix of a Google API key",
|
|
290
|
+
"ghp_ prefix marks a classic GitHub PAT",
|
|
291
|
+
"C0AR967K0KZ",
|
|
292
|
+
"U0ALZGQCF96",
|
|
293
|
+
"1759797409.123456",
|
|
294
|
+
"*/15 * * * *",
|
|
295
|
+
"192.168.1.10:8080",
|
|
296
|
+
"#3b82f6",
|
|
297
|
+
"rgba(59, 130, 246, 0.5)",
|
|
298
|
+
"@modelcontextprotocol/sdk@1.20.1",
|
|
299
|
+
"node_modules/.bin/biome check --write",
|
|
300
|
+
"refs/heads/feat/scrubber-gitleaks-rules",
|
|
301
|
+
"Merge pull request #1912 from desplega-ai/fix/tasks-scrub",
|
|
302
|
+
"error: ENOENT: no such file or directory, open '/tmp/x.json'",
|
|
303
|
+
"TypeError: Cannot read properties of undefined (reading 'id')",
|
|
304
|
+
'{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"done"}]}}',
|
|
305
|
+
"WARN [heartbeat] task stalled for 300000ms, requeueing",
|
|
306
|
+
"ran 1681 tests across 412 files in 93.4s",
|
|
307
|
+
"SELECT id, name FROM agents WHERE status = 'idle' LIMIT 10",
|
|
308
|
+
"base64: SGVsbG8sIHdvcmxkIQ==",
|
|
309
|
+
"eyes on the prize",
|
|
310
|
+
"they keyed in the hex 0x7f454c46",
|
|
311
|
+
"s.a.r.l. is a company form",
|
|
312
|
+
"hvs is not a vault token without a dot",
|
|
313
|
+
"dapi is short for data api",
|
|
314
|
+
"PMAK stands for Postman API key",
|
|
315
|
+
"ntn_ prefix belongs to Notion",
|
|
316
|
+
"fo1_ prefix belongs to Fly.io",
|
|
317
|
+
"the stripe dashboard shows sk_live_ keys masked",
|
|
318
|
+
);
|
|
319
|
+
return out;
|
|
320
|
+
}
|