@kodax-ai/kodax 0.7.97-alpha.9 → 0.7.97-beta.2
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 +393 -0
- package/README.md +170 -29
- package/README_CN.md +116 -17
- package/config-templates/config.example.jsonc +2 -3
- package/dist/artifacts/skills/artifact-review/SKILL.md +44 -7
- package/dist/builtin/code-review/SKILL.md +5 -17
- package/dist/builtin/git-workflow/SKILL.md +9 -8
- package/dist/builtin/skill-creator/SKILL.md +38 -108
- package/dist/builtin/skill-creator/references/evaluation.md +50 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +2 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +6 -3
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +2 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.js +6 -3
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +2 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.js +6 -3
- package/dist/builtin/skill-creator/scripts/run-eval.js +3 -3
- package/dist/builtin/skill-creator/scripts/run-loop.js +2 -1
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +2 -0
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +3 -1
- package/dist/builtin/skill-creator/scripts/utils.d.ts +1 -1
- package/dist/builtin/skill-creator/scripts/utils.js +8 -0
- package/dist/builtin/tdd/SKILL.md +24 -40
- package/dist/builtin/visual-review/SKILL.md +7 -3
- package/dist/chunks/agent-DS7M57WD.js +2 -0
- package/dist/chunks/agent-adapter-TLWGGK3V.js +2 -0
- package/dist/chunks/argument-completer-OGCXKTRQ.js +2 -0
- package/dist/chunks/bedrock-native-Z5VNWF5U.js +4 -0
- package/dist/chunks/cell-LV7MNPNQ.js +2 -0
- package/dist/chunks/chunk-2HH5AS7E.js +1157 -0
- package/dist/chunks/chunk-3CP7AUWY.js +2 -0
- package/dist/chunks/chunk-45ZP2YHG.js +2 -0
- package/dist/chunks/chunk-4Y6U7AH4.js +9 -0
- package/dist/chunks/chunk-52EN2777.js +2 -0
- package/dist/chunks/{chunk-HXCY52Z2.js → chunk-53CJDQS2.js} +1 -1
- package/dist/chunks/{chunk-JNB2FL6P.js → chunk-5MUVRFMU.js} +1 -1
- package/dist/chunks/chunk-65652LR4.js +2 -0
- package/dist/chunks/chunk-6TITQQAI.js +351 -0
- package/dist/chunks/chunk-AGUM5SWX.js +2 -0
- package/dist/chunks/chunk-BBZWF2EA.js +2 -0
- package/dist/chunks/chunk-C6JGLEYD.js +2 -0
- package/dist/chunks/chunk-D36OIMV7.js +142 -0
- package/dist/chunks/chunk-D425EZGC.js +2 -0
- package/dist/chunks/chunk-D5OW7UD5.js +2 -0
- package/dist/chunks/chunk-DCE7XQUG.js +2 -0
- package/dist/chunks/chunk-DV5YPYLW.js +10 -0
- package/dist/chunks/chunk-EISRVOBJ.js +4 -0
- package/dist/chunks/chunk-EPK6EWRI.js +12 -0
- package/dist/chunks/chunk-F6GJXQNA.js +29 -0
- package/dist/chunks/chunk-GJXOTOZB.js +465 -0
- package/dist/chunks/chunk-GZUWQZJD.js +2 -0
- package/dist/chunks/chunk-I325ER7D.js +2 -0
- package/dist/chunks/chunk-ISLK6R2P.js +2 -0
- package/dist/chunks/chunk-J2L2NK6E.js +366 -0
- package/dist/chunks/chunk-JAF2YLZO.js +14 -0
- package/dist/chunks/chunk-KDLOPBFZ.js +2 -0
- package/dist/chunks/chunk-KDSO7V4O.js +5 -0
- package/dist/chunks/chunk-KE2NBMAP.js +20 -0
- package/dist/chunks/chunk-MCDZNQWD.js +634 -0
- package/dist/chunks/chunk-NSR4RW2F.js +3 -0
- package/dist/chunks/chunk-OGTRDK4Q.js +359 -0
- package/dist/chunks/chunk-P55RJIOG.js +18 -0
- package/dist/chunks/chunk-P7OJRV5Z.js +2 -0
- package/dist/chunks/chunk-QP47JIWP.js +3 -0
- package/dist/chunks/chunk-QSZCR5GC.js +190 -0
- package/dist/chunks/chunk-R2HTPDI7.js +2 -0
- package/dist/chunks/chunk-R42S4BLA.js +2 -0
- package/dist/chunks/chunk-RYBUYHDL.js +5 -0
- package/dist/chunks/chunk-SDPZFH6M.js +4 -0
- package/dist/chunks/chunk-SK3RRGHJ.js +142 -0
- package/dist/chunks/chunk-TQ475LOI.js +2 -0
- package/dist/chunks/chunk-UF3GZ5PO.js +2 -0
- package/dist/chunks/chunk-UL6YIT4M.js +2 -0
- package/dist/chunks/chunk-V2XJSFFE.js +19 -0
- package/dist/chunks/chunk-V4WSBIXB.js +2 -0
- package/dist/chunks/chunk-V5RCDBKU.js +2 -0
- package/dist/chunks/{chunk-FX4R5PB3.js → chunk-W2CWO4PQ.js} +1 -1
- package/dist/chunks/chunk-W33QJA3M.js +2 -0
- package/dist/chunks/chunk-WMMESRP3.js +9 -0
- package/dist/chunks/chunk-WWPVEK6B.js +127 -0
- package/dist/chunks/chunk-X5M7TLJV.js +2 -0
- package/dist/chunks/chunk-XDMNJW6J.js +42 -0
- package/dist/chunks/{chunk-L22BDZGE.js → chunk-XZSFUGPN.js} +1 -1
- package/dist/chunks/client-LTIFNED5.js +2 -0
- package/dist/chunks/compaction-config-ECMOFP5H.js +2 -0
- package/dist/chunks/{construction-bootstrap-XBHM6NON.js → construction-bootstrap-OAZKGI5Y.js} +1 -1
- package/dist/chunks/devtools-MVOFT6N7.js +2 -0
- package/dist/chunks/devtools-TXYDDL2A.js +2 -0
- package/dist/chunks/dist-5J53DGAO.js +2 -0
- package/dist/chunks/errors-ER7ZRPWC.js +2 -0
- package/dist/chunks/google-native-WLL27OV7.js +2 -0
- package/dist/chunks/host-65E5NM5P.js +2 -0
- package/dist/chunks/mistral-native-JXPIDDYZ.js +5 -0
- package/dist/chunks/model-DZF6URW3.js +2 -0
- package/dist/chunks/permission-YVVMLQ5I.js +2 -0
- package/dist/chunks/pi-messages-5LLOZH57.js +16 -0
- package/dist/chunks/readline-helpers-UZXWBRXQ.js +2 -0
- package/dist/chunks/responses-websocket-Y4N5GXD3.js +2 -0
- package/dist/chunks/run-manager-ZFACIZM2.js +2 -0
- package/dist/chunks/running-session-Q5Y6A2QV.js +2 -0
- package/dist/chunks/skills-TJP6BLZJ.js +2 -0
- package/dist/chunks/tool-dispatch-MLM3QTSU.js +2 -0
- package/dist/chunks/utils-2QNMYRGA.js +2 -0
- package/dist/generated-config-templates.json +6 -0
- package/dist/index.d.ts +34 -32
- package/dist/index.js +6 -6
- package/dist/kodax_bootstrap.js +4 -2
- package/dist/kodax_cli.js +1755 -2979
- package/dist/kodax_doctor.js +3 -0
- package/dist/kodax_resume.js +30 -30
- package/dist/manual-topics.json +2211 -0
- package/dist/native/darwin-arm64/kodax-text-transaction.node +0 -0
- package/dist/native/darwin-arm64/manifest.json +1 -1
- 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/one-shot-task.js +2 -0
- package/dist/provider-auth-cli.js +16 -0
- package/dist/provider-capabilities.json +560 -40
- package/dist/runtime-daemon-schema.json +1 -0
- package/dist/sandbox-network-broker.js +260 -795
- package/dist/script-cell.js +1 -0
- package/dist/script-worker.cjs +2189 -0
- package/dist/sdk-a2a.d.ts +23 -22
- package/dist/sdk-a2a.js +6 -8
- package/dist/sdk-agent.d.ts +125 -98
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-client.d.ts +16 -10
- package/dist/sdk-client.js +1 -1
- package/dist/sdk-coding.d.ts +109 -80
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +3 -3
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +265 -14
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +3 -3
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +41 -166
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +81 -51
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +216 -2989
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +15 -14
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.d.ts +2 -2
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +121 -75
- package/dist/static-text.json +371 -0
- package/dist/storage-repair-cli.js +3 -0
- package/dist/types-chunks/auth-file.d-ovsHEqD4.d.ts +178 -0
- package/dist/types-chunks/{bash-prefix-extractor.d-DFH463j2.d.ts → bash-prefix-extractor.d-CJliu5-D.d.ts} +326 -168
- package/dist/types-chunks/{capability-learning.d-B4pxKwP4.d.ts → capability-learning.d-BXDEOON2.d.ts} +4 -4
- package/dist/types-chunks/{capability.d-DOF3r0fJ.d.ts → capability.d-DapzKxy3.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-CwpmHGFB.d.ts → capsule.d-EMwSALqK.d.ts} +5 -5
- package/dist/types-chunks/{client-contract-CRm9ZpL2.d.ts → client-contract-B7q69yMA.d.ts} +265 -67
- package/dist/types-chunks/{controller.d-B4GyqWri.d.ts → controller.d-C0SAuNKu.d.ts} +1 -1
- package/dist/types-chunks/{controller.d-P3H97ddz.d.ts → controller.d-D-hPLKaA.d.ts} +71 -11
- package/dist/types-chunks/{cost-tracker.d-BeaenODW.d.ts → cost-tracker.d-D1CTx-IO.d.ts} +37 -7
- package/dist/types-chunks/{base.d-ZBOdjDUT.d.ts → errors.d-D73qdYbS.d.ts} +91 -74
- package/dist/types-chunks/{history-retrieval.d-BzKWDjzG.d.ts → history-retrieval.d-BwEUR9cb.d.ts} +2 -2
- package/dist/types-chunks/{manager.d-C8OlTe2J.d.ts → manager.d-BMH8Q6TV.d.ts} +1 -1
- package/dist/types-chunks/{manifest.d-COreAnXG.d.ts → manifest.d-YE3-AIeO.d.ts} +1 -1
- package/dist/types-chunks/{provider-credential-context.d-BH2OaB1b.d.ts → provider-credential-context.d-Dw-sWcnu.d.ts} +11 -2
- package/dist/types-chunks/{provider-request-observation.d-C_bEqr4m.d.ts → provider-request-observation.d-CNe9vse3.d.ts} +4 -2
- package/dist/types-chunks/{public-api.d-BLmqDi73.d.ts → public-api.d-BhDU643p.d.ts} +13 -10
- package/dist/types-chunks/queue-BxQhqhFM.d.ts +166 -0
- package/dist/types-chunks/{resolver.d-DLY01RHx.d.ts → resolver.d-DrkpD8wY.d.ts} +142 -103
- package/dist/types-chunks/{review-inbox.d-BTLDdpG2.d.ts → review-inbox.d-Bgt46S7L.d.ts} +16 -3
- package/dist/types-chunks/{review-packet.d-Crra1Q7t.d.ts → review-packet.d-ChOfJaNI.d.ts} +7 -7
- package/dist/types-chunks/{run-manager.d-DmS1edk4.d.ts → run-manager.d-ChzguipG.d.ts} +48 -12
- package/dist/types-chunks/{runtime-client-info-BBBxdU8V.d.ts → runtime-client-info-P_mRDG7j.d.ts} +93 -7
- package/dist/types-chunks/runtime-event-BW5Pla7a.d.ts +48 -0
- package/dist/types-chunks/sdk-runtime-cDe7qmN3.d.ts +2244 -0
- package/dist/types-chunks/{sdk-session-DipY_CCd.d.ts → sdk-session-D3pcSbnA.d.ts} +13 -4
- package/dist/types-chunks/{sdk-skills-DokfOoJF.d.ts → sdk-skills-C-UA1A6I.d.ts} +3 -1
- package/dist/types-chunks/{side-query.d-DTrhVd_r.d.ts → side-query.d-UFKdWSw7.d.ts} +4 -4
- package/dist/types-chunks/{types.d-Jxj49rqO.d.ts → skill-invocation-error.d-gsNNDnnt.d.ts} +24 -14
- package/dist/types-chunks/task-results.d-XMdWq0eA.d.ts +15 -0
- package/dist/types-chunks/{trusted-repl-entry-B1cb7lAn.d.ts → trusted-repl-entry-Bbkd2HlO.d.ts} +10 -10
- package/dist/types-chunks/{types.d-BjOq57-z.d.ts → types.d-Bi8iUd6x.d.ts} +248 -4
- package/dist/types-chunks/{types.d-NyCB6ztO.d.ts → types.d-BlXTogOo.d.ts} +24 -13
- package/dist/types-chunks/types.d-BvEGNdN-.d.ts +131 -0
- package/dist/types-chunks/{types.d-Cb8RdrjU.d.ts → types.d-D8qQjMeo.d.ts} +5 -1
- package/dist/types-chunks/{utils.d-Bt6USYa5.d.ts → utils.d-CxHyBvO6.d.ts} +11 -7
- package/dist/windows-native-scripts.json +5 -0
- package/docs/ARTIFACT_SDK.md +8 -0
- package/docs/CLIENT_CONTRACT.md +195 -9
- package/docs/SDK_MIGRATION.md +887 -2
- package/docs/SPACE_SDK_SEAMS.md +255 -2
- package/package.json +33 -6
- package/public_docs/README.md +27 -2
- package/public_docs/configuration/config-files.md +6 -0
- package/public_docs/configuration/custom-providers.md +62 -0
- package/public_docs/configuration/providers.md +238 -3
- package/public_docs/configuration/sandbox.md +30 -0
- package/public_docs/getting-started/quickstart.md +10 -1
- package/public_docs/sdk/embedder-guide.md +476 -206
- package/dist/chunks/agent-C7MMIRIH.js +0 -2
- package/dist/chunks/argument-completer-WIQAV5GP.js +0 -2
- package/dist/chunks/chunk-2AM3FRQ7.js +0 -137
- package/dist/chunks/chunk-2TBKGO2Q.js +0 -497
- package/dist/chunks/chunk-35P7QL2Q.js +0 -2
- package/dist/chunks/chunk-5DQTOU2E.js +0 -69
- package/dist/chunks/chunk-7NH5BGE4.js +0 -350
- package/dist/chunks/chunk-AWYO4MH3.js +0 -635
- package/dist/chunks/chunk-CIPS75XZ.js +0 -260
- package/dist/chunks/chunk-CRQWSDHV.js +0 -429
- package/dist/chunks/chunk-HD5BDOPC.js +0 -2
- package/dist/chunks/chunk-JXZMES45.js +0 -12
- package/dist/chunks/chunk-KJSZTP5N.js +0 -2
- package/dist/chunks/chunk-KYHMB6XR.js +0 -431
- package/dist/chunks/chunk-ONUPGMER.js +0 -2
- package/dist/chunks/chunk-P42PHZWC.js +0 -351
- package/dist/chunks/chunk-SHG3EIH5.js +0 -19
- package/dist/chunks/chunk-UH6VOCVP.js +0 -2
- package/dist/chunks/chunk-V26LAWJY.js +0 -2
- package/dist/chunks/chunk-WOHHMGEF.js +0 -394
- package/dist/chunks/chunk-WONYJBAA.js +0 -2
- package/dist/chunks/chunk-XJWNIFC2.js +0 -298
- package/dist/chunks/chunk-XMWTEVFZ.js +0 -1481
- package/dist/chunks/chunk-YJTIPSNW.js +0 -22
- package/dist/chunks/chunk-YVBBU6K5.js +0 -5
- package/dist/chunks/client-XFASU74S.js +0 -2
- package/dist/chunks/compaction-config-JZNGDKWW.js +0 -2
- package/dist/chunks/devtools-CD6KSIHE.js +0 -2
- package/dist/chunks/devtools-XR5F2C6T.js +0 -2
- package/dist/chunks/dist-M4HLQAX7.js +0 -2
- package/dist/chunks/dist-ZLR4OTDD.js +0 -2
- package/dist/chunks/host-EHVJWNGS.js +0 -2
- package/dist/chunks/readline-helpers-KIDMSK76.js +0 -2
- package/dist/chunks/run-manager-HNGIYMG7.js +0 -2
- package/dist/chunks/tool-dispatch-ON33NJR5.js +0 -2
- package/dist/chunks/utils-RHR6YHB2.js +0 -2
|
@@ -1,56 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd
|
|
3
|
-
description:
|
|
3
|
+
description: 测试先行实现或修 bug、补回归测试,或为已有正确实现补充行为测试时使用。按用户范围区分实现改动与仅补测试;不用于只解释测试概念、解读报错或未要求测试工作的普通讨论。
|
|
4
4
|
user-invocable: true
|
|
5
|
-
|
|
6
|
-
allowed-tools: "Read, Grep, Glob, Write, Edit, Bash(npm:*, node:*, npx:*, vitest:*, jest:*, pytest:*)"
|
|
5
|
+
allowed-tools: "Read, Grep, Glob, Write, Edit, Bash(npm *, node *, npx *, vitest *, jest *, pytest *)"
|
|
7
6
|
argument-hint: "[file-or-description]"
|
|
8
|
-
compatibility: "
|
|
7
|
+
compatibility: "Use the repository's existing test runner, layout and coverage requirements."
|
|
9
8
|
---
|
|
10
9
|
|
|
11
|
-
#
|
|
10
|
+
# Tests with a purpose
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
从当前会话和 `$ARGUMENTS` 确定要保护的外部行为,阅读实现、相邻测试和项目约定。
|
|
13
|
+
选择下面与用户要求相符的分支,沿用现有框架、fixture、测试布局和覆盖率要求。
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## 修 bug 或测试先行实现
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
1. 写最小目标断言:bug 用例必须复现用户报告的行为;新功能用例表达尚未实现的行为。
|
|
18
|
+
2. 运行相关测试,确认 RED 来自该断言,而不是语法、导入、缺凭据或缺环境。
|
|
19
|
+
3. 修改让用例通过所需的最小实现,再运行该用例与受影响的相邻测试。
|
|
20
|
+
4. 有具体必要时才重构,并重新验证;不顺手扩大功能范围。
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
完成证据是目标失败的实际输出、最小修复和通过结果。不能复现时先修反馈循环,
|
|
23
|
+
如实区分环境故障与目标行为,不能声称已经验证修复。
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
2. 对 bug 修复,先写复现 bug 的回归测试。
|
|
25
|
-
3. 优先运行最小测试范围,确认它确实失败,并说明失败证明了什么。
|
|
25
|
+
## 仅给已有实现补测试
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
当用户要求补边界、增加现有行为保护或明确不改实现时,只修改测试及其必要 fixture。
|
|
28
|
+
从公开行为推导有区分度的断言,覆盖正常、边界和相关失败路径。正确实现下,测试
|
|
29
|
+
首次运行即可通过;报告它新增保护的行为,不改坏代码、伪造失败或制造 RED。
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
3. 不为了“顺手优化”扩大改动面。
|
|
31
|
+
如果新测试暴露真实缺陷,保留证据并说明;按用户已有授权处理修复范围,不能把
|
|
32
|
+
“只补测试”自动扩展成生产代码重构。
|
|
32
33
|
|
|
33
|
-
##
|
|
34
|
+
## 验证与交付
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
3. 只有在改动面较大或用户明确要求时,才扩大到更完整的测试集。
|
|
36
|
+
运行最小有意义的测试范围,按依赖扩大验证。测试可观察结果而非私有实现,避免
|
|
37
|
+
照抄实现重算期望值。基础设施缺失时说明具体缺口,不为了补一个用例引入整套配置。
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- 优先断言对外可观察行为,而不是内部实现细节。
|
|
42
|
-
- 新增测试尽量贴近现有测试文件;只有在必要时才创建新文件。
|
|
43
|
-
- 如果仓库没有测试基础设施,先说明现状,再决定是补最小配置还是只给出建议。
|
|
44
|
-
- 不要把覆盖率数字当成目标;以行为信心和回归保护为准。
|
|
45
|
-
|
|
46
|
-
## 汇报方式
|
|
47
|
-
|
|
48
|
-
- 使用 `## RED`、`## GREEN`、`## REFACTOR` 三段汇报。
|
|
49
|
-
- 说明修改了哪些测试文件、哪些实现文件,以及运行了哪些测试命令。
|
|
50
|
-
- 最后补充剩余风险、未覆盖场景或后续建议。
|
|
51
|
-
|
|
52
|
-
## 使用示例
|
|
53
|
-
|
|
54
|
-
- `/tdd src/utils/format.ts` - 为 format.ts 编写测试
|
|
55
|
-
- `/tdd add user validation` - 实现用户验证功能 (TDD 方式)
|
|
56
|
-
- `/tdd` - 为当前 git 变更编写测试
|
|
39
|
+
简述实际修改、运行的命令、结果和未覆盖范围;只报告真正经历的阶段,不强制
|
|
40
|
+
RED/GREEN/REFACTOR 三段。测试通过不等于所有未测行为正确。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visual-review
|
|
3
|
-
description:
|
|
3
|
+
description: 创建、修改或审查视觉结果时使用;包括检查网页/应用界面的布局与可读性、图像/图表、文档/幻灯片/表格、终端/Canvas/3D,以及视频/GIF/动画的字幕、转场和播放效果。用户要求截图、渲染或逐帧证据时也适用。提供通用视觉取证方法;artifact_* 工具参数由 artifact-review 补充。无视觉验收要求的代码、计算或文字任务不使用。
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[artifact, surface, or requested visual result]"
|
|
6
6
|
compatibility: Uses the current session's image input and available rendering, capture or frame extraction tools. Missing capabilities are reported explicitly.
|
|
@@ -17,8 +17,12 @@ Respect review-only requests: report findings without modifying the subject.
|
|
|
17
17
|
Identify the current result and the visual requirements to check. Discover
|
|
18
18
|
available session tools and relevant format skills before choosing a renderer
|
|
19
19
|
or capture method. Use the existing permission, sandbox, working-directory,
|
|
20
|
-
tool and provider boundaries.
|
|
21
|
-
|
|
20
|
+
tool and provider boundaries. Use available managed runtime preparation when
|
|
21
|
+
covered by the task's existing authorization and normal Host permissions.
|
|
22
|
+
If preparation is denied or unavailable, mark the affected scope unverified
|
|
23
|
+
and continue useful checks. Installing software outside that managed mechanism
|
|
24
|
+
requires its own authorization; do not expand access or call an external model
|
|
25
|
+
just to make a check appear successful.
|
|
22
26
|
|
|
23
27
|
- **Static** images, icons, posters, diagrams, maps, plots and charts: inspect
|
|
24
28
|
the actual final image. Render SVG or drawing code to pixels; use a full
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
+
import{Ba as d,Ca as e,Da as f,Fb as k,_a as g,ab as h,xb as i,yb as j}from"./chunk-D36OIMV7.js";import"./chunk-BBZWF2EA.js";import"./chunk-F6GJXQNA.js";import"./chunk-XDMNJW6J.js";import"./chunk-RYBUYHDL.js";import"./chunk-4Y6U7AH4.js";import{a as c}from"./chunk-EPK6EWRI.js";import"./chunk-ISLK6R2P.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-W2CWO4PQ.js";import"./chunk-TQ475LOI.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import{Lb as a,Mb as b}from"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.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,b}from"./chunk-DV5YPYLW.js";import"./chunk-XDMNJW6J.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.js";export{b as createCodingWorkflowBackend,a as resumeWorkflowGenerationTurn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
+
import{ab as a,bb as b}from"./chunk-MCDZNQWD.js";import"./chunk-ZQYWDI4O.js";import"./chunk-EISRVOBJ.js";import"./chunk-DCE7XQUG.js";import"./chunk-QSZCR5GC.js";import"./chunk-V2XJSFFE.js";import"./chunk-JAF2YLZO.js";import"./chunk-DV5YPYLW.js";import"./chunk-X5M7TLJV.js";import"./chunk-C6JGLEYD.js";import"./chunk-D36OIMV7.js";import"./chunk-BBZWF2EA.js";import"./chunk-F6GJXQNA.js";import"./chunk-XDMNJW6J.js";import"./chunk-RYBUYHDL.js";import"./chunk-4Y6U7AH4.js";import"./chunk-EPK6EWRI.js";import"./chunk-ISLK6R2P.js";import"./chunk-OGTRDK4Q.js";import"./chunk-GZUWQZJD.js";import"./chunk-W2CWO4PQ.js";import"./chunk-TQ475LOI.js";import"./chunk-65652LR4.js";import"./chunk-5MUVRFMU.js";import"./chunk-2HH5AS7E.js";import"./chunk-J2L2NK6E.js";import"./chunk-KDSO7V4O.js";import"./chunk-SK3RRGHJ.js";import"./chunk-WMMESRP3.js";import"./chunk-QP47JIWP.js";import"./chunk-52EN2777.js";import"./chunk-UF3GZ5PO.js";import"./chunk-KE2NBMAP.js";import"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import"./chunk-V4WSBIXB.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
+
import{c as w}from"./chunk-52EN2777.js";import{a as A,d as O}from"./chunk-UF3GZ5PO.js";import{ba as v,g as U,ja as _,ma as x,na as P,oa as j,r as R}from"./chunk-KE2NBMAP.js";import{a as C,g as S,j as T,m as I,t as b}from"./chunk-V5RCDBKU.js";import"./chunk-KDLOPBFZ.js";import{a as h}from"./chunk-V4WSBIXB.js";function k(s){if(s===null||typeof s=="string"||typeof s=="boolean"||typeof s=="number"&&Number.isFinite(s))return s;if(Array.isArray(s))return s.map(k);if(s&&typeof s=="object")return Object.fromEntries(Object.entries(s).map(([t,e])=>[t,k(e)]));throw new Error("Bedrock document must contain JSON values.")}h(k,"bedrockDocument");async function D(s,t){if(!t)return[{text:v}];let e=await _(s);if("placeholder"in e)return[{text:e.placeholder}];let i=e.mediaType.split("/")[1];if(!["png","jpeg","gif","webp"].includes(i))throw new Error("Unsupported Bedrock image format.");return[...e.notice?[{text:e.notice}]:[],{image:{format:i,source:{bytes:Buffer.from(e.data,"base64")}}}]}h(D,"image");async function $(s,t,e,i=!1){let l=[];for(let d of P(s)){let r=[];if(typeof d.content=="string")d.content&&r.push({text:d.content});else for(let o of d.content)switch(o.type){case"text":o.text&&r.push({text:o.text});break;case"thinking":o.source&&x(o.source,t)&&o.signature?r.push({reasoningContent:{reasoningText:{text:o.thinking,signature:o.signature}}}):o.thinking&&r.push({text:`<prior_reasoning>
|
|
3
|
+
${o.thinking}
|
|
4
|
+
</prior_reasoning>`});break;case"redacted_thinking":o.source&&x(o.source,t)&&r.push({reasoningContent:{redactedContent:Buffer.from(o.data,"base64")}});break;case"tool_use":r.push({toolUse:{toolUseId:o.id,name:o.name,input:k(o.input)}});break;case"tool_result":{let n=[];if(typeof o.content=="string")n.push({text:o.content||"(empty tool result)"});else for(let a of o.content)n.push(...a.type==="text"?[{text:a.text||"(empty tool result)"}]:await D(a,i));r.push({toolResult:{toolUseId:o.tool_use_id,content:n.length?n:[{text:"(empty tool result)"}],status:o.is_error?"error":"success"}});break}case"image":r.push(...await D(o,i));break;case"cache-boundary":e&&!R()&&r.length&&r.push({cachePoint:{type:"default"}});break}if(!r.length)continue;let f=d.role==="assistant"?"assistant":"user",m=l.at(-1);m?.role===f?m.content.push(...r):l.push({role:f,content:r})}return l}h($,"projectBedrockMessages");import{Readable as F}from"node:stream";function M(s){let t;return{metadata:{handlerProtocol:"h1"},destroy(){t?.destroy(),t=void 0},async handle(e){s?.throwIfAborted();let i=new URL(`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}${e.path}`);for(let[d,r]of Object.entries(e.query??{}))for(let f of Array.isArray(r)?r:[r])f!=null&&i.searchParams.append(d,f);if(e.body!==void 0&&typeof e.body!="string"&&!(e.body instanceof Uint8Array))throw new Error("Unexpected Bedrock request body.");let l=await j(i.href,{method:e.method,headers:e.headers,body:e.body,signal:s,redirect:"error"});return t=l.body?F.fromWeb(l.body):F.from([]),{response:{statusCode:l.status,headers:Object.fromEntries(l.headers.entries()),body:t}}}}}h(M,"bedrockHttpHandler");function N(s){let t=s?.cacheDetails?C(s.cacheWriteInputTokens,Object.fromEntries(s.cacheDetails.map(e=>[e.ttl??"unknown",e.inputTokens]))):void 0;return S(s?{inputTokens:s.inputTokens??0,outputTokens:s.outputTokens??0,totalTokens:s.totalTokens??0,cachedReadTokens:s.cacheReadInputTokens,cachedWriteTokens:s.cacheWriteInputTokens,...t?{cachedWriteTokensByTtl:t}:{}}:void 0)}h(N,"usageFrom");var H=class extends O{static{h(this,"KodaXBedrockProvider")}async invoke(t){if(this.cloud.service!=="bedrock")throw this.protocolError("Bedrock requires a region.");let e=A(this.name);if(e.type==="api-key")throw this.protocolError("Bedrock requires AWS credentials or a Bedrock bearer token.");let[{BedrockRuntimeClient:i,ConverseCommand:l,ConverseStreamCommand:d},{SignatureV4:r,clearCredentialCache:f}]=await Promise.all([import("@aws-sdk/client-bedrock-runtime"),import("@smithy/signature-v4")]),m=e.type==="aws",o=h(async()=>{throw new Error("Ambient cloud credentials are not authorized.")},"deny"),n=this.cloud.region,a=e.type==="aws"?{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken}:void 0,c=new i({region:n,endpoint:this.config.baseUrl,maxAttempts:1,useFipsEndpoint:!1,useDualstackEndpoint:!1,credentials:a??o,signer:a?async()=>{let p=new r({credentials:a,region:n,service:"bedrock",sha256:c.config.sha256});return{async sign(...u){try{return await p.sign(...u)}finally{f()}}}}:void 0,token:m?o:{token:e.token},authSchemePreference:[m?"sigv4":"httpBearerAuth"],httpAuthSchemeProvider:h(()=>m?[{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:n},propertiesExtractor:h((p,u)=>({signingProperties:{config:p,context:u}}),"propertiesExtractor")}]:[{schemeId:"smithy.api#httpBearerAuth"}],"httpAuthSchemeProvider"),requestHandler:M(t.signal)});try{let p=this.thinkingConfig(t);p.additionalModelRequestFields&&typeof p.additionalModelRequestFields=="object"?w(p.additionalModelRequestFields,t.profile,t.options,this.name,!0):t.options?.thinkingDisplay!==void 0&&w({},t.profile,t.options,this.name,!0);let u=await T({modelId:t.model,messages:await $(t.messages,t.source,this.config.promptCacheAffinity===!0,this.getCapabilityProfile(t.options?.modelOverride).multimodalSupport!=="none"),...t.system?{system:[{text:t.system}]}:{},inferenceConfig:{maxTokens:t.maxOutputTokens},...t.tools.length?{toolConfig:{tools:t.tools.map(y=>{let E=U(y,t.toolCapabilities,this.name);return{toolSpec:{name:y.name,description:y.description,inputSchema:{json:k(E.input_schema)},...E.strict?{strict:!0}:{}}}}),...t.options?.forcedToolName?{toolChoice:{tool:{name:t.options.forcedToolName}}}:{}}}:{},...p},"bedrock");if(t.streaming){let y=await c.send(new d(u),{abortSignal:t.signal});return await this.consume(y.stream,t)}let g=await c.send(new l(u),{abortSignal:t.signal});t.signal?.throwIfAborted();let B=N(g.usage);if(b(B),g.output?.message?.role!=="assistant"||!["end_turn","tool_use","stop_sequence"].includes(g.stopReason??""))throw this.protocolError(`Bedrock response did not complete: ${g.stopReason??"missing stopReason"}`);return this.finish(t,this.parseContent(g.output.message.content??[],t),B,g.stopReason)}catch(p){if(p&&typeof p=="object"&&"$metadata"in p){let u=p.$metadata,g="$response"in p?p.$response:void 0;Object.assign(p,{status:u?.httpStatusCode,headers:g?.headers})}throw p}finally{c.destroy(),f()}}async consume(t,e){if(!t)throw this.protocolError("Bedrock returned no EventStream.");let i=new Map,l=!1,d,r,f=h(o=>{if(!Number.isSafeInteger(o)||o<0)throw this.protocolError("Invalid Bedrock content block index.");return o},"indexOf");for await(let o of t)if(I(o),e.signal?.throwIfAborted(),e.options?.onHeartbeat?.(),o.messageStart){if(l||o.messageStart.role!=="assistant")throw this.protocolError("Invalid Bedrock message start.");l=!0}else if(o.metadata)r=N(o.metadata.usage)??r,b(r);else if(o.messageStop){if(!l||d||[...i.values()].some(n=>!n.stopped))throw this.protocolError("Bedrock stopped before completing its blocks.");d=o.messageStop.stopReason}else if(o.contentBlockStart){if(!l||d)throw this.protocolError("Bedrock block outside an active message.");let n=f(o.contentBlockStart.contentBlockIndex),a=o.contentBlockStart.start?.toolUse;if(i.has(n)||!a?.toolUseId||!a.name)throw this.protocolError("Unsupported or duplicate Bedrock content block start.");i.set(n,{kind:"tool",id:a.toolUseId,name:a.name,input:"",stopped:!1})}else if(o.contentBlockDelta){if(!l||d)throw this.protocolError("Bedrock delta outside an active message.");let n=f(o.contentBlockDelta.contentBlockIndex),a=o.contentBlockDelta.delta,c=i.get(n);if(c?.stopped)throw this.protocolError("Bedrock delta after block stop.");if(typeof a?.text=="string"){if(c||(c={kind:"text",text:"",stopped:!1},i.set(n,c)),c.kind!=="text")throw this.protocolError("Bedrock changed a block type.");c.text+=a.text,e.options?.onTextDelta?.(a.text)}else if(a?.toolUse){if(c?.kind!=="tool"||typeof a.toolUse.input!="string")throw this.protocolError("Bedrock tool delta has no complete start.");c.input+=a.toolUse.input,e.options?.onToolInputDelta?.(c.name,a.toolUse.input,{toolId:c.id})}else if(a?.reasoningContent){if(c||(c={kind:"reasoning",text:"",signature:"",redacted:[],stopped:!1},i.set(n,c)),c.kind!=="reasoning")throw this.protocolError("Bedrock changed a block type.");let p=a.reasoningContent;if(p.redactedContent&&(c.text||c.signature)||!p.redactedContent&&c.redacted.length)throw this.protocolError("Bedrock mixed redacted and signed reasoning.");if(p.redactedContent)c.redacted.push(p.redactedContent);else if(typeof p.text=="string")c.text+=p.text,e.options?.onThinkingDelta?.(p.text);else if(typeof p.signature=="string")c.signature+=p.signature;else throw this.protocolError("Unsupported Bedrock reasoning delta.")}else throw this.protocolError("Unsupported Bedrock content delta.")}else if(o.contentBlockStop){let n=i.get(f(o.contentBlockStop.contentBlockIndex));if(!l||d||!n||n.stopped)throw this.protocolError("Invalid Bedrock content block stop.");n.stopped=!0}else{let n=Object.keys(o)[0]??"unknown",a=Object.values(o)[0],c=a&&typeof a=="object"&&"message"in a&&typeof a.message=="string"?a.message:`Bedrock event ${n}`;throw Object.assign(new Error(c),{status:n==="throttlingException"?429:n==="validationException"?400:500})}if(e.signal?.throwIfAborted(),!l||!d)throw this.protocolError("Stream incomplete: Bedrock ended without messageStop.",!0);if(!["end_turn","tool_use","stop_sequence"].includes(d))throw this.protocolError(`Bedrock response did not complete: ${d}`);let m=[...i].sort(([o],[n])=>o-n).map(([o,n],a)=>{if(o!==a||!n.stopped)throw this.protocolError("Bedrock returned incomplete or missing blocks.");if(n.kind==="text")return{text:n.text};if(n.kind==="reasoning")return{reasoningContent:n.redacted.length?{redactedContent:Buffer.concat(n.redacted)}:{reasoningText:{text:n.text,signature:n.signature||void 0}}};let c;try{c=JSON.parse(n.input||"{}")}catch{throw this.protocolError("Bedrock returned invalid final tool arguments.")}return{toolUse:{toolUseId:n.id,name:n.name,input:k(c)}}});return this.finish(e,this.parseContent(m,e),r,d)}thinkingConfig(t){if(t.profile?.effortStrategy==="bedrock-openai-effort"||t.profile?.effortStrategy==="bedrock-openai-nested-effort"){let e=t.disabled?"none":t.effort;return e?(t.sentReasoningEffort=e,{additionalModelRequestFields:t.profile.effortStrategy==="bedrock-openai-effort"?{reasoning_effort:e}:{reasoning:{effort:e}}}):{}}if(t.profile?.effortStrategy==="provider-budget"){let e=t.effort?t.profile.budgetByEffort?.[t.effort]:void 0,i=e===void 0?void 0:this.boundThinkingBudget(t,e);if(t.disabled)return t.sentReasoningEffort="none",{additionalModelRequestFields:{thinking:{type:"disabled"}}};if(i!==void 0){if(!Number.isSafeInteger(i)||i<=0||i>=t.maxOutputTokens)throw this.protocolError("Bedrock thinking budget must be positive and smaller than max output tokens.");return t.sentReasoningEffort=t.effort,{additionalModelRequestFields:{thinking:{type:"enabled",budget_tokens:i}}}}}if(t.profile?.effortStrategy==="bedrock-anthropic-effort"){if(t.disabled)return t.sentReasoningEffort="none",{additionalModelRequestFields:{thinking:{type:"disabled"}}};if(t.effort)return t.sentReasoningEffort=t.effort,{additionalModelRequestFields:{thinking:{type:"adaptive"},output_config:{effort:t.effort}}}}return{}}parseContent(t,e){let i=[],l=new Set;for(let d of t)if(typeof d.text=="string")i.push({type:"text",text:d.text});else if(d.reasoningContent?.reasoningText){let r=d.reasoningContent.reasoningText;i.push({type:"thinking",thinking:r.text??"",signature:r.signature,source:e.source})}else if(d.reasoningContent?.redactedContent)i.push({type:"redacted_thinking",data:Buffer.from(d.reasoningContent.redactedContent).toString("base64"),source:e.source});else if(d.toolUse){let r=d.toolUse;if(!r.toolUseId||!r.name||!r.input||typeof r.input!="object"||Array.isArray(r.input)||l.has(r.toolUseId))throw this.protocolError("Bedrock returned an invalid or duplicate tool call.");l.add(r.toolUseId),i.push({type:"tool_use",id:r.toolUseId,name:r.name,input:r.input})}else throw this.protocolError("Unsupported Bedrock response content.");return i}};export{H as KodaXBedrockProvider};
|