@gencode/agents 0.0.27 → 0.0.28
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/index.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ import{C as e,E as t,S as n,T as r,_ as i,a,b as o,c as s,d as c,f as l,g as u,h
|
|
|
43
43
|
`)}function oi(e,t,n){let r=[],i=0;for(let a of n){if(a.changeContext){let n=ci(e,[a.changeContext],i,!1);if(n===null)throw Error(`Failed to find context '${a.changeContext}' in ${t}`);i=n+1}if(a.oldLines.length===0){let t=e.length>0&&e[e.length-1]===``?e.length-1:e.length;r.push([t,0,a.newLines]);continue}let n=a.oldLines,o=a.newLines,s=ci(e,n,i,a.isEndOfFile);if(s===null&&n[n.length-1]===``&&(n=n.slice(0,-1),o.length>0&&o[o.length-1]===``&&(o=o.slice(0,-1)),s=ci(e,n,i,a.isEndOfFile)),s===null)throw Error(`Failed to find expected lines in ${t}:\n${a.oldLines.join(`
|
|
44
44
|
`)}`);r.push([s,n.length,o]),i=s+n.length}return r.sort((e,t)=>e[0]-t[0]),r}function si(e,t){let n=[...e];for(let[e,r,i]of[...t].toReversed()){for(let t=0;t<r;t+=1)e<n.length&&n.splice(e,1);for(let t=0;t<i.length;t+=1)n.splice(e+t,0,i[t])}return n}function ci(e,t,n,r){if(t.length===0)return n;if(t.length>e.length)return null;let i=e.length-t.length,a=r&&e.length>=t.length?i:n;if(a>i)return null;for(let n=a;n<=i;n+=1)if(li(e,t,n,e=>e))return n;for(let n=a;n<=i;n+=1)if(li(e,t,n,e=>e.trimEnd()))return n;for(let n=a;n<=i;n+=1)if(li(e,t,n,e=>e.trim()))return n;for(let n=a;n<=i;n+=1)if(li(e,t,n,e=>ui(e.trim())))return n;return null}function li(e,t,n,r){for(let i=0;i<t.length;i+=1)if(r(e[n+i])!==r(t[i]))return!1;return!0}function ui(e){return Array.from(e).map(e=>{switch(e){case`‐`:case`‑`:case`‒`:case`–`:case`—`:case`―`:case`−`:return`-`;case`‘`:case`’`:case`‚`:case`‛`:return`'`;case`“`:case`”`:case`„`:case`‟`:return`"`;case`\xA0`:case` `:case` `:case` `:case` `:case` `:case` `:case` `:case` `:case` `:case` `:case` `:case` `:return` `;default:return e}}).join(``)}const di=I.Object({question:I.String({description:`The question to ask the user.`}),options:I.Optional(I.Array(I.String(),{description:`Optional list of choices for the user to select from.`})),allow_free_text:I.Optional(I.Boolean({description:`Whether to allow the user to type a free-text response in addition to choices. Defaults to true.`}))});function fi(e){return{name:`clarify`,label:`Clarify`,description:`Ask the user a clarifying question when you need more information to proceed. Provide a clear question and optionally a list of choices. The current task will be paused until the user responds.`,parameters:di,async execute(t,n){let r=R(),i=n.options&&n.options.length>0,a;throw a=i?{mode:`choice`,choices:n.options.map((e,t)=>({id:`option-${t}`,label:e})),allowFreeText:n.allow_free_text!==!1}:{mode:`text`,multiline:!0,placeholder:`Type your response...`},new K({requestId:r,sessionId:e,kind:`clarify`,title:`Agent needs clarification`,prompt:n.question,input:a,policy:{resumable:!0},createdAt:new Date().toISOString()},{turnId:t,phase:`before_tool`,resumeStrategy:`reenter_from_checkpoint`},{toolCallId:t,toolName:`clarify`,toolArgs:n})}}}function pi(e){return F.join(e,`.aimax`)}function mi(e){return F.join(pi(e),`MEMORY.md`)}async function hi(e,t,n){e.onMemoryChanged&&await Promise.resolve(e.onMemoryChanged(n)).catch(()=>{}),t&&await Promise.resolve(t(n)).catch(()=>{})}function gi(e,t){let n=pi(e),r=T({providerId:t?.providerId,pluginId:t?.pluginId,dataDir:e,memoryDir:n,sessionId:t?.sessionId});return r?r.provider:h({dataDir:e,memoryDir:n,sessionId:t?.sessionId})}async function _i(e){return f(pi(e))}async function vi(e){try{return await P.readFile(e,`utf-8`)}catch(e){if(e.code===`ENOENT`)return null;throw e}}async function yi(e){return vi(mi(e))}async function bi(e,t,n){return await gi(e,n).search(t)}async function xi(e,t,n,r,i){try{return await gi(e,i).getLines(t,n,r)}catch{return null}}async function Si(e,t,n){let r=gi(e,n);await r.append(t),await hi(r,n?.onMemoryChanged,{reason:`append`,files:[`MEMORY.md`],source:`memory`,sessionId:n?.sessionId,providerId:n?.providerId??n?.pluginId,timestamp:new Date().toISOString()})}async function Ci(e,t,n,r){let i=gi(e,r);await i.updateFile(t,n),await hi(i,r?.onMemoryChanged,{reason:`update`,files:[t],source:`memory`,sessionId:r?.sessionId,providerId:r?.providerId??r?.pluginId,timestamp:new Date().toISOString()})}async function wi(e,t,n){let r=gi(e,n);await r.deleteFile(t),await hi(r,n?.onMemoryChanged,{reason:`delete`,files:[t],source:`memory`,sessionId:n?.sessionId,providerId:n?.providerId??n?.pluginId,timestamp:new Date().toISOString()})}const Ti=I.Object({query:I.String({description:`Search query (case-insensitive substring match)`})});function Ei(e,t){return{name:`memory_search`,label:`Memory Search`,description:`Search memory files for relevant information`,parameters:Ti,async execute(n,r){let i=(await bi(e,r.query,{providerId:t?.providerId,pluginId:t?.pluginId,sessionId:t?.sessionId})).map(e=>({file:e.path,start_line:e.startLine,end_line:e.endLine,score:Number(e.score.toFixed(4)),text:e.snippet,source:e.source,citation:e.citation}));return i.length===0?{content:[{type:`text`,text:`No results found for: ${r.query}`}],details:{matches:i}}:{content:[{type:`text`,text:i.map(e=>{let t=`${e.file}:${e.start_line}-${e.end_line} (${e.score}): ${e.text}`;return e.citation?`${t}\n${e.citation}`:t}).join(`
|
|
45
45
|
`)}],details:{matches:i}}}}}const Di=I.Object({file:I.String({description:`Memory file path`}),start_line:I.Number({description:`Start line number (1-based)`}),end_line:I.Number({description:`End line number (1-based)`})});function Oi(e,t){return{name:`memory_get`,label:`Memory Get`,description:`Read specific lines from a memory file`,parameters:Di,async execute(n,r){let i=await xi(e,r.file,r.start_line,r.end_line,{providerId:t?.providerId,pluginId:t?.pluginId,sessionId:t?.sessionId});return i===null?{content:[{type:`text`,text:`File not found: ${r.file}`}],details:{lines:null}}:{content:[{type:`text`,text:i.map((e,t)=>`${(r.start_line+t).toString().padStart(4)} ${e}`).join(`
|
|
46
|
-
`)||`(empty)`}],details:{lines:i}}}}}const ki=I.Object({content:I.String({description:`Content to append to MEMORY.md`})});function Ai(e,t){return{name:`memory_append`,label:`Memory Append`,description:`Append new information to the MEMORY.md file`,parameters:ki,async execute(n,r){try{return await Si(e,r.content,{providerId:t?.providerId,pluginId:t?.pluginId,sessionId:t?.sessionId,onMemoryChanged:t?.onMemoryChanged}),{content:[{type:`text`,text:`Memory updated.`}],details:{appended:!0}}}catch(e){return{content:[{type:`text`,text:`Error appending to memory: ${e instanceof Error?e.message:String(e)}`}],details:{appended:!1}}}}}}const ji=I.Object({action:I.String({description:`A short description of the action that needs approval.`}),reason:I.String({description:`Why this action needs human approval.`}),details:I.Optional(I.String({description:`Additional details about the action (e.g. the command to execute).`}))});function Mi(e,t){return{name:`request_approval`,label:`Request Approval`,description
|
|
46
|
+
`)||`(empty)`}],details:{lines:i}}}}}const ki=I.Object({content:I.String({description:`Content to append to MEMORY.md`})});function Ai(e,t){return{name:`memory_append`,label:`Memory Append`,description:`Append new information to the MEMORY.md file`,parameters:ki,async execute(n,r){try{return await Si(e,r.content,{providerId:t?.providerId,pluginId:t?.pluginId,sessionId:t?.sessionId,onMemoryChanged:t?.onMemoryChanged}),{content:[{type:`text`,text:`Memory updated.`}],details:{appended:!0}}}catch(e){return{content:[{type:`text`,text:`Error appending to memory: ${e instanceof Error?e.message:String(e)}`}],details:{appended:!1}}}}}}const ji=I.Object({action:I.String({description:`A short description of the action that needs approval.`}),reason:I.String({description:`Why this action needs human approval.`}),details:I.Optional(I.String({description:`Additional details about the action (e.g. the command to execute).`}))});function Mi(e,t){return{name:`request_approval`,label:`Request Approval`,description:"Use this tool only when the user or system instructions explicitly require calling `request_approval`. Do not use it for general confirmation, clarification, or inferred approval checks. Describe the action and why `request_approval` was explicitly required. The task will be paused until the user approves or denies the action.",parameters:ji,async execute(n,r){if(t?.request.kind===`approval`&&t.toolContext?.toolName===`request_approval`&&t.toolContext.toolCallId===n&&t.resolution.action===`submit`){let e=t.resolution.values?.selectedChoiceIds?.includes(`approve`)??!1;return{content:[{type:`text`,text:e?`Approval granted.`:`Approval denied.`}],details:{paused:!1,approved:e}}}let i=R(),a;throw r.details&&(a={mimeType:`text/plain`,content:r.details}),new K({requestId:i,sessionId:e,kind:`approval`,title:r.action,prompt:r.reason,preview:a,input:{mode:`choice`,choices:[{id:`approve`,label:`Approve`,description:`Allow this action to proceed`},{id:`deny`,label:`Deny`,description:`Reject this action`}]},policy:{resumable:!0,defaultOnTimeout:`deny`},createdAt:new Date().toISOString()},{turnId:n,phase:`before_tool`,resumeStrategy:`reenter_from_checkpoint`},{toolCallId:n,toolName:`request_approval`,toolArgs:r})}}}const Ni=I.Object({title:I.String({description:`A short title for the review (e.g. 'Weekly Report Draft').`}),description:I.String({description:`What the user should review and what kind of feedback you need.`}),content:I.String({description:`The content to review (text, markdown, or JSON).`}),content_type:I.Optional(I.String({description:`MIME type: text/plain, application/json, or text/markdown. Defaults to text/markdown.`}))});function Pi(e){return{name:`request_review`,label:`Request Review`,description:`Present a draft, document, or output for human review before proceeding. Include the content to review and a description of what feedback you need. The task will be paused until the user reviews and responds.`,parameters:Ni,async execute(t,n){let r=R(),i={mimeType:n.content_type??`text/markdown`,content:n.content};throw new K({requestId:r,sessionId:e,kind:`review`,title:n.title,prompt:n.description,preview:i,input:{mode:`choice`,choices:[{id:`approve`,label:`Approve`,description:`The content looks good, proceed`},{id:`revise`,label:`Request changes`,description:`Provide feedback for revision`},{id:`reject`,label:`Reject`,description:`Discard this draft`}],allowFreeText:!0},policy:{resumable:!0},createdAt:new Date().toISOString()},{turnId:t,phase:`before_tool`,resumeStrategy:`reenter_from_checkpoint`},{toolCallId:t,toolName:`request_review`,toolArgs:n})}}}const Fi=I.Object({task:I.String({description:`The task description for the subagent to execute`}),label:I.Optional(I.String({description:`Optional short label to identify this subagent`}))});function Ii(e){let t=e.label?`"${e.label}"`:`task: ${e.task}`;return e.status===`done`?`[Subagent completed] ${t}\n\n${e.result??`(no output)`}`:e.status===`error`?`[Subagent failed] ${t}\n\nError: ${e.error??`unknown error`}`:`[Subagent killed] ${t}`}function Li(e,t,n,r,i,a,o,s,l){return{name:`sessions_spawn`,label:`Spawn Subagent`,description:`Use this tool only when the user or system instructions explicitly require using a subagent, delegation, or parallel agent execution. Do not use it for routine decomposition or inferred parallelism. Returns immediately with status=accepted; the subagent result will be delivered back automatically as a follow-up message — do not poll or sleep.`,parameters:Fi,async execute(u,d){let f=d.task.trim(),p=d.label?.trim();if(!f){let e={status:`error`,error:`task must not be empty`};return{content:[{type:`text`,text:JSON.stringify(e)}],details:e}}let m=e.checkSpawnAllowed(t,n+1);if(!m.allowed){let e={status:`forbidden`,error:m.reason};return{content:[{type:`text`,text:JSON.stringify(e)}],details:e}}let h=R(),g=new AbortController,_;try{_=await c(r,i)}catch(e){let t={status:`error`,error:`Failed to create session: ${e instanceof Error?e.message:String(e)}`};return{content:[{type:`text`,text:JSON.stringify(t)}],details:t}}let v={runId:h,childSessionId:_,parentSessionId:t,task:f,label:p,depth:n+1,status:`running`,startedAt:Date.now(),abortController:g},y=l({dataDir:r,sessionId:_,message:f,channel:i,llm:a,...s,loopDetection:o,abortSignal:g.signal,subagentContext:{depth:n+1,parentSessionId:t}}).then(t=>{e.complete(h,t.text||t.error||`(no output)`)}).catch(t=>{let n=t instanceof Error?t.message:String(t);e.fail(h,n)});e.register(v,y);let b={status:`accepted`,childSessionId:_,runId:h,note:`The subagent result will be sent back automatically. Do not poll or re-spawn.`};return{content:[{type:`text`,text:JSON.stringify(b)}],details:b}}}}const Ri=I.Object({action:I.Union([`list`,`kill`].map(e=>I.Literal(e)),{description:`Action to perform: "list" to show subagents, "kill" to stop one or all`}),target:I.Optional(I.String({description:`For kill: a runId, label, or index from the list. Use "*" or "all" to kill every subagent.`}))});function zi(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/6e4)}m${Math.floor(e%6e4/1e3)}s`}function Bi(e,t){let n=parseInt(t,10);return!isNaN(n)&&n>=1&&n<=e.length?e[n-1]:e.find(e=>e.runId.startsWith(t)||e.runId===t)||(e.find(e=>e.label&&e.label.toLowerCase()===t.toLowerCase())??null)}function Vi(e,t){return{name:`subagents`,label:`Subagents`,description:`List or kill subagents spawned by this session. Use list to check status, kill to stop one or all.`,parameters:Ri,async execute(n,r){let i=r.action,a=Date.now(),o=e.list(t);if(i===`list`){let e=o.map((e,t)=>({index:t+1,runId:e.runId,label:e.label??e.task.slice(0,40),task:e.task,status:e.status,depth:e.depth,runtimeMs:e.endedAt?e.endedAt-e.startedAt:a-e.startedAt})),t={action:`list`,runs:e,text:(e.length===0?[`(no subagents)`]:e.map(e=>`${e.index}. [${e.status}] ${e.label} (${zi(e.runtimeMs)})`)).join(`
|
|
47
47
|
`)};return{content:[{type:`text`,text:JSON.stringify(t)}],details:t}}if(i===`kill`){let n=r.target?.trim();if(!n||n===`*`||n===`all`){let n=e.killAll(t),r={action:`kill`,killed:n,text:n>0?`Killed ${n} subagent(s).`:`No running subagents to kill.`};return{content:[{type:`text`,text:JSON.stringify(r)}],details:r}}let i=Bi(o,n);if(!i){let e={action:`kill`,killed:0,error:`No subagent found matching "${n}". Use list to see available subagents.`,text:`Error: no subagent matching "${n}"`};return{content:[{type:`text`,text:JSON.stringify(e)}],details:e}}let a=e.kill(i.runId),s=i.label??i.task.slice(0,40),c={action:`kill`,killed:a?1:0,text:a?`Killed subagent "${s}".`:`Subagent "${s}" is already finished.`};return{content:[{type:`text`,text:JSON.stringify(c)}],details:c}}let s={action:i,error:`Unsupported action.`,text:`Error: unsupported action.`};return{content:[{type:`text`,text:JSON.stringify(s)}],details:s}}}}const Hi=I.Object({image:I.String({description:`Image path or URL`}),prompt:I.Optional(I.String({description:`Prompt for image analysis`})),model:I.Optional(I.String({description:`Optional model override`})),maxBytesMb:I.Optional(I.Number({description:`Optional size cap in MB`}))});function Ui(){return{name:`image`,label:`Image`,description:`Analyze an image with the configured image model. (Not implemented in AIMax yet.)`,parameters:Hi,async execute(e,t){let n={implemented:!1,error:`image tool not implemented (awaiting third-party integration).`};return{content:[{type:`text`,text:`Error: ${n.error}`}],details:n}}}}function Wi(e,t){let n=F.join(e,`workspace`),r=t?.memoryOptions,i=Fr(),a=[Sr({sessionId:t?.sessionId,workspaceDir:n,registry:i,scopeKey:n,contextManager:t?.contextManager,hitlResume:t?.hitlResume}),Er({registry:i,scopeKey:n}),Vr(n,t?.contextManager),Ur(n,t?.contextManager),Gr(n,t?.contextManager),qr(n),$r(n,{sessionId:t?.sessionId,hitlResume:t?.hitlResume}),Ei(e,r),Oi(e,r),Ai(e,r),...t?.sessionId?[fi(t.sessionId),Mi(t.sessionId,t.hitlResume),Pi(t.sessionId)]:[]];return t&&a.push(Li(t.registry,t.parentSessionId,t.depth,e,t.channel,t.llm,t.loopDetection,t.inheritedRunParams??{},t.spawnFn),Vi(t.registry,t.parentSessionId)),a}const Gi={read_file:`Read file contents`,write_file:`Create or overwrite files`,edit_file:`Make precise edits to files`,list_dir:`List directory contents`,apply_patch:`Apply multi-file patches`,exec:`Run shell commands`,process:`Manage background exec sessions`,memory_search:`Search memory files for relevant information`,memory_get:`Read specific lines from memory files`,memory_append:`Append new long-term memory`,sessions_spawn:`Spawn an isolated subagent session`,subagents:`List, steer, or kill subagent runs`},Ki=[`read_file`,`write_file`,`edit_file`,`list_dir`,`apply_patch`,`exec`,`process`,`memory_search`,`memory_get`,`memory_append`,`sessions_spawn`,`subagents`];function qi(e){let t=new Map;for(let n of e){let e=n.trim();if(!e)continue;let r=e.toLowerCase();t.has(r)||t.set(r,e)}let n=Array.from(t.keys());return{ordered:[...Ki.filter(e=>t.has(e)),...n.filter(e=>!Ki.includes(e)).sort()],displayName:t}}function Ji(e){let{ordered:t,displayName:n}=qi(e.toolNames),r=new Map;for(let[t,n]of Object.entries(e.toolSummaries??{})){let e=t.trim().toLowerCase();!e||!n?.trim()||r.set(e,n.trim())}return[`## Tooling`,`Tool availability (filtered by runtime policy):`,`Tool names are case-sensitive. Call tools exactly as listed.`,t.map(e=>{let t=n.get(e)??e,i=r.get(e)??Gi[e];return i?`- ${t}: ${i}`:`- ${t}`}).join(`
|
|
48
48
|
`),``].join(`
|
|
49
49
|
`)}function Yi(){return[`## Safety`,`You have no independent goals: do not pursue self-preservation, replication, resource acquisition, or power-seeking; avoid long-term plans beyond the user's request.`,`Prioritize safety and human oversight over completion; if instructions conflict, pause and ask; comply with stop/pause/audit requests and never bypass safeguards.`,`Do not attempt to bypass approvals, safety rails, or access boundaries.`,`Never print, reveal, or echo environment variable values. If configuration must be shown, use placeholders plus brief meanings instead, such as {{API_KEY}}: model access credential.`,``].join(`
|
|
@@ -56,7 +56,7 @@ import{C as e,E as t,S as n,T as r,_ as i,a,b as o,c as s,d as c,f as l,g as u,h
|
|
|
56
56
|
`)}function ea(e){let t=`${e.dataDir}/.aimax`,n=`${e.dataDir}/workspace`,r=e.sandboxInfo?.hostWorkspaceDir?.trim()||n,i=e.sandboxInfo?.containerWorkspaceDir?.trim(),a=e.sandboxInfo?.enabled&&i?`For file tools, paths resolve against the cloud workspace mount ${r}. For exec commands, use paths under ${i} (or relative paths from there). Prefer relative paths whenever possible.`:`This cloud workspace is mounted user storage. Prefer relative paths to keep file tools and shell commands aligned.`;return[`## Workspace`,`Your cloud working directory is: ${r}`,a,`User identity, memory, and agent state live under ${t}, not inside the cloud workspace.`,`Files such as AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, MEMORY.md, and the memory/ directory belong under ${t}.`,`Only create or update those files at their real .aimax paths. Never create cloud workspace copies like ${r}/AGENTS.md or ${r}/MEMORY.md unless the user explicitly asks for separate cloud documents.`,``].join(`
|
|
57
57
|
`)}function ta(e){if(!e?.enabled)return``;let t=[`## Sandbox`,`You are running in a containerized cloud CLI runtime.`];return e.containerWorkspaceDir?.trim()&&t.push(`Container workdir: ${e.containerWorkspaceDir.trim()}`),e.hostWorkspaceDir?.trim()&&t.push(`Host-mounted workspace: ${e.hostWorkspaceDir.trim()}`),t.push(``),t.join(`
|
|
58
58
|
`)}function na(e){let t=[];if(e.timezone&&t.push(`Time zone: ${e.timezone}`),e.currentDate){t.push(`Current date: ${e.currentDate}`);let n=ra(e.currentDate);n&&t.push(`Day of week: ${n}`)}return t.length===0?``:[`## Current Date & Time`,...t,``].join(`
|
|
59
|
-
`)}function ra(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=new Date(Date.UTC(n,r-1,i));return Number.isNaN(a.getTime())||a.getUTCFullYear()!==n||a.getUTCMonth()!==r-1||a.getUTCDate()!==i?null:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`][a.getUTCDay()]}function ia(e){if(e.isMinimal||!e.enabled)return``;let t=(e.channels??[]).map(e=>e.trim()).filter(Boolean);return[`## Messaging`,`Reply in the current session for user-visible responses.`,`Use subagent tools
|
|
59
|
+
`)}function ra(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=new Date(Date.UTC(n,r-1,i));return Number.isNaN(a.getTime())||a.getUTCFullYear()!==n||a.getUTCMonth()!==r-1||a.getUTCDate()!==i?null:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`][a.getUTCDay()]}function ia(e){if(e.isMinimal||!e.enabled)return``;let t=(e.channels??[]).map(e=>e.trim()).filter(Boolean);return[`## Messaging`,`Reply in the current session for user-visible responses.`,`Use subagent tools only when the user or system instructions explicitly require subagents, delegation, or parallel agent execution; otherwise stay in the current agent.`,`Do not use shell/network commands to bypass the platform messaging pipeline.`,t.length>0?`Configured channels: ${t.join(` | `)}`:``,``].filter(Boolean).join(`
|
|
60
60
|
`)}function aa(e){if(e.isMinimal)return``;let t=e.docs,n=[`## Documentation`,t?.localPath?`Cloud docs mount: ${t.localPath}`:``,t?.webUrl?`Docs mirror: ${t.webUrl}`:``,t?.sourceUrl?`Source: ${t.sourceUrl}`:``,`For AiMax behavior, configuration, and architecture questions, consult documentation first.`,``].filter(Boolean);return n.length<=2?``:n.join(`
|
|
61
61
|
`)}function oa(e){if(!e)return``;let t=[e.hostname?`host=${e.hostname}`:``,e.os?`os=${e.os}`:``,e.node?`node=${e.node}`:``,e.model?`model=${e.model}`:``].filter(Boolean);return t.length===0?``:[`## Runtime`,`Runtime: ${t.join(` | `)}`,``].join(`
|
|
62
62
|
`)}function sa(e){return e.isMinimal?``:[`## Silent Replies`,`Do not send empty or filler replies.`,`If a tool already delivered the user-visible output, keep your final reply minimal and avoid duplication.`,``].join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gencode/agents",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"openai": "6.10.0",
|
|
31
31
|
"sqlite-vec": "^0.1.6",
|
|
32
32
|
"zod": "^4.3.6",
|
|
33
|
-
"@gencode/shared": "0.0.
|
|
33
|
+
"@gencode/shared": "0.0.9"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@sinclair/typebox": "^0.34.48",
|