@kodax-ai/kodax 0.7.97-alpha.2 → 0.7.97-alpha.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/CHANGELOG.md +50 -0
- package/README.md +12 -0
- package/README_CN.md +10 -0
- package/dist/chunks/{agent-J7SHFM5N.js → agent-645TFOIP.js} +1 -1
- package/dist/chunks/argument-completer-E2WXYASE.js +2 -0
- package/dist/chunks/chunk-2GFHQXSQ.js +2 -0
- package/dist/chunks/{chunk-5DSUVP46.js → chunk-5MBERIKC.js} +1 -1
- package/dist/chunks/{chunk-VDGPJQL7.js → chunk-66EIFYTX.js} +58 -58
- package/dist/chunks/{chunk-QGWHJIO4.js → chunk-6UQU55ZY.js} +1 -1
- package/dist/chunks/{chunk-QOFFAY5C.js → chunk-A2TOLAR6.js} +2 -2
- package/dist/chunks/{chunk-K3DQGSQU.js → chunk-BCHQN42D.js} +63 -63
- package/dist/chunks/{chunk-4VJMQDTH.js → chunk-ES5NVJ5Q.js} +207 -207
- package/dist/chunks/{chunk-OT5WHAX4.js → chunk-FIAGK2PJ.js} +1 -1
- package/dist/chunks/{chunk-HSRYDDPF.js → chunk-GKL7MKUX.js} +1 -1
- package/dist/chunks/{chunk-QZ4B4AWG.js → chunk-HCIPPFUP.js} +2 -2
- package/dist/chunks/{chunk-5P7RTSZT.js → chunk-INRXUD6O.js} +1 -1
- package/dist/chunks/{chunk-RXDS6CNA.js → chunk-MVDUORC4.js} +5 -5
- package/dist/chunks/chunk-N5QCWFPS.js +498 -0
- package/dist/chunks/chunk-OESZ6SMM.js +22 -0
- package/dist/chunks/{chunk-7V2QBZ73.js → chunk-OYU3BRC2.js} +17 -17
- package/dist/chunks/{chunk-QVDTORL3.js → chunk-QHA33NDV.js} +1 -1
- package/dist/chunks/{chunk-3PS3YEDS.js → chunk-RQDYGACC.js} +1 -1
- package/dist/chunks/{chunk-VEZ4WHPN.js → chunk-SLB7XV2H.js} +3 -3
- package/dist/chunks/{chunk-ZPPAT25E.js → chunk-TELWDWO7.js} +1 -1
- package/dist/chunks/{chunk-ZZQ4GDVU.js → chunk-U6PGP3J7.js} +1 -1
- package/dist/chunks/{chunk-F7DHZH6T.js → chunk-UC336RNT.js} +1 -1
- package/dist/chunks/{chunk-ZTYZYXGV.js → chunk-ULASD2MC.js} +1 -1
- package/dist/chunks/{chunk-6ZAQKFIM.js → chunk-ZCVG76DC.js} +1 -1
- package/dist/chunks/{client-MXOJ5XUN.js → client-RVYGDO5B.js} +1 -1
- package/dist/chunks/{compaction-config-5VZSGKBQ.js → compaction-config-Y7TZIEHY.js} +1 -1
- package/dist/chunks/{construction-bootstrap-U2ZU2WAT.js → construction-bootstrap-SVI32SNN.js} +1 -1
- package/dist/chunks/{dist-CSLNWLOE.js → dist-CTC24FIH.js} +1 -1
- package/dist/chunks/dist-PNUWH5UP.js +2 -0
- package/dist/chunks/host-52BFKSCW.js +2 -0
- package/dist/chunks/readline-helpers-CD7PBK5V.js +2 -0
- package/dist/chunks/run-manager-DRGBGQAN.js +2 -0
- package/dist/chunks/{utils-MQEBGKIX.js → utils-5VLWSY6K.js} +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1518 -1518
- package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
- package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/sandbox-network-broker.js +17 -17
- package/dist/sdk-a2a.d.ts +14 -14
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +12 -12
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-client.d.ts +7 -7
- package/dist/sdk-client.js +1 -1
- package/dist/sdk-coding.d.ts +19 -19
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +2 -2
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +17 -17
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +16 -16
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +29 -29
- package/dist/types-chunks/{bash-prefix-extractor.d-DvswAXKS.d.ts → bash-prefix-extractor.d-DGDUe9GE.d.ts} +5 -3
- package/dist/types-chunks/{capsule.d-B4atvlxE.d.ts → capsule.d-CuGifYAb.d.ts} +4 -4
- package/dist/types-chunks/{client-contract-A1jdk6xz.d.ts → client-contract-CLFoIF6e.d.ts} +5 -3
- package/dist/types-chunks/{controller.d-yyKajPTi.d.ts → controller.d-0iRe3htV.d.ts} +2 -2
- package/dist/types-chunks/{controller.d-BkUJ_3sl.d.ts → controller.d-35RtCNle.d.ts} +1 -1
- package/dist/types-chunks/{history-retrieval.d-JdFfkeF3.d.ts → history-retrieval.d-DSM17KRG.d.ts} +1 -1
- package/dist/types-chunks/{manager.d-C_20XqCV.d.ts → manager.d-nZ57Ps91.d.ts} +1 -0
- package/dist/types-chunks/{manifest.d-Bw2i-zQi.d.ts → manifest.d-OTRwPHVt.d.ts} +1 -1
- package/dist/types-chunks/{provider-request-observation.d-jL8T6wVO.d.ts → provider-request-observation.d-C_bEqr4m.d.ts} +3 -1
- package/dist/types-chunks/{public-api.d-Cq8ILMte.d.ts → public-api.d-2Z-lKGae.d.ts} +4 -4
- package/dist/types-chunks/{review-inbox.d-BeaLRNHx.d.ts → review-inbox.d-CyVNw-vt.d.ts} +2 -0
- package/dist/types-chunks/{review-packet.d-D4bbTbq3.d.ts → review-packet.d-BvUTRcvS.d.ts} +1 -1
- package/dist/types-chunks/{run-manager.d-C7Q71rin.d.ts → run-manager.d-BT-uMJfl.d.ts} +5 -5
- package/dist/types-chunks/{runtime-client-info-CxnlZlW5.d.ts → runtime-client-info-CQUGs6HW.d.ts} +11 -3
- package/dist/types-chunks/{sdk-session-BDFjCpDn.d.ts → sdk-session-DEup-bg5.d.ts} +2 -2
- package/dist/types-chunks/{trusted-repl-entry-vbUM8R6P.d.ts → trusted-repl-entry-BBtWnXHM.d.ts} +7 -7
- package/dist/types-chunks/{types.d-BJTN-RZr.d.ts → types.d-DnbwVOHk.d.ts} +2 -2
- package/dist/types-chunks/{types.d-o7t9dds4.d.ts → types.d-gmpRHyNp.d.ts} +1 -1
- package/dist/types-chunks/{utils.d-CWiMhFfu.d.ts → utils.d-CBhRmKC4.d.ts} +6 -6
- package/docs/SPACE_SDK_SEAMS.md +31 -3
- package/package.json +1 -1
- package/dist/chunks/argument-completer-ZJQOWTIS.js +0 -2
- package/dist/chunks/chunk-2GV6MQ4T.js +0 -22
- package/dist/chunks/chunk-NO23K2CB.js +0 -2
- package/dist/chunks/chunk-ZS2GUADU.js +0 -498
- package/dist/chunks/dist-XXMJMJDU.js +0 -2
- package/dist/chunks/host-RUXYZFYN.js +0 -2
- package/dist/chunks/readline-helpers-JCVULR4C.js +0 -2
- package/dist/chunks/run-manager-DRIM5VNE.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,56 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## [0.7.97-alpha.3] - 2026-10-10
|
|
12
|
+
|
|
13
|
+
Third alpha of the v0.7.97 line: trusted Main can now bound Product
|
|
14
|
+
Workflows. `authorizeExecution` may return a `workflowHostPolicy`
|
|
15
|
+
(`maxAgents`, `tokenBudget`) without registering credential or hostTools
|
|
16
|
+
leases; the Host capability moves to `productExecutionAuthorization:2`.
|
|
17
|
+
Ceilings bind to Product Runs including their Workflow children, Workflow
|
|
18
|
+
spawn slots are reserved across concurrent admissions, and output usage is
|
|
19
|
+
published only when every executed round reported it. Every v0.7.96
|
|
20
|
+
stable and v0.7.97-alpha.1/alpha.2 contract is retained. npm publication
|
|
21
|
+
remains a manual maintainer action.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Trusted-Main Workflow ceilings: `workflowHostPolicy` (`maxAgents`,
|
|
26
|
+
`tokenBudget`) on `RuntimeExecutionAuthorization`, accepted policy-only
|
|
27
|
+
on `/client` inputs, queued consumes, and Skill/command/review derived
|
|
28
|
+
Runs; rejected on independent Actor admissions; Host capability
|
|
29
|
+
`productExecutionAuthorization:2`.
|
|
30
|
+
- Workflow `maxAgents` race safety: spawn slots are reserved synchronously
|
|
31
|
+
across pending backend admissions, so concurrent requests cannot exceed
|
|
32
|
+
the lifetime cap.
|
|
33
|
+
- Workflow output usage: finalized managed results carry aggregate
|
|
34
|
+
input/output usage; `outputTokens` is published only when every executed
|
|
35
|
+
round (including verification repair) reported its output usage.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Product Runs capture the Host `workflow.maxConcurrency` at start and use
|
|
40
|
+
the Host-owned workflow-runs directory; the client adapter strips forged
|
|
41
|
+
`workflowHostPolicy` fields from Product payloads.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Terminal Memory review drains no longer reclaim an unavailable preferred
|
|
46
|
+
job as backlog and steal startup recovery from the next Run (Issue 362).
|
|
47
|
+
- Clipboard helper input-pipe failures now enter the existing native/tmux/OSC
|
|
48
|
+
52 fallback instead of crashing mouse copy-on-select (Issue 363).
|
|
49
|
+
- MCP stdio sends observe asynchronous write failures and report them through
|
|
50
|
+
the awaited send and transport diagnostics; required initialization
|
|
51
|
+
notifications cannot turn a failed connection into ready (Issue 364).
|
|
52
|
+
- Workflow child budgets retain all reported Provider fallback attempts and
|
|
53
|
+
requests before a thrown attempt, including truncated continuations. Local
|
|
54
|
+
accounting reuses normalized request facts, preserves Host observers, and
|
|
55
|
+
keeps conservative totals when component usage is incomplete (Issue 365).
|
|
56
|
+
- The Host interrupt-fence and statistics fixtures wait for actual Provider entry, observe
|
|
57
|
+
early Run termination, and retain a bounded cleanup window (Issue 366).
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
11
61
|
## [0.7.97-alpha.2] - 2026-10-10
|
|
12
62
|
|
|
13
63
|
Second alpha of the v0.7.97 line: completes the FEATURE_298 product seams
|
package/README.md
CHANGED
|
@@ -769,6 +769,18 @@ provider's model, REPL `/compact` clears the UI only after a durable save, and
|
|
|
769
769
|
successful reports carry bounded `summaryRequests` plus `commitMs` per
|
|
770
770
|
physical summary call.
|
|
771
771
|
|
|
772
|
+
**v0.7.97-alpha.3 release:** Lets trusted Main bound Product Workflows.
|
|
773
|
+
`authorizeExecution` may return a `workflowHostPolicy` (`maxAgents`,
|
|
774
|
+
`tokenBudget`) without registering credential or hostTools leases, and the
|
|
775
|
+
Host capability moves to `productExecutionAuthorization:2`. Policy-only
|
|
776
|
+
authorizations bind to `/client` inputs, queued consumes, and
|
|
777
|
+
Skill/command/review derived Runs, never to independent Actor admissions;
|
|
778
|
+
Workflow spawn slots are reserved across concurrent admissions, and output
|
|
779
|
+
usage publishes only when every executed round reported it. See
|
|
780
|
+
[docs/SPACE_SDK_SEAMS.md](docs/SPACE_SDK_SEAMS.md) and the
|
|
781
|
+
[v0.7.97-alpha.3 release notes](docs/release.md#v0797-alpha3-release-preparation).
|
|
782
|
+
Every v0.7.96 stable and v0.7.97-alpha.1/alpha.2 contract is retained.
|
|
783
|
+
|
|
772
784
|
**v0.7.97-alpha.2 release:** Completes the FEATURE_298 product seams
|
|
773
785
|
embedders need to run the client inside a trusted shell (Space).
|
|
774
786
|
`connectKodaXClient`/`ensureKodaXClient` accept a trusted
|
package/README_CN.md
CHANGED
|
@@ -301,6 +301,16 @@ SDK 系统代码契约更新,但没有放宽 shell/sandbox 的 fail-closed 边
|
|
|
301
301
|
`handleRuntimePermissionRequest()` 管理 SDK 权限 UI,并在 prepared Session 尾部遇到
|
|
302
302
|
`data_changed` 时通过权威 delta 合并恢复;后台持久化失败会显示为诊断,不再静默丢失。
|
|
303
303
|
|
|
304
|
+
**v0.7.97-alpha.3 发布**:让可信 Main 为产品 Workflow 设定上限。
|
|
305
|
+
`authorizeExecution` 可以只返回 `workflowHostPolicy`(`maxAgents`、
|
|
306
|
+
`tokenBudget`),无需注册 credential 或 hostTools lease;宿主能力升级为
|
|
307
|
+
`productExecutionAuthorization:2`。仅策略的授权绑定 `/client` 输入、排队
|
|
308
|
+
消费与 Skill/command/review 派生 Run,从不绑定独立 Actor 准入;Workflow
|
|
309
|
+
spawn 名额在并发准入间同步预留,输出用量只在每个执行轮都上报时才发布。
|
|
310
|
+
详见 [docs/SPACE_SDK_SEAMS.md](docs/SPACE_SDK_SEAMS.md) 与
|
|
311
|
+
[v0.7.97-alpha.3 发布清单](docs/release.md#v0797-alpha3-release-preparation)。
|
|
312
|
+
所有 v0.7.96 稳定与 v0.7.97-alpha.1/alpha.2 契约全部保留。
|
|
313
|
+
|
|
304
314
|
**v0.7.97-alpha.2 发布**:补齐 FEATURE_298 面向嵌入方(Space)的产品接缝——
|
|
305
315
|
在可信壳内运行客户端所需的最后一块。`connectKodaXClient`/`ensureKodaXClient`
|
|
306
316
|
接受仅在可信 Main 进程执行的 `authorizeExecution` 回调,注册 scoped credential
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Ib as k,Xa as g,Za as h,a as c,sa as d,ta as e,ua as f,yb as i,zb as j}from"./chunk-
|
|
2
|
+
import{Ib as k,Xa as g,Za as h,a as c,sa as d,ta as e,ua as f,yb as i,zb as j}from"./chunk-BCHQN42D.js";import"./chunk-U6PGP3J7.js";import"./chunk-ES5NVJ5Q.js";import"./chunk-UC336RNT.js";import"./chunk-5MBERIKC.js";import{Rb as a,Sb as b}from"./chunk-66EIFYTX.js";import"./chunk-TELWDWO7.js";import"./chunk-OYU3BRC2.js";import"./chunk-ONUPGMER.js";export{e as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,f as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,c as emitResilienceDebug,d as estimateProviderPayloadBytes,k as runKodaX,j as saveRequiredSessionSnapshot,i as saveSessionSnapshot,a as validateAndFixToolHistory};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
+
import{$a as a,ab as b}from"./chunk-SLB7XV2H.js";import"./chunk-ZQYWDI4O.js";import"./chunk-A2TOLAR6.js";import"./chunk-6UQU55ZY.js";import"./chunk-HCIPPFUP.js";import"./chunk-BCHQN42D.js";import"./chunk-FIAGK2PJ.js";import"./chunk-U6PGP3J7.js";import"./chunk-OESZ6SMM.js";import"./chunk-ES5NVJ5Q.js";import"./chunk-UC336RNT.js";import"./chunk-5MBERIKC.js";import"./chunk-66EIFYTX.js";import"./chunk-TELWDWO7.js";import"./chunk-OYU3BRC2.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
+
import{F as x,G as C,a as p,b as u,f as v,m as h,n as y,o as m}from"./chunk-N5QCWFPS.js";import{q as w}from"./chunk-A2TOLAR6.js";import{_d as f}from"./chunk-66EIFYTX.js";import{a as t}from"./chunk-ONUPGMER.js";function g(s,c){let i=t(async e=>{let o=structuredClone(e.input);for(let a of["authorization","credential","hostTools","providerCredential","providerCredentialAccess","origin","trustedRunId","workflowHostPolicy"])delete o[a];let n=await c?.({...e,input:o},s);return{...o,...n===void 0?{}:{authorization:structuredClone(n)}}},"authorize");return{statistics:s.statistics??{read:t(async()=>{throw new Error("Execution facts require a compatible Host.")},"read"),readRequests:t(async()=>{throw new Error("Execution facts require a compatible Host.")},"readRequests"),readTools:t(async()=>{throw new Error("Execution facts require a compatible Host.")},"readTools")},lifecycle:s.lifecycle??{requestExit:t(async()=>{throw new Error("Client exit control requires a compatible daemon Host.")},"requestExit"),readExit:t(async()=>{throw new Error("Client exit control requires a compatible daemon Host.")},"readExit"),listPendingExits:t(async()=>{throw new Error("Client exit control requires a compatible daemon Host.")},"listPendingExits")},commands:{execute:t(async e=>s.invocations.executeCommand(await i({kind:"command",input:e})),"execute"),readPrompt:t(e=>s.invocations.readCommandPrompt(e),"readPrompt")},review:{start:t(async e=>s.invocations.startReview(await i({kind:"review",input:e})),"start")},host:{shutdown:t(()=>s.daemon!==void 0?s.daemon.shutdown():s.close().then(()=>({accepted:!0})),"shutdown")},sessions:{cancel:t(e=>s.sessions.cancel(e),"cancel"),create:t(e=>s.sessions.create(e),"create"),list:t(e=>s.sessions.list(e),"list"),read:t(e=>s.sessions.load(e),"read"),delete:t(e=>s.sessions.delete(e),"delete"),archive:t(e=>s.sessions.archive(e),"archive"),unarchive:t(e=>s.sessions.unarchive(e),"unarchive"),getAutoModeStats:t(async e=>await s.sessions.getAutoModeStats(e)??void 0,"getAutoModeStats"),getSettings:t(async e=>p(await s.sessions.getSettings(e)),"getSettings"),getSettingsVersioned:t(async e=>{let o=await s.sessions.getSettingsVersioned(e);return{revision:o.revision,value:p(o.value)}},"getSettingsVersioned"),updateSettingsVersioned:t(async(e,o,n)=>{let a=await s.sessions.updateSettingsVersioned(e,o,n);return{revision:a.revision,value:p(a.value)}},"updateSettingsVersioned"),updateSettings:t(async(e,o)=>p(await s.sessions.updateSettings(e,o)),"updateSettings"),observe:t((e,o,n)=>s.sessions.observeView(e,o,n),"observe"),readItem:t((e,o,n)=>s.sessions.readViewItem(e,o,n),"readItem"),readHistory:t((e,o)=>s.sessions.readHistory(e,o),"readHistory"),readHistoryEntry:t((e,o,n)=>s.sessions.readHistoryEntry(e,o,n),"readHistoryEntry"),searchHistory:t((e,o)=>s.sessions.searchHistory(e,o),"searchHistory"),readGoal:t(e=>s.sessions.readGoal(e),"readGoal"),createGoal:t((e,o)=>s.sessions.createGoal({sessionId:e,...o}),"createGoal"),pauseGoal:t(e=>s.sessions.pauseGoal(e),"pauseGoal"),resumeGoal:t(e=>s.sessions.resumeGoal(e),"resumeGoal"),clearGoal:t(e=>s.sessions.clearGoal(e),"clearGoal"),appendNotice:t(async(e,o)=>{if(!await s.sessions.appendNotice({sessionId:e,...o}))throw new Error("Host did not save the Session notice.")},"appendNotice"),readLineage:t(e=>s.sessions.readLineage(e),"readLineage"),labelEntry:t((e,o)=>s.sessions.labelEntry({sessionId:e,...o}),"labelEntry"),selectBranch:t((e,o,n)=>s.sessions.setActiveEntry({sessionId:e,entryId:o,...n}).then(a=>{if(a===null)throw Object.assign(new Error("No lineage entry matches the selector."),{code:"conflict"});return a}),"selectBranch"),rewindSession:t((e,o)=>s.sessions.rewind({sessionId:e,...o}).then(n=>{if(n===null)throw Object.assign(new Error("Rewind target no longer resolves."),{code:"conflict"});return n}),"rewindSession"),forkSession:t((e,o)=>s.sessions.fork({sessionId:e,...o??{}}).then(n=>{if(n===null)throw Object.assign(new Error("Fork boundary no longer resolves."),{code:"conflict"});return n}),"forkSession"),recoverSession:t((e,o)=>s.sessions.recover({sessionId:e,...o??{}}),"recoverSession"),compact:t(async(e,o)=>{let n=await i({kind:"compaction",input:{...o,sessionId:e}}),a=await s.sessions.compact({sessionId:n.sessionId,customInstructions:n.customInstructions,...n.authorization?.credential!==void 0?{credential:n.authorization.credential}:{}});return{compacted:a.compacted,messages:a.messages,tokensBefore:a.tokensBefore,tokensAfter:a.tokensAfter,...a.report!==void 0?{report:a.report}:{},...a.reason!==void 0?{reason:a.reason}:{}}},"compact")},learning:{list:t(e=>s.learning.list(e),"list"),get:t(e=>s.learning.get(e),"get"),getSnapshot:t(()=>s.learning.getSnapshot(),"getSnapshot"),events:t(e=>s.learning.events(e),"events"),subscribe:t(e=>s.learning.subscribe(e),"subscribe"),acknowledge:t(e=>s.learning.acknowledge(e),"acknowledge"),snooze:t((e,o)=>s.learning.snooze(e,o),"snooze"),reject:t(e=>s.learning.reject(e),"reject"),disable:t(e=>s.learning.disable(e),"disable"),rollback:t(e=>s.learning.rollback(e),"rollback"),promote:t((e,o)=>s.learning.promote(e,o),"promote"),review:t(e=>s.learning.review(e),"review"),trust:t(e=>s.learning.trust(e),"trust")},memory:{async forProject(e){let o=await s.memory.forProject(e);return{memoryRoot:o.memoryRoot,entrypointPath:o.entrypointPath,listReviews:t(()=>o.listReviews(),"listReviews"),reviewerProviderConfigured:t(()=>o.reviewerProviderConfigured(),"reviewerProviderConfigured"),rebuild:t(()=>o.rebuild(),"rebuild"),ensureOpenTarget:t(n=>o.ensureOpenTarget(n),"ensureOpenTarget"),controller:{listRefs:t(n=>o.controller.listRefs(n),"listRefs"),readRef:t(n=>o.controller.readRef(n),"readRef"),remember:t(n=>o.controller.remember(n),"remember"),forgetRef:t((n,a)=>o.controller.forgetRef(n,a),"forgetRef"),approveProposal:t((n,a,r)=>o.controller.approveProposal(n,a,r),"approveProposal"),rejectProposal:t((n,a,r)=>o.controller.rejectProposal(n,a,r),"rejectProposal"),listInbox:t(async()=>(await o.controller.listInbox()).map(n=>({...n,revision:f(n)})),"listInbox"),showProposal:t(async n=>{let a=await o.controller.showProposal(n);return a===void 0?void 0:{...a,revision:f(a)}},"showProposal")}}}},inputs:{submit:t(async e=>s.runs.acceptInput(await i({kind:"input",input:e})),"submit"),read:t((e,o)=>s.runs.getInput(e,o),"read"),withdraw:t((e,o)=>s.runs.withdrawInput(e,o),"withdraw")},runs:{startTool:t(async e=>{let o=await i({kind:"tool",input:e}),n=await s.runs.start({sessionId:o.sessionId,inputId:o.inputId,prompt:o.rawInput,options:{toolInvocation:{name:o.name,input:o.input}},...o.authorization!==void 0?{authorization:o.authorization}:{}});return{runId:n.runId,sessionId:n.sessionId}},"startTool"),read:t(e=>s.runs.get(e),"read"),stop:t(e=>s.runs.abort(e),"stop"),await:t(async e=>{let o=await s.runs.await(e);return{runId:o.runId,sessionId:o.sessionId,phase:o.phase,...o.result!==void 0?{result:o.result}:{},...o.error!==void 0?{error:o.error.message}:{},...o.terminal!==void 0?{terminal:o.terminal}:{},...o.stop!==void 0?{stop:o.stop}:{}}},"await")},interactions:{list:t(e=>s.interactions.list(e),"list"),respond:t((e,o)=>s.interactions.respond(e,o),"respond")},permissions:{listGrants:t(async()=>{let e=await s.permissions.listGrants();return{revision:e.revision,grants:e.value.map(o=>({id:o.id,...o.scope.sessionId!==void 0?{sessionId:o.scope.sessionId}:{},...o.label!==void 0?{label:o.label}:{},...o.persistence!==void 0?{persistence:o.persistence}:{}}))}},"listGrants"),revokeGrant:t((e,o)=>s.permissions.revokeGrant(e,o),"revokeGrant")},registrations:{list:t(()=>s.admin.agentRegistrations.list(),"list"),upsert:t((e,o)=>s.admin.agentRegistrations.upsert(e,o),"upsert"),setEnabled:t((e,o,n)=>s.admin.agentRegistrations.setEnabled(e,o,n),"setEnabled"),remove:t((e,o)=>s.admin.agentRegistrations.remove(e,o),"remove")},agents:{reviewLean:t(async e=>s.invocations.startAgentsLean(await i({kind:"agents_lean",input:e})),"reviewLean"),tree:t(e=>s.agents.tree(e),"tree"),detail:t((e,o)=>s.agents.detail(e,o),"detail"),spawn:t(async(e,o)=>{let n=await i({kind:"agent_spawn",input:{sessionId:e,agent:o}});return n.authorization===void 0?s.agents.spawn(e,n.agent):s.agents.spawn(e,n.agent,{authorization:n.authorization})},"spawn"),send:t((e,o,n,a)=>s.agents.send(e,o,n,a),"send"),followup:t(async(e,o,n,a)=>{let r=await i({kind:"agent_followup",input:{sessionId:e,actorPath:o,objective:n,...a?.expectedRevision===void 0?{}:{expectedRevision:a.expectedRevision}}});return s.agents.followup(e,o,n,{expectedRevision:r.expectedRevision,...r.authorization===void 0?{}:{authorization:r.authorization}})},"followup"),interrupt:t((e,o,n)=>s.agents.interrupt(e,o,n),"interrupt"),output:t((e,o,n)=>s.agents.output(e,o,n),"output"),wait:t((e,o,n,a)=>s.agents.wait(e,o,n,a?.signal===void 0?void 0:{signal:a.signal}),"wait")},config:{read:t(async()=>u(await s.config.read()),"read"),readEffective:t(async()=>{let{entries:e}=await s.config.readEffective(),o=t((a,r)=>({value:r,source:e[a]?.source??"unset",applied:e[a]?.applied===!0||e[a]?.present!==!0}),"project"),n=e.fallbackProviders?.value;return{verifierLog:o("verifierLog",e.verifierLog?.value==="1"||e.verifierLog?.value===!0),stallLog:o("stallLog",e.stallLog?.value==="1"||e.stallLog?.value===!0),fallbackProviders:o("fallbackProviders",typeof n=="string"?n.split(",").map(a=>a.trim()).filter(Boolean):Array.isArray(n)?n.filter(a=>typeof a=="string"):[])}},"readEffective"),patch:t(async e=>u(await s.config.patch(e)),"patch"),reload:t(async()=>({ok:!0,config:u((await s.config.reload()).config)}),"reload")},mcp:{status:t(()=>s.mcp.status(),"status"),listServers:t(()=>s.mcp.listServers(),"listServers"),getServer:t(e=>s.mcp.getServer(e),"getServer"),validateServer:t((e,o)=>s.mcp.validateServer(e,o),"validateServer"),upsertServer:t((e,o)=>s.mcp.upsertServer(e,o),"upsertServer"),deleteServer:t(e=>s.mcp.deleteServer(e),"deleteServer"),reloadServers:t(()=>s.mcp.reloadServers(),"reloadServers"),listTools:t(e=>s.mcp.listTools(e),"listTools")},workflows:{start:t(async e=>s.workflows.start({...await i({kind:"workflow",input:e}),settingsDefaults:"product"}),"start"),list:t(async e=>{let o=[];for(let n of await s.workflows.list(e??{})){let a=n.updatedAt===void 0?await s.workflows.get(n.runId):n;if(a?.updatedAt===void 0)throw new Error(`Workflow process is unavailable: ${n.runId}`);o.push({runId:n.runId,workflowName:n.workflow,status:n.status,totalSpawned:n.totalSpawned,eventCount:n.eventCount,runDir:n.runDir,...n.endedAt!==void 0?{endedAt:new Date(n.endedAt).toISOString()}:{},startedAt:new Date(n.startedAt).toISOString(),updatedAt:a.updatedAt,...a.displayName!==void 0?{displayName:a.displayName}:{},...n.resultText!==void 0?{resultSummary:n.resultText}:{},...n.error!==void 0?{error:n.error}:{}})}return o},"list"),get:t(e=>s.workflows.get(e),"get"),subscribe:t((e,o,n)=>{let a=s.workflows.subscribe(e,o,n);return{ready:a.ready??Promise.resolve(),close:t(()=>a.close(),"close")}},"subscribe"),pause:t(e=>s.workflows.pause(e),"pause"),resume:t(e=>s.workflows.resume(e),"resume"),stop:t((e,o)=>s.workflows.stop(e,o),"stop")},catalog:{extensions:t(async()=>{let e=await s.catalog.extensions(),o=t(({path:r,label:d,loadSource:l})=>({path:r,label:d,loadSource:l}),"loaded"),n=t(({kind:r,id:d,label:l})=>({kind:r,id:d,label:l}),"source"),a=e.diagnostics;return{active:e.active,extensions:e.extensions.map(o),diagnostics:a&&{loadedExtensions:a.loadedExtensions.map(o),capabilityProviders:a.capabilityProviders.map(({id:r,kinds:d,metadata:l})=>({id:r,kinds:d,metadata:l})),commands:a.commands.map(({name:r,aliases:d,description:l})=>({name:r,aliases:d,description:l})),tools:a.tools.map(r=>({name:r.name,source:n(r.source),shadowedSources:r.shadowedSources.map(n)})),hooks:a.hooks.map(r=>({hook:r.hook,order:r.order,source:n(r.source)})),failures:a.failures.map(r=>({stage:r.stage,target:r.target,message:r.message,source:n(r.source)})),defaults:{activeTools:a.defaults.activeTools,modelSelection:{...a.defaults.modelSelection},thinkingLevel:a.defaults.thinkingLevel}}}},"extensions"),providers:t(()=>s.catalog.providers(),"providers"),models:t(async e=>(await s.catalog.providers()).filter(o=>e?.provider===void 0||o.name===e.provider).map(o=>({provider:o.name,models:o.models})),"models"),reasoningEfforts:t(e=>s.catalog.reasoningEfforts(e),"reasoningEfforts"),probeReasoningEfforts:t(e=>s.catalog.probeReasoningEfforts(e),"probeReasoningEfforts"),forgetCapabilities:t(e=>s.catalog.forgetCapabilities(e),"forgetCapabilities"),commands:t(async e=>(await s.catalog.commands(e)).map(o=>({name:o.name,...o.aliases!==void 0?{aliases:o.aliases}:{},description:o.description,source:String(o.source),...o.userInvocable!==void 0?{userInvocable:o.userInvocable}:{}})),"commands"),skills:t(async e=>(await s.catalog.skills(e)).map(o=>({name:o.name,description:o.description,userInvocable:o.userInvocable,path:o.path,source:String(o.source)})),"skills")},disconnect:t(()=>s.close(),"disconnect")}}t(g,"toKodaXProductClient");import b from"node:path";async function H(s){let{instanceId:c,instanceSecret:i}=s.clientInfo;if(!c||!/^[A-Za-z0-9_.:-]{4,160}$/.test(c)||!i||i.length<32||i.length>512)throw new Error("Exit recovery requires the original stable client identity and secret.");let e=v(s.homeDir===void 0?w:b.resolve(s.homeDir,".kodax"),s.profile);return Promise.all(y(e,h(c,i)).map(o=>m(e,o)))}t(H,"readKodaXClientExits");async function q(s={}){return g(await C({...s,requirements:{productClient:1,productHistoryBoundaries:1,productExitControl:1,productExecutionFacts:1,...s.authorizeExecution?{productExecutionAuthorization:2,productActorAuthorization:1}:{}}}),s.authorizeExecution)}t(q,"ensureKodaXClient");async function j(s={}){let c=await x({homeDir:s.homeDir,profile:s.profile,endpoint:s.endpoint,daemonToken:s.token,autoStart:!1,clientInfo:s.clientInfo,requirements:{productClient:1,productHistoryBoundaries:1,productExitControl:1,productExecutionFacts:1,...s.authorizeExecution?{productExecutionAuthorization:2,productActorAuthorization:1}:{}}});return g(c,s.authorizeExecution)}t(j,"connectKodaXClient");export{g as a,H as b,q as c,j as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{db as o}from"./chunk-
|
|
2
|
+
import{db as o}from"./chunk-66EIFYTX.js";import{a as r}from"./chunk-ONUPGMER.js";var p=Object.freeze({".ts":"typescript",".mts":"typescript",".cts":"typescript",".tsx":"typescriptreact",".js":"javascript",".mjs":"javascript",".cjs":"javascript",".jsx":"javascriptreact",".py":"python",".pyi":"python",".go":"go",".rs":"rust",".java":"java"});function f(e){let t=e.lastIndexOf(".");if(t<0)return;let s=e.slice(t).toLowerCase();return p[s]}r(f,"languageIdForPath");var a=process.platform==="win32";function v(e){let t=e.replace(/\\/g,"/");return a?t.toLowerCase():t}r(v,"normalizeFsPath");import{spawn as c}from"child_process";function u(e){return process.platform==="win32"&&e!==process.execPath&&!/\.exe$/i.test(e)}r(u,"needsShell");function I(e,t,s,i=e===process.execPath?"javascript":"native"){if(u(e)){let n=[l(e),...t].join(" ");return c(n,{...s,shell:!0,windowsHide:!0})}if(i==="javascript"){let n=o({args:t,env:s.env??process.env,isElectron:process.versions.electron!==void 0,executable:e});return c(n.command,n.args,{...s,env:n.env,shell:!1,windowsHide:!0})}return c(e,[...t],{...s,shell:!1,windowsHide:!0})}r(I,"spawnLspProcess");function l(e){return/[\s"]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}r(l,"quoteIfNeeded");export{f as a,v as b,I as c};
|