@zaip-ai/cli 1.4.3 → 2.2.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 +33 -14
- package/dist/services/adapter-hook-sources.d.ts +1 -0
- package/dist/services/adapter-hook-sources.d.ts.map +1 -1
- package/dist/services/adapter-hook-sources.js +1 -0
- package/dist/services/adapter-hook-sources.js.map +1 -1
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +20 -16
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/agent-adapters.d.ts +97 -34
- package/dist/services/agent-adapters.d.ts.map +1 -1
- package/dist/services/agent-adapters.js +279 -54
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +13 -7
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.d.ts +2 -0
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -0
- package/dist/services/codex-conversation-lifecycle-hook.js +29 -0
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +173 -0
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts.map +1 -1
- package/dist/services/codex-subagent-hook-template.js +1 -1
- package/dist/services/doctor.js +2 -2
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +117 -5
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/logger.js +1 -1
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +2 -2
- package/dist/services/runtime-template.test.js +9 -1
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/stack-git.d.ts +3 -0
- package/dist/services/stack-git.d.ts.map +1 -1
- package/dist/services/stack-git.js +24 -3
- package/dist/services/stack-git.js.map +1 -1
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +3 -1
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/services/transactional-files.d.ts +2 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +8 -3
- package/dist/services/transactional-files.js.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/README-ENG.md +735 -0
- package/templates/.agents/README.md +49 -43
- package/templates/.agents/architecture/hostinger-cloudflare-terraform.md +90 -0
- package/templates/.agents/config/agents/catalog.yaml +18 -18
- package/templates/.agents/config/autonomous-cloud-inputs.json +41 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +5 -7
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +4 -5
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +3 -6
- package/templates/.agents/config/pricing/models.json +53 -33
- package/templates/.agents/dashboard/.zaip-managed.json +64 -44
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-oZVlf-l5.js → DashboardHelpDialog-DaSllaJp.js} +118 -16
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-BYjVOHI_.js → TraceabilityWorkspace-BCvZFMEf.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_MEktQNM.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +2 -2
- package/templates/.agents/dashboard/apps/frontend/index.html +1 -1
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +28 -9
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +27 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +13 -29
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.test.ts +43 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.ts +32 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-project-overview.ts +28 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/modules/traceability/src/contracts.ts +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/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +206 -206
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +169 -169
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +206 -206
- package/templates/.agents/dashboard/packages/local-runtime/src/server-identity.test.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +41 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +1 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +6 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +1 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +11 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +55 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +9 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +22 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +10 -8
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +68 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +39 -10
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-seed.test.ts +47 -42
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/design/.zaip-managed.json +41 -41
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- 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 +15 -5
- package/templates/.agents/requirements/public-distribution.md +3 -3
- 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/astra-diagnostic.md +20 -0
- package/templates/.agents/rules/core.md +9 -14
- package/templates/.agents/rules/meta-mcp.md +1 -0
- package/templates/.agents/rules/run-lifecycle-closure.md +1 -1
- package/templates/.agents/rules/specialist-routing.md +3 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +95 -61
- 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 +1 -1
- package/templates/.agents/skills/zaip-aios/SKILL.md +4 -2
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +17 -0
- package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +6 -7
- package/templates/.agents/skills/zaip-skill-general-operations/references/extended-workflow.md +7 -0
- package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +5 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/SKILL.md +54 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/assets/.env.example +9 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/references/operational-procedure.md +137 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +7 -19
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/references/extended-workflow.md +21 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +7 -14
- package/templates/.agents/skills/zaip-skill-marketing/references/extended-workflow.md +16 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/SKILL.md +17 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/references/onboarding-manual.md +96 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +8 -18
- package/templates/.agents/skills/zaip-skill-sales-methodology/references/extended-workflow.md +20 -0
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +4 -1
- package/templates/.agents/skills/zaip-skill-text-encoding/SKILL.md +1 -1
- package/templates/.agents/zaip-aios/INDEX.md +1 -1
- package/templates/.agents/zaip-aios/README.md +6 -0
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +19 -3
- package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +37 -7
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +14 -1
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +32 -3
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +21 -0
- package/templates/infra/terraform/terraform.tfvars.example +2 -1
- package/templates/template-manifest.json +234 -150
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ZJFXmK7m.js +0 -2
- /package/templates/.agents/{data → records}/changes/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/executions/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/prds/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/runs/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/specs/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/tasks/.gitkeep +0 -0
|
@@ -51,6 +51,11 @@ import type {
|
|
|
51
51
|
} from "./dashboard-api.js";
|
|
52
52
|
import { DashboardApiClient } from "./dashboard-api.js";
|
|
53
53
|
import { reconciliationCommandOutcome } from "./dashboard-api-reconciliation.js";
|
|
54
|
+
import {
|
|
55
|
+
type DashboardIdentityResponse,
|
|
56
|
+
defaultDashboardIdentity,
|
|
57
|
+
mergeDashboardIdentity,
|
|
58
|
+
} from "./dashboard-identity.js";
|
|
54
59
|
import {
|
|
55
60
|
defaultOperationsPeriod,
|
|
56
61
|
isAllTimeDisplayRangeChange,
|
|
@@ -177,10 +182,26 @@ export function App() {
|
|
|
177
182
|
null,
|
|
178
183
|
);
|
|
179
184
|
const [lastUpdatedAt, setLastUpdatedAt] = useState<string | null>(null);
|
|
180
|
-
const [dashboardIdentity, setDashboardIdentity] = useState(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
});
|
|
185
|
+
const [dashboardIdentity, setDashboardIdentity] = useState(defaultDashboardIdentity);
|
|
186
|
+
const applyDashboardIdentity = useCallback((identity: DashboardIdentityResponse) => {
|
|
187
|
+
setDashboardIdentity((current) => mergeDashboardIdentity(current, identity));
|
|
188
|
+
}, []);
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
let cancelled = false;
|
|
191
|
+
// Identity is workspace metadata, rather than period data. Start it beside
|
|
192
|
+
// the compact projection and never make period/filter refreshes erase it.
|
|
193
|
+
void api
|
|
194
|
+
.dashboardIdentity()
|
|
195
|
+
.then((identity) => {
|
|
196
|
+
if (!cancelled) applyDashboardIdentity(identity);
|
|
197
|
+
})
|
|
198
|
+
// The compact Operations projection remains usable when an older local
|
|
199
|
+
// runtime has not yet supplied this optional endpoint.
|
|
200
|
+
.catch(() => {});
|
|
201
|
+
return () => {
|
|
202
|
+
cancelled = true;
|
|
203
|
+
};
|
|
204
|
+
}, [api, applyDashboardIdentity]);
|
|
184
205
|
const {
|
|
185
206
|
closeDocument,
|
|
186
207
|
documentDetail,
|
|
@@ -324,11 +345,9 @@ export function App() {
|
|
|
324
345
|
setCosts(snapshot.costs);
|
|
325
346
|
costsLoadedRef.current = true;
|
|
326
347
|
setDisplayedCosts(null);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
repositoryName: snapshot.dashboard.repository_name,
|
|
331
|
-
});
|
|
348
|
+
const dashboard = snapshot.dashboard;
|
|
349
|
+
if (dashboard) {
|
|
350
|
+
setDashboardIdentity((current) => mergeDashboardIdentity(current, dashboard));
|
|
332
351
|
}
|
|
333
352
|
setLastUpdatedAt(snapshot.projection.source_latest_at);
|
|
334
353
|
} else {
|
|
@@ -145,6 +145,33 @@ describe("DashboardApiClient readiness", () => {
|
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
147
|
|
|
148
|
+
describe("DashboardApiClient identity", () => {
|
|
149
|
+
afterEach(() => {
|
|
150
|
+
vi.unstubAllGlobals();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("loads the workspace identity through the compact authenticated endpoint", async () => {
|
|
154
|
+
vi.stubGlobal("window", globalThis);
|
|
155
|
+
const fetchMock = vi.fn(
|
|
156
|
+
async () =>
|
|
157
|
+
new Response(
|
|
158
|
+
JSON.stringify({ title: "Dashboard Zaip AIOS", repository_name: "zaip-ai/zaip-aios" }),
|
|
159
|
+
{ status: 200 },
|
|
160
|
+
),
|
|
161
|
+
);
|
|
162
|
+
vi.stubGlobal("fetch", fetchMock);
|
|
163
|
+
|
|
164
|
+
await expect(new DashboardApiClient("session").dashboardIdentity()).resolves.toEqual({
|
|
165
|
+
title: "Dashboard Zaip AIOS",
|
|
166
|
+
repository_name: "zaip-ai/zaip-aios",
|
|
167
|
+
});
|
|
168
|
+
expect(fetchMock).toHaveBeenCalledWith(
|
|
169
|
+
"/api/v2/dashboard-identity",
|
|
170
|
+
expect.objectContaining({ headers: { "x-zaip-session": "session" } }),
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
148
175
|
describe("DashboardApiClient cost monitor", () => {
|
|
149
176
|
afterEach(() => {
|
|
150
177
|
vi.unstubAllGlobals();
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { ProjectOverview } from "./dashboard-project-overview.js";
|
|
2
|
+
|
|
3
|
+
export type { ProjectOverview } from "./dashboard-project-overview.js";
|
|
4
|
+
|
|
1
5
|
import { type ApiErrorPayload, dashboardApiPaths } from "@zaip-ai/dashboard-contracts";
|
|
2
6
|
import type { CostMonitorProjection } from "@zaip-ai/dashboard-cost-monitor/contracts";
|
|
3
7
|
import type {
|
|
@@ -11,6 +15,7 @@ import type {
|
|
|
11
15
|
} from "@zaip-ai/dashboard-operations/contracts";
|
|
12
16
|
import type { TaskTrace } from "@zaip-ai/dashboard-traceability/contracts";
|
|
13
17
|
import type { ReconcileOpenWorkResponse } from "./dashboard-api-reconciliation.js";
|
|
18
|
+
import type { DashboardIdentityResponse } from "./dashboard-identity.js";
|
|
14
19
|
export interface ReconciliationBlockedItem {
|
|
15
20
|
id: string;
|
|
16
21
|
reason: string | null;
|
|
@@ -229,6 +234,14 @@ export class DashboardApiClient {
|
|
|
229
234
|
return this.get("/api/v2/ready");
|
|
230
235
|
}
|
|
231
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Lightweight, workspace-level metadata. This deliberately stays outside
|
|
239
|
+
* the aggregate snapshot so the first Operations paint remains compact.
|
|
240
|
+
*/
|
|
241
|
+
dashboardIdentity(): Promise<DashboardIdentityResponse> {
|
|
242
|
+
return this.get("/api/v2/dashboard-identity");
|
|
243
|
+
}
|
|
244
|
+
|
|
232
245
|
operations(
|
|
233
246
|
period?: { from: string | null; to: string | null },
|
|
234
247
|
scope: OperationsScope = "detail",
|
|
@@ -782,32 +795,3 @@ export interface ProjectConfigSettings {
|
|
|
782
795
|
}
|
|
783
796
|
| undefined;
|
|
784
797
|
}
|
|
785
|
-
|
|
786
|
-
export interface ProjectOverview {
|
|
787
|
-
framework_version: string | null;
|
|
788
|
-
metrics: Array<{
|
|
789
|
-
id: "agents" | "squads" | "skills" | "rules" | "hooks" | "database";
|
|
790
|
-
label: string;
|
|
791
|
-
value: number | string;
|
|
792
|
-
}>;
|
|
793
|
-
stack_components: Array<{
|
|
794
|
-
name: string;
|
|
795
|
-
version: string | null;
|
|
796
|
-
configured_version: string | null;
|
|
797
|
-
source: string | null;
|
|
798
|
-
verification: "exact" | "constraint" | "unavailable";
|
|
799
|
-
installation: "runtime" | "installed" | "missing" | "bundled";
|
|
800
|
-
}>;
|
|
801
|
-
areas: Array<{
|
|
802
|
-
id:
|
|
803
|
-
| "brandbook"
|
|
804
|
-
| "design_system"
|
|
805
|
-
| "software_architecture"
|
|
806
|
-
| "growth_strategy"
|
|
807
|
-
| "marketing_strategy"
|
|
808
|
-
| "sales_playbook";
|
|
809
|
-
label: string;
|
|
810
|
-
artifact: string;
|
|
811
|
-
available: boolean;
|
|
812
|
-
}>;
|
|
813
|
-
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
type DashboardIdentityResponse,
|
|
4
|
+
defaultDashboardIdentity,
|
|
5
|
+
mergeDashboardIdentity,
|
|
6
|
+
} from "./dashboard-identity.js";
|
|
7
|
+
|
|
8
|
+
describe("dashboard identity", () => {
|
|
9
|
+
it.each([
|
|
10
|
+
["SSH", "git@github.com:zaip-ai/zaip-aios.git"],
|
|
11
|
+
["HTTPS", "https://github.com/zaip-ai/zaip-aios.git"],
|
|
12
|
+
])("keeps the normalized GitHub badge identity for a %s remote", (_kind, _remote) => {
|
|
13
|
+
const response: DashboardIdentityResponse = {
|
|
14
|
+
title: "Dashboard Zaip AIOS",
|
|
15
|
+
repository_name: "zaip-ai/zaip-aios",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
expect(mergeDashboardIdentity(defaultDashboardIdentity, response)).toEqual({
|
|
19
|
+
title: "Dashboard Zaip AIOS",
|
|
20
|
+
repositoryName: "zaip-ai/zaip-aios",
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("preserves the identity during filter updates and honestly removes the badge without GitHub", () => {
|
|
25
|
+
const githubIdentity = mergeDashboardIdentity(defaultDashboardIdentity, {
|
|
26
|
+
title: "Dashboard Zaip AIOS",
|
|
27
|
+
repository_name: "zaip-ai/zaip-aios",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
expect(
|
|
31
|
+
mergeDashboardIdentity(githubIdentity, {
|
|
32
|
+
title: "",
|
|
33
|
+
repository_name: "zaip-ai/zaip-aios",
|
|
34
|
+
}),
|
|
35
|
+
).toEqual(githubIdentity);
|
|
36
|
+
expect(
|
|
37
|
+
mergeDashboardIdentity(githubIdentity, {
|
|
38
|
+
title: "Dashboard local",
|
|
39
|
+
repository_name: "",
|
|
40
|
+
}),
|
|
41
|
+
).toEqual({ title: "Dashboard local", repositoryName: "" });
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface DashboardIdentity {
|
|
2
|
+
title: string;
|
|
3
|
+
repositoryName: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface DashboardIdentityResponse {
|
|
7
|
+
title: string;
|
|
8
|
+
repository_name: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const defaultDashboardIdentity: DashboardIdentity = {
|
|
12
|
+
title: "Dashboard Zaip AIOS",
|
|
13
|
+
repositoryName: "",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The identity is independent of the selected reporting period. Keep the
|
|
18
|
+
* last known title when a malformed response omits it, while an empty
|
|
19
|
+
* repository is meaningful: it truthfully removes the GitHub badge.
|
|
20
|
+
*/
|
|
21
|
+
export function mergeDashboardIdentity(
|
|
22
|
+
current: DashboardIdentity,
|
|
23
|
+
response: DashboardIdentityResponse,
|
|
24
|
+
): DashboardIdentity {
|
|
25
|
+
const title = typeof response.title === "string" ? response.title.trim() : "";
|
|
26
|
+
const repositoryName =
|
|
27
|
+
typeof response.repository_name === "string" ? response.repository_name.trim() : "";
|
|
28
|
+
return {
|
|
29
|
+
title: title || current.title,
|
|
30
|
+
repositoryName,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ProjectOverview {
|
|
2
|
+
framework_version: string | null;
|
|
3
|
+
metrics: Array<{
|
|
4
|
+
id: "agents" | "squads" | "skills" | "rules" | "hooks" | "database";
|
|
5
|
+
label: string;
|
|
6
|
+
value: number | string;
|
|
7
|
+
}>;
|
|
8
|
+
stack_components: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
version: string | null;
|
|
11
|
+
configured_version: string | null;
|
|
12
|
+
source: string | null;
|
|
13
|
+
verification: "exact" | "constraint" | "unavailable";
|
|
14
|
+
installation: "runtime" | "installed" | "missing" | "bundled";
|
|
15
|
+
}>;
|
|
16
|
+
areas: Array<{
|
|
17
|
+
id:
|
|
18
|
+
| "brandbook"
|
|
19
|
+
| "design_system"
|
|
20
|
+
| "software_architecture"
|
|
21
|
+
| "growth_strategy"
|
|
22
|
+
| "marketing_strategy"
|
|
23
|
+
| "sales_playbook";
|
|
24
|
+
label: string;
|
|
25
|
+
artifact: string;
|
|
26
|
+
available: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
@@ -35,8 +35,8 @@ const config: ProjectConfigSettings = {
|
|
|
35
35
|
|
|
36
36
|
describe("project settings form mapping", () => {
|
|
37
37
|
it("renders a canonical framework SemVer as a short major.minor label", () => {
|
|
38
|
-
expect(shortFrameworkVersion("
|
|
39
|
-
expect(shortFrameworkVersion("
|
|
38
|
+
expect(shortFrameworkVersion("2.2.0")).toBe("v2.0");
|
|
39
|
+
expect(shortFrameworkVersion("v2.2.0")).toBe("v2.0");
|
|
40
40
|
expect(shortFrameworkVersion("1.0")).toBeNull();
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -49,7 +49,7 @@ export interface TaskTrace {
|
|
|
49
49
|
schema_version: 2;
|
|
50
50
|
layout_version: 2 | 3;
|
|
51
51
|
readonly: true;
|
|
52
|
-
source: ".agents/records";
|
|
52
|
+
source: ".agents/data" | ".agents/records";
|
|
53
53
|
task_id: string;
|
|
54
54
|
task_title: string;
|
|
55
55
|
task_risk: "lite" | "standard" | "critical" | null;
|