@zaip-ai/cli 3.0.0 → 3.1.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.
Files changed (72) hide show
  1. package/dist/services/adapters.d.ts +1 -1
  2. package/dist/services/adapters.js +1 -1
  3. package/package.json +1 -1
  4. package/templates/.agents/README-ENG.md +5 -1
  5. package/templates/.agents/README.md +5 -1
  6. package/templates/.agents/config/agents/discovery.json +1 -1
  7. package/templates/.agents/dashboard/.zaip-managed.json +61 -37
  8. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-TnrL1ZyZ.js → DashboardHelpDialog-DIWDmvAS.js} +26 -11
  9. package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-DjQpBqGU.js → PricingSettingsDialog-BBRBKaHa.js} +1 -1
  10. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-BQZXUnQu.js → TraceabilityWorkspace-C9dDhj34.js} +1 -1
  11. package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-Basaw1NR.js → dashboard-localization-CoAVMZN6.js} +5 -1
  12. package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-BQe3zTvL.js → index-BVzw_Wux.js} +2 -2
  13. package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
  14. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  15. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  16. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  17. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  18. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  19. package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
  20. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  21. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +182 -160
  22. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +174 -152
  23. package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
  24. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +182 -160
  25. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-calendar.ts +17 -0
  26. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cold-parse.test.ts +78 -0
  27. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.test.ts +94 -0
  28. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +5 -5
  29. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-duration-lookup.test.ts +59 -0
  30. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-entity-label-views.test.ts +72 -0
  31. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-runs.ts +3 -4
  32. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.test.ts +171 -0
  33. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.ts +36 -16
  34. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical-parsing.ts +7 -0
  35. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +5 -15
  36. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +1 -1
  37. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +2 -0
  38. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +3 -2
  39. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +1 -1
  40. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +22 -14
  41. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  42. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  43. package/templates/.agents/design/.zaip-managed.json +3 -3
  44. package/templates/.agents/design/apps/catalog/package.json +1 -1
  45. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  46. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  47. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
  48. package/templates/.agents/requirements/comparative-audit.md +1 -1
  49. package/templates/.agents/requirements/context-engine.md +1 -1
  50. package/templates/.agents/requirements/cost-observability.md +1 -1
  51. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  52. package/templates/.agents/requirements/data-export.md +1 -1
  53. package/templates/.agents/requirements/design-system.md +1 -1
  54. package/templates/.agents/requirements/execution-engine.md +1 -1
  55. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  56. package/templates/.agents/requirements/model-orchestration.md +1 -1
  57. package/templates/.agents/requirements/public-distribution.md +1 -1
  58. package/templates/.agents/requirements/software-architecture.md +1 -1
  59. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  60. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  61. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  62. package/templates/.agents/runtime/VERSION +1 -1
  63. package/templates/.agents/runtime/bin/zaip.mjs +5 -5
  64. package/templates/.agents/runtime/checksums.sha256 +5 -5
  65. package/templates/.agents/runtime/manifest.json +1 -1
  66. package/templates/.agents/runtime/provenance.json +4 -4
  67. package/templates/.agents/runtime/sbom.cdx.json +1 -1
  68. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +17 -12
  69. package/templates/.agents/zaip-aios/README.md +4 -3
  70. package/templates/.agents/zaip-aios/VERSION +1 -1
  71. package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +20 -9
  72. package/templates/template-manifest.json +97 -73
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  consolidatedValue,
3
3
  frontMatterRecord,
4
+ isCanonicalLifecyclePath,
4
5
  recordValue,
5
6
  stringValue,
6
7
  stringValues,
@@ -23,6 +24,9 @@ import {
23
24
  type PricingCatalog,
24
25
  } from "@zaip-ai/costs";
25
26
  import type { RunV2Fold, UsageRecordedV2 } from "../../../../../packages/decisions/src/index.js";
27
+ import { saoPauloDay } from "./sqlite-calendar.js";
28
+
29
+ export { saoPauloDay } from "./sqlite-calendar.js";
26
30
 
27
31
  const MAX_RECONCILED_RUN_INTERVAL_MS = 2 * 3_600_000;
28
32
 
@@ -112,6 +116,7 @@ export function readCanonicalLifecycleRecords(rows: Array<{ path: string; conten
112
116
  const changes: CanonicalChange[] = [];
113
117
  const decisions: CanonicalDecision[] = [];
114
118
  for (const row of rows) {
119
+ if (!isCanonicalLifecyclePath(row.path)) continue;
115
120
  const metadata = frontMatterRecord(row.content);
116
121
  if (metadata === null) continue;
117
122
  const id = stringValue(metadata.id);
@@ -689,21 +694,6 @@ export function usagePricingAudit(
689
694
  };
690
695
  }
691
696
 
692
- export function saoPauloDay(timestamp: string): string {
693
- const values = Object.fromEntries(
694
- new Intl.DateTimeFormat("en", {
695
- timeZone: "America/Sao_Paulo",
696
- year: "numeric",
697
- month: "2-digit",
698
- day: "2-digit",
699
- })
700
- .formatToParts(new Date(timestamp))
701
- .filter((part) => part.type !== "literal")
702
- .map((part) => [part.type, part.value]),
703
- ) as { year: string; month: string; day: string };
704
- return `${values.year}-${values.month}-${values.day}`;
705
- }
706
-
707
697
  export type TemporalInterval = { activityRowId: string; startMs: number; endMs: number };
708
698
 
709
699
  /**
@@ -210,7 +210,7 @@ describe("SQLite dashboard read model", () => {
210
210
  snapshot
211
211
  .prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='schema_version'")
212
212
  .get(),
213
- ).toEqual({ value: "78" });
213
+ ).toEqual({ value: "79" });
214
214
  } finally {
215
215
  snapshot.close();
216
216
  }
@@ -17,6 +17,7 @@ import {
17
17
  saoPauloDay,
18
18
  type TemporalInterval,
19
19
  } from "./sqlite-read-model-canonical.js";
20
+ import { isCanonicalLifecyclePath } from "./sqlite-read-model-canonical-parsing.js";
20
21
  import { reportSqliteReadModelLaunchProgress } from "./sqlite-read-model-launch-progress.js";
21
22
  import {
22
23
  hasReusableSnapshotPayloads,
@@ -628,6 +629,7 @@ export async function rebuildSqliteReadModel(
628
629
  decisions: [] as CanonicalDecision[],
629
630
  };
630
631
  for (const row of canonicalRows) {
632
+ if (!isCanonicalLifecyclePath(row.path)) continue;
631
633
  const parsed = parsedSources.read("lifecycle", row.path, sourceHashFor(row.path), () =>
632
634
  readCanonicalLifecycleRecords([row]),
633
635
  );
@@ -4,9 +4,9 @@ import { DatabaseSync } from "node:sqlite";
4
4
  import { hasRequiredFirstFoldPayloads } from "./sqlite-first-fold-persistence.js";
5
5
  import type { SqliteReadModelSourceCheckpoint } from "./sqlite-read-model-source-fingerprint.js";
6
6
  export const dbRelativePath = ".local/sqlite/zaip-aios-dashboard.sqlite";
7
- // Schema 78 aligns usage-segment providers with canonical activity providers.
7
+ // Schema 79 installs bounded execution/conversation label views and shared daily groups.
8
8
  // Old snapshots must rebuild even when their canonical hashes still match.
9
- export const readModelSchemaVersion = "78";
9
+ export const readModelSchemaVersion = "79";
10
10
  export const requiredPersistedTables = [
11
11
  "zaip_aios_activities",
12
12
  "zaip_dim_llm_model",
@@ -31,6 +31,7 @@ export const requiredIndexes = [
31
31
  "zaip_activities_period_invocation",
32
32
  "zaip_activities_status",
33
33
  "zaip_activities_payload",
34
+ "zaip_activities_duration_activity",
34
35
  "zaip_activities_file_path",
35
36
  "zaip_activities_work_item_identity",
36
37
  "cost_dimension_facts_day_model",
@@ -177,7 +177,7 @@ describe("SQLite dashboard read model", () => {
177
177
  metadata
178
178
  .prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='schema_version'")
179
179
  .get(),
180
- ).toEqual({ value: "78" });
180
+ ).toEqual({ value: "79" });
181
181
  } finally {
182
182
  metadata.close();
183
183
  }
@@ -16,6 +16,7 @@ export const baseViewSql = `
16
16
  WHERE agent_invocation_id IS NOT NULL;
17
17
  CREATE INDEX zaip_activities_status ON zaip_aios_activities(activity_source_kind, status, phase);
18
18
  CREATE INDEX IF NOT EXISTS zaip_activities_payload ON zaip_aios_activities(payload_type, activity_key);
19
+ CREATE INDEX zaip_activities_duration_activity ON zaip_aios_activities(CAST(json_extract(payload_json, '$.activity_row_id') AS TEXT)) WHERE payload_type='duration_allocation';
19
20
  -- File lookups must not parse every JSON payload (including its full
20
21
  -- content) on each read. The file view uses this path-only index for
21
22
  -- binary equality and cheap LIKE scans without changing their semantics.
@@ -33,12 +34,13 @@ export const baseViewSql = `
33
34
  CREATE VIEW attributed_token_active_facts AS SELECT json_extract(payload_json, '$.activity_row_id') AS activity_row_id, json_extract(payload_json, '$.occurred_day_sp') AS occurred_day_sp, json_extract(payload_json, '$.attributed_token_active_ms') AS attributed_token_active_ms FROM zaip_aios_activities WHERE payload_type='duration_allocation';
34
35
  CREATE VIEW canonical_artifacts AS SELECT artifact_kind, artifact_id, artifact_occurred_at AS occurred_at, artifact_occurred_day_sp AS occurred_day_sp, artifact_task_id AS task_id, artifact_change_id AS change_id, artifact_run_id AS run_id, path AS source_path FROM files WHERE artifact_kind IS NOT NULL AND artifact_occurred_at IS NOT NULL;
35
36
  CREATE VIEW activities AS
36
- SELECT a.*, f.attributed_token_active_ms
37
+ SELECT a.*, (
38
+ SELECT SUM(json_extract(f.payload_json, '$.attributed_token_active_ms'))
39
+ FROM zaip_aios_activities f INDEXED BY zaip_activities_duration_activity
40
+ WHERE f.payload_type='duration_allocation'
41
+ AND CAST(json_extract(f.payload_json, '$.activity_row_id') AS TEXT)=a.activity_row_id
42
+ ) AS attributed_token_active_ms
37
43
  FROM zaip_aios_activities a
38
- LEFT JOIN (
39
- SELECT activity_row_id, SUM(attributed_token_active_ms) AS attributed_token_active_ms
40
- FROM attributed_token_active_facts GROUP BY activity_row_id
41
- ) f USING(activity_row_id)
42
44
  WHERE a.payload_type IS NULL;
43
45
  -- Macro-only allocations are persisted as technical payloads to keep
44
46
  -- the global Run population unique. SPEC summaries opt into this
@@ -68,21 +70,27 @@ export const baseViewSql = `
68
70
  CREATE VIEW specs AS SELECT id, title, status, risk, occurred_at, occurred_day_sp FROM work_items WHERE entity_kind = 'spec';
69
71
  CREATE VIEW prds AS SELECT id, title, status, risk, occurred_at, occurred_day_sp FROM work_items WHERE entity_kind = 'prd';
70
72
  CREATE VIEW executions AS
71
- SELECT id, status, created_at AS occurred_at, occurred_day_sp FROM canonical_executions
73
+ WITH projected_executions AS MATERIALIZED (
74
+ SELECT id, status, created_at, occurred_day_sp FROM canonical_executions
75
+ )
76
+ SELECT id, status, created_at AS occurred_at, occurred_day_sp FROM projected_executions
72
77
  UNION ALL
73
78
  SELECT execution_id, MAX(status), MIN(occurred_at), MIN(occurred_day_sp)
74
- FROM activities
75
- WHERE execution_id IS NOT NULL
76
- AND NOT EXISTS (SELECT 1 FROM canonical_executions c WHERE c.id=activities.execution_id)
79
+ FROM zaip_aios_activities
80
+ WHERE payload_type IS NULL AND execution_id IS NOT NULL
81
+ AND NOT EXISTS (SELECT 1 FROM projected_executions c WHERE c.id=zaip_aios_activities.execution_id)
77
82
  GROUP BY execution_id;
78
83
  CREATE VIEW conversations AS
84
+ WITH projected_executions AS MATERIALIZED (
85
+ SELECT status, created_at, occurred_day_sp, origin_type, origin_id FROM canonical_executions
86
+ )
79
87
  SELECT origin_id AS id, MAX(status) AS status, MIN(created_at) AS occurred_at, MIN(occurred_day_sp) AS occurred_day_sp
80
- FROM canonical_executions WHERE origin_type='interaction' AND origin_id IS NOT NULL GROUP BY origin_id
88
+ FROM projected_executions WHERE origin_type='interaction' AND origin_id IS NOT NULL GROUP BY origin_id
81
89
  UNION ALL
82
90
  SELECT conversation_id, MAX(status), MIN(occurred_at), MIN(occurred_day_sp)
83
- FROM activities
84
- WHERE conversation_id IS NOT NULL
85
- AND NOT EXISTS (SELECT 1 FROM canonical_executions c WHERE c.origin_type='interaction' AND c.origin_id=activities.conversation_id)
91
+ FROM zaip_aios_activities
92
+ WHERE payload_type IS NULL AND conversation_id IS NOT NULL
93
+ AND NOT EXISTS (SELECT 1 FROM projected_executions c WHERE c.origin_type='interaction' AND c.origin_id=zaip_aios_activities.conversation_id)
86
94
  GROUP BY conversation_id;
87
95
  CREATE VIEW decisions AS SELECT id, title, origin, scope_type, scope_id, NULL AS status, NULL AS risk, created_at AS occurred_at, occurred_day_sp, source_path FROM canonical_decisions;
88
96
  CREATE VIEW changes AS SELECT id, title, status, risk, source_type, source_id, requirement_ids_json, acceptance_ids_json, task_ids_json, result, created_at AS occurred_at, occurred_day_sp, source_path FROM canonical_changes;
@@ -281,7 +289,7 @@ export const baseViewSql = `
281
289
  -- SPEC/PRD rows have the same canonical population as the big
282
290
  -- numbers. A macro without direct invocation remains visible with
283
291
  -- factual NULL usage/cost/time, never a fabricated zero.
284
- CREATE VIEW cost_monitor_group_daily_cache AS SELECT occurred_day_sp AS day, 'execution' AS group_kind, execution_id AS group_value, COUNT(*) AS invocation_count, SUM(llm_call_count) AS llm_call_count, SUM(duration_ms) AS total_duration, SUM(input_tokens) AS total_input_tokens, SUM(cached_input_tokens) AS total_cached_input_tokens, SUM(output_tokens) AS total_output_tokens, SUM(reasoning_tokens) AS total_reasoning_tokens, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM invocations WHERE execution_id IS NOT NULL GROUP BY occurred_day_sp, execution_id UNION ALL SELECT occurred_day_sp, 'zaip_agent', zaip_agent, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE zaip_agent IS NOT NULL GROUP BY occurred_day_sp, zaip_agent UNION ALL SELECT occurred_day_sp, 'provider', provider, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE provider IS NOT NULL GROUP BY occurred_day_sp, provider UNION ALL SELECT occurred_day_sp, 'model', model, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE model IS NOT NULL GROUP BY occurred_day_sp, model UNION ALL SELECT occurred_day_sp, 'task', task_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE task_id IS NOT NULL GROUP BY occurred_day_sp, task_id UNION ALL SELECT occurred_day_sp, 'spec', spec_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE spec_id IS NOT NULL GROUP BY occurred_day_sp, spec_id UNION ALL SELECT occurred_day_sp, 'prd', prd_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE prd_id IS NOT NULL GROUP BY occurred_day_sp, prd_id UNION ALL SELECT occurred_day_sp, 'conversation', conversation_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM invocations WHERE conversation_id IS NOT NULL GROUP BY occurred_day_sp, conversation_id;
292
+ CREATE VIEW cost_monitor_group_daily_cache AS WITH group_invocations AS MATERIALIZED (SELECT occurred_day_sp, execution_id, zaip_agent, provider, model, task_id, spec_id, prd_id, conversation_id, llm_call_count, duration_ms, input_tokens, cached_input_tokens, output_tokens, reasoning_tokens, total_tokens, cost_usd, cost_brl FROM invocations) SELECT occurred_day_sp AS day, 'execution' AS group_kind, execution_id AS group_value, COUNT(*) AS invocation_count, SUM(llm_call_count) AS llm_call_count, SUM(duration_ms) AS total_duration, SUM(input_tokens) AS total_input_tokens, SUM(cached_input_tokens) AS total_cached_input_tokens, SUM(output_tokens) AS total_output_tokens, SUM(reasoning_tokens) AS total_reasoning_tokens, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM group_invocations WHERE execution_id IS NOT NULL GROUP BY occurred_day_sp, execution_id UNION ALL SELECT occurred_day_sp, 'zaip_agent', zaip_agent, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE zaip_agent IS NOT NULL GROUP BY occurred_day_sp, zaip_agent UNION ALL SELECT occurred_day_sp, 'provider', provider, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE provider IS NOT NULL GROUP BY occurred_day_sp, provider UNION ALL SELECT occurred_day_sp, 'model', model, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE model IS NOT NULL GROUP BY occurred_day_sp, model UNION ALL SELECT occurred_day_sp, 'task', task_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE task_id IS NOT NULL GROUP BY occurred_day_sp, task_id UNION ALL SELECT occurred_day_sp, 'spec', spec_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE spec_id IS NOT NULL GROUP BY occurred_day_sp, spec_id UNION ALL SELECT occurred_day_sp, 'prd', prd_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE prd_id IS NOT NULL GROUP BY occurred_day_sp, prd_id UNION ALL SELECT occurred_day_sp, 'conversation', conversation_id, COUNT(*), SUM(llm_call_count), SUM(duration_ms), SUM(input_tokens), SUM(cached_input_tokens), SUM(output_tokens), SUM(reasoning_tokens), SUM(total_tokens), SUM(cost_usd), SUM(cost_brl) FROM group_invocations WHERE conversation_id IS NOT NULL GROUP BY occurred_day_sp, conversation_id;
285
293
  CREATE VIEW daily_aggregates AS SELECT * FROM daily_aggregate_cache;
286
294
  CREATE VIEW overview AS
287
295
  SELECT 'day' AS period_kind, day AS period_key, day AS start_day, day AS end_day, prd_count, spec_count, task_count, validation_count, evidence_count, activity_count, root_run_count, sub_run_count, total_run_count, invocation_count, cost_monitor_invocation_count, llm_call_count, source_event_count, total_root_run_duration, total_sub_run_duration, operations_total_duration, cost_monitor_total_duration, total_duration, total_tokens, total_cost_usd, total_cost_brl FROM daily_aggregates
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaip-ai/dashboard-ui",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaip-ai/dashboard-e2e",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "files": [
5
5
  {
6
6
  "path": "DESIGN.md",
@@ -252,7 +252,7 @@
252
252
  },
253
253
  {
254
254
  "path": "apps/catalog/package.json",
255
- "sha256": "f7691218b679609a07adc311a1ab5861aee4e636a848985a4590f13a0c13008f"
255
+ "sha256": "a45ba240bcd98a6b1262fbab6751fcf82482b24b9453b02d848b8ebad2842912"
256
256
  },
257
257
  {
258
258
  "path": "apps/catalog/public/logo_novo_azul.png",
@@ -352,7 +352,7 @@
352
352
  },
353
353
  {
354
354
  "path": "packages/local-runtime/package.json",
355
- "sha256": "39f18ddf46b11fc8894c3200673a65076c573c63305d990c2fbd192cd98db91c"
355
+ "sha256": "1204ee6904229503041f1c17bb4bb135b89566ea6431aebd2cc627d647da9656"
356
356
  },
357
357
  {
358
358
  "path": "packages/local-runtime/runtime.mjs",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaip-ai/design-catalog",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaip-ai/design-local-runtime",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -6,7 +6,7 @@ title: Garantia adaptativa e execução autônoma
6
6
  status: active
7
7
  version: 3
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Garantia adaptativa e execução autônoma
@@ -6,7 +6,7 @@ title: Autonomia delimitada para Cloudflare e Hostinger
6
6
  status: proposed
7
7
  version: 1
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Cloudflare e Hostinger (proposta de requisito)
@@ -6,7 +6,7 @@ title: Auditoria comparativa e plano de evolução
6
6
  status: active
7
7
  version: 1
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Auditoria comparativa e plano de evolução
@@ -6,7 +6,7 @@ title: Contexto mínimo, seguro e navegável
6
6
  status: active
7
7
  version: 8
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Context engine
@@ -6,7 +6,7 @@ title: Tokens, custos e cobertura
6
6
  status: active
7
7
  version: 10
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Cost observability
@@ -6,7 +6,7 @@ title: Inicialização e hidratação confiável do dashboard
6
6
  status: active
7
7
  version: 1
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Inicialização e hidratação confiável do dashboard
@@ -6,7 +6,7 @@ title: Exportação contextual de dados para Excel
6
6
  status: proposed
7
7
  version: 2
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Exportação contextual de dados
@@ -6,7 +6,7 @@ title: Contrato visual e catálogo executável
6
6
  status: active
7
7
  version: 5
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Design system
@@ -6,7 +6,7 @@ title: Preparação, materialização e DAG
6
6
  status: active
7
7
  version: 11
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Execution engine
@@ -6,7 +6,7 @@ title: Projeções operacionais e analíticas
6
6
  status: active
7
7
  version: 14
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Kanban and dashboard
@@ -6,7 +6,7 @@ title: Seleção automática e observável de modelo e effort
6
6
  status: active
7
7
  version: 8
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Orquestração de modelos
@@ -6,7 +6,7 @@ title: Distribuição pública e ativação
6
6
  status: active
7
7
  version: 5
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Distribuição pública e ativação
@@ -6,7 +6,7 @@ title: Layout modular e limites de código-fonte
6
6
  status: active
7
7
  version: 5
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Software architecture
@@ -6,7 +6,7 @@ title: Melhorias estratégicas de custo, qualidade e resiliência
6
6
  status: active
7
7
  version: 1
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Melhorias estratégicas de custo, qualidade e resiliência
@@ -6,7 +6,7 @@ title: Ciclo de vida do trabalho
6
6
  status: active
7
7
  version: 26
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Work lifecycle
@@ -6,7 +6,7 @@ title: Evidências, custo por Task e autonomia por SPEC
6
6
  status: active
7
7
  version: 1
8
8
  source_change: null
9
- source_release: "3.0.0"
9
+ source_release: "3.1.0"
10
10
  ---
11
11
 
12
12
  # Evidências, custo por Task e autonomia por SPEC
@@ -1 +1 @@
1
- 3.0.0
1
+ 3.1.0