@vpxa/aikit 0.1.274 → 0.1.276
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/package.json +7 -1
- package/packages/cli/dist/index.js +14 -14
- package/packages/cli/dist/init-jjI8OFjT.js +7 -0
- package/packages/cli/dist/{scaffold-Cxjwg531.js → scaffold-BNPHP-QC.js} +1 -1
- package/packages/cli/dist/{templates-C92mODRl.js → templates-CDa0UuoE.js} +19 -19
- package/packages/core/dist/index.d.ts +45 -17
- package/packages/core/dist/index.js +1 -1
- package/packages/flows/dist/index.d.ts +23 -2
- package/packages/flows/dist/index.js +1 -1
- package/packages/server/dist/bin.js +6 -6
- package/packages/server/dist/config-DZ-6Zy94.js +2 -0
- package/packages/server/dist/config-DxWyWSb9.js +1 -0
- package/packages/server/dist/curated-manager-C5uOPept.js +7 -0
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/{promotion-BNEScZVD.js → promotion-D9anNXv8.js} +1 -1
- package/packages/server/dist/{routes-CR3fI-HJ.js → routes-1wkXLxXe.js} +1 -1
- package/packages/server/dist/{routes-Afg7J7xK.js → routes-KC-D2U8n.js} +1 -1
- package/packages/server/dist/{server-4h0Cclv3.js → server-CkCRBlz4.js} +93 -93
- package/packages/server/dist/{server-DIz2FGOX.js → server-DlE6A6sd.js} +93 -93
- package/packages/server/dist/{version-check-gazMo-D4.js → version-check-CgfflkJX.js} +1 -1
- package/packages/server/dist/{version-check-BgHzxxCW.js → version-check-ruLtfyDd.js} +1 -1
- package/packages/server/viewers/canvas.html +2 -1
- package/packages/server/viewers/task-plan-static.html +2 -1
- package/packages/tools/dist/index.d.ts +5 -5
- package/packages/tools/dist/index.js +72 -72
- package/scaffold/dist/adapters/opencode.mjs +9 -0
- package/scaffold/dist/definitions/hooks.mjs +1 -1
- package/scaffold/dist/definitions/skills/c4-architecture.mjs +1 -1
- package/scaffold/dist/definitions/skills/session-handoff.mjs +2 -732
- package/packages/cli/dist/init-BgelSos0.js +0 -7
- package/packages/server/dist/config-CZuVxRpX.js +0 -1
- package/packages/server/dist/config-WpN5CWM7.js +0 -2
- package/packages/server/dist/curated-manager-CfwN96rp.js +0 -7
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{HOOKS as n}from"../definitions/hooks.mjs";import{MCP_SERVER_ENTRY as r,SERVER_NAME as i}from"../definitions/mcp.mjs";import{PROMPTS as a}from"../definitions/prompts.mjs";import{PROTOCOLS as o}from"../definitions/protocols.mjs";import{buildAgentTable as s,buildCompactAgentTable as c,buildHooksSection as l,buildPromptSections as u,buildSkillsSection as d,lowerFirst as f}from"./_shared.mjs";const p=[`## Flows`,``,"This project uses aikit's pluggable flow system. Check flow status with the `flow` MCP tool.","If a flow is active, follow the current step's skill instructions. Advance with `flow({ action: 'step', advance: 'next' })`.","Use `flow({ action: 'list' })` to see available flows and `flow({ action: 'start', name, topic })` to begin one."].join(`
|
|
2
|
+
`),m=[`## Flows`,``,"This project uses aikit's pluggable flow system. Use `flow({ action: 'status' })` to check if a flow is active.",`If dispatched as part of a flow, your work contributes to the current step. Do NOT advance or manage the flow — the Orchestrator handles flow lifecycle.`].join(`
|
|
3
|
+
`);function h(e,n){let r=t[e];return typeof r==`function`?r(n):r||``}function g(e){let t=[];e.extraBody&&t.push(e.extraBody),e.sharedBase&&o[e.sharedBase]&&t.push(o[e.sharedBase]);for(let n of e.sharedProtocols||[])o[n]&&t.push(o[n]);return t}function _(){let t=[];for(let[n,r]of Object.entries(e)){if(r.variants){for(let[e,i]of Object.entries(r.variants))t.push({name:`${n}-${e}`,description:i.description||r.description});continue}t.push({name:n,description:r.description})}return t}function v(e){return _().map(({name:t,description:n})=>`- \`${e}/${t}.md\` — ${n}`).join(`
|
|
4
|
+
`)}function y(e,t,n){let r=g(t),i=d(t.skills),a=e===`Orchestrator`?p:m,o=[n,...r,t.bodyAddendum,i,a].filter(Boolean).join(`
|
|
5
|
+
|
|
6
|
+
`).trim();return[`# ${e} - ${t.title||e}`,``,`> ${t.description}`,``,t.identity?`You are the **${e}**${t.identity}`:`You are the **${e}**, ${f(t.description)}.`,...o?[``,o]:[],``].join(`
|
|
7
|
+
`)}function b(){return[`# aikit — OpenCode Agents`,``,"This workspace keeps the root `OPENCODE.md` intentionally small. Full agent instructions are split into per-agent files under `.opencode/agents/`.",``,`## MCP Server`,``,"Server name: `aikit`","Configure in `.opencode/opencode.json` (already done if scaffold was deployed).",``,`## Agents`,``,s(e),``,`## Agent Files`,``,v(`.opencode/agents`),``,`## Prompts`,``,u(a),``,`## Session Protocol`,``,l(n),``].join(`
|
|
8
|
+
`)}function x(){return[`# aikit — OpenCode Instructions`,``,"Detailed workspace instructions live in `OPENCODE.md`.","Per-agent instructions are emitted under `.opencode/agents/`.","MCP server config lives in `.opencode/opencode.json`.",``,"Start with `OPENCODE.md`, then open the specific agent file you want to use.",``].join(`
|
|
9
|
+
`)}function S(e,t){let{type:n,...r}=t;return JSON.stringify({mcp:{[e]:{type:`local`,command:[r.command,...r.args]}}},null,2)}function C(){let t=[{path:`.opencode/opencode.json`,content:`${S(i,r)}\n`},{path:`OPENCODE.md`,content:x()},{path:`AGENTS.md`,content:b()}],n=c(e);for(let[r,i]of Object.entries(e)){let e=h(r,n);if(i.variants){for(let[n,a]of Object.entries(i.variants)){let o=`${r}-${n}`;t.push({path:`.opencode/agents/${o}.md`,content:y(o,{...i,description:a.description||i.description,identity:a.identity,bodyAddendum:a.bodyAddendum},e)})}continue}t.push({path:`.opencode/agents/${r}.md`,content:y(r,i,e)})}return t}export{C as generateOpencode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={sessionStart:{description:`Run at the start of every agent session`,actions:[`status({})`,`knowledge({ action: "list" })`,`search({ query: "SESSION CHECKPOINT", origin: "curated" })`],rationale:`Resume prior work, load existing knowledge`},sessionEnd:{description:`Run at the end of every agent session with context-pressure-aware handoff behavior`,actions:["Check context pressure from the last `status({})` response before writing the checkpoint","If `contextPressure > 70` and a flow is active: load the `session-handoff` skill",'Create compact handoff: `knowledge({ action: "remember", scope: "flow", category: "session", title: "Session Handoff: <flow-topic>", content: "<compact format: State + Decisions + Next Steps + Blockers + Assumptions>" })`'
|
|
1
|
+
const e={sessionStart:{description:`Run at the start of every agent session`,actions:[`status({})`,`knowledge({ action: "list" })`,`search({ query: "SESSION CHECKPOINT", origin: "curated" })`],rationale:`Resume prior work, load existing knowledge`},sessionEnd:{description:`Run at the end of every agent session with context-pressure-aware handoff behavior`,actions:["Check context pressure from the last `status({})` response before writing the checkpoint","If `contextPressure > 70` and a flow is active: load the `session-handoff` skill",'Create compact handoff: `knowledge({ action: "remember", scope: "flow", category: "session", title: "Session Handoff: <flow-topic>", content: "<compact format: State + Decisions + Next Steps + Blockers + Assumptions>" })`',`Keep flow state in .flows/ only; write the full handoff file to ~/.aikit/workspaces/<workspace-hash>/handoffs/ using the skill's create protocol`,"If `contextPressure > 85`: this handoff is MANDATORY before ending the session, and present the handoff summary to the user for confirmation",'If `contextPressure <= 70` or no flow is active: use the standard session checkpoint `knowledge({ action: "remember", title: "Session checkpoint: <topic>", content: "Done: ... / Decisions: ... / Next: ...", category: "session" })`'],rationale:`Persist decisions for future sessions and prevent context loss when pressure is high`},beforeCodeChange:{description:`Run before modifying any code`,actions:[`search({ query: "<what you are changing>" })`,`scope_map({ task: "<description>" })`],rationale:`Check for prior decisions and understand impact`},beforeCommit:{description:`Run before committing changes`,actions:[`check({})`,`test_run({})`,`blast_radius({ changed_files: ["..."] })`],rationale:`Validate changes before they enter version control`}};export{e as HOOKS};
|