@vpxa/aikit 0.1.1 → 0.1.3
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/README.md +8 -8
- package/package.json +1 -1
- package/packages/aikit-client/dist/types.d.ts +3 -3
- package/packages/cli/dist/aikit-init.d.ts +1 -1
- package/packages/cli/dist/aikit-init.js +1 -1
- package/packages/cli/dist/commands/context-cmds.js +1 -1
- package/packages/cli/dist/commands/environment.js +1 -1
- package/packages/cli/dist/commands/init/config.d.ts +1 -1
- package/packages/cli/dist/commands/init/config.js +2 -2
- package/packages/cli/dist/commands/init/constants.d.ts +3 -3
- package/packages/cli/dist/commands/init/index.d.ts +4 -4
- package/packages/cli/dist/commands/init/index.js +4 -4
- package/packages/cli/dist/commands/init/templates.js +12 -12
- package/packages/cli/dist/commands/init/user.d.ts +3 -3
- package/packages/cli/dist/commands/init/user.js +2 -2
- package/packages/cli/dist/commands/search.js +1 -1
- package/packages/cli/dist/commands/system.js +4 -4
- package/packages/cli/dist/commands/upgrade.js +1 -1
- package/packages/cli/dist/commands/workspace.js +1 -1
- package/packages/cli/dist/helpers.js +1 -1
- package/packages/cli/dist/index.d.ts +1 -1
- package/packages/core/dist/constants.d.ts +3 -3
- package/packages/core/dist/global-registry.d.ts +7 -1
- package/packages/core/dist/global-registry.js +1 -1
- package/packages/core/dist/index.d.ts +2 -2
- package/packages/core/dist/index.js +1 -1
- package/packages/core/dist/types.d.ts +6 -2
- package/packages/dashboard/dist/assets/{index-BjA4YODs.js → index-CO2S9BKY.js} +2 -2
- package/packages/dashboard/dist/assets/index-CO2S9BKY.js.map +1 -0
- package/packages/dashboard/dist/index.html +2 -2
- package/packages/enterprise-bridge/dist/er-client.d.ts +1 -1
- package/packages/flows/dist/git.js +1 -1
- package/packages/flows/dist/registry.d.ts +3 -3
- package/packages/flows/dist/registry.js +1 -1
- package/packages/flows/dist/symlinks.js +1 -1
- package/packages/indexer/dist/filesystem-crawler.js +1 -1
- package/packages/indexer/dist/hash-cache.js +1 -1
- package/packages/indexer/dist/incremental-indexer.js +1 -1
- package/packages/kb-client/dist/direct-client.d.ts +37 -0
- package/packages/kb-client/dist/direct-client.js +1 -0
- package/packages/kb-client/dist/index.d.ts +5 -0
- package/packages/kb-client/dist/index.js +1 -0
- package/packages/kb-client/dist/mcp-client.d.ts +19 -0
- package/packages/kb-client/dist/mcp-client.js +4 -0
- package/packages/kb-client/dist/parsers.d.ts +35 -0
- package/packages/kb-client/dist/parsers.js +2 -0
- package/packages/kb-client/dist/types.d.ts +62 -0
- package/packages/kb-client/dist/types.js +1 -0
- package/packages/present/dist/index.html +28 -28
- package/packages/server/dist/background-task.d.ts +47 -0
- package/packages/server/dist/background-task.js +1 -0
- package/packages/server/dist/config.js +1 -1
- package/packages/server/dist/idle-timer.d.ts +33 -0
- package/packages/server/dist/idle-timer.js +1 -0
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/memory-monitor.d.ts +37 -0
- package/packages/server/dist/memory-monitor.js +1 -0
- package/packages/server/dist/prompts.js +5 -5
- package/packages/server/dist/resource-links.d.ts +1 -1
- package/packages/server/dist/resource-links.js +1 -1
- package/packages/server/dist/resources/curated-resources.d.ts +2 -2
- package/packages/server/dist/resources/curated-resources.js +2 -2
- package/packages/server/dist/resources/resource-notifier.d.ts +1 -1
- package/packages/server/dist/resources/resource-notifier.js +1 -1
- package/packages/server/dist/resources/resources.js +1 -1
- package/packages/server/dist/server.d.ts +4 -2
- package/packages/server/dist/server.js +3 -3
- package/packages/server/dist/tool-metadata.d.ts +1 -1
- package/packages/server/dist/tool-metadata.js +1 -1
- package/packages/server/dist/tool-timeout.d.ts +27 -0
- package/packages/server/dist/tool-timeout.js +1 -0
- package/packages/server/dist/tools/bridge.tools.d.ts +1 -1
- package/packages/server/dist/tools/bridge.tools.js +3 -3
- package/packages/server/dist/tools/config.tool.d.ts +8 -0
- package/packages/server/dist/tools/config.tool.js +12 -0
- package/packages/server/dist/tools/evolution.tools.js +1 -1
- package/packages/server/dist/tools/flow.tools.js +1 -1
- package/packages/server/dist/tools/infra.tools.js +1 -1
- package/packages/server/dist/tools/onboard.tool.js +1 -1
- package/packages/server/dist/tools/present/browser.js +9 -9
- package/packages/server/dist/tools/present/tool.js +4 -4
- package/packages/server/dist/tools/reindex.tool.js +1 -1
- package/packages/server/dist/tools/search.tool.js +4 -4
- package/packages/server/dist/tools/status.tool.d.ts +1 -1
- package/packages/server/dist/tools/status.tool.js +3 -3
- package/packages/store/dist/sqlite-graph-store.d.ts +3 -0
- package/packages/store/dist/sqlite-graph-store.js +3 -3
- package/packages/tools/dist/checkpoint.js +1 -1
- package/packages/tools/dist/config-extractor.js +1 -1
- package/packages/tools/dist/evidence-map.js +1 -1
- package/packages/tools/dist/find.d.ts +1 -1
- package/packages/tools/dist/forge-ground.d.ts +1 -1
- package/packages/tools/dist/guide.js +1 -1
- package/packages/tools/dist/lane.js +1 -1
- package/packages/tools/dist/onboard.d.ts +2 -2
- package/packages/tools/dist/onboard.js +2 -2
- package/packages/tools/dist/queue.js +1 -1
- package/packages/tools/dist/replay.js +1 -1
- package/packages/tools/dist/response-envelope.d.ts +1 -1
- package/packages/tools/dist/restore-points.js +1 -1
- package/packages/tools/dist/schema-validate.js +1 -1
- package/packages/tools/dist/snippet.js +1 -1
- package/packages/tools/dist/stash.js +1 -1
- package/packages/tools/dist/synthesis-engine.js +2 -2
- package/packages/tools/dist/workset.js +1 -1
- package/packages/tui/dist/{App-DU2KEylW.js → App-DpjN3iS-.js} +1 -1
- package/packages/tui/dist/App.d.ts +1 -1
- package/packages/tui/dist/App.js +1 -1
- package/packages/tui/dist/LogPanel-Db-SeZhR.js +3 -0
- package/packages/tui/dist/hooks/useKBClient.d.ts +1 -1
- package/packages/tui/dist/{index-BXafekwr.d.ts → index-MXJeXmCf.d.ts} +3 -3
- package/packages/tui/dist/index.d.ts +1 -1
- package/packages/tui/dist/index.js +1 -1
- package/packages/tui/dist/panels/LogPanel.js +1 -1
- package/scaffold/README.md +192 -192
- package/scaffold/definitions/bodies.mjs +16 -16
- package/scaffold/definitions/plugins.mjs +1 -1
- package/scaffold/definitions/prompts.mjs +6 -6
- package/scaffold/definitions/protocols.mjs +12 -12
- package/scaffold/definitions/tools.mjs +1 -1
- package/scaffold/flows/aikit-advanced/skills/execute/SKILL.md +124 -124
- package/scaffold/flows/aikit-advanced/skills/plan/SKILL.md +100 -100
- package/scaffold/flows/aikit-advanced/skills/spec/SKILL.md +100 -100
- package/scaffold/flows/aikit-advanced/skills/task/SKILL.md +99 -99
- package/scaffold/flows/aikit-advanced/skills/verify/SKILL.md +122 -122
- package/scaffold/flows/aikit-basic/skills/assess/SKILL.md +82 -82
- package/scaffold/flows/aikit-basic/skills/implement/SKILL.md +105 -105
- package/scaffold/flows/aikit-basic/skills/verify/SKILL.md +96 -96
- package/scaffold/general/agents/Debugger.agent.md +2 -2
- package/scaffold/general/agents/Documenter.agent.md +2 -2
- package/scaffold/general/agents/Explorer.agent.md +2 -2
- package/scaffold/general/agents/Frontend.agent.md +1 -1
- package/scaffold/general/agents/Implementer.agent.md +2 -2
- package/scaffold/general/agents/Orchestrator.agent.md +1 -1
- package/scaffold/general/agents/Planner.agent.md +2 -2
- package/scaffold/general/agents/Refactor.agent.md +2 -2
- package/scaffold/general/agents/Security.agent.md +2 -2
- package/scaffold/general/agents/_shared/architect-reviewer-base.md +1 -1
- package/scaffold/general/agents/_shared/code-agent-base.md +6 -6
- package/scaffold/general/agents/_shared/code-reviewer-base.md +1 -1
- package/scaffold/general/agents/_shared/forge-protocol.md +1 -1
- package/scaffold/general/agents/_shared/researcher-base.md +3 -3
- package/scaffold/general/prompts/ask.prompt.md +4 -4
- package/scaffold/general/prompts/debug.prompt.md +1 -1
- package/scaffold/general/prompts/plan.prompt.md +1 -1
- package/scaffold/general/skills/aikit/SKILL.md +5 -5
- package/scaffold/general/skills/multi-agents-development/SKILL.md +435 -435
- package/scaffold/general/skills/present/SKILL.md +424 -424
- package/packages/dashboard/dist/assets/index-BjA4YODs.js.map +0 -1
- package/packages/tui/dist/LogPanel-Bo8a8QXB.js +0 -3
|
@@ -2,6 +2,6 @@ import { AIKIT_GLOBAL_PATHS, AIKIT_PATHS, CATEGORY_PATTERN, CHUNK_SIZES, DEFAULT
|
|
|
2
2
|
import { CONTENT_TYPES, ChunkMetadata, ContentType, IndexStats, KBConfig, KNOWLEDGE_ORIGINS, KnowledgeOrigin, KnowledgeRecord, RawChunk, SOURCE_TYPES, SearchResult, SourceType } from "./types.js";
|
|
3
3
|
import { contentTypeToSourceType, detectContentType, sourceTypeContentTypes } from "./content-detector.js";
|
|
4
4
|
import { ConfigError, EmbeddingError, IndexError, KBError, StoreError } from "./errors.js";
|
|
5
|
-
import { GlobalRegistry, RegistryEntry, computePartitionKey, getGlobalDataDir, getPartitionDir, isUserInstalled, listWorkspaces, loadRegistry, lookupWorkspace, registerWorkspace, saveRegistry } from "./global-registry.js";
|
|
5
|
+
import { GlobalRegistry, RegistryEntry, computePartitionKey, getGlobalDataDir, getPartitionDir, isUserInstalled, listWorkspaces, loadRegistry, lookupWorkspace, registerWorkspace, resolveStateDir, saveRegistry } from "./global-registry.js";
|
|
6
6
|
import { LogLevel, LogListener, addLogListener, createLogger, getLogLevel, resetLogDir, serializeError, setFileSinkEnabled, setLogLevel } from "./logger.js";
|
|
7
|
-
export { AIKIT_GLOBAL_PATHS, AIKIT_PATHS, CATEGORY_PATTERN, CHUNK_SIZES, CONTENT_TYPES, ChunkMetadata, ConfigError, ContentType, DEFAULT_CATEGORIES, EMBEDDING_DEFAULTS, EmbeddingError, FILE_LIMITS, GlobalRegistry, IndexError, IndexStats, KBConfig, KBError, KNOWLEDGE_ORIGINS, KnowledgeOrigin, KnowledgeRecord, LogLevel, LogListener, RawChunk, RegistryEntry, SEARCH_DEFAULTS, SOURCE_TYPES, STORE_DEFAULTS, SearchResult, SourceType, StoreError, addLogListener, computePartitionKey, contentTypeToSourceType, createLogger, detectContentType, getGlobalDataDir, getLogLevel, getPartitionDir, isUserInstalled, listWorkspaces, loadRegistry, lookupWorkspace, registerWorkspace, resetLogDir, saveRegistry, serializeError, setFileSinkEnabled, setLogLevel, sourceTypeContentTypes };
|
|
7
|
+
export { AIKIT_GLOBAL_PATHS, AIKIT_PATHS, CATEGORY_PATTERN, CHUNK_SIZES, CONTENT_TYPES, ChunkMetadata, ConfigError, ContentType, DEFAULT_CATEGORIES, EMBEDDING_DEFAULTS, EmbeddingError, FILE_LIMITS, GlobalRegistry, IndexError, IndexStats, KBConfig, KBError, KNOWLEDGE_ORIGINS, KnowledgeOrigin, KnowledgeRecord, LogLevel, LogListener, RawChunk, RegistryEntry, SEARCH_DEFAULTS, SOURCE_TYPES, STORE_DEFAULTS, SearchResult, SourceType, StoreError, addLogListener, computePartitionKey, contentTypeToSourceType, createLogger, detectContentType, getGlobalDataDir, getLogLevel, getPartitionDir, isUserInstalled, listWorkspaces, loadRegistry, lookupWorkspace, registerWorkspace, resetLogDir, resolveStateDir, saveRegistry, serializeError, setFileSinkEnabled, setLogLevel, sourceTypeContentTypes };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AIKIT_GLOBAL_PATHS as e,AIKIT_PATHS as t,CATEGORY_PATTERN as n,CHUNK_SIZES as r,DEFAULT_CATEGORIES as i,EMBEDDING_DEFAULTS as a,FILE_LIMITS as o,SEARCH_DEFAULTS as s,STORE_DEFAULTS as c}from"./constants.js";import{contentTypeToSourceType as l,detectContentType as u,sourceTypeContentTypes as d}from"./content-detector.js";import{ConfigError as f,EmbeddingError as p,IndexError as m,KBError as h,StoreError as g}from"./errors.js";import{computePartitionKey as _,getGlobalDataDir as v,getPartitionDir as y,isUserInstalled as b,listWorkspaces as x,loadRegistry as S,lookupWorkspace as C,registerWorkspace as w,saveRegistry as
|
|
1
|
+
import{AIKIT_GLOBAL_PATHS as e,AIKIT_PATHS as t,CATEGORY_PATTERN as n,CHUNK_SIZES as r,DEFAULT_CATEGORIES as i,EMBEDDING_DEFAULTS as a,FILE_LIMITS as o,SEARCH_DEFAULTS as s,STORE_DEFAULTS as c}from"./constants.js";import{contentTypeToSourceType as l,detectContentType as u,sourceTypeContentTypes as d}from"./content-detector.js";import{ConfigError as f,EmbeddingError as p,IndexError as m,KBError as h,StoreError as g}from"./errors.js";import{computePartitionKey as _,getGlobalDataDir as v,getPartitionDir as y,isUserInstalled as b,listWorkspaces as x,loadRegistry as S,lookupWorkspace as C,registerWorkspace as w,resolveStateDir as T,saveRegistry as E}from"./global-registry.js";import{addLogListener as D,createLogger as O,getLogLevel as k,resetLogDir as A,serializeError as j,setFileSinkEnabled as M,setLogLevel as N}from"./logger.js";import{CONTENT_TYPES as P,KNOWLEDGE_ORIGINS as F,SOURCE_TYPES as I}from"./types.js";export{e as AIKIT_GLOBAL_PATHS,t as AIKIT_PATHS,n as CATEGORY_PATTERN,r as CHUNK_SIZES,P as CONTENT_TYPES,f as ConfigError,i as DEFAULT_CATEGORIES,a as EMBEDDING_DEFAULTS,p as EmbeddingError,o as FILE_LIMITS,m as IndexError,h as KBError,F as KNOWLEDGE_ORIGINS,s as SEARCH_DEFAULTS,I as SOURCE_TYPES,c as STORE_DEFAULTS,g as StoreError,D as addLogListener,_ as computePartitionKey,l as contentTypeToSourceType,O as createLogger,u as detectContentType,v as getGlobalDataDir,k as getLogLevel,y as getPartitionDir,b as isUserInstalled,x as listWorkspaces,S as loadRegistry,C as lookupWorkspace,w as registerWorkspace,A as resetLogDir,T as resolveStateDir,E as saveRegistry,j as serializeError,M as setFileSinkEnabled,N as setLogLevel,d as sourceTypeContentTypes};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region packages/core/src/types.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Core types for the MCP
|
|
3
|
+
* Core types for the MCP AI Kit system.
|
|
4
4
|
*/
|
|
5
5
|
/** The origin of a knowledge record — how it was created */
|
|
6
6
|
declare const KNOWLEDGE_ORIGINS: readonly ["indexed", "curated", "produced"];
|
|
@@ -77,10 +77,12 @@ interface SearchResult {
|
|
|
77
77
|
/** Similarity score (0-1, higher = more similar) */
|
|
78
78
|
score: number;
|
|
79
79
|
}
|
|
80
|
-
/** Configuration loaded from
|
|
80
|
+
/** Configuration loaded from aikit.config.json */
|
|
81
81
|
interface KBConfig {
|
|
82
82
|
/** MCP server name. Defaults to 'kb'. */
|
|
83
83
|
serverName?: string;
|
|
84
|
+
/** Whether to auto-index on startup. Defaults to false. */
|
|
85
|
+
autoIndex?: boolean;
|
|
84
86
|
/**
|
|
85
87
|
* Prefix prepended to every MCP tool name to avoid collisions with other
|
|
86
88
|
* MCP servers. E.g. `"aikit_"` turns `search` → `aikit_search`.
|
|
@@ -110,6 +112,8 @@ interface KBConfig {
|
|
|
110
112
|
};
|
|
111
113
|
/** Resolved directory for onboard/produce_knowledge output. User-level mode redirects this outside the project. */
|
|
112
114
|
onboardDir?: string;
|
|
115
|
+
/** Resolved state directory path. User-level mode redirects this to the partition. Defaults to `.aikit-state` in workspace root. */
|
|
116
|
+
stateDir?: string;
|
|
113
117
|
/** Enterprise RAG bridge configuration (optional) */
|
|
114
118
|
er?: {
|
|
115
119
|
/** Whether ER integration is enabled */enabled: boolean; /** Base URL of the ER API (e.g., https://xxx.execute-api.region.amazonaws.com/prod) */
|
|
@@ -17,5 +17,5 @@ Error generating stack: `+e.message+`
|
|
|
17
17
|
`).find(e=>e.startsWith(`data: `));if(!e)throw Error(`Empty SSE response`);i=JSON.parse(e.slice(6))}else i=await n.json();if(i.error)throw Error(i.error.message??`Tool call failed`);return i.result}},mf=class{constructor(e){this.http=e}async getStatus(){let e=v(await this.http.callTool(`status`));return e?{totalRecords:e.totalRecords??0,totalFiles:e.totalFiles??0,lastIndexedAt:e.lastIndexedAt??null,onboarded:e.onboarded??!1}:{totalRecords:0,totalFiles:0,lastIndexedAt:null,onboarded:!1}}async search(e,t){let n=v(await this.http.callTool(`search`,{query:e,limit:t?.limit??10,search_mode:t?.mode??`hybrid`}));return n?.results?n.results.map(e=>({sourcePath:e.sourcePath??``,contentType:e.contentType??`unknown`,score:e.score??0,content:e.content??``})):[]}async listKnowledge(){let e=v(await this.http.callTool(`list`));return e?.entries?e.entries.map(e=>({path:e.path??``,title:e.title??``,category:e.category??``,tags:e.tags??[],content:e.content??``})):[]}async readKnowledge(e){try{let t=_(await this.http.callTool(`read`,{path:e}));return t?{path:e,title:e.split(`/`).pop()??e,category:``,tags:[],content:t}:null}catch{return null}}async getGraph(e){let t=await this.http.callTool(`graph`,{action:`find_nodes`,...e?{name_pattern:e}:{},limit:100}),n=(v(t)?.nodes??[]).map(e=>({id:e.id??`n-${Math.random().toString(36).slice(2)}`,name:e.name??``,type:e.type??`unknown`}));if(n.length===0){let e=hf(_(t));if(e.length===0)return{nodes:[],edges:[]};n.push(...e)}let r=await this.http.callTool(`graph`,{action:`find_edges`,limit:100}),i=(v(r)?.edges??[]).map(e=>({fromId:e.fromId??``,toId:e.toId??``,type:e.type??`unknown`}));if(i.length===0){let e=_(r);i.push(...gf(e))}return{nodes:n,edges:i}}async getFileTree(){let e=await this.http.callTool(`find`,{glob:`**/*`}),t=v(e);return t?.results?t.results.map(e=>e.path??e):_(e).split(`
|
|
18
18
|
`).filter(e=>e.trim().length>0)}};function hf(e){let t=[];for(let n of e.split(`
|
|
19
19
|
`)){let e=/\*\*(.+?)\*\*\s*\((\w+)(?:,\s*id:\s*`?(\w+)`?)?\)/.exec(n);e&&t.push({id:e[3]??`n-${t.length}`,name:e[1],type:e[2]})}return t}function gf(e){let t=[];for(let n of e.split(`
|
|
20
|
-
`)){let e=/`?(\w+)`?\s*[—-]+\[(\w+)\][→>]\s*`?(\w+)`?/.exec(n);e&&t.push({fromId:e[1],toId:e[3],type:e[2]})}return t}function _f({client:e}){let{refetch:t}=P(e);return re(e,t),(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100vh`,width:`100vw`},children:[(0,F.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,padding:`8px 16px`,borderBottom:`1px solid #30363d`,background:`#161b22`},children:(0,F.jsx)(`h1`,{style:{margin:0,fontSize:`16px`,color:`#58a6ff`,fontWeight:600},children:`
|
|
21
|
-
//# sourceMappingURL=index-
|
|
20
|
+
`)){let e=/`?(\w+)`?\s*[—-]+\[(\w+)\][→>]\s*`?(\w+)`?/.exec(n);e&&t.push({fromId:e[1],toId:e[3],type:e[2]})}return t}function _f({client:e}){let{refetch:t}=P(e);return re(e,t),(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100vh`,width:`100vw`},children:[(0,F.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,padding:`8px 16px`,borderBottom:`1px solid #30363d`,background:`#161b22`},children:(0,F.jsx)(`h1`,{style:{margin:0,fontSize:`16px`,color:`#58a6ff`,fontWeight:600},children:`AI Kit Dashboard`})}),(0,F.jsxs)(`div`,{style:{flex:1,position:`relative`,overflow:`hidden`},children:[(0,F.jsx)(df,{}),(0,F.jsx)(lf,{}),(0,F.jsx)(ff,{})]}),(0,F.jsx)(uf,{})]})}function vf(){let[e,t]=(0,b.useState)(null),{setError:n,setConnected:r}=N();return(0,b.useEffect)(()=>{let e=window.location.origin,i=new mf(new pf(e));i.getStatus().then(()=>{t(i),r(!0)}).catch(e=>{n(`Cannot connect to AI Kit server: ${e.message}`),r(!1),t(i)})},[n,r]),e?(0,F.jsx)(S,{value:e,children:(0,F.jsx)(_f,{client:e})}):(0,F.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,height:`100vh`,color:`#8b949e`,fontSize:`14px`},children:`Connecting to AI Kit server...`})}var yf=document.getElementById(`root`);if(!yf)throw Error(`Root element not found`);(0,y.createRoot)(yf).render((0,F.jsx)(vf,{}));
|
|
21
|
+
//# sourceMappingURL=index-CO2S9BKY.js.map
|