@event4u/agent-config 4.7.0 → 4.7.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +8 -0
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +1 -1
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +1 -1
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +1 -1
- package/dist/mcp/registry-manifest.json +1 -1
- package/dist/shared/userMd/formAdapter.js +6 -4
- package/dist/shared/userMd/formAdapter.js.map +1 -1
- package/dist/shared/userMd/schema.js +4 -1
- package/dist/shared/userMd/schema.js.map +1 -1
- package/dist/ui/assets/{index-CoqV8tnv.js → index-4V5HhhIV.js} +2 -2
- package/dist/ui/assets/index-4V5HhhIV.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/docs/contracts/agent-user-schema.md +2 -2
- package/package.json +1 -1
- package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
- package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
- package/dist/ui/assets/index-CoqV8tnv.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -802,6 +802,14 @@ our recommendation order, not its support status.
|
|
|
802
802
|
> that forces a new era split (`# Era: 4.6.x`, etc.) — see
|
|
803
803
|
> [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
|
|
804
804
|
|
|
805
|
+
## [4.7.1](https://github.com/event4u-app/agent-config/compare/4.7.0...4.7.1) (2026-05-28)
|
|
806
|
+
|
|
807
|
+
### Bug Fixes
|
|
808
|
+
|
|
809
|
+
* **wizard:** make role optional so setup can save without a role pick ([dd0bc16](https://github.com/event4u-app/agent-config/commit/dd0bc168268fa9f9fe2b95ae5ef7cec76d66bdbe))
|
|
810
|
+
|
|
811
|
+
Tests: 5064 (+0 since 4.7.0)
|
|
812
|
+
|
|
805
813
|
## [4.7.0](https://github.com/event4u-app/agent-config/compare/4.6.0...4.7.0) (2026-05-28)
|
|
806
814
|
|
|
807
815
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
feffcebca42cc22595a88d16dbcc994f06d46ffbe67de99b3278ef5781f07a2f discovery-manifest.json
|
|
@@ -25,7 +25,7 @@ export function defaultIdentity() {
|
|
|
25
25
|
version: 1,
|
|
26
26
|
identity: { name: '' },
|
|
27
27
|
language: 'en',
|
|
28
|
-
role: [
|
|
28
|
+
role: [],
|
|
29
29
|
style: { pace: 'pragmatic' },
|
|
30
30
|
voice_sample: '',
|
|
31
31
|
last_updated: '1970-01-01',
|
|
@@ -42,9 +42,11 @@ function pickPace(value) {
|
|
|
42
42
|
}
|
|
43
43
|
function pickRoles(value) {
|
|
44
44
|
if (!Array.isArray(value))
|
|
45
|
-
return [
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
return [];
|
|
46
|
+
// Drop empty-string entries — an empty role entry is meaningless and
|
|
47
|
+
// would fail the schema's per-entry min(1). Returning `[]` is allowed
|
|
48
|
+
// (role is optional; the wizard must not block setup on a role pick).
|
|
49
|
+
return value.filter((v) => typeof v === 'string' && v.trim() !== '');
|
|
48
50
|
}
|
|
49
51
|
function pickNotes(value) {
|
|
50
52
|
if (typeof value !== 'string')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formAdapter.js","sourceRoot":"","sources":["../../../src/shared/userMd/formAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC3B,OAAO;QACH,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"formAdapter.js","sourceRoot":"","sources":["../../../src/shared/userMd/formAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC3B,OAAO;QACH,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACtB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC5B,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,YAAY;KAC7B,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,CAAU;IACxB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,UAAU,CAAC,KAAc,EAAE,QAAgB;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AACxD,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC5B,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC;AAC3E,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,qEAAqE;IACrE,sEAAsE;IACtE,sEAAsE;IACtE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACtF,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,MAA+B;IACzD,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,GAAG,GAAiB;QACtB,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACnE,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC;QACnD,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,KAAK,EAAE;YACH,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;SAChC;QACD,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC;QAC/D,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC;KAClE,CAAC;IACF,IAAI,KAAK,KAAK,SAAS;QAAE,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3C,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -25,9 +25,12 @@ export const userIdentitySchema = z.object({
|
|
|
25
25
|
name: z.string().trim().min(1, 'identity.name is required'),
|
|
26
26
|
}),
|
|
27
27
|
language: z.string().trim().min(2, 'language must be a non-empty code'),
|
|
28
|
+
// Optional — picking ≥1 role sharpens reviewer-voice selection and
|
|
29
|
+
// persona pairing, but the setup wizard must not block a save on it.
|
|
30
|
+
// Empty array is allowed; each present entry must be non-empty.
|
|
28
31
|
role: z
|
|
29
32
|
.array(z.string().trim().min(1, 'role entries must be non-empty'))
|
|
30
|
-
.
|
|
33
|
+
.default([]),
|
|
31
34
|
style: z.object({
|
|
32
35
|
// Formality is not configurable — the agent always addresses the user
|
|
33
36
|
// informally ("Du"). Only `pace` remains tunable.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/shared/userMd/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wFAAwF;AACxF,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAEnD,iFAAiF;AACjF,MAAM,CAAC,MAAM,oCAAoC,GAAG,KAAK,CAAC;AAE1D,gFAAgF;AAChF,MAAM,OAAO,GAAG,CAAC;KACZ,MAAM,EAAE;KACR,KAAK,CAAC,qBAAqB,EAAE,iDAAiD,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,2BAA2B,CAAC;KAC9D,CAAC;IACF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,mCAAmC,CAAC;IACvE,IAAI,EAAE,CAAC;SACF,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;SACjE,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/shared/userMd/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wFAAwF;AACxF,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAEnD,iFAAiF;AACjF,MAAM,CAAC,MAAM,oCAAoC,GAAG,KAAK,CAAC;AAE1D,gFAAgF;AAChF,MAAM,OAAO,GAAG,CAAC;KACZ,MAAM,EAAE;KACR,KAAK,CAAC,qBAAqB,EAAE,iDAAiD,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,2BAA2B,CAAC;KAC9D,CAAC;IACF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,mCAAmC,CAAC;IACvE,mEAAmE;IACnE,qEAAqE;IACrE,gEAAgE;IAChE,IAAI,EAAE,CAAC;SACF,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,gCAAgC,CAAC,CAAC;SACjE,OAAO,CAAC,EAAE,CAAC;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACZ,sEAAsE;QACtE,kDAAkD;QAClD,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;KACnD,CAAC;IACF,iEAAiE;IACjE,wEAAwE;IACxE,oEAAoE;IACpE,YAAY,EAAE,CAAC;SACV,MAAM,EAAE;SACR,IAAI,EAAE;SACN,GAAG,CAAC,oCAAoC,EAAE,+BAA+B,CAAC;SAC1E,OAAO,CAAC,EAAE,CAAC;IAChB,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;SAC5D,QAAQ,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
`)}u.trim()!==""&&d(u)}const ln=_(null);async function Ol(){try{const e=await A("/api/v1/ping");ln.value={...e,projectScopeAvailable:e.projectScopeAvailable===!0}}catch{ln.value=null}}function G(e){switch(e.code){case"VALIDATION":return"Some fields need attention before saving.";case"CONFLICT":return"This file changed on disk while you were editing. Review the latest version and re-save.";case"PRECONDITION_REQUIRED":return"Reload the page once — the optimistic-lock token is missing.";case"NOT_FOUND":return"The file does not exist yet. Use the wizard to create it.";case"ATOMIC_WRITE":return"Write failed mid-flight. The file was not partially modified.";case"YAML_PARSE":return"YAML parse error — fix the file by hand, then reload.";default:return e.message}}function Nl(e){return/expected (boolean|string|number)/i.test(e)?e.replace(/^expected/i,"Expected"):e}function Wr(e){const n={};for(const i of e.fields??[])n[i.path]=Nl(i.message);return n}function Il({id:e,children:n}){return o("p",{class:"ac-field__description",id:e,children:n})}function Ll({id:e,children:n}){return o("p",{class:"ac-field__error",id:e,role:"alert","aria-live":"polite",children:n})}function ae({id:e,label:n,description:i,error:r,children:t}){const l=i!==void 0?`${e}-desc`:void 0,a=r!==void 0?`${e}-err`:void 0;return o("div",{class:"ac-field","data-invalid":r!==void 0?"true":void 0,children:[o("label",{class:"ac-field__label",for:e,children:n}),i!==void 0?o(Il,{id:l,children:i}):null,o("div",{class:"ac-field__control","aria-describedby":l,"aria-errormessage":a,children:t}),r!==void 0?o(Ll,{id:a,children:r}):null]})}function zr(e){return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:o("input",{class:"ac-input",type:"text",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder,"aria-invalid":e.error!==void 0?"true":void 0,onInput:n=>e.onChange(n.currentTarget.value)})})}function Fl(e){const n=e.step??(e.integer===!0?1:"any");return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:o("input",{class:"ac-input",type:"number",id:e.id,name:e.name,value:Number.isFinite(e.value)?String(e.value):"0",min:e.min,max:e.max,step:n,"aria-invalid":e.error!==void 0?"true":void 0,onInput:i=>{const r=i.currentTarget.value,t=r===""?0:Number(r);e.onChange(Number.isFinite(t)?t:0)}})})}function Rl(e){return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:o("label",{class:"ac-toggle",children:[o("input",{type:"checkbox",id:e.id,name:e.name,checked:e.value,"aria-invalid":e.error!==void 0?"true":void 0,onChange:n=>e.onChange(n.currentTarget.checked)}),o("span",{class:"ac-toggle__track","aria-hidden":"true"}),o("span",{class:"ac-toggle__state",children:e.value?"On":"Off"})]})})}function Yr(e){const n=e.options.length>3;return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:n?o("select",{class:"ac-input",id:e.id,name:e.name,value:e.value,"aria-invalid":e.error!==void 0?"true":void 0,onChange:i=>e.onChange(i.currentTarget.value),children:e.options.map(i=>o("option",{value:i.value,children:i.label??(i.value===""?"(none)":i.value)},i.value))}):o("div",{class:"ac-radio-group",role:"radiogroup","aria-labelledby":`${e.id}-label`,children:e.options.map(i=>{const r=`${e.id}-${i.value||"none"}`;return o("label",{class:"ac-radio",for:r,children:[o("input",{type:"radio",id:r,name:e.name,value:i.value,checked:i.value===e.value,onChange:()=>e.onChange(i.value)}),o("span",{children:i.label??(i.value===""?"(none)":i.value)})]},i.value)})})})}function an(e){return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:o("textarea",{class:"ac-textarea",id:e.id,name:e.name,rows:e.rows??6,placeholder:e.placeholder,"aria-invalid":e.error!==void 0?"true":void 0,onInput:n=>e.onChange(n.currentTarget.value),children:e.value})})}function Kr(e){return e.replace(/_/g," ").replace(/\./g," › ").replace(/\b\w/g,n=>n.toUpperCase())}function Pl(e){return e.enum!==void 0&&e.enum.length>0?"enum":e.type==="integer"?"integer":e.type==="number"?"number":e.type==="boolean"?"boolean":e.type==="string"?"string":e.type==="array"&&e.items?.type==="string"?"array-of-strings":"unsupported"}function $n(e,n){const i=Pl(n);return{path:e,kind:i,label:Kr(e[e.length-1]??""),description:n.description,options:n.enum,min:n.minimum,max:n.maximum}}function $l(e){const n=[],i=e.properties??{};for(const[r,t]of Object.entries(i))if(t.type==="object"&&t.properties!==void 0){const l=[];for(const[a,c]of Object.entries(t.properties))if(c.type==="object"&&c.properties!==void 0)for(const[u,d]of Object.entries(c.properties))l.push($n([r,a,u],d));else l.push($n([r,a],c));n.push({path:[r],label:Kr(r),description:t.description,fields:l})}else{const l=n.find(c=>c.path[0]==="__general"),a=$n([r],t);l===void 0?n.unshift({path:["__general"],label:"General",fields:[a]}):l.fields.push(a)}return n}function Ml(e,n){let i=e;for(const r of n){if(i===null||typeof i!="object"||Array.isArray(i))return;i=i[r]}return i}function qr(e,n,i){if(n.length===0)return e;const[r,...t]=n;if(r===void 0)return e;const l={...e};if(t.length===0)return l[r]=i,l;const a=l[r],c=a!==null&&typeof a=="object"&&!Array.isArray(a)?a:{};return l[r]=qr(c,t,i),l}function Ce(e){return e.join(".")}function Dl(e,n,i,r){const t=Ce(e.path),l=t,a=Ml(n,e.path),c=i[t],u=d=>{r(qr(n,e.path,d))};switch(e.kind){case"string":{const d=typeof a=="string"?a:"";return d.length>80?o(an,{id:t,name:l,label:e.label,description:e.description,error:c,value:d,onChange:u}):o(zr,{id:t,name:l,label:e.label,description:e.description,error:c,value:d,onChange:u})}case"enum":{const d=typeof a=="string"||typeof a=="number"?String(a):"",f=(e.options??[]).map(s=>({value:String(s)}));return o(Yr,{id:t,name:l,label:e.label,description:e.description,error:c,value:d,options:f,onChange:u})}case"number":case"integer":{const d=typeof a=="number"?a:0;return o(Fl,{id:t,name:l,label:e.label,description:e.description,error:c,value:d,integer:e.kind==="integer",min:e.min,max:e.max,onChange:u})}case"boolean":{const d=typeof a=="boolean"?a:!1;return o(Rl,{id:t,name:l,label:e.label,description:e.description,error:c,value:d,onChange:u})}case"array-of-strings":{const f=(Array.isArray(a)?a.filter(s=>typeof s=="string"):[]).join(`
|
|
7
7
|
`);return o(an,{id:t,name:l,label:e.label,description:`${e.description??""} (one entry per line)`.trim(),error:c,value:f,onChange:s=>{const h=s.split(`
|
|
8
|
-
`).map(p=>p.trim()).filter(p=>p!=="");u(h)}})}default:return null}}function jl({section:e,values:n,errors:i,onChange:r}){return o("section",{class:"ac-section","aria-labelledby":`section-${Ce(e.path)}`,children:[o("h2",{class:"ac-section__title",id:`section-${Ce(e.path)}`,children:e.label}),e.description!==void 0?o("p",{class:"ac-section__description",children:e.description}):null,o("div",{class:"ac-section__fields",children:e.fields.map(t=>o("div",{children:Dl(t,n,i,r)},Ce(t.path)))})]})}function Bl(e){const n=$l(e.schema),i=e.errors??{};return o("form",{class:"ac-form",onSubmit:r=>r.preventDefault(),children:[n.map(r=>o(jl,{section:r,values:e.values,errors:i,onChange:e.onChange},Ce(r.path))),e.actions!==void 0?o("div",{class:"ac-form__actions",children:e.actions}):null]})}function Ul(e){const[n]=Or(()=>`${e.id}-list`);return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:[o("input",{class:"ac-input",type:"text",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder,list:n,"aria-invalid":e.error!==void 0?"true":void 0,onInput:i=>e.onChange(i.currentTarget.value)}),o("datalist",{id:n,children:e.suggestions.map(i=>o("option",{value:i},i))})]})}const Hl=["developer","reviewer","designer","product-manager","ops","qa","maintainer"],Wl=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Yi(){return new Date().toISOString().slice(0,10)}function ce(e,n){return e?.[n]}function zl({value:e,onChange:n,errors:i,hideRole:r,hideIdentityBasics:t}){const[l,a]=Or(""),c="umd-role-suggestions";function u(v){n({...e,...v,last_updated:Yi()})}const d=e.role.filter(v=>v.trim()!=="");function f(v){const g=v.trim();if(g===""||d.includes(g)){a("");return}u({role:[...d,g]}),a("")}function s(v){d.length<=1||u({role:d.filter(g=>g!==v)})}function h(v){const g={...e,last_updated:Yi()};v===""?delete g.notes:g.notes=v,n(g)}const p=Hl.filter(v=>!d.includes(v));return o("div",{class:"ac-user-md-form",children:[t?null:o(zr,{id:"umd-name",name:"identity.name",label:"Name",description:'How the agent addresses you in chat (e.g. "Matze", "Sarah"). Required.',value:e.identity.name,error:ce(i,"identity.name"),onChange:v=>u({identity:{...e.identity,name:v}})}),t?null:o(Ul,{id:"umd-language",name:"language",label:"Language",description:"BCP-47 tag the agent mirrors in replies (e.g. 'de', 'en', 'en-US').",value:e.language,suggestions:Wl,error:ce(i,"language"),onChange:v=>u({language:v})}),r?null:o(ae,{id:"umd-role-input",label:"Roles",description:"One or more roles. Seeded suggestions are non-binding — type anything and press Enter.",error:ce(i,"role"),children:[o("ul",{class:"ac-chip-list","data-testid":"umd-role-list",children:d.map(v=>o("li",{class:"ac-chip",children:[o("span",{children:v}),o("button",{type:"button",class:"ac-chip__remove","aria-label":`Remove ${v}`,disabled:d.length<=1,onClick:()=>s(v),children:"×"})]},v))}),o("div",{class:"ac-role-add",children:[o("input",{class:"ac-input",type:"text",id:"umd-role-input",name:"role-add",list:c,placeholder:"Add a role and press Enter",value:l,onInput:v=>a(v.currentTarget.value),onKeyDown:v=>{(v.key==="Enter"||v.key===",")&&(v.preventDefault(),f(l))}}),o("datalist",{id:c,children:p.map(v=>o("option",{value:v},v))}),o("button",{type:"button",class:"ac-button",onClick:()=>f(l),children:"Add role"})]})]}),o(Yr,{id:"umd-pace",name:"style.pace",label:"Pace",value:e.style.pace,error:ce(i,"style.pace"),options:[{value:"pragmatic",label:"Pragmatic"},{value:"thorough",label:"Thorough"},{value:"rapid",label:"Rapid"}],onChange:v=>u({style:{...e.style,pace:v}})}),o(an,{id:"umd-voice",name:"voice_sample",label:"Voice sample",description:"One to three sentences in your own style. The agent uses it as a tone anchor.",rows:4,value:e.voice_sample,error:ce(i,"voice_sample"),onChange:v=>u({voice_sample:v})}),o(an,{id:"umd-notes",name:"notes",label:"Notes",description:"Optional free-form prose the agent remembers across sessions.",rows:6,value:e.notes??"",error:ce(i,"notes"),onChange:h})]})}function Gr(){return{version:1,identity:{name:""},language:"en",role:[
|
|
8
|
+
`).map(p=>p.trim()).filter(p=>p!=="");u(h)}})}default:return null}}function jl({section:e,values:n,errors:i,onChange:r}){return o("section",{class:"ac-section","aria-labelledby":`section-${Ce(e.path)}`,children:[o("h2",{class:"ac-section__title",id:`section-${Ce(e.path)}`,children:e.label}),e.description!==void 0?o("p",{class:"ac-section__description",children:e.description}):null,o("div",{class:"ac-section__fields",children:e.fields.map(t=>o("div",{children:Dl(t,n,i,r)},Ce(t.path)))})]})}function Bl(e){const n=$l(e.schema),i=e.errors??{};return o("form",{class:"ac-form",onSubmit:r=>r.preventDefault(),children:[n.map(r=>o(jl,{section:r,values:e.values,errors:i,onChange:e.onChange},Ce(r.path))),e.actions!==void 0?o("div",{class:"ac-form__actions",children:e.actions}):null]})}function Ul(e){const[n]=Or(()=>`${e.id}-list`);return o(ae,{id:e.id,label:e.label,description:e.description,error:e.error,children:[o("input",{class:"ac-input",type:"text",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder,list:n,"aria-invalid":e.error!==void 0?"true":void 0,onInput:i=>e.onChange(i.currentTarget.value)}),o("datalist",{id:n,children:e.suggestions.map(i=>o("option",{value:i},i))})]})}const Hl=["developer","reviewer","designer","product-manager","ops","qa","maintainer"],Wl=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Yi(){return new Date().toISOString().slice(0,10)}function ce(e,n){return e?.[n]}function zl({value:e,onChange:n,errors:i,hideRole:r,hideIdentityBasics:t}){const[l,a]=Or(""),c="umd-role-suggestions";function u(v){n({...e,...v,last_updated:Yi()})}const d=e.role.filter(v=>v.trim()!=="");function f(v){const g=v.trim();if(g===""||d.includes(g)){a("");return}u({role:[...d,g]}),a("")}function s(v){d.length<=1||u({role:d.filter(g=>g!==v)})}function h(v){const g={...e,last_updated:Yi()};v===""?delete g.notes:g.notes=v,n(g)}const p=Hl.filter(v=>!d.includes(v));return o("div",{class:"ac-user-md-form",children:[t?null:o(zr,{id:"umd-name",name:"identity.name",label:"Name",description:'How the agent addresses you in chat (e.g. "Matze", "Sarah"). Required.',value:e.identity.name,error:ce(i,"identity.name"),onChange:v=>u({identity:{...e.identity,name:v}})}),t?null:o(Ul,{id:"umd-language",name:"language",label:"Language",description:"BCP-47 tag the agent mirrors in replies (e.g. 'de', 'en', 'en-US').",value:e.language,suggestions:Wl,error:ce(i,"language"),onChange:v=>u({language:v})}),r?null:o(ae,{id:"umd-role-input",label:"Roles",description:"One or more roles. Seeded suggestions are non-binding — type anything and press Enter.",error:ce(i,"role"),children:[o("ul",{class:"ac-chip-list","data-testid":"umd-role-list",children:d.map(v=>o("li",{class:"ac-chip",children:[o("span",{children:v}),o("button",{type:"button",class:"ac-chip__remove","aria-label":`Remove ${v}`,disabled:d.length<=1,onClick:()=>s(v),children:"×"})]},v))}),o("div",{class:"ac-role-add",children:[o("input",{class:"ac-input",type:"text",id:"umd-role-input",name:"role-add",list:c,placeholder:"Add a role and press Enter",value:l,onInput:v=>a(v.currentTarget.value),onKeyDown:v=>{(v.key==="Enter"||v.key===",")&&(v.preventDefault(),f(l))}}),o("datalist",{id:c,children:p.map(v=>o("option",{value:v},v))}),o("button",{type:"button",class:"ac-button",onClick:()=>f(l),children:"Add role"})]})]}),o(Yr,{id:"umd-pace",name:"style.pace",label:"Pace",value:e.style.pace,error:ce(i,"style.pace"),options:[{value:"pragmatic",label:"Pragmatic"},{value:"thorough",label:"Thorough"},{value:"rapid",label:"Rapid"}],onChange:v=>u({style:{...e.style,pace:v}})}),o(an,{id:"umd-voice",name:"voice_sample",label:"Voice sample",description:"One to three sentences in your own style. The agent uses it as a tone anchor.",rows:4,value:e.voice_sample,error:ce(i,"voice_sample"),onChange:v=>u({voice_sample:v})}),o(an,{id:"umd-notes",name:"notes",label:"Notes",description:"Optional free-form prose the agent remembers across sessions.",rows:6,value:e.notes??"",error:ce(i,"notes"),onChange:h})]})}function Gr(){return{version:1,identity:{name:""},language:"en",role:[],style:{pace:"pragmatic"},voice_sample:"",last_updated:"1970-01-01"}}function Ki(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function We(e,n){return typeof e=="string"?e:n}function Yl(e){return e==="thorough"||e==="rapid"?e:"pragmatic"}function Kl(e){return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n.trim()!==""):[]}function ql(e){if(typeof e=="string")return e===""?void 0:e}function qi(e){const n=Gr(),i=Ki(e.identity)?e.identity:{},r=Ki(e.style)?e.style:{},t=ql(e.notes),l={version:1,identity:{name:We(i.name,n.identity.name)},language:We(e.language,n.language),role:Kl(e.role),style:{pace:Yl(r.pace)},voice_sample:We(e.voice_sample,n.voice_sample),last_updated:We(e.last_updated,n.last_updated)};return t!==void 0&&(l.notes=t),l}/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function Vr(e){return typeof e>"u"||e===null}function Gl(e){return typeof e=="object"&&e!==null}function Vl(e){return Array.isArray(e)?e:Vr(e)?[]:[e]}function Jl(e,n){var i,r,t,l;if(n)for(l=Object.keys(n),i=0,r=l.length;i<r;i+=1)t=l[i],e[t]=n[t];return e}function Ql(e,n){var i="",r;for(r=0;r<n;r+=1)i+=e;return i}function Zl(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Xl=Vr,ea=Gl,na=Vl,ia=Ql,ra=Zl,ta=Jl,O={isNothing:Xl,isObject:ea,toArray:na,repeat:ia,isNegativeZero:ra,extend:ta};function Jr(e,n){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
|
|
9
9
|
|
|
10
10
|
`+e.mark.snippet),r+" "+i):r}function Fe(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=Jr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Fe.prototype=Object.create(Error.prototype);Fe.prototype.constructor=Fe;Fe.prototype.toString=function(n){return this.name+": "+Jr(this,n)};var F=Fe;function Mn(e,n,i,r,t){var l="",a="",c=Math.floor(t/2)-1;return r-n>c&&(l=" ... ",n=r-c+l.length),i-r>c&&(a=" ...",i=r+c-a.length),{str:l+e.slice(n,i).replace(/\t/g,"→")+a,pos:r-n+l.length}}function Dn(e,n){return O.repeat(" ",n-e.length)+e}function la(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,r=[0],t=[],l,a=-1;l=i.exec(e.buffer);)t.push(l.index),r.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var c="",u,d,f=Math.min(e.line+n.linesAfter,t.length).toString().length,s=n.maxLength-(n.indent+f+3);for(u=1;u<=n.linesBefore&&!(a-u<0);u++)d=Mn(e.buffer,r[a-u],t[a-u],e.position-(r[a]-r[a-u]),s),c=O.repeat(" ",n.indent)+Dn((e.line-u+1).toString(),f)+" | "+d.str+`
|
|
11
11
|
`+c;for(d=Mn(e.buffer,r[a],t[a],e.position,s),c+=O.repeat(" ",n.indent)+Dn((e.line+1).toString(),f)+" | "+d.str+`
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
`,e.length-t>n&&a>t?u+=e.slice(t,a)+`
|
|
38
38
|
`+e.slice(a+1):u+=e.slice(t),u.slice(1)}function Ko(e){for(var n="",i=0,r,t=0;t<e.length;i>=65536?t+=2:t++)i=we(e,t),r=L[i],!r&&$e(i)?(n+=e[t],i>=65536&&(n+=e[t+1])):n+=r||Mo(i);return n}function qo(e,n,i){var r="",t=e.tag,l,a,c;for(l=0,a=i.length;l<a;l+=1)c=i[l],e.replacer&&(c=e.replacer.call(i,String(l),c)),(z(e,n,c,!1,!1)||typeof c>"u"&&z(e,n,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=t,e.dump="["+r+"]"}function or(e,n,i,r){var t="",l=e.tag,a,c,u;for(a=0,c=i.length;a<c;a+=1)u=i[a],e.replacer&&(u=e.replacer.call(i,String(a),u)),(z(e,n+1,u,!0,!0,!1,!0)||typeof u>"u"&&z(e,n+1,null,!0,!0,!1,!0))&&((!r||t!=="")&&(t+=Xn(e,n)),e.dump&&Re===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=l,e.dump=t||"[]"}function Go(e,n,i){var r="",t=e.tag,l=Object.keys(i),a,c,u,d,f;for(a=0,c=l.length;a<c;a+=1)f="",r!==""&&(f+=", "),e.condenseFlow&&(f+='"'),u=l[a],d=i[u],e.replacer&&(d=e.replacer.call(i,u,d)),z(e,n,u,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),z(e,n,d,!1,!1)&&(f+=e.dump,r+=f));e.tag=t,e.dump="{"+r+"}"}function Vo(e,n,i,r){var t="",l=e.tag,a=Object.keys(i),c,u,d,f,s,h;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new F("sortKeys must be a boolean or a function");for(c=0,u=a.length;c<u;c+=1)h="",(!r||t!=="")&&(h+=Xn(e,n)),d=a[c],f=i[d],e.replacer&&(f=e.replacer.call(i,d,f)),z(e,n+1,d,!0,!0,!0)&&(s=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,s&&(e.dump&&Re===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,s&&(h+=Xn(e,n)),z(e,n+1,f,!0,s)&&(e.dump&&Re===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,t+=h));e.tag=l,e.dump=t||"{}"}function cr(e,n,i){var r,t,l,a,c,u;for(t=i?e.explicitTypes:e.implicitTypes,l=0,a=t.length;l<a;l+=1)if(c=t[l],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n=="object"&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(i?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){if(u=e.styleMap[c.tag]||c.defaultStyle,Ct.call(c.represent)==="[object Function]")r=c.represent(n,u);else if(Tt.call(c.represent,u))r=c.represent[u](n,u);else throw new F("!<"+c.tag+'> tag resolver accepts not "'+u+'" style');e.dump=r}return!0}return!1}function z(e,n,i,r,t,l,a){e.tag=null,e.dump=i,cr(e,i,!1)||cr(e,i,!0);var c=Ct.call(e.dump),u=r,d;r&&(r=e.flowLevel<0||e.flowLevel>n);var f=c==="[object Object]"||c==="[object Array]",s,h;if(f&&(s=e.duplicates.indexOf(i),h=s!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&n>0)&&(t=!1),h&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(f&&h&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),c==="[object Object]")r&&Object.keys(e.dump).length!==0?(Vo(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(Go(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&n>0?or(e,n-1,e.dump,t):or(e,n,e.dump,t),h&&(e.dump="&ref_"+s+e.dump)):(qo(e,n,e.dump),h&&(e.dump="&ref_"+s+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&zo(e,e.dump,n,l,u);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new F("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function Jo(e,n){var i=[],r=[],t,l;for(ni(e,i,r),t=0,l=r.length;t<l;t+=1)n.duplicates.push(i[r[t]]);n.usedDuplicates=new Array(l)}function ni(e,n,i){var r,t,l;if(e!==null&&typeof e=="object")if(t=n.indexOf(e),t!==-1)i.indexOf(t)===-1&&i.push(t);else if(n.push(e),Array.isArray(e))for(t=0,l=e.length;t<l;t+=1)ni(e[t],n,i);else for(r=Object.keys(e),t=0,l=r.length;t<l;t+=1)ni(e[r[t]],n,i)}function Qo(e,n){n=n||{};var i=new jo(n);i.noRefs||Jo(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),z(i,0,r,!0,!0)?i.dump+`
|
|
39
39
|
`:""}var Zo=Qo,Xo={dump:Zo};function ki(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ec=N,nc=Qr,ic=nt,rc=at,tc=ot,lc=gi,ac=St.load,oc=St.loadAll,cc=Xo.dump,sc=F,uc={binary:ft,float:lt,map:et,null:it,pairs:ht,set:vt,timestamp:ut,bool:rt,int:tt,merge:dt,omap:pt,seq:Xr,str:Zr},dc=ki("safeLoad","load"),fc=ki("safeLoadAll","loadAll"),pc=ki("safeDump","dump"),hc={Type:ec,Schema:nc,FAILSAFE_SCHEMA:ic,JSON_SCHEMA:rc,CORE_SCHEMA:tc,DEFAULT_SCHEMA:lc,load:ac,loadAll:oc,dump:cc,YAMLException:sc,types:uc,safeLoad:dc,safeLoadAll:fc,safeDump:pc};function vc(e){if(e.trim()==="")return{};const i=hc.load(e);if(i==null)return{};if(typeof i!="object"||Array.isArray(i))throw new Error(".agent-user.yml must parse to an object");return i}const sr={id:"welcome",title:"Welcome — who are you?",navLabel:"You",subtitle:"Your name and language. Stored in .agent-user.yml; we pre-fill what we can detect.",kind:"welcome"},_c=[{id:"ai-tools",title:"Which AI tools do you use?",navLabel:"AI tools",subtitle:"Pick the editors and CLIs that should pick up this config. Auto-detect runs first; you can override.",kind:"aiTools"},{id:"roles",title:"What do you work on?",navLabel:"Roles",subtitle:"Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in .agent-user.yml.",kind:"roles"},{id:"packs",title:"Which capability packs do you want?",navLabel:"Packs",subtitle:"Founder-strategy, finance-basic, gtm-sales, ops-people, ai-video — pick zero or more. You can change this later.",kind:"packs"}],ur=[{id:"identity",title:"Editor and tooling",navLabel:"Editor",subtitle:"IDE goes into .agent-settings.yml so the agent opens files in the right tool. rtk presence is auto-detected (see the rtk row). Your name lives in .agent-user.yml (later step).",kind:"form",paths:["personal.ide","personal.open_edited_files"]},{id:"personality",title:"How should the agent behave?",navLabel:"Personality",subtitle:"Autonomy, output verbosity, and PR-comment style.",kind:"form",paths:["personal.autonomy","personal.minimal_output","personal.play_by_play","personal.pr_comment_bot_icon"]},{id:"cost",title:"Cost profile and budgets",navLabel:"Cost",subtitle:"Master switch for which rule tiers load, plus optional spending ceilings.",kind:"form",paths:["cost_profile","cost.budgets.daily","cost.budgets.weekly","cost.budgets.monthly","cost.enforcement"]},{id:"roadmap-quality",title:"Roadmap & quality cadence",navLabel:"Roadmap & quality",subtitle:"When the agent runs quality tools and refreshes roadmap dashboards.",kind:"form",paths:["roadmap.quality_cadence","roadmap.dashboard_regen_cadence","quality.local_auto_run","quality.wait_for_remote_ci"]},{id:"memory",title:"Memory & redaction",navLabel:"Memory",subtitle:"Inline-review threshold and transcript-redaction regexes.",kind:"form",paths:["memory.review_threshold","memory.redact_patterns"]},{id:"user-md",title:"Your .agent-user.yml",navLabel:"User profile",subtitle:"Identity, voice, preferences. Stored at agents/settings/.agent-user.yml. Skip to leave empty.",kind:"userMd"},{id:"review",title:"Review & finish",navLabel:"Review",subtitle:"These keys will change. Confirm to write .agent-settings.yml and .agent-user.yml atomically.",kind:"review"}];function Mt(e={}){return e.extended===!0?[sr,..._c,...ur]:[sr,...ur]}function On(e,n={}){const i=Mt(n),r=Math.max(0,Math.min(i.length-1,e));return i[r]}function mc(e,n){const i={type:"object",properties:{},...e.description!==void 0?{description:e.description}:{}},r=i.properties,t=e.properties??{};for(const l of n){const a=l.split(".").filter(D=>D.length>0);if(a.length===0)continue;const[c,u,d]=a;if(c===void 0)continue;const f=t[c];if(f===void 0)continue;if(u===void 0){r[c]=f;continue}const s=f.properties?.[u];if(s===void 0)continue;const p=r[c]??{type:"object",properties:{},...f.description!==void 0?{description:f.description}:{}},v=p.properties??={};if(d===void 0){v[u]=s,r[c]=p;continue}const g=s.properties?.[d];if(g===void 0)continue;const w=v[u]??{type:"object",properties:{},...s.description!==void 0?{description:s.description}:{}},m=w.properties??={};m[d]=g,v[u]=w,r[c]=p}return i}function gc({current:e,total:n}){const i=Math.max(1,n),r=Math.max(0,Math.min(i-1,e)),t=Array.from({length:i},(a,c)=>c<=r),l=Math.round((r+1)/i*100);return o("div",{class:"ac-wizard__progress",role:"progressbar","aria-valuenow":r+1,"aria-valuemin":1,"aria-valuemax":i,"aria-valuetext":`Step ${r+1} of ${i} (${l}%)`,children:t.map((a,c)=>o("span",{class:`ac-wizard__progress-segment${a?" ac-wizard__progress-segment--filled":""}`,"aria-hidden":"true"},c))})}function yc({step:e,index:n,total:i}){return o("header",{class:"ac-page__header ac-wizard__header",children:[o("p",{class:"ac-wizard__step-count",children:["Step ",n+1," of ",i]}),o("div",{class:"ac-wizard__header-text",children:[o("h1",{children:e.title}),o("p",{class:"ac-wizard__subtitle",children:e.subtitle})]}),o(gc,{current:n,total:i})]})}function bc(e){const n=e.canFinish??!0,i=e.completed??!1;return o("div",{class:"ac-form__actions ac-wizard__nav",children:[o("button",{type:"button",class:"ac-button",disabled:!e.canGoPrev||e.busy,onClick:e.onPrev,children:"Back"}),e.canSkip&&e.onSkip!==void 0?o("button",{type:"button",class:"ac-button ac-wizard__skip",disabled:e.busy,onClick:e.onSkip,children:e.skipLabel??"Skip"}):null,e.isLast?i?null:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy||!n,onClick:e.onFinish,children:e.busy?"Saving…":"Finish & save"}):o("button",{type:"button",class:"ac-button ac-button--primary",disabled:!e.canGoNext||e.busy,onClick:e.onNext,children:e.nextLabel??"Next"})]})}function Dt(e,n){return e.kind!=="form"||e.paths===void 0?!1:!!(e.paths.includes(n)||e.id==="cost"&&(n.startsWith("telegraph.")||n.startsWith("verbosity.")))}function wc(e,n){return e.kind==="userMd"?n==="body"||n.startsWith("body."):Dt(e,n)}function kc(e,n){for(const i of Object.keys(n.errors))if(wc(e,i))return!0;return!1}function xc(e,n){if(kc(e,n))return{label:"needs attention",tone:"error"};if(e.kind==="userMd")return n.userMdChanged?{label:n.userMdAction==="create"?"will create":"will replace",tone:"changed"}:{label:"",tone:"idle"};if(e.kind==="form"){const i=n.changes.filter(r=>Dt(e,r.path)).length;return i===0?{label:"",tone:"idle"}:{label:`${i} change${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="aiTools"){const i=n.selectedToolsCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} tool${i===1?"":"s"}`,tone:"changed"}}if(e.kind==="packs"){const i=n.selectedPacksCount??0;return i===0?{label:"",tone:"idle"}:{label:`${i} pack${i===1?"":"s"}`,tone:"changed"}}return{label:"",tone:"idle"}}function Ac(e){const n=e.steps.filter((i,r)=>r!==e.currentIndex);return o(J,{children:o("nav",{class:"ac-wizard__review-nav","aria-label":"Jump back to a step",children:[o("p",{class:"ac-wizard__review-nav-label",children:"Jump back to a step:"}),o("ul",{class:"ac-wizard__review-nav-list",children:n.map(i=>{const r=e.steps.indexOf(i),t=xc(i,e),l=t.tone==="error"?"ac-wizard__review-nav-button ac-wizard__review-nav-button--error":"ac-wizard__review-nav-button";return o("li",{children:o("button",{type:"button",class:l,onClick:()=>{e.onJump(r)},children:[o("span",{class:"ac-wizard__review-nav-index",children:r+1}),o("span",{class:"ac-wizard__review-nav-text",children:i.navLabel}),t.label!==""?o("span",{class:`ac-wizard__review-nav-status ac-wizard__review-nav-status--${t.tone}`,children:t.label}):null]})},i.id)})})]})})}function Sc(e){const n=e.abortedAt??"unknown time",i=e.abortNote??"no further detail recorded",r=e.writesSinceRollback;return o("aside",{class:"ac-banner ac-banner--recovery",role:"alert",children:[o("strong",{children:"Previous install was interrupted."}),o("p",{children:["Aborted at ",o("code",{children:n})," — ",i,". ",r," write",r===1?"":"s"," landed before the abort marker."]}),o("p",{children:"Pick how to recover before continuing. Resume reopens the wizard fresh, Rollback discards the abort state, Ignore hides this banner without touching the log."}),o("div",{class:"ac-banner__actions",children:[o("button",{type:"button",disabled:e.busy,onClick:()=>e.onResume(),children:"Resume install"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onRollback(),children:"Rollback"}),o("button",{type:"button",disabled:e.busy,onClick:()=>e.onIgnore(),children:"Ignore"})]})]})}function Cc(){return o("section",{class:"ac-continue-screen","aria-labelledby":"ac-continue-title",children:[o("h2",{id:"ac-continue-title",children:"Install complete — continue with setup?"}),o("p",{children:"Your install selections (AI tools, roles, capability packs) are captured. Use the footer to continue:"}),o("ul",{children:[o("li",{children:[o("strong",{children:"Next"})," — go through the remaining personalisation steps: editor + tooling, personality, cost profile, roadmap & quality, memory, your",o("code",{children:" .agent-user.yml"}),", and finally the project module roots."]}),o("li",{children:[o("strong",{children:"Finish install here"})," — skip the rest and write ",o("code",{children:".agent-settings.yml"})," with the install-only selections. You can re-run ",o("code",{children:"agent-config setup"}),"later to pick up the personalisation steps."]})]})]})}function Tc(e){const n=e.version??"unknown";return o("section",{class:"ac-backup-screen","aria-labelledby":"ac-backup-title",children:[o("h2",{id:"ac-backup-title",children:"Existing v3 install detected"}),o("p",{children:["Found a v3.x install at ",o("code",{children:e.sourcePath})," ","(VERSION: ",o("code",{children:n}),"). v4 is a hard-cut release with no auto-migration — settings, identity, and history layouts changed. The wizard can back up the v3 tree before writing the v4 layout so you can roll back manually if needed."]}),e.error!==null?o("p",{class:"ac-banner ac-banner--error",children:["Backup failed: ",e.error]}):null,o("ul",{children:[o("li",{children:[o("strong",{children:"Backup v3 and proceed"})," — copies the tree to ",o("code",{children:e.backupTarget}),", then runs the v4 install. Restore later with",o("code",{children:[" mv ",e.backupTarget," ",e.sourcePath]}),"."]}),o("li",{children:[o("strong",{children:"Abort, uninstall v3 first"})," — closes the wizard. You decide what to keep."]})]}),o("div",{class:"ac-backup-screen__actions",children:[o("button",{type:"button",class:"ac-button ac-button--primary",disabled:e.busy,onClick:()=>e.onBackupAndProceed(),children:e.busy?"Backing up…":"Backup v3 and proceed"}),o("button",{type:"button",class:"ac-button",disabled:e.busy,onClick:()=>e.onAbort(),children:"Abort, uninstall v3 first"})]})]})}const jt=_(!1),Te=_(null),P=_(null),fn=_(!1),pn=_(!1),re=_(0),xi=_(null),U=_({}),Bt=_({}),Ut=_(0),he=_({}),E=_(null),ee=_(null),Ai=_(!1),ii=_(!1),Nn=_(!1),Ht=_({}),In=_([]);_("global");const Si=_(!1),M=_(!1),Ec=_(!1),hn=_(!1),vn=_(null),Ci=_([]),_n=_({}),mn=_(!0),gn=_(""),yn=_("agents");_(!1);const Wt=_(null),Oc=[{id:"claude-code",label:"Claude Code"},{id:"claude-desktop",label:"Claude Desktop"},{id:"cursor",label:"Cursor"},{id:"windsurf",label:"Windsurf"},{id:"cline",label:"Cline"},{id:"gemini-cli",label:"Gemini CLI"},{id:"copilot",label:"GitHub Copilot"},{id:"augment",label:"Augment"},{id:"aider",label:"Aider"},{id:"codex",label:"Codex"},{id:"roocode",label:"Roo Code"},{id:"continue",label:"Continue"},{id:"kilocode",label:"Kilo Code"},{id:"zed",label:"Zed"},{id:"jetbrains",label:"JetBrains"},{id:"kiro",label:"Kiro"},{id:"qoder",label:"Qoder"},{id:"opencode",label:"OpenCode"},{id:"trae",label:"Trae"},{id:"antigravity",label:"Antigravity"},{id:"codebuddy",label:"CodeBuddy"},{id:"droid",label:"Droid"},{id:"warp",label:"Warp"}],dr=_(!1),Ee=_(!1),ne=_(null),Ti=_([]),Ei=_([]),Ln=_([]),ie=_({}),fr=_(!1),Bn=_(!1),zt=_({}),pr=_(!1),Yt=_(null),Kt=_(null),qt=_("https://github.com/event4u-app/rtk");_(!1);_(null);_([]);_({});_({});const te=_({}),K=_({}),ri=_(!1),hr=_(!1);_({});_(null);_(null);_(!1);_(null);const bn=_(null),Gt=_(!1),ti=_(null),li=_(!1),ai=_(!1),oi=_(null),Oe=_(null),Ve=_(!1);function Vt(){return Mt({extended:M.value})}function Me(){return Vt().length}function Nc(e){return e??new Date().toISOString()}function Oi(e){return Math.max(0,Math.min(Me()-1,e))}function Ic(e){if("$ref"in e&&e.$ref!==void 0&&"definitions"in e&&e.definitions!==void 0){const n=e.$ref.replace("#/definitions/",""),i=e.definitions[n];if(i!==void 0)return i}return e}async function Lc(){try{return await A("/api/v1/settings")}catch(e){if(e instanceof $&&e.status===404&&e.body.error?.code==="NOT_FOUND"){const n=await A("/api/v1/schema");return{values:{},lastModified:0,path:".agent-settings.yml",schema:n.settings}}throw e}}async function Fc(){try{const e=await A("/api/v1/install/recovery");bn.value=e.incomplete?e:null}catch{bn.value=null}}async function Rc(){try{const e=await A("/api/v1/install/legacy-v3");ti.value=e.present?e:null}catch{ti.value=null}}async function Pc(){ai.value=!0,oi.value=null;try{await A("/api/v1/install/backup-v3",{method:"POST"}),li.value=!0}catch(e){oi.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{ai.value=!1}}async function Un(e){try{await A("/api/v1/install/recovery/dismiss",{method:"POST",body:{reason:e}})}catch(n){P.value={message:n instanceof Error?n.message:String(n),tone:"error"};return}bn.value=null,Gt.value=!0}async function $c(){Te.value=null;try{Fc(),Rc();const[e,n]=await Promise.all([A("/api/v1/wizard/state"),Lc()]);xi.value=Ic(n.schema),Ut.value=n.lastModified,Bt.value=n.values,Ht.value=n.legacyHints??{},M.value=e.extendedSteps===!0,Oe.value=e.wizardMode??null;const i=Object.keys(e.partial??{});U.value=i.length>0?{...n.values,...e.partial}:n.values,re.value=Oi(e.step),Si.value=!1,jt.value=!0;const r=On(re.value,{extended:M.value});(r.kind==="welcome"||r.kind==="userMd"||r.kind==="review")&&Jt(),(r.kind==="roles"||r.kind==="aiTools"||r.kind==="packs")&&Qt(),r.kind==="aiTools"&&Zt(),r.id==="identity"&&Xt(),r.kind==="review"&&el()}catch(e){e instanceof $?Te.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):Te.value=e instanceof Error?e.message:String(e)}}function Mc(e,n){return e.identity.name.trim()!==""?e:{...e,identity:{...e.identity,name:n}}}async function Jt(){if(!ii.value)try{const e=await A("/api/v1/user-md");if(Ai.value=e.exists,e.exists&&e.identity!==null){const n=qi(e.identity);ee.value=n,E.value=n}else{let n;try{const r=await A("/api/v1/user-md/template");n=qi(vc(r.body))}catch{n=Gr()}const i=Ht.value.user_name;typeof i=="string"&&i.trim()!==""&&(n=Mc(n,i)),ee.value=n,E.value=n}}catch(e){P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{ii.value=!0}}const Dc=new Set(["python"]);async function Qt(){if(!(dr.value||Ee.value)){Ee.value=!0,ne.value=null;try{const[e,n]=await Promise.all([A("/api/v1/wizard/manifest"),A("/api/v1/wizard/auto-detect")]),i=(e.packs??[]).map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",requires_hint:l.requires_hint,cluster:l.cluster??void 0,workspaces:l.workspaces}));Ti.value=i,Ln.value=(e.workspaces??[]).filter(l=>l.id!=="agent-config-maintainer").map(l=>({id:l.id,label:l.label??l.id,description:l.description??"",default_packs:l.default_packs??[],optional_packs:l.optional_packs??[],...l.example_roles!==void 0?{example_roles:l.example_roles}:{}}));const r=new Set(i.map(l=>l.id)),t=n.signals.map(l=>l.id.startsWith("pack-")?l.id.slice(5):l.id).filter(l=>r.has(l)).filter(l=>!Dc.has(l));Ei.value=t}catch(e){e instanceof $?ne.value=G(e.body.error??{code:"UNKNOWN",message:e.message}):ne.value=e instanceof Error?e.message:String(e)}finally{Ee.value=!1,dr.value=!0}}}async function Zt(){if(!(fr.value||Bn.value)){Bn.value=!0;try{const e=await A("/api/v1/wizard/detect-tools"),n=e.tools??{},i=e.configured??[];if(zt.value=n,Object.keys(te.value).length===0){const r={};if(i.length>0)for(const t of i)r[t]=!0;else for(const[t,l]of Object.entries(n))l&&(r[t]=!0);te.value=r}}catch{}finally{Bn.value=!1,fr.value=!0}}}async function Xt(){if(!pr.value){pr.value=!0;try{const e=await A("/api/v1/wizard/detect-rtk"),n=e.installed===!0;Yt.value=n,Kt.value=e.installCommand??null,typeof e.repo=="string"&&(qt.value=e.repo),U.value={...U.value,"personal.rtk_installed":n}}catch{}}}async function jc(e,n){try{await A("/api/v1/wizard/state",{method:"POST",body:{step:e,totalSteps:Me(),partial:n,startedAt:Nc(null)}})}catch(i){P.value={message:i instanceof Error?i.message:String(i),tone:"error"}}}async function el(){pn.value=!0;try{const e=await A("/api/v1/settings/diff",{method:"POST",body:{values:U.value,ifUnmodifiedSince:Ut.value}});In.value=e.changes,he.value={}}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{pn.value=!1}}function wn(){return Nn.value?!1:E.value===null||ee.value===null?E.value!==ee.value:JSON.stringify(E.value)!==JSON.stringify(ee.value)}async function ke(e){const n=Oi(e);await jc(n,U.value),re.value=n,P.value=null;const i=On(n,{extended:M.value});(i.kind==="welcome"||i.kind==="userMd")&&Jt(),(i.kind==="roles"||i.kind==="aiTools"||i.kind==="packs")&&Qt(),i.kind==="packs"&&il(),i.kind==="aiTools"&&Zt(),i.id==="identity"&&Xt(),i.kind==="review"&&el()}function nl(){const e=K.value,n=new Map(Ti.value.map(l=>[l.id,l])),i=Object.entries(e).filter(([,l])=>l===!0).map(([l])=>l).filter(l=>{const a=n.get(l)?.cluster;return a===void 0||e[a]===!0}),r=new Set,t=l=>{if(!r.has(l)){r.add(l);for(const a of n.get(l)?.requires_hint??[])t(a)}};for(const l of i)t(l);return[...r].sort()}function il(){if(ri.value)return;const e=Object.entries(ie.value).filter(([,r])=>r===!0).map(([r])=>r),n=new Map(Ln.value.map(r=>[r.id,r])),i={};for(const r of e)for(const t of n.get(r)?.default_packs??[])i[t]=!0;for(const r of Ei.value)i[r]=!0;K.value=i}function Bc(){const e=Object.entries(te.value).filter(([,r])=>r===!0).map(([r])=>r);if(e.length===0)return null;const n=nl();return{schema_version:"wizard-v2",tools:e,packs:n,settings:U.value}}async function Uc(){fn.value=!0,P.value=null;try{const e={settings:U.value},n=Object.entries(ie.value).filter(([,u])=>u===!0).map(([u])=>u),i=E.value!==null&&typeof E.value.identity?.name=="string"&&E.value.identity.name.trim().length>0;E.value!==null&&i&&(wn()||n.length>0)&&(e.identity=n.length>0?{...E.value,role:n}:E.value);const r=await A("/api/v1/wizard/finish",{method:"POST",body:e}),t="You can close this browser window now.",l=r.dryRun===!0?"Dry-run complete — no files written. Settings would be saved.":Array.isArray(r.writtenPaths)?`Saved (${r.writtenPaths.join(", ")}). Wizard complete.`:"Wizard complete.",a=M.value?Bc():null;let c="";if(a!==null)try{let u=null;await El("/api/v1/wizard/apply",a,s=>{s.type==="error"&&(u=typeof s.message=="string"?s.message:"install failed")});const d=a.tools.length,f=a.packs.length;c=u!==null?` Installer failed: ${u}. Settings were saved; re-run the wizard to retry.`:` Installer applied ${d} tool${d===1?"":"s"}`+(f>0?` and ${f} pack${f===1?"":"s"}.`:".")}catch(u){c=` Installer bridge failed: ${u instanceof $?G(u.body.error??{code:"UNKNOWN",message:u.message}):u instanceof Error?u.message:String(u)}. Settings were saved; re-run the wizard to retry the install plan.`}P.value={message:`${l}${c} ${t}`,tone:"success"},re.value=Oi(Me()-1),Bt.value=U.value,ee.value=wn()?E.value:ee.value,In.value=[],Si.value=!0}catch(e){e instanceof $?(he.value=Wr(e.body.error??{message:e.message}),P.value={message:G(e.body.error??{code:"UNKNOWN",message:e.message}),tone:"error"}):P.value={message:e instanceof Error?e.message:String(e),tone:"error"}}finally{fn.value=!1}}const Hc=["de","en","en-US","en-GB","fr","es","it","nl","pt","pt-BR"];function Wc(){if(hr.value)return;const e=E.value;if(e===null)return;hr.value=!0;let n=e;if(e.identity.name.trim()===""){const i=ln.value?.systemUser;i!==void 0&&i.trim()!==""&&(n={...n,identity:{...n.identity,name:i}})}if(!Ai.value&&typeof navigator<"u"){const i=(navigator.language||"").split("-")[0];i.length>=2&&(n={...n,language:i})}n!==e&&(E.value=n)}function zc(){const e=E.value;if(De(()=>{Wc()},[e]),e===null)return o("p",{children:"Loading…"});const n=i=>{E.value={...i,last_updated:new Date().toISOString().slice(0,10)},Nn.value=!1};return o("div",{class:"ac-wizard-step-stub ac-wizard__module-fields",children:[o("p",{children:["Tell the agent who you are. We pre-filled what we could detect — adjust freely. Stored in ",o("code",{children:".agent-user.yml"}),"."]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-name",children:"Name"}),o("input",{class:"ac-input",id:"welcome-name",type:"text",placeholder:"How should the agent address you?",value:e.identity.name,onInput:i=>n({...e,identity:{...e.identity,name:i.currentTarget.value}})})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"welcome-lang",children:"Language"}),o("input",{class:"ac-input",id:"welcome-lang",type:"text",list:"welcome-lang-list",placeholder:"BCP-47 code, e.g. de, en, en-US",value:e.language,onInput:i=>n({...e,language:i.currentTarget.value})}),o("datalist",{id:"welcome-lang-list",children:Hc.map(i=>o("option",{value:i},i))})]})]})}function Yc(){const e=te.value,n=zt.value;return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the AI tools you use. Tools detected on this machine are pre-selected on first run. The installer wires each selected tool's surface (skills, rules, commands) on apply; you can change this list later by re-running the wizard."}),o("ul",{class:"ac-wizard__tool-list",children:Oc.map(i=>{const r=n[i.id]===!0;return o("li",{class:"ac-wizard__tool-row",children:[o("label",{class:"ac-wizard__tool-label",children:[o("input",{type:"checkbox",checked:e[i.id]??!1,onChange:t=>{const l=t.currentTarget.checked;te.value={...e,[i.id]:l}}})," ",i.label]}),o("span",{class:`ac-badge ${r?"ac-badge--installed":"ac-badge--missing"}`,title:r?"Detected on this machine":"Not detected on this machine",children:r?"installed":"not installed"})]},i.id)})})]})}function Kc(){if(Ee.value)return o("p",{children:"Loading roles…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]})});const e=ie.value,n=Ln.value,i=(r,t)=>{ie.value={...ie.value,[r]:t},il()};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:["Pick the areas you work in. We use them to recommend capability packs on the next step, and they become your roles in",o("code",{children:" .agent-user.yml"}),"."]}),n.length===0?o("p",{children:o("em",{children:"No roles available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:n.map(r=>o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:e[r.id]??!1,onChange:t=>{i(r.id,t.currentTarget.checked)}}),o("span",{class:"ac-pack-tile__title",children:r.label})]}),(r.example_roles??[]).length>0?o("p",{class:"ac-pack-tile__role",children:["e.g. ",(r.example_roles??[]).join(", ")]}):null,r.description!==""?o("p",{class:"ac-pack-tile__desc",children:r.description}):null]},r.id))})]})}function qc(){if(Ee.value)return o("p",{children:"Loading discovery manifest…"});if(ne.value!==null)return o("div",{class:"ac-wizard-step-stub",children:[o("p",{class:"ac-banner ac-banner--error",children:["Discovery failed: ",ne.value]}),o("p",{children:"The manifest endpoint is gated on extended-mode. Re-run the server with extended steps enabled to populate this list."})]});const e=K.value,n=new Set(Ei.value),i=new Map(Ln.value.map(s=>[s.id,s.label])),r=ie.value,t=s=>{const h=(s??[]).filter(p=>p!=="agent-config-maintainer");return h.length===0?null:o("span",{class:"ac-pack-tile__ws",children:h.map(p=>o("span",{class:`ac-badge ac-badge--ws${r[p]===!0?" ac-badge--ws-active":""}`,title:r[p]===!0?"Matches a role you picked":"Workspace / area",children:i.get(p)??p},p))})},l=Ti.value.filter(s=>s.id!=="engineering-base"),a=new Map;for(const s of l)if(s.cluster!==void 0){const h=a.get(s.cluster)??[];h.push(s),a.set(s.cluster,h)}const c=new Set(l.filter(s=>s.cluster!==void 0).map(s=>s.id)),u=l.filter(s=>!c.has(s.id)),d=(s,h)=>{ri.value=!0,K.value={...K.value,[s]:h}},f=(s,h)=>{ri.value=!0;const p={...K.value,[s]:h};if(h)for(const v of a.get(s)??[])p[v.id]===void 0&&(p[v.id]=!0);K.value=p};return o("div",{class:"ac-wizard-step-stub",children:[o("p",{children:"Pick the capability packs to install. Auto-detected packs are pre-selected; engineering hygiene is included automatically when a pack needs it. A language tile expands to its frameworks — turn the language off to skip them all."}),u.length===0?o("p",{children:o("em",{children:"No packs available in the manifest."})}):o("div",{class:"ac-wizard__pack-grid",children:u.map(s=>{const h=a.get(s.id)??[],p=h.length>0,v=e[s.id]??!1;return o("section",{class:"ac-pack-tile",children:[o("label",{class:"ac-pack-tile__head",children:[o("input",{type:"checkbox",checked:v,onChange:g=>{const b=g.currentTarget.checked;p?f(s.id,b):d(s.id,b)}}),o("span",{class:"ac-pack-tile__title",children:s.label}),n.has(s.id)?o("span",{class:"ac-badge ac-badge--installed",children:"auto-detected"}):null]}),t(s.workspaces),s.description!==""?o("p",{class:"ac-pack-tile__desc",children:s.description}):null,p?o("fieldset",{class:"ac-pack-tile__children",disabled:!v,children:h.map(g=>o("label",{class:"ac-pack-tile__child",children:[o("input",{type:"checkbox",checked:e[g.id]??!1,disabled:!v,onChange:b=>{d(g.id,b.currentTarget.checked)}}),o("span",{children:g.label})]},g.id))}):null]},s.id)})})]})}function Gc(){const e=Yt.value,n=Kt.value;return o("div",{class:"ac-rtk-row",children:[o("div",{class:"ac-rtk-row__head",children:[o("span",{class:"ac-rtk-row__label",children:["rtk ",o("small",{children:"(Rust Token Killer)"})]}),e===null?o("span",{class:"ac-badge ac-badge--missing",children:"detecting…"}):e?o("span",{class:"ac-badge ac-badge--installed",children:"installed"}):o("span",{class:"ac-badge ac-badge--missing",children:"not installed"})]}),e===!1?o("div",{class:"ac-rtk-row__install",children:[o("p",{class:"ac-field__description",children:"rtk wraps verbose CLI output for ~60–90% token savings. Install it, then re-open the wizard to pick up detection:"}),n!==null?o("code",{class:"ac-rtk-row__cmd",children:n}):null,o("a",{class:"ac-button",href:qt.value,target:"_blank",rel:"noreferrer noopener",children:"Open rtk repo"})]}):null]})}function Vc(){const e=On(re.value,{extended:M.value});if(M.value&&Oe.value==="install"&&e.id==="identity"&&!Ve.value)return o(Cc,{});if(e.kind==="form"){const i=mc(xi.value,e.paths??[]);return o(J,{children:[e.id==="identity"?o(Gc,{}):null,o(Bl,{schema:i,values:U.value,errors:he.value,onChange:r=>{U.value=r}})]})}return e.kind==="userMd"?!ii.value||E.value===null?o("p",{children:"Loading .agent-user.yml…"}):o(zl,{value:E.value,errors:he.value,hideRole:M.value&&Oe.value==="install",hideIdentityBasics:M.value&&Oe.value==="install",onChange:i=>{E.value=i,Nn.value=!1}}):e.kind==="welcome"?o(zc,{}):e.kind==="aiTools"?o(Yc,{}):e.kind==="roles"?o(Kc,{}):e.kind==="packs"?o(qc,{}):o(Ac,{steps:Vt(),currentIndex:re.value,changes:In.value,errors:he.value,userMdChanged:wn(),userMdAction:Ai.value?"replace":"create",loading:pn.value,onJump:i=>{ke(i)},selectedToolsCount:Object.values(te.value).filter(Boolean).length,selectedPacksCount:Object.values(K.value).filter(Boolean).length})}function Hn({path:e}){if(De(()=>{$c()},[]),!jt.value||xi.value===null)return o("div",{class:"ac-page",children:[o("h1",{children:"Setup wizard"}),Te.value!==null?o("p",{class:"ac-banner ac-banner--error",children:Te.value}):o("p",{children:"Loading…"})]});const n=re.value,i=Me(),r=On(n,{extended:M.value}),t=n===i-1,l=r.kind==="aiTools"&&Object.values(te.value).filter(Boolean).length===0||r.kind==="roles"&&Object.values(ie.value).filter(Boolean).length===0||r.kind==="packs"&&nl().length===0,a=M.value&&Oe.value==="install"&&r.id==="identity"&&!Ve.value,c=bn.value,u=c!==null&&!Gt.value,d=ti.value;return d!==null&&d.present&&!li.value?o("div",{class:"ac-page",children:o(Tc,{sourcePath:d.path,backupTarget:d.backupTarget,version:d.version,busy:ai.value,error:oi.value,onBackupAndProceed:()=>{Pc()},onAbort:()=>{P.value={tone:"info",message:"Aborted. Uninstall v3 manually, then re-run `agent-config install`."},li.value=!0}})}):o("div",{class:"ac-page",children:[o(yc,{step:r,index:n,total:i}),u?o(Sc,{abortedAt:c.abortedAt,abortNote:c.abortNote,writesSinceRollback:c.writesSinceRollback,busy:fn.value,onResume:()=>{Un("resume")},onRollback:()=>{Un("rollback")},onIgnore:()=>{Un("ignore")}}):null,P.value!==null?o("p",{class:`ac-banner${P.value.tone==="error"?" ac-banner--error":""}`,children:P.value.message}):null,o("div",{class:"ac-wizard__step",children:o(Vc,{})}),l?o("p",{class:"ac-wizard__hint",children:r.kind==="aiTools"?"Select at least one AI tool to continue.":r.kind==="roles"?"Select at least one role to continue.":"Select at least one capability pack to continue."}):null,o(bc,{canGoPrev:n>0,canGoNext:!t&&!l,canSkip:a||r.kind==="userMd",skipLabel:a?"Finish install here":"Skip",isLast:t,busy:fn.value||pn.value,canFinish:In.value.length>0||wn(),completed:Si.value,onPrev:()=>{ke(n-1)},onNext:()=>{if(a){Ve.value=!0;return}ke(n+1)},onSkip:()=>{if(a){Ve.value=!0,ke(Me()-1);return}Nn.value=!0,ke(n+1)},onFinish:()=>{Uc()}})]})}const kn=_(!1),ve=_(null);async function Jc(){hn.value=!0,vn.value=null;try{const e=await A("/api/v1/modules/detect");Ci.value=e.candidates,Wt.value=e.project_root;const n={};for(const i of e.candidates)n[i.path]=!0;_n.value=n,mn.value=e.proposed_block.enabled,gn.value=e.proposed_block.namespace_template??"",yn.value=e.proposed_block.agent_folder??"agents"}catch(e){vn.value=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e)}finally{hn.value=!1,Ec.value=!0}}function Qc(){const e=new Set(Ci.value.map(r=>r.path)),n=_n.value,i=Object.keys(n).filter(r=>n[r]===!0&&e.has(r));return{enabled:mn.value,root_paths:i,namespace_template:gn.value,agent_folder:yn.value||"agents"}}async function Zc(){kn.value=!0,ve.value=null;try{const e=await A("/api/v1/modules/apply",{method:"POST",body:Qc()});ve.value={message:e.appliedTo!==null?`Saved project settings to ${e.appliedTo}.`:`Saved project settings to ${e.projectRoot}.`,tone:"success"}}catch(e){const n=e instanceof $?G(e.body.error??{code:"UNKNOWN",message:e.message}):e instanceof Error?e.message:String(e);ve.value={message:`Could not save project settings: ${n}`,tone:"error"}}finally{kn.value=!1}}function Xc(){if(hn.value)return o("p",{children:"Detecting module roots…"});if(vn.value!==null)return o("p",{class:"ac-banner ac-banner--error",children:["Module detection failed: ",vn.value]});const e=Ci.value,n=_n.value,i=Wt.value;return o("div",{class:"ac-section",children:[i!==null?o("p",{class:"ac-section__description",children:["Scanning ",o("code",{children:i}),". Pick which detected roots the agent should treat as modules. These write to",o("code",{children:" .agent-project-settings.yml"})," in this repo only."]}):null,o("label",{children:[o("input",{type:"checkbox",checked:mn.value,onChange:r=>{mn.value=r.currentTarget.checked}})," ","Enable module discovery (writes ",o("code",{children:"modules.enabled"}),")"]}),e.length===0?o("p",{children:[o("em",{children:"No module roots detected."})," The scan found no common module layouts (Laravel ",o("code",{children:"app/Modules/"}),", Symfony",o("code",{children:" src/Module/"}),", Node ",o("code",{children:"packages/"}),", Python",o("code",{children:" src/"}),", Go ",o("code",{children:"internal/"}),")."]}):o("ul",{style:"list-style: none; padding-left: 0;",children:e.map(r=>o("li",{children:o("label",{children:[o("input",{type:"checkbox",checked:n[r.path]??!1,onChange:t=>{const l=t.currentTarget.checked;_n.value={...n,[r.path]:l}}})," ",o("code",{children:r.path})," — ",r.stack," ",o("small",{children:["(",r.confidence," confidence)"]})]})},r.path))}),o("div",{class:"ac-wizard__module-fields",children:[o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-namespace",children:"Namespace template"}),o("input",{id:"ac-modules-namespace",class:"ac-input",type:"text",value:gn.value,placeholder:"e.g. App\\\\Modules\\\\{ModuleName}\\\\App",onInput:r=>{gn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:"How a module path maps to its namespace. Leave blank to skip namespacing."})]}),o("div",{class:"ac-field",children:[o("label",{class:"ac-field__label",for:"ac-modules-agent-folder",children:"Agent folder"}),o("input",{id:"ac-modules-agent-folder",class:"ac-input",type:"text",value:yn.value,placeholder:"agents",onInput:r=>{yn.value=r.currentTarget.value}}),o("span",{class:"ac-field__description",children:["Folder name that holds per-module agent docs (default ",o("code",{children:"agents"}),")."]})]})]})]})}function es(){return De(()=>{Jc()},[]),o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Project settings"}),o("p",{class:"ac-section__description",children:["Configuration scoped to this repository — written to",o("code",{children:" .agent-project-settings.yml"}),", not the global tree."]})]}),ve.value!==null?o("p",{class:`ac-banner ac-banner--${ve.value.tone==="success"?"success":"error"}`,children:ve.value.message}):null,o("section",{class:"ac-section",children:[o("h2",{class:"ac-section__title",children:"Modules"}),o(Xc,{})]}),o("div",{class:"ac-form__actions ac-wizard__nav",children:o("button",{type:"button",class:"ac-button ac-button--primary",disabled:kn.value||hn.value,onClick:()=>{Zc()},children:kn.value?"Saving…":"Save project settings"})})]})}const Je=_([]),xn=_([]),ci=_([]),si=_([]),An=_(null),rl=_(!1),Ne=_(null),Z=_(null),Wn=_("plain");async function ns(){Ne.value=null;try{const[e,n,i,r]=await Promise.all([A("/api/v1/workspace/roles"),A("/api/v1/workspace/sessions?limit=20"),A("/api/v1/workspace/knowledge?limit=20"),A("/api/v1/workspace/documents?limit=20")]);Je.value=e.roles,xn.value=n.sessions,ci.value=i.chunks,si.value=r.documents,rl.value=!0}catch(e){e instanceof $?Ne.value=e.body?.error?.message??e.message:Ne.value=e instanceof Error?e.message:String(e)}}async function is(e,n){Z.value=null;try{const i=await A("/api/v1/workspace/launch",{method:"POST",body:{role:e,task:n,host:"local"}});Z.value=`Started session ${i.id} (${i.role} · ${i.task}).`;const r=await A("/api/v1/workspace/sessions?limit=20");xn.value=r.sessions}catch(i){i instanceof $?Z.value=i.body?.error?.message??i.message:Z.value=i instanceof Error?i.message:String(i)}}function rs({role:e}){const n=An.value===e.slug;return o("button",{type:"button",class:`ac-workspace__role${n?" ac-workspace__role--active":""}`,"aria-current":n?"true":void 0,"aria-label":`Pick role ${e.display_name}`,onClick:()=>{An.value=e.slug,Z.value=null},children:[o("span",{class:"ac-workspace__role-name",children:e.display_name}),o("span",{class:"ac-workspace__role-status","data-status":e.status,children:e.status}),o("span",{class:"ac-workspace__role-tagline",children:e.tagline})]})}function ts({role:e}){return o("section",{class:"ac-workspace__tasks","aria-labelledby":"task-heading",children:[o("h2",{id:"task-heading",class:"ac-workspace__heading",children:["First tasks · ",e.display_name]}),e.first_tasks.length===0?o("p",{class:"ac-workspace__empty",children:"No tasks scaffolded yet for this role."}):o("ul",{class:"ac-workspace__task-list",children:e.first_tasks.map(n=>o("li",{class:"ac-workspace__task",children:[o("div",{class:"ac-workspace__task-head",children:[o("span",{class:"ac-workspace__task-name",children:n.name}),o("button",{type:"button",class:"ac-button ac-button--primary",onClick:()=>{is(e.slug,n.name)},children:"Start session"})]}),o("p",{class:"ac-workspace__task-intent",children:n.intent}),n.prompt!==""?o("code",{class:"ac-workspace__task-prompt",children:["prompts/",n.prompt]}):null]},n.name))}),e.skills.length>0?o("details",{class:"ac-workspace__skills",children:[o("summary",{children:["Skill shortlist (",e.skills.length,")"]}),o("ul",{class:"ac-workspace__skill-list",children:[e.skills.slice(0,5).map(n=>o("li",{class:"ac-workspace__skill",children:[o("code",{children:n.id})," — ",n.why]},n.id)),e.skills.length>5?o("li",{class:"ac-workspace__skill-more",children:["+ ",e.skills.length-5," more"]}):null]})]}):null]})}function ls(){return o("section",{class:"ac-workspace__sessions","aria-labelledby":"sessions-heading",children:[o("h2",{id:"sessions-heading",class:"ac-workspace__heading",children:"Recent sessions"}),xn.value.length===0?o("p",{class:"ac-workspace__empty",children:"No sessions yet — pick a role and start one."}):o("ul",{class:"ac-workspace__session-list",children:xn.value.map(e=>o("li",{class:"ac-workspace__session",children:[o("span",{class:"ac-workspace__session-id",children:e.id.slice(0,16)}),o("span",{class:"ac-workspace__session-role",children:e.role}),o("span",{class:"ac-workspace__session-task",children:e.task})]},e.id))})]})}function as(){return o("section",{class:"ac-workspace__knowledge","aria-labelledby":"knowledge-heading",children:[o("h2",{id:"knowledge-heading",class:"ac-workspace__heading",children:"Knowledge sources"}),ci.value.length===0?o("p",{class:"ac-workspace__empty",children:["No sources yet. Run ",o("code",{children:"/knowledge:ingest <path>"})," to add documents."]}):o("ol",{class:"ac-workspace__citation-list",children:ci.value.map((e,n)=>o("li",{class:"ac-workspace__citation",children:[o("span",{class:"ac-workspace__citation-marker","aria-label":`Citation ${n+1}`,children:["[",n+1,"]"]}),o("a",{href:`file://${e.source}`,class:"ac-workspace__citation-source",title:"Open source in OS default app",children:e.source.split("/").pop()??e.source}),e.pinned?o("span",{class:"ac-workspace__citation-pin","aria-label":"pinned",children:"★"}):null,o("p",{class:"ac-workspace__citation-excerpt",children:[e.excerpt.slice(0,200),e.excerpt.length>200?"…":""]})]},e.id))})]})}function os(){return o("section",{class:"ac-workspace__recent","aria-labelledby":"recent-heading",children:[o("h2",{id:"recent-heading",class:"ac-workspace__heading",children:"Recent documents"}),si.value.length===0?o("p",{class:"ac-workspace__empty",children:"No documents yet. Saved drafts land here."}):o("ul",{class:"ac-workspace__doc-list",children:si.value.map(e=>o("li",{class:"ac-workspace__doc",children:[o("span",{class:"ac-workspace__doc-type","data-type":e.type,children:e.type}),o("span",{class:"ac-workspace__doc-title",children:e.title}),o("time",{class:"ac-workspace__doc-time",dateTime:e.updated_at,children:e.updated_at.slice(0,10)})]},`${e.type}/${e.slug}`))})]})}function cs(){const e=Wn.value;return o("fieldset",{class:"ac-workspace__explain",children:[o("legend",{class:"ac-workspace__heading",children:"Explanation style"}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"plain",checked:e==="plain",onChange:()=>{Wn.value="plain"},"aria-label":"Plain language"}),o("span",{children:"Plain language"})]}),o("label",{class:"ac-workspace__explain-option",children:[o("input",{type:"radio",name:"explain-mode",value:"technical",checked:e==="technical",onChange:()=>{Wn.value="technical"},"aria-label":"Technical detail"}),o("span",{children:"Technical detail"})]}),o("p",{class:"ac-workspace__explain-hint",children:e==="plain"?"Replies use everyday words. Toggle to see the technical view.":"Replies keep the technical vocabulary. Toggle for the plain view."})]})}function ss(){if(De(()=>{ns()},[]),Ne.value!==null)return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-banner ac-banner--error",children:Ne.value})]});if(!rl.value)return o("div",{class:"ac-page",children:[o("h1",{children:"Workspace"}),o("p",{children:"Loading…"})]});const e=An.value!==null?Je.value.find(n=>n.slug===An.value)??null:null;return o("div",{class:"ac-page ac-workspace",children:[o("header",{class:"ac-page__header",children:[o("h1",{children:"Workspace"}),o("p",{class:"ac-page__subtitle",children:"Pick a role, pick a first task, run it."})]}),Z.value!==null?o("p",{class:"ac-banner",role:"status",children:Z.value}):null,o("div",{class:"ac-workspace__grid",children:[o("section",{class:"ac-workspace__roles","aria-labelledby":"roles-heading",children:[o("h2",{id:"roles-heading",class:"ac-workspace__heading",children:"Roles"}),Je.value.length===0?o("p",{class:"ac-workspace__empty",children:"No roles installed."}):o("div",{class:"ac-workspace__role-grid",children:Je.value.map(n=>o(rs,{role:n},n.slug))})]}),o("main",{class:"ac-workspace__main","aria-label":"Tasks and sessions",children:[e!==null?o(ts,{role:e}):o("p",{class:"ac-workspace__empty",children:"Pick a role on the left to see its first tasks."}),o(ls,{})]}),o("aside",{class:"ac-workspace__rail","aria-label":"Knowledge and documents",children:[o(as,{}),o(os,{}),o(cs,{})]})]})]})}const tl=[{id:"setup",label:"Setup",hashPath:"/setup",matches:["/setup","/wizard"]},{id:"project",label:"Projekt",hashPath:"/project",matches:["/project"]},{id:"tasks",label:"Tasks",hashPath:"/tasks",matches:["/tasks"]},{id:"council",label:"Council",hashPath:"/council",matches:["/council"]},{id:"memory",label:"Memory",hashPath:"/memory",matches:["/memory"]},{id:"explain",label:"Explain",hashPath:"/explain",matches:["/explain"]},{id:"workspace",label:"Workspace",hashPath:"/workspace",matches:["/workspace"]}];function us(e){for(const n of tl)for(const i of n.matches)if(e===i||e.startsWith(`${i}/`))return n.id;return null}function ds(){const e=de.value,n=us(e);return o("header",{class:"ac-topnav",children:o("div",{class:"ac-topnav__inner",children:[o("div",{class:"ac-topnav__brand",children:[o("h1",{class:"ac-topnav__title",children:"@event4u/agent-config"}),o("p",{class:"ac-topnav__subtitle",children:"Browser Wizard"})]}),o("nav",{class:"ac-topnav__tabs","aria-label":"Surfaces",children:tl.map(i=>o("button",{type:"button",class:`ac-topnav__tab${n===i.id?" ac-topnav__tab--active":""}`,"aria-current":n===i.id?"page":void 0,onClick:()=>Jn(i.hashPath),children:i.label},i.id))})]})})}function ze({name:e}){return o("div",{class:"ac-page",children:[o("header",{class:"ac-page__header",children:o("h1",{children:e})}),o("section",{class:"ac-section",children:[o("p",{class:"ac-section__description",children:["The ",o("strong",{children:e})," surface is currently served by the legacy installer GUI on port ",o("code",{children:"41100"}),". It is being ported to the modern shell in a follow-up phase (road-to-unified-setup § Phase 5)."]}),o("p",{class:"ac-section__description",children:["For now the legacy surface remains reachable via"," ",o("code",{children:"installer gui"}),"."]})]})]})}function fs({path:e}){return o("div",{class:"ac-page ac-page--error",children:[o("h1",{children:"Page not found"}),o("p",{children:["Nothing routed to ",o("code",{children:e}),". Try ",o("a",{href:"#/setup",children:"Setup"}),"."]})]})}function ps(){const e=ln.value;return e===null||e.dryRun!==!0?null:o("div",{class:"ac-dryrun-banner",role:"status","aria-live":"polite",children:[o("strong",{children:"DRY RUN"}),o("span",{children:" · no files will be written. Validation + rendering run normally; commits return a preview."})]})}function hs(e){return e==="/"||e==="/setup"||e.startsWith("/setup/")?o(Hn,{path:e}):e.startsWith("/wizard")?o(Hn,{path:e}):e==="/settings"||e.startsWith("/settings/")?o(Hn,{path:"/setup"}):e==="/project"||e.startsWith("/project/")?o(es,{}):e==="/tasks"?o(ze,{name:"Tasks"}):e==="/council"?o(ze,{name:"Council"}):e==="/memory"?o(ze,{name:"Memory"}):e==="/explain"?o(ze,{name:"Explain"}):e==="/workspace"?o(ss,{}):o(fs,{path:e})}function vs(){return De(()=>{Cl(),(de.value==="/"||de.value==="/settings"||de.value.startsWith("/settings/"))&&Jn("/setup"),Ol()},[]),o(J,{children:[o(ps,{}),o(ds,{}),hs(de.value)]})}const _s=3e4,ms=30*6e4;let Ye=null,vr=!1;function _r(e){if(!vr&&(vr=!0,!(typeof navigator>"u"||typeof navigator.sendBeacon!="function")))try{navigator.sendBeacon(`/api/v1/shutdown?token=${encodeURIComponent(e)}`)}catch{}}function gs(e){if(typeof window>"u")return()=>{};let n=Date.now();const i=()=>{n=Date.now()},r=["pointerdown","keydown","wheel","touchstart"];for(const c of r)window.addEventListener(c,i,{passive:!0});const t=()=>{document.hidden||i()};document.addEventListener("visibilitychange",t);const l=()=>{Ye!==null&&clearInterval(Ye),Ye=null;for(const c of r)window.removeEventListener(c,i);document.removeEventListener("visibilitychange",t),window.removeEventListener("pagehide",a)};Ye=setInterval(()=>{if(!document.hidden){if(Date.now()-n>ms){_r(e),l();return}A("/api/v1/ping").catch(()=>{})}},_s);function a(){_r(e)}return window.addEventListener("pagehide",a),l}function ys(){return new URLSearchParams(window.location.search).get("token")}function bs(){const e=document.getElementById("app");if(e===null)return;const n=ys();if(n===null){e.textContent="agent-config UI · missing token — re-open via `agent-config ui:serve`.";return}Tl(n),gs(n),e.textContent="",fl(o(vs,{}),e)}bs();
|
|
40
|
-
//# sourceMappingURL=index-
|
|
40
|
+
//# sourceMappingURL=index-4V5HhhIV.js.map
|