agentix-cli 0.27.0 → 0.28.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/README.md +67 -118
- package/apps/mac-helper/Sources/AgentXHelper/AXTree.swift +159 -0
- package/apps/mac-helper/Sources/AgentXHelper/Brand.swift +63 -0
- package/apps/mac-helper/Sources/AgentXHelper/Focus.swift +97 -0
- package/apps/mac-helper/Sources/AgentXHelper/HUD.swift +179 -0
- package/apps/mac-helper/Sources/AgentXHelper/OCR.swift +117 -0
- package/apps/mac-helper/Sources/AgentXHelper/Pointer.swift +309 -0
- package/apps/mac-helper/Sources/AgentXHelper/Screens.swift +67 -0
- package/apps/mac-helper/Sources/AgentXHelper/Typer.swift +185 -0
- package/apps/mac-helper/Sources/AgentXHelper/Vision.swift +201 -0
- package/apps/mac-helper/Sources/AgentXHelper/main.swift +265 -0
- package/apps/mac-helper/build.sh +39 -0
- package/apps/mac-voice/Resources/Info.plist +18 -0
- package/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +108 -0
- package/apps/mac-voice/Sources/AgentXVoice/Brand.swift +123 -0
- package/apps/mac-voice/Sources/AgentXVoice/Config.swift +68 -0
- package/apps/mac-voice/Sources/AgentXVoice/Hold.swift +74 -0
- package/apps/mac-voice/Sources/AgentXVoice/Hotkey.swift +76 -0
- package/apps/mac-voice/Sources/AgentXVoice/Markdown.swift +140 -0
- package/apps/mac-voice/Sources/AgentXVoice/Panel.swift +275 -0
- package/apps/mac-voice/Sources/AgentXVoice/Progress.swift +147 -0
- package/apps/mac-voice/Sources/AgentXVoice/Recorder.swift +139 -0
- package/apps/mac-voice/Sources/AgentXVoice/ResultCard.swift +162 -0
- package/apps/mac-voice/Sources/AgentXVoice/SmartPaste.swift +72 -0
- package/apps/mac-voice/Sources/AgentXVoice/Speech.swift +192 -0
- package/apps/mac-voice/Sources/AgentXVoice/StepLabel.swift +159 -0
- package/apps/mac-voice/Sources/AgentXVoice/main.swift +380 -0
- package/apps/mac-voice/build.sh +32 -0
- package/dist/{App-U52IPUK2.js → App-CKPH3HHF.js} +2 -2
- package/dist/{ChatApp-XP4OMHPL.js → ChatApp-MX7IG4K2.js} +2 -2
- package/dist/{agent-V2CA4TXD.js → agent-2U574KBZ.js} +2 -2
- package/dist/{board-dashboard-TTMAYRLG.js → board-dashboard-QR7CVTKA.js} +8 -10
- package/dist/board-dashboard-QR7CVTKA.js.map +1 -0
- package/dist/{chunk-UFAGYX73.js → chunk-3LYM22IV.js} +8 -8
- package/dist/chunk-3LYM22IV.js.map +1 -0
- package/dist/{chunk-VTE7L6LO.js → chunk-5IA2CYHN.js} +2 -2
- package/dist/{chunk-GDWJUGB5.js → chunk-64CAIB3C.js} +2 -2
- package/dist/{chunk-WZ72HX5C.js → chunk-E3UJHQGN.js} +145 -138
- package/dist/chunk-E3UJHQGN.js.map +1 -0
- package/dist/{chunk-IB3F7VBE.js → chunk-G2HMRDUQ.js} +3 -3
- package/dist/chunk-G2HMRDUQ.js.map +1 -0
- package/dist/{chunk-IBUSGCLQ.js → chunk-H2QQU2XV.js} +2 -2
- package/dist/{chunk-BPIRO4YD.js → chunk-MHIMGM4G.js} +2 -2
- package/dist/{chunk-CJQQIRPD.js → chunk-P5ZBBEPL.js} +7 -7
- package/dist/{chunk-CJQQIRPD.js.map → chunk-P5ZBBEPL.js.map} +1 -1
- package/dist/{chunk-L2IZPR6P.js → chunk-QHTQPBHU.js} +2 -2
- package/dist/chunk-S2MNL5V6.js +2 -0
- package/dist/chunk-S2MNL5V6.js.map +1 -0
- package/dist/{chunk-2T5W3ETS.js → chunk-SCTIUFL4.js} +2 -2
- package/dist/{chunk-OPHIXXGI.js → chunk-ULLAE6LE.js} +52 -52
- package/dist/chunk-ULLAE6LE.js.map +1 -0
- package/dist/{chunk-LNRB5MCU.js → chunk-VIH7ARPF.js} +151 -134
- package/dist/chunk-VIH7ARPF.js.map +1 -0
- package/dist/{chunk-DCDQZR7I.js → chunk-YLBERT7N.js} +6 -6
- package/dist/chunk-YLBERT7N.js.map +1 -0
- package/dist/{chunk-AX2PWSRT.js → chunk-YLGIZRHV.js} +2 -2
- package/dist/{chunk-FIEJDZVC.js → chunk-ZMYGXHPT.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client-ZLSXGPTV.js +2 -0
- package/dist/config-HMW3EBZL.js +2 -0
- package/dist/config-mutator-4SZ5YEVD.js +2 -0
- package/dist/doctor-LRYV3QLK.js +2 -0
- package/dist/index.d.ts +37 -12
- package/dist/index.js +12 -19
- package/dist/index.js.map +1 -1
- package/dist/program-GSZ5AYAM.js +2 -0
- package/dist/query-SQDHE4HV.js +2 -0
- package/dist/registry-LE6FWYZC.js +2 -0
- package/dist/{review-candidates-AEUXRQQC.js → review-candidates-RQU5KNZM.js} +2 -2
- package/dist/routing-ILERJXB6.js +2 -0
- package/dist/scheduler-BFM3EINS.js +2 -0
- package/dist/{seat-VZ7AVO27.js → seat-7WM7II2B.js} +2 -2
- package/dist/{select-F5I5PO2O.js → select-X4KVMOP5.js} +2 -2
- package/dist/wiki-2AUFSIKO.js +2 -0
- package/dist/wiki-2AUFSIKO.js.map +1 -0
- package/package.json +14 -3
- package/scripts/postinstall.mjs +80 -0
- package/dist/board-dashboard-TTMAYRLG.js.map +0 -1
- package/dist/chunk-DCDQZR7I.js.map +0 -1
- package/dist/chunk-IB3F7VBE.js.map +0 -1
- package/dist/chunk-LNRB5MCU.js.map +0 -1
- package/dist/chunk-OPHIXXGI.js.map +0 -1
- package/dist/chunk-UFAGYX73.js.map +0 -1
- package/dist/chunk-WZ72HX5C.js.map +0 -1
- package/dist/client-PX25MD47.js +0 -2
- package/dist/config-HL5F36V4.js +0 -2
- package/dist/config-mutator-HBX53OMJ.js +0 -2
- package/dist/doctor-PBAH6XL3.js +0 -2
- package/dist/program-YGXVCV2Y.js +0 -2
- package/dist/query-ZKTFJMNE.js +0 -2
- package/dist/registry-PSZDPFZK.js +0 -2
- package/dist/routing-4PV66BK6.js +0 -2
- package/dist/routing-4PV66BK6.js.map +0 -1
- package/dist/scheduler-GZZAN6ZG.js +0 -2
- package/dist/wiki-N5SMP3DT.js +0 -2
- /package/dist/{App-U52IPUK2.js.map → App-CKPH3HHF.js.map} +0 -0
- /package/dist/{ChatApp-XP4OMHPL.js.map → ChatApp-MX7IG4K2.js.map} +0 -0
- /package/dist/{agent-V2CA4TXD.js.map → agent-2U574KBZ.js.map} +0 -0
- /package/dist/{chunk-VTE7L6LO.js.map → chunk-5IA2CYHN.js.map} +0 -0
- /package/dist/{chunk-GDWJUGB5.js.map → chunk-64CAIB3C.js.map} +0 -0
- /package/dist/{chunk-IBUSGCLQ.js.map → chunk-H2QQU2XV.js.map} +0 -0
- /package/dist/{chunk-BPIRO4YD.js.map → chunk-MHIMGM4G.js.map} +0 -0
- /package/dist/{chunk-L2IZPR6P.js.map → chunk-QHTQPBHU.js.map} +0 -0
- /package/dist/{chunk-2T5W3ETS.js.map → chunk-SCTIUFL4.js.map} +0 -0
- /package/dist/{chunk-AX2PWSRT.js.map → chunk-YLGIZRHV.js.map} +0 -0
- /package/dist/{chunk-FIEJDZVC.js.map → chunk-ZMYGXHPT.js.map} +0 -0
- /package/dist/{client-PX25MD47.js.map → client-ZLSXGPTV.js.map} +0 -0
- /package/dist/{config-HL5F36V4.js.map → config-HMW3EBZL.js.map} +0 -0
- /package/dist/{config-mutator-HBX53OMJ.js.map → config-mutator-4SZ5YEVD.js.map} +0 -0
- /package/dist/{doctor-PBAH6XL3.js.map → doctor-LRYV3QLK.js.map} +0 -0
- /package/dist/{program-YGXVCV2Y.js.map → program-GSZ5AYAM.js.map} +0 -0
- /package/dist/{query-ZKTFJMNE.js.map → query-SQDHE4HV.js.map} +0 -0
- /package/dist/{registry-PSZDPFZK.js.map → registry-LE6FWYZC.js.map} +0 -0
- /package/dist/{review-candidates-AEUXRQQC.js.map → review-candidates-RQU5KNZM.js.map} +0 -0
- /package/dist/{scheduler-GZZAN6ZG.js.map → routing-ILERJXB6.js.map} +0 -0
- /package/dist/{seat-VZ7AVO27.js.map → scheduler-BFM3EINS.js.map} +0 -0
- /package/dist/{wiki-N5SMP3DT.js.map → seat-7WM7II2B.js.map} +0 -0
- /package/dist/{select-F5I5PO2O.js.map → select-X4KVMOP5.js.map} +0 -0
package/dist/client-PX25MD47.js
DELETED
package/dist/config-HL5F36V4.js
DELETED
package/dist/doctor-PBAH6XL3.js
DELETED
package/dist/program-YGXVCV2Y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-LNRB5MCU.js";import"./chunk-VTE7L6LO.js";import"./chunk-UFAGYX73.js";import"./chunk-UCQ2N3KO.js";import"./chunk-52ZPELD2.js";import"./chunk-IB3F7VBE.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-WZ72HX5C.js";import"./chunk-F6CNF7V3.js";import"./chunk-DCDQZR7I.js";import"./chunk-IWMW5432.js";import"./chunk-ZVP6GB4G.js";import"./chunk-OPHIXXGI.js";import"./chunk-GDWJUGB5.js";import"./chunk-M4AMWP3H.js";import"./chunk-4BR7D2OU.js";import"./chunk-BPIRO4YD.js";import"./chunk-SFQUP3BP.js";import"./chunk-3SCPRYJB.js";import"./chunk-I3SIXTJO.js";import"./chunk-67Q4DCPS.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FIEJDZVC.js";import"./chunk-2T5W3ETS.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-IBUSGCLQ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-L2IZPR6P.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-AX2PWSRT.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-QOYAX2FT.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-CJQQIRPD.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as buildProgram};
|
|
2
|
-
//# sourceMappingURL=program-YGXVCV2Y.js.map
|
package/dist/query-ZKTFJMNE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-L2IZPR6P.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-AX2PWSRT.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-CJQQIRPD.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{a as agenticQuery};
|
|
2
|
-
//# sourceMappingURL=query-ZKTFJMNE.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as e,B as f,C as g,D as h,E as i,F as j,w as a,x as b,y as c,z as d}from"./chunk-OPHIXXGI.js";import"./chunk-GDWJUGB5.js";import"./chunk-M4AMWP3H.js";import"./chunk-4BR7D2OU.js";import"./chunk-67Q4DCPS.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-FIEJDZVC.js";import"./chunk-2T5W3ETS.js";import"./chunk-77OV7346.js";import"./chunk-VWTBHLMX.js";import"./chunk-IBUSGCLQ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-L2IZPR6P.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-AX2PWSRT.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-QOYAX2FT.js";import"./chunk-WPMX3VGI.js";import"./chunk-K33GIBSE.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-DSYKYZMT.js";import"./chunk-CJQQIRPD.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-PSZDPFZK.js.map
|
package/dist/routing-4PV66BK6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as l,w as p}from"./chunk-AX2PWSRT.js";import"./chunk-AJONZWLT.js";import{a as i,f as w}from"./chunk-F4HZTZHW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-CJQQIRPD.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";p();w();var u="task-tier";function g(e){return{task:m(e.message,2e3),agent:e.agent,channel:e.channel??null,continuesExistingSession:e.isFollowUp??!1,...e.toolsAvailable?{toolsAvailable:e.toolsAvailable}:{}}}var d={needsFlagship:i("This task needs the strongest available model to be done correctly.",{true:"Doing it well takes real reasoning: writing or reviewing code, diagnosing a failure, planning work across several steps, weighing a judgement, handling money, touching production or anything irreversible, following a long or ambiguous instruction, or work where being subtly wrong would not be noticed. Anything where a weaker model would produce something that LOOKS right belongs here.",false:"It is mechanical and its result is obvious on sight: acknowledging or confirming a message, restating or formatting something already written, a greeting, a status echo, reading one file and reporting what it says, a lookup with one right answer, a scheduled heartbeat with nothing to decide."})};function h(e){return e.needsFlagship.noul}function m(e,n){return e.length>n?`${e.slice(0,n)}\u2026`:e}var c=.2,T=60*60*1e3;async function F(e){let n=(r,o=null)=>({downgraded:!1,needsFlagship:o,reason:r});if(!e.cheapModel)return n("no cheaper model configured");if(e.isFollowUp){let r=e.sessionIdleMs??0,o=e.cacheTtlMs??T;if(r<o)return n(`follow-up on a warm cache (idle ${Math.round(r/1e3)}s) \u2014 swapping would cost more than it saves`)}let s;try{s=await l(u,g(e),d,{incumbent:{needsFlagship:1},features:{agent:e.agent,channel:e.channel??"unknown"}})}catch{return n("routing seat threw \u2014 keeping the flagship")}if(!s)return n("routing seat unavailable \u2014 keeping the flagship");let t=h(s.answers);if(s.mode!=="active")return n(`shadow \u2014 would ${t<(e.threshold??c)?"downgrade":"keep"} (${t.toFixed(2)})`,t);let a=e.threshold??c;return t>=a?n(`needs the flagship (${t.toFixed(2)})`,t):{model:e.cheapModel,downgraded:!0,needsFlagship:t,reason:`mechanical task (${t.toFixed(2)} below ${a}) \u2192 ${e.cheapModel}`}}export{F as routeTaskModel};
|
|
2
|
-
//# sourceMappingURL=routing-4PV66BK6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/agents/routing.ts","../src/decisions/seats/task-tier.ts"],"sourcesContent":["import { askSeat } from \"@/decisions/seat\"\nimport {\n TASK_TIER_SEAT,\n taskTierQuestions,\n taskTierState,\n needsFlagship,\n type TaskTierAnswers,\n type TaskTierInput,\n} from \"@/decisions/seats/task-tier\"\n\n// Picking a cheaper model for work that does not need an expensive one.\n//\n// The policy, in one line: keep the flagship unless the seat is ACTIVE and\n// confidently says the task is mechanical.\n//\n// Every branch that is not that leads to the flagship — seat off, seat in\n// shadow, backend unreachable, answer above the threshold, no cheap model\n// configured, a follow-up turn. That is not defensiveness for its own\n// sake. Downgrading is invisible in the output: the reply still arrives,\n// still reads fluently, and is simply worse in ways nobody checks. An\n// outage that silently made the whole fleet dumber would cost far more\n// than the tokens it saved, so the failure has to land on the expensive\n// side.\n//\n// Follow-ups are where this gets interesting, and the answer is\n// arithmetic rather than caution.\n//\n// Switching models mid-session is mechanically trivial — the session is a\n// transcript and the model is a per-invocation flag, which is exactly what\n// Claude Code's /model does. The cost is that the PROMPT CACHE IS PER\n// MODEL. Resuming on a different model means that model has no cache for\n// the transcript and reads all of it at full price.\n//\n// Published rates, opus-5 against haiku-4.5:\n//\n// opus cached read $0.50/M haiku uncached read $1.00/M\n// opus output $25.00/M haiku output $5.00/M\n//\n// So the swap costs 2x more on input and saves $20/M on output, and it is\n// cheaper only when\n//\n// session_tokens < 40 x reply_tokens\n//\n// A task worth downgrading is by definition one whose answer is short —\n// an acknowledgement, a status echo. Ten tokens of reply puts the\n// break-even at a 400-token session. On any real conversation the swap\n// LOSES, and it loses precisely on the traffic this seat exists to catch.\n//\n// That reverses once the cache is COLD. After the cache TTL there is no\n// cached read to give up: opus pays $5.00/M and haiku $1.00/M, and the\n// cheap model wins outright. So a follow-up is routable exactly when the\n// session has been idle long enough that nothing is cached any more.\n\n/** Below this P(needs the strongest model), a cheaper one will do.\n *\n * Low on purpose. This is not the point at which a small model becomes\n * adequate — it is the point past which being wrong is cheap, and the\n * asymmetry between \"saved a fraction of a cent\" and \"gave a subtly wrong\n * answer nobody caught\" is not close. */\nconst DOWNGRADE_BELOW = 0.2\n\n/** How long a cached prefix is assumed to live. Anthropic's default TTL is\n * five minutes with a one-hour option; an hour is assumed here because it\n * is the assumption whose error is cheap — see the note above. */\nconst CACHE_TTL_MS = 60 * 60 * 1000\n\nexport interface RouteResult {\n /** The model to use, or undefined to leave the agent's own default. */\n model?: string\n /** True when this call moved the task off the flagship. */\n downgraded: boolean\n /** P(needs the strongest model), or null when nothing was asked. */\n needsFlagship: number | null\n reason: string\n}\n\nexport interface RouteOptions extends TaskTierInput {\n /** The model to drop to. Usually from config; no downgrade without it. */\n cheapModel?: string | null\n threshold?: number\n /** Idle time on the session being resumed, or null when starting fresh.\n * Only consulted for follow-ups. */\n sessionIdleMs?: number | null\n /** How long a cached prefix is assumed to survive. */\n cacheTtlMs?: number\n}\n\n/**\n * Decide whether this task can run on a cheaper model.\n *\n * Never throws and never blocks: a routing decision must not be able to\n * stop a task from running.\n */\nexport async function routeTaskModel(opts: RouteOptions): Promise<RouteResult> {\n const keep = (reason: string, p: number | null = null): RouteResult => ({\n downgraded: false, needsFlagship: p, reason,\n })\n\n if (!opts.cheapModel) return keep(\"no cheaper model configured\")\n\n // A follow-up onto a WARM cache is the losing case above. Idle longer\n // than the TTL and there is nothing left to lose, so it is routable.\n //\n // One hour, not the five-minute default, because the assumption has to\n // be the one that fails safely: over-estimating how long the cache lives\n // means occasionally keeping the flagship when a swap would have been\n // free, while under-estimating means routinely paying double on input.\n if (opts.isFollowUp) {\n const idle = opts.sessionIdleMs ?? 0\n const ttl = opts.cacheTtlMs ?? CACHE_TTL_MS\n if (idle < ttl) {\n return keep(`follow-up on a warm cache (idle ${Math.round(idle / 1000)}s) — swapping would cost more than it saves`)\n }\n }\n\n let result\n try {\n result = await askSeat(\n TASK_TIER_SEAT,\n taskTierState(opts),\n taskTierQuestions,\n {\n // The incumbent is \"always flagship\", which is what this has to beat.\n incumbent: { needsFlagship: 1 },\n features: { agent: opts.agent, channel: opts.channel ?? \"unknown\" },\n },\n )\n } catch {\n return keep(\"routing seat threw — keeping the flagship\")\n }\n\n if (!result) return keep(\"routing seat unavailable — keeping the flagship\")\n\n const p = needsFlagship(result.answers as TaskTierAnswers)\n\n // Shadow records the answer and changes nothing. This is the whole\n // point of a soak: the rows accumulate against real traffic while the\n // incumbent stays authoritative, so promotion is a decision made on\n // evidence rather than on how good the idea sounded.\n if (result.mode !== \"active\") {\n return keep(`shadow — would ${p < (opts.threshold ?? DOWNGRADE_BELOW) ? \"downgrade\" : \"keep\"} (${p.toFixed(2)})`, p)\n }\n\n const threshold = opts.threshold ?? DOWNGRADE_BELOW\n if (p >= threshold) return keep(`needs the flagship (${p.toFixed(2)})`, p)\n\n return {\n model: opts.cheapModel,\n downgraded: true,\n needsFlagship: p,\n reason: `mechanical task (${p.toFixed(2)} below ${threshold}) → ${opts.cheapModel}`,\n }\n}\n","import { noul } from \"../questions\"\nimport type { AnswersFor, NoulAnswer, StateValue } from \"../types\"\n\n// Whether a task needs the flagship model.\n//\n// Every claude-code agent on both nodes runs claude-opus-5. Much of what\n// they actually do is not hard: acknowledging a message, reading a file\n// and saying what is in it, restating a status, routing a mention. Those\n// turns cost flagship rates for work a small model finishes correctly.\n//\n// A single Noul, not a Choice over model names, and that is deliberate.\n// The models available differ per node, per tier and per provider, and a\n// Choice whose options are a fleet's current model list is a decision that\n// silently changes meaning every time someone edits config. The question\n// that stays stable is about the TASK: does this need the strongest model\n// available. Mapping that answer onto a specific model is policy, and\n// policy belongs in code where it can be read.\n//\n// Direction of failure is the whole design. A seat is fail-open by\n// contract — askSeat returns null when it is off or unreachable — and here\n// \"open\" must mean KEEP THE FLAGSHIP. A missing answer that quietly\n// downgrades a model would turn an outage into silently worse work across\n// the fleet, which is far more expensive than the tokens it saved. So the\n// caller only ever downgrades on an explicit, confident \"no\".\n\nexport const TASK_TIER_SEAT = \"task-tier\"\n\nexport interface TaskTierInput {\n /** The task, in the words it arrived in. */\n message: string\n agent: string\n /** Where it came from — a cron heartbeat and a customer message are not\n * the same kind of work even when they read alike. */\n channel?: string | null\n /** True when this continues an existing session. A follow-up inherits\n * the difficulty of what it is following up on, and switching models\n * mid-conversation is its own hazard. */\n isFollowUp?: boolean\n /** Tools the agent could reach for. A task that will touch production\n * is not a cheap task however simply it is phrased. */\n toolsAvailable?: number\n}\n\nexport function taskTierState(input: TaskTierInput): StateValue {\n return {\n task: clip(input.message, 2000),\n agent: input.agent,\n channel: input.channel ?? null,\n continuesExistingSession: input.isFollowUp ?? false,\n ...(input.toolsAvailable ? { toolsAvailable: input.toolsAvailable } : {}),\n }\n}\n\nexport const taskTierQuestions = {\n needsFlagship: noul(\n \"This task needs the strongest available model to be done correctly.\",\n {\n true:\n \"Doing it well takes real reasoning: writing or reviewing code, diagnosing a failure, planning work across several steps, weighing a judgement, handling money, touching production or anything irreversible, following a long or ambiguous instruction, or work where being subtly wrong would not be noticed. Anything where a weaker model would produce something that LOOKS right belongs here.\",\n false:\n \"It is mechanical and its result is obvious on sight: acknowledging or confirming a message, restating or formatting something already written, a greeting, a status echo, reading one file and reporting what it says, a lookup with one right answer, a scheduled heartbeat with nothing to decide.\",\n },\n ),\n}\n\nexport type TaskTierAnswers = AnswersFor<typeof taskTierQuestions>\n\nexport function needsFlagship(answers: TaskTierAnswers): number {\n return (answers.needsFlagship as NoulAnswer).noul\n}\n\nfunction clip(s: string, max: number): string {\n return s.length > max ? `${s.slice(0, max)}…` : s\n}\n"],"mappings":"kSAAAA,ICAAC,IAyBO,IAAMC,EAAiB,YAkBvB,SAASC,EAAcC,EAAkC,CAC9D,MAAO,CACL,KAAMC,EAAKD,EAAM,QAAS,GAAI,EAC9B,MAAOA,EAAM,MACb,QAASA,EAAM,SAAW,KAC1B,yBAA0BA,EAAM,YAAc,GAC9C,GAAIA,EAAM,eAAiB,CAAE,eAAgBA,EAAM,cAAe,EAAI,CAAC,CACzE,CACF,CAEO,IAAME,EAAoB,CAC/B,cAAeC,EACb,sEACA,CACE,KACE,sYACF,MACE,sSACJ,CACF,CACF,EAIO,SAASC,EAAcC,EAAkC,CAC9D,OAAQA,EAAQ,cAA6B,IAC/C,CAEA,SAASJ,EAAKK,EAAWC,EAAqB,CAC5C,OAAOD,EAAE,OAASC,EAAM,GAAGD,EAAE,MAAM,EAAGC,CAAG,UAAOD,CAClD,CDdA,IAAME,EAAkB,GAKlBC,EAAe,GAAK,GAAK,IA6B/B,eAAsBC,EAAeC,EAA0C,CAC7E,IAAMC,EAAO,CAACC,EAAgBC,EAAmB,QAAuB,CACtE,WAAY,GAAO,cAAeA,EAAG,OAAAD,CACvC,GAEA,GAAI,CAACF,EAAK,WAAY,OAAOC,EAAK,6BAA6B,EAS/D,GAAID,EAAK,WAAY,CACnB,IAAMI,EAAOJ,EAAK,eAAiB,EAC7BK,EAAML,EAAK,YAAcF,EAC/B,GAAIM,EAAOC,EACT,OAAOJ,EAAK,mCAAmC,KAAK,MAAMG,EAAO,GAAI,mDAA8C,EAIvH,IAAIE,EACJ,GAAI,CACFA,EAAS,MAAMC,EACbC,EACAC,EAAcT,CAAI,EAClBU,EACA,CAEE,UAAW,CAAE,cAAe,CAAE,EAC9B,SAAU,CAAE,MAAOV,EAAK,MAAO,QAASA,EAAK,SAAW,SAAU,CACpE,CACF,CACF,MAAE,CACA,OAAOC,EAAK,gDAA2C,CACzD,CAEA,GAAI,CAACK,EAAQ,OAAOL,EAAK,sDAAiD,EAE1E,IAAME,EAAIQ,EAAcL,EAAO,OAA0B,EAMzD,GAAIA,EAAO,OAAS,SAClB,OAAOL,EAAK,uBAAkBE,GAAKH,EAAK,WAAaH,GAAmB,YAAc,WAAWM,EAAE,QAAQ,CAAC,KAAMA,CAAC,EAGrH,IAAMS,EAAYZ,EAAK,WAAaH,EACpC,OAAIM,GAAKS,EAAkBX,EAAK,uBAAuBE,EAAE,QAAQ,CAAC,KAAMA,CAAC,EAElE,CACL,MAAOH,EAAK,WACZ,WAAY,GACZ,cAAeG,EACf,OAAQ,oBAAoBA,EAAE,QAAQ,CAAC,WAAWS,aAAgBZ,EAAK,YACzE,CACF","names":["init_seat","init_questions","TASK_TIER_SEAT","taskTierState","input","clip","taskTierQuestions","noul","needsFlagship","answers","s","max","DOWNGRADE_BELOW","CACHE_TTL_MS","routeTaskModel","opts","keep","reason","p","idle","ttl","result","askSeat","TASK_TIER_SEAT","taskTierState","taskTierQuestions","needsFlagship","threshold"]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as a,h as b}from"./chunk-FIEJDZVC.js";import"./chunk-2T5W3ETS.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-L2WSPY6S.js";import"./chunk-CJQQIRPD.js";import"./chunk-FIOB3MEX.js";export{b as CronScheduler,a as getNextCronDate};
|
|
2
|
-
//# sourceMappingURL=scheduler-GZZAN6ZG.js.map
|
package/dist/wiki-N5SMP3DT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./chunk-VWTBHLMX.js";import{e as a,f as b}from"./chunk-IBUSGCLQ.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import{a as c}from"./chunk-L2IZPR6P.js";import"./chunk-AJ5RMU7X.js";import"./chunk-EVWEG3VD.js";import"./chunk-AX2PWSRT.js";import"./chunk-AJONZWLT.js";import"./chunk-F4HZTZHW.js";import"./chunk-ZTEU5JVQ.js";import"./chunk-QOYAX2FT.js";import"./chunk-LCIREYTD.js";import"./chunk-L2WSPY6S.js";import"./chunk-CJQQIRPD.js";import"./chunk-BH3GTCZ6.js";import"./chunk-FIOB3MEX.js";export{b as WikiHub,a as WikiStore,c as agenticQuery};
|
|
2
|
-
//# sourceMappingURL=wiki-N5SMP3DT.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|