@vpxa/aikit 0.1.273 → 0.1.275
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-DCs4TWh6.js → init-B3a2fygD.js} +1 -1
- package/packages/cli/dist/scaffold-BNPHP-QC.js +2 -0
- 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/copilot.mjs +19 -19
- 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/scaffold-BnhmnBfn.js +0 -2
- 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
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{VARIANT_GROUPS as n,
|
|
2
|
-
`),
|
|
3
|
-
`);function
|
|
4
|
-
`)}`}function
|
|
5
|
-
`)}`:``,
|
|
6
|
-
description: '${
|
|
7
|
-
${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${
|
|
1
|
+
import{AGENTS as e}from"../definitions/agents.mjs";import{AGENT_BODIES as t}from"../definitions/bodies.mjs";import{VARIANT_GROUPS as n,getPrimaryAgentModel as r}from"../definitions/models.mjs";import{PROMPTS as i}from"../definitions/prompts.mjs";import{AIKIT_INSTALL_HINT_SECTION as a,PLATFORM_OUTPUT_RULES_SECTION as o,PROTOCOLS as s,TEMPLATES as c}from"../definitions/protocols.mjs";import{IDE_CAPABILITIES as l}from"../definitions/tools.mjs";import{buildCompactAgentTable as u}from"./_shared.mjs";import{generateHooks as d,getHookScriptFiles as f}from"./hooks.mjs";const p={terminal:`execute/runInTerminal`,problems:`read/problems`,readFile:`read/readFile`,lastCommand:`read/terminalLastCommand`,subagent:`agent/runSubagent`,createFile:`edit/createFile`,editFiles:`edit/editFiles`,rename:`edit/rename`,createDirectory:`edit/createDirectory`,search:`search/changes, search/codebase, search/usages`,web:`web/fetch, web/githubRepo`,todo:`todo`,memory:`vscode/memory`,newWorkspace:`vscode/newWorkspace`,reviewPlan:`vscode/reviewPlan`,askQuestions:`vscode/askQuestions`,resolveMemoryFileUri:`vscode/resolveMemoryFileUri`,runCommand:`vscode/runCommand`,switchAgent:`vscode/switchAgent`,killTerminal:`execute/killTerminal`,createTask:`execute/createAndRunTask`,terminalSel:`read/terminalSelection`,fileSearch:`search/fileSearch`,listDir:`search/listDirectory`,textSearch:`search/textSearch`,searchSubagent:`search/searchSubagent`};function m(e){return`[${[...(l[e]||[]).map(e=>p[e]).filter(Boolean),`aikit/*`].join(`, `)}]`}function h(e){return r(`copilot`,e,`Auto (copilot)`)}const g=[`## 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
|
+
`),_=[`## 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 v(){let t=[];for(let[i,a]of Object.entries(e))if(a.variants)for(let e of n[i]||[]){let n=`${i}-${e}`,o=r(`copilot`,n,`Unknown`),s=(a.variants[e]||{}).description||a.description;t.push(`| **${n}** | ${s} | ${o} | ${a.category} |`)}else{let e=r(`copilot`,i,`Unknown`);t.push(`| **${i}** | ${a.description} | ${e} | ${a.category} |`)}return`| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${t.join(`
|
|
4
|
+
`)}`}function y(e,t,r){let i=`${e}-${t}`,a=r.variants[t]||{},o=h(i),c=a.description||r.description,l=a.identity||(t===n[e]?.[0]?`, the primary ${e} agent.`:`, a variant of ${e}. Same responsibilities, different model perspective.`),u=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``,d=r.extraBody?`\n\n${r.extraBody}`:``,f=a.bodyAddendum?`\n\n${a.bodyAddendum}`:``,p=(r.sharedProtocols||[]).map(e=>s[e]?`\n\n${s[e]}`:``).join(``),g=r.skills?.length?`\n\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${r.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
|
|
5
|
+
`)}`:``,v=r.title||e;return`---
|
|
6
|
+
description: '${c}'
|
|
7
|
+
${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${m(r.toolRole)}
|
|
8
8
|
model: ${o}
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
# ${i} - ${
|
|
11
|
+
# ${i} - ${v}
|
|
12
12
|
|
|
13
13
|
You are **${i}**${l}${d}
|
|
14
|
-
${u}${p}${f}${
|
|
14
|
+
${u}${p}${f}${g}
|
|
15
15
|
|
|
16
|
-
${
|
|
17
|
-
`}function
|
|
16
|
+
${_}
|
|
17
|
+
`}function b(n,r){let i=h(n),a=typeof t[n]==`function`?t[n](u(e)):t[n]||``,o=r.sharedBase&&s[r.sharedBase]?`\n\n${s[r.sharedBase]}`:``,c=(r.sharedProtocols||[]).map(e=>s[e]?`\n\n${s[e]}`:``).join(``),l=r.title||n,d=r.skills?.length?`\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${r.skills.map(([e,t])=>`| ${e} | ${t} |`).join(`
|
|
18
18
|
`)}\n`:``;return`---
|
|
19
19
|
description: '${r.description}'
|
|
20
|
-
${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${
|
|
20
|
+
${r.argumentHint?`argument-hint: "${r.argumentHint}"\n`:``}tools: ${m(r.toolRole)}
|
|
21
21
|
model: ${i}
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -25,22 +25,22 @@ model: ${i}
|
|
|
25
25
|
|
|
26
26
|
You are the **${n}**, ${r.description.toLowerCase().replace(/^./,e=>e.toLowerCase())}
|
|
27
27
|
|
|
28
|
-
${a}${o}${
|
|
28
|
+
${a}${o}${c}${d}
|
|
29
29
|
|
|
30
|
-
${n===`Orchestrator`?_
|
|
31
|
-
`}function
|
|
30
|
+
${n===`Orchestrator`?g:_}
|
|
31
|
+
`}function x(e,t){return`---
|
|
32
32
|
description: "${t.description}"
|
|
33
33
|
agent: "${t.agent}"
|
|
34
34
|
---
|
|
35
35
|
|
|
36
36
|
${t.content}
|
|
37
|
-
`}function
|
|
37
|
+
`}function S(){return`# Agents
|
|
38
38
|
|
|
39
39
|
This directory contains AI agent definitions generated by \`@vpxa/aikit init\`.
|
|
40
40
|
|
|
41
41
|
## Agent Roster
|
|
42
42
|
|
|
43
|
-
${
|
|
43
|
+
${v()}
|
|
44
44
|
|
|
45
45
|
## Multi-Model Pattern
|
|
46
46
|
|
|
@@ -73,5 +73,5 @@ To regenerate after changing models or agent definitions:
|
|
|
73
73
|
cd knowledge-base
|
|
74
74
|
node scaffold/generate.mjs
|
|
75
75
|
\`\`\`
|
|
76
|
-
`}function
|
|
77
|
-
`)}function
|
|
76
|
+
`}function C(){return[`# aikit — Copilot Instructions`,``,o,``,a,``].join(`
|
|
77
|
+
`)}function w(){let t=[];if(f().length===0)throw Error(`Executable hooks are not configured.`);t.push({path:`copilot-instructions.md`,content:C()});for(let[r,i]of Object.entries(e))if(i.variants)for(let e of n[r]||[])t.push({path:`agents/${r}-${e}.agent.md`,content:y(r,e,i)});else t.push({path:`agents/${r}.agent.md`,content:b(r,i)});for(let[e,n]of Object.entries(s))t.push({path:`agents/_shared/${e}.md`,content:`${n}\n`});for(let[e,n]of Object.entries(c))t.push({path:`agents/templates/${e}.md`,content:`${n}\n`});t.push({path:`agents/README.md`,content:S()});for(let[e,n]of Object.entries(i))t.push({path:`prompts/aikit-${e}.prompt.md`,content:x(e,n)});let r=d(`copilot`,`~/.copilot/hooks/scripts`);return t.push(...r.map(e=>({path:`hooks/${e.path}`,content:e.content}))),t}export{w as generateCopilot};
|
|
@@ -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};
|