@zaip-ai/cli 1.3.5 → 1.3.7
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/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +18 -2
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/sqlite-bootstrap.d.ts +29 -0
- package/dist/services/sqlite-bootstrap.d.ts.map +1 -0
- package/dist/services/sqlite-bootstrap.js +141 -0
- package/dist/services/sqlite-bootstrap.js.map +1 -0
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +2 -0
- package/dist/services/template-manifest.js.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/architecture/.gitkeep +0 -0
- package/templates/.agents/branding/.gitkeep +0 -0
- package/templates/.agents/dashboard/.zaip-managed.json +51 -39
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-D1mpyYwh.js → CostCalculationGuidePage-DwVZOmMV.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-CKO47D5s.js → DashboardHelpDialog--czwAlcH.js} +723 -723
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-BuSlCbyZ.js → PricingSettingsDialog-CyjMXkm8.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-CUHFkAhZ.js → ProjectSettingsPage-B_Oj6Dlf.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-BmASq2gW.js → TraceabilityWorkspace-CAqYVin1.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{cost-monitor-Csj6LiAt.js → cost-monitor-C09KmlSw.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-VyTTl_ph.js → icons-vendor-DXBOtWNI.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-CblPpexd.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-CTC6vtln.js → react-vendor-DaNXQPyk.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-9Mtvbwrg.js → traceability-I4AKqVDX.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +5 -5
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +17 -8
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +8 -3
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +19 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +8 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +7 -4
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsFilteredStatusDialog.tsx +131 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +2 -133
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.status-cards.test.ts +13 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-prerequisites.mjs +40 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-prerequisites.test.mjs +46 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +33 -26
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +5 -8
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-loading.spec.ts +4 -6
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-period-transition.spec.ts +37 -17
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +5 -3
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +12 -5
- package/templates/.agents/growth/.gitkeep +0 -0
- package/templates/.agents/marketing/.gitkeep +0 -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/sales/.gitkeep +0 -0
- package/templates/README.md +722 -0
- package/templates/template-manifest.json +84 -85
- package/templates/.agents/architecture/software-architecture.md +0 -131
- package/templates/.agents/branding/brandbook.docx +0 -0
- package/templates/.agents/branding/brandbook.md +0 -60
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DIwDvCu5.js +0 -2
- package/templates/.agents/growth/estrategia-bootstrap-90-dias.md +0 -169
- package/templates/.agents/growth/strategy.md +0 -27
- package/templates/.agents/marketing/estrategia-marketing-zaip-90-dias.md +0 -197
- package/templates/.agents/marketing/strategy.md +0 -29
- package/templates/.agents/sales/playbook.md +0 -32
- package/templates/.agents/sales/roteiro-comercial-zaip.md +0 -252
|
@@ -8,12 +8,13 @@ test("refreshes Cost Monitor within five seconds when Todo o Período is selecte
|
|
|
8
8
|
page,
|
|
9
9
|
}) => {
|
|
10
10
|
await openDashboard(page);
|
|
11
|
+
await selectThisMonth(page);
|
|
11
12
|
await openCostMonitor(page);
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
+
const summaryRequest = waitForCostSummaryRequest(page, "all");
|
|
14
15
|
const startedAt = Date.now();
|
|
15
16
|
await periodControl(page).selectOption("all");
|
|
16
|
-
await
|
|
17
|
+
await summaryRequest;
|
|
17
18
|
await expectCostMonitorReady(page);
|
|
18
19
|
|
|
19
20
|
expect(Date.now() - startedAt).toBeLessThan(fiveSeconds);
|
|
@@ -31,22 +32,23 @@ test("loads Cost Monitor within five seconds when the user enters after choosing
|
|
|
31
32
|
.click();
|
|
32
33
|
await expect(periodControl(page)).toBeVisible();
|
|
33
34
|
|
|
35
|
+
await selectThisMonth(page);
|
|
36
|
+
const summary = waitForCostSummary(page, "all");
|
|
34
37
|
await periodControl(page).selectOption("all");
|
|
38
|
+
await summary;
|
|
35
39
|
await expect(page.locator(".period-transition-overlay")).toHaveCount(0, { timeout: 60_000 });
|
|
36
40
|
|
|
37
|
-
const summary = waitForCostSummary(page, "all");
|
|
38
41
|
const startedAt = Date.now();
|
|
39
42
|
await page
|
|
40
43
|
.getByRole("navigation", { name: "Áreas do dashboard" })
|
|
41
44
|
.getByRole("button", { name: /Monitor de Custos/ })
|
|
42
45
|
.click();
|
|
43
|
-
await summary;
|
|
44
46
|
await expectCostMonitorReady(page);
|
|
45
47
|
|
|
46
48
|
expect(Date.now() - startedAt).toBeLessThan(fiveSeconds);
|
|
47
49
|
});
|
|
48
50
|
|
|
49
|
-
test("
|
|
51
|
+
test("retries a summary 503 once when Cost Monitor opens and does not loop", async ({ page }) => {
|
|
50
52
|
let summaries = 0;
|
|
51
53
|
await page.route("**/api/v2/cost-monitor**", async (route) => {
|
|
52
54
|
const url = new URL(route.request().url());
|
|
@@ -62,16 +64,10 @@ test("shows one retry after a summary 503 and does not retry in a loop", async (
|
|
|
62
64
|
});
|
|
63
65
|
|
|
64
66
|
await openDashboard(page);
|
|
65
|
-
await openCostMonitor(page
|
|
66
|
-
const retry = page.locator(".app-loading-panel-error").getByRole("button", {
|
|
67
|
-
name: "Tentar novamente",
|
|
68
|
-
});
|
|
69
|
-
await expect(retry).toBeVisible();
|
|
70
|
-
|
|
71
|
-
await retry.click();
|
|
72
|
-
await expectCostMonitorReady(page);
|
|
67
|
+
await openCostMonitor(page);
|
|
73
68
|
await page.waitForTimeout(750);
|
|
74
69
|
expect(summaries).toBe(2);
|
|
70
|
+
await expect(page.locator(".app-error")).toHaveCount(0);
|
|
75
71
|
});
|
|
76
72
|
|
|
77
73
|
test("does not let a late all-time summary overwrite the newer period", async ({ page }) => {
|
|
@@ -136,6 +132,7 @@ test("does not let a late all-time summary overwrite the newer period", async ({
|
|
|
136
132
|
});
|
|
137
133
|
|
|
138
134
|
await openDashboard(page);
|
|
135
|
+
await selectThisMonth(page);
|
|
139
136
|
await openCostMonitor(page);
|
|
140
137
|
await expect.poll(() => priorPeriodBody).not.toBeNull();
|
|
141
138
|
const staleBody = withStaleSummarySentinel(priorPeriodBody!);
|
|
@@ -182,17 +179,26 @@ async function openDashboard(page: Page) {
|
|
|
182
179
|
await operations;
|
|
183
180
|
}
|
|
184
181
|
|
|
185
|
-
async function openCostMonitor(page: Page
|
|
186
|
-
const summary = expectReady ? waitForCostSummary(page, "this-month") : null;
|
|
182
|
+
async function openCostMonitor(page: Page) {
|
|
187
183
|
await page
|
|
188
184
|
.getByRole("navigation", { name: "Áreas do dashboard" })
|
|
189
185
|
.getByRole("button", { name: /Monitor de Custos/ })
|
|
190
186
|
.click();
|
|
191
|
-
if (!expectReady) return;
|
|
192
|
-
await summary;
|
|
193
187
|
await expectCostMonitorReady(page);
|
|
194
188
|
}
|
|
195
189
|
|
|
190
|
+
async function selectThisMonth(page: Page) {
|
|
191
|
+
await page
|
|
192
|
+
.getByRole("navigation", { name: "Áreas do dashboard" })
|
|
193
|
+
.getByRole("button", { name: /Operação/ })
|
|
194
|
+
.click();
|
|
195
|
+
const summary =
|
|
196
|
+
(await page.locator(".cost-tabs").count()) > 0 ? waitForCostSummary(page, "this-month") : null;
|
|
197
|
+
await periodControl(page).selectOption("this-month");
|
|
198
|
+
await summary;
|
|
199
|
+
await expect(page.locator(".period-transition-overlay")).toHaveCount(0, { timeout: 60_000 });
|
|
200
|
+
}
|
|
201
|
+
|
|
196
202
|
function periodControl(page: Page) {
|
|
197
203
|
return page.locator(".dashboard-global-controls").getByRole("combobox", { name: "Período" });
|
|
198
204
|
}
|
|
@@ -209,6 +215,20 @@ function waitForCostSummary(page: Page, preset: "all" | "this-month") {
|
|
|
209
215
|
});
|
|
210
216
|
}
|
|
211
217
|
|
|
218
|
+
function waitForCostSummaryRequest(page: Page, preset: "all" | "this-month") {
|
|
219
|
+
return page.waitForRequest(
|
|
220
|
+
(request) => {
|
|
221
|
+
const url = new URL(request.url());
|
|
222
|
+
if (url.pathname !== COST_MONITOR_PATH || url.searchParams.get("scope") !== "summary")
|
|
223
|
+
return false;
|
|
224
|
+
return preset === "all"
|
|
225
|
+
? !url.searchParams.has("from") && !url.searchParams.has("to")
|
|
226
|
+
: url.searchParams.has("from") && url.searchParams.has("to");
|
|
227
|
+
},
|
|
228
|
+
{ timeout: 10_000 },
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
212
232
|
async function expectCostMonitorReady(page: Page) {
|
|
213
233
|
await expect(page.locator(".cost-tabs")).toBeVisible({ timeout: fiveSeconds });
|
|
214
234
|
const dailyTable = page.locator(".cost-content-daily table");
|
|
@@ -294,9 +294,11 @@ async function exerciseOperations(
|
|
|
294
294
|
},
|
|
295
295
|
successfulResponses,
|
|
296
296
|
content === ".operations-work-board"
|
|
297
|
-
?
|
|
298
|
-
|
|
299
|
-
)
|
|
297
|
+
? kind === "Tudo"
|
|
298
|
+
? undefined
|
|
299
|
+
: boardStages.map((stage) =>
|
|
300
|
+
operationSelectionResponseMatcher(content, kind, expectedPeriod, stage),
|
|
301
|
+
)
|
|
300
302
|
: [selectionResponse],
|
|
301
303
|
);
|
|
302
304
|
}
|
|
@@ -249,7 +249,7 @@ test("renders the modern read-only dashboard and meets accessibility gates", asy
|
|
|
249
249
|
await page.getByRole("combobox", { name: "Período nos filtros" }).selectOption("today");
|
|
250
250
|
await expect(page.getByLabel("Data inicial nos filtros")).toHaveValue(today);
|
|
251
251
|
await page.getByLabel("Data inicial nos filtros").fill(initialStart);
|
|
252
|
-
await expect(
|
|
252
|
+
await expect(period).toHaveValue("custom");
|
|
253
253
|
|
|
254
254
|
await period.selectOption("today");
|
|
255
255
|
await expect(startDate).toHaveValue(today);
|
|
@@ -572,7 +572,10 @@ test("loads monthly overview quickly and keeps PRD and SPEC chart totals reconci
|
|
|
572
572
|
const quickProjection = (await quickResponse.json()) as {
|
|
573
573
|
summary: {
|
|
574
574
|
overview_metrics?: {
|
|
575
|
-
macro_metrics?: Record<
|
|
575
|
+
macro_metrics?: Record<
|
|
576
|
+
"specs" | "prds",
|
|
577
|
+
{ entity_count: number; total_duration_ms: number | null }
|
|
578
|
+
>;
|
|
576
579
|
};
|
|
577
580
|
};
|
|
578
581
|
};
|
|
@@ -602,6 +605,8 @@ test("loads monthly overview quickly and keeps PRD and SPEC chart totals reconci
|
|
|
602
605
|
const macroKey = kind === "SPECs" ? "specs" : "prds";
|
|
603
606
|
const macroDuration =
|
|
604
607
|
quickProjection.summary.overview_metrics?.macro_metrics?.[macroKey]?.total_duration_ms;
|
|
608
|
+
const macroCount =
|
|
609
|
+
quickProjection.summary.overview_metrics?.macro_metrics?.[macroKey]?.entity_count;
|
|
605
610
|
expect(macroDuration).not.toBeUndefined();
|
|
606
611
|
if (macroDuration === null) {
|
|
607
612
|
await expect(
|
|
@@ -610,7 +615,7 @@ test("loads monthly overview quickly and keeps PRD and SPEC chart totals reconci
|
|
|
610
615
|
name: new RegExp(`Tempo total de execu[cç][aã]o de ${kind}`),
|
|
611
616
|
})
|
|
612
617
|
.locator("strong"),
|
|
613
|
-
).toHaveText("Indisponível");
|
|
618
|
+
).toHaveText(macroCount === 0 ? "0" : "Indisponível");
|
|
614
619
|
}
|
|
615
620
|
}
|
|
616
621
|
}
|
|
@@ -681,6 +686,9 @@ async function openDashboard(page: import("@playwright/test").Page) {
|
|
|
681
686
|
}
|
|
682
687
|
|
|
683
688
|
async function selectPopulatedAllTime(page: import("@playwright/test").Page) {
|
|
689
|
+
await selectOperations(page);
|
|
690
|
+
const period = page.getByRole("combobox", { name: /Per/ }).first();
|
|
691
|
+
if ((await period.inputValue()) === "all") return null;
|
|
684
692
|
const response = page.waitForResponse((candidate) => {
|
|
685
693
|
if (
|
|
686
694
|
candidate.status() !== 200 ||
|
|
@@ -692,8 +700,7 @@ async function selectPopulatedAllTime(page: import("@playwright/test").Page) {
|
|
|
692
700
|
const url = new URL(candidate.url());
|
|
693
701
|
return !url.searchParams.has("from") && !url.searchParams.has("to");
|
|
694
702
|
});
|
|
695
|
-
await
|
|
696
|
-
await page.getByRole("combobox", { name: /Per/ }).first().selectOption("all");
|
|
703
|
+
await period.selectOption("all");
|
|
697
704
|
return response;
|
|
698
705
|
}
|
|
699
706
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|