@kodax-ai/kodax 0.7.76 → 0.7.78

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +758 -371
  2. package/LICENSE +158 -158
  3. package/README.md +1702 -1508
  4. package/README_CN.md +1019 -869
  5. package/config-templates/config.example.jsonc +86 -4
  6. package/config-templates/integrations/a2a.example.jsonc +98 -98
  7. package/config-templates/integrations/extensions.example.jsonc +7 -7
  8. package/config-templates/integrations/mcp.example.jsonc +16 -16
  9. package/dist/builtin/code-review/SKILL.md +22 -22
  10. package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
  11. package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
  12. package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
  13. package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
  14. package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
  15. package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
  16. package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
  17. package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
  18. package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
  19. package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
  20. package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
  21. package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
  22. package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
  23. package/dist/chunks/agent-ASP4MS3X.js +2 -0
  24. package/dist/chunks/argument-completer-JYQ7FX3W.js +2 -0
  25. package/dist/chunks/chunk-2CFHBKRE.js +5 -0
  26. package/dist/chunks/chunk-35PPHOQ2.js +292 -0
  27. package/dist/chunks/chunk-43QNNDHR.js +29 -0
  28. package/dist/chunks/chunk-5BNQXXGY.js +1 -0
  29. package/dist/chunks/chunk-5GO6FH7L.js +458 -0
  30. package/dist/chunks/chunk-5NDCSFOP.js +78 -0
  31. package/dist/chunks/chunk-6FOJVETH.js +22 -0
  32. package/dist/chunks/chunk-6XM4B6K2.js +48 -0
  33. package/dist/chunks/chunk-6YZUE6NC.js +240 -0
  34. package/dist/chunks/{chunk-RDXRM3UI.js → chunk-7OEBJGHK.js} +1 -1
  35. package/dist/chunks/chunk-KQLQYHWU.js +386 -0
  36. package/dist/chunks/chunk-NXO6GWSY.js +46 -0
  37. package/dist/chunks/chunk-T2XZTLYE.js +316 -0
  38. package/dist/chunks/chunk-TQDBTTIM.js +348 -0
  39. package/dist/chunks/{chunk-SMT2JSM3.js → chunk-UID7BLAB.js} +9 -9
  40. package/dist/chunks/chunk-VAT2QYXM.js +765 -0
  41. package/dist/chunks/chunk-YAZQTC2L.js +5 -0
  42. package/dist/chunks/chunk-YVRYHC4C.js +655 -0
  43. package/dist/chunks/{chunk-PXKSE54E.js → chunk-Z3KFRTSB.js} +1 -1
  44. package/dist/chunks/compaction-config-BQSSIWK5.js +2 -0
  45. package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-VQLQGWPY.js} +1 -1
  46. package/dist/chunks/dist-BFT5YIGU.js +2 -0
  47. package/dist/chunks/dist-PCFE24YP.js +2 -0
  48. package/dist/chunks/host-UTFXCYYM.js +2 -0
  49. package/dist/chunks/run-manager-PJU3WIFJ.js +2 -0
  50. package/dist/chunks/utils-SID4HW2Q.js +2 -0
  51. package/dist/index.d.ts +21 -19
  52. package/dist/index.js +6 -6
  53. package/dist/kodax_bootstrap.js +25 -25
  54. package/dist/kodax_cli.js +1787 -1341
  55. package/dist/kodax_resume.js +17 -17
  56. package/dist/provider-capabilities.json +392 -362
  57. package/dist/runtime-worker.js +1707 -1279
  58. package/dist/sandbox-workspace-session.js +563 -0
  59. package/dist/sdk-a2a.d.ts +18 -17
  60. package/dist/sdk-a2a.js +8 -8
  61. package/dist/sdk-agent.d.ts +320 -70
  62. package/dist/sdk-agent.js +1 -1
  63. package/dist/sdk-coding.d.ts +135 -168
  64. package/dist/sdk-coding.js +1 -1
  65. package/dist/sdk-experimental-memory.d.ts +14 -597
  66. package/dist/sdk-experimental-memory.js +1 -1
  67. package/dist/sdk-llm.d.ts +219 -6
  68. package/dist/sdk-llm.js +1 -1
  69. package/dist/sdk-mcp.js +1 -1
  70. package/dist/sdk-media.d.ts +1 -1
  71. package/dist/sdk-media.js +1 -1
  72. package/dist/sdk-repl.d.ts +70 -27
  73. package/dist/sdk-repl.js +2 -2
  74. package/dist/sdk-runtime.d.ts +212 -149
  75. package/dist/sdk-runtime.js +1 -1
  76. package/dist/sdk-sandbox.d.ts +93 -0
  77. package/dist/sdk-sandbox.js +2 -0
  78. package/dist/sdk-session.d.ts +8 -8
  79. package/dist/sdk-session.js +1 -1
  80. package/dist/sdk-skills.d.ts +2 -2
  81. package/dist/sdk-skills.js +1 -1
  82. package/dist/semantic-worker.js +15 -15
  83. package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
  84. package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-uAe2Oqda.d.ts} +319 -9
  85. package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
  86. package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-BlSv9l3V.d.ts} +2 -2
  87. package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-BRE_ErEj.d.ts} +1 -1
  88. package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-CXDYRgZ3.d.ts} +201 -35
  89. package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-DtCy7x64.d.ts} +2 -2
  90. package/dist/types-chunks/{integration-config.d-ojG4swOP.d.ts → integration-config.d-BNowXE8k.d.ts} +23 -8
  91. package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d-B3AohsxN.d.ts} +37 -8
  92. package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → repl.d-Ie_ZXb_U.d.ts} +89 -78
  93. package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → resolver.d-iAQ9ocLB.d.ts} +23 -74
  94. package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-D1twIhF9.d.ts} +1 -1
  95. package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-DB9KksIx.d.ts} +3 -3
  96. package/dist/types-chunks/side-query.d-DTuLPcC5.d.ts +77 -0
  97. package/dist/types-chunks/types-D3g6XUQr.d.ts +662 -0
  98. package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-BA-Jwpfs.d.ts} +506 -11
  99. package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-BH0ZkTGf.d.ts} +2 -2
  100. package/dist/types-chunks/{types.d-DCQVBqVn.d.ts → types.d-BbtGlKZu.d.ts} +25 -3
  101. package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
  102. package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DVDTIfB_.d.ts} +4 -4
  103. package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CVp6bFl9.d.ts} +23 -7
  104. package/docs/SDK_EMBEDDER_GUIDE.md +592 -119
  105. package/package.json +9 -1
  106. package/scripts/kodax-bin.cjs +28 -28
  107. package/scripts/production-env.cjs +25 -25
  108. package/dist/chunks/agent-7X5CFET2.js +0 -2
  109. package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
  110. package/dist/chunks/chunk-4PWPNCNK.js +0 -158
  111. package/dist/chunks/chunk-7FJNLJLF.js +0 -369
  112. package/dist/chunks/chunk-COQYLD4U.js +0 -5
  113. package/dist/chunks/chunk-D3T24FJW.js +0 -78
  114. package/dist/chunks/chunk-EI4JBQKL.js +0 -46
  115. package/dist/chunks/chunk-HGT6WQ24.js +0 -321
  116. package/dist/chunks/chunk-HS3XHF3R.js +0 -622
  117. package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
  118. package/dist/chunks/chunk-KAY2XLCP.js +0 -74
  119. package/dist/chunks/chunk-OD6LVXU6.js +0 -329
  120. package/dist/chunks/chunk-OSF3H4RR.js +0 -22
  121. package/dist/chunks/chunk-TGMBHGZO.js +0 -427
  122. package/dist/chunks/chunk-VWSLC2WO.js +0 -770
  123. package/dist/chunks/chunk-Y3AMP22L.js +0 -37
  124. package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
  125. package/dist/chunks/dist-2RA7LSH3.js +0 -2
  126. package/dist/chunks/dist-URKXBOC6.js +0 -2
  127. package/dist/chunks/host-RKZ2OGFT.js +0 -2
  128. package/dist/chunks/run-manager-7RM4HEH6.js +0 -2
  129. package/dist/chunks/utils-X3TEH6IO.js +0 -2
  130. package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +0 -91
@@ -1,33 +1,115 @@
1
+ // Split configs: ~/.kodax/integrations/mcp.json, extensions.json, and a2a.json.
1
2
  // KodaX core configuration template.
2
3
  // Copy only the fields you need to ~/.kodax/config.json (strict JSON).
3
4
  // MCP, A2A, and Extensions live in ~/.kodax/integrations/*.json; use
4
- // `kodax integrations migrate --dry-run` for legacy declarations.
5
+ // `kodax integrations migrate` to preview legacy declarations.
5
6
  {
7
+ // Active provider alias and optional model override. Run `kodax setup` or
8
+ // `/model` instead of editing these manually when possible.
6
9
  // "provider": "deepseek",
7
- // "model": "deepseek-v4",
10
+ // "model": "deepseek-v4-flash",
11
+ // Add or reorder model ids shown by `/model` for a provider.
12
+ // "providerModels": {
13
+ // "deepseek": ["deepseek-v4-flash", "deepseek-v4-pro"]
14
+ // },
15
+
16
+ // Interactive Runtime hosting: "embedded" (this process) or "daemon".
8
17
  // "runtimeMode": "embedded",
18
+
19
+ // Native model reasoning. `effort` is the preferred explicit depth;
20
+ // `reasoningCeiling` is the session ceiling. `reasoningMode` and `thinking`
21
+ // remain accepted for backward compatibility.
9
22
  // "effort": "high",
23
+ // "planModeEffort": "high",
24
+ // "reasoningCeiling": "auto",
25
+ // "reasoningMode": "auto",
26
+ // "thinking": true,
27
+
28
+ // Agent harness: "ama" enables adaptive multi-agent use; "sa" forces one
29
+ // agent. Permission mode is "plan", "accept-edits", or classifier-backed
30
+ // "auto".
10
31
  // "agentMode": "ama",
11
32
  // "permissionMode": "accept-edits",
33
+ // User-level Bash allow patterns. Project additions belong in
34
+ // <project>/.kodax/config.local.json. Broad Bash(*) is rejected.
35
+ // "alwaysAllowTools": ["Bash(npm test)", "Bash(git status:*)"],
36
+ // "autoMode": {
37
+ // "engine": "llm",
38
+ // "classifierModel": "provider:model",
39
+ // "timeoutMs": 20000,
40
+ // "speculativeWindowMs": 500
41
+ // },
42
+
43
+ // UI/manual locale.
12
44
  // "locale": "zh",
45
+
46
+ // Custom providers store public connection metadata only. Put the actual
47
+ // credential in the named environment variable, never in this file. Use
48
+ // `kodax setup --custom` for the guided writer.
13
49
  // "customProviders": [
14
50
  // {
15
51
  // "name": "my-relay",
16
- // "protocol": "openai",
52
+ // "protocol": "openai",
17
53
  // "baseUrl": "https://api.example.com/v1",
18
54
  // "apiKeyEnv": "MY_RELAY_API_KEY",
19
55
  // "model": "provider/model",
20
- // "reasoning": { "efforts": ["off", "low", "high"], "default": "high" }
56
+ // "models": ["provider/model", "provider/fast-model"],
57
+ // "reasoning": { "efforts": ["off", "low", "high"], "default": "high" },
58
+ // "userAgentMode": "compat",
59
+ // "contextWindow": 128000,
60
+ // "maxOutputTokens": 8192,
61
+ // "thinkingBudgetCap": 32000,
62
+ // "promptCacheAffinity": false,
63
+ // "replayReasoningContent": false,
64
+ // "strictThinkingSignature": false,
65
+ // "streamMaxDurationMs": 300000,
66
+ // "verifyStrategy": "models-list"
21
67
  // }
22
68
  // ],
69
+
70
+ // Repository intelligence. Mode: "auto", "full", "light", or "off".
23
71
  // "repoIntelligenceMode": "auto",
72
+ // "repoIntelligenceTrace": false,
73
+ // "repoIntelligence": {
74
+ // "toolWaitMs": 250,
75
+ // "workerTimeoutMs": 30000,
76
+ // "workerOldSpaceMb": 1024,
77
+ // "storageDir": "~/.kodax/repo-intelligence"
78
+ // },
79
+
80
+ // Runtime/provider diagnostics and timeouts.
81
+ // "streamIdleTimeoutMs": 120000,
82
+ // "verifierLog": false,
83
+ // "stallLog": false,
84
+
85
+ // Ordered provider fallback for child tasks and optional model tiers used by
86
+ // workflow/dispatch model hints.
87
+ // "fallbackProviders": ["ark-coding", "kimi-code"],
88
+ // "fastProvider": "openai",
89
+ // "fastModel": "gpt-5-mini",
90
+ // "deepProvider": "anthropic",
91
+ // "deepModel": "claude-opus-4-6",
92
+
93
+ // Provider/LSP/ACP process settings.
94
+ // "maxOutputTokens": 8192,
95
+ // "disablePromptCache": false,
96
+ // "lsp": true,
97
+ // "lspAutoDownload": false,
98
+ // "acpLogLevel": "info",
99
+
24
100
  // Automatic large compaction is always enabled. Percentage defaults to 75
25
101
  // and is clamped to 15..90. A missing/zero absolute threshold is inactive;
26
102
  // otherwise the smaller percentage, absolute, and physical limit wins.
27
103
  // "compaction": {
104
+ // "enabled": true,
105
+ // "contextWindow": 128000,
28
106
  // "triggerPercent": 75,
29
107
  // "triggerTokens": 0
30
108
  // },
109
+
110
+ // 0 disables automatic session pruning.
31
111
  // "sessionRetentionDays": 0,
112
+
113
+ // Workflow host concurrency. The Runtime still applies its system cap.
32
114
  // "workflow": { "maxConcurrency": 8 }
33
115
  }
@@ -1,98 +1,98 @@
1
- // Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.
2
- // `agents` calls many third-party Agents. The optional singleton `server`
3
- // exposes exactly one KodaX general task Agent; ACP remains the coding/editor
4
- // protocol. Uncomment only the entries you need; no token value belongs here.
5
- // Legacy version 1 files remain readable. Non-empty files require an explicit
6
- // stopped-daemon migration; new/empty files and every later write use version 2.
7
- {
8
- "version": 2,
9
-
10
- // Create this inbound block with `kodax a2a expose`; config never starts a
11
- // listener by itself. Do not copy private Agent instructions, Runtime Skills,
12
- // model names, or local paths into the public `published.skills` list.
13
- // Managed workspaces default below
14
- // ~/kodax_a2a_server_workspace/<runtime-profile>/contexts/<context-key>/.
15
- // Native read/grep/glob remains available according to workspace access.
16
- // Arbitrary shell is never exposed. Skill instructions/assets need no
17
- // process authority. An exact checked-in scripts/... entry requires
18
- // process="isolated", skillScripts admission, and `kodax sandbox doctor`.
19
- // ASRT receives no KodaX credentials or ambient ~/.srt-settings.json and its
20
- // script quota is observed; hostile tenants also require an outer container/VM.
21
- //
22
- // "server": {
23
- // "execution": {
24
- // "kind": "local-agent",
25
- // "agentRef": { "source": "markdown:user", "name": "report-agent" },
26
- // "workspace": { "mode": "managed" },
27
- // "toolPolicy": {
28
- // "workspace": "write",
29
- // "process": "deny",
30
- // "network": { "mode": "deny" },
31
- // "tools": [],
32
- // "mcp": {},
33
- // "skillScripts": {},
34
- // "subagents": "deny"
35
- // }
36
- // },
37
- // "published": {
38
- // "name": "KodaX Agent",
39
- // "description": "Completes approved general tasks.",
40
- // "version": "0.7.71",
41
- // "skills": [{ "id": "general", "name": "General", "description": "Complete general tasks.", "tags": [] }],
42
- // "inputModes": ["text/plain"],
43
- // "outputModes": ["text/plain"]
44
- // },
45
- // "authentication": { "type": "bearer-env", "tokenEnv": "KODAX_A2A_TOKEN", "principalId": "configured-client" },
46
- // "dataDir": "~/.kodax/a2a/tasks"
47
- // },
48
-
49
- // Production OAuth2 resource-server alternative for the server above. The
50
- // external Authorization Server issues access tokens and, for JWT tokens,
51
- // signs them. KodaX holds no issuer signing key; it validates RFC 9068 tokens
52
- // against the issuer's rotating JWKS, audience, expiry, subject, and scopes.
53
- // Replace the server.authentication value above with:
54
- // {
55
- // "type": "oauth2-jwt",
56
- // "scheme": "enterprise-oauth",
57
- // "issuer": "https://identity.example.com",
58
- // "audience": "https://agent.example.com/a2a",
59
- // "jwksUrl": "https://identity.example.com/.well-known/jwks.json",
60
- // "tokenUrl": "https://identity.example.com/oauth/token",
61
- // "metadataUrl": "https://identity.example.com/.well-known/oauth-authorization-server",
62
- // "requiredScopes": ["a2a.invoke"]
63
- // }
64
-
65
- "agents": {
66
- // Fixed Bearer compatibility example. `enabled` is hot desired state:
67
- // disabled Agents remain configured but are not candidates for new
68
- // orchestration, while already admitted remote tasks may finish.
69
- // "reporting": {
70
- // "cardUrl": "https://agents.example.com/.well-known/agent-card.json",
71
- // "enabled": true,
72
- // "credentialEnv": "REPORTING_A2A_TOKEN",
73
- // "effect": "read"
74
- // },
75
-
76
- // Standards-based machine-to-machine OAuth2 example. The external
77
- // Authorization Server issues access tokens; KodaX obtains and caches them
78
- // only in process memory. `tokenUrl` must exactly match the selected Card
79
- // OAuth2 clientCredentials flow. Use `kodax a2a enable|disable <name>` to
80
- // mutate `enabled` atomically; the owning Runtime applies it asynchronously.
81
- // "reviewer": {
82
- // "cardUrl": "https://reviewer.example.com/.well-known/agent-card.json",
83
- // "enabled": false,
84
- // "effect": "read",
85
- // "authentication": {
86
- // "type": "oauth2-client-credentials",
87
- // "scheme": "enterprise-oauth",
88
- // "issuer": "https://identity.example.com",
89
- // "tokenUrl": "https://identity.example.com/oauth/token",
90
- // "clientId": "kodax-reviewer",
91
- // "clientSecretEnv": "REVIEWER_CLIENT_SECRET",
92
- // "scopes": ["a2a.invoke"],
93
- // "resource": "https://reviewer.example.com/",
94
- // "clientAuthentication": "client-secret-basic"
95
- // }
96
- // }
97
- }
98
- }
1
+ // Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.
2
+ // `agents` calls many third-party Agents. The optional singleton `server`
3
+ // exposes exactly one KodaX general task Agent; ACP remains the coding/editor
4
+ // protocol. Uncomment only the entries you need; no token value belongs here.
5
+ // Legacy version 1 files remain readable. Non-empty files require an explicit
6
+ // stopped-daemon migration; new/empty files and every later write use version 2.
7
+ {
8
+ "version": 2,
9
+
10
+ // Create this inbound block with `kodax a2a expose`; config never starts a
11
+ // listener by itself. Do not copy private Agent instructions, Runtime Skills,
12
+ // model names, or local paths into the public `published.skills` list.
13
+ // Managed workspaces default below
14
+ // ~/kodax_a2a_server_workspace/<runtime-profile>/contexts/<context-key>/.
15
+ // Native read/grep/glob remains available according to workspace access.
16
+ // Arbitrary shell is never exposed. Skill instructions/assets need no
17
+ // process authority. An exact checked-in scripts/... entry requires
18
+ // process="isolated", skillScripts admission, and `kodax sandbox doctor`.
19
+ // ASRT receives no KodaX credentials or ambient ~/.srt-settings.json and its
20
+ // script quota is observed; hostile tenants also require an outer container/VM.
21
+ //
22
+ // "server": {
23
+ // "execution": {
24
+ // "kind": "local-agent",
25
+ // "agentRef": { "source": "markdown:user", "name": "report-agent" },
26
+ // "workspace": { "mode": "managed" },
27
+ // "toolPolicy": {
28
+ // "workspace": "write",
29
+ // "process": "deny",
30
+ // "network": { "mode": "deny" },
31
+ // "tools": [],
32
+ // "mcp": {},
33
+ // "skillScripts": {},
34
+ // "subagents": "deny"
35
+ // }
36
+ // },
37
+ // "published": {
38
+ // "name": "KodaX Agent",
39
+ // "description": "Completes approved general tasks.",
40
+ // "version": "0.7.71",
41
+ // "skills": [{ "id": "general", "name": "General", "description": "Complete general tasks.", "tags": [] }],
42
+ // "inputModes": ["text/plain"],
43
+ // "outputModes": ["text/plain"]
44
+ // },
45
+ // "authentication": { "type": "bearer-env", "tokenEnv": "KODAX_A2A_TOKEN", "principalId": "configured-client" },
46
+ // "dataDir": "~/.kodax/a2a/tasks"
47
+ // },
48
+
49
+ // Production OAuth2 resource-server alternative for the server above. The
50
+ // external Authorization Server issues access tokens and, for JWT tokens,
51
+ // signs them. KodaX holds no issuer signing key; it validates RFC 9068 tokens
52
+ // against the issuer's rotating JWKS, audience, expiry, subject, and scopes.
53
+ // Replace the server.authentication value above with:
54
+ // {
55
+ // "type": "oauth2-jwt",
56
+ // "scheme": "enterprise-oauth",
57
+ // "issuer": "https://identity.example.com",
58
+ // "audience": "https://agent.example.com/a2a",
59
+ // "jwksUrl": "https://identity.example.com/.well-known/jwks.json",
60
+ // "tokenUrl": "https://identity.example.com/oauth/token",
61
+ // "metadataUrl": "https://identity.example.com/.well-known/oauth-authorization-server",
62
+ // "requiredScopes": ["a2a.invoke"]
63
+ // }
64
+
65
+ "agents": {
66
+ // Fixed Bearer compatibility example. `enabled` is hot desired state:
67
+ // disabled Agents remain configured but are not candidates for new
68
+ // orchestration, while already admitted remote tasks may finish.
69
+ // "reporting": {
70
+ // "cardUrl": "https://agents.example.com/.well-known/agent-card.json",
71
+ // "enabled": true,
72
+ // "credentialEnv": "REPORTING_A2A_TOKEN",
73
+ // "effect": "read"
74
+ // },
75
+
76
+ // Standards-based machine-to-machine OAuth2 example. The external
77
+ // Authorization Server issues access tokens; KodaX obtains and caches them
78
+ // only in process memory. `tokenUrl` must exactly match the selected Card
79
+ // OAuth2 clientCredentials flow. Use `kodax a2a enable|disable <name>` to
80
+ // mutate `enabled` atomically; the owning Runtime applies it asynchronously.
81
+ // "reviewer": {
82
+ // "cardUrl": "https://reviewer.example.com/.well-known/agent-card.json",
83
+ // "enabled": false,
84
+ // "effect": "read",
85
+ // "authentication": {
86
+ // "type": "oauth2-client-credentials",
87
+ // "scheme": "enterprise-oauth",
88
+ // "issuer": "https://identity.example.com",
89
+ // "tokenUrl": "https://identity.example.com/oauth/token",
90
+ // "clientId": "kodax-reviewer",
91
+ // "clientSecretEnv": "REVIEWER_CLIENT_SECRET",
92
+ // "scopes": ["a2a.invoke"],
93
+ // "resource": "https://reviewer.example.com/",
94
+ // "clientAuthentication": "client-secret-basic"
95
+ // }
96
+ // }
97
+ }
98
+ }
@@ -1,7 +1,7 @@
1
- // Trusted user Extension paths: ~/.kodax/integrations/extensions.json.
2
- // Extensions are host code. Reload is whole-domain atomic; use MCP for
3
- // capabilities that should remain outside the KodaX process.
4
- {
5
- "version": 1,
6
- "paths": []
7
- }
1
+ // Trusted user Extension paths: ~/.kodax/integrations/extensions.json.
2
+ // Extensions are host code. Reload is whole-domain atomic; use MCP for
3
+ // capabilities that should remain outside the KodaX process.
4
+ {
5
+ "version": 1,
6
+ "paths": []
7
+ }
@@ -1,16 +1,16 @@
1
- // User MCP declarations: ~/.kodax/integrations/mcp.json (strict JSON).
2
- // The whole file hot-reloads; healthy entries remain active if one new entry
3
- // fails to prepare. Keep credentials in ${env:NAME} references.
4
- {
5
- "version": 1,
6
- "servers": {}
7
- // Example:
8
- // "servers": {
9
- // "reporting": {
10
- // "type": "streamable-http",
11
- // "url": "https://mcp.example.com",
12
- // "headers": { "Authorization": "Bearer ${env:REPORTING_MCP_TOKEN}" },
13
- // "connect": "lazy"
14
- // }
15
- // }
16
- }
1
+ // User MCP declarations: ~/.kodax/integrations/mcp.json (strict JSON).
2
+ // The whole file hot-reloads; healthy entries remain active if one new entry
3
+ // fails to prepare. Keep credentials in ${env:NAME} references.
4
+ {
5
+ "version": 1,
6
+ "servers": {}
7
+ // Example:
8
+ // "servers": {
9
+ // "reporting": {
10
+ // "type": "streamable-http",
11
+ // "url": "https://mcp.example.com",
12
+ // "headers": { "Authorization": "Bearer ${env:REPORTING_MCP_TOKEN}" },
13
+ // "connect": "lazy"
14
+ // }
15
+ // }
16
+ }
@@ -58,25 +58,25 @@ compatibility: "Works best in a git repository or when the review target is prov
58
58
 
59
59
  ## 使用示例
60
60
 
61
- - `/code-review src/auth.ts` - 审查单个文件
62
- - `/code-review packages/coding/src/` - 审查目录
63
- - `/code-review` - 审查当前 git 变更
64
-
65
- ## Lean Review Lens
66
-
67
- When the user asks for lean review, minimal diff, YAGNI, over-engineering, or
68
- native/stdlib replacement opportunities, add this lens after correctness and
69
- security findings:
70
-
71
- - Look for code, files, abstractions, dependencies, configuration, or workflow
72
- changes that can be deleted without losing requested behavior.
73
- - Prefer existing repository code, stdlib/native platform features, or an
74
- already-installed dependency when that is verifiably simpler than new custom
75
- code.
76
- - Do not recommend cutting trust-boundary validation, security checks,
77
- data-loss protection, accessibility basics, observability needed for safety,
78
- or explicitly requested behavior.
79
- - Do not present optional cleanup as a high-severity finding. Put non-blocking
80
- deletion/replacement ideas under `## Lean Suggestions`.
81
- - For each lean suggestion, explain what can be skipped or removed and when it
82
- should be added back.
61
+ - `/code-review src/auth.ts` - 审查单个文件
62
+ - `/code-review packages/coding/src/` - 审查目录
63
+ - `/code-review` - 审查当前 git 变更
64
+
65
+ ## Lean Review Lens
66
+
67
+ When the user asks for lean review, minimal diff, YAGNI, over-engineering, or
68
+ native/stdlib replacement opportunities, add this lens after correctness and
69
+ security findings:
70
+
71
+ - Look for code, files, abstractions, dependencies, configuration, or workflow
72
+ changes that can be deleted without losing requested behavior.
73
+ - Prefer existing repository code, stdlib/native platform features, or an
74
+ already-installed dependency when that is verifiably simpler than new custom
75
+ code.
76
+ - Do not recommend cutting trust-boundary validation, security checks,
77
+ data-loss protection, accessibility basics, observability needed for safety,
78
+ or explicitly requested behavior.
79
+ - Do not present optional cleanup as a high-severity finding. Put non-blocking
80
+ deletion/replacement ideas under `## Lean Suggestions`.
81
+ - For each lean suggestion, explain what can be skipped or removed and when it
82
+ should be added back.
@@ -1,46 +1,46 @@
1
- export interface BenchmarkRun {
2
- eval_id: string | number;
3
- run_id: string;
4
- pass_rate: number;
5
- passed: number;
6
- failed: number;
7
- total: number;
8
- time_seconds: number;
9
- tokens: number;
10
- tool_calls: number;
11
- errors: number;
12
- expectations: Array<Record<string, unknown>>;
13
- notes: string[];
14
- }
15
-
16
- export interface StatsSummary {
17
- mean: number;
18
- stddev: number;
19
- min: number;
20
- max: number;
21
- }
22
-
23
- export interface BenchmarkDocument {
24
- skill_name: string;
25
- generated_at: string;
26
- workspace: string;
27
- configs: Record<string, {
28
- pass_rate: StatsSummary;
29
- time_seconds: StatsSummary;
30
- tokens: StatsSummary;
31
- }>;
32
- delta: {
33
- pass_rate: string;
34
- time_seconds: string;
35
- tokens: string;
36
- };
37
- runs: Record<string, BenchmarkRun[]>;
38
- }
39
-
40
- export function loadRunResults(iterationDir: string): Promise<Record<string, BenchmarkRun[]>>;
41
- export function buildBenchmarkDocument(
42
- iterationDir: string,
43
- skillName: string,
44
- configRuns: Record<string, BenchmarkRun[]>
45
- ): BenchmarkDocument;
46
- export function renderBenchmarkMarkdown(benchmark: BenchmarkDocument): string;
1
+ export interface BenchmarkRun {
2
+ eval_id: string | number;
3
+ run_id: string;
4
+ pass_rate: number;
5
+ passed: number;
6
+ failed: number;
7
+ total: number;
8
+ time_seconds: number;
9
+ tokens: number;
10
+ tool_calls: number;
11
+ errors: number;
12
+ expectations: Array<Record<string, unknown>>;
13
+ notes: string[];
14
+ }
15
+
16
+ export interface StatsSummary {
17
+ mean: number;
18
+ stddev: number;
19
+ min: number;
20
+ max: number;
21
+ }
22
+
23
+ export interface BenchmarkDocument {
24
+ skill_name: string;
25
+ generated_at: string;
26
+ workspace: string;
27
+ configs: Record<string, {
28
+ pass_rate: StatsSummary;
29
+ time_seconds: StatsSummary;
30
+ tokens: StatsSummary;
31
+ }>;
32
+ delta: {
33
+ pass_rate: string;
34
+ time_seconds: string;
35
+ tokens: string;
36
+ };
37
+ runs: Record<string, BenchmarkRun[]>;
38
+ }
39
+
40
+ export function loadRunResults(iterationDir: string): Promise<Record<string, BenchmarkRun[]>>;
41
+ export function buildBenchmarkDocument(
42
+ iterationDir: string,
43
+ skillName: string,
44
+ configRuns: Record<string, BenchmarkRun[]>
45
+ ): BenchmarkDocument;
46
+ export function renderBenchmarkMarkdown(benchmark: BenchmarkDocument): string;
@@ -1,46 +1,46 @@
1
- export interface AnalyzeBenchmarkOptions {
2
- workspaceDir: string;
3
- benchmarkPath?: string;
4
- outputPath?: string;
5
- markdownPath?: string;
6
- skillName?: string;
7
- provider?: string;
8
- model?: string;
9
- reasoningMode?: string;
10
- maxIter?: number;
11
- cwd?: string;
12
- }
13
-
14
- export interface BenchmarkAnalysis {
15
- skill_name: string;
16
- generated_at: string;
17
- workspace: string;
18
- verdict: 'improves' | 'regresses' | 'mixed' | 'inconclusive';
19
- release_readiness: 'ready' | 'needs_iteration' | 'needs_manual_review';
20
- recommendation: string;
21
- key_findings: string[];
22
- variance_hotspots: string[];
23
- suggested_actions: string[];
24
- watchouts: string[];
25
- supporting_metrics: {
26
- pass_rate_delta: string;
27
- time_seconds_delta: string;
28
- tokens_delta: string;
29
- };
30
- failure_clusters: Record<string, unknown>;
31
- }
32
-
33
- export function buildAnalysisPrompt(input: Record<string, unknown>): string;
34
-
35
- export function renderAnalysisMarkdown(analysis: Record<string, any>): string;
36
-
37
- export function analyzeBenchmark(
38
- options: AnalyzeBenchmarkOptions,
39
- runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
40
- ): Promise<{
41
- analysis: BenchmarkAnalysis;
42
- prompt: string;
43
- rawResponse: string;
44
- analysisJsonPath: string;
45
- analysisMdPath: string;
46
- }>;
1
+ export interface AnalyzeBenchmarkOptions {
2
+ workspaceDir: string;
3
+ benchmarkPath?: string;
4
+ outputPath?: string;
5
+ markdownPath?: string;
6
+ skillName?: string;
7
+ provider?: string;
8
+ model?: string;
9
+ reasoningMode?: string;
10
+ maxIter?: number;
11
+ cwd?: string;
12
+ }
13
+
14
+ export interface BenchmarkAnalysis {
15
+ skill_name: string;
16
+ generated_at: string;
17
+ workspace: string;
18
+ verdict: 'improves' | 'regresses' | 'mixed' | 'inconclusive';
19
+ release_readiness: 'ready' | 'needs_iteration' | 'needs_manual_review';
20
+ recommendation: string;
21
+ key_findings: string[];
22
+ variance_hotspots: string[];
23
+ suggested_actions: string[];
24
+ watchouts: string[];
25
+ supporting_metrics: {
26
+ pass_rate_delta: string;
27
+ time_seconds_delta: string;
28
+ tokens_delta: string;
29
+ };
30
+ failure_clusters: Record<string, unknown>;
31
+ }
32
+
33
+ export function buildAnalysisPrompt(input: Record<string, unknown>): string;
34
+
35
+ export function renderAnalysisMarkdown(analysis: Record<string, any>): string;
36
+
37
+ export function analyzeBenchmark(
38
+ options: AnalyzeBenchmarkOptions,
39
+ runner?: (prompt: string, options: Record<string, unknown>) => Promise<string>
40
+ ): Promise<{
41
+ analysis: BenchmarkAnalysis;
42
+ prompt: string;
43
+ rawResponse: string;
44
+ analysisJsonPath: string;
45
+ analysisMdPath: string;
46
+ }>;