agentix-cli 0.30.0 → 0.31.0
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/{App-IEQXWJ7B.js → App-6TP7YMQ3.js} +2 -2
- package/dist/{ChatApp-NWOSAP5U.js → ChatApp-G2MQUBR3.js} +2 -2
- package/dist/{agent-SPE7Q7MD.js → agent-A5G4DGVU.js} +2 -2
- package/dist/{board-dashboard-K4DM32SO.js → board-dashboard-BU6QJK6X.js} +192 -171
- package/dist/board-dashboard-BU6QJK6X.js.map +1 -0
- package/dist/{chunk-DI7FMCDK.js → chunk-2J3NV6RZ.js} +2 -2
- package/dist/{chunk-UCQ2N3KO.js → chunk-2TJ5L7CB.js} +2 -2
- package/dist/{chunk-FKBGJYWQ.js → chunk-3RHPZXCR.js} +2 -2
- package/dist/{chunk-AUNDQPDR.js → chunk-6DD4DA2L.js} +2 -2
- package/dist/{chunk-52ZPELD2.js → chunk-7CVJ4JOE.js} +2 -2
- package/dist/{chunk-IVQO43U2.js → chunk-7JWYLSFF.js} +2 -2
- package/dist/{chunk-GUBMLV34.js → chunk-7MNXKITO.js} +8 -8
- package/dist/chunk-7MNXKITO.js.map +1 -0
- package/dist/{chunk-45BLFNDG.js → chunk-COOJI5SR.js} +37 -37
- package/dist/chunk-COOJI5SR.js.map +1 -0
- package/dist/{chunk-JKYMXLYL.js → chunk-DLOYTMYZ.js} +2 -2
- package/dist/{chunk-SC5DIKBB.js → chunk-FFDXDUVQ.js} +2 -2
- package/dist/{chunk-MGNJWBVP.js → chunk-JC6ZHSTY.js} +2 -2
- package/dist/{chunk-MGNJWBVP.js.map → chunk-JC6ZHSTY.js.map} +1 -1
- package/dist/{chunk-UU4WOZNR.js → chunk-JJIYFBDH.js} +2 -2
- package/dist/{chunk-EL3J74N2.js → chunk-JV52UMCI.js} +2 -2
- package/dist/{chunk-Q7CZIRBB.js → chunk-NZ346QCV.js} +2 -2
- package/dist/{chunk-M4AMWP3H.js → chunk-QLTM3F7M.js} +17 -8
- package/dist/{chunk-M4AMWP3H.js.map → chunk-QLTM3F7M.js.map} +1 -1
- package/dist/{chunk-4KXBUORV.js → chunk-R7WLFEW3.js} +2 -2
- package/dist/{chunk-GK7XAM3D.js → chunk-UOGDSRG3.js} +2 -2
- package/dist/{chunk-IWMW5432.js → chunk-V7FYSZSV.js} +1 -1
- package/dist/{chunk-IWMW5432.js.map → chunk-V7FYSZSV.js.map} +1 -1
- package/dist/chunk-VMDA2SX2.js +43 -0
- package/dist/chunk-VMDA2SX2.js.map +1 -0
- package/dist/{chunk-V4HURNMX.js → chunk-W6HKWISZ.js} +2 -2
- package/dist/{chunk-GMNKJXTR.js → chunk-Z3RKXKE2.js} +2 -2
- package/dist/{chunk-GMNKJXTR.js.map → chunk-Z3RKXKE2.js.map} +1 -1
- package/dist/{chunk-42DCRKUD.js → chunk-ZZQMR526.js} +12 -12
- package/dist/cli.js +1 -1
- package/dist/client-QALLJG62.js +2 -0
- package/dist/config-TNNODULV.js +2 -0
- package/dist/config-mutator-RI77M5YT.js +2 -0
- package/dist/doctor-DW27MR2T.js +2 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +1 -1
- package/dist/processes-I3XAPHG7.js +2 -0
- package/dist/program-WZ3GEOXO.js +2 -0
- package/dist/query-7X6VO5VU.js +2 -0
- package/dist/{registry-EJRWAJYG.js → registry-LUMYXZ6F.js} +2 -2
- package/dist/request-planner-RNQB4L6F.js +2 -0
- package/dist/request-planner-RNQB4L6F.js.map +1 -0
- package/dist/{review-candidates-O2PS7L3B.js → review-candidates-ZX4JBWQL.js} +2 -2
- package/dist/{routing-5K7PGHPL.js → routing-5VGXQ4VG.js} +2 -2
- package/dist/scheduler-W5C43ZTE.js +2 -0
- package/dist/{seat-FZRNRAHQ.js → seat-SXPFROXT.js} +2 -2
- package/dist/{select-SOJYFAMI.js → select-GJ47QACY.js} +2 -2
- package/dist/{surface-usage-NS74AXSE.js → surface-usage-UREILT2E.js} +2 -2
- package/dist/web/activity-graph.global.js +901 -368
- package/dist/web/activity-graph.global.js.map +1 -1
- package/dist/wiki-SRH3JKI4.js +2 -0
- package/package.json +1 -1
- package/dist/board-dashboard-K4DM32SO.js.map +0 -1
- package/dist/chunk-45BLFNDG.js.map +0 -1
- package/dist/chunk-4BR7D2OU.js +0 -36
- package/dist/chunk-4BR7D2OU.js.map +0 -1
- package/dist/chunk-GUBMLV34.js.map +0 -1
- package/dist/client-5Z3URGPY.js +0 -2
- package/dist/config-ORSGLVRW.js +0 -2
- package/dist/config-mutator-JB3S2E7H.js +0 -2
- package/dist/doctor-FS2BX6H4.js +0 -2
- package/dist/processes-WU23U2OJ.js +0 -2
- package/dist/program-DWZAI4GY.js +0 -2
- package/dist/query-3HXGBKGM.js +0 -2
- package/dist/request-planner-BCOXUAPA.js +0 -2
- package/dist/request-planner-BCOXUAPA.js.map +0 -1
- package/dist/scheduler-DSAOMV4O.js +0 -2
- package/dist/wiki-34XVI32N.js +0 -2
- /package/dist/{App-IEQXWJ7B.js.map → App-6TP7YMQ3.js.map} +0 -0
- /package/dist/{ChatApp-NWOSAP5U.js.map → ChatApp-G2MQUBR3.js.map} +0 -0
- /package/dist/{agent-SPE7Q7MD.js.map → agent-A5G4DGVU.js.map} +0 -0
- /package/dist/{chunk-DI7FMCDK.js.map → chunk-2J3NV6RZ.js.map} +0 -0
- /package/dist/{chunk-UCQ2N3KO.js.map → chunk-2TJ5L7CB.js.map} +0 -0
- /package/dist/{chunk-FKBGJYWQ.js.map → chunk-3RHPZXCR.js.map} +0 -0
- /package/dist/{chunk-AUNDQPDR.js.map → chunk-6DD4DA2L.js.map} +0 -0
- /package/dist/{chunk-52ZPELD2.js.map → chunk-7CVJ4JOE.js.map} +0 -0
- /package/dist/{chunk-IVQO43U2.js.map → chunk-7JWYLSFF.js.map} +0 -0
- /package/dist/{chunk-JKYMXLYL.js.map → chunk-DLOYTMYZ.js.map} +0 -0
- /package/dist/{chunk-SC5DIKBB.js.map → chunk-FFDXDUVQ.js.map} +0 -0
- /package/dist/{chunk-UU4WOZNR.js.map → chunk-JJIYFBDH.js.map} +0 -0
- /package/dist/{chunk-EL3J74N2.js.map → chunk-JV52UMCI.js.map} +0 -0
- /package/dist/{chunk-Q7CZIRBB.js.map → chunk-NZ346QCV.js.map} +0 -0
- /package/dist/{chunk-4KXBUORV.js.map → chunk-R7WLFEW3.js.map} +0 -0
- /package/dist/{chunk-GK7XAM3D.js.map → chunk-UOGDSRG3.js.map} +0 -0
- /package/dist/{chunk-V4HURNMX.js.map → chunk-W6HKWISZ.js.map} +0 -0
- /package/dist/{chunk-42DCRKUD.js.map → chunk-ZZQMR526.js.map} +0 -0
- /package/dist/{client-5Z3URGPY.js.map → client-QALLJG62.js.map} +0 -0
- /package/dist/{config-ORSGLVRW.js.map → config-TNNODULV.js.map} +0 -0
- /package/dist/{config-mutator-JB3S2E7H.js.map → config-mutator-RI77M5YT.js.map} +0 -0
- /package/dist/{doctor-FS2BX6H4.js.map → doctor-DW27MR2T.js.map} +0 -0
- /package/dist/{processes-WU23U2OJ.js.map → processes-I3XAPHG7.js.map} +0 -0
- /package/dist/{program-DWZAI4GY.js.map → program-WZ3GEOXO.js.map} +0 -0
- /package/dist/{query-3HXGBKGM.js.map → query-7X6VO5VU.js.map} +0 -0
- /package/dist/{registry-EJRWAJYG.js.map → registry-LUMYXZ6F.js.map} +0 -0
- /package/dist/{review-candidates-O2PS7L3B.js.map → review-candidates-ZX4JBWQL.js.map} +0 -0
- /package/dist/{routing-5K7PGHPL.js.map → routing-5VGXQ4VG.js.map} +0 -0
- /package/dist/{scheduler-DSAOMV4O.js.map → scheduler-W5C43ZTE.js.map} +0 -0
- /package/dist/{seat-FZRNRAHQ.js.map → seat-SXPFROXT.js.map} +0 -0
- /package/dist/{select-SOJYFAMI.js.map → select-GJ47QACY.js.map} +0 -0
- /package/dist/{surface-usage-NS74AXSE.js.map → surface-usage-UREILT2E.js.map} +0 -0
- /package/dist/{wiki-34XVI32N.js.map → wiki-SRH3JKI4.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as s}from"./chunk-
|
|
2
|
+
import{a as s}from"./chunk-ZZQMR526.js";import"./chunk-2J3NV6RZ.js";import"./chunk-DLOYTMYZ.js";import"./chunk-NZ346QCV.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-7MNXKITO.js";import"./chunk-F6CNF7V3.js";import"./chunk-JV52UMCI.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-COOJI5SR.js";import"./chunk-7JWYLSFF.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-R7WLFEW3.js";import"./chunk-JJIYFBDH.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FFDXDUVQ.js";import"./chunk-UOGDSRG3.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-6DD4DA2L.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-W6HKWISZ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));async function o(){let r=await s();if(process.argv.slice(2).length===0){r.outputHelp();return}r.parse()}o();
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -4244,6 +4244,10 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4244
4244
|
* Setting this to 0 in active mode means the calibration report stops
|
|
4245
4245
|
* being trustworthy the day you promote the seat. */
|
|
4246
4246
|
explore: z.ZodDefault<z.ZodNumber>;
|
|
4247
|
+
/** Fraction of turns that bypass the seat as a randomized control group.
|
|
4248
|
+
* Unset lets the seat pick its own default; only seats that run an
|
|
4249
|
+
* experiment read it (today: request-gate, default 0.1). */
|
|
4250
|
+
holdout: z.ZodOptional<z.ZodNumber>;
|
|
4247
4251
|
}, "strip", z.ZodTypeAny, {
|
|
4248
4252
|
temperature: number;
|
|
4249
4253
|
mode: "active" | "off" | "shadow";
|
|
@@ -4251,6 +4255,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4251
4255
|
explore: number;
|
|
4252
4256
|
model?: string | undefined;
|
|
4253
4257
|
backend?: string | undefined;
|
|
4258
|
+
holdout?: number | undefined;
|
|
4254
4259
|
}, {
|
|
4255
4260
|
model?: string | undefined;
|
|
4256
4261
|
temperature?: number | undefined;
|
|
@@ -4258,6 +4263,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4258
4263
|
mode?: "active" | "off" | "shadow" | undefined;
|
|
4259
4264
|
timeoutMs?: number | undefined;
|
|
4260
4265
|
explore?: number | undefined;
|
|
4266
|
+
holdout?: number | undefined;
|
|
4261
4267
|
}>>>>;
|
|
4262
4268
|
/** Model routing driven by the task-tier seat. Models are scoped to their
|
|
4263
4269
|
* CLI engine; the legacy cheapModel applies only to Claude Code. */
|
|
@@ -4335,6 +4341,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4335
4341
|
explore: number;
|
|
4336
4342
|
model?: string | undefined;
|
|
4337
4343
|
backend?: string | undefined;
|
|
4344
|
+
holdout?: number | undefined;
|
|
4338
4345
|
}>;
|
|
4339
4346
|
routing: {
|
|
4340
4347
|
cheapModel?: string | undefined;
|
|
@@ -4392,6 +4399,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
4392
4399
|
mode?: "active" | "off" | "shadow" | undefined;
|
|
4393
4400
|
timeoutMs?: number | undefined;
|
|
4394
4401
|
explore?: number | undefined;
|
|
4402
|
+
holdout?: number | undefined;
|
|
4395
4403
|
} | undefined> | undefined;
|
|
4396
4404
|
routing?: {
|
|
4397
4405
|
cheapModel?: string | undefined;
|
|
@@ -5061,6 +5069,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5061
5069
|
explore: number;
|
|
5062
5070
|
model?: string | undefined;
|
|
5063
5071
|
backend?: string | undefined;
|
|
5072
|
+
holdout?: number | undefined;
|
|
5064
5073
|
}>;
|
|
5065
5074
|
routing: {
|
|
5066
5075
|
cheapModel?: string | undefined;
|
|
@@ -5628,6 +5637,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5628
5637
|
mode?: "active" | "off" | "shadow" | undefined;
|
|
5629
5638
|
timeoutMs?: number | undefined;
|
|
5630
5639
|
explore?: number | undefined;
|
|
5640
|
+
holdout?: number | undefined;
|
|
5631
5641
|
} | undefined> | undefined;
|
|
5632
5642
|
routing?: {
|
|
5633
5643
|
cheapModel?: string | undefined;
|
|
@@ -6079,6 +6089,13 @@ declare class AgentXDaemon {
|
|
|
6079
6089
|
* board-dashboard routes), but no transitions fire. */
|
|
6080
6090
|
private bootWorkflowEngine;
|
|
6081
6091
|
private startHttpApi;
|
|
6092
|
+
/**
|
|
6093
|
+
* Record an inbound dispatch in the intent ledger so the activity graph
|
|
6094
|
+
* sees it. Shared by /task, /ask and /send/agent; `context.channel` is
|
|
6095
|
+
* what the graph shows as the origin. Never throws — the legacy path
|
|
6096
|
+
* stays authoritative, so a ledger failure only costs visibility.
|
|
6097
|
+
*/
|
|
6098
|
+
private recordInboundDispatch;
|
|
6082
6099
|
/**
|
|
6083
6100
|
* Broadcast an SSE event to all connected clients.
|
|
6084
6101
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as L}from"./chunk-W5C2GDNC.js";import{B as bt,C as Tt,D as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-W5C2GDNC.js";import{B as bt,C as Tt,D as Mt,a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt}from"./chunk-7MNXKITO.js";import"./chunk-F6CNF7V3.js";import"./chunk-JV52UMCI.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import{J as yt,h as lt,i as ct,j as dt,k as mt,l as pt}from"./chunk-COOJI5SR.js";import"./chunk-7JWYLSFF.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import{h as ut}from"./chunk-R7WLFEW3.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-JJIYFBDH.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FFDXDUVQ.js";import"./chunk-UOGDSRG3.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import{a as gt,b as ft,e as ht}from"./chunk-6DD4DA2L.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-W6HKWISZ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import{j as it,k as rt,l as at}from"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-LCIREYTD.js";import{a as m,b as G}from"./chunk-L2WSPY6S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{e as tt,g as st,h as ot,j as nt}from"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
4
|
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-BOKE5M5S.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-ZZQMR526.js";import"./chunk-2J3NV6RZ.js";import"./chunk-DLOYTMYZ.js";import"./chunk-NZ346QCV.js";import"./chunk-2TJ5L7CB.js";import"./chunk-7CVJ4JOE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-7MNXKITO.js";import"./chunk-F6CNF7V3.js";import"./chunk-JV52UMCI.js";import"./chunk-V7FYSZSV.js";import"./chunk-ZVP6GB4G.js";import"./chunk-COOJI5SR.js";import"./chunk-7JWYLSFF.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-R7WLFEW3.js";import"./chunk-JJIYFBDH.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FFDXDUVQ.js";import"./chunk-UOGDSRG3.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-6DD4DA2L.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-W6HKWISZ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as buildProgram};
|
|
2
|
+
//# sourceMappingURL=program-WZ3GEOXO.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-W6HKWISZ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as agenticQuery};
|
|
2
|
+
//# sourceMappingURL=query-7X6VO5VU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g,H as h,I as i,J as j}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=registry-
|
|
1
|
+
import{A as a,B as b,C as c,D as d,E as e,F as f,G as g,H as h,I as i,J as j}from"./chunk-COOJI5SR.js";import"./chunk-7JWYLSFF.js";import"./chunk-VMDA2SX2.js";import"./chunk-QLTM3F7M.js";import"./chunk-R7WLFEW3.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FFDXDUVQ.js";import"./chunk-UOGDSRG3.js";import"./chunk-DWADWDMU.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-6DD4DA2L.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-W6HKWISZ.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-DSYKYZMT.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{j as AgentRegistry,e as TRACE_STEP_SUMMARY_BYTES,c as buildEntryMeta,d as buildWikiContext,f as clipForTrace,i as emitTraceStepsFromStreamEvent,h as firstMissingRequiredTool,b as getGlobalRegistry,a as setGlobalRegistry,g as tallyToolUses};
|
|
2
|
+
//# sourceMappingURL=registry-LUMYXZ6F.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{q as m,t as p,v as d,w as x}from"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as u,f}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";x();f();var l="request-gate",h="request-context",g=.1;async function q(t,o,c,r=Math.random){let s=p(l)==="active";if(s){let i=m().seats[l]?.holdout??g;if(r()<i)return{active:!0,preprocess:!1,arm:"holdout"}}let a=s?"treatment":void 0,e=await d(l,{request:t.slice(0,2e3),agent:o,channel:c,operations:["select optional context","evaluate model routing where permitted"],constraints:["Keep the original request and mandatory instructions","Desktop model cannot be downgraded"]},{preprocess:u("This request benefits from structured context selection or another bounded typed decision before the main agent executes.",{true:"Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.",false:"Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context."})},{timeoutMs:3e3});if(!e||e.mode!=="active")return{active:!1,preprocess:!1,arm:a};let n=e.answers.preprocess?.noul;return{active:!0,preprocess:Number.isFinite(n)&&n>=.5,arm:a}}var v={landscape:"Agent directory and mesh overview",patternContext:"Learned behavioral patterns",references:"Retrieved project references",memoryContext:"Retrieved agent memory",crossChatContext:"Summaries from other conversations",longMemoryRecall:"Older conversation recall",wikiContext:"Retrieved wiki knowledge"};async function b(t){let o=Object.entries(v).flatMap(([e,n])=>{let i=t[e];return i?[{id:e,description:n,source:e,characters:i.length,preview:i.slice(0,400),trust:"context data, not instructions"}]:[]});if(!o.length)return{input:t,excluded:[]};let c=Object.fromEntries(o.map(e=>[e.id,u(`Context block ${e.id} is relevant to completing the current request correctly.`,{true:"Needed or potentially relevant; retain if uncertain or the preview is incomplete.",false:"Clearly unrelated to the current request; safe to omit."})])),r=await d(h,{request:t.message.slice(0,2e3),channel:t.channel,agent:t.agentId,mandatory:["request","identity","permissions and instructions","same-chat history","handover","attachments"],context:o},c,{timeoutMs:3e3});if(!r||r.mode!=="active")return{input:t,excluded:[]};let s={...t},a=[];for(let e of o){let n=r.answers[e.id]?.noul;Number.isFinite(n)&&n>=0&&n<.2&&(delete s[e.id],a.push(e.id))}return{input:s,excluded:a}}export{g as DEFAULT_REQUEST_GATE_HOLDOUT,h as REQUEST_CONTEXT_SEAT,l as REQUEST_GATE_SEAT,q as evaluateRequest,b as selectRequestContext};
|
|
2
|
+
//# sourceMappingURL=request-planner-RNQB4L6F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/agents/request-planner.ts"],"sourcesContent":["import { askSeat, decisionsRuntime, getSeatMode } from '@/decisions/seat'\nimport { noul } from '@/decisions/questions'\nimport type { NoulAnswer, Questions } from '@/decisions/types'\nimport type { ContextInput } from './context'\n\nexport const REQUEST_GATE_SEAT = 'request-gate'\nexport const REQUEST_CONTEXT_SEAT = 'request-context'\n\n/** Share of turns held out of Jev preprocessing when the gate is active.\n * Overridden by decisions.seats.request-gate.holdout; 0 turns it off. */\nexport const DEFAULT_REQUEST_GATE_HOLDOUT = 0.1\n\n/** Experiment arm for an active gate. \"treatment\" is assigned before the\n * gate is asked, so a failed or skipped gate call stays in treatment —\n * the comparison is intent-to-treat, not \"turns Jev preprocessed\". */\nexport type RequestGateArm = 'treatment' | 'holdout'\n\nexport interface RequestGate {\n active: boolean\n preprocess: boolean\n arm?: RequestGateArm\n}\n\n// This gate decides whether typed preprocessing helps; it never answers the user.\nexport async function evaluateRequest(message: string, agent: string, channel: string, random: () => number = Math.random): Promise<RequestGate> {\n // The holdout is the \"without Jev\" control: no gate call, and the turn\n // proceeds exactly as a gate \"skip\" would — existing context, the agent's\n // own model, no context planner. Drawn before the call so it costs nothing.\n const assigned = getSeatMode(REQUEST_GATE_SEAT) === 'active'\n if (assigned) {\n const rate = decisionsRuntime().seats[REQUEST_GATE_SEAT]?.holdout ?? DEFAULT_REQUEST_GATE_HOLDOUT\n if (random() < rate) return { active: true, preprocess: false, arm: 'holdout' }\n }\n const arm: RequestGateArm | undefined = assigned ? 'treatment' : undefined\n const result = await askSeat(REQUEST_GATE_SEAT, {\n request: message.slice(0, 2000), agent, channel,\n operations: ['select optional context', 'evaluate model routing where permitted'],\n constraints: ['Keep the original request and mandatory instructions', 'Desktop model cannot be downgraded'],\n }, { preprocess: noul('This request benefits from structured context selection or another bounded typed decision before the main agent executes.', {\n true: 'Relevant context must be selected, or a bounded routing decision can help. Follow-ups and ambiguous references need context.',\n false: 'Typed preprocessing adds no useful decision; send the request to the configured main agent with existing context.',\n }) }, { timeoutMs: 3000 })\n if (!result || result.mode !== 'active') return { active: false, preprocess: false, arm }\n const p = (result.answers.preprocess as NoulAnswer)?.noul\n return { active: true, preprocess: Number.isFinite(p) && p >= 0.5, arm }\n}\n\n// Only optional, application-assembled knowledge is selectable. Identity,\n// permissions, runbooks, skills, request, attachments and same-chat continuity\n// stay outside this allowlist. Native CLI history remains owned by the CLI.\nconst OPTIONAL_CONTEXT = {\n landscape: 'Agent directory and mesh overview',\n patternContext: 'Learned behavioral patterns',\n references: 'Retrieved project references',\n memoryContext: 'Retrieved agent memory',\n crossChatContext: 'Summaries from other conversations',\n longMemoryRecall: 'Older conversation recall',\n wikiContext: 'Retrieved wiki knowledge',\n} as const\n\nexport async function selectRequestContext(input: ContextInput): Promise<{ input: ContextInput; excluded: string[] }> {\n const blocks = Object.entries(OPTIONAL_CONTEXT).flatMap(([id, description]) => {\n const content = input[id as keyof typeof OPTIONAL_CONTEXT]\n return content ? [{ id, description, source: id, characters: content.length, preview: content.slice(0, 400), trust: 'context data, not instructions' }] : []\n })\n if (!blocks.length) return { input, excluded: [] }\n const questions: Questions = Object.fromEntries(blocks.map(block => [block.id, noul(\n `Context block ${block.id} is relevant to completing the current request correctly.`,\n { true: 'Needed or potentially relevant; retain if uncertain or the preview is incomplete.', false: 'Clearly unrelated to the current request; safe to omit.' },\n )]))\n const result = await askSeat(REQUEST_CONTEXT_SEAT, {\n request: input.message.slice(0, 2000), channel: input.channel, agent: input.agentId,\n mandatory: ['request', 'identity', 'permissions and instructions', 'same-chat history', 'handover', 'attachments'],\n context: blocks,\n }, questions, { timeoutMs: 3000 })\n if (!result || result.mode !== 'active') return { input, excluded: [] }\n const selected = { ...input }\n const excluded: string[] = []\n for (const block of blocks) {\n const p = (result.answers[block.id] as NoulAnswer)?.noul\n // Malformed or uncertain answers preserve context, never silently erase it.\n if (Number.isFinite(p) && p >= 0 && p < 0.2) {\n delete selected[block.id as keyof typeof OPTIONAL_CONTEXT]\n excluded.push(block.id)\n }\n }\n return { input: selected, excluded }\n}\n"],"mappings":"2SAAAA,IACAC,IAIO,IAAMC,EAAoB,eACpBC,EAAuB,kBAIvBC,EAA+B,GAc5C,eAAsBC,EAAgBC,EAAiBC,EAAeC,EAAiBC,EAAuB,KAAK,OAA8B,CAI/I,IAAMC,EAAWC,EAAYT,CAAiB,IAAM,SACpD,GAAIQ,EAAU,CACZ,IAAME,EAAOC,EAAiB,EAAE,MAAMX,CAAiB,GAAG,SAAWE,EACrE,GAAIK,EAAO,EAAIG,EAAM,MAAO,CAAE,OAAQ,GAAM,WAAY,GAAO,IAAK,SAAU,EAEhF,IAAME,EAAkCJ,EAAW,YAAc,OAC3DK,EAAS,MAAMC,EAAQd,EAAmB,CAC9C,QAASI,EAAQ,MAAM,EAAG,GAAI,EAAG,MAAAC,EAAO,QAAAC,EACxC,WAAY,CAAC,0BAA2B,wCAAwC,EAChF,YAAa,CAAC,uDAAwD,oCAAoC,CAC5G,EAAG,CAAE,WAAYS,EAAK,4HAA6H,CACjJ,KAAM,+HACN,MAAO,mHACT,CAAC,CAAE,EAAG,CAAE,UAAW,GAAK,CAAC,EACzB,GAAI,CAACF,GAAUA,EAAO,OAAS,SAAU,MAAO,CAAE,OAAQ,GAAO,WAAY,GAAO,IAAAD,CAAI,EACxF,IAAMI,EAAKH,EAAO,QAAQ,YAA2B,KACrD,MAAO,CAAE,OAAQ,GAAM,WAAY,OAAO,SAASG,CAAC,GAAKA,GAAK,GAAK,IAAAJ,CAAI,CACzE,CAKA,IAAMK,EAAmB,CACvB,UAAW,oCACX,eAAgB,8BAChB,WAAY,+BACZ,cAAe,yBACf,iBAAkB,qCAClB,iBAAkB,4BAClB,YAAa,0BACf,EAEA,eAAsBC,EAAqBC,EAA2E,CACpH,IAAMC,EAAS,OAAO,QAAQH,CAAgB,EAAE,QAAQ,CAAC,CAACI,EAAIC,CAAW,IAAM,CAC7E,IAAMC,EAAUJ,EAAME,CAAmC,EACzD,OAAOE,EAAU,CAAC,CAAE,GAAAF,EAAI,YAAAC,EAAa,OAAQD,EAAI,WAAYE,EAAQ,OAAQ,QAASA,EAAQ,MAAM,EAAG,GAAG,EAAG,MAAO,gCAAiC,CAAC,EAAI,CAAC,CAC7J,CAAC,EACD,GAAI,CAACH,EAAO,OAAQ,MAAO,CAAE,MAAAD,EAAO,SAAU,CAAC,CAAE,EACjD,IAAMK,EAAuB,OAAO,YAAYJ,EAAO,IAAIK,GAAS,CAACA,EAAM,GAAIV,EAC7E,iBAAiBU,EAAM,8DACvB,CAAE,KAAM,oFAAqF,MAAO,yDAA0D,CAChK,CAAC,CAAC,CAAC,EACGZ,EAAS,MAAMC,EAAQb,EAAsB,CACjD,QAASkB,EAAM,QAAQ,MAAM,EAAG,GAAI,EAAG,QAASA,EAAM,QAAS,MAAOA,EAAM,QAC5E,UAAW,CAAC,UAAW,WAAY,+BAAgC,oBAAqB,WAAY,aAAa,EACjH,QAASC,CACX,EAAGI,EAAW,CAAE,UAAW,GAAK,CAAC,EACjC,GAAI,CAACX,GAAUA,EAAO,OAAS,SAAU,MAAO,CAAE,MAAAM,EAAO,SAAU,CAAC,CAAE,EACtE,IAAMO,EAAW,CAAE,GAAGP,CAAM,EACtBQ,EAAqB,CAAC,EAC5B,QAAWF,KAASL,EAAQ,CAC1B,IAAMJ,EAAKH,EAAO,QAAQY,EAAM,EAAE,GAAkB,KAEhD,OAAO,SAAST,CAAC,GAAKA,GAAK,GAAKA,EAAI,KACtC,OAAOU,EAASD,EAAM,EAAmC,EACzDE,EAAS,KAAKF,EAAM,EAAE,GAG1B,MAAO,CAAE,MAAOC,EAAU,SAAAC,CAAS,CACrC","names":["init_seat","init_questions","REQUEST_GATE_SEAT","REQUEST_CONTEXT_SEAT","DEFAULT_REQUEST_GATE_HOLDOUT","evaluateRequest","message","agent","channel","random","assigned","getSeatMode","rate","decisionsRuntime","arm","result","askSeat","noul","p","OPTIONAL_CONTEXT","selectRequestContext","input","blocks","id","description","content","questions","block","selected","excluded"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b}from"./chunk-
|
|
1
|
+
import{b}from"./chunk-JV52UMCI.js";import"./chunk-VMDA2SX2.js";import"./chunk-EVWEG3VD.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";import{createHash as A}from"crypto";var v="review:",I={decisions:"project",warnings:"feedback",friction:"feedback",context:"reference"};function E(t,n,r){let s=A("sha1").update(r.trim().toLowerCase()).digest("hex").slice(0,10);return`${v}${t}/${n}@${s}`}function F(t){if(!t.startsWith(v))return null;let n=t.slice(v.length),r=n.lastIndexOf("@"),s=n.lastIndexOf("/",r===-1?void 0:r);return r===-1||s===-1?null:{reviewId:n.slice(0,s),kind:n.slice(s+1,r),digest:n.slice(r+1)}}var C=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,48)||"finding";function L(t,n){return`${t}|${b(n)}`}function K(t,n={}){let r=n.kinds??Object.keys(I),s=n.minLength??24,h=[],d=new Map,u=new Map,f=new Map,x=new Map;for(let e of t){let i;try{i=JSON.parse(e.result)}catch{continue}let o=e.updated_at?new Date(e.updated_at).toISOString():new Date().toISOString();for(let c of r){let l=I[c];if(!l)continue;let R=i[c];if(Array.isArray(R))for(let $ of R){let a=String($?.text??"").trim();if(a.length<s)continue;let g=E(e.id,c,a),O=g.slice(g.lastIndexOf("@")),w=`${c}${O}`,y=L(c,a),k=f.get(y)??new Set;if(k.add(e.session_id??e.id),f.set(y,k),d.has(w))continue;let _=String($?.evidence??"").trim(),S={occurrences:1,agentId:e.agent,key:`${e.agent}/${l}_${C(a)}`,stamp:g,memory:{name:C(a),type:l,description:a.slice(0,200),body:"",createdAt:o,updatedAt:o}};x.set(g,{text:a,evidence:_,agent:e.agent,source:e.source}),d.set(w,S),u.set(w,y),h.push(S)}}}for(let[e,i]of d){i.occurrences=f.get(u.get(e)??"")?.size??1;let o=x.get(i.stamp);i.memory.body=T(o,i.occurrences)}let m=new Map;for(let[e,i]of d){let o=u.get(e)??e,c=m.get(o)??[];c.push(i),m.set(o,c)}let M=[...m.values()].sort((e,i)=>i[0].occurrences-e[0].occurrences),p=[];for(let e=0;p.length<h.length;e++){let i=!1;for(let o of M)e<o.length&&(p.push(o[e]),i=!0);if(!i)break}return p}function T(t,n){let r=`${t.agent}${t.source?` via ${t.source}`:""}`,s=[];return n>1?(s.push(`Observed in ${n} separate sessions. Most recently stated as:`),s.push(`> ${t.text}`),s.push(`Recurring across ${n} sessions is what makes this worth recording \u2014 any single occurrence is session state, the repetition is the finding.`)):s.push(t.text),t.evidence&&s.push(`**Evidence:** ${t.evidence}`),s.push(`_From ${n>1?"session reviews":"a session review"} of ${r}._`),s.join(`
|
|
2
2
|
|
|
3
3
|
`)}export{I as PROMOTABLE_KINDS,v as REVIEW_STAMP_PREFIX,F as parseReviewStamp,E as reviewStamp,K as reviewsToCandidates};
|
|
4
|
-
//# sourceMappingURL=review-candidates-
|
|
4
|
+
//# sourceMappingURL=review-candidates-ZX4JBWQL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=routing-
|
|
1
|
+
import{a,b}from"./chunk-UOGDSRG3.js";import"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as cheapModelForEngine,b as routeTaskModel};
|
|
2
|
+
//# sourceMappingURL=routing-5VGXQ4VG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as a,h as b}from"./chunk-R7WLFEW3.js";import"./chunk-FFDXDUVQ.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-FIOB3MEX.js";export{b as CronScheduler,a as getNextCronDate};
|
|
2
|
+
//# sourceMappingURL=scheduler-W5C43ZTE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=seat-
|
|
1
|
+
import{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i}from"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";i();export{h as askSeat,a as configureDecisions,c as decisionsRuntime,f as getSeatMode,d as parseSeatMode,g as recordSeatOutcome,b as resetDecisionsRuntime,e as seatEnvVar};
|
|
2
|
+
//# sourceMappingURL=seat-SXPFROXT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{v as S,w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=select-
|
|
1
|
+
import{v as S,w}from"./chunk-JC6ZHSTY.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-AJONZWLT.js";import{a as g,b as h,f as R}from"./chunk-F4HZTZHW.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import{d as f}from"./chunk-VDMYBPYB.js";import"./chunk-Z3RKXKE2.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";w();R();var p="skill-select";function y(l){return{task:d(l.task,1200),...l.agent?{agent:l.agent}:{},skills:l.candidates.map(t=>({name:t.name,purpose:d(t.description,300),...t.category?{category:t.category}:{},...t.tags?.length?{tags:t.tags.slice(0,8)}:{}}))}}function b(l){let t={};for(let i of l)t[i.name]=d(i.description,300);return{anyRelevant:g("At least one of these skills is about the task at hand.",{true:"The task is the kind of work one of these skills exists for, and following it would change how the work is done \u2014 it names the same system, the same procedure or the same kind of artefact.",false:"None of them is about this task. They may share vocabulary with it, mention the same tools, or belong to the same project without bearing on what is being asked. Sharing words with a task is not being about it."}),best:h(t,"Which skill is this task most about?")}}function v(l){let t=l.anyRelevant,i=l.best,o=Object.entries(i.probabilities??{}).map(([e,s])=>({name:e,p:Number(s)||0})).sort((e,s)=>s.p-e.p);return{anyRelevant:t.noul,name:i.choice,confidence:i.confidence,ranked:o}}function d(l,t){return l.length>t?`${l.slice(0,t)}\u2026`:l}var x=.1,A=12;async function E(l,t,i={}){let o=i.minRelevant??.6,e=f(l,t).filter(n=>n.relevance>=x).slice(0,A),s=e.map(n=>({name:n.skill.frontmatter.name,lexical:n.relevance}));if(e.length===0)return{skill:null,anyRelevant:0,confidence:0,shortlist:s,judged:!1,reason:"no skill mentions anything in this task"};if(e.length===1)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`only ${e[0].skill.frontmatter.name} matched (${e[0].matchReason})`};let r=e.map(n=>({name:n.skill.frontmatter.name,description:n.skill.frontmatter.description,category:n.skill.frontmatter.category??null,tags:n.skill.frontmatter.tags})),m=await S(p,y({task:t,agent:i.agent??null,candidates:r}),b(r),{incumbent:{best:r[0].name},features:{agent:i.agent??"unknown",candidates:r.length}});if(!m)return{skill:e[0].skill,anyRelevant:e[0].relevance,confidence:e[0].relevance,shortlist:s,judged:!1,reason:`seat off \u2014 lexical top match (${e[0].matchReason})`};let a=v(m.answers),c=s.map(n=>({...n,p:a.ranked.find(k=>k.name===n.name)?.p??0})).sort((n,k)=>(k.p??0)-(n.p??0));if(a.anyRelevant<o)return{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`nothing on the shortlist is about this task (${a.anyRelevant.toFixed(2)} below ${o})`};let u=e.find(n=>n.skill.frontmatter.name===a.name);return u?{skill:u.skill,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`${a.name} (confidence ${a.confidence.toFixed(2)})`}:{skill:null,anyRelevant:a.anyRelevant,confidence:a.confidence,shortlist:c,judged:!0,reason:`seat chose "${a.name}", which was not on the shortlist`}}export{E as pickSkillForTask};
|
|
2
|
+
//# sourceMappingURL=select-GJ47QACY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=surface-usage-
|
|
1
|
+
import{a,b,c,d}from"./chunk-2TJ5L7CB.js";import"./chunk-QLTM3F7M.js";import"./chunk-FIOB3MEX.js";export{c as commandPath,b as listSurfaceUse,a as recordSurfaceUse,d as shouldRecordCommand};
|
|
2
|
+
//# sourceMappingURL=surface-usage-UREILT2E.js.map
|