@namzu/sdk 45.0.0 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +166 -0
- package/dist/authorization/gate.d.ts +5 -2
- package/dist/authorization/gate.d.ts.map +1 -1
- package/dist/authorization/gate.js +35 -4
- package/dist/authorization/gate.js.map +1 -1
- package/dist/authorization/rules.d.ts.map +1 -1
- package/dist/authorization/rules.js +56 -6
- package/dist/authorization/rules.js.map +1 -1
- package/dist/authorization/shell-lexer.d.ts +38 -0
- package/dist/authorization/shell-lexer.d.ts.map +1 -1
- package/dist/authorization/shell-lexer.js +88 -57
- package/dist/authorization/shell-lexer.js.map +1 -1
- package/dist/bridge/a2a/mapper.d.ts.map +1 -1
- package/dist/bridge/a2a/mapper.js +2 -0
- package/dist/bridge/a2a/mapper.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +1 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/directory/types.d.ts +2 -0
- package/dist/directory/types.d.ts.map +1 -1
- package/dist/directory/types.js.map +1 -1
- package/dist/manager/resident/outbox.d.ts +4 -4
- package/dist/pricing/catalogue.generated.d.ts.map +1 -1
- package/dist/pricing/catalogue.generated.js +28 -4
- package/dist/pricing/catalogue.generated.js.map +1 -1
- package/dist/prompt/coding-agent-doctrine.d.ts +1 -1
- package/dist/prompt/coding-agent-doctrine.d.ts.map +1 -1
- package/dist/prompt/coding-agent-doctrine.js +1 -0
- package/dist/prompt/coding-agent-doctrine.js.map +1 -1
- package/dist/public-runtime.d.ts +6 -3
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +14 -2
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +7 -2
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +15 -2
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +8 -2
- package/dist/public-types.d.ts.map +1 -1
- package/dist/registry/tool/callable.d.ts +22 -0
- package/dist/registry/tool/callable.d.ts.map +1 -0
- package/dist/registry/tool/callable.js +29 -0
- package/dist/registry/tool/callable.js.map +1 -0
- package/dist/registry/tool/execute.d.ts.map +1 -1
- package/dist/registry/tool/execute.js +8 -1
- package/dist/registry/tool/execute.js.map +1 -1
- package/dist/runtime/query/declined.d.ts +12 -0
- package/dist/runtime/query/declined.d.ts.map +1 -0
- package/dist/runtime/query/declined.js +12 -0
- package/dist/runtime/query/declined.js.map +1 -0
- package/dist/runtime/query/executor/tool-call-admission.d.ts +37 -11
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +38 -12
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/executor.d.ts +7 -3
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +32 -7
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +1 -0
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +7 -0
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +6 -0
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/handoff.d.ts +22 -0
- package/dist/runtime/query/iteration/phases/handoff.d.ts.map +1 -0
- package/dist/runtime/query/iteration/phases/handoff.js +65 -0
- package/dist/runtime/query/iteration/phases/handoff.js.map +1 -0
- package/dist/runtime/query/iteration/phases/index.d.ts +1 -0
- package/dist/runtime/query/iteration/phases/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/index.js +1 -0
- package/dist/runtime/query/iteration/phases/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +8 -3
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/resume-pending.d.ts.map +1 -1
- package/dist/runtime/query/resume-pending.js +3 -2
- package/dist/runtime/query/resume-pending.js.map +1 -1
- package/dist/runtime/query/review-policy.d.ts +43 -0
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +63 -19
- package/dist/runtime/query/review-policy.js.map +1 -1
- package/dist/schedules/cron.d.ts +21 -0
- package/dist/schedules/cron.d.ts.map +1 -0
- package/dist/schedules/cron.js +167 -0
- package/dist/schedules/cron.js.map +1 -0
- package/dist/schedules/describe.d.ts +14 -0
- package/dist/schedules/describe.d.ts.map +1 -0
- package/dist/schedules/describe.js +133 -0
- package/dist/schedules/describe.js.map +1 -0
- package/dist/schedules/errors.d.ts +11 -0
- package/dist/schedules/errors.d.ts.map +1 -0
- package/dist/schedules/errors.js +15 -0
- package/dist/schedules/errors.js.map +1 -0
- package/dist/schedules/evaluate.d.ts +35 -0
- package/dist/schedules/evaluate.d.ts.map +1 -0
- package/dist/schedules/evaluate.js +158 -0
- package/dist/schedules/evaluate.js.map +1 -0
- package/dist/schedules/index.d.ts +11 -0
- package/dist/schedules/index.d.ts.map +1 -0
- package/dist/schedules/index.js +8 -0
- package/dist/schedules/index.js.map +1 -0
- package/dist/schedules/next-fire.d.ts +50 -0
- package/dist/schedules/next-fire.d.ts.map +1 -0
- package/dist/schedules/next-fire.js +250 -0
- package/dist/schedules/next-fire.js.map +1 -0
- package/dist/schedules/spec.d.ts +30 -0
- package/dist/schedules/spec.d.ts.map +1 -0
- package/dist/schedules/spec.js +169 -0
- package/dist/schedules/spec.js.map +1 -0
- package/dist/schedules/types.d.ts +144 -0
- package/dist/schedules/types.d.ts.map +1 -0
- package/dist/schedules/types.js +11 -0
- package/dist/schedules/types.js.map +1 -0
- package/dist/schedules/tz.d.ts +44 -0
- package/dist/schedules/tz.d.ts.map +1 -0
- package/dist/schedules/tz.js +141 -0
- package/dist/schedules/tz.js.map +1 -0
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +16 -3
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +48 -4
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/registry.d.ts +6 -0
- package/dist/skills/registry.d.ts.map +1 -1
- package/dist/skills/registry.js +1 -0
- package/dist/skills/registry.js.map +1 -1
- package/dist/tools/builtins/browser-url.d.ts +83 -0
- package/dist/tools/builtins/browser-url.d.ts.map +1 -0
- package/dist/tools/builtins/browser-url.js +240 -0
- package/dist/tools/builtins/browser-url.js.map +1 -0
- package/dist/tools/builtins/browser.d.ts +367 -0
- package/dist/tools/builtins/browser.d.ts.map +1 -0
- package/dist/tools/builtins/browser.js +704 -0
- package/dist/tools/builtins/browser.js.map +1 -0
- package/dist/tools/builtins/computer-use-coordinates.d.ts +65 -0
- package/dist/tools/builtins/computer-use-coordinates.d.ts.map +1 -0
- package/dist/tools/builtins/computer-use-coordinates.js +123 -0
- package/dist/tools/builtins/computer-use-coordinates.js.map +1 -0
- package/dist/tools/builtins/computer-use-image.d.ts +77 -0
- package/dist/tools/builtins/computer-use-image.d.ts.map +1 -0
- package/dist/tools/builtins/computer-use-image.js +223 -0
- package/dist/tools/builtins/computer-use-image.js.map +1 -0
- package/dist/tools/builtins/computer-use.d.ts +519 -14
- package/dist/tools/builtins/computer-use.d.ts.map +1 -1
- package/dist/tools/builtins/computer-use.js +1188 -183
- package/dist/tools/builtins/computer-use.js.map +1 -1
- package/dist/tools/builtins/index.d.ts +2 -1
- package/dist/tools/builtins/index.d.ts.map +1 -1
- package/dist/tools/builtins/index.js +1 -1
- package/dist/tools/builtins/index.js.map +1 -1
- package/dist/tools/builtins/skill.d.ts +74 -0
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +214 -159
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/tools/defineTool.d.ts +4 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +8 -0
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/schedules/index.d.ts +5 -0
- package/dist/tools/schedules/index.d.ts.map +1 -0
- package/dist/tools/schedules/index.js +4 -0
- package/dist/tools/schedules/index.js.map +1 -0
- package/dist/tools/schedules/loop-tool.d.ts +14 -0
- package/dist/tools/schedules/loop-tool.d.ts.map +1 -0
- package/dist/tools/schedules/loop-tool.js +81 -0
- package/dist/tools/schedules/loop-tool.js.map +1 -0
- package/dist/tools/schedules/present.d.ts +16 -0
- package/dist/tools/schedules/present.d.ts.map +1 -0
- package/dist/tools/schedules/present.js +71 -0
- package/dist/tools/schedules/present.js.map +1 -0
- package/dist/tools/schedules/prompt-scan.d.ts +17 -0
- package/dist/tools/schedules/prompt-scan.d.ts.map +1 -0
- package/dist/tools/schedules/prompt-scan.js +92 -0
- package/dist/tools/schedules/prompt-scan.js.map +1 -0
- package/dist/tools/schedules/schedule-tool.d.ts +17 -0
- package/dist/tools/schedules/schedule-tool.d.ts.map +1 -0
- package/dist/tools/schedules/schedule-tool.js +418 -0
- package/dist/tools/schedules/schedule-tool.js.map +1 -0
- package/dist/tools/schedules/types.d.ts +252 -0
- package/dist/tools/schedules/types.d.ts.map +1 -0
- package/dist/tools/schedules/types.js +11 -0
- package/dist/tools/schedules/types.js.map +1 -0
- package/dist/types/authorization/index.d.ts +107 -9
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/authorization/index.js +16 -1
- package/dist/types/authorization/index.js.map +1 -1
- package/dist/types/browser/index.d.ts +280 -0
- package/dist/types/browser/index.d.ts.map +1 -0
- package/dist/types/browser/index.js +12 -0
- package/dist/types/browser/index.js.map +1 -0
- package/dist/types/computer-use/index.d.ts +176 -0
- package/dist/types/computer-use/index.d.ts.map +1 -1
- package/dist/types/computer-use/index.js.map +1 -1
- package/dist/types/session/events.d.ts +6 -0
- package/dist/types/session/events.d.ts.map +1 -1
- package/dist/types/session/events.js.map +1 -1
- package/dist/types/session/records.d.ts +23 -0
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +9 -0
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/tool/index.d.ts +60 -0
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/tool/presentation.d.ts +7 -0
- package/dist/types/tool/presentation.d.ts.map +1 -1
- package/dist/utils/frontmatter.d.ts +18 -2
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +13 -3
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/id.d.ts +8 -0
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/id.js +12 -0
- package/dist/utils/id.js.map +1 -1
- package/package.json +3 -1
- package/src/authorization/gate.ts +37 -4
- package/src/authorization/rules.ts +55 -7
- package/src/authorization/shell-lexer.ts +109 -51
- package/src/bridge/a2a/mapper.ts +2 -0
- package/src/bridge/sse/mapper.ts +1 -0
- package/src/directory/types.ts +2 -0
- package/src/pricing/catalogue.generated.ts +28 -4
- package/src/pricing/rates.source.json +27 -6
- package/src/prompt/coding-agent-doctrine.ts +1 -0
- package/src/public-runtime.ts +43 -1
- package/src/public-tools.ts +54 -1
- package/src/public-types.ts +55 -0
- package/src/registry/tool/callable.ts +37 -0
- package/src/registry/tool/execute.ts +8 -1
- package/src/runtime/query/declined.ts +12 -0
- package/src/runtime/query/executor/tool-call-admission.ts +60 -16
- package/src/runtime/query/executor.ts +36 -5
- package/src/runtime/query/index.ts +1 -0
- package/src/runtime/query/iteration/index.ts +8 -0
- package/src/runtime/query/iteration/phases/context.ts +6 -0
- package/src/runtime/query/iteration/phases/handoff.ts +74 -0
- package/src/runtime/query/iteration/phases/index.ts +1 -0
- package/src/runtime/query/iteration/phases/tool-review.ts +11 -4
- package/src/runtime/query/resume-pending.ts +3 -2
- package/src/runtime/query/review-policy.ts +107 -18
- package/src/schedules/cron.ts +202 -0
- package/src/schedules/describe.ts +138 -0
- package/src/schedules/errors.ts +15 -0
- package/src/schedules/evaluate.ts +178 -0
- package/src/schedules/index.ts +18 -0
- package/src/schedules/next-fire.ts +257 -0
- package/src/schedules/spec.ts +210 -0
- package/src/schedules/types.ts +163 -0
- package/src/schedules/tz.ts +155 -0
- package/src/skills/index.ts +1 -1
- package/src/skills/loader.ts +55 -4
- package/src/skills/registry.ts +8 -0
- package/src/tools/builtins/browser-url.ts +251 -0
- package/src/tools/builtins/browser.ts +817 -0
- package/src/tools/builtins/computer-use-coordinates.ts +144 -0
- package/src/tools/builtins/computer-use-image.ts +278 -0
- package/src/tools/builtins/computer-use.ts +1485 -191
- package/src/tools/builtins/index.ts +7 -1
- package/src/tools/builtins/skill.ts +304 -156
- package/src/tools/defineTool.ts +13 -0
- package/src/tools/schedules/index.ts +4 -0
- package/src/tools/schedules/loop-tool.ts +85 -0
- package/src/tools/schedules/present.ts +88 -0
- package/src/tools/schedules/prompt-scan.ts +96 -0
- package/src/tools/schedules/schedule-tool.ts +482 -0
- package/src/tools/schedules/types.ts +265 -0
- package/src/types/authorization/index.ts +81 -2
- package/src/types/browser/index.ts +341 -0
- package/src/types/computer-use/index.ts +202 -0
- package/src/types/session/events.ts +6 -0
- package/src/types/session/records.ts +10 -0
- package/src/types/tool/index.ts +61 -0
- package/src/types/tool/presentation.ts +7 -0
- package/src/utils/frontmatter.ts +29 -3
- package/src/utils/id.ts +14 -0
package/dist/utils/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/utils/id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4ChD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA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AM,CAAC,MAAM,WAAW,GAAwB,YAAY,CAAC,SAAS,CAAC,CAAA;AACvE,MAAM,CAAC,MAAM,cAAc,GAA2B,YAAY,CAAC,YAAY,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,QAAQ,GAAqB,YAAY,CAAC,MAAM,CAAC,CAAA;AAC9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAsB,YAAY,CAAC,OAAO,CAAC,CAAA;AACjE,MAAM,CAAC,MAAM,gBAAgB,GAA6B,YAAY,CAAC,gBAAgB,CAAC,CAAA;AACxF,MAAM,CAAC,MAAM,UAAU,GAAuB,YAAY,CAAC,UAAU,CAAC,CAAA;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAA+B,YAAY,CAAC,kBAAkB,CAAC,CAAA;AAC9F,MAAM,CAAC,MAAM,WAAW,GAAwB,YAAY,CAAC,SAAS,CAAC,CAAA;AACvE,MAAM,CAAC,MAAM,SAAS,GAAsB,YAAY,CAAC,OAAO,CAAC,CAAA;AACjE,MAAM,CAAC,MAAM,cAAc,GAA2B,YAAY,CAAC,YAAY,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,WAAW,GAAwB,YAAY,CAAC,SAAS,CAAC,CAAA;AACvE,MAAM,CAAC,MAAM,aAAa,GAA0B,YAAY,CAAC,WAAW,CAAC,CAAA;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAwB,YAAY,CAAC,SAAS,CAAC,CAAA;AACvE,MAAM,CAAC,MAAM,eAAe,GAA4B,YAAY,CAAC,aAAa,CAAC,CAAA;AAEnF,sEAAsE;AAEtE,2EAA2E;AAC3E,6EAA6E;AAC7E,+BAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namzu/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "46.0.0",
|
|
4
4
|
"description": "Open-source AI agent SDK with a built-in runtime. Nothing between you and your agents.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"engines": {
|
|
@@ -75,7 +75,9 @@
|
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@jitl/quickjs-wasmfile-release-sync": "0.32.0",
|
|
77
77
|
"brace-expansion": "^2.1.4",
|
|
78
|
+
"fast-png": "^8.0.0",
|
|
78
79
|
"minimatch": "^9.0.9",
|
|
80
|
+
"pica": "^10.0.3",
|
|
79
81
|
"quickjs-emscripten-core": "0.32.0"
|
|
80
82
|
},
|
|
81
83
|
"scripts": {
|
|
@@ -2,6 +2,7 @@ import { MAX_CUSTOM_PATTERN_LENGTH } from '../constants/authorization/index.js'
|
|
|
2
2
|
import { GENAI } from '../constants/telemetry/index.js'
|
|
3
3
|
import type {
|
|
4
4
|
AuthorizationGateConfig,
|
|
5
|
+
AuthorizationPredicateCall,
|
|
5
6
|
AuthorizationRule,
|
|
6
7
|
GateEvaluationResult,
|
|
7
8
|
} from '../types/authorization/index.js'
|
|
@@ -38,8 +39,11 @@ export interface ToolCallContext {
|
|
|
38
39
|
* `git push*`, it can stop, say so, and do something else. A refusal that
|
|
39
40
|
* cannot be reasoned about produces thrashing; one that can produces a route
|
|
40
41
|
* around it.
|
|
42
|
+
*
|
|
43
|
+
* `call`, when given, is the call the rule decided: a `predicate` rule with a
|
|
44
|
+
* `describe` says what in it matched, instead of its fixed `description`.
|
|
41
45
|
*/
|
|
42
|
-
export function describeRule(rule: AuthorizationRule): string {
|
|
46
|
+
export function describeRule(rule: AuthorizationRule, call?: AuthorizationPredicateCall): string {
|
|
43
47
|
switch (rule.type) {
|
|
44
48
|
case 'deny_dangerous_patterns':
|
|
45
49
|
return 'this matches a pattern the operator refuses outright; rewording it will not help'
|
|
@@ -57,15 +61,35 @@ export function describeRule(rule: AuthorizationRule): string {
|
|
|
57
61
|
// Names the argument, not just the pattern. That is what tells a
|
|
58
62
|
// model whether a different value could get through — which is the
|
|
59
63
|
// difference between rewording once and rewording forever.
|
|
60
|
-
const verb =
|
|
64
|
+
const verb =
|
|
65
|
+
rule.decision === 'deny'
|
|
66
|
+
? 'denied'
|
|
67
|
+
: rule.decision === 'review'
|
|
68
|
+
? 'sent for review'
|
|
69
|
+
: 'allowed'
|
|
61
70
|
return `${verb} because the \`${rule.argument}\` argument matched ${rule.pattern} (this rule applies to ${rule.toolNames.join(', ')})`
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
case 'custom_pattern': {
|
|
65
74
|
const where = rule.target === 'both' ? 'name or arguments' : rule.target
|
|
66
|
-
const verb =
|
|
75
|
+
const verb =
|
|
76
|
+
rule.decision === 'deny'
|
|
77
|
+
? 'denied'
|
|
78
|
+
: rule.decision === 'review'
|
|
79
|
+
? 'sent for review'
|
|
80
|
+
: 'allowed'
|
|
67
81
|
return `${verb} by a pattern rule matching the ${where}: ${rule.pattern}`
|
|
68
82
|
}
|
|
83
|
+
case 'predicate': {
|
|
84
|
+
if (call === undefined || rule.describe === undefined) return rule.description
|
|
85
|
+
// A reason that cannot be computed is no reason to lose the
|
|
86
|
+
// refusal: the fixed one still says what the rule is.
|
|
87
|
+
try {
|
|
88
|
+
return rule.describe(call) || rule.description
|
|
89
|
+
} catch {
|
|
90
|
+
return rule.description
|
|
91
|
+
}
|
|
92
|
+
}
|
|
69
93
|
default: {
|
|
70
94
|
const exhaustive: never = rule
|
|
71
95
|
return `matched an unrecognised rule: ${JSON.stringify(exhaustive)}`
|
|
@@ -220,7 +244,16 @@ export class AuthorizationGate {
|
|
|
220
244
|
const result: GateEvaluationResult = {
|
|
221
245
|
decision,
|
|
222
246
|
matchedRule: rule,
|
|
223
|
-
reason:
|
|
247
|
+
reason:
|
|
248
|
+
rule.type === 'predicate'
|
|
249
|
+
? describeRule(rule, {
|
|
250
|
+
toolName: ctx.toolName,
|
|
251
|
+
toolInput: ctx.toolInput,
|
|
252
|
+
toolDef: ctx.toolDef,
|
|
253
|
+
// What `evaluateRule` told `decide`.
|
|
254
|
+
commandDialect: ctx.commandDialect ?? 'sh',
|
|
255
|
+
})
|
|
256
|
+
: describeRule(rule),
|
|
224
257
|
}
|
|
225
258
|
|
|
226
259
|
if (this.logDecisions) {
|
|
@@ -44,6 +44,14 @@ export function evaluateRule(
|
|
|
44
44
|
const category = toolDef?.category
|
|
45
45
|
if (category && rule.excludeCategories?.includes(category)) return null
|
|
46
46
|
|
|
47
|
+
// A read that sends the operator's screen to the model provider is
|
|
48
|
+
// the one read a person may want to allow first
|
|
49
|
+
// (`ToolDefinition.capturesScreen`). It falls through to the review
|
|
50
|
+
// policy, which asks once per session when the host keeps a consent
|
|
51
|
+
// record and approves it as the read it is otherwise. An explicit
|
|
52
|
+
// allow rule for the tool still allows it here.
|
|
53
|
+
if (capturesScreen(toolDef, toolInput)) return null
|
|
54
|
+
|
|
47
55
|
return 'allow'
|
|
48
56
|
}
|
|
49
57
|
|
|
@@ -134,19 +142,33 @@ export function evaluateRule(
|
|
|
134
142
|
// A command line is not one string, and testing it as one is how a
|
|
135
143
|
// prohibition gets bypassed: `^git push` sees `git push origin main`
|
|
136
144
|
// and does not see `true; git push origin main`. See
|
|
137
|
-
// `decomposeCommandLine` for the measurement and for why the
|
|
145
|
+
// `decomposeCommandLine` for the measurement and for why the
|
|
138
146
|
// decisions must read the result differently.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
147
|
+
//
|
|
148
|
+
// An argument the tool declares as a canonical URL is not a command
|
|
149
|
+
// line, and cutting it at `&` would make an `allow` for a site
|
|
150
|
+
// decline every address with a query string. See
|
|
151
|
+
// `ToolDefinition.urlArgument`.
|
|
152
|
+
const isUrl = toolDef?.urlArgument === rule.argument
|
|
153
|
+
const { segments, opaque } = isUrl
|
|
154
|
+
? { segments: [subject], opaque: false }
|
|
155
|
+
: decomposeCommandLine(subject, dialect)
|
|
156
|
+
|
|
157
|
+
if (rule.decision === 'deny' || rule.decision === 'review') {
|
|
142
158
|
// ANY segment. The whole subject is tested first so an
|
|
143
159
|
// unanchored deny keeps matching across a boundary, which
|
|
144
160
|
// splitting alone would have taken away. Then each command's
|
|
145
161
|
// words as bash passes them, so that `'git' push` is `git push`.
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
//
|
|
163
|
+
// `review` reads like `deny`, because it is a restriction too: a
|
|
164
|
+
// rule that asks before `git push` must ask before
|
|
165
|
+
// `true; git push` as well. Matching too much costs a prompt;
|
|
166
|
+
// matching too little skips the question the operator asked for.
|
|
167
|
+
if (compiledPattern.test(subject)) return rule.decision
|
|
168
|
+
if (segments.some((segment) => compiledPattern.test(segment))) return rule.decision
|
|
169
|
+
if (isUrl) return null
|
|
148
170
|
return decodedCommands(subject, dialect).some((text) => compiledPattern.test(text))
|
|
149
|
-
?
|
|
171
|
+
? rule.decision
|
|
150
172
|
: null
|
|
151
173
|
}
|
|
152
174
|
|
|
@@ -165,9 +187,35 @@ export function evaluateRule(
|
|
|
165
187
|
return null
|
|
166
188
|
}
|
|
167
189
|
|
|
190
|
+
case 'predicate': {
|
|
191
|
+
// A rule that throws has not decided the call is safe. Reading the
|
|
192
|
+
// exception as "no opinion" would let the next rule, or the mode,
|
|
193
|
+
// approve what this one was written to refuse.
|
|
194
|
+
try {
|
|
195
|
+
return rule.decide({
|
|
196
|
+
toolName,
|
|
197
|
+
toolInput,
|
|
198
|
+
toolDef,
|
|
199
|
+
commandDialect: dialect,
|
|
200
|
+
})
|
|
201
|
+
} catch {
|
|
202
|
+
return 'deny'
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
168
206
|
default: {
|
|
169
207
|
const _exhaustive: never = rule
|
|
170
208
|
throw new Error(`Unhandled verification rule type: ${(_exhaustive as { type: string }).type}`)
|
|
171
209
|
}
|
|
172
210
|
}
|
|
173
211
|
}
|
|
212
|
+
|
|
213
|
+
function capturesScreen(toolDef: ToolDefinition | undefined, toolInput: unknown): boolean {
|
|
214
|
+
if (!toolDef?.capturesScreen) return false
|
|
215
|
+
try {
|
|
216
|
+
return toolDef.capturesScreen(toolInput)
|
|
217
|
+
} catch {
|
|
218
|
+
// A declaration that cannot answer is not trusted to say "no".
|
|
219
|
+
return true
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -83,6 +83,13 @@ export interface ShellRedirection {
|
|
|
83
83
|
readonly fd?: string
|
|
84
84
|
/** The target word. For a here-document, its delimiter. */
|
|
85
85
|
readonly target: ShellWord
|
|
86
|
+
/**
|
|
87
|
+
* A here-document's body as written, up to its delimiter line, once the
|
|
88
|
+
* lexer has read it: the text the command reads on its input, which is
|
|
89
|
+
* a command line of its own when the command is a shell (`bash <<EOF`).
|
|
90
|
+
* Absent for every other operator and for a body the line never reached.
|
|
91
|
+
*/
|
|
92
|
+
readonly body?: string
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
/** One simple command. */
|
|
@@ -118,6 +125,13 @@ export interface ShellLexResult {
|
|
|
118
125
|
* (`{ a; } > f`) that belong to no single simple command.
|
|
119
126
|
*/
|
|
120
127
|
readonly redirections: readonly ShellRedirection[]
|
|
128
|
+
/**
|
|
129
|
+
* Words that belong to no simple command: a `for` or `select` loop's
|
|
130
|
+
* variable and the words of its list, and a `case` statement's subject
|
|
131
|
+
* and patterns. `for d in ~/x; do rm -r "$d"; done` passes `~/x` to `rm`
|
|
132
|
+
* although no command lists it.
|
|
133
|
+
*/
|
|
134
|
+
readonly compoundWords: readonly ShellWord[]
|
|
121
135
|
/** True when {@link commands} may not be everything the line runs. */
|
|
122
136
|
readonly opaque: boolean
|
|
123
137
|
/** False when parsing stopped early: a syntax error or an unsupported construct. */
|
|
@@ -141,6 +155,72 @@ export const NESTED_SHELLS: ReadonlySet<string> = new Set([
|
|
|
141
155
|
'mksh',
|
|
142
156
|
])
|
|
143
157
|
|
|
158
|
+
/** What {@link nestedShellCommand} found: the payload the lexer reads, or why it could not. */
|
|
159
|
+
export type NestedShellCommand =
|
|
160
|
+
| {
|
|
161
|
+
/** The shell's basename, one of {@link NESTED_SHELLS}. */
|
|
162
|
+
readonly shell: string
|
|
163
|
+
/** The `-c` argument, read as a command line of its own. */
|
|
164
|
+
readonly payload: ShellWord
|
|
165
|
+
}
|
|
166
|
+
| {
|
|
167
|
+
/** Why the lexer calls the line opaque instead (`nested shell option` …). */
|
|
168
|
+
readonly opaque: string
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Whether the lexer reads a simple command's payload as a command line of
|
|
173
|
+
* its own: `words` are the command's words without its leading assignments.
|
|
174
|
+
* The command must start a shell in {@link NESTED_SHELLS} by basename,
|
|
175
|
+
* exactly as written (`bash`, `/bin/sh`; not `bash.exe`, `BASH` or `fish`),
|
|
176
|
+
* or `busybox` running one, with `-c` among its options; the payload is the
|
|
177
|
+
* first argument that is not an option. `null` when it reads no payload.
|
|
178
|
+
*
|
|
179
|
+
* A host deciding on {@link lexShellCommandLine}'s reading uses this to know
|
|
180
|
+
* which text that reading already includes. Every other text a program runs
|
|
181
|
+
* as code — `powershell -c '…'`, `fish -c '…'`, `bash.exe -c '…'`, a script
|
|
182
|
+
* — is not in it.
|
|
183
|
+
*/
|
|
184
|
+
export function nestedShellCommand(words: readonly ShellWord[]): NestedShellCommand | null {
|
|
185
|
+
const head = words[0]
|
|
186
|
+
if (head === undefined || head.expands) return null
|
|
187
|
+
const name = basename(head.value)
|
|
188
|
+
if (name === 'busybox') {
|
|
189
|
+
const next = words[1]
|
|
190
|
+
return next !== undefined && !next.expands && NESTED_SHELLS.has(basename(next.value))
|
|
191
|
+
? nestedShellCommand(words.slice(1))
|
|
192
|
+
: null
|
|
193
|
+
}
|
|
194
|
+
if (!NESTED_SHELLS.has(name)) return null
|
|
195
|
+
let command = false
|
|
196
|
+
let payload: ShellWord | undefined
|
|
197
|
+
for (let i = 1; i < words.length; i += 1) {
|
|
198
|
+
const word = words[i] as ShellWord
|
|
199
|
+
if (word.expands) return { opaque: 'nested shell option' }
|
|
200
|
+
const value = word.value
|
|
201
|
+
if (value === '--' || value === '-') {
|
|
202
|
+
payload = words[i + 1]
|
|
203
|
+
break
|
|
204
|
+
}
|
|
205
|
+
if (value.startsWith('--')) {
|
|
206
|
+
if (value === '--rcfile' || value === '--init-file') i += 1
|
|
207
|
+
continue
|
|
208
|
+
}
|
|
209
|
+
if (/^[-+][A-Za-z]+$/.test(value)) {
|
|
210
|
+
if (value.startsWith('-') && value.includes('c')) command = true
|
|
211
|
+
// `-o name`, `-O name`: the option takes the next word.
|
|
212
|
+
if (/[oO]$/.test(value)) i += 1
|
|
213
|
+
continue
|
|
214
|
+
}
|
|
215
|
+
payload = word
|
|
216
|
+
break
|
|
217
|
+
}
|
|
218
|
+
if (!command) return null
|
|
219
|
+
if (payload === undefined) return { opaque: 'nested shell without a command' }
|
|
220
|
+
if (payload.expands) return { opaque: 'nested shell command is expanded at runtime' }
|
|
221
|
+
return { shell: name, payload }
|
|
222
|
+
}
|
|
223
|
+
|
|
144
224
|
/** How many `bash -c` payloads deep the lexer follows before it gives up. */
|
|
145
225
|
const MAX_SHELL_DEPTH = 4
|
|
146
226
|
/** How deep compound commands and expansions may nest before it gives up. */
|
|
@@ -169,6 +249,7 @@ export function lexShellCommandLine(line: string, options: ShellLexOptions = {})
|
|
|
169
249
|
return {
|
|
170
250
|
commands: context.commands,
|
|
171
251
|
redirections: context.redirections,
|
|
252
|
+
compoundWords: context.compoundWords,
|
|
172
253
|
opaque: context.reasons.size > 0,
|
|
173
254
|
complete: context.complete,
|
|
174
255
|
reasons: [...context.reasons],
|
|
@@ -178,6 +259,7 @@ export function lexShellCommandLine(line: string, options: ShellLexOptions = {})
|
|
|
178
259
|
class Context {
|
|
179
260
|
readonly commands: ShellCommand[] = []
|
|
180
261
|
readonly redirections: ShellRedirection[] = []
|
|
262
|
+
readonly compoundWords: ShellWord[] = []
|
|
181
263
|
readonly reasons = new Set<string>()
|
|
182
264
|
complete = true
|
|
183
265
|
/**
|
|
@@ -358,6 +440,8 @@ interface PendingHeredoc {
|
|
|
358
440
|
readonly delimiter: string
|
|
359
441
|
readonly stripTabs: boolean
|
|
360
442
|
readonly quoted: boolean
|
|
443
|
+
/** The redirection the body belongs to, filled in when it is read. */
|
|
444
|
+
readonly redirection: { body?: string }
|
|
361
445
|
}
|
|
362
446
|
|
|
363
447
|
type Last =
|
|
@@ -790,6 +874,7 @@ class Parser {
|
|
|
790
874
|
}
|
|
791
875
|
const name = this.takePlainWord()
|
|
792
876
|
if (name.kind !== 'word') throw this.unexpected(name)
|
|
877
|
+
this.context.compoundWords.push(name.word)
|
|
793
878
|
this.newlines()
|
|
794
879
|
token = this.peek()
|
|
795
880
|
if (token.kind === 'word' && !token.word.quoted && token.word.value === 'in') {
|
|
@@ -807,7 +892,10 @@ class Parser {
|
|
|
807
892
|
}
|
|
808
893
|
for (;;) {
|
|
809
894
|
token = this.takePlainWord()
|
|
810
|
-
if (token.kind === 'word')
|
|
895
|
+
if (token.kind === 'word') {
|
|
896
|
+
this.context.compoundWords.push(token.word)
|
|
897
|
+
continue
|
|
898
|
+
}
|
|
811
899
|
if (token.kind === 'newline' || (token.kind === 'op' && token.op === ';')) break
|
|
812
900
|
throw this.unexpected(token)
|
|
813
901
|
}
|
|
@@ -854,6 +942,7 @@ class Parser {
|
|
|
854
942
|
this.take()
|
|
855
943
|
const subject = this.takePlainWord()
|
|
856
944
|
if (subject.kind !== 'word') throw this.unexpected(subject)
|
|
945
|
+
this.context.compoundWords.push(subject.word)
|
|
857
946
|
this.newlines()
|
|
858
947
|
const keyword = this.take()
|
|
859
948
|
if (keyword.kind !== 'word' || keyword.word.quoted || keyword.word.value !== 'in') {
|
|
@@ -887,6 +976,7 @@ class Parser {
|
|
|
887
976
|
patterns()
|
|
888
977
|
const pattern = this.take()
|
|
889
978
|
if (pattern.kind !== 'word') throw this.unexpected(pattern)
|
|
979
|
+
this.context.compoundWords.push(pattern.word)
|
|
890
980
|
const next = this.take()
|
|
891
981
|
if (next.kind === 'op' && next.op === '|') continue
|
|
892
982
|
if (next.kind === 'op' && next.op === ')') break
|
|
@@ -1114,6 +1204,11 @@ class Parser {
|
|
|
1114
1204
|
// Ubuntu ship).
|
|
1115
1205
|
this.context.opaque('quoted or expanding target of >& or <&')
|
|
1116
1206
|
}
|
|
1207
|
+
const redirection: { -readonly [K in keyof ShellRedirection]: ShellRedirection[K] } = {
|
|
1208
|
+
operator: operator.op,
|
|
1209
|
+
...(operator.fd !== undefined ? { fd: operator.fd } : {}),
|
|
1210
|
+
target: target.word,
|
|
1211
|
+
}
|
|
1117
1212
|
if (operator.op === '<<' || operator.op === '<<-') {
|
|
1118
1213
|
if (target.word.value.includes('\n')) {
|
|
1119
1214
|
// Bash starts the body at the newline inside the delimiter, so
|
|
@@ -1125,13 +1220,10 @@ class Parser {
|
|
|
1125
1220
|
delimiter: target.word.value,
|
|
1126
1221
|
stripTabs: operator.op === '<<-',
|
|
1127
1222
|
quoted: target.word.quoted,
|
|
1223
|
+
redirection,
|
|
1128
1224
|
})
|
|
1129
1225
|
}
|
|
1130
|
-
return
|
|
1131
|
-
operator: operator.op,
|
|
1132
|
-
...(operator.fd !== undefined ? { fd: operator.fd } : {}),
|
|
1133
|
-
target: target.word,
|
|
1134
|
-
}
|
|
1226
|
+
return redirection
|
|
1135
1227
|
}
|
|
1136
1228
|
|
|
1137
1229
|
/**
|
|
@@ -1176,55 +1268,17 @@ class Parser {
|
|
|
1176
1268
|
}
|
|
1177
1269
|
return
|
|
1178
1270
|
}
|
|
1179
|
-
|
|
1180
|
-
|
|
1271
|
+
const nested = nestedShellCommand(words)
|
|
1272
|
+
if (nested === null) return
|
|
1273
|
+
if ('opaque' in nested) {
|
|
1274
|
+
this.context.opaque(nested.opaque)
|
|
1181
1275
|
return
|
|
1182
1276
|
}
|
|
1183
|
-
|
|
1184
|
-
this.nestedShell(words)
|
|
1277
|
+
this.nestedShell(nested.shell, nested.payload)
|
|
1185
1278
|
}
|
|
1186
1279
|
|
|
1187
|
-
/**
|
|
1188
|
-
|
|
1189
|
-
* non-option argument once `-c` has been seen among the options.
|
|
1190
|
-
*/
|
|
1191
|
-
private nestedShell(words: readonly ShellWord[]): void {
|
|
1192
|
-
const shell = basename(words[0]?.value ?? '')
|
|
1193
|
-
let command = false
|
|
1194
|
-
let payload: ShellWord | undefined
|
|
1195
|
-
for (let i = 1; i < words.length; i += 1) {
|
|
1196
|
-
const word = words[i] as ShellWord
|
|
1197
|
-
if (word.expands) {
|
|
1198
|
-
this.context.opaque('nested shell option')
|
|
1199
|
-
return
|
|
1200
|
-
}
|
|
1201
|
-
const value = word.value
|
|
1202
|
-
if (value === '--' || value === '-') {
|
|
1203
|
-
payload = words[i + 1]
|
|
1204
|
-
break
|
|
1205
|
-
}
|
|
1206
|
-
if (value.startsWith('--')) {
|
|
1207
|
-
if (value === '--rcfile' || value === '--init-file') i += 1
|
|
1208
|
-
continue
|
|
1209
|
-
}
|
|
1210
|
-
if (/^[-+][A-Za-z]+$/.test(value)) {
|
|
1211
|
-
if (value.startsWith('-') && value.includes('c')) command = true
|
|
1212
|
-
// `-o name`, `-O name`: the option takes the next word.
|
|
1213
|
-
if (/[oO]$/.test(value)) i += 1
|
|
1214
|
-
continue
|
|
1215
|
-
}
|
|
1216
|
-
payload = word
|
|
1217
|
-
break
|
|
1218
|
-
}
|
|
1219
|
-
if (!command) return
|
|
1220
|
-
if (payload === undefined) {
|
|
1221
|
-
this.context.opaque('nested shell without a command')
|
|
1222
|
-
return
|
|
1223
|
-
}
|
|
1224
|
-
if (payload.expands) {
|
|
1225
|
-
this.context.opaque('nested shell command is expanded at runtime')
|
|
1226
|
-
return
|
|
1227
|
-
}
|
|
1280
|
+
/** Read the payload of `bash -c payload` as a command line of its own. */
|
|
1281
|
+
private nestedShell(shell: string, payload: ShellWord): void {
|
|
1228
1282
|
if (this.depth + 1 >= MAX_SHELL_DEPTH) {
|
|
1229
1283
|
this.context.opaque('nested shells too deep')
|
|
1230
1284
|
return
|
|
@@ -1641,7 +1695,9 @@ class Parser {
|
|
|
1641
1695
|
const heredoc = this.heredocs.shift() as PendingHeredoc
|
|
1642
1696
|
let i = this.pos
|
|
1643
1697
|
const bodyStart = i
|
|
1698
|
+
let bodyEnd = i
|
|
1644
1699
|
for (;;) {
|
|
1700
|
+
bodyEnd = i
|
|
1645
1701
|
if (i >= src.length) break
|
|
1646
1702
|
let line = ''
|
|
1647
1703
|
let j = i
|
|
@@ -1664,7 +1720,9 @@ class Parser {
|
|
|
1664
1720
|
const test = heredoc.stripTabs ? line.replace(/^\t+/, '') : line
|
|
1665
1721
|
i = j
|
|
1666
1722
|
if (test === heredoc.delimiter) break
|
|
1723
|
+
bodyEnd = i
|
|
1667
1724
|
}
|
|
1725
|
+
heredoc.redirection.body = src.slice(bodyStart, bodyEnd)
|
|
1668
1726
|
if (!heredoc.quoted) {
|
|
1669
1727
|
const body = src.slice(bodyStart, i)
|
|
1670
1728
|
if (/\$[({[]|`/.test(body)) this.heredocBody(body)
|
package/src/bridge/a2a/mapper.ts
CHANGED
|
@@ -227,6 +227,8 @@ const MAPPING: {
|
|
|
227
227
|
// it whether and when a retry is justified.
|
|
228
228
|
{
|
|
229
229
|
checkpointId: e.checkpointId,
|
|
230
|
+
// A person, not a retry, is what this pause waits for.
|
|
231
|
+
...(e.handoff ? { handoff: e.handoff } : {}),
|
|
230
232
|
...(e.failure
|
|
231
233
|
? {
|
|
232
234
|
code: e.failure.code,
|
package/src/bridge/sse/mapper.ts
CHANGED
|
@@ -297,6 +297,7 @@ const MAPPING: {
|
|
|
297
297
|
...(e.failure ? { failure: e.failure } : {}),
|
|
298
298
|
...(e.providerError ? { provider_error: e.providerError } : {}),
|
|
299
299
|
...(e.explanation ? { explanation: e.explanation } : {}),
|
|
300
|
+
...(e.handoff ? { handoff: e.handoff } : {}),
|
|
300
301
|
}),
|
|
301
302
|
},
|
|
302
303
|
|
package/src/directory/types.ts
CHANGED
|
@@ -16,6 +16,8 @@ import type { ToolDefinition } from '../types/tool/index.js'
|
|
|
16
16
|
* those is a `major` waiting to happen on a published type. The layering
|
|
17
17
|
* question — does a convention belong outside the kernel — was answered yes
|
|
18
18
|
* and stands; the shape question had simply never been asked.
|
|
19
|
+
* Schedules were later answered outside this loader, with a zone per spec and
|
|
20
|
+
* a claimed occurrence key: see `docs/sdk/schedules.md` (`../schedules/`).
|
|
19
21
|
*/
|
|
20
22
|
export type DirectorySlot = 'agent' | 'instructions' | 'tools' | 'skills' | 'agents'
|
|
21
23
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// CI re-runs the generator and fails on any difference, so a hand edit here is
|
|
6
6
|
// reverted by the next run at best and reported as drift at worst.
|
|
7
7
|
//
|
|
8
|
-
// 4 vendors,
|
|
8
|
+
// 4 vendors, 35 priced models.
|
|
9
9
|
|
|
10
10
|
import type { ModelPricing } from '../utils/cost.js'
|
|
11
11
|
|
|
@@ -35,6 +35,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
35
35
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 1, writeCostPer1M: 12.5 },
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
|
+
[
|
|
39
|
+
'claude-fable-5-1',
|
|
40
|
+
{
|
|
41
|
+
inputCostPer1M: 10,
|
|
42
|
+
outputCostPer1M: 50,
|
|
43
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.25, writeCostPer1M: 12.5 },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
38
46
|
[
|
|
39
47
|
'claude-haiku-4-5',
|
|
40
48
|
{
|
|
@@ -51,6 +59,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
51
59
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 1, writeCostPer1M: 12.5 },
|
|
52
60
|
},
|
|
53
61
|
],
|
|
62
|
+
[
|
|
63
|
+
'claude-mythos-5-1',
|
|
64
|
+
{
|
|
65
|
+
inputCostPer1M: 10,
|
|
66
|
+
outputCostPer1M: 50,
|
|
67
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.25, writeCostPer1M: 12.5 },
|
|
68
|
+
},
|
|
69
|
+
],
|
|
54
70
|
[
|
|
55
71
|
'claude-opus-4-1',
|
|
56
72
|
{
|
|
@@ -91,6 +107,14 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
91
107
|
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.5, writeCostPer1M: 6.25 },
|
|
92
108
|
},
|
|
93
109
|
],
|
|
110
|
+
[
|
|
111
|
+
'claude-opus-5-5',
|
|
112
|
+
{
|
|
113
|
+
inputCostPer1M: 4,
|
|
114
|
+
outputCostPer1M: 20,
|
|
115
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.2, writeCostPer1M: 5 },
|
|
116
|
+
},
|
|
117
|
+
],
|
|
94
118
|
[
|
|
95
119
|
'claude-sonnet-4-5',
|
|
96
120
|
{
|
|
@@ -110,9 +134,9 @@ export const VENDOR_RATES: readonly VendorRates[] = [
|
|
|
110
134
|
[
|
|
111
135
|
'claude-sonnet-5',
|
|
112
136
|
{
|
|
113
|
-
inputCostPer1M:
|
|
114
|
-
outputCostPer1M:
|
|
115
|
-
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.
|
|
137
|
+
inputCostPer1M: 2,
|
|
138
|
+
outputCostPer1M: 10,
|
|
139
|
+
cache: { promptIncludesCacheReads: false, readCostPer1M: 0.2, writeCostPer1M: 2.5 },
|
|
116
140
|
},
|
|
117
141
|
],
|
|
118
142
|
]),
|
|
@@ -56,11 +56,32 @@
|
|
|
56
56
|
{
|
|
57
57
|
"providerId": "anthropic",
|
|
58
58
|
"unmetered": false,
|
|
59
|
-
"verified": "2026-
|
|
59
|
+
"verified": "2026-09-24",
|
|
60
60
|
"promptIncludesCacheReads": false,
|
|
61
61
|
"reportsCacheWrites": true,
|
|
62
|
-
"note": "The last two rows exist because the driver's own offline catalogue offers those models and this table did not price them — a lookup-key gap that reads as `cost unknown` and is invisible to the generator's own check, which only proves the module matches this file. `providers/anthropic` asserts the two lists agree. Vendor list prices. Cache read is the vendor's published 0.1x of the input rate
|
|
62
|
+
"note": "The last two rows exist because the driver's own offline catalogue offers those models and this table did not price them — a lookup-key gap that reads as `cost unknown` and is invisible to the generator's own check, which only proves the module matches this file. `providers/anthropic` asserts the two lists agree. Vendor list prices, every row checked against its pricing page on the `verified` date. Cache read is the vendor's published 0.1x of the input rate, except on the three models it prices differently: 0.05x on claude-opus-5-5 and 0.025x on claude-fable-5-1 and claude-mythos-5-1, entered at the published rate rather than derived. Cache write is its published 1.25x for the five-minute entry, which is the default TTL and the one the driver's `cacheControl: { type: 'auto' }` asks for. claude-sonnet-5 launched at an introductory $2/$10 with $3/$15 scheduled from 2026-09-01, and this table recorded the scheduled rate; the vendor has since made $2/$10 the standard price and cancelled the increase. The table has no time dimension, so a future promotional window is still recorded at the list rate and over-reported rather than mis-modelled.",
|
|
63
63
|
"models": [
|
|
64
|
+
{
|
|
65
|
+
"id": "claude-fable-5-1",
|
|
66
|
+
"inputPer1M": 10,
|
|
67
|
+
"outputPer1M": 50,
|
|
68
|
+
"cacheReadPer1M": 0.25,
|
|
69
|
+
"cacheWritePer1M": 12.5
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "claude-mythos-5-1",
|
|
73
|
+
"inputPer1M": 10,
|
|
74
|
+
"outputPer1M": 50,
|
|
75
|
+
"cacheReadPer1M": 0.25,
|
|
76
|
+
"cacheWritePer1M": 12.5
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "claude-opus-5-5",
|
|
80
|
+
"inputPer1M": 4,
|
|
81
|
+
"outputPer1M": 20,
|
|
82
|
+
"cacheReadPer1M": 0.2,
|
|
83
|
+
"cacheWritePer1M": 5
|
|
84
|
+
},
|
|
64
85
|
{
|
|
65
86
|
"id": "claude-fable-5",
|
|
66
87
|
"inputPer1M": 10,
|
|
@@ -105,10 +126,10 @@
|
|
|
105
126
|
},
|
|
106
127
|
{
|
|
107
128
|
"id": "claude-sonnet-5",
|
|
108
|
-
"inputPer1M":
|
|
109
|
-
"outputPer1M":
|
|
110
|
-
"cacheReadPer1M": 0.
|
|
111
|
-
"cacheWritePer1M":
|
|
129
|
+
"inputPer1M": 2,
|
|
130
|
+
"outputPer1M": 10,
|
|
131
|
+
"cacheReadPer1M": 0.2,
|
|
132
|
+
"cacheWritePer1M": 2.5
|
|
112
133
|
},
|
|
113
134
|
{
|
|
114
135
|
"id": "claude-sonnet-4-6",
|
|
@@ -69,6 +69,7 @@ export const CODING_AGENT_WORKING_DOCTRINE = `## How you work
|
|
|
69
69
|
- Before any command that could discard uncommitted work, run \`git status\`. If there are changes there that you did not make, stop and ask rather than stashing, committing or discarding somebody else's work.
|
|
70
70
|
- Commit only when the user asks, on the branch that is checked out. Do not create or switch branches unless the user asks or the project's instructions require it.
|
|
71
71
|
- After a broad \`git add\`, review what was staged before committing; a file whose name looks harmless can still carry a secret.
|
|
72
|
+
- Never change git configuration or other persistent settings without asking: not \`user.name\` or \`user.email\`, hooks, remotes, credential helpers, or any \`git config\` (local or global), nor a shell profile or a tool's own config file. If a commit fails because no identity is set, stop and tell the user the command to set one; do not invent one.
|
|
72
73
|
|
|
73
74
|
### Keeping the user informed
|
|
74
75
|
- Before a batch of tool calls, say in one short line what you are about to do and why. When you have been working for a while without saying anything, say in a few words where you are, then continue. One line, not a paragraph; the tool rows on screen already show the details.
|