@cat-factory/app 0.48.0 → 0.48.1
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.
|
@@ -64,6 +64,11 @@ export function useWorkspaceStream() {
|
|
|
64
64
|
// or a failed badge) without a full refresh.
|
|
65
65
|
agentRuns.upsertBootstrap(event.job)
|
|
66
66
|
if (event.block) board.upsert(event.block)
|
|
67
|
+
} else if (event.type === 'env-config-repair') {
|
|
68
|
+
// A provider config-repair run advanced — patch its live status/subtasks/outcome so
|
|
69
|
+
// the infrastructure-providers window's "repairing…" indicator updates in place
|
|
70
|
+
// (then flips to ok / residual issues / a failure) without a refetch. No board block.
|
|
71
|
+
agentRuns.upsertEnvConfigRepair(event.job)
|
|
67
72
|
} else if (event.type === 'notification') {
|
|
68
73
|
// A PR needs a merge decision, a pipeline finished, or CI gave up — patch the
|
|
69
74
|
// inbox + per-block badge in place (resolved ones drop out of the inbox).
|
package/app/stores/agentRuns.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { defineStore } from 'pinia'
|
|
2
2
|
import { computed, ref } from 'vue'
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
AgentFailure,
|
|
5
|
+
AgentRunKind,
|
|
6
|
+
BootstrapJob,
|
|
7
|
+
EnvConfigRepairJob,
|
|
8
|
+
StepSubtasks,
|
|
9
|
+
} from '~/types/domain'
|
|
4
10
|
import { useWorkspaceStore } from '~/stores/workspace'
|
|
5
11
|
import { useExecutionStore } from '~/stores/execution'
|
|
6
12
|
|
|
@@ -45,11 +51,40 @@ export const useAgentRunsStore = defineStore('agentRuns', () => {
|
|
|
45
51
|
/** Bootstrap runs for this workspace, newest-first. */
|
|
46
52
|
const bootstrapJobs = ref<BootstrapJob[]>([])
|
|
47
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Env-config-repair runs for this workspace, newest-first. These have NO board block —
|
|
56
|
+
* they're surfaced only on the infrastructure-providers window (looked up by the
|
|
57
|
+
* `repairJobId` the `bootstrapRepo` response returned), so they're held separately and
|
|
58
|
+
* NOT merged into {@link byBlock}.
|
|
59
|
+
*/
|
|
60
|
+
const envConfigRepairJobs = ref<EnvConfigRepairJob[]>([])
|
|
61
|
+
|
|
48
62
|
/** Replace the cached bootstrap runs with a server snapshot. */
|
|
49
63
|
function hydrate(jobs: BootstrapJob[]) {
|
|
50
64
|
bootstrapJobs.value = [...jobs].sort((a, b) => b.createdAt - a.createdAt)
|
|
51
65
|
}
|
|
52
66
|
|
|
67
|
+
/** Replace the cached env-config-repair runs with a server snapshot. */
|
|
68
|
+
function hydrateEnvConfigRepair(jobs: EnvConfigRepairJob[]) {
|
|
69
|
+
envConfigRepairJobs.value = [...jobs].sort((a, b) => b.createdAt - a.createdAt)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Patch an env-config-repair run from a real-time `env-config-repair` event (or after
|
|
74
|
+
* launching one): replace it in place by id, else prepend it. Keeps the infra window's
|
|
75
|
+
* "repairing…" indicator reactive to live progress / outcome without a refetch.
|
|
76
|
+
*/
|
|
77
|
+
function upsertEnvConfigRepair(job: EnvConfigRepairJob) {
|
|
78
|
+
const i = envConfigRepairJobs.value.findIndex((j) => j.id === job.id)
|
|
79
|
+
if (i >= 0) envConfigRepairJobs.value[i] = job
|
|
80
|
+
else envConfigRepairJobs.value.unshift(job)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Look up a single env-config-repair run by id (the infra window tracks one by `repairJobId`). */
|
|
84
|
+
function envConfigRepairById(id: string): EnvConfigRepairJob | undefined {
|
|
85
|
+
return envConfigRepairJobs.value.find((j) => j.id === id)
|
|
86
|
+
}
|
|
87
|
+
|
|
53
88
|
/**
|
|
54
89
|
* Patch a bootstrap run from a real-time `bootstrap` event (or after launching
|
|
55
90
|
* one): replace it in place by id, else prepend it. Keeps the service card
|
|
@@ -126,5 +161,16 @@ export const useAgentRunsStore = defineStore('agentRuns', () => {
|
|
|
126
161
|
return kind
|
|
127
162
|
}
|
|
128
163
|
|
|
129
|
-
return {
|
|
164
|
+
return {
|
|
165
|
+
bootstrapJobs,
|
|
166
|
+
hydrate,
|
|
167
|
+
upsertBootstrap,
|
|
168
|
+
envConfigRepairJobs,
|
|
169
|
+
hydrateEnvConfigRepair,
|
|
170
|
+
upsertEnvConfigRepair,
|
|
171
|
+
envConfigRepairById,
|
|
172
|
+
byBlock,
|
|
173
|
+
retry,
|
|
174
|
+
stop,
|
|
175
|
+
}
|
|
130
176
|
})
|
package/app/stores/workspace.ts
CHANGED
|
@@ -85,6 +85,7 @@ export const useWorkspaceStore = defineStore(
|
|
|
85
85
|
usePipelinesStore().hydrate(snapshot.pipelines, snapshot.pipelineCatalogVersions)
|
|
86
86
|
useExecutionStore().hydrate(snapshot.executions)
|
|
87
87
|
useAgentRunsStore().hydrate(snapshot.bootstrapJobs ?? [])
|
|
88
|
+
useAgentRunsStore().hydrateEnvConfigRepair(snapshot.envConfigRepairJobs ?? [])
|
|
88
89
|
useNotificationsStore().hydrate(snapshot.notifications ?? [])
|
|
89
90
|
useMergePresetsStore().hydrate(snapshot.mergePresets ?? [])
|
|
90
91
|
useWorkspaceSettingsStore().hydrate(snapshot.settings)
|
package/app/types/domain.ts
CHANGED
|
@@ -105,6 +105,7 @@ export type * from './fragments'
|
|
|
105
105
|
export type * from './documents'
|
|
106
106
|
export type * from './tasks'
|
|
107
107
|
export type * from './bootstrap'
|
|
108
|
+
export type * from './envConfigRepair'
|
|
108
109
|
export type * from './github'
|
|
109
110
|
export type * from './accounts'
|
|
110
111
|
export type * from './notifications'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Environment-provider config-repair domain types. Mirrors the
|
|
3
|
+
// `@cat-factory/contracts` env-config-repair schemas so backend payloads drop
|
|
4
|
+
// straight into the Pinia store.
|
|
5
|
+
//
|
|
6
|
+
// A config-repair run is the durable agent fallback dispatched when mechanical
|
|
7
|
+
// provider-config bootstrap can't produce a valid config: a coding agent fixes the
|
|
8
|
+
// provider's config file in an existing repo and pushes the fix back, then the
|
|
9
|
+
// backend re-validates. It has no board block — it's surfaced only on the
|
|
10
|
+
// infrastructure-providers window that triggered it.
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
//
|
|
13
|
+
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
14
|
+
|
|
15
|
+
export type { EnvConfigRepairStatus, EnvConfigRepairJob } from '@cat-factory/contracts'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.1",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"valibot": "^1.4.2",
|
|
35
35
|
"vue": "^3.5.39",
|
|
36
36
|
"wretch": "^3.0.9",
|
|
37
|
-
"@cat-factory/contracts": "0.
|
|
37
|
+
"@cat-factory/contracts": "0.47.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@toad-contracts/testing": "0.3.2",
|