@xemahq/kernel-contracts 0.3.4 → 0.3.6

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 (47) hide show
  1. package/dist/agent-composition/index.d.ts +1 -0
  2. package/dist/agent-composition/index.d.ts.map +1 -1
  3. package/dist/agent-composition/index.js +1 -0
  4. package/dist/agent-composition/index.js.map +1 -1
  5. package/dist/agent-composition/lib/composition.d.ts +3 -7
  6. package/dist/agent-composition/lib/composition.d.ts.map +1 -1
  7. package/dist/agent-composition/lib/invocation-overlay.d.ts +17 -0
  8. package/dist/agent-composition/lib/invocation-overlay.d.ts.map +1 -0
  9. package/dist/agent-composition/lib/invocation-overlay.js +3 -0
  10. package/dist/agent-composition/lib/invocation-overlay.js.map +1 -0
  11. package/dist/agent-permission/index.d.ts +2 -0
  12. package/dist/agent-permission/index.d.ts.map +1 -0
  13. package/dist/agent-permission/index.js +18 -0
  14. package/dist/agent-permission/index.js.map +1 -0
  15. package/dist/agent-permission/lib/permission-map.d.ts +6 -0
  16. package/dist/agent-permission/lib/permission-map.d.ts.map +1 -0
  17. package/dist/agent-permission/lib/permission-map.js +27 -0
  18. package/dist/agent-permission/lib/permission-map.js.map +1 -0
  19. package/dist/agent-workspace/awp-spec.json +1 -1
  20. package/dist/agent-workspace/lib/agent-tool-defaults.d.ts +2 -5
  21. package/dist/agent-workspace/lib/agent-tool-defaults.d.ts.map +1 -1
  22. package/dist/agent-workspace/lib/agent-tool-defaults.js +5 -25
  23. package/dist/agent-workspace/lib/agent-tool-defaults.js.map +1 -1
  24. package/dist/reference-resolution/index.d.ts +2 -0
  25. package/dist/reference-resolution/index.d.ts.map +1 -0
  26. package/dist/reference-resolution/index.js +18 -0
  27. package/dist/reference-resolution/index.js.map +1 -0
  28. package/dist/reference-resolution/lib/reference-resolution.d.ts +40 -0
  29. package/dist/reference-resolution/lib/reference-resolution.d.ts.map +1 -0
  30. package/dist/reference-resolution/lib/reference-resolution.js +42 -0
  31. package/dist/reference-resolution/lib/reference-resolution.js.map +1 -0
  32. package/dist/workflow/lib/compiled-workspace-manifest.d.ts +2 -0
  33. package/dist/workflow/lib/compiled-workspace-manifest.d.ts.map +1 -1
  34. package/dist/workflow/lib/model-ref.d.ts +19 -7
  35. package/dist/workflow/lib/model-ref.d.ts.map +1 -1
  36. package/dist/workflow/lib/model-ref.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/agent-composition/index.ts +1 -0
  39. package/src/agent-composition/lib/composition.ts +11 -30
  40. package/src/agent-composition/lib/invocation-overlay.ts +75 -0
  41. package/src/agent-permission/index.ts +12 -0
  42. package/src/agent-permission/lib/permission-map.ts +71 -0
  43. package/src/agent-workspace/lib/agent-tool-defaults.ts +20 -56
  44. package/src/reference-resolution/index.ts +10 -0
  45. package/src/reference-resolution/lib/reference-resolution.ts +175 -0
  46. package/src/workflow/lib/compiled-workspace-manifest.ts +11 -0
  47. package/src/workflow/lib/model-ref.ts +82 -18
@@ -3,5 +3,6 @@ export * from './lib/composition';
3
3
  export * from './lib/composition-limits-schema';
4
4
  export * from './lib/composition-workspace';
5
5
  export * from './lib/intrinsic-floor';
6
+ export * from './lib/invocation-overlay';
6
7
  export * from './lib/model-resolution-matrix';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-composition/index.ts"],"names":[],"mappings":"AAWA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-composition/index.ts"],"names":[],"mappings":"AAWA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
@@ -19,5 +19,6 @@ __exportStar(require("./lib/composition"), exports);
19
19
  __exportStar(require("./lib/composition-limits-schema"), exports);
20
20
  __exportStar(require("./lib/composition-workspace"), exports);
21
21
  __exportStar(require("./lib/intrinsic-floor"), exports);
22
+ __exportStar(require("./lib/invocation-overlay"), exports);
22
23
  __exportStar(require("./lib/model-resolution-matrix"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-composition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,yDAAuC;AACvC,oDAAkC;AAClC,kEAAgD;AAChD,8DAA4C;AAC5C,wDAAsC;AACtC,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-composition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,yDAAuC;AACvC,oDAAkC;AAClC,kEAAgD;AAChD,8DAA4C;AAC5C,wDAAsC;AACtC,2DAAyC;AACzC,gEAA8C"}
@@ -1,5 +1,5 @@
1
1
  import type { ToolSelectionEntry } from '../../mcp-tool';
2
- import type { ModelRef } from '../../workflow';
2
+ import type { NodeOverlayFragment } from '../../workflow';
3
3
  import type { SkillRef } from '../../skill';
4
4
  import type { CapabilityLayer } from './capability-layer';
5
5
  import type { CompositionWorkspace } from './composition-workspace';
@@ -25,13 +25,11 @@ export interface CompositionLimits {
25
25
  readonly maxSpawns: number;
26
26
  readonly tokenBudget?: number | undefined;
27
27
  }
28
- export interface CompositionNode {
28
+ export interface CompositionNode extends NodeOverlayFragment {
29
29
  readonly agent: AgentRef;
30
30
  readonly alias?: string;
31
31
  readonly skills: readonly SkillRef[];
32
32
  readonly tools: readonly ToolSelectionEntry[];
33
- readonly modelOverride?: ModelRef;
34
- readonly instructions?: string;
35
33
  readonly children: readonly CompositionNode[];
36
34
  readonly limits?: CompositionLimits;
37
35
  }
@@ -46,13 +44,11 @@ export interface Composition {
46
44
  readonly capability?: CapabilityLayer;
47
45
  readonly workspace?: CompositionWorkspace;
48
46
  }
49
- export interface ResolvedCompositionNode {
47
+ export interface ResolvedCompositionNode extends NodeOverlayFragment {
50
48
  readonly agent: Required<AgentRef>;
51
49
  readonly alias?: string;
52
50
  readonly skills: readonly SkillRef[];
53
51
  readonly tools: readonly ToolSelectionEntry[];
54
- readonly modelOverride?: ModelRef;
55
- readonly instructions?: string;
56
52
  readonly children: readonly ResolvedCompositionNode[];
57
53
  readonly limits?: CompositionLimits;
58
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/composition.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAKpE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAQD,oBAAY,oBAAoB;IAC9B,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAwBD,MAAM,WAAW,iBAAiB;IAEhC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAA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,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB,QAAQ,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC;IAErC,QAAQ,CAAC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAM9C,QAAQ,CAAC,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAQtD,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CACrC;AAMD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAEjC,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IAEvC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IAOrC,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAC3C"}
@@ -0,0 +1,17 @@
1
+ import type { ToolSelectionEntry } from '../../mcp-tool';
2
+ import type { SkillRef } from '../../skill';
3
+ import type { NodeOverlayFragment } from '../../workflow';
4
+ export interface InvocationToolOverlay {
5
+ readonly add?: readonly ToolSelectionEntry[];
6
+ readonly remove?: readonly string[];
7
+ }
8
+ export interface InvocationSkillOverlay {
9
+ readonly add?: readonly SkillRef[];
10
+ }
11
+ export interface InvocationOverlay extends NodeOverlayFragment {
12
+ readonly tools?: InvocationToolOverlay;
13
+ readonly skills?: InvocationSkillOverlay;
14
+ }
15
+ export type AgentStepWithOverlay = InvocationOverlay;
16
+ export type SessionInvocationOverlay = InvocationOverlay;
17
+ //# sourceMappingURL=invocation-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invocation-overlay.d.ts","sourceRoot":"","sources":["../../../src/agent-composition/lib/invocation-overlay.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAQ1D,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAE7C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAQD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CACpC;AAOD,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAC1C;AAQD,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAOrD,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=invocation-overlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invocation-overlay.js","sourceRoot":"","sources":["../../../src/agent-composition/lib/invocation-overlay.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './lib/permission-map';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-permission/index.ts"],"names":[],"mappings":"AAWA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./lib/permission-map"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-permission/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,uDAAqC"}
@@ -0,0 +1,6 @@
1
+ export declare const KNOWN_PERMISSION_KEYS: readonly ["read", "edit", "glob", "grep", "list", "bash", "task", "external_directory", "lsp", "skill", "todowrite", "question", "webfetch", "websearch", "doom_loop"];
2
+ export type PermissionKey = (typeof KNOWN_PERMISSION_KEYS)[number];
3
+ export type PermissionAction = 'allow' | 'ask' | 'deny';
4
+ export type PermissionRule = PermissionAction | Readonly<Record<string, PermissionAction>>;
5
+ export type PermissionMap = Readonly<Record<string, PermissionRule>>;
6
+ //# sourceMappingURL=permission-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-map.d.ts","sourceRoot":"","sources":["../../../src/agent-permission/lib/permission-map.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,qBAAqB,wKAGxB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AASxD,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAQ3F,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KNOWN_PERMISSION_KEYS = void 0;
4
+ const KNOWN_RULE_PERMISSION_KEYS = [
5
+ 'read',
6
+ 'edit',
7
+ 'glob',
8
+ 'grep',
9
+ 'list',
10
+ 'bash',
11
+ 'task',
12
+ 'external_directory',
13
+ 'lsp',
14
+ 'skill',
15
+ ];
16
+ const KNOWN_ACTION_PERMISSION_KEYS = [
17
+ 'todowrite',
18
+ 'question',
19
+ 'webfetch',
20
+ 'websearch',
21
+ 'doom_loop',
22
+ ];
23
+ exports.KNOWN_PERMISSION_KEYS = [
24
+ ...KNOWN_RULE_PERMISSION_KEYS,
25
+ ...KNOWN_ACTION_PERMISSION_KEYS,
26
+ ];
27
+ //# sourceMappingURL=permission-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-map.js","sourceRoot":"","sources":["../../../src/agent-permission/lib/permission-map.ts"],"names":[],"mappings":";;;AAqBA,MAAM,0BAA0B,GAAG;IACjC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,oBAAoB;IACpB,KAAK;IACL,OAAO;CACC,CAAC;AAMX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;CACH,CAAC;AAEE,QAAA,qBAAqB,GAAG;IACnC,GAAG,0BAA0B;IAC7B,GAAG,4BAA4B;CACvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://xema.dev/schemas/awp-spec.v1.json",
3
- "emittedAt": "2026-06-12T00:05:53.686Z",
3
+ "emittedAt": "2026-06-12T12:44:29.614Z",
4
4
  "spec": {
5
5
  "id": "awp/v1",
6
6
  "version": "1.2.0",
@@ -1,8 +1,5 @@
1
- export declare const KNOWN_PERMISSION_KEYS: readonly ["read", "edit", "glob", "grep", "list", "bash", "task", "external_directory", "lsp", "skill", "todowrite", "question", "webfetch", "websearch", "doom_loop"];
2
- export type PermissionKey = (typeof KNOWN_PERMISSION_KEYS)[number];
3
- export type PermissionAction = 'allow' | 'ask' | 'deny';
4
- export type PermissionRule = PermissionAction | Readonly<Record<string, PermissionAction>>;
5
- export type PermissionMap = Readonly<Record<string, PermissionRule>>;
1
+ import type { PermissionAction, PermissionKey, PermissionMap, PermissionRule } from '../../agent-permission';
2
+ export { KNOWN_PERMISSION_KEYS, type PermissionAction, type PermissionKey, type PermissionMap, type PermissionRule, } from '../../agent-permission';
6
3
  export declare const SYSTEM_REQUIRED_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>>;
7
4
  export declare const SYSTEM_DEFAULT_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>>;
8
5
  export declare const SYSTEM_OPT_IN_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-tool-defaults.d.ts","sourceRoot":"","sources":["../../../src/agent-workspace/lib/agent-tool-defaults.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,qBAAqB,wKAGxB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AASxD,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAQ3F,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAOrE,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,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,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAMlG,CAAC;AAOF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAKjG,CAAC;AAUF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAOhG,CAAC;AAMF,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC;CACrC;AAQD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;CAC/D;AAmBD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,0BAA0B,GAAG,SAAS,GAC/C,wBAAwB,CAiB1B;AAiCD,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,0BAA0B,GAAG,SAAS,GAClD,IAAI,CAsBN;AAED,qBAAa,+BAAgC,SAAQ,KAAK;IAGtD,QAAQ,CAAC,yBAAyB,EAAE,aAAa,CAAC,aAAa,CAAC;gBADhE,OAAO,EAAE,MAAM,EACN,yBAAyB,EAAE,aAAa,CAAC,aAAa,CAAC;CAKnE"}
@@ -3,29 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentPermissionsValidationError = exports.SYSTEM_OPT_IN_PERMISSIONS = exports.SYSTEM_DEFAULT_PERMISSIONS = exports.SYSTEM_REQUIRED_PERMISSIONS = exports.KNOWN_PERMISSION_KEYS = void 0;
4
4
  exports.resolveAgentPermissions = resolveAgentPermissions;
5
5
  exports.assertNoRequiredPermissionsDenied = assertNoRequiredPermissionsDenied;
6
- const KNOWN_RULE_PERMISSION_KEYS = [
7
- 'read',
8
- 'edit',
9
- 'glob',
10
- 'grep',
11
- 'list',
12
- 'bash',
13
- 'task',
14
- 'external_directory',
15
- 'lsp',
16
- 'skill',
17
- ];
18
- const KNOWN_ACTION_PERMISSION_KEYS = [
19
- 'todowrite',
20
- 'question',
21
- 'webfetch',
22
- 'websearch',
23
- 'doom_loop',
24
- ];
25
- exports.KNOWN_PERMISSION_KEYS = [
26
- ...KNOWN_RULE_PERMISSION_KEYS,
27
- ...KNOWN_ACTION_PERMISSION_KEYS,
28
- ];
6
+ const agent_permission_1 = require("../../agent-permission");
7
+ var agent_permission_2 = require("../../agent-permission");
8
+ Object.defineProperty(exports, "KNOWN_PERMISSION_KEYS", { enumerable: true, get: function () { return agent_permission_2.KNOWN_PERMISSION_KEYS; } });
29
9
  exports.SYSTEM_REQUIRED_PERMISSIONS = {
30
10
  read: 'allow',
31
11
  list: 'allow',
@@ -49,7 +29,7 @@ exports.SYSTEM_OPT_IN_PERMISSIONS = {
49
29
  };
50
30
  function resolveAgentPermissions(manifest) {
51
31
  const out = {};
52
- for (const key of exports.KNOWN_PERMISSION_KEYS) {
32
+ for (const key of agent_permission_1.KNOWN_PERMISSION_KEYS) {
53
33
  out[key] = resolveClosedSetPermission(key, manifest?.permission?.[key]);
54
34
  }
55
35
  if (manifest?.permission) {
@@ -57,7 +37,7 @@ function resolveAgentPermissions(manifest) {
57
37
  if (key in exports.SYSTEM_REQUIRED_PERMISSIONS) {
58
38
  continue;
59
39
  }
60
- if (exports.KNOWN_PERMISSION_KEYS.includes(key)) {
40
+ if (agent_permission_1.KNOWN_PERMISSION_KEYS.includes(key)) {
61
41
  continue;
62
42
  }
63
43
  out[key] = value;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-tool-defaults.js","sourceRoot":"","sources":["../../../src/agent-workspace/lib/agent-tool-defaults.ts"],"names":[],"mappings":";;;AAqKA,0DAmBC;AAiCD,8EAwBC;AA5MD,MAAM,0BAA0B,GAAG;IACjC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,oBAAoB;IACpB,KAA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C;gBAC7D,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,+BAA+B,CACvC,wDAAwD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,8BAA8B,EACvG,MAAM,CACP,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAa,+BAAgC,SAAQ,KAAK;IAG7C;IAFX,YACE,OAAe,EACN,yBAAuD;QAEhE,KAAK,CAAC,OAAO,CAAC,CAAC;QAFN,8BAAyB,GAAzB,yBAAyB,CAA8B;QAGhE,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AARD,0EAQC"}
1
+ {"version":3,"file":"agent-tool-defaults.js","sourceRoot":"","sources":["../../../src/agent-workspace/lib/agent-tool-defaults.ts"],"names":[],"mappings":";;;AAiIA,0DAmBC;AAiCD,8EAwBC;AAzKD,6DAA+D;AAQ/D,2DAMgC;AAL9B,yHAAA,qBAAqB,OAAA;AAYV,QAAA,2BAA2B,GAA+D;IACrG,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,OAAO;CACnB,CAAC;AAOW,QAAA,0BAA0B,GAA+D;IACpG,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;CACf,CAAC;AAUW,QAAA,yBAAyB,GAA+D;IACnG,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,kBAAkB,EAAE,MAAM;IAC1B,GAAG,EAAE,MAAM;CACZ,CAAC;AAqCF,SAAgB,uBAAuB,CACrC,QAAgD;IAEhD,MAAM,GAAG,GAAmC,EAAE,CAAC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mCAA2B,CAAoB,EAAE,CAAC;QAC9E,MAAM,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACjB,SAAS;QACX,CAAC;QACD,IAAI,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACjC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC;gBAC7D,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,+BAA+B,CACvC,wDAAwD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,8BAA8B,EACvG,MAAM,CACP,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAa,+BAAgC,SAAQ,KAAK;IAG7C;IAFX,YACE,OAAe,EACN,yBAAuD;QAEhE,KAAK,CAAC,OAAO,CAAC,CAAC;QAFN,8BAAyB,GAAzB,yBAAyB,CAA8B;QAGhE,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AARD,0EAQC"}
@@ -0,0 +1,2 @@
1
+ export * from './lib/reference-resolution';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reference-resolution/index.ts"],"names":[],"mappings":"AASA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./lib/reference-resolution"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reference-resolution/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AASA,6DAA2C"}
@@ -0,0 +1,40 @@
1
+ export declare enum MissingReferencePolicy {
2
+ Required = "required",
3
+ Optional = "optional"
4
+ }
5
+ export declare enum ReferenceResolutionState {
6
+ Present = "present",
7
+ DeclaredButUnavailable = "declared-but-unavailable",
8
+ OptionalSkipped = "optional-skipped",
9
+ Denied = "denied"
10
+ }
11
+ export declare enum ReferenceKind {
12
+ Agent = "agent",
13
+ Skill = "skill",
14
+ Tool = "tool",
15
+ Capability = "capability",
16
+ Action = "action",
17
+ Workflow = "workflow"
18
+ }
19
+ export declare enum ReferenceVerification {
20
+ Verified = "verified",
21
+ RegistryOnly = "registry-only",
22
+ GatewayOnly = "gateway-only",
23
+ Unavailable = "unavailable"
24
+ }
25
+ export interface ReferenceOwner {
26
+ readonly biomeId?: string;
27
+ readonly biomeVersion?: string;
28
+ }
29
+ export interface ResolvedReferenceDecision {
30
+ readonly kind: ReferenceKind;
31
+ readonly ref: string;
32
+ readonly version?: string;
33
+ readonly policy: MissingReferencePolicy;
34
+ readonly state: ReferenceResolutionState;
35
+ readonly verification?: ReferenceVerification;
36
+ readonly owner?: ReferenceOwner;
37
+ readonly reason: string;
38
+ }
39
+ export declare function isFatalReferenceDecision(decision: ResolvedReferenceDecision): boolean;
40
+ //# sourceMappingURL=reference-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-resolution.d.ts","sourceRoot":"","sources":["../../../src/reference-resolution/lib/reference-resolution.ts"],"names":[],"mappings":"AAmCA,oBAAY,sBAAsB;IAKhC,QAAQ,aAAa;IAMrB,QAAQ,aAAa;CACtB;AAMD,oBAAY,wBAAwB;IAElC,OAAO,YAAY;IAOnB,sBAAsB,6BAA6B;IAMnD,eAAe,qBAAqB;IAMpC,MAAM,WAAW;CAClB;AAOD,oBAAY,aAAa;IAEvB,KAAK,UAAU;IAEf,KAAK,UAAU;IAEf,IAAI,SAAS;IAEb,UAAU,eAAe;IAEzB,MAAM,WAAW;IAEjB,QAAQ,aAAa;CACtB;AASD,oBAAY,qBAAqB;IAE/B,QAAQ,aAAa;IAErB,YAAY,kBAAkB;IAE9B,WAAW,iBAAiB;IAE5B,WAAW,gBAAgB;CAC5B;AAWD,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAQD,MAAM,WAAW,yBAAyB;IAExC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAE7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAExC,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;IAEzC,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAE9C,QAAQ,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC;IAEhC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAUD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,yBAAyB,GAClC,OAAO,CAQT"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReferenceVerification = exports.ReferenceKind = exports.ReferenceResolutionState = exports.MissingReferencePolicy = void 0;
4
+ exports.isFatalReferenceDecision = isFatalReferenceDecision;
5
+ var MissingReferencePolicy;
6
+ (function (MissingReferencePolicy) {
7
+ MissingReferencePolicy["Required"] = "required";
8
+ MissingReferencePolicy["Optional"] = "optional";
9
+ })(MissingReferencePolicy || (exports.MissingReferencePolicy = MissingReferencePolicy = {}));
10
+ var ReferenceResolutionState;
11
+ (function (ReferenceResolutionState) {
12
+ ReferenceResolutionState["Present"] = "present";
13
+ ReferenceResolutionState["DeclaredButUnavailable"] = "declared-but-unavailable";
14
+ ReferenceResolutionState["OptionalSkipped"] = "optional-skipped";
15
+ ReferenceResolutionState["Denied"] = "denied";
16
+ })(ReferenceResolutionState || (exports.ReferenceResolutionState = ReferenceResolutionState = {}));
17
+ var ReferenceKind;
18
+ (function (ReferenceKind) {
19
+ ReferenceKind["Agent"] = "agent";
20
+ ReferenceKind["Skill"] = "skill";
21
+ ReferenceKind["Tool"] = "tool";
22
+ ReferenceKind["Capability"] = "capability";
23
+ ReferenceKind["Action"] = "action";
24
+ ReferenceKind["Workflow"] = "workflow";
25
+ })(ReferenceKind || (exports.ReferenceKind = ReferenceKind = {}));
26
+ var ReferenceVerification;
27
+ (function (ReferenceVerification) {
28
+ ReferenceVerification["Verified"] = "verified";
29
+ ReferenceVerification["RegistryOnly"] = "registry-only";
30
+ ReferenceVerification["GatewayOnly"] = "gateway-only";
31
+ ReferenceVerification["Unavailable"] = "unavailable";
32
+ })(ReferenceVerification || (exports.ReferenceVerification = ReferenceVerification = {}));
33
+ function isFatalReferenceDecision(decision) {
34
+ if (decision.state === ReferenceResolutionState.Denied) {
35
+ return true;
36
+ }
37
+ if (decision.state === ReferenceResolutionState.DeclaredButUnavailable) {
38
+ return decision.policy !== MissingReferencePolicy.Optional;
39
+ }
40
+ return false;
41
+ }
42
+ //# sourceMappingURL=reference-resolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-resolution.js","sourceRoot":"","sources":["../../../src/reference-resolution/lib/reference-resolution.ts"],"names":[],"mappings":";;;AAoKA,4DAUC;AA3ID,IAAY,sBAYX;AAZD,WAAY,sBAAsB;IAKhC,+CAAqB,CAAA;IAMrB,+CAAqB,CAAA;AACvB,CAAC,EAZW,sBAAsB,sCAAtB,sBAAsB,QAYjC;AAMD,IAAY,wBAsBX;AAtBD,WAAY,wBAAwB;IAElC,+CAAmB,CAAA;IAOnB,+EAAmD,CAAA;IAMnD,gEAAoC,CAAA;IAMpC,6CAAiB,CAAA;AACnB,CAAC,EAtBW,wBAAwB,wCAAxB,wBAAwB,QAsBnC;AAOD,IAAY,aAaX;AAbD,WAAY,aAAa;IAEvB,gCAAe,CAAA;IAEf,gCAAe,CAAA;IAEf,8BAAa,CAAA;IAEb,0CAAyB,CAAA;IAEzB,kCAAiB,CAAA;IAEjB,sCAAqB,CAAA;AACvB,CAAC,EAbW,aAAa,6BAAb,aAAa,QAaxB;AASD,IAAY,qBASX;AATD,WAAY,qBAAqB;IAE/B,8CAAqB,CAAA;IAErB,uDAA8B,CAAA;IAE9B,qDAA4B,CAAA;IAE5B,oDAA2B,CAAA;AAC7B,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AAmDD,SAAgB,wBAAwB,CACtC,QAAmC;IAEnC,IAAI,QAAQ,CAAC,KAAK,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;QACvD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,QAAQ,CAAC,KAAK,KAAK,wBAAwB,CAAC,sBAAsB,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC,MAAM,KAAK,sBAAsB,CAAC,QAAQ,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { PermissionMap } from '../../agent-permission';
1
2
  import type { ToolSelectionEntry } from '../../mcp-tool';
2
3
  import type { AgentRunRole } from './agent-role';
3
4
  import type { CompiledWorkingFile } from './compiled-working-file';
@@ -32,6 +33,7 @@ export interface CompiledManifestAgent {
32
33
  readonly deliverableSpecRef?: string;
33
34
  readonly defaultModel?: ModelRef;
34
35
  readonly instructions?: string;
36
+ readonly permission?: PermissionMap;
35
37
  readonly subAgents: readonly SubAgentBinding[];
36
38
  }
37
39
  export interface CompiledManifestDisplay {
@@ -1 +1 @@
1
- {"version":3,"file":"compiled-workspace-manifest.d.ts","sourceRoot":"","sources":["../../../src/workflow/lib/compiled-workspace-manifest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,UAAU,EACX,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,wB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,CAAC,EAAE,MAAM,CAAC;IAMvB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAOD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;CACzC;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACzD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAClD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import type { PermissionMap } from '../../agent-permission';
2
3
  export declare enum ModelClass {
3
4
  CODING = "coding",
4
5
  REVIEW = "review",
@@ -18,24 +19,35 @@ export declare enum ModelRefKind {
18
19
  CONCRETE = "concrete",
19
20
  STRATEGY = "strategy"
20
21
  }
21
- export interface ConcreteModelRef {
22
+ export interface ModelOptions {
23
+ readonly temperature?: number;
24
+ readonly topP?: number;
25
+ readonly maxTokens?: number;
26
+ readonly stop?: readonly string[];
27
+ readonly presencePenalty?: number;
28
+ readonly frequencyPenalty?: number;
29
+ readonly reasoningEffort?: string;
30
+ readonly thinkingBudget?: number;
31
+ }
32
+ export interface ConcreteModelRef extends ModelOptions {
22
33
  readonly kind: ModelRefKind.CONCRETE;
23
34
  readonly modelId: string;
24
35
  readonly providerSlug?: string;
25
- readonly temperature?: number;
26
36
  }
27
- export interface StrategyModelRef {
37
+ export interface StrategyModelRef extends ModelOptions {
28
38
  readonly kind: ModelRefKind.STRATEGY;
29
39
  readonly modelClass: ModelClass;
30
- readonly temperature?: number;
31
40
  }
32
41
  export type ModelRef = ConcreteModelRef | StrategyModelRef;
33
42
  export declare function isConcreteModelRef(ref: ModelRef): ref is ConcreteModelRef;
34
43
  export declare function isStrategyModelRef(ref: ModelRef): ref is StrategyModelRef;
35
- export interface SubAgentBinding {
36
- readonly slug: string;
37
- readonly alias?: string;
44
+ export interface NodeOverlayFragment {
38
45
  readonly modelOverride?: ModelRef;
39
46
  readonly instructions?: string;
47
+ readonly permission?: PermissionMap;
48
+ }
49
+ export interface SubAgentBinding extends NodeOverlayFragment {
50
+ readonly slug: string;
51
+ readonly alias?: string;
40
52
  }
41
53
  //# sourceMappingURL=model-ref.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-ref.d.ts","sourceRoot":"","sources":["../../../src/workflow/lib/model-ref.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,UAAU,EAMnD,CAAC;AAOF,eAAO,MAAM,gBAAgB;;;;;;EAE5B,CAAC;AAEF,oBAAY,YAAY;IACtB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AAOD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAA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E,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"model-ref.js","sourceRoot":"","sources":["../../../src/workflow/lib/model-ref.ts"],"names":[],"mappings":";;;AA+FA,gDAEC;AAED,gDAEC;AA/ED,6BAAwB;AAkBxB,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,mCAAqB,CAAA;IACrB,iCAAmB,CAAA;AACrB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAEY,QAAA,kBAAkB,GAA0B;IACvD,UAAU,CAAC,MAAM;IACjB,UAAU,CAAC,MAAM;IACjB,UAAU,CAAC,QAAQ;IACnB,UAAU,CAAC,QAAQ;IACnB,UAAU,CAAC,OAAO;CACnB,CAAC;AAOW,QAAA,gBAAgB,GAAG,OAAC,CAAC,IAAI,CACpC,0BAA4D,CAC7D,CAAC;AAEF,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AA2BD,SAAgB,kBAAkB,CAAC,GAAa;IAC9C,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC;AAC5C,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAa;IAC9C,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC;AAC5C,CAAC"}
1
+ {"version":3,"file":"model-ref.js","sourceRoot":"","sources":["../../../src/workflow/lib/model-ref.ts"],"names":[],"mappings":";;;AA0IA,gDAEC;AAED,gDAEC;AA1HD,6BAAwB;AAoBxB,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,mCAAqB,CAAA;IACrB,iCAAmB,CAAA;AACrB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAEY,QAAA,kBAAkB,GAA0B;IACvD,UAAU,CAAC,MAAM;IACjB,UAAU,CAAC,MAAM;IACjB,UAAU,CAAC,QAAQ;IACnB,UAAU,CAAC,QAAQ;IACnB,UAAU,CAAC,OAAO;CACnB,CAAC;AAOW,QAAA,gBAAgB,GAAG,OAAC,CAAC,IAAI,CACpC,0BAA4D,CAC7D,CAAC;AAEF,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAoED,SAAgB,kBAAkB,CAAC,GAAa;IAC9C,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC;AAC5C,CAAC;AAED,SAAgB,kBAAkB,CAAC,GAAa;IAC9C,OAAO,GAAG,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC;AAC5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/kernel-contracts",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Consolidated Xema OS kernel wire contracts — pure types + zod schemas for the 32 kernel protocol surfaces. One package, one npm scope, wildcard per-surface subpath exports. No framework/runtime deps.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -14,4 +14,5 @@ export * from './lib/composition';
14
14
  export * from './lib/composition-limits-schema';
15
15
  export * from './lib/composition-workspace';
16
16
  export * from './lib/intrinsic-floor';
17
+ export * from './lib/invocation-overlay';
17
18
  export * from './lib/model-resolution-matrix';
@@ -14,7 +14,7 @@
14
14
  // ═══════════════════════════════════════════════════════════════════════════
15
15
 
16
16
  import type { ToolSelectionEntry } from '../../mcp-tool';
17
- import type { ModelRef } from '../../workflow';
17
+ import type { NodeOverlayFragment } from '../../workflow';
18
18
  import type { SkillRef } from '../../skill';
19
19
  import type { CapabilityLayer } from './capability-layer';
20
20
  import type { CompositionWorkspace } from './composition-workspace';
@@ -99,7 +99,7 @@ export interface CompositionLimits {
99
99
  * `skills` / `tools` / `modelOverride` attach AT this node — they extend or
100
100
  * override what the referenced agent definition declares intrinsically.
101
101
  */
102
- export interface CompositionNode {
102
+ export interface CompositionNode extends NodeOverlayFragment {
103
103
  /** The agent definition this node runs. */
104
104
  readonly agent: AgentRef;
105
105
  /** Optional alias when the same agent appears more than once in the tree. */
@@ -108,24 +108,10 @@ export interface CompositionNode {
108
108
  readonly skills: readonly SkillRef[];
109
109
  /** Tools attached at this node. */
110
110
  readonly tools: readonly ToolSelectionEntry[];
111
- /**
112
- * Optional concrete model override for this node. When omitted the
113
- * Model Resolution Matrix decides at the invocation boundary.
114
- */
115
- readonly modelOverride?: ModelRef;
116
- /**
117
- * Node-level instructions — a prompt fragment layered ONTO the referenced
118
- * agent definition's intrinsic system prompt. This is the "instructions"
119
- * lever that lets a handful of base agents (generic/coder/explorer/planner)
120
- * be specialized per node without authoring a new agent definition.
121
- *
122
- * Composite ordering (resolver-enforced): `agentDefinition.systemPrompt`
123
- * THEN these `instructions`. The platform `system-overlay.md` (AWP base +
124
- * deliverable contract + authority) is injected LATER by the runtime — it
125
- * is NOT part of this field. Absent/blank = the base prompt passes through
126
- * unchanged (never an empty append).
127
- */
128
- readonly instructions?: string;
111
+ // modelOverride / instructions / permission — the INVOCATION-overlay trio —
112
+ // are inherited from NodeOverlayFragment (single declaration site). They
113
+ // OVERRIDE the model, APPEND to the base prompt, and RESTRICT-merge the
114
+ // permission for this node only.
129
115
  /** Sub-agents — themselves fully-armed composition nodes (recursive). */
130
116
  readonly children: readonly CompositionNode[];
131
117
  /**
@@ -173,7 +159,7 @@ export interface Composition {
173
159
  * Distinct from `CompositionNode` (the AUTHORED form): a resolved node
174
160
  * has its agent reference fully version-pinned, never `latest`.
175
161
  */
176
- export interface ResolvedCompositionNode {
162
+ export interface ResolvedCompositionNode extends NodeOverlayFragment {
177
163
  /** Fully version-pinned agent reference. */
178
164
  readonly agent: Required<AgentRef>;
179
165
  readonly alias?: string;
@@ -181,15 +167,10 @@ export interface ResolvedCompositionNode {
181
167
  readonly skills: readonly SkillRef[];
182
168
  /** Tool references attached at this node. */
183
169
  readonly tools: readonly ToolSelectionEntry[];
184
- /** Concrete model override, when the node pinned one. */
185
- readonly modelOverride?: ModelRef;
186
- /**
187
- * Resolved node-level instructions, copied verbatim from the source
188
- * `CompositionNode.instructions`. The composer/runtime layers this onto
189
- * the referenced agent definition's `systemPrompt` (base prompt first,
190
- * then instructions). Absent = no node-level override.
191
- */
192
- readonly instructions?: string;
170
+ // modelOverride / instructions / permission inherited verbatim from the
171
+ // source node via NodeOverlayFragment (single declaration site). The
172
+ // composer layers instructions onto the base systemPrompt and deep-merges
173
+ // permission over the agent's authored permission before the system tiers.
193
174
  /** Resolved sub-agent nodes (recursive). */
194
175
  readonly children: readonly ResolvedCompositionNode[];
195
176
  /**
@@ -0,0 +1,75 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // ── Invocation Overlay ──
3
+ //
4
+ // The INVOCATION-axis overlay: per-call shaping of a resolved agent that is
5
+ // NEVER persisted into identity. ONE shared shape for both call sites —
6
+ // a workflow step's `with:` block AND a session/thread override — so the
7
+ // platform has a single overlay contract, not two divergent ones.
8
+ //
9
+ // Semantics (add-or-restrict ONLY — an overlay can extend context and NARROW
10
+ // capability, but NEVER widen beyond the agent's own + org/project policy):
11
+ // - modelOverride : OVERRIDE (inherited from NodeOverlayFragment)
12
+ // - instructions : APPEND (inherited; appended AFTER the resolved
13
+ // agent prompt — same field, same append
14
+ // semantics as a node; NO separate
15
+ // `instructionsAppend` name — one concept)
16
+ // - permission : RESTRICT (inherited; deep-merge, may only narrow)
17
+ // - tools : ADD/REMOVE (still policy-checked at resolve time)
18
+ // - skills : ADD-only (identity skills are the floor)
19
+ //
20
+ // Agent SELECTION (which agent runs) is deliberately NOT part of this overlay:
21
+ // in a workflow that is `agentSlug`/`agentRef`, and `compositionRef` selects a
22
+ // workspace SOURCE, not the agent (see plan audit A5). The overlay only SHAPES
23
+ // the already-selected agent.
24
+ // ═══════════════════════════════════════════════════════════════════════════
25
+
26
+ import type { ToolSelectionEntry } from '../../mcp-tool';
27
+ import type { SkillRef } from '../../skill';
28
+ import type { NodeOverlayFragment } from '../../workflow';
29
+
30
+ /**
31
+ * Tools requested for this invocation. `add` requests extra tools, `remove`
32
+ * drops tools by ref. Both are still validated against the agent's resolved
33
+ * permission AND the step/session policy at resolve time — a request can
34
+ * never force-enable a tool the agent is not allowed to use (fail-fast).
35
+ */
36
+ export interface InvocationToolOverlay {
37
+ readonly add?: readonly ToolSelectionEntry[];
38
+ /** Tool refs to drop for this invocation. */
39
+ readonly remove?: readonly string[];
40
+ }
41
+
42
+ /**
43
+ * Skills requested for this invocation. ADD-only: the resolved agent's own
44
+ * skills are the floor and cannot be removed by an overlay (they are
45
+ * governed, registered identity). Removal/disable is a separate, later
46
+ * governed capability — not part of the per-call overlay.
47
+ */
48
+ export interface InvocationSkillOverlay {
49
+ readonly add?: readonly SkillRef[];
50
+ }
51
+
52
+ /**
53
+ * The canonical per-call overlay. Extends {@link NodeOverlayFragment}
54
+ * (model / instructions / permission) with tools + skills. Both the
55
+ * workflow-step overlay and the session overlay ARE this shape.
56
+ */
57
+ export interface InvocationOverlay extends NodeOverlayFragment {
58
+ readonly tools?: InvocationToolOverlay;
59
+ readonly skills?: InvocationSkillOverlay;
60
+ }
61
+
62
+ /**
63
+ * A workflow step's typed `with:` overlay. Structurally an
64
+ * {@link InvocationOverlay}; named for the call site. The agent action
65
+ * manifest validates it via its `spec.inputs` JSON Schema (the existing
66
+ * fail-fast validation lane — NOT a new validation system).
67
+ */
68
+ export type AgentStepWithOverlay = InvocationOverlay;
69
+
70
+ /**
71
+ * A session/thread invocation overlay — the SAME shape as the workflow
72
+ * step overlay so sessions and workflows shape an agent identically
73
+ * (no second, looser session override surface).
74
+ */
75
+ export type SessionInvocationOverlay = InvocationOverlay;
@@ -0,0 +1,12 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // ── Agent Permission Contracts — Barrel Export ──
3
+ //
4
+ // Kernel (Layer-0) leaf: the pure permission TYPES (PermissionMap,
5
+ // PermissionRule, PermissionAction, PermissionKey, KNOWN_PERMISSION_KEYS).
6
+ // Zero deps. Imported by `workflow`, `agent-workspace`, and any consumer
7
+ // that needs the permission shape — breaks the prior workflow↔agent-workspace
8
+ // cycle. The resolve LOGIC + system tiers live in
9
+ // `agent-workspace/lib/agent-tool-defaults.ts`.
10
+ // ═══════════════════════════════════════════════════════════════════════════
11
+
12
+ export * from './lib/permission-map';
@@ -0,0 +1,71 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // ── Agent Permission types — single source of truth (Layer-0 leaf) ──
3
+ //
4
+ // The PURE permission TYPES, extracted to their own dependency-free subpath
5
+ // so BOTH `workflow` (model-ref / compiled-workspace-manifest) and
6
+ // `agent-workspace` (the resolve logic) can import them WITHOUT creating a
7
+ // `workflow ↔ agent-workspace` import cycle. The merge logic + system tiers
8
+ // (`resolveAgentPermissions`, `SYSTEM_*_PERMISSIONS`,
9
+ // `assertNoRequiredPermissionsDenied`) stay in
10
+ // `agent-workspace/lib/agent-tool-defaults.ts` and import these types.
11
+ //
12
+ // Mirrors OpenCode's unified `permission` surface (`packages/opencode/src/
13
+ // config/permission.ts`).
14
+ // ═══════════════════════════════════════════════════════════════════════════
15
+
16
+ /**
17
+ * Permission keys that take a `Rule` shape — either a scalar action or
18
+ * a per-target map (e.g. `bash: { '*': 'allow', 'rm -rf *': 'deny' }`,
19
+ * `task: { 'html-builder': 'allow' }`, `external_directory: { '/**':
20
+ * 'allow' }`). Mirrors OpenCode's `permission.ts` `InputObject`.
21
+ */
22
+ const KNOWN_RULE_PERMISSION_KEYS = [
23
+ 'read',
24
+ 'edit',
25
+ 'glob',
26
+ 'grep',
27
+ 'list',
28
+ 'bash',
29
+ 'task',
30
+ 'external_directory',
31
+ 'lsp',
32
+ 'skill',
33
+ ] as const;
34
+
35
+ /**
36
+ * Permission keys that take a scalar `Action` only (no per-target map).
37
+ * Mirrors OpenCode's `permission.ts` `InputObject`.
38
+ */
39
+ const KNOWN_ACTION_PERMISSION_KEYS = [
40
+ 'todowrite',
41
+ 'question',
42
+ 'webfetch',
43
+ 'websearch',
44
+ 'doom_loop',
45
+ ] as const;
46
+
47
+ export const KNOWN_PERMISSION_KEYS = [
48
+ ...KNOWN_RULE_PERMISSION_KEYS,
49
+ ...KNOWN_ACTION_PERMISSION_KEYS,
50
+ ] as const;
51
+
52
+ export type PermissionKey = (typeof KNOWN_PERMISSION_KEYS)[number];
53
+
54
+ export type PermissionAction = 'allow' | 'ask' | 'deny';
55
+
56
+ /**
57
+ * A permission entry is either a scalar action or a per-target map. The
58
+ * map form is supported only for the keys in `KNOWN_RULE_PERMISSION_KEYS`
59
+ * — the action-only keys reject map shapes at the OpenCode schema layer.
60
+ * Catch-all entries (MCP tool names, biome-emitted globs) live alongside
61
+ * the closed set; their shape is validated by OpenCode at config load.
62
+ */
63
+ export type PermissionRule = PermissionAction | Readonly<Record<string, PermissionAction>>;
64
+
65
+ /**
66
+ * Full permission map. Closed-set keys carry typed rules; the index
67
+ * signature accommodates MCP tool names and biome-emitted glob patterns
68
+ * (e.g. `xema_*`, `emit*`) that OpenCode resolves via its catch-all
69
+ * `Schema.Record(Schema.String, Rule)` in `permission.ts`.
70
+ */
71
+ export type PermissionMap = Readonly<Record<string, PermissionRule>>;
@@ -29,62 +29,26 @@
29
29
  // pipelines, and authoring previews all merge through this function.
30
30
  // ═══════════════════════════════════════════════════════════════════════════
31
31
 
32
- /**
33
- * Permission keys that take a `Rule` shape — either a scalar action or
34
- * a per-target map (e.g. `bash: { '*': 'allow', 'rm -rf *': 'deny' }`,
35
- * `task: { 'html-builder': 'allow' }`, `external_directory: { '/**':
36
- * 'allow' }`). Mirrors OpenCode's `permission.ts` `InputObject`.
37
- */
38
- const KNOWN_RULE_PERMISSION_KEYS = [
39
- 'read',
40
- 'edit',
41
- 'glob',
42
- 'grep',
43
- 'list',
44
- 'bash',
45
- 'task',
46
- 'external_directory',
47
- 'lsp',
48
- 'skill',
49
- ] as const;
50
-
51
- /**
52
- * Permission keys that take a scalar `Action` only (no per-target map).
53
- * Mirrors OpenCode's `permission.ts` `InputObject`.
54
- */
55
- const KNOWN_ACTION_PERMISSION_KEYS = [
56
- 'todowrite',
57
- 'question',
58
- 'webfetch',
59
- 'websearch',
60
- 'doom_loop',
61
- ] as const;
62
-
63
- export const KNOWN_PERMISSION_KEYS = [
64
- ...KNOWN_RULE_PERMISSION_KEYS,
65
- ...KNOWN_ACTION_PERMISSION_KEYS,
66
- ] as const;
67
-
68
- export type PermissionKey = (typeof KNOWN_PERMISSION_KEYS)[number];
69
-
70
- export type PermissionAction = 'allow' | 'ask' | 'deny';
71
-
72
- /**
73
- * A permission entry is either a scalar action or a per-target map. The
74
- * map form is supported only for the keys in `KNOWN_RULE_PERMISSION_KEYS`
75
- * — the action-only keys reject map shapes at the OpenCode schema layer.
76
- * Catch-all entries (MCP tool names, biome-emitted globs) live alongside
77
- * the closed set; their shape is validated by OpenCode at config load.
78
- */
79
- export type PermissionRule = PermissionAction | Readonly<Record<string, PermissionAction>>;
80
-
81
- /**
82
- * Full permission map. Closed-set keys carry typed rules; the index
83
- * signature accommodates MCP tool names and biome-emitted glob patterns
84
- * (e.g. `xema_*`, `emit*`) that OpenCode resolves via its catch-all
85
- * `Schema.Record(Schema.String, Rule)` in `permission.ts`.
86
- */
87
- export type PermissionMap = Readonly<Record<string, PermissionRule>>;
32
+ // The pure permission TYPES now live in the dependency-free `agent-permission`
33
+ // leaf subpath (breaking the prior workflow↔agent-workspace cycle). Import the
34
+ // value (`KNOWN_PERMISSION_KEYS`) for the resolve logic below + the types, and
35
+ // re-export all of them so the `agent-workspace` barrel surface stays stable
36
+ // for every existing consumer.
37
+ import { KNOWN_PERMISSION_KEYS } from '../../agent-permission';
38
+ import type {
39
+ PermissionAction,
40
+ PermissionKey,
41
+ PermissionMap,
42
+ PermissionRule,
43
+ } from '../../agent-permission';
44
+
45
+ export {
46
+ KNOWN_PERMISSION_KEYS,
47
+ type PermissionAction,
48
+ type PermissionKey,
49
+ type PermissionMap,
50
+ type PermissionRule,
51
+ } from '../../agent-permission';
88
52
 
89
53
  /**
90
54
  * Permissions every agent gets — manifests cannot deny them. Removing
@@ -0,0 +1,10 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // ── Reference Resolution Contracts — Barrel Export ──
3
+ //
4
+ // Kernel (Layer-0) leaf: the shared graceful-degradation decision (DBM.1) used
5
+ // by every resolver that walks a definition's declared references. Zero
6
+ // cross-subpath deps so agent-composition / skill / capability / workflow /
7
+ // action resolvers can all import it without a cycle.
8
+ // ═══════════════════════════════════════════════════════════════════════════
9
+
10
+ export * from './lib/reference-resolution';
@@ -0,0 +1,175 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════
2
+ // ── Reference Resolution — graceful-degradation decision (DBM.1) ──
3
+ //
4
+ // The ONE shared contract every resolver uses when it walks a definition's
5
+ // declared references (an Agent node's `agentRef`, a skill's sub-skill, an
6
+ // action's capability, a workflow's `uses:`) and asks "is this reference
7
+ // available right now, and what do I do if it isn't?".
8
+ //
9
+ // It exists because of DYNAMIC BIOME MODULARITY: a definition authored while
10
+ // biome X was installed keeps referencing X's contributions after X is
11
+ // uninstalled/disabled. Today every resolver hard-fails uniformly
12
+ // (AGENT_NOT_REGISTERED / MOUNT_SOURCE_NOT_FOUND aborts the whole run). The
13
+ // shared policy below lets a reference be declared `optional` so its absence
14
+ // degrades to a typed, observable skip instead of aborting — while the DEFAULT
15
+ // stays fail-fast/fail-closed (no silent fallback).
16
+ //
17
+ // Modeled on `ResolvedModelDecision` (the Model Matrix's traced outcome): a
18
+ // resolver returns one {@link ResolvedReferenceDecision} per reference, carrying
19
+ // the outcome + a human-readable `reason` for the Studio debugger. Distinct
20
+ // from model resolution on purpose — the Model Matrix always has a DEFAULT rule
21
+ // so it can never be "unavailable"; references genuinely can.
22
+ //
23
+ // Pure Layer-0 leaf: zero cross-subpath imports so EVERY resolver
24
+ // (agent-composition / skill / capability / workflow / action) can import it
25
+ // without creating a cycle.
26
+ // ═══════════════════════════════════════════════════════════════════════════
27
+
28
+ /**
29
+ * How a resolver must treat a reference whose backing contribution is not
30
+ * currently available. Closed set; the DEFAULT is {@link Required}.
31
+ *
32
+ * This is the per-reference knob that makes biome add/remove non-breaking:
33
+ * authors mark the references they can live without as {@link Optional}; every
34
+ * other reference keeps the fail-fast contract.
35
+ */
36
+ export enum MissingReferencePolicy {
37
+ /**
38
+ * Default. An unavailable reference is fatal — the resolver throws and the
39
+ * whole resolution/run fails fast. Never degrades silently.
40
+ */
41
+ Required = 'required',
42
+ /**
43
+ * An unavailable reference is skipped with a typed warning
44
+ * ({@link ReferenceResolutionState.OptionalSkipped}) and resolution
45
+ * continues without it. The only sanctioned degradation path.
46
+ */
47
+ Optional = 'optional',
48
+ }
49
+
50
+ /**
51
+ * The four — and only four — outcomes of resolving a single reference.
52
+ * Closed set; this is the "4-state ResolverDecision" of DBM.1.
53
+ */
54
+ export enum ReferenceResolutionState {
55
+ /** Resolved to a live, available contribution. */
56
+ Present = 'present',
57
+ /**
58
+ * The reference is declared on the definition but its backing contribution
59
+ * is not currently available — typically because the owning biome was
60
+ * uninstalled or disabled. Fatal under {@link MissingReferencePolicy.Required};
61
+ * degrades to {@link OptionalSkipped} under {@link MissingReferencePolicy.Optional}.
62
+ */
63
+ DeclaredButUnavailable = 'declared-but-unavailable',
64
+ /**
65
+ * An {@link MissingReferencePolicy.Optional} reference that was
66
+ * {@link DeclaredButUnavailable} and was therefore skipped; resolution
67
+ * continued without it. This is the graceful-degradation terminal state.
68
+ */
69
+ OptionalSkipped = 'optional-skipped',
70
+ /**
71
+ * The reference resolves to a contribution the caller is NOT permitted to
72
+ * use (governance / scope / visibility denied it). Always fatal regardless
73
+ * of policy — fail-closed, never downgraded to a skip.
74
+ */
75
+ Denied = 'denied',
76
+ }
77
+
78
+ /**
79
+ * The closed set of reference KINDS a definition can declare and a resolver
80
+ * can resolve. Adding a new resolvable reference type = a one-line enum
81
+ * extension here.
82
+ */
83
+ export enum ReferenceKind {
84
+ /** An Agent node's `agentRef` (a child agent / sub-agent). */
85
+ Agent = 'agent',
86
+ /** A skill bundle slug (intrinsic, node-attached, or a sub-skill). */
87
+ Skill = 'skill',
88
+ /** An MCP tool selection entry (`<provider>:<tool>@<v>`). */
89
+ Tool = 'tool',
90
+ /** A capability ref (`document:pdf-to-markdown@1`) reached via the router. */
91
+ Capability = 'capability',
92
+ /** A workflow action ref. */
93
+ Action = 'action',
94
+ /** A sub-workflow `uses:` ref. */
95
+ Workflow = 'workflow',
96
+ }
97
+
98
+ /**
99
+ * Declared-vs-enforced verification of a {@link ReferenceResolutionState.Present}
100
+ * reference — adopted from NemoClaw's verification model. Answers "the registry
101
+ * SAYS this exists, but is it actually reachable at the gateway/runtime?".
102
+ * Surfaced for diagnostics; it does NOT change fail-fast semantics (an
103
+ * unreachable-but-required reference still fails).
104
+ */
105
+ export enum ReferenceVerification {
106
+ /** Declared in the registry AND confirmed reachable at the gateway/runtime. */
107
+ Verified = 'verified',
108
+ /** Declared in the registry but reachability at runtime is unconfirmed. */
109
+ RegistryOnly = 'registry-only',
110
+ /** Reachable at the gateway/runtime but with no registry declaration. */
111
+ GatewayOnly = 'gateway-only',
112
+ /** Neither declared nor reachable — pairs with {@link ReferenceResolutionState.DeclaredButUnavailable}. */
113
+ Unavailable = 'unavailable',
114
+ }
115
+
116
+ /**
117
+ * Owner attribution for a reference — which biome contributes it (NemoClaw's
118
+ * owner-attribution shape). The key signal behind a
119
+ * {@link ReferenceResolutionState.DeclaredButUnavailable} outcome: it names the
120
+ * biome whose install/enable would make the reference {@link ReferenceResolutionState.Present}
121
+ * again, so the UI can say "install biome X to restore `media:transcribe@1`".
122
+ *
123
+ * Both fields optional — System/kernel-shipped references have no owning biome.
124
+ */
125
+ export interface ReferenceOwner {
126
+ /** The contributing biome's id; absent for System/kernel-shipped references. */
127
+ readonly biomeId?: string;
128
+ /** The contributing biome's version at resolution time, when known. */
129
+ readonly biomeVersion?: string;
130
+ }
131
+
132
+ /**
133
+ * The traced outcome of resolving ONE declared reference — the per-reference
134
+ * sibling of {@link ResolvedModelDecision}. A resolver emits one of these per
135
+ * reference it walks; the set is the audit trail the Studio debugger renders
136
+ * and the basis for any fail-fast throw.
137
+ */
138
+ export interface ResolvedReferenceDecision {
139
+ /** What kind of reference this is. */
140
+ readonly kind: ReferenceKind;
141
+ /** The ref/slug exactly as authored on the definition. */
142
+ readonly ref: string;
143
+ /** The pinned version the definition requested, when it pinned one. */
144
+ readonly version?: string;
145
+ /** The policy that governed this reference (default {@link MissingReferencePolicy.Required}). */
146
+ readonly policy: MissingReferencePolicy;
147
+ /** The resolution outcome. */
148
+ readonly state: ReferenceResolutionState;
149
+ /** Declared-vs-enforced verification, when the resolver could determine it. */
150
+ readonly verification?: ReferenceVerification;
151
+ /** Which biome contributes the reference, for "install X to restore" UX. */
152
+ readonly owner?: ReferenceOwner;
153
+ /** Human-readable reason for the Studio debugger; mirrors `ResolvedModelDecision.reason`. */
154
+ readonly reason: string;
155
+ }
156
+
157
+ /**
158
+ * `true` when the decision must abort resolution fail-fast — every
159
+ * {@link ReferenceResolutionState.Denied}, plus any
160
+ * {@link ReferenceResolutionState.DeclaredButUnavailable} that was NOT marked
161
+ * {@link MissingReferencePolicy.Optional}. The single predicate every resolver
162
+ * checks so the fail-fast rule is implemented in exactly one place (no
163
+ * per-resolver re-derivation, no silent divergence).
164
+ */
165
+ export function isFatalReferenceDecision(
166
+ decision: ResolvedReferenceDecision,
167
+ ): boolean {
168
+ if (decision.state === ReferenceResolutionState.Denied) {
169
+ return true;
170
+ }
171
+ if (decision.state === ReferenceResolutionState.DeclaredButUnavailable) {
172
+ return decision.policy !== MissingReferencePolicy.Optional;
173
+ }
174
+ return false;
175
+ }
@@ -8,6 +8,7 @@
8
8
  * → workflow-contracts → workspace-manifest-dsl.
9
9
  */
10
10
 
11
+ import type { PermissionMap } from '../../agent-permission';
11
12
  import type { ToolSelectionEntry } from '../../mcp-tool';
12
13
 
13
14
  import type { AgentRunRole } from './agent-role';
@@ -83,6 +84,16 @@ export interface CompiledManifestAgent {
83
84
  * Absent = the base agent's prompt passes through unchanged.
84
85
  */
85
86
  readonly instructions?: string;
87
+ /**
88
+ * Optional node-level permission override carried through from the
89
+ * authored manifest's `spec.agent.permission` (WS5 kernel extension).
90
+ * Deep-merged (per top-level key) over the referenced base agent's
91
+ * authored permission before the system tiers run — lets a generic base
92
+ * agent (e.g. `coder`/`planner`) be specialized into a bounded role
93
+ * (read-only, scoped `task` allowlist) without a new agent definition.
94
+ * Absent = the base agent's permissions pass through unchanged.
95
+ */
96
+ readonly permission?: PermissionMap;
86
97
  readonly subAgents: readonly SubAgentBinding[];
87
98
  }
88
99
 
@@ -22,6 +22,8 @@
22
22
 
23
23
  import { z } from 'zod';
24
24
 
25
+ import type { PermissionMap } from '../../agent-permission';
26
+
25
27
  /**
26
28
  * LLM-routing tier. The SINGLE source of truth for the closed set
27
29
  * `utility | planning | creative | coding | review` — every other
@@ -68,27 +70,68 @@ export enum ModelRefKind {
68
70
  STRATEGY = 'strategy',
69
71
  }
70
72
 
73
+ /**
74
+ * Model generation / sampling options — the closed set of knobs an author
75
+ * MAY set on a model reference.
76
+ *
77
+ * **No platform-side defaults (hard rule).** Every field is optional and
78
+ * Xema injects NO default for any of them. An unset field is passed through
79
+ * as ABSENT so the engine/provider applies its own default — never
80
+ * materialise a value here, in a DTO, a Zod `.default()`, a seeder, or a
81
+ * `?? <n>` fallback. Forward a field to the provider only when it is
82
+ * explicitly defined (the `request.x !== undefined` pattern).
83
+ *
84
+ * Spread (via `extends`) by both {@link ConcreteModelRef} and
85
+ * {@link StrategyModelRef} so every override slot in the platform inherits
86
+ * new options for free — one fragment, no parallel field, no per-slot
87
+ * restatement (the `ModelRef` / `PermissionMap` reuse pattern).
88
+ */
89
+ export interface ModelOptions {
90
+ /** Sampling temperature. Unset = engine default (NOT 0). */
91
+ readonly temperature?: number;
92
+ /** Nucleus sampling top-p. Unset = engine default. */
93
+ readonly topP?: number;
94
+ /** Max output tokens for the completion. Unset = engine default. */
95
+ readonly maxTokens?: number;
96
+ /** Stop sequences. Unset = engine default. */
97
+ readonly stop?: readonly string[];
98
+ /** Presence penalty. Unset = engine default. */
99
+ readonly presencePenalty?: number;
100
+ /** Frequency penalty. Unset = engine default. */
101
+ readonly frequencyPenalty?: number;
102
+ /**
103
+ * Reasoning effort, provider-specific (e.g. `low`/`medium`/`high`).
104
+ * Free-form string because the accepted set differs per provider.
105
+ * Unset = engine default.
106
+ */
107
+ readonly reasoningEffort?: string;
108
+ /** Extended-thinking token budget, provider-specific. Unset = engine default. */
109
+ readonly thinkingBudget?: number;
110
+ }
111
+
71
112
  /**
72
113
  * Pin to a specific (modelId, providerSlug). The provider slug is
73
114
  * optional only when the modelId is globally unique across credentialed
74
115
  * providers for the org — when ambiguous, the resolver returns 400.
116
+ *
117
+ * Carries the optional {@link ModelOptions} sampling knobs (temperature,
118
+ * topP, maxTokens, …) — all pass-through-only, no platform default.
75
119
  */
76
- export interface ConcreteModelRef {
120
+ export interface ConcreteModelRef extends ModelOptions {
77
121
  readonly kind: ModelRefKind.CONCRETE;
78
122
  readonly modelId: string;
79
123
  readonly providerSlug?: string;
80
- readonly temperature?: number;
81
124
  }
82
125
 
83
126
  /**
84
127
  * Route through the existing `ModelStrategy` cascade for a given
85
128
  * `ModelClass`. The bound model can change without invalidating the
86
- * reference (lazy resolution).
129
+ * reference (lazy resolution). Carries the optional {@link ModelOptions}
130
+ * sampling knobs — all pass-through-only, no platform default.
87
131
  */
88
- export interface StrategyModelRef {
132
+ export interface StrategyModelRef extends ModelOptions {
89
133
  readonly kind: ModelRefKind.STRATEGY;
90
134
  readonly modelClass: ModelClass;
91
- readonly temperature?: number;
92
135
  }
93
136
 
94
137
  export type ModelRef = ConcreteModelRef | StrategyModelRef;
@@ -101,26 +144,47 @@ export function isStrategyModelRef(ref: ModelRef): ref is StrategyModelRef {
101
144
  return ref.kind === ModelRefKind.STRATEGY;
102
145
  }
103
146
 
147
+ /**
148
+ * The INVOCATION-overlay fragment shared by EVERY "agent node" shape — the
149
+ * genuinely-identical trio that specializes a referenced agent WITHOUT
150
+ * authoring a new definition. Single declaration site (the
151
+ * `ModelRef`/`PermissionMap` reuse pattern): `CompositionNode`,
152
+ * `SubAgentBinding`, the compiled manifest agent block, and the typed
153
+ * workflow/session invocation overlays all `extends` this — the trio is
154
+ * never restated per shape.
155
+ *
156
+ * Identity floors always win (add-or-restrict, never widen):
157
+ * - `modelOverride` — OVERRIDE: which model + how it samples
158
+ * ({@link ModelOptions}). Resolver reads `modelOverride.temperature`
159
+ * etc. to stamp sampling; omitted ⇒ the Model Resolution Matrix decides.
160
+ * - `instructions` — ADDITIVE: a prompt fragment layered AFTER the base
161
+ * agent's `systemPrompt` (composite order: base prompt THEN this; the
162
+ * platform `system-overlay.md` is injected LATER by the runtime).
163
+ * Absent/blank ⇒ base prompt passes through unchanged (never an empty
164
+ * append).
165
+ * - `permission` — RESTRICT-merge: a partial `PermissionMap`
166
+ * deep-merged per top-level key OVER the base agent's authored
167
+ * permission, BEFORE the system tiers run (`resolveAgentPermissions`).
168
+ * A present key replaces the base's value for that key; absent keys
169
+ * fall through. Omitted ⇒ base permissions unchanged. May only narrow.
170
+ */
171
+ export interface NodeOverlayFragment {
172
+ readonly modelOverride?: ModelRef;
173
+ readonly instructions?: string;
174
+ readonly permission?: PermissionMap;
175
+ }
176
+
104
177
  /**
105
178
  * A runtime attachment: "while this session/step runs, mount agent
106
- * `slug` as a delegate available to the primary, optionally with a
107
- * model override."
179
+ * `slug` as a delegate available to the primary, optionally specialized
180
+ * via the {@link NodeOverlayFragment} trio (model / instructions / permission)."
108
181
  *
109
182
  * Intrinsic delegates (those declared in the primary's own source
110
183
  * manifest under `permission.task.<slug>: allow`) are the floor — they
111
184
  * are always mounted and cannot be removed by any binding layer. A
112
- * binding on an intrinsic slug refines its model only.
185
+ * binding on an intrinsic slug refines its overlay only.
113
186
  */
114
- export interface SubAgentBinding {
187
+ export interface SubAgentBinding extends NodeOverlayFragment {
115
188
  readonly slug: string;
116
189
  readonly alias?: string;
117
- readonly modelOverride?: ModelRef;
118
- /**
119
- * Optional node-level instructions carried through from the authored
120
- * manifest's `spec.agent.subAgents[].instructions` (WS5 Phase B). A prompt
121
- * fragment the runtime layers ONTO the referenced base agent's intrinsic
122
- * system prompt — the `base agent slug + instructions` lever. Absent = the
123
- * base agent's prompt passes through unchanged.
124
- */
125
- readonly instructions?: string;
126
190
  }