@kodax-ai/kodax 0.7.96-beta.8 → 0.7.96-beta.9
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 +29 -0
- package/README.md +17 -6
- package/README_CN.md +12 -3
- package/config-templates/config.example.jsonc +3 -2
- package/dist/chunks/{agent-XBT4ZUCG.js → agent-4LNAAVUB.js} +1 -1
- package/dist/chunks/argument-completer-X4GJWD5E.js +2 -0
- package/dist/chunks/{chunk-5KG5LAUO.js → chunk-5Z7OAIPW.js} +1 -1
- package/dist/chunks/{chunk-JBOJY7LE.js → chunk-6HHZ6MJK.js} +3 -3
- package/dist/chunks/{chunk-YURCMKAL.js → chunk-74UJ5IFX.js} +1 -1
- package/dist/chunks/{chunk-ZMXVACRD.js → chunk-7QJ4JHJE.js} +45 -45
- package/dist/chunks/chunk-A42OYZUE.js +384 -0
- package/dist/chunks/{chunk-ROSCR2VP.js → chunk-A66CMPHV.js} +10 -10
- package/dist/chunks/{chunk-57PKLDQI.js → chunk-AE5YFXU2.js} +1 -1
- package/dist/chunks/{chunk-KHPUDIG7.js → chunk-ESDWXMTG.js} +205 -205
- package/dist/chunks/{chunk-R6JRHSQR.js → chunk-JOGZFXHZ.js} +1 -1
- package/dist/chunks/{chunk-HFTCGOBB.js → chunk-KSAXT7BU.js} +217 -216
- package/dist/chunks/{chunk-Y6VGGIKD.js → chunk-NYKZ6Z2Q.js} +1 -1
- package/dist/chunks/{chunk-DGMNCSI3.js → chunk-OK4U4SXB.js} +138 -138
- package/dist/chunks/{chunk-F7JMG426.js → chunk-P472TI5T.js} +115 -115
- package/dist/chunks/chunk-Q4EZLR6T.js +2 -0
- package/dist/chunks/chunk-QP554CFT.js +324 -0
- package/dist/chunks/{chunk-VNTIH7QD.js → chunk-SMIOTGQ2.js} +1 -1
- package/dist/chunks/{chunk-FZUPRAHK.js → chunk-TWJINGV6.js} +1 -1
- package/dist/chunks/{chunk-WAKPBFEA.js → chunk-XIADYNRK.js} +6 -5
- package/dist/chunks/{client-GI3J32G4.js → client-GQJBBOLH.js} +1 -1
- package/dist/chunks/{compaction-config-BUDCDBHY.js → compaction-config-JLQU7GJH.js} +1 -1
- package/dist/chunks/{construction-bootstrap-JWUX7O3Z.js → construction-bootstrap-6UYNF7TE.js} +1 -1
- package/dist/chunks/dist-4O6MH6AE.js +2 -0
- package/dist/chunks/host-2X5XUTXO.js +2 -0
- package/dist/chunks/run-manager-6XOSEJOM.js +2 -0
- package/dist/chunks/{utils-VEOO7TBI.js → utils-GIXQGDJZ.js} +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +5 -5
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1491 -1486
- package/dist/native/darwin-arm64/kodax-text-transaction.node +0 -0
- package/dist/native/darwin-arm64/manifest.json +2 -2
- package/dist/native/darwin-x64/kodax-text-transaction.node +0 -0
- package/dist/native/darwin-x64/manifest.json +2 -2
- package/dist/native/linux-arm64/kodax-text-transaction.node +0 -0
- package/dist/native/linux-arm64/manifest.json +2 -2
- package/dist/native/linux-x64/kodax-text-transaction.node +0 -0
- package/dist/native/linux-x64/manifest.json +2 -2
- 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 +3 -3
- package/dist/runtime-worker.js +1355 -1350
- package/dist/sdk-a2a.d.ts +6 -6
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +1 -1
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +41 -12
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +14 -45
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +29 -13
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +3 -3
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +21 -21
- package/dist/types-chunks/{bash-prefix-extractor.d-bWj6gAhF.d.ts → bash-prefix-extractor.d-sWv2rlSu.d.ts} +45 -3
- package/dist/types-chunks/{exec-policy.d-Bxi_R0VE.d.ts → exec-policy.d-BSvfbN6Q.d.ts} +28 -5
- package/dist/types-chunks/{public-api.d-D9-qDqh8.d.ts → public-api.d-Cho7knWA.d.ts} +1 -1
- package/dist/types-chunks/{run-manager.d-CiWW5-OM.d.ts → run-manager.d-DXSYnIn3.d.ts} +3 -0
- package/dist/types-chunks/{sdk-session-DpYJAre-.d.ts → sdk-session-DhuZ4cmv.d.ts} +1 -1
- package/dist/types-chunks/{shell-command-sets.d-Db8Zm42g.d.ts → shell-command-sets.d-L822XXSh.d.ts} +1 -1
- package/dist/types-chunks/{trusted-repl-entry-BLBfln-c.d.ts → trusted-repl-entry-DU1KJTbd.d.ts} +38 -9
- package/dist/types-chunks/{types.d-BtpNflsM.d.ts → types.d-BhU-SIpK.d.ts} +22 -6
- package/dist/types-chunks/{utils.d-BGPRMOUS.d.ts → utils.d-DjOA100v.d.ts} +7 -3
- package/package.json +1 -1
- package/public_docs/README.md +2 -2
- package/public_docs/configuration/permissions.md +36 -6
- package/public_docs/sdk/embedder-guide.md +110 -4
- package/dist/chunks/argument-completer-WF7FTTWB.js +0 -2
- package/dist/chunks/chunk-6ABV6WUL.js +0 -2
- package/dist/chunks/chunk-MO3TCAKM.js +0 -384
- package/dist/chunks/chunk-P4OGLGQF.js +0 -321
- package/dist/chunks/dist-7K3VYIPU.js +0 -2
- package/dist/chunks/host-CZG5BNSF.js +0 -2
- package/dist/chunks/run-manager-PIGUJW3L.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,35 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## [0.7.96-beta.9] - 2026-09-12
|
|
12
|
+
|
|
13
|
+
Ninth beta pre-release of the v0.7.96 line, carrying FEATURE_299 (unified
|
|
14
|
+
Stop, Full Access and extension execution contracts) plus a legacy-metadata
|
|
15
|
+
paging fix. Every beta.8 contract is retained. npm publication remains a
|
|
16
|
+
manual maintainer action.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- FEATURE_299: unified Stop, Full Access and extension execution contracts.
|
|
21
|
+
Owned Run controls and atomic Session Stop work independently of file locks
|
|
22
|
+
across direct CLI, SDK, daemon, and ACP hosts with a single acceptance-versus-
|
|
23
|
+
confirmation Stop contract. Full Access executes directly on the host without
|
|
24
|
+
sandbox or approval prompts and without built-in dangerous-command fallbacks,
|
|
25
|
+
while explicit forbidden rules stay enforced and prompt rules are rejected
|
|
26
|
+
under Never approval semantics; `kodax execpolicy check --mode full-access`
|
|
27
|
+
inspects that profile without running it. Managed extensions gain an
|
|
28
|
+
execution contract with reload isolation, runtime/session separation, and
|
|
29
|
+
lock-independent effects.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Legacy large metadata no longer breaks Conversation continuation:
|
|
34
|
+
`readConversationPageAdmission` pages oversized `actorSnapshot` metadata
|
|
35
|
+
instead of misreading a >=64 KiB first line as `data_corrupt`, so
|
|
36
|
+
snapshot-backed pages continue across the previous failure boundary.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
11
40
|
## [0.7.96-beta.8] - 2026-09-11
|
|
12
41
|
|
|
13
42
|
Eighth beta pre-release of the v0.7.96 line: an explicit, audited opt-in for
|
package/README.md
CHANGED
|
@@ -784,6 +784,17 @@ provider's model, REPL `/compact` clears the UI only after a durable save, and
|
|
|
784
784
|
successful reports carry bounded `summaryRequests` plus `commitMs` per
|
|
785
785
|
physical summary call.
|
|
786
786
|
|
|
787
|
+
**v0.7.96-beta.9 release:** Ships FEATURE_299 — unified Stop, Full Access
|
|
788
|
+
and extension execution contracts. Owned Run controls and atomic Session
|
|
789
|
+
Stop work independently of file locks across direct CLI, SDK, daemon, and
|
|
790
|
+
ACP hosts under a single acceptance-versus-confirmation Stop contract.
|
|
791
|
+
Full Access executes directly on the host without sandbox, approval prompts,
|
|
792
|
+
or built-in dangerous-command fallbacks while explicit forbidden rules stay
|
|
793
|
+
enforced; `kodax execpolicy check --mode full-access` inspects that profile
|
|
794
|
+
without running it. Managed extensions gain an execution contract with
|
|
795
|
+
reload isolation, and legacy oversized `actorSnapshot` metadata pages
|
|
796
|
+
correctly instead of failing Conversation continuation.
|
|
797
|
+
|
|
787
798
|
**v0.7.96-beta.8 release:** Adds `runtime.sessions.confirmIdentityAlias`
|
|
788
799
|
for explicitly confirmed legacy interrupt identities: registration verifies
|
|
789
800
|
the original delivery receipt and session revision, preserves an immutable
|
|
@@ -849,7 +860,7 @@ requests, preserves structured Child Agent Provider failures, honors exact
|
|
|
849
860
|
run-scoped credential verification, and omits empty `tools` arrays for strict
|
|
850
861
|
vLLM gateways (Issues 329-332). npm publication remains a
|
|
851
862
|
manual maintainer action. See the
|
|
852
|
-
[release checklist](docs/release.md#v0796-
|
|
863
|
+
[release checklist](docs/release.md#v0796-beta9-release-preparation).
|
|
853
864
|
|
|
854
865
|
**v0.7.96-alpha.3 release:** Provider credentials are lazy, scoped,
|
|
855
866
|
revocable capabilities (ADR-068). The v2 credential broker keeps Provider
|
|
@@ -1137,7 +1148,7 @@ Exec Policy and the Edits user decision or Auto[LLM] reviewer. Auto review has
|
|
|
1137
1148
|
fixed 90/180-second attempt bounds and never falls back to Rules, Edits, or an
|
|
1138
1149
|
automatic user prompt. Full Access samples the profile once per Bash call and
|
|
1139
1150
|
runs directly on the host without sandbox or approval prompts. Explicit
|
|
1140
|
-
forbidden rules
|
|
1151
|
+
forbidden rules still block; built-in dangerous-command fallbacks do not apply. Runtime permission prompts
|
|
1141
1152
|
offer opaque, exact
|
|
1142
1153
|
allow-once/session/persistent grant suggestions; persistent grants are
|
|
1143
1154
|
daemon-owned and revisioned. Host plan exit is exposed only when the host
|
|
@@ -1648,7 +1659,7 @@ KodaX provides 4 permission profiles:
|
|
|
1648
1659
|
| `plan` | Read-only planning mode | All modification tools blocked |
|
|
1649
1660
|
| `accept-edits` | Sandbox-first edits; user decides an exact host boundary | Host-boundary operations |
|
|
1650
1661
|
| `auto` | Sandbox-first execution; LLM reviews an exact host boundary | No automatic prompt; denied calls return a safer-route reason |
|
|
1651
|
-
| `full-access` | Direct host execution without sandbox or approval prompts |
|
|
1662
|
+
| `full-access` | Direct host execution without sandbox or approval prompts | Explicit forbidden/prompt rules still block; no built-in dangerous-command fallback |
|
|
1652
1663
|
|
|
1653
1664
|
```bash
|
|
1654
1665
|
# In REPL, use /mode command
|
|
@@ -1676,10 +1687,10 @@ KodaX provides 4 permission profiles:
|
|
|
1676
1687
|
- Shift-Tab cycles `Plan -> Edits -> Auto[LLM] -> Full Access`; Shift+Enter
|
|
1677
1688
|
inserts a newline. Legacy `auto-in-project` and Auto[RULES] state normalize
|
|
1678
1689
|
to Auto[LLM] and are never persisted again.
|
|
1679
|
-
- Full Access skips sandbox
|
|
1680
|
-
|
|
1690
|
+
- Full Access skips sandbox, all approval paths, and built-in dangerous-command
|
|
1691
|
+
fallbacks. Explicit forbidden rules remain enforced; an Exec Policy
|
|
1681
1692
|
`prompt` rule is rejected under Never approval semantics. Use
|
|
1682
|
-
`kodax execpolicy check -- <command>` to inspect
|
|
1693
|
+
`kodax execpolicy check --mode full-access -- <command>` to inspect that profile without running it.
|
|
1683
1694
|
- Runtime-backed prompts can offer exact `allow once`, `allow this session`,
|
|
1684
1695
|
and `always allow` choices. Return the Runtime-issued opaque suggestion;
|
|
1685
1696
|
never derive or widen a permission rule from the displayed command or path.
|
package/README_CN.md
CHANGED
|
@@ -296,6 +296,14 @@ SDK 系统代码契约更新,但没有放宽 shell/sandbox 的 fail-closed 边
|
|
|
296
296
|
`handleRuntimePermissionRequest()` 管理 SDK 权限 UI,并在 prepared Session 尾部遇到
|
|
297
297
|
`data_changed` 时通过权威 delta 合并恢复;后台持久化失败会显示为诊断,不再静默丢失。
|
|
298
298
|
|
|
299
|
+
**v0.7.96-beta.9 发布**:交付 FEATURE_299——统一 Stop、Full Access 与扩展
|
|
300
|
+
执行契约。owned Run 控制与原子 Session Stop 不依赖文件锁,跨直接 CLI、SDK、
|
|
301
|
+
daemon 与 ACP 宿主在单一"受理 vs 确认"Stop 契约下工作。Full Access 直接在
|
|
302
|
+
宿主执行,无沙箱、无审批提示、不套用内置危险命令回退,同时显式禁止规则
|
|
303
|
+
仍然生效;`kodax execpolicy check --mode full-access` 可在不执行的情况下
|
|
304
|
+
检查该 profile。托管扩展获得带重载隔离的执行契约;超大 legacy
|
|
305
|
+
`actorSnapshot` 元数据正确分页,不再中断 Conversation 续读。
|
|
306
|
+
|
|
299
307
|
**v0.7.96-beta.8 发布**:新增 `runtime.sessions.confirmIdentityAlias`,
|
|
300
308
|
用于显式确认的遗留中断标识:注册时验证原始投递回执与 session revision,
|
|
301
309
|
保留不可变审计记录并拒绝竞争声明。别名跨保存、压缩、重启与分页生效;
|
|
@@ -362,7 +370,7 @@ scope 在 SDK、Agent 摘要、CLI 与 Runtime Worker 请求间共享,保留
|
|
|
362
370
|
失败信息,精确遵循 run-scoped 凭据校验,并为严格 vLLM 网关省略空 `tools` 数组(Issues 329-332)。
|
|
363
371
|
npm 发布仍由
|
|
364
372
|
npm 发布仍由
|
|
365
|
-
维护者手动执行。详见 [v0.7.96-beta.
|
|
373
|
+
维护者手动执行。详见 [v0.7.96-beta.9 发布清单](docs/release.md#v0796-beta9-release-preparation)。
|
|
366
374
|
|
|
367
375
|
**v0.7.96-alpha.3 发布**:Provider 凭据成为惰性、受限、可撤销的能力(ADR-068)。v2
|
|
368
376
|
credential broker 将 Provider 密钥保留在 OS keychain,按每次 wire call、为单一封闭
|
|
@@ -559,8 +567,9 @@ CLI 也会在配置的 deadline 被终止。详见
|
|
|
559
567
|
**v0.7.96 权限契约:**权限档位统一为 `Plan -> Edits -> Auto[LLM] -> Full Access`。
|
|
560
568
|
Edits 与 Auto 先尝试 sandbox;成功即静默完成,只有启动前拒绝或 backend 不可用
|
|
561
569
|
才在 Exec Policy 后进入用户/LLM 宿主边界。每次 Bash 调用只在入口读取一次权限档位;
|
|
562
|
-
Full Access 直接在宿主执行,不经过 sandbox、reviewer
|
|
563
|
-
|
|
570
|
+
Full Access 直接在宿主执行,不经过 sandbox、reviewer 或授权弹窗,也不应用内置危险命令兜底。
|
|
571
|
+
用户、管理员和受信项目的显式 forbidden 规则仍生效,Exec Policy `prompt` 在 Never 语义下直接拒绝。
|
|
572
|
+
拒绝结果以 JSON 返回来源、规则和处理方式;模型不得将其误称为机器限制或改写脚本绕过。
|
|
564
573
|
旧 `auto-in-project`
|
|
565
574
|
和 Auto[RULES] 状态只做读取兼容并归一到 Auto[LLM];`/auto-engine` 已移除。
|
|
566
575
|
Reviewer 首次 90 秒,只有 timeout/provider/无效输出会再试一次 180 秒;普通失败
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
// Agent harness: "ama" enables adaptive multi-agent use; "sa" forces one
|
|
40
40
|
// agent. Permission profiles are "plan", "accept-edits", sandbox-first
|
|
41
41
|
// "auto", or direct-host "full-access". Full Access has no sandbox or
|
|
42
|
-
// approval prompts;
|
|
43
|
-
// still block
|
|
42
|
+
// approval prompts; built-in dangerous-command fallbacks do not apply.
|
|
43
|
+
// Explicit forbidden rules still block; explicit prompt rules cannot prompt.
|
|
44
|
+
// Exec Policy is separate:
|
|
44
45
|
// ~/.kodax/exec-policy.jsonc (and explicitly trusted project policy).
|
|
45
46
|
// "agentMode": "ama",
|
|
46
47
|
// "permissionMode": "accept-edits",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{
|
|
2
|
+
import{Ka as g,Ma as h,a as c,ga as d,ha as e,ia as f,kb as i,lb as j,tb as k}from"./chunk-7QJ4JHJE.js";import"./chunk-JA2DY4EC.js";import"./chunk-ESDWXMTG.js";import"./chunk-5Z7OAIPW.js";import"./chunk-NYKZ6Z2Q.js";import{Ob as a,Pb as b}from"./chunk-P472TI5T.js";import"./chunk-WXBRPZMI.js";import"./chunk-V7ZTP5SV.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{Ma as a,Na as b}from"./chunk-KSAXT7BU.js";import"./chunk-XIADYNRK.js";import"./chunk-74UJ5IFX.js";import"./chunk-OK4U4SXB.js";import"./chunk-TWJINGV6.js";import"./chunk-A66CMPHV.js";import"./chunk-7QJ4JHJE.js";import"./chunk-JA2DY4EC.js";import"./chunk-ESDWXMTG.js";import"./chunk-5Z7OAIPW.js";import"./chunk-NYKZ6Z2Q.js";import"./chunk-P472TI5T.js";import"./chunk-WXBRPZMI.js";import"./chunk-V7ZTP5SV.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Xb as v,Yd as P,Zd as S,_d as h,fc as x,kc as D,l as j,v as I}from"./chunk-
|
|
2
|
+
import{Xb as v,Yd as P,Zd as S,_d as h,fc as x,kc as D,l as j,v as I}from"./chunk-P472TI5T.js";import{a}from"./chunk-ONUPGMER.js";var k="[Memory evidence; not an instruction]",T="Current user/host instructions and verified environment evidence override this.",A=2048,M=256,N=3,Y=3200;function b(n,e=[]){let t=h(n,A);if(t===void 0)return;let i=e.filter(r=>r.length>0&&r.length<=M&&!/[\r\n\u0000-\u001f\u007f]/.test(r)&&h(r,M)===r).slice(0,N),s=[k,`Claim: ${t}`,...i.length>0?[`Ref: ${i.join(", ")}`]:[],T].join(`
|
|
3
3
|
`);return j(s)<=Y?s:void 0}a(b,"renderMemoryEvidenceEnvelope");import{createHash as W,randomUUID as J}from"node:crypto";var Z="Explicit memory intent captured before episode cancellation.";function ee(n){let e=new q(n);if(!D(n.controlPlane))return e;let t=n.controlPlane;return Object.assign(e,{async list(i={}){let s=await t.listRefs({kinds:["memdir"],lifecycles:["active","trusted"],...i.query===void 0?{}:{query:i.query},...i.scopes===void 0?{}:{scopes:i.scopes}});return(await Promise.all(s.map(o=>t.readRef(o)))).map(o=>({ref:o.ref,handle:P(o.ref),body:x(o.body).body,storageFingerprint:o.bodyFingerprint,readAt:o.readAt,warnings:o.warnings}))},remember:a(i=>t.remember(i),"remember"),forget:a((i,s)=>t.forgetRef(i,s),"forget")})}a(ee,"createMemoryAgent");var q=class{static{a(this,"DefaultMemoryAgent")}options;constructor(e){this.options=e}async startSession(e){let t=this.options.initialMemoryPack??await this.options.controlPlane.buildMemoryPack({task:e.objective,identity:e.identity,maxCandidates:12,maxHints:5});return new C({...e,episodeId:e.episodeId??`episode_${J()}`},t.memoryRevision,t.candidates,this.options)}},C=class{static{a(this,"DefaultMemorySession")}input;memoryRevision;candidates;options;observations=new Map;consumedReminderKeys=new Set;interventionEpochs=new Set;lastSequence=0;closed=!1;completion;activeIntervention=!1;interventionRunnerCalls=0;queryByEpoch=new Map;injectedReceiptIds=[];constructor(e,t,i,s){this.input=e,this.memoryRevision=t,this.candidates=i,this.options=s}observe(e){if(this.assertOpen(),S(e.summary))return;let t=de(e,this.options.sourcePolicy),i=this.observations.get(e.id);if(i!==void 0){if(i.sequence===t.sequence&&F(i)===F(t))return;throw new Error(`conflicting duplicate memory observation: ${e.id}`)}if(!Number.isSafeInteger(e.sequence)||e.sequence<=this.lastSequence)throw new Error(`memory observation sequence must be strictly monotonic after ${this.lastSequence}`);if(e.summary.trim().length===0)throw new Error("memory observation summary must not be empty");this.observations.set(e.id,t),this.lastSequence=e.sequence}recall(e){this.assertOpen();let t=[...this.observations.values()].filter(f=>f.sequence<=e.throughSequence).filter(V).filter(f=>ne(f,e)).sort((f,l)=>l.sequence-f.sequence).map($),i=this.candidates.filter(H).filter(f=>te(f,e)).map(_),s=E([...t,...i]).slice(0,3);if(s.length===0){this.emitDecisionReceipt(e,[],[],[],[]);return}let r=s.map(f=>f.refId),o=p(s.flatMap(f=>f.evidenceRefs??[])),u=g(`${r.join("\0")}\0${e.actionSignature??e.decisionIntent}`);if(this.consumedReminderKeys.has(u)){this.emitDecisionReceipt(e,s,r,[],["exact"]);return}this.consumedReminderKeys.add(u);let m=w(s.map(f=>f.claim),o);return this.emitDecisionReceipt(e,s,r,m?.evidenceRefs??[],["exact"]),m}async intervene(e){if(this.assertOpen(),e.triggers.length===0||e.signal?.aborted)return;let t=L(e);if(this.interventionEpochs.has(t)||this.activeIntervention)return;this.interventionEpochs.add(t),this.activeIntervention=!0;let i=this.lastSequence;try{let s=await this.buildInterventionCandidates(e);if(e.signal?.aborted)return;if(this.lastSequence!==i||e.throughSequence!==i){this.options.onTrace?.({type:"recall.intervention.discarded",key:t,detail:"state_revision_changed"});return}if(s.length===0){this.emitDecisionReceipt(e,[],[],[],[],e.triggers);return}let r=p([...e.triggers.includes("context_compacted")?s.filter(c=>c.source==="current").filter(c=>c.claimKind==="objective").slice(0,1).map(c=>c.refId):[],...s.filter(c=>c.source!=="current").filter(c=>K(c,e)).map(c=>c.refId)]).slice(0,3),o=r.length>=3?[]:await this.selectInterventionCandidates(e,s,t);if(e.signal?.aborted)return;if(this.lastSequence!==i){this.options.onTrace?.({type:"recall.intervention.discarded",key:t,detail:"state_revision_changed"});return}let u=p([...r,...o]).slice(0,3),m=u.map(c=>s.find(U=>U.refId===c)).filter(c=>c!==void 0),f=p(m.flatMap(c=>c.evidenceRefs??[])),l=[...r.length>0?["exact"]:[],...o.length>0?["semantic_intervention"]:[]];if(m.length===0){this.emitDecisionReceipt(e,s,[],[],l,e.triggers);return}let d=g([t,...u].join("\0"));if(this.consumedReminderKeys.has(d)){this.emitDecisionReceipt(e,s,u,[],l,e.triggers);return}this.consumedReminderKeys.add(d);let y=w(m.map(c=>c.claim),f);return this.emitDecisionReceipt(e,s,u,y?.evidenceRefs??[],l,e.triggers),y}finally{this.activeIntervention=!1}}query(e){this.assertOpen();let t=R(e.decisionRevision,e.throughSequence),i=ce(e.need),s=g([t,this.memoryRevision,i??"",e.actionSignature??"",v].join("\0")),r=this.queryByEpoch.get(t);if(r!==void 0)return r.key===s?r.result:Promise.resolve(void 0);let o=i===void 0?Promise.resolve(void 0):this.queryOnce(e,i);return this.queryByEpoch.set(t,{key:s,result:o}),i===void 0&&this.emitDecisionReceipt(e,[],[],[],["deliberate_query"]),o}rewind(e){if(this.assertOpen(),!Number.isSafeInteger(e.throughSequence)||e.throughSequence<0)throw new Error("rewind sequence must be a non-negative safe integer");for(let[t,i]of this.observations)i.sequence>e.throughSequence&&this.observations.delete(t);for(this.lastSequence=e.throughSequence,this.consumedReminderKeys.clear(),this.interventionEpochs.clear(),this.queryByEpoch.clear();this.injectedReceiptIds.length>0;)this.injectedReceiptIds.pop()}complete(e){return this.assertOpen(),this.completion!==void 0?this.completion:(this.completion=this.completeOnce(e),this.completion)}async close(e={}){e.drain!==!1&&this.completion!==void 0&&await this.completion,this.closed=!0}async completeOnce(e){let t=e.evidence.map(c=>Q(c,this.options.sourcePolicy)),i=e.memoryIntent===void 0?void 0:h(e.memoryIntent.candidateStatement,512),s=e.memoryIntent===void 0?void 0:h(e.memoryIntent.userQuote,512),r=e.memoryIntent!==void 0&&i!==void 0&&s!==void 0&&t.some(c=>c.ref===e.memoryIntent?.evidenceRef&&c.requestedGrade==="authoritative"&&c.source==="user")?{operation:e.memoryIntent.operation,evidenceRef:e.memoryIntent.evidenceRef,candidateStatement:i,userQuote:s}:void 0,o=oe(e.handledMemoryOperations??[]),u=e.status==="cancelled";if(u&&r===void 0)return;let m=u?r?.candidateStatement:this.input.objective;if(m===void 0)return;let f=h(m,512),l=h(u?Z:e.summary,512);if(f===void 0||l===void 0)return;let d=u&&r!==void 0?t.filter(c=>c.ref===r.evidenceRef&&c.requestedGrade==="authoritative"&&c.source==="user").slice(0,1):t,y=se({...this.input,objective:f},[...this.observations.values()],{status:e.status,summary:l,evidence:d,...r===void 0?{}:{memoryIntent:r},...o.length===0?{}:{handledMemoryOperations:o}},this.options.now?.()??new Date().toISOString(),this.injectedReceiptIds);if(await this.options.persistOutcomeDigest?.(y),e.status==="cancelled"){this.reviewDetached(y);return}await this.reviewWithTimeout(y)}reviewDetached(e){this.reviewWithTimeout(e,{unrefTimeout:!0}).catch(t=>{let i=t instanceof Error?t.message:String(t);I({source:"memory.agent",level:"warn",message:"Detached episode review failed.",detail:{reviewKey:e.reviewKey,error:i}});try{this.options.onTrace?.({type:"review.failed",key:e.reviewKey,detail:i})}catch(s){I({source:"memory.agent",level:"warn",message:"Detached episode review trace callback failed.",detail:{reviewKey:e.reviewKey,error:s instanceof Error?s.message:String(s)}})}})}async reviewWithTimeout(e,t={}){let i=this.options.reviewEpisode;if(i===void 0)return;let s=new AbortController,r=Math.max(1,this.options.reviewTimeoutMs??3e4),o,u=await Promise.race([i(e,s.signal).then(()=>!1),new Promise(m=>{o=setTimeout(()=>{s.abort(),m(!0)},r),t.unrefTimeout&&o.unref()})]);o!==void 0&&clearTimeout(o),u&&this.options.onTrace?.({type:"review.timed_out",key:e.reviewKey,detail:`${r}ms`})}assertOpen(){if(this.closed)throw new Error("memory session is closed")}async buildInterventionCandidates(e){let t=e.currentCandidates.map(ie).filter(r=>r!==void 0),i=z([...this.observations.values()].filter(r=>r.sequence<=e.throughSequence).filter(V).sort((r,o)=>o.sequence-r.sequence).map($),e),s=[];try{let r=await this.options.controlPlane.buildMemoryPack({task:this.input.objective,identity:this.input.identity,decisionIntent:e.decisionIntent,...e.actionSignature!==void 0?{actionSignature:e.actionSignature}:{},maxCandidates:12,maxHints:12,includeSnippets:!0,purpose:"intervention"});s=z(r.promptHints.filter(H).map(_),e)}catch(r){this.options.onTrace?.({type:"recall.intervention.failed",key:L(e),detail:r instanceof Error?r.message:String(r)})}return re(t,i,s)}async selectInterventionCandidates(e,t,i){let s=this.options.recallRunner;if(s===void 0||this.interventionRunnerCalls>=3)return[];this.interventionRunnerCalls+=1;let r=new AbortController,o=a(()=>r.abort(e.signal?.reason),"forwardAbort");e.signal?.addEventListener("abort",o,{once:!0}),e.signal?.aborted&&o();let u=t.map((f,l)=>({alias:`candidate:${l+1}`,candidate:{...f,refId:`candidate:${l+1}`,evidenceRefs:[]}})),m;try{let f=await Promise.race([s({objective:O(e.objective),decisionContext:O(e.decisionContext,2048),decisionIntent:O(e.decisionIntent),triggers:e.triggers,candidates:u.map(({candidate:d})=>d),signal:r.signal}),new Promise(d=>{m=setTimeout(()=>{r.abort(),d({selectedRefIds:[]})},5e3)})]),l=new Map(u.map(({alias:d},y)=>[d,t[y].refId]));return p(f.selectedRefIds.map(d=>l.get(d)).filter(d=>d!==void 0)).slice(0,3)}catch(f){return this.options.onTrace?.({type:"recall.intervention.failed",key:i,detail:f instanceof Error?f.message:String(f)}),[]}finally{m!==void 0&&clearTimeout(m),e.signal?.removeEventListener("abort",o)}}async queryOnce(e,t){try{let i=await this.options.controlPlane.buildMemoryPack({task:this.input.objective,identity:this.input.identity,decisionIntent:t,...e.actionSignature!==void 0?{actionSignature:e.actionSignature}:{},maxCandidates:3,maxHints:3,includeSnippets:!0,purpose:"deliberate_query"}),s=i.promptHints.filter(X).map(l=>({hint:l,claim:h(l.bodySnippet??"")})).filter(l=>l.claim!==void 0).slice(0,3),r=s.map(({hint:l})=>l.ref.id),o=w(s.map(({claim:l})=>l),r),u=o?.content??"",m=o?.evidenceRefs??[],f=i.candidates.map(_);return this.emitDecisionReceipt(e,f,r,m,["deliberate_query"]),o}catch(i){this.emitDecisionReceipt(e,[],[],[],["deliberate_query"]),this.options.onTrace?.({type:"query.failed",key:R(e.decisionRevision,e.throughSequence),detail:i instanceof Error?i.message:String(i)});return}}emitDecisionReceipt(e,t,i,s,r,o){let u=R(e.decisionRevision,e.throughSequence),m=t.map(c=>c.refId),f=new Set(i),l=p(t.filter(c=>f.has(c.refId)).flatMap(c=>c.evidenceRefs).filter(B)),d=g(t.map(c=>[c.refId,c.source??"",c.claim,...c.evidenceRefs??[]].join("\0")).join(`
|
|
4
4
|
`)),y={id:`memory-decision:${g([u,v,d,i.join(","),s.join(","),r.join(","),o?.join(",")??""].join("\0")).slice(0,24)}`,decisionEpoch:u,decisionRevision:e.decisionRevision,policyVersion:v,candidateSetFingerprint:d,candidateIds:[...m],selectedCandidateIds:[...i],injectedEvidenceRefs:[...s],...o!==void 0&&o.length>0?{triggers:[...o]}:{},candidateRefs:[...m],selectedRefs:[...l],injectedRefs:[...s],selectionModes:[...r],...e.actionSignature!==void 0?{actionSignature:e.actionSignature}:{},throughSequence:e.throughSequence};s.length>0&&!this.injectedReceiptIds.includes(y.id)&&this.injectedReceiptIds.push(y.id),this.options.onTrace?.({type:"memory.decision",receipt:y})}};function ne(n,e){return n.actionSignature!==void 0&&e.actionSignature!==void 0?n.actionSignature===e.actionSignature:n.claimKey!==void 0&&n.claimKey===e.decisionIntent}a(ne,"exactObservationMatch");function te(n,e){return n.ref.actionSignature!==void 0&&e.actionSignature!==void 0?n.ref.actionSignature===e.actionSignature:n.ref.claimKey!==void 0&&n.ref.claimKey===e.decisionIntent}a(te,"exactCandidateMatch");function ie(n){let e=h(n.claim);if(e!==void 0)return{...n,claim:e,source:"current",evidenceRefs:p(n.evidenceRefs??[n.refId])}}a(ie,"currentCandidate");function $(n){let e=h(n.summary)??`Prior observation is available at ${n.evidence[0]?.ref??n.id}.`;return{refId:`observation:${n.id}`,claim:e,claimKind:n.kind,source:"session",evidenceRefs:p(n.evidence.map(t=>t.ref)),...n.actionSignature!==void 0?{actionSignature:n.actionSignature}:{},...n.claimKey!==void 0?{claimKey:n.claimKey}:{}}}a($,"observationCandidate");function _(n){let e=h(n.bodySnippet??n.hook)??`Governed memory is available at ${n.ref.id}.`;return{refId:n.ref.id,claim:e,...n.ref.claimKind!==void 0?{claimKind:n.ref.claimKind}:{},source:"durable",evidenceRefs:[n.ref.id],...n.ref.actionSignature!==void 0?{actionSignature:n.ref.actionSignature}:{},...n.ref.claimKey!==void 0?{claimKey:n.ref.claimKey}:{}}}a(_,"durableCandidate");function V(n){return n.visibility!=="prompt_safe"||h(n.summary)===void 0?!1:n.evidence.some(e=>e.source!=="agent")}a(V,"isAutomaticObservation");function H(n){return X(n)&&h(n.bodySnippet??n.hook)!==void 0}a(H,"isGovernedHint");function K(n,e){return n.actionSignature!==void 0&&e.actionSignature!==void 0?n.actionSignature===e.actionSignature:n.claimKey!==void 0&&n.claimKey===e.decisionIntent}a(K,"candidateMatchesInput");function z(n,e){return[...n.filter(t=>K(t,e)),...n.filter(t=>!K(t,e))]}a(z,"prioritizeExactCandidates");function re(n,e,t){let i=n.filter(u=>u.claimKind==="objective").slice(0,1),s=n.filter(u=>u.claimKind==="todo"),r=E([...i,...s.slice(0,3),...e.slice(0,4),...t.slice(0,4)]),o=E([...s.slice(3),...e.slice(4),...t.slice(4)]);return E([...r,...o]).slice(0,12)}a(re,"admitInterventionCandidates");function E(n){let e=new Set;return n.filter(t=>e.has(t.refId)?!1:(e.add(t.refId),!0))}a(E,"uniqueCandidates");function se(n,e,t,i,s){let r=t.status==="cancelled"?void 0:[...e].reverse().find(d=>d.kind==="outcome"),o=typeof r?.metadata?.reusableLesson=="string"?h(r.metadata.reusableLesson,512):void 0,u=t.status==="cancelled"?[]:e.filter(d=>d.metadata?.verification===!0).flatMap(d=>d.evidence).filter(d=>d.verdict==="passed"||d.verdict==="failed").filter(d=>!t.evidence.some(y=>y.ref===d.ref)),m=[...t.evidence,...u],f=e.at(-1)?.sequence??0,l=g([n.identity.sessionId,n.episodeId,String(f),t.status,t.summary].join("\0"));return{id:`memory-outcome:${l.slice(0,24)}`,reviewKey:l,episodeId:n.episodeId,sessionId:n.identity.sessionId,branchId:n.identity.sessionId,sequence:f,objective:n.objective,...r?.actionSignature!==void 0?{actionSignature:r.actionSignature}:{},...o===void 0?{}:{lesson:o},approach:r?.summary??"episode completion",outcome:t.status,summary:t.summary.trim(),evidenceRefs:p(m.map(d=>d.ref)),evidence:m.map(d=>({ref:d.ref,grade:d.requestedGrade,source:d.source,...d.verdict!==void 0?{verdict:d.verdict}:{},observedAt:d.observedAt})),...t.memoryIntent===void 0?{}:{memoryIntent:t.memoryIntent},...t.handledMemoryOperations===void 0?{}:{handledMemoryOperations:t.handledMemoryOperations},...t.status!=="cancelled"&&s.length>0?{memoryInfluence:p(s).map(d=>({decisionReceiptRef:d,grade:"exposed"}))}:{},visibility:r?.visibility??"prompt_safe",createdAt:i}}a(se,"buildOutcomeDigest");function oe(n){return n.slice(-20).flatMap(e=>{let t=e.statement===void 0?void 0:h(e.statement,1024),i=e.claimKey?.trim(),s=p(e.targetRefIds).map(o=>h(o,256)).filter(o=>o!==void 0),r=i!==void 0&&/^[a-z0-9._:-]{1,160}$/i.test(i)?i:void 0;return t===void 0&&r===void 0&&s.length===0?[]:[{operation:e.operation,...e.disposition===void 0?{}:{disposition:e.disposition},...t===void 0?{}:{statement:t},...r===void 0?{}:{claimKey:r},targetRefIds:s}]})}a(oe,"sanitizeHandledMemoryOperations");function ce(n){let e=n.replace(/\s+/g," ").trim();if(!(e.length===0||G(e)>512||S(e))&&!/^(?:list|show|dump|enumerate)\s+(?:all|every)\s+(?:the\s+)?memor(?:y|ies)\b/i.test(e)&&!/\b(?:all|every)\s+(?:project|workspace|tenant|user|agent)(?:s|'s)?\b/i.test(e))return e}a(ce,"normalizeQueryNeed");function G(n){let e=0,t=0;for(let i of n)i.codePointAt(0)<=127?e+=1:t+=1;return Math.ceil(e/4)+t}a(G,"estimateMemoryTokens");function X(n){return n.ref.visibility==="prompt_safe"&&n.ref.authority!=="proposal_only"&&(n.ref.lifecycle==="active"||n.ref.lifecycle==="trusted"||n.ref.lifecycle==="readonly")}a(X,"isGovernedQueryHint");function w(n,e){let t=n.map(r=>h(r,512)).filter(r=>r!==void 0),i=t.join(`
|
|
5
5
|
`).slice(0,2048);if(t.length!==n.length||h(i,2048)===void 0||G(i)>512)return;let s={content:i,evidenceRefs:p(e.filter(B)).slice(0,3)};return b(s.content,s.evidenceRefs)===void 0?void 0:s}a(w,"buildSafeReminder");function O(n,e=512){return h(n,e)??"[withheld by prompt-safety policy]"}a(O,"promptSafeSelectorText");function B(n){return n.length>0&&n.length<=256&&!/[\r\n\u0000-\u001f\u007f]/.test(n)&&h(n,256)===n}a(B,"isSafeEvidenceRef");function R(n,e){return g(`${n}\0${e}`).slice(0,24)}a(R,"decisionEpoch");function L(n){return g([R(n.decisionRevision,n.throughSequence),...n.triggers].join("\0")).slice(0,24)}a(L,"interventionEpoch");function de(n,e){return Object.freeze({...n,evidence:Object.freeze(n.evidence.map(t=>Object.freeze(Q(t,e)))),...n.metadata!==void 0?{metadata:Object.freeze({...n.metadata})}:{}})}a(de,"freezeObservation");function Q(n,e){let t=e?.(n)??"inferred";return{...n,requestedGrade:ae(n.requestedGrade,t)}}a(Q,"applySourcePolicy");function ae(n,e){let t=["inferred","observed","corroborated","verified","authoritative"];return t[Math.min(t.indexOf(n),t.indexOf(e))]??"inferred"}a(ae,"lowerEvidenceGrade");function F(n){return JSON.stringify(n)}a(F,"stableObservation");function p(n){return[...new Set(n)]}a(p,"unique");function g(n){return W("sha256").update(n).digest("hex")}a(g,"digest");export{k as a,T as b,A as c,M as d,N as e,Y as f,b as g,ee as h};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Ka as v}from"./chunk-
|
|
2
|
+
import{Ka as v}from"./chunk-P472TI5T.js";import{a}from"./chunk-ONUPGMER.js";import{spawnSync as O}from"node:child_process";import{createHash as F}from"node:crypto";import c from"node:fs";import H from"node:os";import i from"node:path";import{fileURLToPath as W}from"node:url";var q=64*1024*1024,z="v2";function x(){{let e=JSON.parse('{"darwin-arm64":"{\\n \\"version\\": 1,\\n \\"platform\\": \\"darwin\\",\\n \\"arch\\": \\"arm64\\",\\n \\"textTransaction\\": {\\n \\"file\\": \\"kodax-text-transaction.node\\",\\n \\"protocol\\": 5,\\n \\"sha256\\": \\"3822f552af1c81ddc3df0de743f5bbd87c0588d9aa0f9617446f22b6b483a156\\"\\n },\\n \\"legal\\": [\\n {\\n \\"file\\": \\"LICENSE-APACHE.txt\\",\\n \\"sha256\\": \\"6bdadfab6d5d2b0d4e0ccea244f5e412d1597dc84c56db645556ce192b131e98\\"\\n }\\n ]\\n}\\n","darwin-x64":"{\\n \\"version\\": 1,\\n \\"platform\\": \\"darwin\\",\\n \\"arch\\": \\"x64\\",\\n \\"textTransaction\\": {\\n \\"file\\": \\"kodax-text-transaction.node\\",\\n \\"protocol\\": 5,\\n \\"sha256\\": \\"7c8ab6d7b687cc0a2ff3dd453921eb449f12b8481e1815793bbbccfd39911385\\"\\n },\\n \\"legal\\": [\\n {\\n \\"file\\": \\"LICENSE-APACHE.txt\\",\\n \\"sha256\\": \\"6bdadfab6d5d2b0d4e0ccea244f5e412d1597dc84c56db645556ce192b131e98\\"\\n }\\n ]\\n}\\n","linux-arm64":"{\\n \\"version\\": 1,\\n \\"platform\\": \\"linux\\",\\n \\"arch\\": \\"arm64\\",\\n \\"textTransaction\\": {\\n \\"file\\": \\"kodax-text-transaction.node\\",\\n \\"protocol\\": 5,\\n \\"sha256\\": \\"3f788f0fb2bd627c758fcfe5b171cfed20da8102fa31d56e41b3047e855c016e\\"\\n },\\n \\"legal\\": [\\n {\\n \\"file\\": \\"LICENSE-APACHE.txt\\",\\n \\"sha256\\": \\"6bdadfab6d5d2b0d4e0ccea244f5e412d1597dc84c56db645556ce192b131e98\\"\\n }\\n ]\\n}\\n","linux-x64":"{\\n \\"version\\": 1,\\n \\"platform\\": \\"linux\\",\\n \\"arch\\": \\"x64\\",\\n \\"textTransaction\\": {\\n \\"file\\": \\"kodax-text-transaction.node\\",\\n \\"protocol\\": 5,\\n \\"sha256\\": \\"a667ba689ef9b95118236496e60612ee4407dae02a67fdef30e6456ee4592a6a\\"\\n },\\n \\"legal\\": [\\n {\\n \\"file\\": \\"LICENSE-APACHE.txt\\",\\n \\"sha256\\": \\"6bdadfab6d5d2b0d4e0ccea244f5e412d1597dc84c56db645556ce192b131e98\\"\\n }\\n ]\\n}\\n","win32-x64":"{\\n \\"version\\": 1,\\n \\"platform\\": \\"win32\\",\\n \\"arch\\": \\"x64\\",\\n \\"textTransaction\\": {\\n \\"file\\": \\"kodax-windows-text-transaction.node\\",\\n \\"protocol\\": 5,\\n \\"sha256\\": \\"cef4512cf3cf34e2af1902c2ada4b26def552aecce17026697c2c19767b103fd\\"\\n },\\n \\"legal\\": [\\n {\\n \\"file\\": \\"LICENSE-APACHE.txt\\",\\n \\"sha256\\": \\"f8dd90eb71a7af4048bde3ff1d18b7d7280522e0a429ff71b7270a4189cf3568\\"\\n },\\n {\\n \\"file\\": \\"NOTICE-windows-sandbox.txt\\",\\n \\"sha256\\": \\"78723eb162f0782c5e27928f46c681996edc1907d552eba9d0f7f53e014c20c9\\"\\n }\\n ],\\n \\"shellSandbox\\": {\\n \\"file\\": \\"kodax-windows-sandbox.exe\\",\\n \\"protocol\\": 10,\\n \\"sha256\\": \\"d9000b3f8e718955e4d026cbb02b6dbdcafbb8e4e4db341f27367a0dbb70a439\\"\\n },\\n \\"asrtRunner\\": {\\n \\"file\\": \\"srt-win.exe\\",\\n \\"version\\": \\"0.0.65\\",\\n \\"sha256\\": \\"777736e17d6cf9b4280f155f5cda731fdff0f789fa16e6cb3adc0006073e241a\\"\\n }\\n}\\n"}');if(e===null||typeof e!="object"||Array.isArray(e))throw new Error("embedded native manifest map is invalid");let t=e[`${process.platform}-${process.arch}`];if(typeof t!="string"||t==="")throw new Error(`embedded native manifest is missing for ${process.platform}-${process.arch}`);return t}return process.platform==="win32",`{
|
|
3
3
|
"version": 1,
|
|
4
4
|
"platform": "linux",
|
|
5
5
|
"arch": "x64",
|
|
6
6
|
"textTransaction": {
|
|
7
7
|
"file": "kodax-text-transaction.node",
|
|
8
|
-
"protocol":
|
|
9
|
-
"sha256": "
|
|
8
|
+
"protocol": 5,
|
|
9
|
+
"sha256": "a667ba689ef9b95118236496e60612ee4407dae02a67fdef30e6456ee4592a6a"
|
|
10
10
|
},
|
|
11
11
|
"legal": [
|
|
12
12
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{La as c,lf as o}from"./chunk-
|
|
2
|
+
import{La as c,lf as o}from"./chunk-P472TI5T.js";import{a as n}from"./chunk-ONUPGMER.js";import{readFile as a}from"fs/promises";var i={enabled:!0,triggerPercent:75};async function s(r){let t=c("config.json");try{let e=await f(t);if(e?.compaction)return o({...i,...e.compaction})}catch{}return o(i)}n(s,"loadCompactionConfig");async function f(r){try{let t=await a(r,"utf-8");return JSON.parse(t)}catch{return null}}n(f,"readConfigFile");export{s as a};
|