@desplega.ai/agent-swarm 2.8.1 → 2.8.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/dist/{acp-adapter-pdy3qsvg.js → acp-adapter-fqzkxyra.js} +3 -3
- package/dist/{actions-pwjpn0j6.js → actions-kxek041g.js} +17 -17
- package/dist/{amp-adapter-cq9jgj6x.js → amp-adapter-ce7jjke4.js} +1 -1
- package/dist/{app-cnfffgwg.js → app-v6zz8yh0.js} +3 -3
- package/dist/{assistant-kpn317y1.js → assistant-m0sw9xx2.js} +18 -18
- package/dist/{boot-args-schema-pbbnhmc3.js → boot-args-schema-66bk37wv.js} +1 -1
- package/dist/{boot-reembed-9m0ysxma.js → boot-reembed-edjpwsc1.js} +1 -1
- package/dist/{boot-reembed-majbn53m.js → boot-reembed-y27n09tz.js} +1 -1
- package/dist/{boot-scrub-sweep-app8g8ym.js → boot-scrub-sweep-1xc35965.js} +3 -3
- package/dist/{boot-seeds-pbtmvcjm.js → boot-seeds-7hjj91qj.js} +4 -4
- package/dist/{boxd-qbkxy6ap.js → boxd-ent8ch04.js} +1 -1
- package/dist/{claude-adapter-wn1g3qp5.js → claude-adapter-stw7jdcf.js} +3 -3
- package/dist/{claude-managed-setup-pd47nzch.js → claude-managed-setup-y6z2perp.js} +1 -1
- package/dist/{claude-sdk-session-3a2a6589.js → claude-sdk-session-vvya8wqk.js} +3 -3
- package/dist/{cli-wk18cm92.js → cli-0cq8y6m7.js} +1 -1
- package/dist/{cli-p1w18yhx.js → cli-1pz0330a.js} +1 -1
- package/dist/{cli-d3p5vwbk.js → cli-1qkz151v.js} +3 -3
- package/dist/{cli-89cqnasv.js → cli-26ctbcdp.js} +18 -6
- package/dist/{cli-syybb0p1.js → cli-2kvhc7x8.js} +7 -7
- package/dist/{cli-93k32c37.js → cli-3e875j5p.js} +128 -41
- package/dist/{cli-k0615eh8.js → cli-3sy2xags.js} +10 -10
- package/dist/{cli-dy32zecz.js → cli-3vmb0n58.js} +1 -1
- package/dist/{cli-4r05hnqa.js → cli-4vzgeta4.js} +13 -13
- package/dist/{cli-b5rs97a6.js → cli-5y340nzn.js} +4 -4
- package/dist/{cli-7p1kvkck.js → cli-6rc5frdm.js} +1 -1
- package/dist/{cli-jcpr5smb.js → cli-837vfs2x.js} +2 -2
- package/dist/{cli-b085njxz.js → cli-959kp5h2.js} +12 -11
- package/dist/{cli-k93bq1wq.js → cli-97ae65rz.js} +4 -4
- package/dist/{cli-m4dqmnbp.js → cli-9mb2q6pb.js} +1 -1
- package/dist/{cli-bb431xey.js → cli-a0z912j7.js} +121 -33
- package/dist/{cli-k26bkr9t.js → cli-b98a65ed.js} +3 -3
- package/dist/{cli-k0wwfqbg.js → cli-dns0y538.js} +4 -0
- package/dist/{cli-tk7cjj8h.js → cli-dzpc6en0.js} +1 -1
- package/dist/{cli-6mma83xa.js → cli-e1p3n5gq.js} +4 -4
- package/dist/{cli-re4raaj0.js → cli-f4e8r23x.js} +1 -1
- package/dist/{cli-qmqk2yc2.js → cli-f4r3g076.js} +1 -1
- package/dist/{cli-pcad4cb1.js → cli-f6bahpn5.js} +1 -1
- package/dist/{cli-b8e9nb04.js → cli-fpjmegdb.js} +1 -1
- package/dist/{cli-0ntbxyaa.js → cli-fwy8kfd6.js} +271 -37
- package/dist/{cli-tacge1w0.js → cli-g5mtmf6t.js} +6 -6
- package/dist/{cli-sn7rtnj4.js → cli-gyt3zydq.js} +3 -3
- package/dist/{cli-vbh10fqa.js → cli-j24zbska.js} +3 -3
- package/dist/{cli-vqptjbr7.js → cli-jdknh18m.js} +10 -10
- package/dist/{cli-7b8sbmag.js → cli-kjtwrhea.js} +1 -1
- package/dist/{cli-9vhebtjz.js → cli-mxn1qvbn.js} +3 -2
- package/dist/{cli-zcsw143p.js → cli-n6vtrcht.js} +1 -1
- package/dist/{cli-2zp0et3v.js → cli-pchypa1s.js} +55 -19
- package/dist/{cli-gax7fk3t.js → cli-pfs8adn4.js} +1 -1
- package/dist/{cli-1xh9a7hn.js → cli-q24n86d2.js} +2 -2
- package/dist/{cli-7w69ne2f.js → cli-rcecc3yq.js} +167 -43
- package/dist/{cli-xae4g51r.js → cli-rh15cakt.js} +1 -1
- package/dist/{cli-yn2bbre9.js → cli-rmzsadkf.js} +1 -1
- package/dist/{cli-a3b239vq.js → cli-t2tma8gb.js} +1 -1
- package/dist/{cli-9wngrawf.js → cli-tekytdq9.js} +2 -2
- package/dist/{cli-tqegb8eq.js → cli-vdektqgf.js} +1 -1
- package/dist/{cli-cyhbbd1z.js → cli-w401b9tq.js} +1 -1
- package/dist/{cli-jywyhqws.js → cli-xf3qw745.js} +3 -3
- package/dist/{cli-hxpyc9sn.js → cli-z1w943va.js} +2 -2
- package/dist/{cli-yncmerje.js → cli-zh9rsbqf.js} +2 -2
- package/dist/cli.js +16 -16
- package/dist/{codex-adapter-nha71q3n.js → codex-adapter-zerf5qsp.js} +1 -1
- package/dist/{codex-hook-h3vk6xzr.js → codex-hook-30gyhzxe.js} +1 -1
- package/dist/{codex-session-runner-ak9x1k1h.js → codex-session-runner-89s304py.js} +1 -1
- package/dist/{commands-f587qpq8.js → commands-jeh1b51j.js} +3 -3
- package/dist/{controller-hxx8wwy1.js → controller-mctfbrse.js} +3 -3
- package/dist/{controllers-connect-k5sg9m9h.js → controllers-connect-nxa1ddwn.js} +18 -18
- package/dist/{cursor-adapter-n5nc3mfe.js → cursor-adapter-qj8vehv6.js} +1 -1
- package/dist/{db-nzf8zb5z.js → db-2dvay0es.js} +3 -3
- package/dist/{db-amm8w15a.js → db-b36qn6k3.js} +2 -2
- package/dist/{dispatcher-89zrts8f.js → dispatcher-gndbta01.js} +16 -16
- package/dist/{dsh-adapter-nrhbrjz8.js → dsh-adapter-f75sz821.js} +1 -1
- package/dist/{e2b-jkwfhbcv.js → e2b-3gpc2n3w.js} +1 -1
- package/dist/{e2b-s16txnpx.js → e2b-jbm7mj93.js} +1 -1
- package/dist/{embedding-space-ezwenjmj.js → embedding-space-4p05vb2x.js} +6 -6
- package/dist/{embeddings-np74ht6g.js → embeddings-m6768mgh.js} +1 -1
- package/dist/{external-channel-z46yx9d7.js → external-channel-gjv3jne3.js} +2 -2
- package/dist/{fx-adapter-3q12snn6.js → fx-adapter-rpsgb1tw.js} +4 -4
- package/dist/{grok-adapter-ahb1w033.js → grok-adapter-n2m3zjg1.js} +4 -4
- package/dist/handlers-nv8edn19.js +32 -0
- package/dist/{heartbeat-dt9qw9c8.js → heartbeat-a1tv60gt.js} +19 -19
- package/dist/{hook-8k6fbz9b.js → hook-8h5dzcgq.js} +2 -2
- package/dist/{hook-jgcgygex.js → hook-cyaps9ba.js} +4 -4
- package/dist/{http-haw4r8ne.js → http-t15mhbd9.js} +1731 -77
- package/dist/{index-s4ewdma4.js → index-ksmyd6kc.js} +16 -16
- package/dist/{index-tez78qj3.js → index-qav6455f.js} +13 -11
- package/dist/index-rjnrje98.js +32 -0
- package/dist/index-tv3413wy.js +33 -0
- package/dist/{index-5gk12my8.js → index-w1zqf680.js} +1 -1
- package/dist/{keepalive-xn6s7rmg.js → keepalive-91s7hzrb.js} +3 -3
- package/dist/{lead-6ygbfhbh.js → lead-3hmddvrm.js} +30 -30
- package/dist/{maintenance-vdts800b.js → maintenance-7pjmy5xy.js} +1 -1
- package/dist/{oauth-refresh-sweep-094c8wfk.js → oauth-refresh-sweep-rzqfm94j.js} +2 -2
- package/dist/{onboard-v99eh56m.js → onboard-74st7pag.js} +3 -3
- package/dist/{opencode-adapter-dsagkhtw.js → opencode-adapter-arn7gm8q.js} +2 -2
- package/dist/{otel-impl-q7yr9yp0.js → otel-impl-rnzey8cb.js} +1 -1
- package/dist/{pi-mono-adapter-546cd1cc.js → pi-mono-adapter-6mkwq64n.js} +3 -2
- package/dist/{pricing-refresh-7dh2yase.js → pricing-refresh-ha21jhk7.js} +2 -2
- package/dist/{rbac-roles-npbmdh77.js → rbac-roles-59dxachk.js} +2 -2
- package/dist/{rbac-roles-mdmc96p4.js → rbac-roles-wqhma4dr.js} +3 -3
- package/dist/{render-v2-twhhwmms.js → render-v2-14kpzx12.js} +3 -3
- package/dist/{resume-5gsrjd5e.js → resume-gsa5fb5f.js} +6 -6
- package/dist/{session-access-m191x30x.js → session-access-skm7bnp6.js} +4 -4
- package/dist/{session-source-backfill-nt923ask.js → session-source-backfill-pbqzbncv.js} +2 -2
- package/dist/{setup-wv467afy.js → setup-5yermsem.js} +1 -1
- package/dist/{work-objects-8zkrpy13.js → work-objects-xj0ck0w4.js} +19 -19
- package/dist/{worker-follow-up-cecqszem.js → worker-follow-up-911xc0b8.js} +18 -16
- package/dist/{worker-mz5z7kj0.js → worker-qgg0m2gw.js} +30 -30
- package/openapi.json +1741 -290
- package/package.json +2 -2
- package/src/apps/catalog.generated.json +120 -1
- package/src/apps/definition.ts +38 -11
- package/src/apps/page-validator.ts +88 -0
- package/src/be/db/model-profiles.ts +110 -11
- package/src/be/db/tasks/read.ts +20 -0
- package/src/be/db/workflow-run-definitions.ts +19 -8
- package/src/be/db-client.ts +43 -5
- package/src/be/db.ts +9 -3
- package/src/be/migrations/284_model_profile_fallbacks.sql +9 -0
- package/src/be/model-profile-check.ts +43 -18
- package/src/be/runtime-pools/routing.ts +1 -0
- package/src/be/savings/calibrate.ts +468 -0
- package/src/be/savings/compute.ts +182 -0
- package/src/be/savings/model.ts +406 -0
- package/src/be/scripts/typecheck.ts +5 -0
- package/src/be/seed/agent-fs-provision.ts +48 -11
- package/src/be/seed/workflows-seeder.ts +67 -23
- package/src/be/skill-parser.ts +19 -7
- package/src/commands/onboard/agent-fs-version.ts +1 -1
- package/src/commands/provider-error-class.ts +97 -0
- package/src/commands/runner.ts +99 -17
- package/src/extensions/contract-types.generated.ts +1 -1
- package/src/http/all-routes.ts +2 -0
- package/src/http/fs.ts +8 -2
- package/src/http/index.ts +4 -0
- package/src/http/model-profiles.ts +43 -10
- package/src/http/poll.ts +1 -0
- package/src/http/savings-calibration.ts +277 -0
- package/src/http/savings.ts +363 -0
- package/src/http/tasks.ts +46 -4
- package/src/http/trackers/authorize-gate.ts +41 -0
- package/src/http/trackers/jira.ts +26 -4
- package/src/http/trackers/linear.ts +26 -4
- package/src/integrations/chat-sdk/limits.ts +6 -1
- package/src/jira/oauth.ts +7 -1
- package/src/linear/README.md +2 -1
- package/src/linear/oauth.ts +7 -1
- package/src/providers/amp-adapter.ts +1 -1
- package/src/providers/codex-adapter.ts +3 -0
- package/src/providers/pi-mono-adapter.ts +6 -5
- package/src/providers/types.ts +7 -0
- package/src/scripts-runtime/sdk-allowlist.ts +11 -1
- package/src/scripts-runtime/swarm-sdk.ts +6 -0
- package/src/scripts-runtime/types/stdlib.d.ts +9 -0
- package/src/scripts-runtime/types/swarm-extension.d.ts +34 -0
- package/src/scripts-runtime/types/swarm-sdk.d.ts +9 -0
- package/src/tasks/worker-follow-up.ts +142 -3
- package/src/tests/agent-fs-provision-seeder.test.ts +81 -0
- package/src/tests/apps-chart-shell.test.ts +170 -0
- package/src/tests/apps-icon.test.ts +156 -2
- package/src/tests/chat-sdk-relay.test.ts +12 -0
- package/src/tests/codex-adapter.test.ts +11 -0
- package/src/tests/comb-default.test.ts +6 -0
- package/src/tests/core-auth.test.ts +7 -6
- package/src/tests/db-client-busy-retry.test.ts +58 -6
- package/src/tests/deploy-guard.test.ts +154 -0
- package/src/tests/docs-index-footprint.test.js +3 -3
- package/src/tests/fixtures/app-shell-charts-definition.json.txt +180 -0
- package/src/tests/model-profile-fallbacks.test.ts +482 -0
- package/src/tests/model-profiles-api.test.ts +1 -0
- package/src/tests/pi-mono-session-cost-on-abort.test.ts +115 -0
- package/src/tests/provider-error-class.test.ts +174 -0
- package/src/tests/runner-provider-fallback.test.ts +197 -0
- package/src/tests/savings-calibration-api.test.ts +264 -0
- package/src/tests/savings-calibration.test.ts +201 -0
- package/src/tests/savings-compute.test.ts +406 -0
- package/src/tests/savings-model.test.ts +287 -0
- package/src/tests/script-connections.test.ts +2 -0
- package/src/tests/sdk-allowlist.test.ts +40 -0
- package/src/tests/seed-workflows.test.ts +167 -11
- package/src/tests/skill-parser.test.ts +45 -0
- package/src/tests/tracker-oauth-authorize-auth.test.ts +262 -0
- package/src/tests/workflow-definition-pinning.test.ts +128 -3
- package/src/tests/workflow-script-principal.test.ts +94 -4
- package/src/tools/app-upsert.ts +1 -1
- package/src/tools/model-profiles/list-model-profiles.ts +4 -2
- package/src/tools/update-profile.ts +1 -1
- package/src/types.ts +115 -33
- package/src/utils/constants.ts +2 -0
- package/templates/skills/apps/SKILL.md +62 -3
- package/templates/skills/apps/content.md +62 -3
- package/templates/skills/swarm-docs/content.md +2 -0
- package/dist/handlers-vbww69re.js +0 -32
- package/dist/index-4xwaf5th.js +0 -32
- package/dist/index-f0hcrs8e.js +0 -33
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test for scripts/deploy-guard.sh, the "guard" step of
|
|
3
|
+
* .github/workflows/docker-and-deploy.yml.
|
|
4
|
+
*
|
|
5
|
+
* The guard used to skip deploy whenever main had moved past the running
|
|
6
|
+
* commit. A newer docs-only commit starts no docker-and-deploy run, so that
|
|
7
|
+
* stranded prod on an older deploy. Now the guard skips only when the newer
|
|
8
|
+
* commits touch on.push.paths, read from the real workflow file.
|
|
9
|
+
*
|
|
10
|
+
* Each case builds a bare "origin", a shallow runner clone (like
|
|
11
|
+
* actions/checkout), then pushes newer main commits from a second clone and
|
|
12
|
+
* runs the guard in the runner clone.
|
|
13
|
+
*/
|
|
14
|
+
import { afterAll, describe, expect, test } from "bun:test";
|
|
15
|
+
import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import { dirname, join, resolve } from "node:path";
|
|
18
|
+
import { CHILD_PROCESS_TEST_BUDGET_MS, expectChildOk, runChild } from "./test-proc";
|
|
19
|
+
|
|
20
|
+
const REPO_ROOT = resolve(import.meta.dir, "../..");
|
|
21
|
+
const GUARD_SCRIPT = join(REPO_ROOT, "scripts/deploy-guard.sh");
|
|
22
|
+
const WORKFLOW = ".github/workflows/docker-and-deploy.yml";
|
|
23
|
+
|
|
24
|
+
// GitHub runners ship yq. Locally, skip without it; in CI a missing yq must fail.
|
|
25
|
+
const hasYq = Bun.which("yq") !== null;
|
|
26
|
+
|
|
27
|
+
const tmpRoots: string[] = [];
|
|
28
|
+
afterAll(() => {
|
|
29
|
+
for (const dir of tmpRoots) rmSync(dir, { recursive: true, force: true });
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const gitEnv: Record<string, string | undefined> = {
|
|
33
|
+
PATH: process.env.PATH,
|
|
34
|
+
HOME: process.env.HOME,
|
|
35
|
+
GIT_CONFIG_GLOBAL: "/dev/null",
|
|
36
|
+
GIT_CONFIG_NOSYSTEM: "1",
|
|
37
|
+
GIT_AUTHOR_NAME: "test",
|
|
38
|
+
GIT_AUTHOR_EMAIL: "test@example.com",
|
|
39
|
+
GIT_COMMITTER_NAME: "test",
|
|
40
|
+
GIT_COMMITTER_EMAIL: "test@example.com",
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
async function git(cwd: string, ...args: string[]): Promise<string> {
|
|
44
|
+
const r = expectChildOk(
|
|
45
|
+
await runChild(["git", ...args], { cwd, env: gitEnv }),
|
|
46
|
+
`git ${args.join(" ")}`,
|
|
47
|
+
);
|
|
48
|
+
return r.stdout.trim();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function write(dir: string, path: string, content: string): void {
|
|
52
|
+
mkdirSync(dirname(join(dir, path)), { recursive: true });
|
|
53
|
+
writeFileSync(join(dir, path), content);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Origin with one main commit, a shallow runner checkout of it, and a pusher clone. */
|
|
57
|
+
async function setup() {
|
|
58
|
+
const root = mkdtempSync(join(tmpdir(), "deploy-guard-"));
|
|
59
|
+
tmpRoots.push(root);
|
|
60
|
+
const origin = join(root, "origin.git");
|
|
61
|
+
const pusher = join(root, "pusher");
|
|
62
|
+
const runner = join(root, "runner");
|
|
63
|
+
|
|
64
|
+
await git(root, "init", "--bare", "-q", "-b", "main", origin);
|
|
65
|
+
await git(root, "clone", "-q", origin, pusher);
|
|
66
|
+
await git(pusher, "checkout", "-q", "-B", "main");
|
|
67
|
+
mkdirSync(join(pusher, ".github/workflows"), { recursive: true });
|
|
68
|
+
copyFileSync(join(REPO_ROOT, WORKFLOW), join(pusher, WORKFLOW));
|
|
69
|
+
write(pusher, "src/index.ts", "export {};\n");
|
|
70
|
+
write(pusher, "README.md", "# repo\n");
|
|
71
|
+
await git(pusher, "add", "-A");
|
|
72
|
+
await git(pusher, "commit", "-q", "-m", "initial");
|
|
73
|
+
await git(pusher, "push", "-q", "origin", "main");
|
|
74
|
+
|
|
75
|
+
await git(root, "clone", "-q", "--depth", "1", `file://${origin}`, runner);
|
|
76
|
+
const runningSha = await git(runner, "rev-parse", "HEAD");
|
|
77
|
+
|
|
78
|
+
const pushCommit = async (path: string, content: string) => {
|
|
79
|
+
write(pusher, path, content);
|
|
80
|
+
await git(pusher, "add", "-A");
|
|
81
|
+
await git(pusher, "commit", "-q", "-m", `change ${path}`);
|
|
82
|
+
await git(pusher, "push", "-q", "origin", "main");
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const runGuard = async () => {
|
|
86
|
+
const outFile = join(root, `github-output-${Date.now()}`);
|
|
87
|
+
writeFileSync(outFile, "");
|
|
88
|
+
const r = await runChild(["bash", GUARD_SCRIPT], {
|
|
89
|
+
cwd: runner,
|
|
90
|
+
env: { ...gitEnv, GITHUB_SHA: runningSha, GITHUB_OUTPUT: outFile },
|
|
91
|
+
});
|
|
92
|
+
expectChildOk(r, "deploy-guard.sh");
|
|
93
|
+
const match = readFileSync(outFile, "utf8").match(/^is_tip=(true|false)$/m);
|
|
94
|
+
return { isTip: match?.[1], log: r.stdout };
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
return { pushCommit, runGuard };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
describe.skipIf(!hasYq && !process.env.CI)("deploy guard (scripts/deploy-guard.sh)", () => {
|
|
101
|
+
test(
|
|
102
|
+
"deploys when the running commit is still main tip",
|
|
103
|
+
async () => {
|
|
104
|
+
const { runGuard } = await setup();
|
|
105
|
+
expect((await runGuard()).isTip).toBe("true");
|
|
106
|
+
},
|
|
107
|
+
CHILD_PROCESS_TEST_BUDGET_MS,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
test(
|
|
111
|
+
"deploys when newer main commits are docs-only",
|
|
112
|
+
async () => {
|
|
113
|
+
const { pushCommit, runGuard } = await setup();
|
|
114
|
+
await pushCommit("README.md", "# repo\n\nmore docs\n");
|
|
115
|
+
await pushCommit("docs-site/content/docs/page.mdx", "docs\n");
|
|
116
|
+
const result = await runGuard();
|
|
117
|
+
expect(result.isTip).toBe("true");
|
|
118
|
+
},
|
|
119
|
+
CHILD_PROCESS_TEST_BUDGET_MS,
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
test(
|
|
123
|
+
"skips when a newer main commit changes src",
|
|
124
|
+
async () => {
|
|
125
|
+
const { pushCommit, runGuard } = await setup();
|
|
126
|
+
await pushCommit("src/index.ts", "export const x = 1;\n");
|
|
127
|
+
const result = await runGuard();
|
|
128
|
+
expect(result.isTip).toBe("false");
|
|
129
|
+
expect(result.log).toContain("src/index.ts");
|
|
130
|
+
},
|
|
131
|
+
CHILD_PROCESS_TEST_BUDGET_MS,
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
test(
|
|
135
|
+
"skips when a src change is followed by a docs-only tip",
|
|
136
|
+
async () => {
|
|
137
|
+
const { pushCommit, runGuard } = await setup();
|
|
138
|
+
await pushCommit("src/index.ts", "export const x = 1;\n");
|
|
139
|
+
await pushCommit("README.md", "# repo\n\nmore docs\n");
|
|
140
|
+
expect((await runGuard()).isTip).toBe("false");
|
|
141
|
+
},
|
|
142
|
+
CHILD_PROCESS_TEST_BUDGET_MS,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
test(
|
|
146
|
+
"skips on a nested file under a ** trigger path (apps/ui/**)",
|
|
147
|
+
async () => {
|
|
148
|
+
const { pushCommit, runGuard } = await setup();
|
|
149
|
+
await pushCommit("apps/ui/src/components/deep/thing.tsx", "export {};\n");
|
|
150
|
+
expect((await runGuard()).isTip).toBe("false");
|
|
151
|
+
},
|
|
152
|
+
CHILD_PROCESS_TEST_BUDGET_MS,
|
|
153
|
+
);
|
|
154
|
+
});
|
|
@@ -78,7 +78,7 @@ describe("docs API index footprint", () => {
|
|
|
78
78
|
expect(tasks).toContain('"path":"/api/task-templates","method":"get"');
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
test("OpenAPI and generated pages keep all
|
|
81
|
+
test("OpenAPI and generated pages keep all 476 operations", async () => {
|
|
82
82
|
const spec = await Bun.file(resolve(repoRoot, "openapi.json")).json();
|
|
83
83
|
const operationKeys = [];
|
|
84
84
|
const tags = new Set();
|
|
@@ -103,8 +103,8 @@ describe("docs API index footprint", () => {
|
|
|
103
103
|
expect(spec.paths["/api/agents/{id}/runtime"]?.get).toBeDefined();
|
|
104
104
|
|
|
105
105
|
const generatedKeys = await generatedOperationKeys();
|
|
106
|
-
expect(operationKeys).toHaveLength(
|
|
107
|
-
expect(generatedKeys).toHaveLength(
|
|
106
|
+
expect(operationKeys).toHaveLength(476);
|
|
107
|
+
expect(generatedKeys).toHaveLength(476);
|
|
108
108
|
expect(new Set(generatedKeys)).toEqual(new Set(operationKeys));
|
|
109
109
|
});
|
|
110
110
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"layout": "sidebar",
|
|
3
|
+
"models": {
|
|
4
|
+
"day": {
|
|
5
|
+
"columns": {
|
|
6
|
+
"date": { "kind": "date", "required": true },
|
|
7
|
+
"deploys": { "kind": "number" },
|
|
8
|
+
"failures": { "kind": "number" },
|
|
9
|
+
"spend": { "kind": "number" },
|
|
10
|
+
"passRate": { "kind": "number" }
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"service": {
|
|
14
|
+
"columns": {
|
|
15
|
+
"name": { "kind": "string", "required": true },
|
|
16
|
+
"owner": { "kind": "string" },
|
|
17
|
+
"spend": { "kind": "number" }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"queries": {
|
|
22
|
+
"days": { "model": "day", "sort": { "column": "date", "dir": "asc" } },
|
|
23
|
+
"services": { "model": "service" },
|
|
24
|
+
"serviceById": { "model": "service", "filter": { "id": { "$param": "service" } } }
|
|
25
|
+
},
|
|
26
|
+
"defaultPage": "overview",
|
|
27
|
+
"pages": {
|
|
28
|
+
"overview": {
|
|
29
|
+
"title": "Overview",
|
|
30
|
+
"icon": "activity",
|
|
31
|
+
"description": "Deploys, failures and spend over the last two weeks.",
|
|
32
|
+
"headerActions": "headerRefresh",
|
|
33
|
+
"root": "root",
|
|
34
|
+
"elements": {
|
|
35
|
+
"root": { "type": "Stack", "props": { "gap": "lg" }, "children": ["tiles", "charts"] },
|
|
36
|
+
"tiles": {
|
|
37
|
+
"type": "Grid",
|
|
38
|
+
"props": { "columns": 3 },
|
|
39
|
+
"children": ["deploysTile", "failuresTile", "spendTile"]
|
|
40
|
+
},
|
|
41
|
+
"deploysTile": {
|
|
42
|
+
"type": "Metric",
|
|
43
|
+
"props": {
|
|
44
|
+
"label": "Deploys today",
|
|
45
|
+
"value": 14,
|
|
46
|
+
"icon": "rocket",
|
|
47
|
+
"tone": "success",
|
|
48
|
+
"trend": { "direction": "up", "label": "+3 vs yesterday" },
|
|
49
|
+
"sparkline": { "$state": "/queries/days/data" },
|
|
50
|
+
"sparklineKey": "deploys"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"failuresTile": {
|
|
54
|
+
"type": "Metric",
|
|
55
|
+
"props": {
|
|
56
|
+
"label": "Failed runs",
|
|
57
|
+
"value": 2,
|
|
58
|
+
"icon": "alert-triangle",
|
|
59
|
+
"tone": "error",
|
|
60
|
+
"sparkline": [5, 4, 6, 3, 4, 2, null, 3, 2, 2]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"spendTile": {
|
|
64
|
+
"type": "Metric",
|
|
65
|
+
"props": {
|
|
66
|
+
"label": "Spend today",
|
|
67
|
+
"value": "$182",
|
|
68
|
+
"icon": "dollar-sign",
|
|
69
|
+
"tone": "info",
|
|
70
|
+
"sparkline": { "$state": "/queries/days/data" },
|
|
71
|
+
"sparklineKey": "spend"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"charts": { "type": "Grid", "props": { "columns": 2 }, "children": ["deploysCard", "passCard"] },
|
|
75
|
+
"deploysCard": {
|
|
76
|
+
"type": "Card",
|
|
77
|
+
"props": { "title": "Deploys and failures", "description": "Stacked, per day" },
|
|
78
|
+
"children": ["deploysChart"]
|
|
79
|
+
},
|
|
80
|
+
"deploysChart": {
|
|
81
|
+
"type": "Chart",
|
|
82
|
+
"props": {
|
|
83
|
+
"kind": "bar",
|
|
84
|
+
"data": { "$state": "/queries/days/data" },
|
|
85
|
+
"loading": { "$state": "/queries/days/loading" },
|
|
86
|
+
"error": { "$state": "/queries/days/error" },
|
|
87
|
+
"x": "date",
|
|
88
|
+
"xType": "time",
|
|
89
|
+
"stacked": true,
|
|
90
|
+
"series": [
|
|
91
|
+
{ "key": "deploys", "label": "Deploys" },
|
|
92
|
+
{ "key": "failures", "label": "Failures", "color": "error" }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"passCard": {
|
|
97
|
+
"type": "Card",
|
|
98
|
+
"props": { "title": "Pass rate" },
|
|
99
|
+
"children": ["passChart"]
|
|
100
|
+
},
|
|
101
|
+
"passChart": {
|
|
102
|
+
"type": "Chart",
|
|
103
|
+
"props": {
|
|
104
|
+
"kind": "area",
|
|
105
|
+
"data": { "$state": "/queries/days/data" },
|
|
106
|
+
"loading": { "$state": "/queries/days/loading" },
|
|
107
|
+
"x": "date",
|
|
108
|
+
"xType": "time",
|
|
109
|
+
"format": "percent",
|
|
110
|
+
"series": [{ "key": "passRate", "label": "Pass rate", "color": "success" }]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"headerRefresh": {
|
|
114
|
+
"type": "Button",
|
|
115
|
+
"props": { "label": "Refresh", "icon": "refresh-cw", "variant": "outline", "size": "sm" },
|
|
116
|
+
"on": { "press": [{ "action": "app.refresh" }] }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"spend": {
|
|
121
|
+
"title": "Spend",
|
|
122
|
+
"icon": "dollar-sign",
|
|
123
|
+
"description": "Daily spend and the services behind it.",
|
|
124
|
+
"root": "root",
|
|
125
|
+
"elements": {
|
|
126
|
+
"root": { "type": "Stack", "props": { "gap": "lg" }, "children": ["spendCard", "table"] },
|
|
127
|
+
"spendCard": { "type": "Card", "props": { "title": "Daily spend" }, "children": ["spendChart"] },
|
|
128
|
+
"spendChart": {
|
|
129
|
+
"type": "Chart",
|
|
130
|
+
"props": {
|
|
131
|
+
"kind": "line",
|
|
132
|
+
"data": { "$state": "/queries/days/data" },
|
|
133
|
+
"loading": { "$state": "/queries/days/loading" },
|
|
134
|
+
"x": "date",
|
|
135
|
+
"xType": "time",
|
|
136
|
+
"format": "currency",
|
|
137
|
+
"currency": "USD",
|
|
138
|
+
"height": 280,
|
|
139
|
+
"series": [{ "key": "spend", "label": "Spend" }]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"table": {
|
|
143
|
+
"type": "Table",
|
|
144
|
+
"props": {
|
|
145
|
+
"data": { "$state": "/queries/services/data" },
|
|
146
|
+
"loading": { "$state": "/queries/services/loading" },
|
|
147
|
+
"columns": [
|
|
148
|
+
{ "key": "name", "label": "Service" },
|
|
149
|
+
{ "key": "owner", "label": "Owner" },
|
|
150
|
+
{ "key": "spend", "label": "Spend", "kind": "number" }
|
|
151
|
+
],
|
|
152
|
+
"onRowClick": [
|
|
153
|
+
{ "action": "app.navigate", "params": { "page": "service", "params": { "service": { "$row": "id" } } } }
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"service": {
|
|
160
|
+
"title": "Service",
|
|
161
|
+
"params": { "service": { "kind": "string", "required": true } },
|
|
162
|
+
"root": "detail",
|
|
163
|
+
"elements": {
|
|
164
|
+
"detail": {
|
|
165
|
+
"type": "DetailList",
|
|
166
|
+
"props": {
|
|
167
|
+
"data": { "$state": "/queries/serviceById/data/0" },
|
|
168
|
+
"fields": [{ "key": "name" }, { "key": "owner" }, { "key": "spend", "kind": "number" }]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"settings": {
|
|
174
|
+
"title": "Settings",
|
|
175
|
+
"nav": false,
|
|
176
|
+
"root": "text",
|
|
177
|
+
"elements": { "text": { "type": "Text", "props": { "content": "Nothing to configure yet." } } }
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|