@zaip-ai/cli 4.4.0 → 4.6.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 +2 -0
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +4 -4
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.js +24 -5
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
- package/dist/services/codex-native-tool-authority-template.d.ts.map +1 -1
- package/dist/services/codex-native-tool-authority-template.js +188 -9
- package/dist/services/codex-native-tool-authority-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +50 -128
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.test.js +4 -0
- package/dist/services/codex-pre-tool-hook-template.test.js.map +1 -1
- package/dist/services/codex-pre-tool-support-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-support-template.js +1 -4
- package/dist/services/codex-pre-tool-support-template.js.map +1 -1
- package/dist/services/codex-stale-git-lock-template.d.ts +2 -0
- package/dist/services/codex-stale-git-lock-template.d.ts.map +1 -0
- package/dist/services/codex-stale-git-lock-template.js +64 -0
- package/dist/services/codex-stale-git-lock-template.js.map +1 -0
- package/dist/services/global-codex-config-migration.test.js +1 -4
- package/dist/services/global-codex-config-migration.test.js.map +1 -1
- package/dist/services/install-template-policy.d.ts.map +1 -1
- package/dist/services/install-template-policy.js +2 -0
- package/dist/services/install-template-policy.js.map +1 -1
- package/dist/services/logger.js +2 -1
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +71 -0
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/runtime-template-test-support.d.ts +3 -0
- package/dist/services/runtime-template-test-support.d.ts.map +1 -0
- package/dist/services/runtime-template-test-support.js +32 -0
- package/dist/services/runtime-template-test-support.js.map +1 -0
- package/dist/services/runtime-template.test.js +23 -31
- package/dist/services/runtime-template.test.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README.md +8 -0
- package/templates/.agents/config/agents/discovery.json +1 -1
- package/templates/.agents/config/deploy-policy.json +5 -0
- package/templates/.agents/dashboard/.zaip-managed.json +211 -75
- package/templates/.agents/dashboard/README.md +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-f4ZGJRg3.js → CostCalculationGuidePage-BRtiPijr.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-CkQ_y8kg.js → DashboardHelpDialog-BR4ZeYpE.js} +99 -10
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-v9zGRTlk.js → PricingSettingsDialog-Dr4QDFmn.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-doIMhei7.js → ProjectSettingsPage-BG0N5dw_.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-C_4ftjyB.js → TraceabilityWorkspace-BvoM-YQ0.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-fTQhSL85.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-Cv3WBFIF.js → icons-vendor-Bc6vux5t.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-BMfzKaAR.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DZhppOIk.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-mHgsmxb6.js → react-vendor-DNJQFov3.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-B0CPyEVq.js → traceability-B7tjIB7W.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/AppOverlays.tsx +6 -34
- package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.dom.test.ts +130 -0
- package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.tsx +226 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-sqlite-view.ts +45 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +15 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +17 -46
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-fixtures.ts +23 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-model.test.ts +69 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-model.ts +59 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback.css +131 -0
- package/templates/.agents/dashboard/apps/frontend/src/styles.css +0 -32
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.navigation.test.ts +236 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +1 -24
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +3 -2
- 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/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/DIAGNOSTICS.md +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.d.mts +10 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.mjs +101 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.test.mjs +58 -0
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +232 -217
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +201 -188
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-sqlite-dashboard-startup.mjs +233 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-provider-nonzero.mjs +45 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-executable-startup.mjs +107 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-reconciliation-executable.mjs +271 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +232 -217
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +78 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +36 -56
- package/templates/.agents/dashboard/packages/local-runtime/src/canonical-source-revision-cache.test.ts +125 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/canonical-source-revision-cache.ts +168 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/dashboard-diagnostics.test.ts +57 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-agent-catalog-routes.ts +76 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-dual-reads-manifest-summaries-without-losing.test.ts +5 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-diagnostics.test.ts +118 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-result.test.ts +35 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-route.ts +105 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +64 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +19 -27
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-command.test.ts +111 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-refresh.test.ts +59 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-refresh.ts +44 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +20 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +12 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +48 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +126 -134
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +14 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-dashboard-startup.test.ts +163 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-dashboard-startup.ts +78 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-header-timestamp.test.ts +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-nonzero.test.ts +271 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-visibility.ts +32 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-operations-duration.ts +58 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-provider-dimension.ts +12 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +9 -58
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +9 -35
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +10 -8
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +43 -45
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +5 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +5 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-startup-seed.test.ts +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-logging.mjs +6 -2
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-server.mjs +7 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +4 -5
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +33 -4
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +8 -7
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +46 -3
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/qualify-kanban-popup.mjs +56 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-update-label.spec.ts +49 -0
- package/templates/.agents/design/.zaip-managed.json +17 -5
- package/templates/.agents/design/apps/catalog/dist/assets/index-D3uhpycC.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +13 -1
- package/templates/.agents/design/apps/catalog/src/specimens/ReconciliationSpecimen.stories.tsx +6 -0
- package/templates/.agents/design/apps/catalog/src/specimens/ReconciliationSpecimen.tsx +101 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.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 +21 -6
- package/templates/.agents/requirements/public-distribution.md +4 -4
- 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/rules/core.md +3 -1
- package/templates/.agents/rules/workflow.md +3 -2
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +705 -516
- package/templates/.agents/runtime/checksums.sha256 +5 -5
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/provenance.json +4 -4
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +25 -3
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-execution/references/autonomous-continuation.md +4 -0
- package/templates/.agents/skills/zaip-skill-execution/references/candidate-workflow.md +1 -1
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +2 -2
- package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +36 -48
- package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +67 -99
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +33 -30
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +303 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs +334 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +41 -28
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/guarded-commits.mjs +212 -0
- package/templates/.agents/skills/zaip-skill-lifecycle-closure/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +44 -68
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +91 -44
- package/templates/.agents/skills/zaip-skill-send-email/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-send-email/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +5 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-task/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +19 -0
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/scripts/connector-guidance.test.mjs +29 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/scripts/verify-connector-lock.mjs +30 -0
- package/templates/.agents/tools/cloud-runner.integration.test.mjs +3 -0
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/03-tasks.md +6 -0
- package/templates/.agents/zaip-aios/guides/04-specs.md +6 -0
- package/templates/.agents/zaip-aios/guides/05-prds.md +4 -0
- package/templates/.agents/zaip-aios/guides/06-execucao.md +6 -0
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +6 -0
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +4 -0
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +6 -0
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +36 -4
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +15 -4
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +8 -0
- package/templates/template-manifest.json +330 -142
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-D7PrDZy9.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-OBJXZOwe.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Rbmpz4UO.js +0 -2
|
@@ -15,6 +15,8 @@ namespace ZaipDashboardLauncher
|
|
|
15
15
|
private const int ErrorIcon = 0x00000010;
|
|
16
16
|
private const int LaunchVerificationTimeoutMilliseconds = 5000;
|
|
17
17
|
private const int LaunchVerificationRetryMilliseconds = 200;
|
|
18
|
+
private static string diagnosticRoot;
|
|
19
|
+
private static readonly string LaunchId = Guid.NewGuid().ToString("N");
|
|
18
20
|
|
|
19
21
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
|
20
22
|
private static extern int MessageBox(IntPtr handle, string text, string caption, int type);
|
|
@@ -26,6 +28,8 @@ namespace ZaipDashboardLauncher
|
|
|
26
28
|
try
|
|
27
29
|
{
|
|
28
30
|
var workspaceRoot = ResolveWorkspaceRoot();
|
|
31
|
+
diagnosticRoot = workspaceRoot;
|
|
32
|
+
LogEvent("executable_clicked", null);
|
|
29
33
|
if (workspaceRoot == null)
|
|
30
34
|
{
|
|
31
35
|
return ReportFailure("Não foi possível localizar a raiz do workspace ZAIP-AIOS.");
|
|
@@ -55,7 +59,9 @@ namespace ZaipDashboardLauncher
|
|
|
55
59
|
WindowStyle = ProcessWindowStyle.Hidden,
|
|
56
60
|
};
|
|
57
61
|
startInfo.EnvironmentVariables["ZAIP_LAUNCH_STATUS"] = statusPath;
|
|
62
|
+
startInfo.EnvironmentVariables["ZAIP_DASHBOARD_LAUNCH_ID"] = LaunchId;
|
|
58
63
|
var process = Process.Start(startInfo);
|
|
64
|
+
LogEvent("node_started", process == null ? "Process unavailable" : "pid=" + process.Id);
|
|
59
65
|
|
|
60
66
|
if (process == null)
|
|
61
67
|
{
|
|
@@ -91,6 +97,7 @@ namespace ZaipDashboardLauncher
|
|
|
91
97
|
var status = File.ReadAllText(statusPath);
|
|
92
98
|
if (status.StartsWith("ok", StringComparison.OrdinalIgnoreCase))
|
|
93
99
|
{
|
|
100
|
+
LogEvent("browser_handoff_completed", null);
|
|
94
101
|
// Node publishes `ok` only after confirming the selected
|
|
95
102
|
// runtime's health/readiness and handing off the browser.
|
|
96
103
|
// Re-reading the mutable session registry here can race a
|
|
@@ -99,6 +106,7 @@ namespace ZaipDashboardLauncher
|
|
|
99
106
|
}
|
|
100
107
|
if (status.StartsWith("cancelled", StringComparison.OrdinalIgnoreCase))
|
|
101
108
|
{
|
|
109
|
+
LogEvent("launch_superseded", null);
|
|
102
110
|
// A newer executable click became the authoritative
|
|
103
111
|
// session. This is normal replacement, never a popup.
|
|
104
112
|
return 0;
|
|
@@ -242,12 +250,36 @@ namespace ZaipDashboardLauncher
|
|
|
242
250
|
}
|
|
243
251
|
|
|
244
252
|
private static void LogFailure(string message)
|
|
253
|
+
{
|
|
254
|
+
LogEvent("launch_failure", message);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
private static void LogEvent(string eventName, string message)
|
|
245
258
|
{
|
|
246
259
|
try
|
|
247
260
|
{
|
|
248
|
-
|
|
249
|
-
var
|
|
250
|
-
|
|
261
|
+
// A missing workspace cannot have a project-local log yet.
|
|
262
|
+
var directory = diagnosticRoot == null
|
|
263
|
+
? Path.Combine(Path.GetTempPath(), "zaip-dashboard-logs")
|
|
264
|
+
: Path.Combine(diagnosticRoot, ".local", "dashboard-logs");
|
|
265
|
+
Directory.CreateDirectory(directory);
|
|
266
|
+
if (eventName == "executable_clicked")
|
|
267
|
+
{
|
|
268
|
+
var existing = Directory.GetFiles(directory, "native-*.jsonl");
|
|
269
|
+
Array.Sort(existing, (a, b) => File.GetLastWriteTimeUtc(b).CompareTo(File.GetLastWriteTimeUtc(a)));
|
|
270
|
+
for (var index = 0; index < existing.Length; index++)
|
|
271
|
+
if (index >= 59 || DateTime.UtcNow - File.GetLastWriteTimeUtc(existing[index]) > TimeSpan.FromDays(14))
|
|
272
|
+
File.Delete(existing[index]);
|
|
273
|
+
}
|
|
274
|
+
var logPath = Path.Combine(directory, "native-" + LaunchId + ".jsonl");
|
|
275
|
+
var sanitized = message == null ? "" : SanitizeMessage(message);
|
|
276
|
+
sanitized = Regex.Replace(sanitized, "(?i)(Bearer\\s+)[^\\s\\\"']+", "$1[redacted]");
|
|
277
|
+
sanitized = Regex.Replace(sanitized, "(?i)((?:token|password|secret|authorization|cookie|api[_-]?key)[\\\"']?\\s*[:=]\\s*[\\\"']?)[^\\s\\\"',};&]+", "$1[redacted]");
|
|
278
|
+
var json = string.Format(
|
|
279
|
+
"{{\"schema_version\":1,\"occurred_at\":\"{0}\",\"component\":\"native\",\"event\":\"{1}\",\"correlation_id\":\"{2}\",\"pid\":{3},\"message\":\"{4}\"}}{5}",
|
|
280
|
+
DateTime.UtcNow.ToString("O"), eventName, LaunchId, Process.GetCurrentProcess().Id,
|
|
281
|
+
JsonEscape(sanitized), Environment.NewLine);
|
|
282
|
+
File.AppendAllText(logPath, json, new UTF8Encoding(false));
|
|
251
283
|
}
|
|
252
284
|
catch
|
|
253
285
|
{
|
|
@@ -255,6 +287,17 @@ namespace ZaipDashboardLauncher
|
|
|
255
287
|
}
|
|
256
288
|
}
|
|
257
289
|
|
|
290
|
+
private static string JsonEscape(string value)
|
|
291
|
+
{
|
|
292
|
+
var builder = new StringBuilder();
|
|
293
|
+
foreach (var character in value)
|
|
294
|
+
if (character == '"') builder.Append("\\\"");
|
|
295
|
+
else if (character == '\\') builder.Append("\\\\");
|
|
296
|
+
else if (character < 32) builder.Append("\\u" + ((int)character).ToString("x4"));
|
|
297
|
+
else builder.Append(character);
|
|
298
|
+
return builder.ToString();
|
|
299
|
+
}
|
|
300
|
+
|
|
258
301
|
private static string ResolveNodeExecutable()
|
|
259
302
|
{
|
|
260
303
|
var path = Environment.GetEnvironmentVariable("PATH") ?? string.Empty;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
|
|
6
|
+
const root = resolve(import.meta.dirname, "../../../..");
|
|
7
|
+
assert.equal(resolve(process.cwd()), root, "Run from the candidate root");
|
|
8
|
+
const mode = process.argv[2];
|
|
9
|
+
assert.ok(["test", "check"].includes(mode), "Choose test or check");
|
|
10
|
+
|
|
11
|
+
function run(args, label) {
|
|
12
|
+
const result = spawnSync(process.execPath, args, {
|
|
13
|
+
cwd: root,
|
|
14
|
+
windowsHide: true,
|
|
15
|
+
encoding: "utf8",
|
|
16
|
+
timeout: 240_000,
|
|
17
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
18
|
+
env: { ...process.env, CI: "true" },
|
|
19
|
+
});
|
|
20
|
+
process.stdout.write(result.stdout ?? "");
|
|
21
|
+
process.stderr.write(result.stderr ?? "");
|
|
22
|
+
assert.equal(result.status, 0, `${label}: ${result.error?.message ?? result.status}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!existsSync(join(root, "node_modules/.modules.yaml"))) {
|
|
26
|
+
const branch = spawnSync("git", ["symbolic-ref", "-q", "HEAD"], {
|
|
27
|
+
cwd: root,
|
|
28
|
+
windowsHide: true,
|
|
29
|
+
encoding: "utf8",
|
|
30
|
+
timeout: 10000,
|
|
31
|
+
});
|
|
32
|
+
assert.equal(branch.status, 1, "Dependency preparation requires a detached candidate");
|
|
33
|
+
const manager = join(dirname(process.execPath), "node_modules/corepack/dist/pnpm.js");
|
|
34
|
+
assert.ok(existsSync(manager), "Use the host Corepack entrypoint");
|
|
35
|
+
run([manager, "install", "--offline", "--frozen-lockfile", "--ignore-scripts"], "dependencies");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (mode === "test") {
|
|
39
|
+
run(
|
|
40
|
+
[
|
|
41
|
+
"node_modules/vitest/vitest.mjs",
|
|
42
|
+
"run",
|
|
43
|
+
"--maxWorkers=1",
|
|
44
|
+
".agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.navigation.test.ts",
|
|
45
|
+
".agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.priority.test.ts",
|
|
46
|
+
],
|
|
47
|
+
"Kanban click and priority regression",
|
|
48
|
+
);
|
|
49
|
+
} else {
|
|
50
|
+
for (const project of [
|
|
51
|
+
".agents/dashboard/modules/operations/tsconfig.json",
|
|
52
|
+
".agents/dashboard/apps/frontend/tsconfig.json",
|
|
53
|
+
".agents/design/apps/catalog/tsconfig.json",
|
|
54
|
+
])
|
|
55
|
+
run(["node_modules/typescript/bin/tsc", "--noEmit", "--project", project], project);
|
|
56
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { expect, test } from "@playwright/test";
|
|
4
|
+
|
|
5
|
+
test("header displays one update date from the served snapshot", async ({ page }) => {
|
|
6
|
+
const pageErrors: string[] = [];
|
|
7
|
+
page.on("pageerror", (error) => pageErrors.push(error.message));
|
|
8
|
+
const operationsResponse = page.waitForResponse(
|
|
9
|
+
(response) => new URL(response.url()).pathname === "/api/v2/operations" && response.ok(),
|
|
10
|
+
);
|
|
11
|
+
await page.goto("/?token=e2e-token");
|
|
12
|
+
const operations = await (await operationsResponse).json();
|
|
13
|
+
const snapshotAt = operations.summary.projection_updated_at;
|
|
14
|
+
expect(snapshotAt).toBeTruthy();
|
|
15
|
+
const formattedSnapshot = await page.evaluate(
|
|
16
|
+
(timestamp) =>
|
|
17
|
+
new Intl.DateTimeFormat("pt-BR", { dateStyle: "short", timeStyle: "medium" }).format(
|
|
18
|
+
new Date(timestamp),
|
|
19
|
+
),
|
|
20
|
+
snapshotAt,
|
|
21
|
+
);
|
|
22
|
+
const update = page.locator(".dashboard-header-brand small");
|
|
23
|
+
await expect(update).toHaveCount(1);
|
|
24
|
+
await expect(update).toHaveText(`Última Atualização ${formattedSnapshot}`);
|
|
25
|
+
await expect(page.locator(".dashboard-header")).not.toContainText("Última telemetria");
|
|
26
|
+
await expect(page.locator(".dashboard-header")).not.toContainText("Snapshot atualizado");
|
|
27
|
+
expect(pageErrors).toEqual([]);
|
|
28
|
+
|
|
29
|
+
const evidenceDir = resolve(import.meta.dirname, "../../../../../.local/dashboard-update-label");
|
|
30
|
+
await mkdir(evidenceDir, { recursive: true });
|
|
31
|
+
await page.locator(".dashboard-header").screenshot({ path: resolve(evidenceDir, "header.png") });
|
|
32
|
+
await writeFile(
|
|
33
|
+
resolve(evidenceDir, "served-check.json"),
|
|
34
|
+
JSON.stringify(
|
|
35
|
+
{
|
|
36
|
+
observed_at: new Date().toISOString(),
|
|
37
|
+
snapshot_at: snapshotAt,
|
|
38
|
+
telemetry_at: operations.summary.latest_token_collected_at ?? null,
|
|
39
|
+
displayed_text: await update.textContent(),
|
|
40
|
+
update_rows: await update.count(),
|
|
41
|
+
page_errors: pageErrors,
|
|
42
|
+
url: new URL(page.url()).origin,
|
|
43
|
+
viewport: page.viewportSize(),
|
|
44
|
+
},
|
|
45
|
+
null,
|
|
46
|
+
2,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": "DESIGN.md",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"path": "apps/catalog/dist/assets/index-D2miO4-O.js",
|
|
43
43
|
"sha256": "5f8dfdc456f365253210203870f6a1f21a5f9114d64e7eafac0ffcf360fc185f"
|
|
44
44
|
},
|
|
45
|
+
{
|
|
46
|
+
"path": "apps/catalog/dist/assets/index-D3uhpycC.js",
|
|
47
|
+
"sha256": "cdc460110f392cadd4ec6e0f33c6e5655114de03911ca0f38709967e904dae14"
|
|
48
|
+
},
|
|
45
49
|
{
|
|
46
50
|
"path": "apps/catalog/dist/assets/index-DkpQYoyC.js",
|
|
47
51
|
"sha256": "527677a94c7a3d5ebd5d6b9bc81ebef5b4493535c22a4c92b7b8c20e25ac430e"
|
|
@@ -56,7 +60,7 @@
|
|
|
56
60
|
},
|
|
57
61
|
{
|
|
58
62
|
"path": "apps/catalog/dist/index.html",
|
|
59
|
-
"sha256": "
|
|
63
|
+
"sha256": "9692409f65f5eff07c696c8cbf636266846c25d5173e3730f0a5aa152be76666"
|
|
60
64
|
},
|
|
61
65
|
{
|
|
62
66
|
"path": "apps/catalog/dist/logo_novo_azul.png",
|
|
@@ -272,7 +276,7 @@
|
|
|
272
276
|
},
|
|
273
277
|
{
|
|
274
278
|
"path": "apps/catalog/package.json",
|
|
275
|
-
"sha256": "
|
|
279
|
+
"sha256": "0ed200d08a2191952a59278b928e820ff26cda08eb4ecea29cfcc99f897c662e"
|
|
276
280
|
},
|
|
277
281
|
{
|
|
278
282
|
"path": "apps/catalog/public/logo_novo_azul.png",
|
|
@@ -340,12 +344,20 @@
|
|
|
340
344
|
},
|
|
341
345
|
{
|
|
342
346
|
"path": "apps/catalog/src/pages/ComponentsPage.tsx",
|
|
343
|
-
"sha256": "
|
|
347
|
+
"sha256": "7ac73f7f9f02035b90e9d179706c9beab0f836afb9002d1516d05d09d4f8b8c0"
|
|
344
348
|
},
|
|
345
349
|
{
|
|
346
350
|
"path": "apps/catalog/src/pages/DesignSystemPage.tsx",
|
|
347
351
|
"sha256": "f4d073c82508728d65488f2dcd0cd56e8fbaef6b17ca4ba0ce9dbd3c2fcf547e"
|
|
348
352
|
},
|
|
353
|
+
{
|
|
354
|
+
"path": "apps/catalog/src/specimens/ReconciliationSpecimen.stories.tsx",
|
|
355
|
+
"sha256": "963c213e0781eabf3e19b6276cbfcc082c63a6606b1bc4bf3a9d1af6c5ba64d8"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"path": "apps/catalog/src/specimens/ReconciliationSpecimen.tsx",
|
|
359
|
+
"sha256": "3cded3cb76e0c1847025ae4bbb950629590e2528fc5e02c36996bf224fdc3963"
|
|
360
|
+
},
|
|
349
361
|
{
|
|
350
362
|
"path": "apps/catalog/src/stories/Components.stories.tsx",
|
|
351
363
|
"sha256": "bc3044d7c0826656dd49d81f4128a8c2a5c271192f31ec7428445923676af832"
|
|
@@ -396,7 +408,7 @@
|
|
|
396
408
|
},
|
|
397
409
|
{
|
|
398
410
|
"path": "packages/local-runtime/package.json",
|
|
399
|
-
"sha256": "
|
|
411
|
+
"sha256": "1420f11696db43314383a04628d3ab3bdbe359b5b07e08ca7b71fe07f5411216"
|
|
400
412
|
},
|
|
401
413
|
{
|
|
402
414
|
"path": "packages/local-runtime/runtime.mjs",
|