@cat-factory/app 0.26.7 → 0.28.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/app/components/layout/AccountDeploymentSettings.vue +236 -0
- package/app/components/layout/AccountTeamSettings.vue +6 -0
- package/app/components/layout/CommandBar.vue +8 -0
- package/app/components/layout/SideBar.vue +13 -0
- package/app/components/sandbox/SandboxPanel.vue +542 -0
- package/app/components/settings/ObservabilityConnectionPanel.vue +92 -0
- package/app/components/settings/WorkspaceSettingsPanel.vue +116 -1
- package/app/composables/api/accounts.ts +12 -0
- package/app/composables/api/releaseHealth.ts +17 -0
- package/app/composables/api/sandbox.ts +57 -0
- package/app/composables/useApi.ts +2 -0
- package/app/pages/index.vue +2 -0
- package/app/stores/accountSettings.ts +49 -0
- package/app/stores/releaseHealth.ts +37 -0
- package/app/stores/sandbox.ts +174 -0
- package/app/stores/ui.ts +11 -0
- package/app/stores/workspaceSettings.ts +3 -0
- package/app/types/accountSettings.ts +39 -0
- package/app/types/domain.ts +9 -0
- package/app/types/incidentEnrichment.ts +28 -0
- package/app/types/sandbox.ts +183 -0
- package/package.json +1 -1
package/app/types/domain.ts
CHANGED
|
@@ -493,6 +493,12 @@ export interface WorkspaceSettings {
|
|
|
493
493
|
taskLimitShared: number | null
|
|
494
494
|
/** The per-type caps, when `taskLimitMode` is `per_type` (type → cap). */
|
|
495
495
|
taskLimitPerType: Partial<Record<CreateTaskType, number>> | null
|
|
496
|
+
/** Spend budget currency (ISO 4217). Null ⇒ the built-in default (`EUR`). */
|
|
497
|
+
spendCurrency: string | null
|
|
498
|
+
/** Monthly spend budget in `spendCurrency`. Null ⇒ the built-in default. */
|
|
499
|
+
spendMonthlyLimit: number | null
|
|
500
|
+
/** Per-model price overrides (`provider:model` → per-1M rates). Null ⇒ none. */
|
|
501
|
+
spendModelPrices: Record<string, { inputPerMillion: number; outputPerMillion: number }> | null
|
|
496
502
|
}
|
|
497
503
|
|
|
498
504
|
/** Patch a workspace's settings (only the supplied fields change). */
|
|
@@ -501,6 +507,9 @@ export interface UpdateWorkspaceSettingsInput {
|
|
|
501
507
|
taskLimitMode?: TaskLimitMode
|
|
502
508
|
taskLimitShared?: number | null
|
|
503
509
|
taskLimitPerType?: Partial<Record<CreateTaskType, number>> | null
|
|
510
|
+
spendCurrency?: string | null
|
|
511
|
+
spendMonthlyLimit?: number | null
|
|
512
|
+
spendModelPrices?: Record<string, { inputPerMillion: number; outputPerMillion: number }> | null
|
|
504
513
|
}
|
|
505
514
|
|
|
506
515
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Per-workspace incident-enrichment connection (PagerDuty + incident.io). Mirrors
|
|
2
|
+
// `@cat-factory/contracts` incident-enrichment. Credentials are write-only — the view
|
|
3
|
+
// returns only a presence `summary`.
|
|
4
|
+
|
|
5
|
+
export interface PagerDutyCredentials {
|
|
6
|
+
apiToken: string
|
|
7
|
+
fromEmail: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface IncidentIoCredentials {
|
|
11
|
+
apiKey: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Write input — set one or both providers; an omitted group is left unchanged. */
|
|
15
|
+
export interface UpsertIncidentEnrichmentInput {
|
|
16
|
+
pagerDuty?: PagerDutyCredentials
|
|
17
|
+
incidentIo?: IncidentIoCredentials
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IncidentEnrichmentSummary {
|
|
21
|
+
pagerDuty: boolean
|
|
22
|
+
incidentIo: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IncidentEnrichmentView {
|
|
26
|
+
connected: boolean
|
|
27
|
+
summary: IncidentEnrichmentSummary | null
|
|
28
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// Sandbox (the parallel prompt/model testing surface) wire shapes, hand-mirrored from
|
|
2
|
+
// `@cat-factory/contracts` (sandbox.ts) so a backend payload drops straight into the
|
|
3
|
+
// store. Clone a shipped agent prompt into a versioned candidate, run an experiment
|
|
4
|
+
// matrix (prompt versions × models × fixtures) for one agent kind, and grade every cell
|
|
5
|
+
// with a judge model plus (where a fixture supports it) an objective findings score.
|
|
6
|
+
|
|
7
|
+
export type SandboxPromptOrigin = 'baseline' | 'candidate'
|
|
8
|
+
|
|
9
|
+
export interface SandboxPromptVersion {
|
|
10
|
+
id: string
|
|
11
|
+
lineageId: string
|
|
12
|
+
agentKind: string
|
|
13
|
+
name: string
|
|
14
|
+
origin: SandboxPromptOrigin
|
|
15
|
+
systemText: string
|
|
16
|
+
basePromptId: string | null
|
|
17
|
+
version: number
|
|
18
|
+
parentId: string | null
|
|
19
|
+
labels: string[]
|
|
20
|
+
createdAt: number
|
|
21
|
+
createdBy: string | null
|
|
22
|
+
archivedAt: number | null
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type SandboxFixtureKind =
|
|
26
|
+
| 'requirements'
|
|
27
|
+
| 'clarity'
|
|
28
|
+
| 'architecture'
|
|
29
|
+
| 'code-review'
|
|
30
|
+
| 'repo-feature'
|
|
31
|
+
| 'repo-bug'
|
|
32
|
+
|
|
33
|
+
export interface SandboxExpectation {
|
|
34
|
+
id: string
|
|
35
|
+
summary: string
|
|
36
|
+
detail: string
|
|
37
|
+
trickiness: number
|
|
38
|
+
impact: number
|
|
39
|
+
matchHints: string[]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type SandboxFixtureObjective =
|
|
43
|
+
| { kind: 'tests'; testCmd: string }
|
|
44
|
+
| { kind: 'findings'; expectations: SandboxExpectation[] }
|
|
45
|
+
|
|
46
|
+
export interface SandboxFixture {
|
|
47
|
+
id: string
|
|
48
|
+
kind: SandboxFixtureKind
|
|
49
|
+
name: string
|
|
50
|
+
payload: Record<string, unknown> | null
|
|
51
|
+
repoRef: { owner: string; name: string; seedRef: string } | null
|
|
52
|
+
objective: SandboxFixtureObjective | null
|
|
53
|
+
origin: 'builtin' | 'custom'
|
|
54
|
+
createdAt: number
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type SandboxExperimentStatus = 'draft' | 'running' | 'done' | 'failed'
|
|
58
|
+
|
|
59
|
+
export interface SandboxMatrix {
|
|
60
|
+
promptVersionIds: string[]
|
|
61
|
+
models: string[]
|
|
62
|
+
fixtureIds: string[]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface SandboxExperiment {
|
|
66
|
+
id: string
|
|
67
|
+
name: string
|
|
68
|
+
agentKind: string
|
|
69
|
+
judgeModel: string
|
|
70
|
+
repeats: number
|
|
71
|
+
status: SandboxExperimentStatus
|
|
72
|
+
matrix: SandboxMatrix
|
|
73
|
+
budgetTokens: number | null
|
|
74
|
+
createdAt: number
|
|
75
|
+
createdBy: string | null
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type SandboxRunStatus = 'queued' | 'running' | 'done' | 'failed'
|
|
79
|
+
|
|
80
|
+
export interface SandboxTokenUsage {
|
|
81
|
+
inputTokens: number
|
|
82
|
+
outputTokens: number
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface SandboxRun {
|
|
86
|
+
id: string
|
|
87
|
+
experimentId: string
|
|
88
|
+
promptVersionId: string
|
|
89
|
+
model: string
|
|
90
|
+
fixtureId: string
|
|
91
|
+
repeatIndex: number
|
|
92
|
+
status: SandboxRunStatus
|
|
93
|
+
outputText: string | null
|
|
94
|
+
usage: SandboxTokenUsage | null
|
|
95
|
+
latencyMs: number | null
|
|
96
|
+
branch: string | null
|
|
97
|
+
prUrl: string | null
|
|
98
|
+
diff: string | null
|
|
99
|
+
error: string | null
|
|
100
|
+
seedSha: string | null
|
|
101
|
+
promptLabel: string
|
|
102
|
+
startedAt: number | null
|
|
103
|
+
finishedAt: number | null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface SandboxGradeDimension {
|
|
107
|
+
key: string
|
|
108
|
+
score: number
|
|
109
|
+
rationale: string
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface SandboxObjectiveResult {
|
|
113
|
+
kind: 'tests' | 'findings'
|
|
114
|
+
pass: boolean
|
|
115
|
+
detail: string
|
|
116
|
+
impactRecall: number | null
|
|
117
|
+
wowBonus: number | null
|
|
118
|
+
caught: number | null
|
|
119
|
+
total: number | null
|
|
120
|
+
missedHighImpact: string[] | null
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface SandboxGrade {
|
|
124
|
+
id: string
|
|
125
|
+
runId: string
|
|
126
|
+
judgeModel: string
|
|
127
|
+
scores: SandboxGradeDimension[]
|
|
128
|
+
weightedTotal: number
|
|
129
|
+
objective: SandboxObjectiveResult | null
|
|
130
|
+
createdAt: number
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** The Sandbox catalog entry for a testable agent kind (from the overview). */
|
|
134
|
+
export interface SandboxAgentKindMeta {
|
|
135
|
+
agentKind: string
|
|
136
|
+
label: string
|
|
137
|
+
bucket: 'inline' | 'container'
|
|
138
|
+
rubric: 'requirement-review' | 'code-review' | 'implementation'
|
|
139
|
+
/** Fixture kinds this agent is exercised against (the UI filters the library by these). */
|
|
140
|
+
fixtureKinds: SandboxFixtureKind[]
|
|
141
|
+
basePromptId: string | null
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** The composite the management surface loads on open (`GET /sandbox/overview`). */
|
|
145
|
+
export interface SandboxOverview {
|
|
146
|
+
agentKinds: SandboxAgentKindMeta[]
|
|
147
|
+
prompts: SandboxPromptVersion[]
|
|
148
|
+
fixtures: SandboxFixture[]
|
|
149
|
+
experiments: SandboxExperiment[]
|
|
150
|
+
/** The matrix cell cap (the backend cost guard), so the builder gates on the same limit. */
|
|
151
|
+
maxCells: number
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** An experiment with its result grid (`GET /sandbox/experiments/:id`, also from launch). */
|
|
155
|
+
export interface SandboxExperimentDetail {
|
|
156
|
+
experiment: SandboxExperiment
|
|
157
|
+
runs: SandboxRun[]
|
|
158
|
+
grades: SandboxGrade[]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// ---- request bodies --------------------------------------------------------
|
|
162
|
+
|
|
163
|
+
export interface CloneSandboxPromptInput {
|
|
164
|
+
agentKind: string
|
|
165
|
+
basePromptId: string | null
|
|
166
|
+
name?: string
|
|
167
|
+
labels?: string[]
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface SaveSandboxVersionInput {
|
|
171
|
+
parentId: string
|
|
172
|
+
systemText: string
|
|
173
|
+
labels?: string[]
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface CreateSandboxExperimentInput {
|
|
177
|
+
name: string
|
|
178
|
+
agentKind: string
|
|
179
|
+
matrix: SandboxMatrix
|
|
180
|
+
judgeModel?: string
|
|
181
|
+
repeats?: number
|
|
182
|
+
budgetTokens?: number | null
|
|
183
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|