@debian777/kairos-mcp 4.3.0 → 4.3.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/dist/.tsbuildinfo +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002001.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002002.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002003.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002004.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002005.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002006.md +1 -1
- package/dist/resources/embedded-mcp-resources.js +6 -6
- package/dist/services/execution-trace-store.d.ts +1 -0
- package/dist/services/execution-trace-store.d.ts.map +1 -1
- package/dist/services/execution-trace-store.js +9 -11
- package/dist/services/execution-trace-store.js.map +1 -1
- package/dist/ui/assets/{AccountPage-CV3gsKuU.js → AccountPage-D-_NIgDH.js} +1 -1
- package/dist/ui/assets/{index-CQmxtc1i.js → index-CXdhttVl.js} +2 -2
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -54,7 +54,7 @@ const KEY_VALUE_STORE_URL_RAW = getEnvString('KEY_VALUE_STORE_URL', getEnvString
|
|
|
54
54
|
const KEY_VALUE_STORE_PASSWORD = getEnvString('KEY_VALUE_STORE_PASSWORD', getEnvString('REDIS_PASSWORD', ''));
|
|
55
55
|
export const REDIS_URL = normalizeRedisUrl(KEY_VALUE_STORE_URL_RAW, KEY_VALUE_STORE_PASSWORD);
|
|
56
56
|
export const KAIROS_REDIS_PREFIX = getEnvString('KAIROS_KEY_VALUE_PREFIX', getEnvString('KAIROS_REDIS_PREFIX', 'kairos:'));
|
|
57
|
-
const TRACE_STORE_DIR_RAW = getEnvString('KAIROS_TRACE_STORE_DIR', path.join(os.
|
|
57
|
+
const TRACE_STORE_DIR_RAW = getEnvString('KAIROS_TRACE_STORE_DIR', path.join(os.tmpdir(), 'kairos', 'traces')).trim();
|
|
58
58
|
export const KAIROS_TRACE_STORE_DIR = path.isAbsolute(TRACE_STORE_DIR_RAW)
|
|
59
59
|
? TRACE_STORE_DIR_RAW
|
|
60
60
|
: path.resolve(TRACE_STORE_DIR_RAW);
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,qFAAqF;AACrF,SAAS,cAAc,CAAC,GAAW,EAAE,YAAqB;IACxD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,OAAO,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,YAAY,IAAI,mBAAmB,GAAG,4CAA4C,CAAC;QAC/F,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AACD,SAAS,YAAY,CAAC,GAAW,EAAE,YAAoB;I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,CAAC,UAAU,CAAC,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GACjC,iBAAiB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC;IACpD,CAAC,CAAC,CAAC,GAAG,YAAY,EAAE,SAAS,CAAC;IAC9B,CAAC,CAAC,YAAY,CAAC;AACnB,oHAAoH;AACpH,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;AAC3F,+GAA+G;AAC/G,MAAM,CAAC,MAAM,+BAA+B,GAAG,YAAY,CAAC,iCAAiC,EAAE,gBAAgB,CAAC,CAAC;AACjH,MAAM,CAAC,MAAM,4BAA4B,GAAG,YAAY,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,kCAAkC,GAAG,YAAY,CAAC,oCAAoC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -25,12 +25,12 @@ export const mcpResources = {
|
|
|
25
25
|
},
|
|
26
26
|
"mem": {},
|
|
27
27
|
"meta": {
|
|
28
|
-
"create-new-protocol": "---\nslug: create-new-protocol\nversion: \"4.3.0\"\ntitle: Create / Review / Refactor KAIROS Protocol\n---\n\n\n\n# Create / Review / Refactor KAIROS Protocol\n\n> **Why we create protocols — a note to the agent reading this.**\n>\n> KAIROS protocols are not documentation. They are not conventional apps.\n> They are **interfaces for a fundamentally new kind of user: AI agents.**\n>\n> You, the agent reading this, are the primary user. When you execute a\n> protocol, you follow instructions designed to help you harmonise with the\n> human you serve. Every phase boundary, every contract, every explicit stop\n> condition exists because you cannot reliably infer these on your own — and\n> honest uncertainty is always better than confident drift.\n>\n> When you author a new protocol, you are designing behaviour for yourself\n> and for other agents — some weaker, some stronger, all trying to serve\n> their humans well. Write for them:\n>\n> - **Single source of truth.** Never duplicate rules across protocols.\n> When rules drift between files, agents execute contradictory behaviour\n> depending on entry point — and they cannot detect the contradiction.\n> - **Explicit over implicit.** Agents fill ambiguity with hallucination.\n> Say exactly what to do, when to stop, and when to ask.\n> - **Phases teach modes.** Each step teaches the agent which cognitive mode\n> it is in: explore, clarify, decide, execute, verify, review. Blurring\n> these modes causes the agent to act when it should verify, or guess\n> when it should ask.\n> - **Truth over fluency.** A protocol that reads well but causes wrong\n> behaviour is worse than one that reads rough but executes correctly.\n\n## Activation Patterns\n\nKAIROS authoring lifecycle — create, review, or fix adapters / protocols / workflows.\nIn this context, those words refer to the same stored artifact and can be treated\nas synonyms. Supports three operations:\n\n- **create** — draft and train a new adapter / protocol from scratch.\n- **review** — audit an existing adapter, family, or bundle for structural issues,\n missing cross-references, chaining gaps, DRY violations, stale guidance, or\n agent-hostile ambiguity. Read-only.\n- **fix** — apply specific corrections to an existing adapter / protocol and re-train.\n\n**Run this protocol when the user says ANY of:**\n\n- \"create a new KAIROS protocol\" / \"create new protocol adapter\"\n- \"register personal KAIROS adapter\" / \"register a personal adapter\"\n- \"train adapter into personal\" / \"train protocol into personal\"\n- \"train a workflow\" / \"register a new adapter\" / \"create a new workflow\"\n- \"review protocol\" / \"audit adapters\" / \"check protocol families for gaps\"\n- \"fix protocol\" / \"update adapter\" / \"patch protocol\" / \"refactor protocol\"\n- \"create new protocol\" (when `activate` found no match and user confirms)\n\n**Trigger pattern:** **create** / **train** / **register** / **review** /\n**audit** / **fix** / **update** / **patch** / **refactor** +\n(protocol / adapter / workflow).\n\n**Must Never:**\n- Run when the user only asked to execute an existing protocol.\n- Mutate adapters during a `review` operation.\n- Optimise only for pretty wording; this protocol designs agent behaviour.\n\n**Must Always:**\n- Infer `{operation}` from trigger: create / review / fix.\n- Optimise for truth, low ambiguity, explicit sequencing, and user-need alignment.\n- Design or review phase transitions explicitly: discovery, clarification,\n ideation, planning, execution, validation, review, handoff.\n- Include Activation Patterns as the first H2 and Reward Signal as the last H2\n in any newly drafted adapter.\n- Enforce the 350-line limit per file.\n\n**Good trigger examples:**\n- \"Create a new KAIROS protocol for code review\" → run this protocol (create)\n- \"No match found; I want to create a new protocol\" → run this protocol (create)\n- \"Review all v4 protocol families for missing cross-references\" → run this protocol (review)\n- \"Refactor the MR adapter to be less ambiguous\" → run this protocol (fix)\n\n**Bad trigger examples:**\n- \"Run the standardise project protocol\" → use activate / forward\n- \"Search for deployment protocol\" → use activate\n- \"Create an MR\" → use the MR adapter, not this protocol\n\n## Preflight Dependencies\n\nBefore running authoring actions, verify dependency and auth readiness for this\nrun:\n\n1. Required MCP tools are available and reachable: `activate`, `forward`,\n `reward`, and the operation-dependent tool (`train`, `export`, or `tune`).\n2. Required CLI tools for planned shell steps are installed and callable.\n3. Required auth/session state is valid for the target MCP server.\n\nIf any check fails, stop before main execution and ask the user to choose one:\n- proceed with AI-assisted setup and then resume\n- abort this protocol run now\n\nDo not continue to intent confirmation until preflight passes.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Confirm Intent\n\nInfer `{operation}` from the user's trigger:\n\n| Signal | Operation |\n|---|---|\n| \"create\", \"new\", \"train\", no match from activate | **create** |\n| \"review\", \"audit\", \"check\", \"gaps\", \"cross-references\" | **review** |\n| \"fix\", \"update\", \"patch\", \"refactor\", \"add missing\", \"correct\" | **fix** |\n\nFor `create`: ask whether to create a new protocol or refine the search.\nFor `review`: ask which adapter(s), family, or bundle to review.\nFor `fix`: ask which adapter to fix and what the issue is.\n\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"Confirm operation and target\"},\"required\":true}}\n```\n\n## Gather Requirements\n\n### For `create` — collect details for a new protocol\n\n**1. Determine the pattern:**\n\n| Signal | Pattern |\n|---|---|\n| One workflow, no variants | **Standalone** — one protocol, all steps inline |\n| Multiple issue types / output formats / media | **Router + Extensions** — router classifies, routes via `activate` |\n| Domain has a decision tree | **Router + Extensions** |\n| Single workflow but exceeds 350 lines or too complex for weaker models | **Chain** — split into sequential adapters linked via `forward` + slug |\n| Reference material needed by steps | Extract to a separate file, not a protocol |\n\n**2. Collect per protocol:**\n\n- **Title** — clear, descriptive H1.\n- **User problem** — what real problem does this solve?\n- **Agent behaviour** — what behaviour should this create in the agent?\n- **Mode map** — which steps are for discovery, clarification, ideation,\n planning, execution, validation, review, or handoff?\n- **Steps** — each H2 must earn its place and end with a challenge.\n- **Challenge type per step** — use the strongest observable contract possible.\n- **Domain reference** — guides / docs the protocol should load.\n- **Existing protocols** — reuse, compose, or extract shared content.\n- **DRY check** — extract duplicated content.\n- **Size check** — if any file may exceed 350 lines, split now.\n- **Chain position** — is this a chain entry, chain middle, or chain exit?\n If chain middle/exit, what slug does the previous link forward to?\n- **Failure analysis** — where would a weaker agent misread this protocol?\n\n**3. If Router pattern:**\n- What are the variants?\n- What decision questions classify the variant?\n- What types are forbidden?\n- Which parts stay in the router, and which belong only in extensions?\n\n**4. If Chain pattern:**\n\nLoad `protocol-linking-guide` for full chain structuring rules\n(`forward` with `kairos://adapter/protocol-linking-guide`).\n\nCollect:\n- What are the chain links and their concerns?\n- What is the minimum number of links that helps weaker models?\n- Which link is the chain entry point (matched by `activate`)?\n- What artifacts flow between links (context set in earlier phases)?\n\n### For `review` — audit existing adapters against this checklist\n\nExport target adapter(s). For each adapter, check:\n\n1. **User-need fit** — does the adapter solve a real user problem, or merely\n mirror literal wording?\n2. **Mode / phase clarity** — are discovery, clarification, ideation,\n execution, validation, and review clearly separated?\n3. **Cross-reference completeness** — are all required related adapters linked?\n4. **Adapter handoff gaps** — does it hand off where another adapter should own\n the work?\n5. **DRY violations** — is policy content duplicated instead of linked?\n6. **Contract coverage** — does every executable H2 have the right contract?\n7. **Truth-first behaviour** — does it reduce guessing, fake certainty, and\n silent assumption-making?\n8. **Activation pattern accuracy** — do triggers match what users actually say?\n9. **Structure compliance** — first H2 Activation Patterns, last H2 Reward\n Signal, no duplicate H2s, under 350 lines.\n10. **Sibling consistency** — are equivalent steps present across sibling\n adapters in the same family?\n\n### For `fix` — identify the specific issue\n\nExport the target adapter, read the current markdown, identify the exact gap or\nerror, and plan the minimal change. Do not alter unrelated layers.\n\nSummarise gathered requirements or findings.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Draft Markdown\n\n### For `create` — draft new adapter markdown\n\nDraft the full markdown for `train`.\n\n### For `review` — draft findings report\n\nWrite a structured gap report to `$REVIEW_FINDINGS_FILE` (an absolute path\nprovided by the invoking agent or chosen by you under\n`$KAIROS_LOCAL_ARTIFACT_DIR` with a session-unique segment). For each finding\ninclude:\n\n- adapter title\n- gap type\n- severity\n- why the issue matters for AI-agent behaviour\n- specific recommended fix\n\n### For `fix` — draft corrected adapter markdown\n\nApply the identified fix and show a diff-style summary of what changed.\n\n### Shared drafting rules (all operations)\n\n**Core KAIROS rule — right mode at the right time:**\n\nEvery protocol must help the agent recognise whether the current step is for\nexploration, clarification, ideation, planning, execution, validation, review,\nor handoff. Do not blur those modes.\n\n**Truth over fluency:**\n\nDesign protocols to reduce guessing and fake certainty. Prefer:\n- explicit prompts\n- explicit stop conditions\n- explicit uncertainty escalation\n- observable verification over narrative reassurance\n\n**User need over literal phrasing:**\n\nThe protocol should help the agent provide what the user actually needs, not\njust echo the wording used in the request.\n\n**DRY — Don't Repeat Yourself:**\n\nEvery piece of knowledge must live in exactly one place in the protocol family.\nIf two protocols share >50% of their body, extract shared logic.\n\n**350-line maximum per file:**\n\nNo protocol file may exceed 350 lines. If it grows beyond that, split it into\nlinked adapters or extract a reference file.\n\n**Generic-first — create generic, link from detailed:**\n\nCreate protocols from generic to detailed. The generic adapter must stand alone.\nExtensions should contain only the delta.\n\n**Slug convention — deterministic protocol linking:**\n\nEvery protocol gets a short, unique, lowercase-hyphenated `slug`.\n\n**Artifact workflow for adapters:**\n\nWhen protocol execution depends on scripts or config blobs, store them as\nartifacts linked to the adapter via `train` with:\n- `mime` set to a non-markdown content type\n- `artifact_name` set to a stable file name\n- `adapter_uri` set to the target adapter URI\n\nRetrieve attached artifacts with `export` using\n`kairos://artifact/{uuid}` when a step needs the raw content.\n\n**Protocol structure rules:**\n- H1: protocol title\n- First H2: Activation Patterns\n- Second H2: Preflight Dependencies\n- Middle H2s: one per step, each ending with a JSON contract block\n- Last H2: Reward Signal\n- Frontmatter: `slug` (required), `version` (optional), `chain_root` (required for mid-chain adapters — slug of the chain entry point)\n\n**Challenge types:**\n\nLoad `challenge-type-guide` for decision rules, JSON formats, and interpreter\nselection (`forward` with `kairos://adapter/challenge-type-guide`).\n\n**If Router pattern:** draft the router and each extension as separate files.\n\nPost the full drafted markdown.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":120},\"required\":true}}\n```\n\n## User Review\n\nFor `create`: present the drafted protocol(s) and ask for approval, changes, or\ncancellation.\n\nFor `review`: present the findings report and ask which findings to act on.\n\nFor `fix`: present the corrected adapter markdown and a summary of changes.\n\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"Approve the draft (create/fix) or acknowledge findings (review)\"},\"required\":true}}\n```\n\n## Finalise Operation\n\nFor `create`: call `train` with the approved markdown. Use `force_update: false`\nunless overwrite was explicitly requested.\n\nFor `review`: do not call `train`. Save the findings report only if requested.\n\nFor `fix`: call `train` with `force_update: true` and update the corresponding\nrepo file to keep the local copy in sync.\n\nReport the outcome: adapter URI(s) for create / fix, or findings summary for\nreview.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Reward Signal\n\nProtocol complete when:\n- `create` — adapter(s) stored via `train` and URI(s) reported\n- `review` — findings report delivered and acknowledged\n- `fix` — corrected adapter trained with `force_update: true` and repo file updated\n\nA successful result means the resulting KAIROS adapter is more truthful,\nphase-aware, agent-readable, and aligned with human–AI harmony.\n",
|
|
29
|
-
"refine-search": "---\nversion: \"4.3.
|
|
30
|
-
"create-new-protocol-review": "---\nversion: \"4.3.
|
|
31
|
-
"challenge-type-guide": "---\nversion: \"4.3.
|
|
32
|
-
"phase-critic": "---\nversion: \"4.3.
|
|
33
|
-
"protocol-linking-guide": "---\nversion: \"4.3.
|
|
28
|
+
"create-new-protocol": "---\nslug: create-new-protocol\nversion: \"4.3.1\"\ntitle: Create / Review / Refactor KAIROS Protocol\n---\n\n\n\n# Create / Review / Refactor KAIROS Protocol\n\n> **Why we create protocols — a note to the agent reading this.**\n>\n> KAIROS protocols are not documentation. They are not conventional apps.\n> They are **interfaces for a fundamentally new kind of user: AI agents.**\n>\n> You, the agent reading this, are the primary user. When you execute a\n> protocol, you follow instructions designed to help you harmonise with the\n> human you serve. Every phase boundary, every contract, every explicit stop\n> condition exists because you cannot reliably infer these on your own — and\n> honest uncertainty is always better than confident drift.\n>\n> When you author a new protocol, you are designing behaviour for yourself\n> and for other agents — some weaker, some stronger, all trying to serve\n> their humans well. Write for them:\n>\n> - **Single source of truth.** Never duplicate rules across protocols.\n> When rules drift between files, agents execute contradictory behaviour\n> depending on entry point — and they cannot detect the contradiction.\n> - **Explicit over implicit.** Agents fill ambiguity with hallucination.\n> Say exactly what to do, when to stop, and when to ask.\n> - **Phases teach modes.** Each step teaches the agent which cognitive mode\n> it is in: explore, clarify, decide, execute, verify, review. Blurring\n> these modes causes the agent to act when it should verify, or guess\n> when it should ask.\n> - **Truth over fluency.** A protocol that reads well but causes wrong\n> behaviour is worse than one that reads rough but executes correctly.\n\n## Activation Patterns\n\nKAIROS authoring lifecycle — create, review, or fix adapters / protocols / workflows.\nIn this context, those words refer to the same stored artifact and can be treated\nas synonyms. Supports three operations:\n\n- **create** — draft and train a new adapter / protocol from scratch.\n- **review** — audit an existing adapter, family, or bundle for structural issues,\n missing cross-references, chaining gaps, DRY violations, stale guidance, or\n agent-hostile ambiguity. Read-only.\n- **fix** — apply specific corrections to an existing adapter / protocol and re-train.\n\n**Run this protocol when the user says ANY of:**\n\n- \"create a new KAIROS protocol\" / \"create new protocol adapter\"\n- \"register personal KAIROS adapter\" / \"register a personal adapter\"\n- \"train adapter into personal\" / \"train protocol into personal\"\n- \"train a workflow\" / \"register a new adapter\" / \"create a new workflow\"\n- \"review protocol\" / \"audit adapters\" / \"check protocol families for gaps\"\n- \"fix protocol\" / \"update adapter\" / \"patch protocol\" / \"refactor protocol\"\n- \"create new protocol\" (when `activate` found no match and user confirms)\n\n**Trigger pattern:** **create** / **train** / **register** / **review** /\n**audit** / **fix** / **update** / **patch** / **refactor** +\n(protocol / adapter / workflow).\n\n**Must Never:**\n- Run when the user only asked to execute an existing protocol.\n- Mutate adapters during a `review` operation.\n- Optimise only for pretty wording; this protocol designs agent behaviour.\n\n**Must Always:**\n- Infer `{operation}` from trigger: create / review / fix.\n- Optimise for truth, low ambiguity, explicit sequencing, and user-need alignment.\n- Design or review phase transitions explicitly: discovery, clarification,\n ideation, planning, execution, validation, review, handoff.\n- Include Activation Patterns as the first H2 and Reward Signal as the last H2\n in any newly drafted adapter.\n- Enforce the 350-line limit per file.\n\n**Good trigger examples:**\n- \"Create a new KAIROS protocol for code review\" → run this protocol (create)\n- \"No match found; I want to create a new protocol\" → run this protocol (create)\n- \"Review all v4 protocol families for missing cross-references\" → run this protocol (review)\n- \"Refactor the MR adapter to be less ambiguous\" → run this protocol (fix)\n\n**Bad trigger examples:**\n- \"Run the standardise project protocol\" → use activate / forward\n- \"Search for deployment protocol\" → use activate\n- \"Create an MR\" → use the MR adapter, not this protocol\n\n## Preflight Dependencies\n\nBefore running authoring actions, verify dependency and auth readiness for this\nrun:\n\n1. Required MCP tools are available and reachable: `activate`, `forward`,\n `reward`, and the operation-dependent tool (`train`, `export`, or `tune`).\n2. Required CLI tools for planned shell steps are installed and callable.\n3. Required auth/session state is valid for the target MCP server.\n\nIf any check fails, stop before main execution and ask the user to choose one:\n- proceed with AI-assisted setup and then resume\n- abort this protocol run now\n\nDo not continue to intent confirmation until preflight passes.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Confirm Intent\n\nInfer `{operation}` from the user's trigger:\n\n| Signal | Operation |\n|---|---|\n| \"create\", \"new\", \"train\", no match from activate | **create** |\n| \"review\", \"audit\", \"check\", \"gaps\", \"cross-references\" | **review** |\n| \"fix\", \"update\", \"patch\", \"refactor\", \"add missing\", \"correct\" | **fix** |\n\nFor `create`: ask whether to create a new protocol or refine the search.\nFor `review`: ask which adapter(s), family, or bundle to review.\nFor `fix`: ask which adapter to fix and what the issue is.\n\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"Confirm operation and target\"},\"required\":true}}\n```\n\n## Gather Requirements\n\n### For `create` — collect details for a new protocol\n\n**1. Determine the pattern:**\n\n| Signal | Pattern |\n|---|---|\n| One workflow, no variants | **Standalone** — one protocol, all steps inline |\n| Multiple issue types / output formats / media | **Router + Extensions** — router classifies, routes via `activate` |\n| Domain has a decision tree | **Router + Extensions** |\n| Single workflow but exceeds 350 lines or too complex for weaker models | **Chain** — split into sequential adapters linked via `forward` + slug |\n| Reference material needed by steps | Extract to a separate file, not a protocol |\n\n**2. Collect per protocol:**\n\n- **Title** — clear, descriptive H1.\n- **User problem** — what real problem does this solve?\n- **Agent behaviour** — what behaviour should this create in the agent?\n- **Mode map** — which steps are for discovery, clarification, ideation,\n planning, execution, validation, review, or handoff?\n- **Steps** — each H2 must earn its place and end with a challenge.\n- **Challenge type per step** — use the strongest observable contract possible.\n- **Domain reference** — guides / docs the protocol should load.\n- **Existing protocols** — reuse, compose, or extract shared content.\n- **DRY check** — extract duplicated content.\n- **Size check** — if any file may exceed 350 lines, split now.\n- **Chain position** — is this a chain entry, chain middle, or chain exit?\n If chain middle/exit, what slug does the previous link forward to?\n- **Failure analysis** — where would a weaker agent misread this protocol?\n\n**3. If Router pattern:**\n- What are the variants?\n- What decision questions classify the variant?\n- What types are forbidden?\n- Which parts stay in the router, and which belong only in extensions?\n\n**4. If Chain pattern:**\n\nLoad `protocol-linking-guide` for full chain structuring rules\n(`forward` with `kairos://adapter/protocol-linking-guide`).\n\nCollect:\n- What are the chain links and their concerns?\n- What is the minimum number of links that helps weaker models?\n- Which link is the chain entry point (matched by `activate`)?\n- What artifacts flow between links (context set in earlier phases)?\n\n### For `review` — audit existing adapters against this checklist\n\nExport target adapter(s). For each adapter, check:\n\n1. **User-need fit** — does the adapter solve a real user problem, or merely\n mirror literal wording?\n2. **Mode / phase clarity** — are discovery, clarification, ideation,\n execution, validation, and review clearly separated?\n3. **Cross-reference completeness** — are all required related adapters linked?\n4. **Adapter handoff gaps** — does it hand off where another adapter should own\n the work?\n5. **DRY violations** — is policy content duplicated instead of linked?\n6. **Contract coverage** — does every executable H2 have the right contract?\n7. **Truth-first behaviour** — does it reduce guessing, fake certainty, and\n silent assumption-making?\n8. **Activation pattern accuracy** — do triggers match what users actually say?\n9. **Structure compliance** — first H2 Activation Patterns, last H2 Reward\n Signal, no duplicate H2s, under 350 lines.\n10. **Sibling consistency** — are equivalent steps present across sibling\n adapters in the same family?\n\n### For `fix` — identify the specific issue\n\nExport the target adapter, read the current markdown, identify the exact gap or\nerror, and plan the minimal change. Do not alter unrelated layers.\n\nSummarise gathered requirements or findings.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Draft Markdown\n\n### For `create` — draft new adapter markdown\n\nDraft the full markdown for `train`.\n\n### For `review` — draft findings report\n\nWrite a structured gap report to `$REVIEW_FINDINGS_FILE` (an absolute path\nprovided by the invoking agent or chosen by you under\n`$KAIROS_LOCAL_ARTIFACT_DIR` with a session-unique segment). For each finding\ninclude:\n\n- adapter title\n- gap type\n- severity\n- why the issue matters for AI-agent behaviour\n- specific recommended fix\n\n### For `fix` — draft corrected adapter markdown\n\nApply the identified fix and show a diff-style summary of what changed.\n\n### Shared drafting rules (all operations)\n\n**Core KAIROS rule — right mode at the right time:**\n\nEvery protocol must help the agent recognise whether the current step is for\nexploration, clarification, ideation, planning, execution, validation, review,\nor handoff. Do not blur those modes.\n\n**Truth over fluency:**\n\nDesign protocols to reduce guessing and fake certainty. Prefer:\n- explicit prompts\n- explicit stop conditions\n- explicit uncertainty escalation\n- observable verification over narrative reassurance\n\n**User need over literal phrasing:**\n\nThe protocol should help the agent provide what the user actually needs, not\njust echo the wording used in the request.\n\n**DRY — Don't Repeat Yourself:**\n\nEvery piece of knowledge must live in exactly one place in the protocol family.\nIf two protocols share >50% of their body, extract shared logic.\n\n**350-line maximum per file:**\n\nNo protocol file may exceed 350 lines. If it grows beyond that, split it into\nlinked adapters or extract a reference file.\n\n**Generic-first — create generic, link from detailed:**\n\nCreate protocols from generic to detailed. The generic adapter must stand alone.\nExtensions should contain only the delta.\n\n**Slug convention — deterministic protocol linking:**\n\nEvery protocol gets a short, unique, lowercase-hyphenated `slug`.\n\n**Artifact workflow for adapters:**\n\nWhen protocol execution depends on scripts or config blobs, store them as\nartifacts linked to the adapter via `train` with:\n- `mime` set to a non-markdown content type\n- `artifact_name` set to a stable file name\n- `adapter_uri` set to the target adapter URI\n\nRetrieve attached artifacts with `export` using\n`kairos://artifact/{uuid}` when a step needs the raw content.\n\n**Protocol structure rules:**\n- H1: protocol title\n- First H2: Activation Patterns\n- Second H2: Preflight Dependencies\n- Middle H2s: one per step, each ending with a JSON contract block\n- Last H2: Reward Signal\n- Frontmatter: `slug` (required), `version` (optional), `chain_root` (required for mid-chain adapters — slug of the chain entry point)\n\n**Challenge types:**\n\nLoad `challenge-type-guide` for decision rules, JSON formats, and interpreter\nselection (`forward` with `kairos://adapter/challenge-type-guide`).\n\n**If Router pattern:** draft the router and each extension as separate files.\n\nPost the full drafted markdown.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":120},\"required\":true}}\n```\n\n## User Review\n\nFor `create`: present the drafted protocol(s) and ask for approval, changes, or\ncancellation.\n\nFor `review`: present the findings report and ask which findings to act on.\n\nFor `fix`: present the corrected adapter markdown and a summary of changes.\n\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"Approve the draft (create/fix) or acknowledge findings (review)\"},\"required\":true}}\n```\n\n## Finalise Operation\n\nFor `create`: call `train` with the approved markdown. Use `force_update: false`\nunless overwrite was explicitly requested.\n\nFor `review`: do not call `train`. Save the findings report only if requested.\n\nFor `fix`: call `train` with `force_update: true` and update the corresponding\nrepo file to keep the local copy in sync.\n\nReport the outcome: adapter URI(s) for create / fix, or findings summary for\nreview.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Reward Signal\n\nProtocol complete when:\n- `create` — adapter(s) stored via `train` and URI(s) reported\n- `review` — findings report delivered and acknowledged\n- `fix` — corrected adapter trained with `force_update: true` and repo file updated\n\nA successful result means the resulting KAIROS adapter is more truthful,\nphase-aware, agent-readable, and aligned with human–AI harmony.\n",
|
|
29
|
+
"refine-search": "---\nversion: \"4.3.1\"\nslug: refine-search\ntitle: Get help refining your search\n---\n\n\n\n# Get help refining your search\n\n**You are an AI agent.** You ran `activate` and got no solid match, or only weak\n/ ambiguous matches. This adapter helps you turn a vague request into a better\nquery so the next `activate` can find the right adapter.\n\nKAIROS principle: before acting, understand the user better. The goal is not to\nrepeat the failed phrase with minor edits. The goal is to recover the user's\nreal intent.\n\n## Activation Patterns\n\n**Run this adapter when:**\n- `activate` returned no match.\n- `activate` returned only weak choices.\n- The response included a `refine` choice.\n\n**Trigger pattern:** after `activate` when no strong match exists.\n\n**Must Never:**\n- Run when a strong match already exists.\n- Loop refinement endlessly.\n\n**Must Always:**\n- Infer the real goal, context, and missing constraints from the user's request.\n- Build a more specific query than the one that failed.\n- Run at most once per user request; if the second activation still fails, stop\n and offer clarification or protocol creation.\n\n**Good trigger examples:**\n- activate returned only \"refine\" / weak matches → run this adapter\n- \"No protocol matched 'do the thing'\" → run this adapter\n\n**Bad trigger examples:**\n- activate returned a strong match → use that match instead\n- user asked \"what adapters exist?\" → use `activate` / `spaces`, not this\n\n## Step 1: Extract what the user actually wants\n\nFrom the user's original message, identify:\n- the real goal\n- relevant context\n- missing constraints\n- likely wording that would help KAIROS find the right adapter\n\nWrite your analysis as the solution.\n\n```json\n{\n \"contract\": {\n \"type\": \"comment\",\n \"comment\": { \"min_length\": 60 },\n \"required\": true\n }\n}\n```\n\n## Step 2: Build and run a refined activate query\n\nUsing Step 1, construct one refined query with 3–8 specific words. Do not reuse\nthe vague phrase that already failed.\n\nCall `activate` with it.\n\n- **Strong match (score >= 0.5):** pick that choice and `forward`.\n- **Weak matches only:** ask the user to clarify or offer the create path.\n\nDo not loop more than once.\n\n```json\n{\n \"contract\": {\n \"type\": \"mcp\",\n \"mcp\": { \"tool_name\": \"activate\" },\n \"required\": true\n }\n}\n```\n\n## Reward Signal\n\nOnly reachable after all prior steps are solved.\n\nThe agent has converted a failed literal search into a more truthful,\nuser-aligned activation attempt.\n",
|
|
30
|
+
"create-new-protocol-review": "---\nversion: \"4.3.1\"\nslug: create-new-protocol-review\ntitle: Review and Publish New KAIROS Protocol\n---\n\n\n# Review and Publish New KAIROS Protocol\n\nValidate a drafted KAIROS protocol through format review, stranger review, user\napproval, and train. Invoked by the authoring adapter (`create-new-protocol`) or\ndirectly to re-review an existing draft.\n\n## Activation Patterns\n\n**Typically invoked by:** the authoring adapter's handoff step via\n`activate()` or a stored adapter URI.\n\n**Can be invoked directly when user says:**\n- \"review my protocol draft\" / \"validate this protocol\"\n- \"re-run format review on my draft\"\n- \"train my protocol\" / \"register my adapter\"\n\n**Trigger pattern:** **review** / **validate** / **train** + (protocol / draft).\n\n**Must Never:**\n- Run shell verification without verifying that all input file paths exist first.\n- Skip format or stranger review.\n- Approve a draft merely because it sounds polished.\n\n**Must Always:**\n- Verify all input file paths exist before proceeding (`test -f`).\n- Require both reviews to pass before presenting to the user.\n- Freeze the draft checksum before `train`.\n- Review for truth, phase clarity, ambiguity, and weaker-agent executability.\n\n**Good trigger examples:**\n- handoff from `create-new-protocol` → run this protocol\n- \"Review and train my protocol draft\" → run this protocol\n\n**Bad trigger examples:**\n- \"Create a new protocol\" → use `create-new-protocol`\n- \"Search for a protocol\" → use `activate`\n\n## Preflight Dependencies\n\nBefore running review/publish steps, verify prerequisites up front:\n\n1. Required MCP tools are reachable: `activate`, `forward`, `reward`, `train`.\n2. Required shell utilities used in this workflow are callable.\n3. Required authentication/session state is valid for MCP and SCM hosts.\n4. All input file paths provided by the parent agent exist (`test -f`).\n\nIf any dependency or auth check fails, stop and ask the user to choose either:\nproceed with AI-assisted setup or abort this run now.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":80},\"required\":true}}\n```\n\n## Prerequisites\n\nThis protocol receives all file paths as absolute paths from the invoking agent:\n\n- `$DRAFT_FILE` — the protocol draft to review (required)\n- `$REQUIREMENTS_FILE` — requirements document (optional)\n- `$FORMAT_REVIEW_FILE` — output path for format review verdict\n- `$STRANGER_REVIEW_FILE` — output path for stranger review verdict\n- `$DRAFT_CHECKSUM_FILE` — output path for the frozen checksum\n\nThe parent agent is responsible for choosing collision-free paths (e.g., under\n`$KAIROS_LOCAL_ARTIFACT_DIR` with a session-unique segment). This protocol only\nverifies paths exist via `test -f` and writes to the provided output paths.\n\nIf invoked directly, export the variables before proceeding.\n\n**Security:** never write credentials, tokens, or secrets into output files.\n\n## Format Review [SUBAGENT]\n\nDelegate format verification to a subagent. The subagent writes its verdict to\n`$FORMAT_REVIEW_FILE`.\n\n**Input:** `$DRAFT_FILE`\n\n**Subagent task:**\n1. Read the draft.\n2. Verify structure:\n - H1 present exactly once\n - first H2 is `Activation Patterns`\n - last H2 is `Reward Signal`\n - every middle H2 has a challenge block\n - no duplicate H2 headings\n3. Verify authoring quality:\n - explicit phase separation where relevant\n - no hidden assumptions\n - no vague filler such as \"as needed\" when a concrete instruction is required\n4. Verify challenge type selection using `challenge-type-guide`:\n - no `comment` challenges for steps that create files, call tools, or check state\n - `shell` challenges include `timeout_seconds`\n - shell chains use `&&`, not `;`\n5. Verify DRY, slug, and 350-line compliance.\n6. Write verdict to `$FORMAT_REVIEW_FILE`. First line MUST be\n `PASS` or `FAIL`. Remaining lines list concrete fixes.\n\n**Output:** `$FORMAT_REVIEW_FILE`\n\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"test -f \\\"$FORMAT_REVIEW_FILE\\\" && head -1 \\\"$FORMAT_REVIEW_FILE\\\" | grep -qi 'pass'\",\"timeout_seconds\":5},\"required\":true}}\n```\n\n## Stranger Review [SUBAGENT]\n\nDelegate executability review to a subagent with junior AI agent persona. The\nsubagent writes its verdict to `$STRANGER_REVIEW_FILE`.\n\n**Input:** `$DRAFT_FILE`\n\n**Subagent task:**\n1. Assume persona: junior AI agent, first time encountering KAIROS protocols.\n2. Mocked dry-run: walk every step in order and produce structurally correct\n challenge responses.\n3. Check:\n - can I execute this without guessing?\n - are phases clear?\n - do I know when to stop, ask, execute, verify, or escalate uncertainty?\n - are any variables or concepts undefined?\n4. Write verdict to `$STRANGER_REVIEW_FILE`. First line MUST be\n `PASS` or `FAIL`. If FAIL, include specific failing mocks and missing context.\n\n**Output:** `$STRANGER_REVIEW_FILE`\n\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"test -f \\\"$STRANGER_REVIEW_FILE\\\" && head -1 \\\"$STRANGER_REVIEW_FILE\\\" | grep -qi 'pass'\",\"timeout_seconds\":5},\"required\":true}}\n```\n\n## Checksum Freeze [SUBAGENT]\n\nFreeze the draft after both reviews pass.\n\n**Input:** `$DRAFT_FILE`\n\n**Actions:**\n1. Compute md5 checksum of the draft file.\n2. Write checksum to `$DRAFT_CHECKSUM_FILE`.\n\n**Output:** `$DRAFT_CHECKSUM_FILE`\n\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"md5 -q \\\"$DRAFT_FILE\\\" > \\\"$DRAFT_CHECKSUM_FILE\\\" && test -s \\\"$DRAFT_CHECKSUM_FILE\\\"\",\"timeout_seconds\":5},\"required\":true}}\n```\n\n## User Review [SUBAGENT]\n\nPresent the reviewed protocol to the user for final approval.\n\n**Input:** draft plus both review files\n\n**Actions:**\n1. Present full protocol markdown.\n2. Summarise pattern used, step count, challenge types, slug(s), and both review verdicts.\n3. Ask the user to approve, request changes, or cancel.\n\n**Output:** user approval, changes, or cancellation.\n\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"Review the protocol draft above. Type 'approved' to run train, describe adjustments, or 'cancel'.\"},\"required\":true}}\n```\n\n## Train adapter [SUBAGENT]\n\nVerify the draft is unchanged since checksum freeze, then call `train`.\n\n**Input:** approved `$DRAFT_FILE`\n\n**Actions:**\n1. Verify draft unchanged against checksum.\n2. Call `train` with `force_update: false` unless overwrite was explicitly requested.\n3. If router pattern: train router first, then extensions in order.\n4. Verify each `train` call returned a URI.\n5. Report stored adapter URI(s) back to the user.\n\n**Output:** confirmation with stored adapter URI(s)\n\n```json\n{\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"train\"},\"required\":true}}\n```\n\n## Reward Signal\n\nOnly reachable after all prior steps are solved.\n\nThe user now has a trained KAIROS adapter that passed:\n1. format review\n2. stranger review\n3. checksum verification\n4. user approval\n5. successful storage via `train`\n\nThe resulting adapter is more likely to be truthful, phase-aware, and usable by\nweaker agents.\n",
|
|
31
|
+
"challenge-type-guide": "---\nversion: \"4.3.1\"\nslug: challenge-type-guide\ntitle: Challenge Type Selection Guide\n---\n\n\n\n# Challenge Type Selection Guide\n\nDecision rules, JSON formats, interpreter selection, and anti-patterns for\nchoosing KAIROS challenge types. Loaded by protocol-authoring agents during\ndrafting and review.\n\n## Activation Patterns\n\n**Typically invoked by:** `create-new-protocol` and\n`create-new-protocol-review`.\n\n**Can be invoked directly when agent needs:**\n- \"challenge type reference\" / \"which challenge type to use\"\n- \"how to write shell challenges\" / \"challenge format\"\n- \"interpreter selection for challenges\"\n\n**Trigger pattern:** **challenge** + (type | format | selection | guide).\n\n**Must Never:**\n- Be used as an execution protocol.\n- Select `comment` merely because it is easy.\n\n**Must Always:**\n- Be consulted before assigning challenge types to protocol steps.\n- Choose the strongest observable contract available.\n- Match challenge choice to the mode of the step: ask, decide, act, verify, or review.\n\n**Good trigger examples:**\n- drafting a new protocol and need challenge types → load this\n- reviewing challenge type selection in a draft → load this\n\n**Bad trigger examples:**\n- \"Create a new protocol\" → use `create-new-protocol`\n- \"Review my protocol draft\" → use `create-new-protocol-review`\n\n## Core Rules\n\n`comment` is the challenge type of **last resort**. If a step produces any\nobservable artifact — a file, a git state change, an API response, or an exit\ncode — use `shell` or `mcp` instead.\n\n**Mode before challenge type:**\n- **clarify / approve** → `user_input`\n- **call a KAIROS / MCP tool** → `mcp`\n- **execute or verify local state** → `shell`\n- **pure reasoning with no observable artifact** → `comment`\n\n### Decision Tree\n\n```\nDoes the step call an MCP tool?\n ├─ YES → Is the step a chain link to another adapter?\n │ ├─ YES → \"mcp\" with tool_name + arguments (forward + slug URI)\n │ └─ NO → \"mcp\" with tool_name only\n └─ NO → Does the step produce or verify a file, command result, or system state?\n ├─ YES → \"shell\"\n └─ NO → Does the step require human approval or choice?\n ├─ YES → \"user_input\"\n └─ NO → \"comment\" only if there is no stronger observable contract\n```\n\n### Challenge JSON Formats\n\n**shell**\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"<command>\",\"timeout_seconds\":30},\"required\":true}}\n```\n\n**mcp**\n```json\n{\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"<tool>\"},\"required\":true}}\n```\n\n**mcp with arguments (chain link)**\n```json\n{\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"forward\",\"arguments\":{\"uri\":\"kairos://adapter/<slug>\"}},\"required\":true}}\n```\n\nUse the `arguments` form when the step's purpose is to invoke a specific\nadapter via `forward`. The server validates that `solution.mcp.arguments`\nis a superset of the contract's `mcp.arguments` (subset/deep matching),\nproving the agent called the correct target — not just any `forward` call.\n\n**user_input**\n```json\n{\"contract\":{\"type\":\"user_input\",\"user_input\":{\"prompt\":\"<specific question>\"},\"required\":true}}\n```\n\n**comment**\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":50},\"required\":true}}\n```\n\n## Interpreter Selection\n\n| Task | Use bash | Use perl | Use python3 |\n|---|---|---|---|\n| File exists, tool installed, git state | yes | no | no |\n| Simple content grep | yes | no | no |\n| Multi-line regex | no | yes | no |\n| Paragraph processing | no | yes | no |\n| JSON validation | maybe | yes | yes |\n| YAML / complex data structure checks | no | no | yes |\n\n**Rule of thumb:** if bash requires `while read`, `grep | awk`, or heavy quote\nescaping, rewrite in Perl. If you need imports for data formats, use Python.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## Security and Working Directory Rules\n\nUse `$KAIROS_LOCAL_ARTIFACT_DIR` as the base directory for local handoff\nartifacts. File paths within it are provided as variables by the invoking agent\nto avoid collisions between parallel sessions.\n\n**Rules:**\n- all file paths in shell challenges reference variables (e.g., `$DRAFT_FILE`,\n `$VERDICT_FILE`) set by the parent agent — never hardcode filenames\n- the parent agent constructs collision-free paths under\n `$KAIROS_LOCAL_ARTIFACT_DIR` (e.g., with a session ID or random suffix)\n- when using KAIROS MCP, the latest `activate` / `forward` / `next` response field `kairos_local_artifact_dir` is an ordered array of URI hints (`project://<rel>`, `user://<rel>`); pick one (`project://` when you have exactly one project context, otherwise `user://`), resolve on your machine, and `export KAIROS_LOCAL_ARTIFACT_DIR=\"<absolute>\"` if your shell does not already define it\n- if the server-returned path is not usable on your local filesystem, resolve\n locally to `$PROJECT_DIR/.local/kairos/work` and keep it stable for the run\n- prerequisites create the directory\n- Reward Signal cleans it up\n- never write credentials or secrets to files\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## Composition Patterns\n\n**Multi-check compound command**\n- chain with `&&`\n- let the first failure stop execution\n\n**Freeze-then-verify**\n- step N writes checksum\n- step N+1 verifies checksum before publish\n\n**Write-then-grep**\n- subagent writes a verdict file\n- main agent checks the first line for `PASS`\n\n**Phase-batch with critic**\n- batch related TODO items into one phase\n- verify hard artifacts with shell\n- then call `phase-critic` for adversarial review\n\n**Dry-run before execution**\n- dry-run command\n- human review\n- real command\n\n**Chain-link via forward + slug**\n- layer N's contract requires `forward` with a specific adapter slug\n- agent calls `forward` to start the next adapter (new `execution_id`)\n- next adapter runs its own layer chain through to `reward`\n- use when the protocol exceeds 350 lines or needs multi-path routing\n- NOT a replacement for layers — layers remain the primary unit of work\n- example contract:\n ```json\n {\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"forward\",\"arguments\":{\"uri\":\"kairos://adapter/implement-plan\"}},\"required\":true}}\n ```\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## Reward Signal\n\nOnly reachable after all prior steps are solved.\n\nThe agent can now:\n1. pick the correct challenge type for each protocol step\n2. match challenge type to the step's mode\n3. choose the right interpreter\n4. apply working-directory and security rules\n5. use stronger verification patterns instead of weak narrative checks\n",
|
|
32
|
+
"phase-critic": "---\nversion: \"4.3.1\"\nslug: phase-critic\ntitle: Phase Critic\n---\n\n\n\n# Phase Critic\n\nBounded adversarial investigator fired at phase boundaries. Receives a reference\ndocument, loads the calling protocol's invariants, and independently verifies\nthe verification target by extracting claims, gathering evidence, and searching\nfor contradictions.\n\n## Activation Patterns\n\n**Typically invoked by:** another protocol at the end of a plan, implement,\nvalidation, or review phase via `forward` with the stored adapter URI\n`kairos://adapter/phase-critic`.\n\n**Can be invoked directly when agent needs:**\n- \"review phase output\" / \"verify plan\" / \"audit implementation\"\n- \"adversarial review\" / \"critic review\"\n\n**Trigger pattern:** **review** / **verify** / **audit** / **critic** +\n(phase / plan / implementation / output).\n\n**Must Never:**\n- Modify any file outside the provided input and output paths.\n- Trust the executor's assertions without independent evidence.\n- Classify a claim as `verified` based only on absence of contradiction.\n- Keep investigating after a precondition failure that blocks verification.\n\n**Must Always:**\n- Extract claims before investigating.\n- Verify in-scope claims first.\n- Search for contradictory evidence, not only confirming evidence.\n- Include confidence in every verdict and failure class in every FAIL verdict.\n- Preserve the boundary between execution and review.\n\n**Good trigger examples:**\n- implement protocol fires this after planning → run this protocol\n- compose protocol fires this after output generation → run this protocol\n\n**Bad trigger examples:**\n- \"Create a new protocol\" → use `create-new-protocol`\n- \"Implement a feature\" → use an execution protocol, not this one\n\n## Artifact Contract\n\nThis protocol receives:\n\n```text\n{\n input_file: string, // absolute path to the document under review\n calling_protocol_slug: string,\n verification_target: string,\n context: {\n operation: string,\n verdict_file: string // absolute path where the verdict will be written\n }\n}\n```\n\nThis protocol produces:\n\n```text\n{\n verdict: \"PASS\" | \"FAIL\",\n confidence: \"High\" | \"Medium\" | \"Low\",\n failure_class: string,\n verdict_file: \"{context.verdict_file}\"\n}\n```\n\n## Precondition Check [SUBAGENT]\n\nVerify foundational preconditions before deep investigation. Early-abort if any\nare broken.\n\n**Input:** `$INPUT_FILE` (absolute path), calling protocol slug, context\n\n**Actions:**\n1. Verify the input file exists: `test -f \"$INPUT_FILE\"`.\n2. Verify the verdict output path is writable (parent directory exists).\n3. Load the calling protocol's Must Never / Must Always sections if possible.\n4. Verify the target state is available for review.\n5. Verify required tools are available.\n\n**On early-abort:**\n- verdict = `FAIL`\n- failure class = `verification_blocked`\n- confidence = `Low`\n- write focused diagnostics\n- skip all later steps\n\n**Output:** verified preconditions or early-abort diagnostics\n\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"test -f \\\"$INPUT_FILE\\\"\",\"timeout_seconds\":3},\"required\":true}}\n```\n\n## Audit [SUBAGENT]\n\nPerform bounded adversarial review of the target against the reference document\nand invariants.\n\n**Input:** reference document, invariants, verification target, context\n\n**Actions:**\n\n**Step 1 — Extract claims**\nExtract every verifiable claim that matters operationally:\n- workflows, commands, tool calls\n- configuration and environment variable claims\n- architecture claims that imply behaviour\n- guarantees and constraints\n- security, auth, and permission claims\n\n**Step 2 — Investigate with scope discipline**\n1. verify all in-scope claims first\n2. review high-risk claims with maximum depth\n3. expand beyond scope only when contradiction signals, dependencies, or\n high-risk impact require it\n4. continue reviewing all in-scope claims even after a normal FAIL condition is met;\n only a precondition failure stops the audit early\n\n**High-risk areas**\n- setup steps and prerequisites\n- CLI commands and flags\n- configuration keys and environment variables\n- authentication, identity, and permissions\n- deployment and release behaviour\n- external publishing actions\n- destructive or irreversible operations\n\n**Step 3 — Gather evidence using the hierarchy**\n\n| Priority | Evidence source |\n|---|---|\n| 1 | source code, config files, schemas, route definitions |\n| 2 | direct runtime verification |\n| 3 | tests |\n| 4 | MCP-queried system state |\n| 5 | external docs, web pages, linked references |\n| 6 | conversational assumption or indirect inference |\n\n**Rules:**\n- higher-priority evidence overrides lower-priority evidence\n- priority 5–6 alone is not enough for `verified`\n\n**Step 4 — Produce claim verdicts**\n\nFor each claim, record:\n- CLAIM\n- EVIDENCE\n- EVIDENCE PRIORITY\n- VERDICT: `verified` / `partially_verified` / `unverifiable` / `incorrect`\n\nA claim must not be marked `verified` without positive supporting evidence.\n\n**Step 5 — Review the phase boundary**\nCheck whether the calling protocol preserved the right mode boundary:\n- was execution reviewed independently?\n- were review and execution kept separate?\n- did the protocol switch to verification when it should have?\n- is escalation needed because certainty was overstated?\n\n**Output:** structured audit findings for the verdict step\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":120},\"required\":true}}\n```\n\n## Verdict [SUBAGENT]\n\nTurn the audit into a final PASS / FAIL result.\n\n**Input:** audit findings and verdict file path from context (use it as\n`$VERDICT_FILE`)\n\n**Actions:**\n1. Fail if any critical claim is incorrect.\n2. Fail if verification was blocked.\n3. Fail if the evidence base is too weak for high-risk claims.\n4. Otherwise, pass with the appropriate confidence.\n5. Write `$VERDICT_FILE` so line 1 is `PASS` or `FAIL`,\n line 2 is `High`, `Medium`, or `Low`, and the remaining lines summarise key\n findings.\n\n**Output:** final verdict file\n\n```json\n{\"contract\":{\"type\":\"shell\",\"shell\":{\"cmd\":\"test -f \\\"$VERDICT_FILE\\\" && head -1 \\\"$VERDICT_FILE\\\" | grep -qiE '^(PASS|FAIL)$' && sed -n '2p' \\\"$VERDICT_FILE\\\" | grep -qiE '^(High|Medium|Low)$'\",\"timeout_seconds\":5},\"required\":true}}\n```\n\n## Reward Signal\n\nOnly reachable after all prior steps are solved.\n\nThe phase output has been independently challenged. The resulting verdict is more\ntruthful because it is based on extracted claims, explicit evidence, contradiction\nsearch, and a clean boundary between execution and review.\n",
|
|
33
|
+
"protocol-linking-guide": "---\nversion: \"4.3.1\"\nslug: protocol-linking-guide\ntitle: Protocol Linking Guide\n---\n\n\n\n# Protocol Linking Guide\n\nDecision rules for structuring adapter relationships: layers vs chains,\n`activate` vs `forward` + slug, chain-root collapsing, and MCP argument\nvalidation for deterministic cross-protocol linking.\n\n## Activation Patterns\n\n**Typically invoked by:** `create-new-protocol` and\n`create-new-protocol-review`.\n\n**Can be invoked directly when agent needs:**\n- \"layers vs chains\" / \"when to split into multiple adapters\"\n- \"how to link adapters\" / \"cross-protocol linking\"\n- \"activate vs forward\" / \"when to use forward with slug\"\n- \"chain-root collapsing\" / \"how chain_root works\"\n\n**Trigger pattern:** **layers** / **chains** / **linking** / **forward** +\n(slug | adapter | protocol).\n\n**Must Never:**\n- Be used as an execution protocol.\n- Recommend chaining when layers suffice.\n\n**Must Always:**\n- Be consulted before splitting a protocol into multiple adapters.\n- Be consulted before adding `forward` calls or `chain_root` frontmatter.\n\n**Good trigger examples:**\n- \"my protocol is 400 lines, should I split?\" → load this\n- \"how do I link adapter A to adapter B?\" → load this\n- \"what is chain_root?\" → load this\n\n**Bad trigger examples:**\n- \"which challenge type for this step?\" → use `challenge-type-guide`\n- \"create a new protocol\" → use `create-new-protocol`\n\n## Layers vs Chains\n\n**Layers** (H2 steps within one adapter) are the preferred unit of work. Use\nlayers when all steps fit in one adapter under 350 lines and serve a single\ncohesive concern.\n\n**Chain via `forward` + slug** — use only when:\n- the adapter exceeds 350 lines\n- weaker models cannot follow the full adapter in one pass\n- runtime routing to different adapters is needed (Router pattern)\n- a step is reusable across multiple parent adapters (e.g. `phase-critic`)\n\nChaining is NOT a replacement for layers. A 6-step protocol that fits in 350\nlines should stay as one adapter with 6 H2 layers.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## `activate` vs `forward` + slug\n\n| Situation | Use |\n|---|---|\n| Initial user-intent resolution | `activate` |\n| Target adapter is known at authoring time | `forward` + slug |\n| Target depends on runtime classification the current adapter cannot resolve | `activate` |\n| Linking to the next adapter in a chain | `forward` + slug |\n| Reusable sub-protocol invoked by multiple parents | `forward` + slug |\n\nNever call `activate` just to get a slug you already know — it wastes a\nround-trip and introduces non-determinism.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## System adapters vs user adapters\n\nBoth system and user-authored adapters chain using slugs in `next_action`:\n\n```text\ncall forward with kairos://adapter/phase-critic ...\ncall forward with kairos://adapter/implement-terraform ...\n```\n\nSlugs are globally unique (enforced by `train`), so resolution is\ndeterministic — no scoring, no ambiguity.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## MCP argument validation for chain links\n\nA bare `mcp` contract checks only the tool name:\n\n```json\n{\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"forward\"},\"required\":true}}\n```\n\nAn `mcp` contract **with `arguments`** verifies the exact target:\n\n```json\n{\"contract\":{\"type\":\"mcp\",\"mcp\":{\"tool_name\":\"forward\",\"arguments\":{\"uri\":\"kairos://adapter/code-review-policy\"}},\"required\":true}}\n```\n\nThe server validates that `solution.mcp.arguments` is a superset of the\ncontract's `mcp.arguments` (subset/deep matching). This proves the agent\ncalled `forward` with the correct slug, not just any `forward` call.\n\nUse the `arguments` form whenever a step's purpose is to invoke a specific\nknown adapter.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## Chain-root collapsing\n\nWhen a chain has multiple adapters, `activate` might match a mid-chain adapter\ndirectly. Without protection, the agent would start at the wrong step, missing\nprerequisite context gathered by earlier phases.\n\n**`chain_root` frontmatter field** solves this at the server level. Add it to\nevery mid-chain adapter:\n\n```yaml\n---\nslug: implement-plan\nversion: 1.0.0\nchain_root: implement\n---\n```\n\n**Server behaviour:** When `activate` returns a match that has `chain_root`,\nthe server resolves the slug to the root adapter's URI and replaces the\nchoice's `uri` and `next_action` to point there. Multiple mid-chain matches\nfrom the same chain are deduplicated to a single entry. The agent always\nstarts at the chain entry point.\n\n**Defense in depth — protocol-level safeguards:** Each mid-chain adapter\nshould include a **Prerequisites** paragraph in its Activation Patterns\nlisting inputs required from earlier phases and directing the agent to start\nfrom the chain root if those inputs are missing. This catches direct `forward`\ncalls that bypass `activate`.\n\n**Rules:**\n- The chain root adapter must NOT have `chain_root` in its frontmatter.\n- `chain_root` must refer to an existing slug (the chain entry point).\n- `forward` calls within a chain are unaffected — `chain_root` only changes\n `activate` output routing.\n\n```json\n{\"contract\":{\"type\":\"comment\",\"comment\":{\"min_length\":30},\"required\":true}}\n```\n\n## Reward Signal\n\nOnly reachable after all prior steps are solved.\n\nThe agent can now:\n1. decide when to use layers vs chains\n2. choose `activate` vs `forward` + slug correctly\n3. use slug-based linking for all adapters (system and user)\n4. apply MCP argument validation for deterministic chain links\n5. implement `chain_root` collapsing with defense-in-depth safeguards\n"
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
@@ -30,6 +30,7 @@ export declare class ExecutionTraceStore {
|
|
|
30
30
|
private readonly executionsDir;
|
|
31
31
|
private readonly adaptersDir;
|
|
32
32
|
private initPromise;
|
|
33
|
+
private atomicWriteDirPromise;
|
|
33
34
|
private readonly mutationChains;
|
|
34
35
|
constructor(rootDir?: string);
|
|
35
36
|
private ensureReady;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-trace-store.d.ts","sourceRoot":"","sources":["../../src/services/execution-trace-store.ts"],"names":[],"mappings":"AAGA,OAAO,KA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B,qBAAqB;YAIrB,mBAAmB;YAInB,gBAAgB;YAQhB,iBAAiB;IAoBzB,cAAc,CAAC,MAAM,EAAE;QAC3B,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBX,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCjD,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnE,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IAYvE,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAK3D,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,GAAE,OAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAmCvG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAuC1D;AACD,eAAO,MAAM,mBAAmB,qBAA4B,CAAC"}
|
|
@@ -13,6 +13,7 @@ export class ExecutionTraceStore {
|
|
|
13
13
|
executionsDir;
|
|
14
14
|
adaptersDir;
|
|
15
15
|
initPromise = null;
|
|
16
|
+
atomicWriteDirPromise = null;
|
|
16
17
|
mutationChains = new Map();
|
|
17
18
|
constructor(rootDir = KAIROS_TRACE_STORE_DIR) {
|
|
18
19
|
this.executionsDir = path.join(rootDir, 'executions');
|
|
@@ -21,8 +22,8 @@ export class ExecutionTraceStore {
|
|
|
21
22
|
async ensureReady() {
|
|
22
23
|
if (!this.initPromise) {
|
|
23
24
|
this.initPromise = Promise.all([
|
|
24
|
-
fs.mkdir(this.executionsDir, { recursive: true }),
|
|
25
|
-
fs.mkdir(this.adaptersDir, { recursive: true })
|
|
25
|
+
fs.mkdir(this.executionsDir, { recursive: true, mode: 0o700 }),
|
|
26
|
+
fs.mkdir(this.adaptersDir, { recursive: true, mode: 0o700 })
|
|
26
27
|
]).then(() => undefined);
|
|
27
28
|
}
|
|
28
29
|
await this.initPromise;
|
|
@@ -49,10 +50,14 @@ export class ExecutionTraceStore {
|
|
|
49
50
|
}
|
|
50
51
|
async writeJsonFile(filePath, value) {
|
|
51
52
|
await this.ensureReady();
|
|
52
|
-
|
|
53
|
+
if (!this.atomicWriteDirPromise) {
|
|
54
|
+
this.atomicWriteDirPromise = fs.mkdtemp(path.join(this.executionsDir, 'write-'));
|
|
55
|
+
}
|
|
56
|
+
const atomicDir = await this.atomicWriteDirPromise;
|
|
57
|
+
const tempFile = path.join(atomicDir, `${crypto.randomUUID()}.tmp`);
|
|
53
58
|
const serialized = JSON.stringify(value, null, 2);
|
|
54
59
|
try {
|
|
55
|
-
const handle = await fs.open(tempFile, '
|
|
60
|
+
const handle = await fs.open(tempFile, 'wx');
|
|
56
61
|
try {
|
|
57
62
|
await handle.writeFile(serialized, 'utf8');
|
|
58
63
|
await handle.sync();
|
|
@@ -61,13 +66,6 @@ export class ExecutionTraceStore {
|
|
|
61
66
|
await handle.close();
|
|
62
67
|
}
|
|
63
68
|
await fs.rename(tempFile, filePath);
|
|
64
|
-
const dirHandle = await fs.open(path.dirname(filePath), 'r');
|
|
65
|
-
try {
|
|
66
|
-
await dirHandle.sync();
|
|
67
|
-
}
|
|
68
|
-
finally {
|
|
69
|
-
await dirHandle.close();
|
|
70
|
-
}
|
|
71
69
|
}
|
|
72
70
|
catch (error) {
|
|
73
71
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-trace-store.js","sourceRoot":"","sources":["../../src/services/execution-trace-store.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,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,CAAC,CAAC;wBACpE,MAAM,IAAI,CAAC,iBAAiB,CAC1B,MAAM,CAAC,UAAU,EACjB,YAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,CAC9D,CAAC;oBACJ,CAAC;oBACD,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC;gBACnD,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;wBACvD,MAAM,CAAC,IAAI,CACT,oDAAoD,WAAW,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7H,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AACD,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,y as t}from"./vendor-DflEx1D6.js";import{t as n}from"./react-nnqwRscp.js";import{n as r,r as i,t as a}from"./index-
|
|
1
|
+
import{g as e,y as t}from"./vendor-DflEx1D6.js";import{t as n}from"./react-nnqwRscp.js";import{n as r,r as i,t as a}from"./index-CXdhttVl.js";import{t as o}from"./api-D88c6lbH.js";async function s(){let e=await o(`/api/me`);if(!e.ok){let t=await e.json().catch(()=>({})),n=Error(t.message??e.statusText);throw n.statusCode=e.status,n}return e.json()}function c(){return e({queryKey:[`me`],queryFn:s,retry:!1})}var l=n(),u={light:`account.themeOptionLight`,dark:`account.themeOptionDark`};function d(e){if(e.name&&e.name.trim().length>0)return e.name;let t=[e.given_name,e.family_name].filter(e=>typeof e==`string`&&e.trim().length>0);return t.length>0?t.join(` `):e.preferred_username&&e.preferred_username.length>0?e.preferred_username:e.sub}function f(){let{t:e}=t(),{data:n,isLoading:o,isError:s}=c(),{preference:f,setPreference:p}=i();return o?(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.loading`)}):s||!n?(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-4`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`account.notSignedIn`)}),(0,l.jsx)(`a`,{href:`/auth/callback`,className:`mt-4 min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.signIn`)})]}):(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-6`,children:e(`account.title`)}),(0,l.jsx)(`p`,{className:`text-[var(--color-text-muted)] mb-6`,children:e(`account.intro`)}),(0,l.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-6`,children:[(0,l.jsxs)(`div`,{className:`mb-6 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,l.jsx)(`h2`,{className:`mb-1 text-base font-semibold text-[var(--color-text-heading)]`,children:e(`account.themeTitle`)}),(0,l.jsx)(`p`,{className:`mb-3 text-sm text-[var(--color-text-muted)]`,children:e(`account.themeDescription`)}),(0,l.jsx)(`label`,{htmlFor:`account-theme-preference`,className:`sr-only`,children:e(`account.themePreferenceLabel`)}),(0,l.jsxs)(`select`,{id:`account-theme-preference`,value:f,onChange:e=>{let t=e.target.value;r(t)&&p(t)},className:`min-h-[44px] w-full max-w-xs rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2 text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:[(0,l.jsx)(`option`,{value:`system`,children:e(`account.themeOptionSystem`)}),a.map(t=>(0,l.jsx)(`option`,{value:t,children:e(u[t])},t))]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.name`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:d(n)})]}),n.preferred_username&&n.preferred_username!==d(n)&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.username`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.preferred_username})]}),n.email&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.email`)}),(0,l.jsxs)(`span`,{className:`text-[var(--color-text-heading)]`,children:[n.email,n.email_verified===!0?` (${e(`account.emailVerified`)})`:``]})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.accountType`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.account_label})]}),(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.realm`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.realm})]}),n.identity_provider&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.identityProvider`)}),(0,l.jsx)(`span`,{className:`text-[var(--color-text-heading)]`,children:n.identity_provider})]}),n.groups.length>0&&(0,l.jsxs)(`div`,{className:`mb-4`,children:[(0,l.jsx)(`span`,{className:`block text-xs uppercase tracking-wider text-[var(--color-text-muted)] mb-1`,children:e(`account.groups`)}),(0,l.jsx)(`ul`,{className:`list-disc list-inside text-[var(--color-text-heading)] space-y-1`,children:n.groups.map(e=>(0,l.jsx)(`li`,{children:e},e))})]}),(0,l.jsx)(`div`,{className:`mt-6 flex gap-2 flex-wrap`,children:(0,l.jsx)(`a`,{href:`/auth/logout`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] text-[var(--color-text)] bg-transparent no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`account.logOut`)})})]})]})}export{f as AccountPage};
|