@cat-factory/app 0.42.1 → 0.44.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.
@@ -6,9 +6,11 @@ import { useWorkspaceStore } from '~/stores/workspace'
6
6
  /**
7
7
  * Visual-confirmation gate actions. The gate's live state rides on its execution step
8
8
  * (`step.visualConfirm`) and arrives via the execution stream, so this store holds NO gate
9
- * state — it only drives the actions (approve / request a fix / recapture), uploads reference
10
- * design images, and resolves stored artifacts into object URLs for the gallery. A per-block
11
- * `busy` flag lets the window disable its controls while an action is in flight.
9
+ * state — it only drives the actions (approve / request a fix / recapture) and uploads
10
+ * reference design images. A per-block `busy` flag lets the window disable its controls
11
+ * while an action is in flight. (Resolving stored artifacts into object URLs for the gallery
12
+ * lives in the per-component `useArtifactBlobs` composable, so each window owns + revokes its
13
+ * own blob cache on unmount.)
12
14
  */
13
15
  export const useVisualConfirmStore = defineStore('visualConfirm', () => {
14
16
  const api = useApi()
@@ -16,8 +18,6 @@ export const useVisualConfirmStore = defineStore('visualConfirm', () => {
16
18
  const execution = useExecutionStore()
17
19
 
18
20
  const busy = ref<Set<string>>(new Set())
19
- /** Cache of artifactId → object URL, so the gallery doesn't re-fetch the same blob. */
20
- const blobUrls = ref<Map<string, string>>(new Map())
21
21
 
22
22
  function isBusy(blockId: string): boolean {
23
23
  return busy.value.has(blockId)
@@ -59,34 +59,5 @@ export const useVisualConfirmStore = defineStore('visualConfirm', () => {
59
59
  return run(blockId, () => api.uploadReferenceArtifact(ws.requireId(), blockId, file, view))
60
60
  }
61
61
 
62
- /** Resolve a stored artifact to an object URL (cached). Returns null on failure. */
63
- async function blobUrl(artifactId: string): Promise<string | null> {
64
- const cached = blobUrls.value.get(artifactId)
65
- if (cached) return cached
66
- try {
67
- const url = await api.fetchArtifactBlobUrl(ws.requireId(), artifactId)
68
- blobUrls.value.set(artifactId, url)
69
- return url
70
- } catch {
71
- return null
72
- }
73
- }
74
-
75
- /**
76
- * Release every cached object URL and clear the cache. `URL.createObjectURL` holds the
77
- * blob in memory until explicitly revoked, so the gate window calls this on unmount to
78
- * avoid leaking the (potentially large) screenshot bytes for the session's lifetime.
79
- */
80
- function revokeBlobs(): void {
81
- for (const url of blobUrls.value.values()) {
82
- try {
83
- URL.revokeObjectURL(url)
84
- } catch {
85
- // Ignore — a URL already revoked / unsupported environment.
86
- }
87
- }
88
- blobUrls.value = new Map()
89
- }
90
-
91
- return { isBusy, approve, requestFix, recapture, uploadReference, blobUrl, revokeBlobs }
62
+ return { isBusy, approve, requestFix, recapture, uploadReference }
92
63
  })
@@ -32,6 +32,7 @@ export type {
32
32
  TestConcern,
33
33
  TestOutcome,
34
34
  TestReport,
35
+ TestScreenshot,
35
36
  AgentKind,
36
37
  AgentCategory,
37
38
  CustomAgentKind,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.42.1",
3
+ "version": "0.44.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",
@@ -34,7 +34,7 @@
34
34
  "pinia-plugin-persistedstate": "^4.7.1",
35
35
  "vue": "^3.5.38",
36
36
  "wretch": "^3.0.9",
37
- "@cat-factory/contracts": "0.40.1"
37
+ "@cat-factory/contracts": "0.41.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@toad-contracts/testing": "0.3.1",