@namzu/sdk 5.1.0 → 5.2.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 +361 -0
- package/dist/agents/__tests__/run-agent-forwarding.test.d.ts +2 -0
- package/dist/agents/__tests__/run-agent-forwarding.test.d.ts.map +1 -0
- package/dist/agents/__tests__/run-agent-forwarding.test.js +76 -0
- package/dist/agents/__tests__/run-agent-forwarding.test.js.map +1 -0
- package/dist/agents/__tests__/run-completed-stop-reason.test.d.ts +2 -0
- package/dist/agents/__tests__/run-completed-stop-reason.test.d.ts.map +1 -0
- package/dist/agents/__tests__/run-completed-stop-reason.test.js +50 -0
- package/dist/agents/__tests__/run-completed-stop-reason.test.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/runAgent.d.ts +34 -0
- package/dist/agents/runAgent.d.ts.map +1 -1
- package/dist/agents/runAgent.js +5 -3
- package/dist/agents/runAgent.js.map +1 -1
- package/dist/config/runtime.d.ts +30 -30
- package/dist/constants/tools/__tests__/dangerous-patterns.test.d.ts +2 -0
- package/dist/constants/tools/__tests__/dangerous-patterns.test.d.ts.map +1 -0
- package/dist/constants/tools/__tests__/dangerous-patterns.test.js +54 -0
- package/dist/constants/tools/__tests__/dangerous-patterns.test.js.map +1 -0
- package/dist/constants/tools/index.d.ts.map +1 -1
- package/dist/constants/tools/index.js +28 -1
- package/dist/constants/tools/index.js.map +1 -1
- package/dist/contracts/a2a.d.ts +44 -44
- package/dist/directory/__tests__/derive.test.d.ts +2 -0
- package/dist/directory/__tests__/derive.test.d.ts.map +1 -0
- package/dist/directory/__tests__/derive.test.js +111 -0
- package/dist/directory/__tests__/derive.test.js.map +1 -0
- package/dist/directory/__tests__/load-diagnostics.test.d.ts +2 -0
- package/dist/directory/__tests__/load-diagnostics.test.d.ts.map +1 -0
- package/dist/directory/__tests__/load-diagnostics.test.js +106 -0
- package/dist/directory/__tests__/load-diagnostics.test.js.map +1 -0
- package/dist/directory/__tests__/load-directory.test.d.ts +2 -0
- package/dist/directory/__tests__/load-directory.test.d.ts.map +1 -0
- package/dist/directory/__tests__/load-directory.test.js +196 -0
- package/dist/directory/__tests__/load-directory.test.js.map +1 -0
- package/dist/directory/__tests__/subagents.test.d.ts +2 -0
- package/dist/directory/__tests__/subagents.test.d.ts.map +1 -0
- package/dist/directory/__tests__/subagents.test.js +117 -0
- package/dist/directory/__tests__/subagents.test.js.map +1 -0
- package/dist/directory/__tests__/supervisor-budget.test.d.ts +2 -0
- package/dist/directory/__tests__/supervisor-budget.test.d.ts.map +1 -0
- package/dist/directory/__tests__/supervisor-budget.test.js +97 -0
- package/dist/directory/__tests__/supervisor-budget.test.js.map +1 -0
- package/dist/directory/derive-supervisor.d.ts +58 -0
- package/dist/directory/derive-supervisor.d.ts.map +1 -0
- package/dist/directory/derive-supervisor.js +88 -0
- package/dist/directory/derive-supervisor.js.map +1 -0
- package/dist/directory/derive.d.ts +12 -0
- package/dist/directory/derive.d.ts.map +1 -0
- package/dist/directory/derive.js +58 -0
- package/dist/directory/derive.js.map +1 -0
- package/dist/directory/index.d.ts +7 -0
- package/dist/directory/index.d.ts.map +1 -0
- package/dist/directory/index.js +5 -0
- package/dist/directory/index.js.map +1 -0
- package/dist/directory/load.d.ts +14 -0
- package/dist/directory/load.d.ts.map +1 -0
- package/dist/directory/load.js +488 -0
- package/dist/directory/load.js.map +1 -0
- package/dist/directory/scan.d.ts +36 -0
- package/dist/directory/scan.d.ts.map +1 -0
- package/dist/directory/scan.js +136 -0
- package/dist/directory/scan.js.map +1 -0
- package/dist/directory/types.d.ts +215 -0
- package/dist/directory/types.d.ts.map +1 -0
- package/dist/directory/types.js +8 -0
- package/dist/directory/types.js.map +1 -0
- package/dist/plugin/__tests__/path-containment.test.d.ts +2 -0
- package/dist/plugin/__tests__/path-containment.test.d.ts.map +1 -0
- package/dist/plugin/__tests__/path-containment.test.js +91 -0
- package/dist/plugin/__tests__/path-containment.test.js.map +1 -0
- package/dist/plugin/lifecycle.d.ts.map +1 -1
- package/dist/plugin/lifecycle.js +3 -3
- package/dist/plugin/lifecycle.js.map +1 -1
- package/dist/plugin/loader.d.ts.map +1 -1
- package/dist/plugin/loader.js +12 -2
- package/dist/plugin/loader.js.map +1 -1
- package/dist/provider/__tests__/model-version.test.d.ts +2 -0
- package/dist/provider/__tests__/model-version.test.d.ts.map +1 -0
- package/dist/provider/__tests__/model-version.test.js +80 -0
- package/dist/provider/__tests__/model-version.test.js.map +1 -0
- package/dist/provider/__tests__/strict-schema.test.d.ts +2 -0
- package/dist/provider/__tests__/strict-schema.test.d.ts.map +1 -0
- package/dist/provider/__tests__/strict-schema.test.js +109 -0
- package/dist/provider/__tests__/strict-schema.test.js.map +1 -0
- package/dist/provider/model-version.d.ts +60 -0
- package/dist/provider/model-version.d.ts.map +1 -0
- package/dist/provider/model-version.js +64 -0
- package/dist/provider/model-version.js.map +1 -0
- package/dist/provider/strict-schema.d.ts +49 -0
- package/dist/provider/strict-schema.d.ts.map +1 -0
- package/dist/provider/strict-schema.js +112 -0
- package/dist/provider/strict-schema.js.map +1 -0
- package/dist/public-runtime.d.ts +6 -1
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +21 -1
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-types.d.ts +2 -0
- package/dist/public-types.d.ts.map +1 -1
- package/dist/registry/tool/__tests__/strict-registration.test.d.ts +2 -0
- package/dist/registry/tool/__tests__/strict-registration.test.d.ts.map +1 -0
- package/dist/registry/tool/__tests__/strict-registration.test.js +82 -0
- package/dist/registry/tool/__tests__/strict-registration.test.js.map +1 -0
- package/dist/registry/tool/execute.d.ts.map +1 -1
- package/dist/registry/tool/execute.js +16 -0
- package/dist/registry/tool/execute.js.map +1 -1
- package/dist/runtime/query/result.d.ts.map +1 -1
- package/dist/runtime/query/result.js +5 -0
- package/dist/runtime/query/result.js.map +1 -1
- package/dist/tools/builtins/__tests__/edit-insert-reachable.test.js +7 -1
- package/dist/tools/builtins/__tests__/edit-insert-reachable.test.js.map +1 -1
- package/dist/tools/builtins/__tests__/edit.test.js +1 -1
- package/dist/tools/builtins/__tests__/edit.test.js.map +1 -1
- package/dist/tools/builtins/edit.d.ts.map +1 -1
- package/dist/tools/builtins/edit.js +20 -2
- package/dist/tools/builtins/edit.js.map +1 -1
- package/dist/types/plugin/index.d.ts +4 -4
- package/dist/types/run/events.d.ts +17 -2
- package/dist/types/run/events.d.ts.map +1 -1
- package/dist/types/run/events.js.map +1 -1
- package/dist/types/verification/index.d.ts +6 -6
- package/package.json +1 -1
- package/src/agents/__tests__/run-agent-forwarding.test.ts +85 -0
- package/src/agents/__tests__/run-completed-stop-reason.test.ts +59 -0
- package/src/agents/index.ts +8 -0
- package/src/agents/runAgent.ts +30 -4
- package/src/constants/tools/__tests__/dangerous-patterns.test.ts +62 -0
- package/src/constants/tools/index.ts +28 -1
- package/src/directory/__tests__/derive.test.ts +135 -0
- package/src/directory/__tests__/load-diagnostics.test.ts +126 -0
- package/src/directory/__tests__/load-directory.test.ts +243 -0
- package/src/directory/__tests__/subagents.test.ts +155 -0
- package/src/directory/__tests__/supervisor-budget.test.ts +117 -0
- package/src/directory/derive-supervisor.ts +149 -0
- package/src/directory/derive.ts +70 -0
- package/src/directory/index.ts +27 -0
- package/src/directory/load.ts +556 -0
- package/src/directory/scan.ts +163 -0
- package/src/directory/types.ts +254 -0
- package/src/plugin/__tests__/path-containment.test.ts +107 -0
- package/src/plugin/lifecycle.ts +3 -3
- package/src/plugin/loader.ts +12 -2
- package/src/provider/__tests__/model-version.test.ts +93 -0
- package/src/provider/__tests__/strict-schema.test.ts +133 -0
- package/src/provider/model-version.ts +98 -0
- package/src/provider/strict-schema.ts +125 -0
- package/src/public-runtime.ts +31 -0
- package/src/public-types.ts +8 -0
- package/src/registry/tool/__tests__/strict-registration.test.ts +115 -0
- package/src/registry/tool/execute.ts +16 -0
- package/src/runtime/query/result.ts +5 -0
- package/src/tools/builtins/__tests__/edit-insert-reachable.test.ts +8 -2
- package/src/tools/builtins/__tests__/edit.test.ts +1 -1
- package/src/tools/builtins/edit.ts +20 -2
- package/src/types/run/events.ts +15 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/plugin/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/plugin/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EACN,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,GACf,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAuB,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,SAAiB;IACtD,MAAM,IAAI,GAAa,EAAE,CAAA;IAEzB,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;QACxC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;gBAAE,SAAQ;YAC5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,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,kBAAkB,CAAC,CAAA;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAA;IAEhD,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACzC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;KAChE,CAAC,CAAA;IAEF,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE;QACzC,YAAY,EAAE,OAAO,CAAC,MAAM;QAC5B,SAAS,EAAE,IAAI,CAAC,MAAM;QACtB,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAA;IAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-version.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/model-version.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { modelVersionAtLeast, parseVersionedModelId } from '../model-version.js';
|
|
3
|
+
/**
|
|
4
|
+
* The defect this module exists to end: the minor-version group was `\d+`, so
|
|
5
|
+
* it swallowed the 8-digit release date. An id naming no minor therefore
|
|
6
|
+
* parsed as `major.<the date>` and compared as enormously NEWER than one that
|
|
7
|
+
* does, inverting every capability gate keyed on `minor >= n` — a model was
|
|
8
|
+
* told it supported features it does not.
|
|
9
|
+
*
|
|
10
|
+
* Three drivers had each written the same matcher, and all three had it. The
|
|
11
|
+
* vocabulary below is deliberately invented: the shape is what lives here, and
|
|
12
|
+
* a test that needed real product names would be testing the wrong layer.
|
|
13
|
+
*/
|
|
14
|
+
const GRAMMAR = {
|
|
15
|
+
product: 'widget',
|
|
16
|
+
families: ['small', 'large'],
|
|
17
|
+
routingPrefix: 'vendor/',
|
|
18
|
+
};
|
|
19
|
+
describe('a date suffix is not a minor version', () => {
|
|
20
|
+
it.each([
|
|
21
|
+
['widget-small-4-20250514', 'small', 4, 0],
|
|
22
|
+
['widget-large-4-20250514', 'large', 4, 0],
|
|
23
|
+
['widget-small-3-20240307', 'small', 3, 0],
|
|
24
|
+
])('%s parses as %s %d.%d', (id, family, major, minor) => {
|
|
25
|
+
expect(parseVersionedModelId(id, GRAMMAR)).toEqual({ family, major, minor });
|
|
26
|
+
});
|
|
27
|
+
it('still reads a real minor that is followed by a date', () => {
|
|
28
|
+
expect(parseVersionedModelId('widget-large-4-1-20250805', GRAMMAR)).toEqual({
|
|
29
|
+
family: 'large',
|
|
30
|
+
major: 4,
|
|
31
|
+
minor: 1,
|
|
32
|
+
});
|
|
33
|
+
expect(parseVersionedModelId('widget-small-4-5-20250929', GRAMMAR)?.minor).toBe(5);
|
|
34
|
+
});
|
|
35
|
+
it('treats a missing minor as .0 rather than as absent', () => {
|
|
36
|
+
expect(parseVersionedModelId('widget-large-5', GRAMMAR)).toEqual({
|
|
37
|
+
family: 'large',
|
|
38
|
+
major: 5,
|
|
39
|
+
minor: 0,
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
it('tolerates the routing prefix, the other separators, and case', () => {
|
|
43
|
+
expect(parseVersionedModelId('vendor/widget-large-4-5', GRAMMAR)?.minor).toBe(5);
|
|
44
|
+
expect(parseVersionedModelId('widget-large-4.5', GRAMMAR)?.minor).toBe(5);
|
|
45
|
+
expect(parseVersionedModelId('WIDGET-LARGE-4-5', GRAMMAR)?.major).toBe(4);
|
|
46
|
+
});
|
|
47
|
+
it('returns undefined for what the grammar does not describe', () => {
|
|
48
|
+
for (const id of ['other-large-4', 'widget', 'widget-large', 'widget-medium-4', '']) {
|
|
49
|
+
expect(parseVersionedModelId(id, GRAMMAR)).toBeUndefined();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
it('escapes regex metacharacters in the grammar', () => {
|
|
53
|
+
// A product or prefix containing `.` or `+` must match literally, not
|
|
54
|
+
// as a wildcard. `.map(escape)` — the global, deprecated one — would
|
|
55
|
+
// percent-encode instead, and pass every other test in this file
|
|
56
|
+
// because no ordinary name contains a character it changes.
|
|
57
|
+
const odd = { product: 'a.b', families: ['c+d'] };
|
|
58
|
+
expect(parseVersionedModelId('a.b-c+d-4', odd)?.major).toBe(4);
|
|
59
|
+
expect(parseVersionedModelId('axb-cxd-4', odd)).toBeUndefined();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe('modelVersionAtLeast', () => {
|
|
63
|
+
it('does not let a dated id clear a gate it is below', () => {
|
|
64
|
+
// The whole point. With the old `\d+` minor this was `true`, because
|
|
65
|
+
// 4.20250514 >= 4.5.
|
|
66
|
+
expect(modelVersionAtLeast('widget-small-4-20250514', GRAMMAR, 4, 5)).toBe(false);
|
|
67
|
+
expect(modelVersionAtLeast('widget-large-4-20250514', GRAMMAR, 4, 7)).toBe(false);
|
|
68
|
+
});
|
|
69
|
+
it('admits versions that genuinely clear it', () => {
|
|
70
|
+
expect(modelVersionAtLeast('widget-small-4-5-20250929', GRAMMAR, 4, 5)).toBe(true);
|
|
71
|
+
expect(modelVersionAtLeast('widget-large-5', GRAMMAR, 4, 7)).toBe(true);
|
|
72
|
+
expect(modelVersionAtLeast('widget-large-4-1', GRAMMAR, 4, 5)).toBe(false);
|
|
73
|
+
});
|
|
74
|
+
it('refuses a name it cannot parse rather than opening the gate', () => {
|
|
75
|
+
// Fail-safe: a capability gate must not open for an id it does not
|
|
76
|
+
// understand.
|
|
77
|
+
expect(modelVersionAtLeast('something-else', GRAMMAR, 4, 5)).toBe(false);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=model-version.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-version.test.js","sourceRoot":"","sources":["../../../src/provider/__tests__/model-version.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAGhF;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,GAAmB;IAC/B,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,SAAS;CACxB,CAAA;AAED,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IACrD,EAAE,CAAC,IAAI,CAAC;QACP,CAAC,yBAAyB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC1C,CAAC,yBAAyB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC1C,CAAC,yBAAyB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;KAC1C,CAAC,CAAC,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QACxD,MAAM,CAAC,qBAAqB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;IAC7E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,qBAAqB,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;YAC3E,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,CAAC;YACR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AAM,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzE,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-schema.test.d.ts","sourceRoot":"","sources":["../../../src/provider/__tests__/strict-schema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { getBuiltinTools } from '../../tools/builtins/index.js';
|
|
3
|
+
import { assertStrictSchema, findStrictSchemaViolations } from '../strict-schema.js';
|
|
4
|
+
/**
|
|
5
|
+
* Strict tool input validates against a SUBSET of JSON Schema, and a keyword
|
|
6
|
+
* outside that subset is not degraded — the vendor rejects the entire request,
|
|
7
|
+
* so one unexpressible field in one tool takes down every tool in the call and
|
|
8
|
+
* the turn dies before producing a token.
|
|
9
|
+
*
|
|
10
|
+
* That shipped. The edit tool declared its integer-or-`"end"` field with
|
|
11
|
+
* `oneOf`, which is outside the subset while the equivalent `anyOf` is inside
|
|
12
|
+
* it, and the driver marked the tool strict without asking whether the schema
|
|
13
|
+
* it was vouching for could be said in that dialect.
|
|
14
|
+
*
|
|
15
|
+
* Measured against the live API:
|
|
16
|
+
*
|
|
17
|
+
* | body | result |
|
|
18
|
+
* |------------------------|----------|
|
|
19
|
+
* | strict: true + oneOf | 400 |
|
|
20
|
+
* | strict: false + oneOf | accepted |
|
|
21
|
+
* | strict: true + anyOf | accepted |
|
|
22
|
+
*
|
|
23
|
+
* The middle row is why nothing caught it. Neither half is wrong alone — the
|
|
24
|
+
* schema is valid JSON Schema, and turning strict on is correct policy — so no
|
|
25
|
+
* test of either one fails. Only the pairing does, and the pairing had no
|
|
26
|
+
* owner. The sweep below is that owner.
|
|
27
|
+
*/
|
|
28
|
+
describe('every tool that asks for strict validation can be expressed strictly', () => {
|
|
29
|
+
// The regression test that matters. Checking only the tool that broke
|
|
30
|
+
// would leave the next one to be found in production, which is how this
|
|
31
|
+
// one was found.
|
|
32
|
+
it.each(getBuiltinTools()
|
|
33
|
+
.filter((t) => t.enforceModelInput)
|
|
34
|
+
.map((t) => [t.name, t]))('%s', (name, tool) => {
|
|
35
|
+
const violations = findStrictSchemaViolations(tool.modelInputSchema);
|
|
36
|
+
expect(violations, violations.map((v) => `${name}.${v.path}: ${v.remedy}`).join('\n')).toEqual([]);
|
|
37
|
+
});
|
|
38
|
+
it('found at least one tool to check', () => {
|
|
39
|
+
// Guards the sweep itself: a filter that matches nothing passes
|
|
40
|
+
// vacuously, and a rename of `enforceModelInput` would silently turn
|
|
41
|
+
// this whole file into a no-op.
|
|
42
|
+
expect(getBuiltinTools().filter((t) => t.enforceModelInput).length).toBeGreaterThan(0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
describe('the violation report names the exact path', () => {
|
|
46
|
+
it('points at the keyword inside a nested property', () => {
|
|
47
|
+
const schema = {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
insertLine: { oneOf: [{ type: 'integer' }, { const: 'end' }] },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
expect(findStrictSchemaViolations(schema)).toEqual([
|
|
54
|
+
{
|
|
55
|
+
path: 'properties.insertLine.oneOf',
|
|
56
|
+
keyword: 'oneOf',
|
|
57
|
+
remedy: 'use `anyOf` — for disjoint branches the two are equivalent',
|
|
58
|
+
},
|
|
59
|
+
]);
|
|
60
|
+
});
|
|
61
|
+
it('accepts the anyOf spelling of the same union', () => {
|
|
62
|
+
const schema = {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
insertLine: { anyOf: [{ type: 'integer' }, { const: 'end' }] },
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
expect(findStrictSchemaViolations(schema)).toEqual([]);
|
|
69
|
+
});
|
|
70
|
+
it('reports numeric and string bounds, which are also outside the subset', () => {
|
|
71
|
+
const schema = {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: {
|
|
74
|
+
n: { type: 'integer', minimum: 0 },
|
|
75
|
+
s: { type: 'string', maxLength: 10 },
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
expect(findStrictSchemaViolations(schema)
|
|
79
|
+
.map((v) => v.keyword)
|
|
80
|
+
.sort()).toEqual(['maxLength', 'minimum']);
|
|
81
|
+
});
|
|
82
|
+
it('admits additionalProperties only as false', () => {
|
|
83
|
+
expect(findStrictSchemaViolations({ additionalProperties: false })).toEqual([]);
|
|
84
|
+
expect(findStrictSchemaViolations({ additionalProperties: { type: 'string' } })).toHaveLength(1);
|
|
85
|
+
});
|
|
86
|
+
it('walks into arrays of subschemas', () => {
|
|
87
|
+
const schema = { anyOf: [{ type: 'string' }, { not: { type: 'null' } }] };
|
|
88
|
+
expect(findStrictSchemaViolations(schema)[0]?.path).toBe('anyOf[1].not');
|
|
89
|
+
});
|
|
90
|
+
it('leaves ordinary annotations alone', () => {
|
|
91
|
+
const schema = {
|
|
92
|
+
type: 'object',
|
|
93
|
+
description: 'a tool',
|
|
94
|
+
properties: { a: { type: 'string', description: 'x', enum: ['y'] } },
|
|
95
|
+
required: ['a'],
|
|
96
|
+
additionalProperties: false,
|
|
97
|
+
};
|
|
98
|
+
expect(findStrictSchemaViolations(schema)).toEqual([]);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
describe('assertStrictSchema refuses rather than letting the request go', () => {
|
|
102
|
+
it('throws naming the tool, the path and the fix', () => {
|
|
103
|
+
expect(() => assertStrictSchema('edit', { properties: { insertLine: { oneOf: [] } } })).toThrow(/edit\.properties\.insertLine\.oneOf/);
|
|
104
|
+
});
|
|
105
|
+
it('says nothing about a schema that is expressible', () => {
|
|
106
|
+
expect(() => assertStrictSchema('edit', { type: 'object' })).not.toThrow();
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
//# sourceMappingURL=strict-schema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-schema.test.js","sourceRoot":"","sources":["../../../src/provider/__tests__/strict-schema.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAEpF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,QAAQ,CAAC,sEAAsE,EAAE,GAAG,EAAE;IACrF,sEAAsE;IACtE,wEAAwE;IACxE,iBAAiB;IACjB,EAAE,CAAC,IAAI,CACN,eAAe,EAAE;SACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC;SAClC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAU,CAAC,CAClC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,UAAU,GAAG,0BAA0B,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QACpE,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAC7F,EAAE,CACF,CAAA;IACF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC3C,gEAAgE;QAChE,qEAAqE;QACrE,gCAAgC;QAChC,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAA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QAED,MAAM,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,+DAA+D,EAAE,GAAG,EAAE;IAC9E,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACvD,MAAM,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAC9F,qCAAqC,CACrC,CAAA;IACF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC1D,MAAM,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IAC3E,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a versioned model id, given the vocabulary that names one.
|
|
3
|
+
*
|
|
4
|
+
* Several vendors spell an id the same way — a product segment, a family, a
|
|
5
|
+
* major version, sometimes a minor, and sometimes an 8-digit release date:
|
|
6
|
+
*
|
|
7
|
+
* ```
|
|
8
|
+
* <product>-<family>-<major>[-<minor>][-<YYYYMMDD>]
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* The SHAPE is general and lives here; the vocabulary is not, and is supplied
|
|
12
|
+
* by the driver that knows it. That split is deliberate: a driver package
|
|
13
|
+
* exists to speak one service's dialect, and the kernel has no business
|
|
14
|
+
* knowing whose ids these are.
|
|
15
|
+
*
|
|
16
|
+
* It exists at all because three drivers had each written the same matcher and
|
|
17
|
+
* all three had the same defect: the minor-version group was `\d+`, which
|
|
18
|
+
* happily swallowed the date. An id naming no minor therefore parsed as
|
|
19
|
+
* `major.<the date>` and compared as enormously NEWER than one that does, so
|
|
20
|
+
* every capability gate keyed on `minor >= n` inverted for exactly those ids —
|
|
21
|
+
* a model was told it supported features it does not.
|
|
22
|
+
*
|
|
23
|
+
* A real minor version is one to three digits; a date is exactly eight.
|
|
24
|
+
* Bounding the group is what stops it reaching across the separator, and the
|
|
25
|
+
* expression then backtracks into leaving the minor absent so the date suffix
|
|
26
|
+
* can match where it belongs.
|
|
27
|
+
*/
|
|
28
|
+
export interface ModelVersion {
|
|
29
|
+
readonly family: string;
|
|
30
|
+
readonly major: number;
|
|
31
|
+
/** `0` when the id names no minor — a bare major is `<major>.0`. */
|
|
32
|
+
readonly minor: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* What a driver must say to have its ids parsed.
|
|
36
|
+
*
|
|
37
|
+
* Every field is a wire value the driver already carries. Passing them in
|
|
38
|
+
* rather than hard-coding them is what keeps this module free of any one
|
|
39
|
+
* service's names.
|
|
40
|
+
*/
|
|
41
|
+
export interface ModelIdGrammar {
|
|
42
|
+
/** The product segment an id begins with. */
|
|
43
|
+
readonly product: string;
|
|
44
|
+
/** The family segment that follows it. */
|
|
45
|
+
readonly families: readonly string[];
|
|
46
|
+
/** An optional routing segment a gateway may prepend, including its slash. */
|
|
47
|
+
readonly routingPrefix?: string;
|
|
48
|
+
}
|
|
49
|
+
/** `undefined` for anything the grammar does not describe — never a guess. */
|
|
50
|
+
export declare function parseVersionedModelId(id: string, grammar: ModelIdGrammar): ModelVersion | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Whether an id names a version at or above `major.minor`.
|
|
53
|
+
*
|
|
54
|
+
* The comparison every caller was writing by hand. An id this cannot parse
|
|
55
|
+
* returns `false`: a capability gate must not open for a name it does not
|
|
56
|
+
* understand, which is the fail-safe reading and the one those callers' own
|
|
57
|
+
* comments already claimed.
|
|
58
|
+
*/
|
|
59
|
+
export declare function modelVersionAtLeast(id: string, grammar: ModelIdGrammar, major: number, minor: number): boolean;
|
|
60
|
+
//# sourceMappingURL=model-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-version.d.ts","sourceRoot":"","sources":["../../src/provider/model-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAC/B;AAiBD,8EAA8E;AAC9E,wBAAgB,qBAAqB,CACpC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,cAAc,GACrB,YAAY,GAAG,SAAS,CAQ1B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAClC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACX,OAAO,CAIT"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a versioned model id, given the vocabulary that names one.
|
|
3
|
+
*
|
|
4
|
+
* Several vendors spell an id the same way — a product segment, a family, a
|
|
5
|
+
* major version, sometimes a minor, and sometimes an 8-digit release date:
|
|
6
|
+
*
|
|
7
|
+
* ```
|
|
8
|
+
* <product>-<family>-<major>[-<minor>][-<YYYYMMDD>]
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* The SHAPE is general and lives here; the vocabulary is not, and is supplied
|
|
12
|
+
* by the driver that knows it. That split is deliberate: a driver package
|
|
13
|
+
* exists to speak one service's dialect, and the kernel has no business
|
|
14
|
+
* knowing whose ids these are.
|
|
15
|
+
*
|
|
16
|
+
* It exists at all because three drivers had each written the same matcher and
|
|
17
|
+
* all three had the same defect: the minor-version group was `\d+`, which
|
|
18
|
+
* happily swallowed the date. An id naming no minor therefore parsed as
|
|
19
|
+
* `major.<the date>` and compared as enormously NEWER than one that does, so
|
|
20
|
+
* every capability gate keyed on `minor >= n` inverted for exactly those ids —
|
|
21
|
+
* a model was told it supported features it does not.
|
|
22
|
+
*
|
|
23
|
+
* A real minor version is one to three digits; a date is exactly eight.
|
|
24
|
+
* Bounding the group is what stops it reaching across the separator, and the
|
|
25
|
+
* expression then backtracks into leaving the minor absent so the date suffix
|
|
26
|
+
* can match where it belongs.
|
|
27
|
+
*/
|
|
28
|
+
const quoteMeta = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
29
|
+
function expressionFor(grammar) {
|
|
30
|
+
const routing = grammar.routingPrefix ? `(?:${quoteMeta(grammar.routingPrefix)})?` : '';
|
|
31
|
+
// `.map(quoteMeta)` and not `.map(escape)`: the latter resolves to the
|
|
32
|
+
// global, deprecated `escape()`, which percent-encodes instead of escaping
|
|
33
|
+
// regex metacharacters — and would pass every test here, because no family
|
|
34
|
+
// name contains a character either function changes.
|
|
35
|
+
const families = grammar.families.map((f) => quoteMeta(f)).join('|');
|
|
36
|
+
// `\d{1,3}` on the minor, not `\d+`. That single bound is the whole fix.
|
|
37
|
+
return new RegExp(`^${routing}${quoteMeta(grammar.product)}-(${families})-(\\d+)(?:[-_.](\\d{1,3}))?(?:-\\d{8})?$`);
|
|
38
|
+
}
|
|
39
|
+
/** `undefined` for anything the grammar does not describe — never a guess. */
|
|
40
|
+
export function parseVersionedModelId(id, grammar) {
|
|
41
|
+
const match = id.toLowerCase().match(expressionFor(grammar));
|
|
42
|
+
if (!match)
|
|
43
|
+
return undefined;
|
|
44
|
+
return {
|
|
45
|
+
family: match[1],
|
|
46
|
+
major: Number(match[2]),
|
|
47
|
+
minor: match[3] === undefined ? 0 : Number(match[3]),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether an id names a version at or above `major.minor`.
|
|
52
|
+
*
|
|
53
|
+
* The comparison every caller was writing by hand. An id this cannot parse
|
|
54
|
+
* returns `false`: a capability gate must not open for a name it does not
|
|
55
|
+
* understand, which is the fail-safe reading and the one those callers' own
|
|
56
|
+
* comments already claimed.
|
|
57
|
+
*/
|
|
58
|
+
export function modelVersionAtLeast(id, grammar, major, minor) {
|
|
59
|
+
const version = parseVersionedModelId(id, grammar);
|
|
60
|
+
if (!version)
|
|
61
|
+
return false;
|
|
62
|
+
return version.major > major || (version.major === major && version.minor >= minor);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=model-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-version.js","sourceRoot":"","sources":["../../src/provider/model-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAyBH,MAAM,SAAS,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;AAEzF,SAAS,aAAa,CAAC,OAAuB;IAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IACvF,uEAAuE;IACvE,2EAA2E;IAC3E,2EAA2E;IAC3E,qDAAqD;IACrD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACpE,yEAAyE;IACzE,OAAO,IAAI,MAAM,CAChB,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,QAAQ,2CAA2C,CAChG,CAAA;AACF,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,qBAAqB,CACpC,EAAU,EACV,OAAuB;IAEvB,MAAM,KAAK,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5D,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAA;IAC5B,OAAO;QACN,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW;QAC1B,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpD,CAAA;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAClC,EAAU,EACV,OAAuB,EACvB,KAAa,EACb,KAAa;IAEb,MAAM,OAAO,GAAG,qBAAqB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAClD,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,OAAO,OAAO,CAAC,KAAK,GAAG,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,KAAK,IAAI,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAA;AACpF,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which JSON Schema a driver may mark as strictly validated.
|
|
3
|
+
*
|
|
4
|
+
* Strict tool input is not "JSON Schema, enforced" — it is a SUBSET of JSON
|
|
5
|
+
* Schema, and a keyword outside that subset does not degrade. The vendor
|
|
6
|
+
* rejects the entire request, so one unexpressible field in one tool takes down
|
|
7
|
+
* every tool in the call and the turn dies before a single token is produced.
|
|
8
|
+
*
|
|
9
|
+
* This exists because that happened. A tool declared its integer-or-`"end"`
|
|
10
|
+
* field as `oneOf`, which is outside the subset while its synonym `anyOf` is
|
|
11
|
+
* inside it, and the driver marked the tool strict without ever asking whether
|
|
12
|
+
* the schema it was vouching for could be said in that dialect. Measured
|
|
13
|
+
* against the live API: strict + `oneOf` is a 400, strict + `anyOf` is
|
|
14
|
+
* accepted, and non-strict + `oneOf` is accepted.
|
|
15
|
+
*
|
|
16
|
+
* That last row is why nothing caught it. Neither half is wrong on its own —
|
|
17
|
+
* the schema is valid JSON Schema and the strict decision is correct policy —
|
|
18
|
+
* so no test of either one fails. Only the pairing does, and the pairing had no
|
|
19
|
+
* owner until this function.
|
|
20
|
+
*
|
|
21
|
+
* The check is cheap and runs where the pairing is made, which is the only
|
|
22
|
+
* place both facts are in hand.
|
|
23
|
+
*/
|
|
24
|
+
export interface StrictSchemaViolation {
|
|
25
|
+
/** Dotted path to the offending keyword, e.g. `properties.insertLine.oneOf`. */
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly keyword: string;
|
|
28
|
+
/** What to write instead. */
|
|
29
|
+
readonly remedy: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Every place a schema leaves the strict subset, with its exact path.
|
|
33
|
+
*
|
|
34
|
+
* The path is the point. The vendor's own error names the tool and the
|
|
35
|
+
* keyword but not where inside the schema it sits, which on a schema of any
|
|
36
|
+
* size is the difference between a glance and an afternoon.
|
|
37
|
+
*/
|
|
38
|
+
export declare function findStrictSchemaViolations(schema: unknown, path?: string): StrictSchemaViolation[];
|
|
39
|
+
/**
|
|
40
|
+
* Refuse a schema the driver is about to vouch for and cannot.
|
|
41
|
+
*
|
|
42
|
+
* Refusing here rather than dropping `strict` quietly: a caller who set
|
|
43
|
+
* `enforceModelInput` asked for the guarantee, and silently not providing it
|
|
44
|
+
* is the failure this repo names `refuse, do not degrade`. The alternative
|
|
45
|
+
* costs a turn and teaches nothing — the vendor's 400 arrives with the tool
|
|
46
|
+
* name and the keyword, but not the path, and not the fix.
|
|
47
|
+
*/
|
|
48
|
+
export declare function assertStrictSchema(toolName: string, schema: unknown): void;
|
|
49
|
+
//# sourceMappingURL=strict-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-schema.d.ts","sourceRoot":"","sources":["../../src/provider/strict-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAyCH,MAAM,WAAW,qBAAqB;IACrC,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,SAAK,GAAG,qBAAqB,EAAE,CA2B9F;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAQ1E"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which JSON Schema a driver may mark as strictly validated.
|
|
3
|
+
*
|
|
4
|
+
* Strict tool input is not "JSON Schema, enforced" — it is a SUBSET of JSON
|
|
5
|
+
* Schema, and a keyword outside that subset does not degrade. The vendor
|
|
6
|
+
* rejects the entire request, so one unexpressible field in one tool takes down
|
|
7
|
+
* every tool in the call and the turn dies before a single token is produced.
|
|
8
|
+
*
|
|
9
|
+
* This exists because that happened. A tool declared its integer-or-`"end"`
|
|
10
|
+
* field as `oneOf`, which is outside the subset while its synonym `anyOf` is
|
|
11
|
+
* inside it, and the driver marked the tool strict without ever asking whether
|
|
12
|
+
* the schema it was vouching for could be said in that dialect. Measured
|
|
13
|
+
* against the live API: strict + `oneOf` is a 400, strict + `anyOf` is
|
|
14
|
+
* accepted, and non-strict + `oneOf` is accepted.
|
|
15
|
+
*
|
|
16
|
+
* That last row is why nothing caught it. Neither half is wrong on its own —
|
|
17
|
+
* the schema is valid JSON Schema and the strict decision is correct policy —
|
|
18
|
+
* so no test of either one fails. Only the pairing does, and the pairing had no
|
|
19
|
+
* owner until this function.
|
|
20
|
+
*
|
|
21
|
+
* The check is cheap and runs where the pairing is made, which is the only
|
|
22
|
+
* place both facts are in hand.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Keywords the strict subset does not accept.
|
|
26
|
+
*
|
|
27
|
+
* A deny-list rather than an allow-list, deliberately. An allow-list would have
|
|
28
|
+
* to enumerate every annotation a schema may carry — `description`, `title`,
|
|
29
|
+
* `examples`, vendor extensions — and would refuse a schema for saying
|
|
30
|
+
* something harmless. These are the constructs documented as outside the
|
|
31
|
+
* subset; each one names what to write instead.
|
|
32
|
+
*/
|
|
33
|
+
const NO_CONDITIONALS = 'strict mode has no conditional schemas; flatten the object';
|
|
34
|
+
const NO_NUMERIC_BOUNDS = 'numeric bounds are not in the subset; enforce at execution';
|
|
35
|
+
const NO_LENGTH_BOUNDS = 'length bounds are not in the subset; enforce at execution';
|
|
36
|
+
// A Map rather than an object literal, because one of the keys is `then`: an
|
|
37
|
+
// ordinary object carrying a `then` property is a thenable, and awaiting it
|
|
38
|
+
// anywhere would silently call the string. The lint rule that says so is
|
|
39
|
+
// right, and a Map has no such hazard.
|
|
40
|
+
const UNSUPPORTED = new Map([
|
|
41
|
+
['oneOf', 'use `anyOf` — for disjoint branches the two are equivalent'],
|
|
42
|
+
['not', 'express the constraint positively, or validate it at execution'],
|
|
43
|
+
['if', NO_CONDITIONALS],
|
|
44
|
+
['then', NO_CONDITIONALS],
|
|
45
|
+
['else', NO_CONDITIONALS],
|
|
46
|
+
['minimum', NO_NUMERIC_BOUNDS],
|
|
47
|
+
['maximum', NO_NUMERIC_BOUNDS],
|
|
48
|
+
['exclusiveMinimum', NO_NUMERIC_BOUNDS],
|
|
49
|
+
['exclusiveMaximum', NO_NUMERIC_BOUNDS],
|
|
50
|
+
['multipleOf', NO_NUMERIC_BOUNDS],
|
|
51
|
+
['minLength', NO_LENGTH_BOUNDS],
|
|
52
|
+
['maxLength', NO_LENGTH_BOUNDS],
|
|
53
|
+
['minItems', NO_LENGTH_BOUNDS],
|
|
54
|
+
['maxItems', NO_LENGTH_BOUNDS],
|
|
55
|
+
['uniqueItems', 'array constraints are not in the subset; enforce at execution'],
|
|
56
|
+
['patternProperties', 'name the properties explicitly'],
|
|
57
|
+
['propertyNames', 'name the properties explicitly'],
|
|
58
|
+
['dependentSchemas', 'flatten the object and validate at execution'],
|
|
59
|
+
['dependentRequired', 'flatten the object and validate at execution'],
|
|
60
|
+
]);
|
|
61
|
+
/**
|
|
62
|
+
* Every place a schema leaves the strict subset, with its exact path.
|
|
63
|
+
*
|
|
64
|
+
* The path is the point. The vendor's own error names the tool and the
|
|
65
|
+
* keyword but not where inside the schema it sits, which on a schema of any
|
|
66
|
+
* size is the difference between a glance and an afternoon.
|
|
67
|
+
*/
|
|
68
|
+
export function findStrictSchemaViolations(schema, path = '') {
|
|
69
|
+
if (Array.isArray(schema)) {
|
|
70
|
+
return schema.flatMap((item, index) => findStrictSchemaViolations(item, `${path}[${index}]`));
|
|
71
|
+
}
|
|
72
|
+
if (typeof schema !== 'object' || schema === null)
|
|
73
|
+
return [];
|
|
74
|
+
const found = [];
|
|
75
|
+
for (const [keyword, value] of Object.entries(schema)) {
|
|
76
|
+
const here = path ? `${path}.${keyword}` : keyword;
|
|
77
|
+
const remedy = UNSUPPORTED.get(keyword);
|
|
78
|
+
if (remedy !== undefined) {
|
|
79
|
+
found.push({ path: here, keyword, remedy });
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
// `additionalProperties` is admitted only as `false`; any schema there
|
|
83
|
+
// is an open object, which the subset does not allow.
|
|
84
|
+
if (keyword === 'additionalProperties' && value !== false) {
|
|
85
|
+
found.push({
|
|
86
|
+
path: here,
|
|
87
|
+
keyword,
|
|
88
|
+
remedy: 'strict objects must set `additionalProperties: false`',
|
|
89
|
+
});
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
found.push(...findStrictSchemaViolations(value, here));
|
|
93
|
+
}
|
|
94
|
+
return found;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Refuse a schema the driver is about to vouch for and cannot.
|
|
98
|
+
*
|
|
99
|
+
* Refusing here rather than dropping `strict` quietly: a caller who set
|
|
100
|
+
* `enforceModelInput` asked for the guarantee, and silently not providing it
|
|
101
|
+
* is the failure this repo names `refuse, do not degrade`. The alternative
|
|
102
|
+
* costs a turn and teaches nothing — the vendor's 400 arrives with the tool
|
|
103
|
+
* name and the keyword, but not the path, and not the fix.
|
|
104
|
+
*/
|
|
105
|
+
export function assertStrictSchema(toolName, schema) {
|
|
106
|
+
const violations = findStrictSchemaViolations(schema);
|
|
107
|
+
if (violations.length === 0)
|
|
108
|
+
return;
|
|
109
|
+
const detail = violations.map((v) => ` ${toolName}.${v.path} — ${v.remedy}`).join('\n');
|
|
110
|
+
throw new Error(`Tool "${toolName}" is marked for strict input validation, but its model-facing schema uses ${violations.length} construct(s) the strict subset does not accept. The request would be rejected whole, taking every other tool in it down as well.\n${detail}`);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=strict-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-schema.js","sourceRoot":"","sources":["../../src/provider/strict-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;GAQG;AACH,MAAM,eAAe,GAAG,4DAA4D,CAAA;AACpF,MAAM,iBAAiB,GAAG,4DAA4D,CAAA;AACtF,MAAM,gBAAgB,GAAG,2DAA2D,CAAA;AAEpF,6EAA6E;AAC7E,4EAA4E;AAC5E,yEAAyE;AACzE,uCAAuC;AACv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AAC,MAAM,sIAAsI,MAAM,EAAE,CAC7P,CAAA;AACF,CAAC"}
|
package/dist/public-runtime.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export { memoizeAsync } from './utils/memoize.js';
|
|
|
14
14
|
export { extractFinalResponse } from './utils/conversation.js';
|
|
15
15
|
export { resolveTaskModel } from './router/task-router.js';
|
|
16
16
|
export { assertThinkingUnsupported } from './provider/thinking-support.js';
|
|
17
|
+
export { modelVersionAtLeast, parseVersionedModelId } from './provider/model-version.js';
|
|
18
|
+
export { assertStrictSchema, findStrictSchemaViolations } from './provider/strict-schema.js';
|
|
19
|
+
export type { StrictSchemaViolation } from './provider/strict-schema.js';
|
|
20
|
+
export type { ModelIdGrammar, ModelVersion } from './provider/model-version.js';
|
|
17
21
|
export { drainQuery, query } from './runtime/query/index.js';
|
|
18
22
|
export { SteeringBinding, attachSteering, formatSteeringNote } from './runtime/query/steering.js';
|
|
19
23
|
export type { SteeringChannel } from './runtime/query/steering.js';
|
|
@@ -34,8 +38,9 @@ export { DecisionParser, FallbackResolver } from './runtime/decision/index.js';
|
|
|
34
38
|
export { buildLimitConfig, checkLimitsDetailed, createRunReporter, } from './run/index.js';
|
|
35
39
|
export { assembleSystemPrompt, mergePersonas, withSessionContext, } from './persona/index.js';
|
|
36
40
|
export { discoverSkills, loadSkill, resolveSkillChain, SkillRegistry, } from './skills/index.js';
|
|
41
|
+
export { ALL_SLOTS, deriveRunOptions, deriveSupervisorOptions, loadDirectory, } from './directory/index.js';
|
|
37
42
|
export { AdvisorRegistry, AdvisoryContext, AdvisoryExecutor, TriggerEvaluator, } from './advisory/index.js';
|
|
38
|
-
export { AbstractAgent, ConcurrentInvocationError, defineAgent, InvocationLock, PipelineAgent, ReactiveAgent, RouterAgent, runAgent, SupervisorAgent, } from './agents/index.js';
|
|
43
|
+
export { AbstractAgent, ConcurrentInvocationError, defineAgent, InvocationLock, PipelineAgent, ReactiveAgent, RouterAgent, runAgent, DEFAULT_MAX_ITERATIONS, DEFAULT_TIMEOUT_MS, DEFAULT_TOKEN_BUDGET, SupervisorAgent, } from './agents/index.js';
|
|
39
44
|
export { ActivityStore, DiskCheckpointStore, DiskMemoryStore, DiskTaskStore, InMemoryMemoryIndex, InMemoryMemoryStore, InMemoryStore, InMemoryTaskStore, RunDiskStore, } from './store/index.js';
|
|
40
45
|
export { AgentRegistry, ManagedRegistry, PluginRegistry, Registry, ToolCatalog, ToolNameCollisionError, ToolRegistry, createToolCatalogFromRegistry, loadingFromAvailability, toolDefinitionToCatalogEntry, } from './registry/index.js';
|
|
41
46
|
export { discoverAllPluginDirs, discoverPlugins, loadPluginManifest, PluginLifecycleManager, PluginResolver, } from './plugin/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-runtime.d.ts","sourceRoot":"","sources":["../src/public-runtime.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EACN,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACtB,MAAM,qBAAqB,CAAA;AAI5B,cAAc,sBAAsB,CAAA;AAIpC,OAAO,EACN,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,WAAW,EACX,kBAAkB,GAClB,MAAM,wBAAwB,CAAA;AAE/B,cAAc,oBAAoB,CAAA;AAIlC,cAAc,eAAe,CAAA;AAI7B,OAAO,EACN,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,GACT,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EACN,mBAAmB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