@cat-factory/app 0.279.0 → 0.280.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/sandbox/SandboxPanel.vue +39 -1
- package/app/types/sandbox.ts +25 -3
- package/i18n/locales/de.json +6 -0
- package/i18n/locales/en.json +6 -0
- package/i18n/locales/es.json +6 -0
- package/i18n/locales/fr.json +6 -0
- package/i18n/locales/he.json +6 -0
- package/i18n/locales/it.json +6 -0
- package/i18n/locales/ja.json +6 -0
- package/i18n/locales/pl.json +6 -0
- package/i18n/locales/tr.json +6 -0
- package/i18n/locales/uk.json +6 -0
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ import type {
|
|
|
13
13
|
SandboxPromptOrigin,
|
|
14
14
|
SandboxPromptVersion,
|
|
15
15
|
SandboxRun,
|
|
16
|
+
SandboxUnsupportedReason,
|
|
16
17
|
} from '~/types/sandbox'
|
|
17
18
|
|
|
18
19
|
const ui = useUiStore()
|
|
@@ -34,9 +35,21 @@ const FIXTURE_KIND_LABEL = computed<Record<SandboxFixtureKind, string>>(() => ({
|
|
|
34
35
|
clarity: t('sandbox.fixtureKind.clarity'),
|
|
35
36
|
architecture: t('sandbox.fixtureKind.architecture'),
|
|
36
37
|
'code-review': t('sandbox.fixtureKind.code-review'),
|
|
38
|
+
estimation: t('sandbox.fixtureKind.estimation'),
|
|
39
|
+
'answer-recommendation': t('sandbox.fixtureKind.answer-recommendation'),
|
|
37
40
|
'repo-feature': t('sandbox.fixtureKind.repo-feature'),
|
|
38
41
|
'repo-bug': t('sandbox.fixtureKind.repo-bug'),
|
|
39
42
|
}))
|
|
43
|
+
/**
|
|
44
|
+
* Why the Sandbox cannot run a kind, in the reader's own language.
|
|
45
|
+
*
|
|
46
|
+
* The backend sends the CODE and this maps it: the catalog decides, the SPA words it. Composing
|
|
47
|
+
* the sentence server-side would have put untranslated English under a translated form label, and
|
|
48
|
+
* an exhaustive Record is what stops a new code shipping that way silently.
|
|
49
|
+
*/
|
|
50
|
+
const UNSUPPORTED_REASON_LABEL = computed<Record<SandboxUnsupportedReason, string>>(() => ({
|
|
51
|
+
'container-run-required': t('sandbox.unsupportedReason.container-run-required'),
|
|
52
|
+
}))
|
|
40
53
|
/**
|
|
41
54
|
* Badge colour per prompt origin. An exhaustive Record over the closed union rather than a
|
|
42
55
|
* ternary, so adding an origin fails the typecheck here instead of silently rendering as
|
|
@@ -99,6 +112,19 @@ watch(
|
|
|
99
112
|
)
|
|
100
113
|
|
|
101
114
|
// ---- experiment builder ----------------------------------------------------
|
|
115
|
+
/**
|
|
116
|
+
* The kinds the builder may offer, and the ones it cannot, from the catalog's own answer.
|
|
117
|
+
*
|
|
118
|
+
* Offering an un-runnable kind is worse than omitting it: `POST /sandbox/experiments` refuses it, so
|
|
119
|
+
* the whole matrix is built and then 400s. But omitting it silently would read as "the Sandbox does
|
|
120
|
+
* not know about the coder", so the excluded kinds are NAMED with the catalog's own reason under the
|
|
121
|
+
* field. Their prompts stay in the Prompts tab, where cloning and promoting them still works.
|
|
122
|
+
*/
|
|
123
|
+
const runnableAgentKinds = computed(() => store.agentKinds.filter((k) => k.sandboxRun === 'inline'))
|
|
124
|
+
const unrunnableAgentKinds = computed(() =>
|
|
125
|
+
store.agentKinds.filter((k) => k.sandboxRun !== 'inline'),
|
|
126
|
+
)
|
|
127
|
+
|
|
102
128
|
const agentKind = ref('requirements-review')
|
|
103
129
|
const name = ref('')
|
|
104
130
|
const selectedPromptIds = ref<string[]>([])
|
|
@@ -298,10 +324,22 @@ async function archive(prompt: SandboxPromptVersion) {
|
|
|
298
324
|
<UFormField :label="t('sandbox.builder.agent')">
|
|
299
325
|
<USelect
|
|
300
326
|
v-model="agentKind"
|
|
301
|
-
:items="
|
|
327
|
+
:items="runnableAgentKinds.map((k) => ({ label: k.label, value: k.agentKind }))"
|
|
302
328
|
value-key="value"
|
|
303
329
|
class="w-full"
|
|
304
330
|
/>
|
|
331
|
+
<p
|
|
332
|
+
v-for="excluded in unrunnableAgentKinds"
|
|
333
|
+
:key="excluded.agentKind"
|
|
334
|
+
class="mt-1 text-[11px] leading-snug text-slate-500"
|
|
335
|
+
>
|
|
336
|
+
<span class="font-medium text-slate-400">{{ excluded.label }}:</span>
|
|
337
|
+
{{
|
|
338
|
+
excluded.unsupportedReason
|
|
339
|
+
? UNSUPPORTED_REASON_LABEL[excluded.unsupportedReason]
|
|
340
|
+
: t('sandbox.unsupportedReason.unknown')
|
|
341
|
+
}}
|
|
342
|
+
</p>
|
|
305
343
|
</UFormField>
|
|
306
344
|
|
|
307
345
|
<div>
|
package/app/types/sandbox.ts
CHANGED
|
@@ -5,10 +5,16 @@
|
|
|
5
5
|
//
|
|
6
6
|
// All wire shapes are sourced from @cat-factory/contracts (single source of truth).
|
|
7
7
|
// The overview / agent-kind-meta / experiment-detail composites have no exported
|
|
8
|
-
// contract type (the routes model them inline), so they stay frontend-only below
|
|
9
|
-
// and
|
|
8
|
+
// contract type (the routes model them inline), so they stay frontend-only below.
|
|
9
|
+
// `bucket`, `sandboxRun` and `unsupportedReason` reuse the contract's picklist types (the builder
|
|
10
|
+
// branches on `sandboxRun` and MAPS `unsupportedReason` to a locale key, so a widened `string`
|
|
11
|
+
// there would let a typo compile and a new member ship untranslated); `rubric` stays the
|
|
12
|
+
// contract's looser `string`, since nothing here branches on it.
|
|
10
13
|
|
|
11
14
|
export type {
|
|
15
|
+
SandboxAgentBucket,
|
|
16
|
+
SandboxRunMode,
|
|
17
|
+
SandboxUnsupportedReason,
|
|
12
18
|
SandboxPromptOrigin,
|
|
13
19
|
SandboxPromptVersion,
|
|
14
20
|
SandboxFixtureKind,
|
|
@@ -30,19 +36,35 @@ export type {
|
|
|
30
36
|
} from '@cat-factory/contracts'
|
|
31
37
|
|
|
32
38
|
import type {
|
|
39
|
+
SandboxAgentBucket,
|
|
33
40
|
SandboxExperiment,
|
|
34
41
|
SandboxFixture,
|
|
35
42
|
SandboxFixtureKind,
|
|
36
43
|
SandboxGrade,
|
|
37
44
|
SandboxPromptVersion,
|
|
38
45
|
SandboxRun,
|
|
46
|
+
SandboxRunMode,
|
|
47
|
+
SandboxUnsupportedReason,
|
|
39
48
|
} from '@cat-factory/contracts'
|
|
40
49
|
|
|
41
50
|
/** The Sandbox catalog entry for a testable agent kind (from the overview). Frontend-only. */
|
|
42
51
|
export interface SandboxAgentKindMeta {
|
|
43
52
|
agentKind: string
|
|
44
53
|
label: string
|
|
45
|
-
|
|
54
|
+
/** How PRODUCTION dispatches the kind (an inline call, or a container with a checkout). */
|
|
55
|
+
bucket: SandboxAgentBucket
|
|
56
|
+
/**
|
|
57
|
+
* How the SANDBOX runs a cell for it. `unsupported` ⇒ the builder must not offer it: creating an
|
|
58
|
+
* experiment for such a kind is refused server-side, so an enabled option would only ever produce
|
|
59
|
+
* a 400 on a surface that suggested it.
|
|
60
|
+
*/
|
|
61
|
+
sandboxRun: SandboxRunMode
|
|
62
|
+
/**
|
|
63
|
+
* Why the Sandbox cannot run this kind, as the catalog's bounded CODE; null when it can. The
|
|
64
|
+
* builder maps it through an exhaustive `Record` to a locale key, so a new member fails the
|
|
65
|
+
* typecheck instead of reaching a non-English reader in English.
|
|
66
|
+
*/
|
|
67
|
+
unsupportedReason: SandboxUnsupportedReason | null
|
|
46
68
|
rubric: string
|
|
47
69
|
/** Fixture kinds this agent is exercised against (the UI filters the library by these). */
|
|
48
70
|
fixtureKinds: SandboxFixtureKind[]
|
package/i18n/locales/de.json
CHANGED
|
@@ -7021,9 +7021,15 @@
|
|
|
7021
7021
|
"clarity": "Klarheit",
|
|
7022
7022
|
"architecture": "Architektur",
|
|
7023
7023
|
"code-review": "Code-Review",
|
|
7024
|
+
"estimation": "Schätzung",
|
|
7025
|
+
"answer-recommendation": "empfohlene Antworten",
|
|
7024
7026
|
"repo-feature": "Repo-Feature",
|
|
7025
7027
|
"repo-bug": "Repo-Bug"
|
|
7026
7028
|
},
|
|
7029
|
+
"unsupportedReason": {
|
|
7030
|
+
"container-run-required": "Sein Ergebnis ist ein gepushter Commit. Die Bewertung braucht daher einen echten Container-Lauf gegen ein Seed-Repository; eine Inline-Zelle kann nur Text bewerten.",
|
|
7031
|
+
"unknown": "Dieser Agent kann nicht in der Sandbox laufen."
|
|
7032
|
+
},
|
|
7027
7033
|
"fixtureOrigin": {
|
|
7028
7034
|
"builtin": "integriert",
|
|
7029
7035
|
"custom": "benutzerdefiniert"
|
package/i18n/locales/en.json
CHANGED
|
@@ -7098,9 +7098,15 @@
|
|
|
7098
7098
|
"clarity": "clarity",
|
|
7099
7099
|
"architecture": "architecture",
|
|
7100
7100
|
"code-review": "code review",
|
|
7101
|
+
"estimation": "estimation",
|
|
7102
|
+
"answer-recommendation": "recommended answers",
|
|
7101
7103
|
"repo-feature": "repo feature",
|
|
7102
7104
|
"repo-bug": "repo bug"
|
|
7103
7105
|
},
|
|
7106
|
+
"unsupportedReason": {
|
|
7107
|
+
"container-run-required": "Its deliverable is a pushed commit, so grading it needs a real container run against a seed repository. An inline cell can only grade text.",
|
|
7108
|
+
"unknown": "This agent cannot run in the Sandbox."
|
|
7109
|
+
},
|
|
7104
7110
|
"fixtureOrigin": {
|
|
7105
7111
|
"builtin": "builtin",
|
|
7106
7112
|
"custom": "custom"
|
package/i18n/locales/es.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "claridad",
|
|
6779
6779
|
"architecture": "arquitectura",
|
|
6780
6780
|
"code-review": "revisión de código",
|
|
6781
|
+
"estimation": "estimación",
|
|
6782
|
+
"answer-recommendation": "respuestas recomendadas",
|
|
6781
6783
|
"repo-feature": "función de repositorio",
|
|
6782
6784
|
"repo-bug": "error de repositorio"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "Su entregable es un commit publicado, así que evaluarlo requiere una ejecución real en contenedor contra un repositorio semilla; una celda en línea solo puede evaluar texto.",
|
|
6788
|
+
"unknown": "Este agente no puede ejecutarse en el Sandbox."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "integrado",
|
|
6786
6792
|
"custom": "personalizado"
|
package/i18n/locales/fr.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "clarté",
|
|
6779
6779
|
"architecture": "architecture",
|
|
6780
6780
|
"code-review": "revue de code",
|
|
6781
|
+
"estimation": "estimation",
|
|
6782
|
+
"answer-recommendation": "réponses recommandées",
|
|
6781
6783
|
"repo-feature": "fonctionnalité de dépôt",
|
|
6782
6784
|
"repo-bug": "bogue de dépôt"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "Son livrable est un commit poussé : l’évaluer exige une exécution réelle en conteneur sur un dépôt de départ ; une cellule en ligne ne peut évaluer que du texte.",
|
|
6788
|
+
"unknown": "Cet agent ne peut pas s’exécuter dans le Sandbox."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "intégré",
|
|
6786
6792
|
"custom": "personnalisé"
|
package/i18n/locales/he.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "בהירות",
|
|
6779
6779
|
"architecture": "ארכיטקטורה",
|
|
6780
6780
|
"code-review": "סקירת קוד",
|
|
6781
|
+
"estimation": "אמדן",
|
|
6782
|
+
"answer-recommendation": "תשובות מומלצות",
|
|
6781
6783
|
"repo-feature": "פיצ׳ר במאגר",
|
|
6782
6784
|
"repo-bug": "באג במאגר"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "התוצר שלו הוא קומיט שנדחף, ולכן הערכה שלו דורשת הרצה אמיתית בקונטיינר מול מאגר זרע; תא מוטבע יכול להעריך טקסט בלבד.",
|
|
6788
|
+
"unknown": "סוכן זה אינו יכול לרוץ ב-Sandbox."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "מובנה",
|
|
6786
6792
|
"custom": "מותאם אישית"
|
package/i18n/locales/it.json
CHANGED
|
@@ -7021,9 +7021,15 @@
|
|
|
7021
7021
|
"clarity": "chiarezza",
|
|
7022
7022
|
"architecture": "architettura",
|
|
7023
7023
|
"code-review": "revisione del codice",
|
|
7024
|
+
"estimation": "stima",
|
|
7025
|
+
"answer-recommendation": "risposte consigliate",
|
|
7024
7026
|
"repo-feature": "funzionalità del repository",
|
|
7025
7027
|
"repo-bug": "bug del repository"
|
|
7026
7028
|
},
|
|
7029
|
+
"unsupportedReason": {
|
|
7030
|
+
"container-run-required": "Il suo risultato è un commit inviato, quindi valutarlo richiede un’esecuzione reale in container su un repository seme; una cella inline può valutare solo testo.",
|
|
7031
|
+
"unknown": "Questo agente non può essere eseguito nella Sandbox."
|
|
7032
|
+
},
|
|
7027
7033
|
"fixtureOrigin": {
|
|
7028
7034
|
"builtin": "integrata",
|
|
7029
7035
|
"custom": "personalizzata"
|
package/i18n/locales/ja.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "明確さ",
|
|
6779
6779
|
"architecture": "アーキテクチャ",
|
|
6780
6780
|
"code-review": "コードレビュー",
|
|
6781
|
+
"estimation": "見積もり",
|
|
6782
|
+
"answer-recommendation": "推奨回答",
|
|
6781
6783
|
"repo-feature": "リポジトリ機能",
|
|
6782
6784
|
"repo-bug": "リポジトリのバグ"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "成果物はプッシュされたコミットのため、評価にはシード用リポジトリに対する実際のコンテナ実行が必要です。インラインのセルはテキストしか評価できません。",
|
|
6788
|
+
"unknown": "このエージェントはサンドボックスでは実行できません。"
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "組み込み",
|
|
6786
6792
|
"custom": "カスタム"
|
package/i18n/locales/pl.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "klarowność",
|
|
6779
6779
|
"architecture": "architektura",
|
|
6780
6780
|
"code-review": "przegląd kodu",
|
|
6781
|
+
"estimation": "szacowanie",
|
|
6782
|
+
"answer-recommendation": "rekomendowane odpowiedzi",
|
|
6781
6783
|
"repo-feature": "funkcja repozytorium",
|
|
6782
6784
|
"repo-bug": "błąd repozytorium"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "Jego wynikiem jest wypchnięty commit, więc ocena wymaga prawdziwego uruchomienia w kontenerze na repozytorium zalążkowym; komórka inline potrafi ocenić wyłącznie tekst.",
|
|
6788
|
+
"unknown": "Ten agent nie może działać w Sandboksie."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "wbudowany",
|
|
6786
6792
|
"custom": "niestandardowy"
|
package/i18n/locales/tr.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "netlik",
|
|
6779
6779
|
"architecture": "mimari",
|
|
6780
6780
|
"code-review": "kod incelemesi",
|
|
6781
|
+
"estimation": "tahmin",
|
|
6782
|
+
"answer-recommendation": "önerilen yanıtlar",
|
|
6781
6783
|
"repo-feature": "depo özelliği",
|
|
6782
6784
|
"repo-bug": "depo hatası"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "Çıktısı gönderilmiş bir commit olduğundan değerlendirilmesi, bir tohum deposu üzerinde gerçek bir konteyner çalıştırması gerektirir; satır içi hücre yalnızca metni değerlendirebilir.",
|
|
6788
|
+
"unknown": "Bu ajan Sandbox’ta çalıştırılamaz."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "yerleşik",
|
|
6786
6792
|
"custom": "özel"
|
package/i18n/locales/uk.json
CHANGED
|
@@ -6778,9 +6778,15 @@
|
|
|
6778
6778
|
"clarity": "ясність",
|
|
6779
6779
|
"architecture": "архітектура",
|
|
6780
6780
|
"code-review": "огляд коду",
|
|
6781
|
+
"estimation": "оцінювання",
|
|
6782
|
+
"answer-recommendation": "рекомендовані відповіді",
|
|
6781
6783
|
"repo-feature": "функція репозиторію",
|
|
6782
6784
|
"repo-bug": "помилка репозиторію"
|
|
6783
6785
|
},
|
|
6786
|
+
"unsupportedReason": {
|
|
6787
|
+
"container-run-required": "Його результатом є надісланий коміт, тож оцінювання потребує справжнього запуску в контейнері на репозиторії-заготовці; вбудована комірка може оцінювати лише текст.",
|
|
6788
|
+
"unknown": "Цей агент не може працювати в Sandbox."
|
|
6789
|
+
},
|
|
6784
6790
|
"fixtureOrigin": {
|
|
6785
6791
|
"builtin": "вбудована",
|
|
6786
6792
|
"custom": "користувацька"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.280.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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"valibot": "^1.4.2",
|
|
41
41
|
"vue": "3.5.41",
|
|
42
42
|
"wretch": "^3.0.9",
|
|
43
|
-
"@cat-factory/contracts": "0.
|
|
43
|
+
"@cat-factory/contracts": "0.320.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@toad-contracts/testing": "0.3.2",
|