@zaip-ai/cli 1.0.8 → 1.3.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/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +1 -1
- package/dist/services/agent-adapters.js +2 -2
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +5 -0
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/logger.test.js +2 -2
- package/dist/services/runtime-template.test.js +6 -6
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +5 -0
- package/dist/services/template-manifest.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/architecture/software-architecture.md +131 -0
- package/templates/.agents/branding/brandbook.docx +0 -0
- package/templates/.agents/branding/brandbook.md +60 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +1 -1
- package/templates/.agents/dashboard/.tmp-run-list.json +254 -0
- package/templates/.agents/dashboard/.zaip-managed.json +252 -136
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-Z60df2r-.js → CostCalculationGuidePage-DxR_pgSV.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-4jZLTWE_.js +2156 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-Coc6pA-1.js → PricingSettingsDialog-CKcsqb-r.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BomxqCBU.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-DmmJD2Th.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BwtitWa_.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-N5Csr0RP.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DFBuc_qp.js → icons-vendor-C0fj2uU9.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-C4aIB1PV.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-CCQOHdVI.js → react-vendor-BEsJ-FYH.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-pC2_0J8x.js → traceability-B6y6Gw12.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +5 -5
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +204 -32
- package/templates/.agents/dashboard/apps/frontend/src/DashboardAlternateContent.tsx +11 -11
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +14 -7
- package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +4 -2
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.test.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.tsx +14 -11
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +19 -4
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +24 -2
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +22 -1
- package/templates/.agents/dashboard/apps/frontend/src/overview-status-page.test.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +36 -26
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-banner-semantics.test.ts +40 -6
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +39 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +89 -23
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +219 -29
- package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +61 -7
- package/templates/.agents/dashboard/apps/frontend/src/use-app-operations-pages.ts +3 -6
- package/templates/.agents/dashboard/apps/frontend/src/work-list-pagination.test.ts +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/work-list-pagination.ts +3 -4
- package/templates/.agents/dashboard/apps/frontend/vite.config.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.test.ts +89 -19
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.tsx +31 -16
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +43 -14
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +5 -5
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.tsx +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +67 -42
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +115 -39
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +188 -38
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +75 -17
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +147 -58
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +5 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/index.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +2 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-compact-cost-page.ts +18 -7
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +95 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-run-page.ts +29 -17
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +0 -24
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.test.ts +225 -424
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +24 -15
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-terminal-day.test.ts +6 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/source-size-cost-server/build-cost-monitor-projection-agents.test.ts +31 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/source-size-cost-server/build-cost-summary-projection-duration.test.ts +414 -0
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/contracts.ts +26 -23
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +31 -11
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +3 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +51 -21
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +47 -5
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageNavigation.tsx +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/PeriodSummaryTable.tsx +32 -10
- package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +9 -3
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +13 -5
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +12 -4
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.ts +1 -2
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +385 -4
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +481 -61
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +14 -1
- package/templates/.agents/dashboard/modules/operations/src/react/export/xlsx-runtime-e2e.test.ts +248 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +4 -4
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +6 -4
- package/templates/.agents/dashboard/modules/operations/src/react/operations-global-filters.test.ts +4 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.status-cards.test.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +46 -6
- package/templates/.agents/dashboard/modules/operations/src/react/operations-view-order.test.ts +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.test.ts +82 -6
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +2 -1
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.test.ts +19 -7
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.ts +4 -1
- package/templates/.agents/dashboard/modules/operations/src/server/quick-daily-operations-projection.ts +11 -5
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/contracts/src/index.ts +1 -0
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +152 -149
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs.metafile.json +7333 -0
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +149 -146
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-dashboard.mjs +15 -7
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +44 -13
- package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +5 -2
- package/templates/.agents/dashboard/packages/local-runtime/scripts/source-size-runtime-scripts/sqlite-read-model-fixture.mjs +397 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-sqlite-read-model.mjs +472 -145
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-unix-launchers.mjs +15 -3
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +129 -31
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +153 -150
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +6 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +3 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-board.test.ts +55 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/server-board.ts +23 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +19 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +7 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +132 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +126 -60
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-metric-contract.ts +16 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +1861 -350
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +1218 -352
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +119 -42
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +45 -20
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +7 -5
- package/templates/.agents/design/.zaip-managed.json +3 -3
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/growth/estrategia-bootstrap-90-dias.md +169 -0
- package/templates/.agents/growth/strategy.md +27 -0
- package/templates/.agents/marketing/estrategia-marketing-zaip-90-dias.md +197 -0
- package/templates/.agents/marketing/strategy.md +29 -0
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +30 -29
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +3 -3
- package/templates/.agents/sales/playbook.md +32 -0
- package/templates/.agents/sales/roteiro-comercial-zaip.md +252 -0
- package/templates/.agents/skills/zaip-aios/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +9 -2
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-framework.md +39 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-standards.md +1 -1
- package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +39 -82
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +13 -8
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +44 -14
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +19 -9
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.test.mjs +29 -5
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/source-size-telemetry/model-identity-reconciliation.mjs +77 -0
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-sqlite-read-model/scripts/ensure-node.mjs +28 -5
- package/templates/.agents/zaip-aios/INDEX.md +10 -0
- package/templates/.agents/zaip-aios/README.md +2 -1
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/18-catalogo-de-agentes.md +76 -0
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +72 -0
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +330 -0
- package/templates/.agents/zaip-aios/guides/21-telemetria-monitor-custos.md +52 -0
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +69 -0
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +483 -0
- package/templates/.agents/zaip-aios/guides/24-calculo-de-custos-openai.md +85 -0
- package/templates/.agents/zaip-aios/guides/25-fontes-de-precos-openai.md +18 -0
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +44 -0
- package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +167 -0
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +144 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/lifecycles-task-spec-prd.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/prd-lifecycle.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/spec-lifecycle.png +0 -0
- package/templates/.agents/zaip-aios/guides/assets/diagrams/task-lifecycle.png +0 -0
- package/templates/template-manifest.json +313 -177
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Cs6dzDmW.js +0 -1505
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-QE1k9yZB.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-_Pf5DA_A.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BVlz3DLZ.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-Cf9ctPVt.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-8A4DcNXM.js +0 -2
package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-dashboard.mjs
CHANGED
|
@@ -2,11 +2,19 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
|
|
4
4
|
const root = resolve(import.meta.dirname, "../../../../..");
|
|
5
|
-
const run = (cwd, args) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const run = (cwd, args) =>
|
|
6
|
+
new Promise((resolveRun, rejectRun) => {
|
|
7
|
+
const child = spawn(process.execPath, args, { cwd, stdio: "inherit", windowsHide: true });
|
|
8
|
+
child.once("error", rejectRun);
|
|
9
|
+
child.once("exit", (code) =>
|
|
10
|
+
code === 0 ? resolveRun(undefined) : rejectRun(new Error(`build failed: ${code}`)),
|
|
11
|
+
);
|
|
12
|
+
});
|
|
13
|
+
await run(resolve(root, ".agents/dashboard/apps/frontend"), [
|
|
14
|
+
resolve(root, "node_modules/vite/bin/vite.js"),
|
|
15
|
+
"build",
|
|
16
|
+
]);
|
|
17
|
+
await run(resolve(root, ".agents/dashboard/packages/local-runtime"), [
|
|
18
|
+
resolve(root, ".agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs"),
|
|
19
|
+
]);
|
|
12
20
|
process.stdout.write("SQLite dashboard artifacts rebuilt.\n");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { copyFile, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
1
2
|
import { createRequire } from "node:module";
|
|
2
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
|
|
5
5
|
const root = resolve(import.meta.dirname, "../../../../..");
|
|
@@ -18,24 +18,54 @@ const buildOptions = {
|
|
|
18
18
|
minify: true,
|
|
19
19
|
sourcemap: true,
|
|
20
20
|
alias: {
|
|
21
|
-
"@hono/node-server/serve-static": resolve(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"hono/
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
"@hono/node-server/serve-static": resolve(
|
|
22
|
+
root,
|
|
23
|
+
"node_modules/.pnpm/@hono+node-server@2.0.10_hono@4.12.34/node_modules/@hono/node-server/dist/serve-static.mjs",
|
|
24
|
+
),
|
|
25
|
+
"@hono/node-server": resolve(
|
|
26
|
+
root,
|
|
27
|
+
"node_modules/.pnpm/@hono+node-server@2.0.10_hono@4.12.34/node_modules/@hono/node-server/dist/index.mjs",
|
|
28
|
+
),
|
|
29
|
+
"hono/cookie": resolve(
|
|
30
|
+
root,
|
|
31
|
+
"node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/helper/cookie/index.js",
|
|
32
|
+
),
|
|
33
|
+
"hono/utils/mime": resolve(
|
|
34
|
+
root,
|
|
35
|
+
"node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/utils/mime.js",
|
|
36
|
+
),
|
|
37
|
+
"hono/ws": resolve(
|
|
38
|
+
root,
|
|
39
|
+
"node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/helper/websocket/index.js",
|
|
40
|
+
),
|
|
41
|
+
hono: resolve(root, "node_modules/.pnpm/hono@4.12.34/node_modules/hono/dist/index.js"),
|
|
42
|
+
zod: resolve(root, "node_modules/.pnpm/zod@4.4.3/node_modules/zod"),
|
|
28
43
|
"@zaip-ai/core": resolve(root, "packages/core/src/index.ts"),
|
|
29
44
|
"@zaip-ai/costs": resolve(root, "packages/costs/src/index.ts"),
|
|
30
45
|
"@zaip-ai/decisions": resolve(root, "packages/decisions/src/index.ts"),
|
|
31
46
|
"@zaip-ai/lifecycle-manifests": resolve(root, "packages/lifecycle-manifests/src/index.ts"),
|
|
32
47
|
"@zaip-ai/specs": resolve(root, "packages/specs/src/index.ts"),
|
|
33
48
|
"@zaip-ai/tasks": resolve(root, "packages/tasks/src/index.ts"),
|
|
34
|
-
"@zaip-ai/dashboard-operations/contracts": resolve(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"@zaip-ai/dashboard-
|
|
49
|
+
"@zaip-ai/dashboard-operations/contracts": resolve(
|
|
50
|
+
root,
|
|
51
|
+
".agents/dashboard/modules/operations/src/contracts.ts",
|
|
52
|
+
),
|
|
53
|
+
"@zaip-ai/dashboard-operations/work-board-model": resolve(
|
|
54
|
+
root,
|
|
55
|
+
".agents/dashboard/modules/operations/src/work-board-model.ts",
|
|
56
|
+
),
|
|
57
|
+
"@zaip-ai/dashboard-operations/server": resolve(
|
|
58
|
+
root,
|
|
59
|
+
".agents/dashboard/modules/operations/src/server/index.ts",
|
|
60
|
+
),
|
|
61
|
+
"@zaip-ai/dashboard-traceability/server": resolve(
|
|
62
|
+
root,
|
|
63
|
+
".agents/dashboard/modules/traceability/src/server/index.ts",
|
|
64
|
+
),
|
|
65
|
+
"@zaip-ai/dashboard-cost-monitor/server": resolve(
|
|
66
|
+
root,
|
|
67
|
+
".agents/dashboard/modules/cost-monitor/src/server/index.ts",
|
|
68
|
+
),
|
|
39
69
|
},
|
|
40
70
|
};
|
|
41
71
|
const buildResults = await Promise.all([
|
|
@@ -73,6 +103,7 @@ await writeFile(
|
|
|
73
103
|
(await readFile(distributedServer, "utf8")).replace(/[ \t]+$/gm, ""),
|
|
74
104
|
"utf8",
|
|
75
105
|
);
|
|
106
|
+
await copyFile(distributedServer, resolve(packageRoot, "server.mjs"));
|
|
76
107
|
if (process.env.ZAIP_RUNTIME_METAFILE === "1") {
|
|
77
108
|
await writeFile(
|
|
78
109
|
resolve(packageRoot, "dist/server.cjs.metafile.json"),
|
package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs
CHANGED
|
@@ -5,11 +5,14 @@ const workspaceRoot = resolve(import.meta.dirname, "../../../../..");
|
|
|
5
5
|
process.env.ZAIP_UI_ROOT ??= resolve(workspaceRoot, ".agents/dashboard/apps/frontend/dist");
|
|
6
6
|
const { default: runtime } = await import("../dist/server.cjs");
|
|
7
7
|
const { rebuildSqliteReadModel, validateSqliteReadModelSchema } = runtime;
|
|
8
|
-
const cleanupPath =
|
|
8
|
+
const cleanupPath =
|
|
9
|
+
process.env.ZAIP_SQLITE_REFRESH_CLEANUP === "1" ? process.env.ZAIP_SQLITE_DB_PATH : null;
|
|
9
10
|
try {
|
|
10
11
|
const result = await rebuildSqliteReadModel(workspaceRoot);
|
|
11
12
|
const schema = validateSqliteReadModelSchema(result.path);
|
|
12
|
-
process.stdout.write(
|
|
13
|
+
process.stdout.write(
|
|
14
|
+
`${JSON.stringify({ storage_mode: "sqlite_read_model", ...result, schema })}\n`,
|
|
15
|
+
);
|
|
13
16
|
} finally {
|
|
14
17
|
// The background seed refresher owns only its generated refresh-*.sqlite
|
|
15
18
|
// path. Cleanup belongs to this worker so a launcher exit cannot leak it.
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
export async function fixture(createSqliteTestDirectory) {
|
|
5
|
+
const directory = await createSqliteTestDirectory("parity-");
|
|
6
|
+
await mkdir(join(directory, ".agents/records/lifecycle/views"), { recursive: true });
|
|
7
|
+
await mkdir(join(directory, ".agents/records/lifecycle/chunks"), { recursive: true });
|
|
8
|
+
await mkdir(join(directory, ".agents/config"), { recursive: true });
|
|
9
|
+
await writeFile(join(directory, ".agents/config/project.yaml"), "zaip:\n enabled: true\n");
|
|
10
|
+
await mkdir(join(directory, ".agents/config/agents"), { recursive: true });
|
|
11
|
+
await writeFile(
|
|
12
|
+
join(directory, ".agents/config/agents/catalog.yaml"),
|
|
13
|
+
"agents:\n - id: agent-a\n codex_name: agent-a\n persona: { nome: ana, cargo: quality_engineer }\n role: reviewer\n",
|
|
14
|
+
);
|
|
15
|
+
await mkdir(join(directory, ".agents/records/telemetry/2026/08/writers/w/chunks"), {
|
|
16
|
+
recursive: true,
|
|
17
|
+
});
|
|
18
|
+
const summary = (id, hash, occurred_at, segments) => ({
|
|
19
|
+
schema_version: 1,
|
|
20
|
+
agent_invocation_id: id,
|
|
21
|
+
summary_hash: hash,
|
|
22
|
+
root_agent_invocation_id: id,
|
|
23
|
+
parent_agent_invocation_id: null,
|
|
24
|
+
invocation_kind: "orchestrator",
|
|
25
|
+
delegation_depth: 0,
|
|
26
|
+
execution_id: null,
|
|
27
|
+
task_id: null,
|
|
28
|
+
spec_id: null,
|
|
29
|
+
prd_id: null,
|
|
30
|
+
change_id: null,
|
|
31
|
+
run_id: id,
|
|
32
|
+
occurred_at,
|
|
33
|
+
status: "completed",
|
|
34
|
+
coverage: "complete",
|
|
35
|
+
source_event_count: 1,
|
|
36
|
+
llm_call_count: 2,
|
|
37
|
+
historical_cost: { estimated_usd: 2, estimated_brl: 10 },
|
|
38
|
+
quantitative_coverage: { tokens: "complete", duration_ms: "complete" },
|
|
39
|
+
quantitative_metrics: {
|
|
40
|
+
duration_ms: { known_sum: 100 },
|
|
41
|
+
tokens_total: { known_sum: 15 },
|
|
42
|
+
estimated_usd: { known_sum: 2 },
|
|
43
|
+
estimated_brl: { known_sum: 10 },
|
|
44
|
+
},
|
|
45
|
+
usage_segments: segments,
|
|
46
|
+
});
|
|
47
|
+
const mixed = [
|
|
48
|
+
{
|
|
49
|
+
provider: "openai",
|
|
50
|
+
model: "a",
|
|
51
|
+
service_tier: null,
|
|
52
|
+
reasoning_effort: null,
|
|
53
|
+
coverage: "complete",
|
|
54
|
+
tokens: { input: 2, cached_input: 1, output: 3, reasoning: 4, total: 10 },
|
|
55
|
+
historical_cost: { estimated_usd: 1, estimated_brl: 5 },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
provider: "other",
|
|
59
|
+
model: "b",
|
|
60
|
+
service_tier: null,
|
|
61
|
+
reasoning_effort: null,
|
|
62
|
+
coverage: "complete",
|
|
63
|
+
tokens: { input: 5, cached_input: 0, output: 0, reasoning: 0, total: 5 },
|
|
64
|
+
historical_cost: { estimated_usd: 1, estimated_brl: 5 },
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
const canonical = {
|
|
68
|
+
...summary("AINV-edge", "hash-edge", "2026-08-01T01:00:00.000Z", mixed),
|
|
69
|
+
execution_id: "EXEC-a",
|
|
70
|
+
task_id: "TASK-a",
|
|
71
|
+
conversation_id: "CONV-a",
|
|
72
|
+
zaip_agent: "agent-a",
|
|
73
|
+
phase: "execution",
|
|
74
|
+
};
|
|
75
|
+
const augustBefore = {
|
|
76
|
+
...summary("AINV-aug-before", "hash-aug-before", "2026-08-05T04:00:00.000Z", mixed),
|
|
77
|
+
zaip_agent: "agent-a",
|
|
78
|
+
phase: "execution",
|
|
79
|
+
quantitative_metrics: {
|
|
80
|
+
duration_ms: { known_sum: 200 },
|
|
81
|
+
tokens_total: { known_sum: 15 },
|
|
82
|
+
estimated_usd: { known_sum: 2 },
|
|
83
|
+
estimated_brl: { known_sum: 10 },
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const unavailable = {
|
|
87
|
+
...summary("AINV-unavailable", "hash-unavailable", "2026-08-15T04:00:00.000Z", []),
|
|
88
|
+
llm_call_count: null,
|
|
89
|
+
status: "failed",
|
|
90
|
+
zaip_agent: "agent-b",
|
|
91
|
+
phase: "review",
|
|
92
|
+
historical_cost: null,
|
|
93
|
+
quantitative_coverage: { tokens: "unavailable", duration_ms: "unavailable" },
|
|
94
|
+
quantitative_metrics: {
|
|
95
|
+
duration_ms: { known_sum: null },
|
|
96
|
+
tokens_total: { known_sum: null },
|
|
97
|
+
estimated_usd: { known_sum: null },
|
|
98
|
+
estimated_brl: { known_sum: null },
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
const augustInside = {
|
|
102
|
+
...summary("AINV-aug-inside", "hash-aug-inside", "2026-08-20T04:00:00.000Z", mixed),
|
|
103
|
+
zaip_agent: "agent-a",
|
|
104
|
+
phase: "execution",
|
|
105
|
+
quantitative_metrics: {
|
|
106
|
+
duration_ms: { known_sum: 300 },
|
|
107
|
+
tokens_total: { known_sum: 15 },
|
|
108
|
+
estimated_usd: { known_sum: 2 },
|
|
109
|
+
estimated_brl: { known_sum: 10 },
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
const lifecycle = [
|
|
113
|
+
{
|
|
114
|
+
operation: "upsert",
|
|
115
|
+
entity: {
|
|
116
|
+
kind: "task",
|
|
117
|
+
id: "TASK-a",
|
|
118
|
+
updated_at: "2026-07-31T22:00:00.000Z",
|
|
119
|
+
data: {
|
|
120
|
+
title: "Causal task",
|
|
121
|
+
status: "active",
|
|
122
|
+
risk: "critical",
|
|
123
|
+
created_at: "2026-07-31T22:00:00.000Z",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
operation: "upsert",
|
|
129
|
+
entity: {
|
|
130
|
+
kind: "task",
|
|
131
|
+
id: "TASK-zero",
|
|
132
|
+
updated_at: "2026-08-10T22:00:00.000Z",
|
|
133
|
+
data: {
|
|
134
|
+
title: "Task without invocation",
|
|
135
|
+
status: "ready",
|
|
136
|
+
risk: "lite",
|
|
137
|
+
created_at: "2026-08-10T22:00:00.000Z",
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
operation: "upsert",
|
|
143
|
+
entity: {
|
|
144
|
+
kind: "spec",
|
|
145
|
+
id: "SPEC-zero",
|
|
146
|
+
updated_at: "2026-08-10T22:00:00.000Z",
|
|
147
|
+
data: {
|
|
148
|
+
title: "SPEC without invocation",
|
|
149
|
+
status: "ready",
|
|
150
|
+
risk: "lite",
|
|
151
|
+
created_at: "2026-08-10T22:00:00.000Z",
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
operation: "upsert",
|
|
157
|
+
entity: {
|
|
158
|
+
kind: "prd",
|
|
159
|
+
id: "PRD-zero",
|
|
160
|
+
updated_at: "2026-08-10T22:00:00.000Z",
|
|
161
|
+
data: {
|
|
162
|
+
title: "PRD without invocation",
|
|
163
|
+
status: "ready",
|
|
164
|
+
risk: "lite",
|
|
165
|
+
created_at: "2026-08-10T22:00:00.000Z",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
operation: "upsert",
|
|
171
|
+
entity: {
|
|
172
|
+
kind: "execution",
|
|
173
|
+
id: "EXEC-a",
|
|
174
|
+
updated_at: "2026-07-31T22:00:00.000Z",
|
|
175
|
+
data: { status: "completed", created_at: "2026-07-31T22:00:00.000Z" },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
operation: "upsert",
|
|
180
|
+
entity: {
|
|
181
|
+
kind: "conversation",
|
|
182
|
+
id: "CONV-a",
|
|
183
|
+
updated_at: "2026-07-31T22:00:00.000Z",
|
|
184
|
+
data: { status: "active", created_at: "2026-07-31T22:00:00.000Z" },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
operation: "upsert",
|
|
189
|
+
entity: {
|
|
190
|
+
kind: "decision",
|
|
191
|
+
id: "DEC-edge",
|
|
192
|
+
updated_at: "2026-07-31T22:00:00.000Z",
|
|
193
|
+
data: { status: "accepted", risk: "standard", created_at: "2026-07-31T22:00:00.000Z" },
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
operation: "upsert",
|
|
198
|
+
entity: {
|
|
199
|
+
kind: "change",
|
|
200
|
+
id: "CHG-edge",
|
|
201
|
+
updated_at: "2026-07-31T22:00:00.000Z",
|
|
202
|
+
data: { status: "active", risk: "critical", created_at: "2026-07-31T22:00:00.000Z" },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
];
|
|
206
|
+
await writeFile(
|
|
207
|
+
join(directory, ".agents/records/lifecycle/chunks/entities.jsonl"),
|
|
208
|
+
`${lifecycle.map(JSON.stringify).join("\n")}\n`,
|
|
209
|
+
);
|
|
210
|
+
await writeFile(
|
|
211
|
+
join(directory, ".agents/records/telemetry/2026/08/writers/w/chunks/c.jsonl"),
|
|
212
|
+
`${JSON.stringify(canonical)}\n${JSON.stringify(canonical)}\n${JSON.stringify(augustBefore)}\n${JSON.stringify(unavailable)}\n${JSON.stringify(augustInside)}\n`,
|
|
213
|
+
);
|
|
214
|
+
await writeFile(
|
|
215
|
+
join(directory, ".agents/records/telemetry/2026/08/writers/w/manifest.json"),
|
|
216
|
+
JSON.stringify({
|
|
217
|
+
chunks: [{ path: ".agents/records/telemetry/2026/08/writers/w/chunks/c.jsonl" }],
|
|
218
|
+
}),
|
|
219
|
+
);
|
|
220
|
+
const canonicalRun = ({
|
|
221
|
+
runId,
|
|
222
|
+
invocationId,
|
|
223
|
+
occurredAt,
|
|
224
|
+
duration,
|
|
225
|
+
status = "completed",
|
|
226
|
+
agent = "agent-a",
|
|
227
|
+
phase = "execution",
|
|
228
|
+
executionId = null,
|
|
229
|
+
taskId = null,
|
|
230
|
+
conversationId,
|
|
231
|
+
segments = [],
|
|
232
|
+
}) => {
|
|
233
|
+
const started = {
|
|
234
|
+
schema_version: 2,
|
|
235
|
+
event_id: `${runId}:000001`,
|
|
236
|
+
run_id: runId,
|
|
237
|
+
sequence: 1,
|
|
238
|
+
occurred_at: occurredAt,
|
|
239
|
+
type: "run.started",
|
|
240
|
+
attribution_status: "attributed",
|
|
241
|
+
phase,
|
|
242
|
+
run_role: "orchestrator",
|
|
243
|
+
run_purpose: phase === "execution" ? "execution" : "orchestration",
|
|
244
|
+
requires_finalizer: false,
|
|
245
|
+
execution_kind: phase === "execution" ? "delivery" : "interaction",
|
|
246
|
+
execution_eligibility: [phase === "execution" ? "delivery" : "interaction"],
|
|
247
|
+
entrypoint: taskId === null ? "conversation" : "task",
|
|
248
|
+
work_type: "new",
|
|
249
|
+
storage_mode: "tracked_sanitized",
|
|
250
|
+
client: "codex",
|
|
251
|
+
agent,
|
|
252
|
+
agent_name: agent,
|
|
253
|
+
provider: segments.length > 0 ? segments[0].provider : null,
|
|
254
|
+
model: segments.length > 0 ? segments[0].model : "unknown",
|
|
255
|
+
reasoning_effort: null,
|
|
256
|
+
client_thread_id: `thread-${runId}`,
|
|
257
|
+
client_turn_id: `turn-${runId}`,
|
|
258
|
+
conversation_id: conversationId,
|
|
259
|
+
execution_id: executionId,
|
|
260
|
+
task_id: taskId,
|
|
261
|
+
spec_id: null,
|
|
262
|
+
prd_id: null,
|
|
263
|
+
change_id: null,
|
|
264
|
+
parent_run_id: null,
|
|
265
|
+
continuation_of_run_id: null,
|
|
266
|
+
retry_of_run_id: null,
|
|
267
|
+
...(invocationId === null
|
|
268
|
+
? {}
|
|
269
|
+
: {
|
|
270
|
+
agent_invocation_id: invocationId,
|
|
271
|
+
root_agent_invocation_id: invocationId,
|
|
272
|
+
parent_agent_invocation_id: null,
|
|
273
|
+
invocation_kind: "orchestrator",
|
|
274
|
+
delegation_depth: 0,
|
|
275
|
+
}),
|
|
276
|
+
};
|
|
277
|
+
const usage = segments.map((segment, index) => ({
|
|
278
|
+
schema_version: 2,
|
|
279
|
+
event_id: `${runId}:${String(index + 2).padStart(6, "0")}`,
|
|
280
|
+
run_id: runId,
|
|
281
|
+
sequence: index + 2,
|
|
282
|
+
occurred_at: occurredAt,
|
|
283
|
+
type: "usage.recorded",
|
|
284
|
+
phase,
|
|
285
|
+
activity_kind: "model_usage",
|
|
286
|
+
classification_source: "explicit",
|
|
287
|
+
tokens: { ...segment.tokens, source: "provider_reported" },
|
|
288
|
+
cost: { usd: segment.cost.usd, brl: segment.cost.brl, fx_rate: 5 },
|
|
289
|
+
provider: segment.provider,
|
|
290
|
+
model: segment.model,
|
|
291
|
+
source_segment_key: `${runId}:${index}`,
|
|
292
|
+
model_call_id: `MCALL-${runId}-${index}`,
|
|
293
|
+
runtime: { reasoning_effort: null, service_tier: null },
|
|
294
|
+
supersedes_event_id: null,
|
|
295
|
+
duration_ms: null,
|
|
296
|
+
duration_provenance: null,
|
|
297
|
+
}));
|
|
298
|
+
const finished = {
|
|
299
|
+
schema_version: 2,
|
|
300
|
+
event_id: `${runId}:${String(usage.length + 2).padStart(6, "0")}`,
|
|
301
|
+
run_id: runId,
|
|
302
|
+
sequence: usage.length + 2,
|
|
303
|
+
occurred_at: occurredAt,
|
|
304
|
+
type: "run.finished",
|
|
305
|
+
phase,
|
|
306
|
+
status,
|
|
307
|
+
duration_ms: duration,
|
|
308
|
+
duration_provenance: duration === null ? "unavailable" : "observed",
|
|
309
|
+
};
|
|
310
|
+
return `${[...[started], ...usage, finished].map(JSON.stringify).join("\n")}\n`;
|
|
311
|
+
};
|
|
312
|
+
await mkdir(join(directory, ".agents/records/runs/2026/07"), { recursive: true });
|
|
313
|
+
await mkdir(join(directory, ".agents/records/runs/2026/08"), { recursive: true });
|
|
314
|
+
const canonicalSegments = [
|
|
315
|
+
{
|
|
316
|
+
provider: "openai",
|
|
317
|
+
model: "a",
|
|
318
|
+
tokens: { input: 2, cached_input: 1, output: 3, reasoning: 4, total: 10 },
|
|
319
|
+
cost: { usd: 1, brl: 5 },
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
provider: "other",
|
|
323
|
+
model: "b",
|
|
324
|
+
tokens: { input: 5, cached_input: 0, output: 0, reasoning: 0, total: 5 },
|
|
325
|
+
cost: { usd: 1, brl: 5 },
|
|
326
|
+
},
|
|
327
|
+
];
|
|
328
|
+
const runs = [
|
|
329
|
+
[
|
|
330
|
+
"2026/07/RUN-edge.jsonl",
|
|
331
|
+
{
|
|
332
|
+
runId: "RUN-edge",
|
|
333
|
+
invocationId: "AINV-edge",
|
|
334
|
+
occurredAt: "2026-08-01T01:00:00.000Z",
|
|
335
|
+
duration: 100,
|
|
336
|
+
executionId: "EXEC-a",
|
|
337
|
+
taskId: "TASK-a",
|
|
338
|
+
conversationId: "CONV-a",
|
|
339
|
+
segments: canonicalSegments,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
[
|
|
343
|
+
"2026/08/RUN-aug-before.jsonl",
|
|
344
|
+
{
|
|
345
|
+
runId: "RUN-aug-before",
|
|
346
|
+
invocationId: "AINV-aug-before",
|
|
347
|
+
occurredAt: "2026-08-05T04:00:00.000Z",
|
|
348
|
+
duration: 200,
|
|
349
|
+
executionId: "EXEC-before",
|
|
350
|
+
conversationId: "CONV-before",
|
|
351
|
+
segments: canonicalSegments,
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
[
|
|
355
|
+
"2026/08/RUN-unavailable.jsonl",
|
|
356
|
+
{
|
|
357
|
+
runId: "RUN-unavailable",
|
|
358
|
+
invocationId: "AINV-unavailable",
|
|
359
|
+
occurredAt: "2026-08-15T04:00:00.000Z",
|
|
360
|
+
duration: null,
|
|
361
|
+
status: "failed",
|
|
362
|
+
agent: "agent-b",
|
|
363
|
+
phase: "conversation",
|
|
364
|
+
conversationId: "CONV-unavailable",
|
|
365
|
+
segments: [],
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
[
|
|
369
|
+
"2026/08/RUN-aug-inside.jsonl",
|
|
370
|
+
{
|
|
371
|
+
runId: "RUN-aug-inside",
|
|
372
|
+
invocationId: "AINV-aug-inside",
|
|
373
|
+
occurredAt: "2026-08-20T04:00:00.000Z",
|
|
374
|
+
duration: 300,
|
|
375
|
+
executionId: "EXEC-inside",
|
|
376
|
+
conversationId: "CONV-inside",
|
|
377
|
+
segments: canonicalSegments,
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
[
|
|
381
|
+
"2026/08/RUN-unassisted.jsonl",
|
|
382
|
+
{
|
|
383
|
+
runId: "RUN-unassisted",
|
|
384
|
+
invocationId: null,
|
|
385
|
+
occurredAt: "2026-08-20T05:00:00.000Z",
|
|
386
|
+
duration: null,
|
|
387
|
+
agent: "root",
|
|
388
|
+
phase: "conversation",
|
|
389
|
+
conversationId: "CONV-unassisted",
|
|
390
|
+
segments: [],
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
];
|
|
394
|
+
for (const [path, value] of runs)
|
|
395
|
+
await writeFile(join(directory, ".agents/records/runs", path), canonicalRun(value));
|
|
396
|
+
return directory;
|
|
397
|
+
}
|