@a5c-ai/genty-platform 6.0.2 → 6.0.3-staging.032e07a1ffa0

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 (27) hide show
  1. package/dist/harness/index.d.ts +2 -0
  2. package/dist/harness/index.d.ts.map +1 -1
  3. package/dist/harness/index.js +13 -2
  4. package/dist/harness/internal/createRun/orchestration/effects.d.ts +16 -0
  5. package/dist/harness/internal/createRun/orchestration/effects.d.ts.map +1 -1
  6. package/dist/harness/internal/createRun/orchestration/effects.js +25 -1
  7. package/dist/harness/internal/createRun/orchestration/externalPhase.d.ts.map +1 -1
  8. package/dist/harness/internal/createRun/orchestration/externalPhase.js +14 -3
  9. package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.d.ts.map +1 -1
  10. package/dist/harness/internal/createRun/orchestration/externalPhaseHelpers.js +4 -1
  11. package/dist/harness/internal/createRun/orchestration/index.d.ts.map +1 -1
  12. package/dist/harness/internal/createRun/orchestration/index.js +5 -2
  13. package/dist/harness/internal/createRun/orchestration/internalPhase.d.ts.map +1 -1
  14. package/dist/harness/internal/createRun/orchestration/internalPhase.js +7 -0
  15. package/dist/harness/internal/createRun/orchestration/policy-dispatch-gate.d.ts +50 -0
  16. package/dist/harness/internal/createRun/orchestration/policy-dispatch-gate.d.ts.map +1 -0
  17. package/dist/harness/internal/createRun/orchestration/policy-dispatch-gate.js +71 -0
  18. package/dist/harness/internal/createRun/orchestration/policy-enforcement-wiring.d.ts +90 -0
  19. package/dist/harness/internal/createRun/orchestration/policy-enforcement-wiring.d.ts.map +1 -0
  20. package/dist/harness/internal/createRun/orchestration/policy-enforcement-wiring.js +185 -0
  21. package/dist/harness/internal/createRun/planProcess/delegation.d.ts.map +1 -1
  22. package/dist/harness/internal/createRun/planProcess/delegation.js +5 -2
  23. package/dist/harness/internal/createRun/planProcess/phase.d.ts.map +1 -1
  24. package/dist/harness/internal/createRun/planProcess/phase.js +5 -2
  25. package/dist/harness/types.d.ts +16 -0
  26. package/dist/harness/types.d.ts.map +1 -1
  27. package/package.json +9 -8
@@ -13,6 +13,8 @@ export type { OutputMode, ToolResultShape, } from "./internal/createRun/utils";
13
13
  export { BOLD, DIM, MAGENTA, RED, RESET, formatToolResult, writeVerboseBlock, writeVerboseLine, } from "./internal/createRun/utils";
14
14
  export { assessRun, discoverRuns } from "./internal/createRun/resumeState";
15
15
  export { normalizeBuiltInHarnessName } from "./builtInHarness";
16
+ export { resolveRunPolicyGates, withPolicyGate, applyPolicyGateSync, __resetRunPolicyGatesCache, registerRunAuthorizationResolver, unregisterRunAuthorizationResolver, } from "./internal/createRun/orchestration/policy-enforcement-wiring";
17
+ export type { RunPolicyGates, PolicyGatedSessionOptions, } from "./internal/createRun/orchestration/policy-enforcement-wiring";
16
18
  export { invokeViaAgentMux, type AdapterBridgeOptions, type AgentMuxBridgeResult, type AdapterEventCallback, type AgentMuxClient, type AgentMuxRunHandle, type AdapterAgentEvent, type AdapterInteractionChannel, } from "./adapters";
17
19
  export { HARNESS_TO_AGENT_MUX_ADAPTER, mapHarnessToAmuxAdapter, hasAmuxAdapter, } from "./adapters";
18
20
  export { CircuitBreaker, type CircuitState, type CircuitBreakerOptions, type CircuitBreakerSnapshot, } from "./circuitBreaker";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/harness/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBA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C/B,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,cAAc,GACf,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/harness/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,m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,mBAAmB,CAAC;AAG3B,OAAO,EACL,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC"}
@@ -33,8 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.readFilesParallel = exports.WebSocketSession = exports.evaluateCondition = exports.EffectRouter = exports.applyProfileToProcessOptions = exports.deriveOrchestrationConfig = exports.CircuitBreaker = exports.hasAmuxAdapter = exports.mapHarnessToAmuxAdapter = exports.HARNESS_TO_AGENT_MUX_ADAPTER = exports.invokeViaAgentMux = exports.normalizeBuiltInHarnessName = exports.discoverRuns = exports.assessRun = exports.writeVerboseLine = exports.writeVerboseBlock = exports.formatToolResult = exports.RESET = exports.RED = exports.MAGENTA = exports.DIM = exports.BOLD = exports.selectHarness = exports.runOrchestrationPhase = exports.handleSessionCreate = exports.handleHarnessCreateRun = exports.adapters = exports.createAgentCoreSession = exports.buildLaunchSpec = exports.HARNESS_CLI_MAP = exports.buildHarnessArgs = exports.invokeHarness = exports.parseSearchResults = exports.filterByRelevance = exports.extractTextFromHtml = exports.stripHtmlTags = exports.AGENTIC_TOOL_NAMES = exports.disposeAgentCoreToolDefinitions = exports.createAgentCoreToolDefinitions = exports.resetAdapter = exports.setAdapter = exports.getAdapter = exports.listSupportedHarnesses = exports.getAdapterByName = exports.detectAdapter = exports.KNOWN_HARNESSES = exports.checkCliAvailable = exports.detectCallerHarness = exports.discoverHarnesses = exports.HarnessCapability = void 0;
37
- exports.StreamFanout = exports.StreamMerger = exports.parsePorcelainOutput = exports.isInsideWorktree = exports.listWorktrees = exports.removeWorktree = exports.createWorktree = exports.globParallel = exports.writeFilesParallel = void 0;
36
+ exports.CircuitBreaker = exports.hasAmuxAdapter = exports.mapHarnessToAmuxAdapter = exports.HARNESS_TO_AGENT_MUX_ADAPTER = exports.invokeViaAgentMux = exports.unregisterRunAuthorizationResolver = exports.registerRunAuthorizationResolver = exports.__resetRunPolicyGatesCache = exports.applyPolicyGateSync = exports.withPolicyGate = exports.resolveRunPolicyGates = exports.normalizeBuiltInHarnessName = exports.discoverRuns = exports.assessRun = exports.writeVerboseLine = exports.writeVerboseBlock = exports.formatToolResult = exports.RESET = exports.RED = exports.MAGENTA = exports.DIM = exports.BOLD = exports.selectHarness = exports.runOrchestrationPhase = exports.handleSessionCreate = exports.handleHarnessCreateRun = exports.adapters = exports.createAgentCoreSession = exports.buildLaunchSpec = exports.HARNESS_CLI_MAP = exports.buildHarnessArgs = exports.invokeHarness = exports.parseSearchResults = exports.filterByRelevance = exports.extractTextFromHtml = exports.stripHtmlTags = exports.AGENTIC_TOOL_NAMES = exports.disposeAgentCoreToolDefinitions = exports.createAgentCoreToolDefinitions = exports.resetAdapter = exports.setAdapter = exports.getAdapter = exports.listSupportedHarnesses = exports.getAdapterByName = exports.detectAdapter = exports.KNOWN_HARNESSES = exports.checkCliAvailable = exports.detectCallerHarness = exports.discoverHarnesses = exports.HarnessCapability = void 0;
37
+ exports.StreamFanout = exports.StreamMerger = exports.parsePorcelainOutput = exports.isInsideWorktree = exports.listWorktrees = exports.removeWorktree = exports.createWorktree = exports.globParallel = exports.writeFilesParallel = exports.readFilesParallel = exports.WebSocketSession = exports.evaluateCondition = exports.EffectRouter = exports.applyProfileToProcessOptions = exports.deriveOrchestrationConfig = void 0;
38
38
  var types_1 = require("./types");
39
39
  Object.defineProperty(exports, "HarnessCapability", { enumerable: true, get: function () { return types_1.HarnessCapability; } });
40
40
  // SDK-owned: harness registry, discovery, and adapter resolution are SDK-native
@@ -86,6 +86,17 @@ Object.defineProperty(exports, "assessRun", { enumerable: true, get: function ()
86
86
  Object.defineProperty(exports, "discoverRuns", { enumerable: true, get: function () { return resumeState_1.discoverRuns; } });
87
87
  var builtInHarness_1 = require("./builtInHarness");
88
88
  Object.defineProperty(exports, "normalizeBuiltInHarnessName", { enumerable: true, get: function () { return builtInHarness_1.normalizeBuiltInHarnessName; } });
89
+ // Milestone D (§9.4 / AC-49) — centralized session-gate wiring, exported so out-of-package
90
+ // tool-executing session sites (e.g. genty-cli resume) route through the same gate.
91
+ var policy_enforcement_wiring_1 = require("./internal/createRun/orchestration/policy-enforcement-wiring");
92
+ Object.defineProperty(exports, "resolveRunPolicyGates", { enumerable: true, get: function () { return policy_enforcement_wiring_1.resolveRunPolicyGates; } });
93
+ Object.defineProperty(exports, "withPolicyGate", { enumerable: true, get: function () { return policy_enforcement_wiring_1.withPolicyGate; } });
94
+ Object.defineProperty(exports, "applyPolicyGateSync", { enumerable: true, get: function () { return policy_enforcement_wiring_1.applyPolicyGateSync; } });
95
+ Object.defineProperty(exports, "__resetRunPolicyGatesCache", { enumerable: true, get: function () { return policy_enforcement_wiring_1.__resetRunPolicyGatesCache; } });
96
+ // Milestone E (ALLOW path, §5 / AC-9 / AC-49) — register the run's authorization-store
97
+ // resolver so the load-bearing gates can ALLOW a legitimately-authorized covered action.
98
+ Object.defineProperty(exports, "registerRunAuthorizationResolver", { enumerable: true, get: function () { return policy_enforcement_wiring_1.registerRunAuthorizationResolver; } });
99
+ Object.defineProperty(exports, "unregisterRunAuthorizationResolver", { enumerable: true, get: function () { return policy_enforcement_wiring_1.unregisterRunAuthorizationResolver; } });
89
100
  var adapters_1 = require("./adapters");
90
101
  Object.defineProperty(exports, "invokeViaAgentMux", { enumerable: true, get: function () { return adapters_1.invokeViaAgentMux; } });
91
102
  var adapters_2 = require("./adapters");
@@ -62,6 +62,22 @@ interface McpRoutingOptions {
62
62
  stateDir?: string;
63
63
  autoConnect?: boolean;
64
64
  cacheTtlMs?: number;
65
+ /**
66
+ * GATE (§9.4 / AC-23b / AC-49) — Milestone D policy gate for the MCP dispatcher
67
+ * seam. When present, a COVERED dispatch WITHOUT a valid CommandAuthorization is
68
+ * denied BEFORE execution (this seam is a LOAD-BEARING, un-bypassable blocking
69
+ * gate). When absent, dispatch proceeds unchanged (no covered actions configured).
70
+ * The gate returns `{ allowed, reason? }`; a `false` short-circuits the tool call.
71
+ */
72
+ policyGate?: (context: {
73
+ toolName: string;
74
+ input: unknown;
75
+ runId?: string;
76
+ sessionId?: string;
77
+ }) => {
78
+ allowed: boolean;
79
+ reason?: string;
80
+ };
65
81
  }
66
82
  interface EffectResolverOptions {
67
83
  workspace?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/effects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAW1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAO9D,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,iBAAiB,IAAI,wBAAwB,EAC7C,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,uBAAuB,IAAI,8BAA8B,EACzD,gBAAgB,IAAI,oBAAoB,EACxC,iBAAiB,IAAI,sBAAsB,EAC3C,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,mBAAmB,IAAI,0BAA0B,EAClD,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7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,EAAE,MAAM,sBAAsB,EAC/C,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,EACrE,sBAAsB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GACtE,OAAO,CAAC,mBAAmB,CAAC,CAqF9B;AAED,wBAAsB,wCAAwC,CAAC,IAAI,EAAE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E,GAAG,OAAO,CAAC,eAAe,CAAC,CA6C3B"}
1
+ {"version":3,"file":"effects.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/effects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAW1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAQ9D,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,iBAAiB,IAAI,wBAAwB,EAC7C,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,WAAW,IAAI,kBAAkB,EACjC,uBAAuB,IAAI,8BAA8B,EACzD,gBAAgB,IAAI,oBAAoB,EACxC,iBAAiB,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I,GACtE,OAAO,CAAC,mBAAmB,CAAC,CA2L9B;AAyOD,wBAAsB,oCAAoC,CACxD,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,uBAAuB,CAAC,CA4ElC;AAgeD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,qBAAqB,GAAG;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1C,EACD,SAAS,CAAC,EAAE,sBAAsB,GAAG,IAAI,EACzC,UAAU,CAAC,EAAE,sBAAsB,EAAE,EACrC,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS,GAAG,IAAI,EAC9B,IAAI,CAAC,EAAE,OAAO,EACd,gBAAgB,CAAC,EAAE,MAAM,sBAAsB,EAC/C,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,EACrE,sBAAsB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GACtE,OAAO,CAAC,mBAAmB,CAAC,CAqF9B;AAED,wBAAsB,wCAAwC,CAAC,IAAI,EAAE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E,GAAG,OAAO,CAAC,eAAe,CAAC,CA6C3B"}
@@ -45,6 +45,7 @@ const hookDecisionEffects_1 = require("./hookDecisionEffects");
45
45
  var effectsHelpers_2 = require("./effectsHelpers");
46
46
  Object.defineProperty(exports, "readProcessFileFingerprint", { enumerable: true, get: function () { return effectsHelpers_2.readProcessFileFingerprint; } });
47
47
  const workerSessionEnhancer_1 = require("./workerSessionEnhancer");
48
+ const policy_enforcement_wiring_1 = require("./policy-enforcement-wiring");
48
49
  const approvalChains_1 = require("../../../../breakpoints/approvalChains");
49
50
  const compaction_1 = require("../../../../compression/compaction");
50
51
  const executor_1 = require("../../../../mcp/client/executor");
@@ -376,6 +377,25 @@ async function resolveMcpEffect(action, options) {
376
377
  };
377
378
  }
378
379
  async function dispatchMcpTool(dispatcher, executor, request, options) {
380
+ // GATE (§9.4) — verify the policy authorization BEFORE dispatch. A covered action
381
+ // without a valid CommandAuthorization is denied before execution (AC-23b/AC-49).
382
+ const policyGate = options.mcp?.policyGate;
383
+ if (policyGate) {
384
+ const decision = policyGate({
385
+ toolName: request.toolName,
386
+ input: request.args,
387
+ ...(options.runId ? { runId: options.runId } : {}),
388
+ ...(options.sessionId ? { sessionId: options.sessionId } : {}),
389
+ });
390
+ if (!decision.allowed) {
391
+ return {
392
+ success: false,
393
+ content: [],
394
+ error: decision.reason ?? "policy authorization denied",
395
+ durationMs: 0,
396
+ };
397
+ }
398
+ }
379
399
  const dispatched = await dispatcher.dispatch({
380
400
  toolName: request.toolName,
381
401
  input: request.args,
@@ -744,7 +764,11 @@ async function invokeSubprocessEffect(action, harnessName, options, discovered,
744
764
  const enhancedOpts = options.gentyContext
745
765
  ? (0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, options.gentyContext)
746
766
  : baseOpts;
747
- const createWorkerSession = () => (0, utils_1.createAgentCoreSession)(enhancedOpts);
767
+ // §9.4 / AC-49 the subagent worker session runs `definition.execute`, so it
768
+ // MUST carry the load-bearing policy tool gate. Resolve once (memoized), apply
769
+ // synchronously to every session the factory builds.
770
+ const { policyToolGate: childWorkerGate } = await (0, policy_enforcement_wiring_1.resolveRunPolicyGates)(options.workspace);
771
+ const createWorkerSession = () => (0, utils_1.createAgentCoreSession)((0, policy_enforcement_wiring_1.applyPolicyGateSync)(enhancedOpts, childWorkerGate));
748
772
  workerSession = createWorkerSession();
749
773
  workerSessionFactory = createWorkerSession;
750
774
  }
@@ -1 +1 @@
1
- {"version":3,"file":"externalPhase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/externalPhase.ts"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAGzD,wBAAsB,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmUhH"}
1
+ {"version":3,"file":"externalPhase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/externalPhase.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAGzD,wBAAsB,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmUhH"}
@@ -52,6 +52,7 @@ const effects_1 = require("./effects");
52
52
  const dispatch_1 = require("./dispatch");
53
53
  const runState_1 = require("../planProcess/runState");
54
54
  const verbose_1 = require("./verbose");
55
+ const policy_enforcement_wiring_1 = require("./policy-enforcement-wiring");
55
56
  const externalPhaseHelpers_1 = require("./externalPhaseHelpers");
56
57
  async function runExternalOrchestrationPhase(args) {
57
58
  if (!(0, utils_1.shouldUseExternalHarness)(args.selectedHarnessName)) {
@@ -323,6 +324,11 @@ async function resolveExternalAction(args) {
323
324
  effectHarness: taskHarness,
324
325
  iteration: args.state.iteration,
325
326
  }, args.args.json, args.args.verbose, args.args.outputMode);
327
+ // §9.4 / AC-49 — worker sessions run `definition.execute` (tool-executing), so they MUST
328
+ // carry the load-bearing policy tool gate. Resolve the run's gate ONCE (memoized) and
329
+ // apply it synchronously to every worker session (incl. the retry factory below), so no
330
+ // tool-executing worker omits the gate. Unpinned anchor → gate is undefined (unchanged).
331
+ const { policyToolGate: workerPolicyGate } = await (0, policy_enforcement_wiring_1.resolveRunPolicyGates)(args.args.workspace);
326
332
  let workerSession = null;
327
333
  let workerUnsub = null;
328
334
  if (args.action.kind === "shell" ||
@@ -334,7 +340,7 @@ async function resolveExternalAction(args) {
334
340
  workspace: args.args.workspace,
335
341
  model: args.args.model,
336
342
  });
337
- workerSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext)));
343
+ workerSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, policy_enforcement_wiring_1.applyPolicyGateSync)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext), workerPolicyGate)));
338
344
  workerUnsub = (0, verbose_1.subscribeVerbosePiEvents)(workerSession, `worker:${args.action.effectId.slice(-8) /* last 8 chars of ULID for human-readable label */}`, args.args);
339
345
  }
340
346
  else if (shouldUseHostPiWorker) {
@@ -343,7 +349,7 @@ async function resolveExternalAction(args) {
343
349
  workspace: args.args.workspace,
344
350
  model: args.args.model,
345
351
  });
346
- workerSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext)));
352
+ workerSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, policy_enforcement_wiring_1.applyPolicyGateSync)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext), workerPolicyGate)));
347
353
  workerUnsub = (0, verbose_1.subscribeVerbosePiEvents)(workerSession, `worker:${args.action.effectId.slice(-8) /* last 8 chars of ULID for human-readable label */}`, args.args);
348
354
  }
349
355
  }
@@ -354,7 +360,7 @@ async function resolveExternalAction(args) {
354
360
  workspace: args.args.workspace,
355
361
  model: args.args.model,
356
362
  });
357
- const nextSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext)));
363
+ const nextSession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, policy_enforcement_wiring_1.applyPolicyGateSync)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext), workerPolicyGate)));
358
364
  workerUnsub?.();
359
365
  workerUnsub = (0, verbose_1.subscribeVerbosePiEvents)(nextSession, `worker:${args.action.effectId.slice(-8) /* last 8 chars of ULID for human-readable label */}`, args.args);
360
366
  return nextSession;
@@ -363,6 +369,10 @@ async function resolveExternalAction(args) {
363
369
  try {
364
370
  const effectStartTime = Date.now();
365
371
  const streamingCallbacks = (0, utils_1.createStreamingProgressCallbacks)((0, utils_1.resolveOutputMode)(args.args.json, args.args.outputMode), taskHarness);
372
+ // Milestone D (§9.4 / AC-49) — wire the LOAD-BEARING MCP dispatcher policy gate onto
373
+ // the effect resolver. When the config anchor is pinned, a covered MCP dispatch without
374
+ // a valid CommandAuthorization is denied before `dispatcher.dispatch`; unpinned → no gate.
375
+ const { mcpPolicyGate } = await (0, policy_enforcement_wiring_1.resolveRunPolicyGates)(args.args.workspace);
366
376
  const effectResult = await (0, effects_1.resolveEffectWithRetry)(args.action, args.args.selectedHarnessName, {
367
377
  workspace: args.args.workspace,
368
378
  model: args.args.model,
@@ -376,6 +386,7 @@ async function resolveExternalAction(args) {
376
386
  maxIterations: args.args.maxIterations,
377
387
  verbose: args.args.verbose,
378
388
  outputMode: args.args.outputMode,
389
+ ...(mcpPolicyGate ? { mcp: { policyGate: mcpPolicyGate } } : {}),
379
390
  }, workerSession, args.args.discovered, args.args.rl, args.args.json, piSessionFactory, args.shutdownPiSession);
380
391
  (0, utils_1.emitProgress)({
381
392
  phase: "2",
@@ -1 +1 @@
1
- {"version":3,"file":"externalPhaseHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/externalPhaseHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAEL,sBAAsB,EAIvB,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAM1D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIpE;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,IAAI,EAAE,yBAAyB,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACrH,iBAAiB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,GAAG,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7G,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ChB"}
1
+ {"version":3,"file":"externalPhaseHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/externalPhaseHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAEL,sBAAsB,EAIvB,MAAM,UAAU,CAAC;AAIlB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAM1D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIpE;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,IAAI,EAAE,yBAAyB,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,KAAK,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACrH,iBAAiB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,GAAG,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7G,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDhB"}
@@ -46,6 +46,7 @@ const babysitter_sdk_1 = require("@a5c-ai/babysitter-sdk");
46
46
  const utils_1 = require("../utils");
47
47
  const verbose_1 = require("./verbose");
48
48
  const workerSessionEnhancer_1 = require("./workerSessionEnhancer");
49
+ const policy_enforcement_wiring_1 = require("./policy-enforcement-wiring");
49
50
  function extractErrorMessage(error) {
50
51
  return error instanceof Error
51
52
  ? error.message
@@ -69,7 +70,9 @@ async function recoverExternalProcessError(args) {
69
70
  workspace: args.args.workspace,
70
71
  model: args.args.model,
71
72
  });
72
- const recoverySession = args.registerPiSession((0, utils_1.createAgentCoreSession)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext)));
73
+ // §9.4 / AC-49 — the recovery worker edits the process file (tool-executing), so it MUST
74
+ // carry the load-bearing policy tool gate.
75
+ const recoverySession = args.registerPiSession((0, utils_1.createAgentCoreSession)(await (0, policy_enforcement_wiring_1.withPolicyGate)((0, workerSessionEnhancer_1.enhanceWorkerSessionOptions)(baseOpts, args.args.gentyContext), args.args.workspace)));
73
76
  const recoveryUnsub = (0, verbose_1.subscribeVerbosePiEvents)(recoverySession, "recovery", args.args);
74
77
  try {
75
78
  const guidelines = (0, babysitter_sdk_1.composeProcessCreatePrompt)((0, babysitter_sdk_1.createPromptContextFromCatalog)('pi', { interactive: false }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,oCAAoC,EACpC,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,wCAAwC,EACxC,0BAA0B,EAC1B,a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,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwGf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,oCAAoC,EACpC,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,wCAAwC,EACxC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAmBzD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB;AAkBD,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAOjB;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwK1F;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE;YAAE,MAAM,CAAC,EAAE,MAAM,GAAG;gBAAE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE,CAAA;SAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACrN,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,aAAa,SAAe,GAC3B,OAAO,CAAC,IAAI,CAAC,CA2Gf"}
@@ -298,6 +298,7 @@ async function resolveAndPostEffect(action, runDir, workspace, model, babysitter
298
298
  }
299
299
  const { execFileSync, execSync } = await Promise.resolve().then(() => __importStar(require("node:child_process")));
300
300
  const { createAgentCoreSession } = await Promise.resolve().then(() => __importStar(require("../utils")));
301
+ const { withPolicyGate } = await Promise.resolve().then(() => __importStar(require("./policy-enforcement-wiring")));
301
302
  const babysitterParts = babysitterBin.split(" ");
302
303
  const bCmd = babysitterParts[0];
303
304
  const bPrefix = babysitterParts.slice(1);
@@ -321,11 +322,13 @@ async function resolveAndPostEffect(action, runDir, workspace, model, babysitter
321
322
  : agentPrompt?.instructions?.join("\n")
322
323
  ?? action.taskDef?.title
323
324
  ?? "Execute this task";
324
- const session = createAgentCoreSession({
325
+ // §9.4 / AC-49 — the delegated agent/skill session executes tools via session.prompt,
326
+ // so it MUST carry the load-bearing policy tool gate.
327
+ const session = createAgentCoreSession(await withPolicyGate({
325
328
  workspace,
326
329
  model,
327
330
  ephemeral: true,
328
- });
331
+ }, workspace));
329
332
  try {
330
333
  const result = await session.prompt(prompt);
331
334
  if (result.success === false) {
@@ -1 +1 @@
1
- {"version":3,"file":"internalPhase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/internalPhase.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAiC,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAQxF,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAyvBjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,CAgCR"}
1
+ {"version":3,"file":"internalPhase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/internalPhase.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAiC,yBAAyB,EAAE,MAAM,SAAS,CAAC;AASxF,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAgwBjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,CAgCR"}
@@ -47,6 +47,7 @@ const runState_1 = require("../planProcess/runState");
47
47
  const planProcess_1 = require("../planProcess");
48
48
  const resumeState_1 = require("../resumeState");
49
49
  const verbose_1 = require("./verbose");
50
+ const policy_enforcement_wiring_1 = require("./policy-enforcement-wiring");
50
51
  const tasks_1 = require("../../../../tasks");
51
52
  const history_1 = require("../../../../session/history");
52
53
  const gentySessionContext_1 = require("../../../gentySessionContext");
@@ -377,6 +378,11 @@ async function runInternalOrchestrationPhase(args) {
377
378
  sessionCustomTools = [...mergedTools, ...extensionTools];
378
379
  }
379
380
  }
381
+ // Milestone D (§9.4 / AC-49 / AC-45) — wire the LOAD-BEARING policy tool gate onto the
382
+ // real orchestrator session. When the off-workspace config anchor is pinned this makes a
383
+ // covered action without a valid CommandAuthorization DENY before `definition.execute`
384
+ // runs; when not pinned it is undefined (back-compat, path unchanged).
385
+ const { policyToolGate } = await (0, policy_enforcement_wiring_1.resolveRunPolicyGates)(args.workspace);
380
386
  orchestrationSession = registerPiSession((0, utils_1.createAgentCoreSession)({
381
387
  workspace: args.workspace,
382
388
  model: gentyCtx?.modelSwitch.currentModel ?? args.model,
@@ -388,6 +394,7 @@ async function runInternalOrchestrationPhase(args) {
388
394
  : undefined,
389
395
  appendSystemPrompt,
390
396
  ephemeral: true,
397
+ ...(policyToolGate ? { policyToolGate } : {}),
391
398
  ...(gentyCtx?.instructions.systemPromptMode === 'replace' && gentyCtx.instructions.systemPrompt
392
399
  ? { systemPrompt: gentyCtx.instructions.systemPrompt }
393
400
  : {}),
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Milestone D — genty dispatcher / session enforcement seam (§9.4 / AC-23b / AC-49 /
3
+ * AC-34a).
4
+ *
5
+ * The genty MCP dispatcher seam (effects.ts `dispatcher.dispatch`) and the genty
6
+ * session tool-execution point (`session.ts` `definition.execute`) verify a
7
+ * CommandAuthorization BEFORE execution, using the in-process model attestation
8
+ * carried on `ToolExecutionContext`. This is a LOAD-BEARING, un-bypassable blocking
9
+ * gate for EVERY covered action: a covered action WITHOUT a valid authorization is
10
+ * denied before execution.
11
+ *
12
+ * The authorization is bound to the exact toolCallId (AC-34a) and the args about to
13
+ * run (argsHash recomputed here, AC-32). An MCP tool is not command-bearing, so its
14
+ * `commandHash` is the empty-argv sentinel supplied by the caller.
15
+ *
16
+ * OVERRIDING RULE: fail closed. Any verification / parse / binding error, or any
17
+ * thrown exception, is `{ allowed: false }`. No fallbacks.
18
+ */
19
+ import { type CommandAuthorizationPayload, type TrustRoot } from '@a5c-ai/policy-adapter';
20
+ import type { SignedEnvelope } from '@a5c-ai/genty-core/trust';
21
+ export interface DispatchGateContext {
22
+ issuerRoots: TrustRoot[];
23
+ policyDocHash: string;
24
+ currentConfigEpoch: number;
25
+ minEpochFloor: number;
26
+ now: number;
27
+ toolName: string;
28
+ toolCallId: string;
29
+ /** Empty-argv sentinel for non-command-bearing MCP tools (AC-10 step 4). */
30
+ commandHash: string;
31
+ /** The exact args about to run — argsHash recomputed at this seam (TOCTOU, AC-32). */
32
+ args: unknown;
33
+ credentialScope: string;
34
+ /** Coverage predicate: is this dispatch policy-covered? */
35
+ isCovered: () => boolean;
36
+ /** Resolve the CommandAuthorization bound to this dispatch (or none). */
37
+ resolveAuthorization: () => SignedEnvelope<CommandAuthorizationPayload> | undefined;
38
+ }
39
+ export interface DispatchGateResult {
40
+ allowed: boolean;
41
+ reason?: string;
42
+ }
43
+ /**
44
+ * Verify authorization for a genty MCP dispatch / session tool-execution (AC-23b).
45
+ * An UNCOVERED dispatch is allowed (coverage/default-allow is decided upstream); a
46
+ * COVERED dispatch REQUIRES a valid CommandAuthorization bound to this exact
47
+ * toolCallId + argsHash + credentialScope, else it is denied before execution.
48
+ */
49
+ export declare function verifyDispatchAuthorization(ctx: DispatchGateContext): DispatchGateResult;
50
+ //# sourceMappingURL=policy-dispatch-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-dispatch-gate.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/orchestration/policy-dispatch-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,sFAAsF;IACtF,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,yEAAyE;IACzE,oBAAoB,EAAE,MAAM,cAAc,CAAC,2BAA2B,CAAC,GAAG,SAAS,CAAC;CACrF;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,mBAAmB,GAAG,kBAAkB,CA8CxF"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verifyDispatchAuthorization = verifyDispatchAuthorization;
4
+ /**
5
+ * Milestone D — genty dispatcher / session enforcement seam (§9.4 / AC-23b / AC-49 /
6
+ * AC-34a).
7
+ *
8
+ * The genty MCP dispatcher seam (effects.ts `dispatcher.dispatch`) and the genty
9
+ * session tool-execution point (`session.ts` `definition.execute`) verify a
10
+ * CommandAuthorization BEFORE execution, using the in-process model attestation
11
+ * carried on `ToolExecutionContext`. This is a LOAD-BEARING, un-bypassable blocking
12
+ * gate for EVERY covered action: a covered action WITHOUT a valid authorization is
13
+ * denied before execution.
14
+ *
15
+ * The authorization is bound to the exact toolCallId (AC-34a) and the args about to
16
+ * run (argsHash recomputed here, AC-32). An MCP tool is not command-bearing, so its
17
+ * `commandHash` is the empty-argv sentinel supplied by the caller.
18
+ *
19
+ * OVERRIDING RULE: fail closed. Any verification / parse / binding error, or any
20
+ * thrown exception, is `{ allowed: false }`. No fallbacks.
21
+ */
22
+ const policy_adapter_1 = require("@a5c-ai/policy-adapter");
23
+ /**
24
+ * Verify authorization for a genty MCP dispatch / session tool-execution (AC-23b).
25
+ * An UNCOVERED dispatch is allowed (coverage/default-allow is decided upstream); a
26
+ * COVERED dispatch REQUIRES a valid CommandAuthorization bound to this exact
27
+ * toolCallId + argsHash + credentialScope, else it is denied before execution.
28
+ */
29
+ function verifyDispatchAuthorization(ctx) {
30
+ try {
31
+ if (!ctx || typeof ctx !== 'object') {
32
+ return { allowed: false, reason: 'missing dispatch gate context' };
33
+ }
34
+ if (typeof ctx.isCovered !== 'function' || typeof ctx.resolveAuthorization !== 'function') {
35
+ return { allowed: false, reason: 'missing coverage/authorization resolvers' };
36
+ }
37
+ const covered = ctx.isCovered() === true;
38
+ if (!covered) {
39
+ // Uncovered dispatch: enforcement is decided by the upstream coverage/default
40
+ // logic; the seam itself does not block an uncovered action.
41
+ return { allowed: true };
42
+ }
43
+ const authorization = ctx.resolveAuthorization();
44
+ if (!authorization) {
45
+ return { allowed: false, reason: 'covered dispatch has no CommandAuthorization — deny' };
46
+ }
47
+ const argsHash = (0, policy_adapter_1.argsHash)(ctx.args);
48
+ const verification = (0, policy_adapter_1.verifyCommandAuthorization)(authorization, {
49
+ now: ctx.now,
50
+ toolName: ctx.toolName,
51
+ toolCallId: ctx.toolCallId,
52
+ commandHash: ctx.commandHash,
53
+ argsHash,
54
+ credentialScope: ctx.credentialScope,
55
+ policyDocHash: ctx.policyDocHash,
56
+ currentConfigEpoch: ctx.currentConfigEpoch,
57
+ minEpochFloor: ctx.minEpochFloor,
58
+ issuerRoots: ctx.issuerRoots,
59
+ });
60
+ if (!verification.valid) {
61
+ return { allowed: false, reason: `authorization verification failed: ${verification.reason}` };
62
+ }
63
+ return { allowed: true };
64
+ }
65
+ catch (err) {
66
+ return {
67
+ allowed: false,
68
+ reason: `exception during genty-seam verification: ${err?.message ?? String(err)}`,
69
+ };
70
+ }
71
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Milestone D — PRODUCTION wiring of the tool-layer gates into the genty run
3
+ * (§9.4 / AC-49 / AC-45).
4
+ *
5
+ * The genty session (`AgentCoreSessionOptions.policyToolGate`) and the genty MCP
6
+ * dispatcher (`McpRoutingOptions.policyGate`) are LOAD-BEARING blocking gates, but they
7
+ * were never populated in production — the `if (gate)` checks were dead. This helper
8
+ * builds the gate ONCE per workspace (via the policy-adapter's `loadPolicyEnforcementGate`,
9
+ * which verifies the pinned config manifest and constructs coverage + authorization
10
+ * resolution from the verified config) and hands the run its `policyToolGate` /
11
+ * `mcpPolicyGate` callbacks.
12
+ *
13
+ * POSTURE (mirrors Milestone C's loadTrustedBreakpointPolicy):
14
+ * - anchor pinned (`POLICY_CONFIG_ROOT_FP` set) → enforcement ACTIVE by default; a
15
+ * covered action without a valid CommandAuthorization is DENIED on the real path with
16
+ * no extra caller wiring, and a config error denies every covered action (fail closed).
17
+ * - anchor NOT pinned → `undefined` gate; the run paths are unchanged (back-compat).
18
+ *
19
+ * The gate is memoized per workspace so repeated session/effect construction within one
20
+ * run does not re-verify the manifest each time.
21
+ */
22
+ import type { AuthorizationResolver } from '@a5c-ai/policy-adapter';
23
+ import type { AgentCoreSessionOptions } from '@a5c-ai/genty-core';
24
+ type SessionToolGate = (ctx: {
25
+ toolName: string;
26
+ toolCallId: string;
27
+ input: unknown;
28
+ modelId?: string;
29
+ }) => {
30
+ allowed: boolean;
31
+ reason?: string;
32
+ };
33
+ type McpPolicyGate = (ctx: {
34
+ toolName: string;
35
+ input: unknown;
36
+ runId?: string;
37
+ sessionId?: string;
38
+ }) => {
39
+ allowed: boolean;
40
+ reason?: string;
41
+ };
42
+ export interface RunPolicyGates {
43
+ /** The genty session tool-execution gate, or undefined when enforcement is inactive. */
44
+ policyToolGate?: SessionToolGate;
45
+ /** The genty MCP dispatcher gate, or undefined when enforcement is inactive. */
46
+ mcpPolicyGate?: McpPolicyGate;
47
+ }
48
+ /**
49
+ * Register the run's authorization-store resolver for a workspace so the load-bearing gates
50
+ * can ALLOW a legitimately-authorized covered action (AC-9 / AC-49). Clears the per-workspace
51
+ * gate memo so the next `resolveRunPolicyGates` rebuilds the gate WITH the resolver threaded.
52
+ */
53
+ export declare function registerRunAuthorizationResolver(workspace: string | undefined, resolveAuthorization: AuthorizationResolver): void;
54
+ /** Test-only / end-of-run: drop the registered resolver for a workspace. */
55
+ export declare function unregisterRunAuthorizationResolver(workspace: string | undefined): void;
56
+ /**
57
+ * Resolve the run's policy gates for a workspace. Memoized per workspace. The optional
58
+ * `resolveAuthorization` is the run's authorization store (the orchestrator issues a
59
+ * CommandAuthorization when evidence is present; with no store a covered action DENIES).
60
+ */
61
+ export declare function resolveRunPolicyGates(workspace: string | undefined, resolveAuthorization?: AuthorizationResolver): Promise<RunPolicyGates>;
62
+ /** Test-only: clear the per-workspace memo so a test can re-resolve with a fresh env. */
63
+ export declare function __resetRunPolicyGatesCache(): void;
64
+ /**
65
+ * The subset of `AgentCoreSessionOptions` the gate helpers touch. Kept as an alias of the
66
+ * real type so call sites get correct contextual typing (no literal widening) and every
67
+ * tool-executing `createAgentCoreSession` construction can route through one funnel.
68
+ */
69
+ export type PolicyGatedSessionOptions = AgentCoreSessionOptions;
70
+ /**
71
+ * CENTRALIZED session-gate attachment (§9.4 / AC-49). EVERY tool-executing
72
+ * `createAgentCoreSession` construction MUST route its options through this helper so no
73
+ * site can silently omit the load-bearing `policyToolGate`. It resolves the run's gate for
74
+ * the session's workspace (memoized) and attaches `policyToolGate` when enforcement is
75
+ * active; when the config anchor is not pinned the options are returned unchanged
76
+ * (back-compat). Idempotent — re-applying to already-gated options is a no-op.
77
+ *
78
+ * `workspaceOverride` lets a caller pin the run's workspace when the session options carry
79
+ * a different/absent `workspace` (e.g. worker sessions whose workspace is the run root).
80
+ */
81
+ export declare function withPolicyGate(options: AgentCoreSessionOptions, workspaceOverride?: string, resolveAuthorization?: AuthorizationResolver): Promise<AgentCoreSessionOptions>;
82
+ /**
83
+ * Synchronous applier for a PRE-RESOLVED gate. Sites that construct sessions inside a
84
+ * synchronous factory (e.g. the retry `piSessionFactory`) resolve the run's gate once
85
+ * (async) up front, then apply it synchronously to every session they build so no
86
+ * tool-executing session omits the gate. Idempotent.
87
+ */
88
+ export declare function applyPolicyGateSync(options: AgentCoreSessionOptions, policyToolGate: SessionToolGate | undefined): AgentCoreSessionOptions;
89
+ export {};
90
+ //# sourceMappingURL=policy-enforcement-wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-enforcement-wiring.d.ts","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cAAc,CAAC,CAkEzB;AAED,yFAAyF;AACzF,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,uBAAuB,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,uBAAuB,EAChC,iBAAiB,CAAC,EAAE,MAAM,EAC1B,oBAAoB,CAAC,EAAE,qBAAqB,GAC3C,OAAO,CAAC,uBAAuB,CAAC,CAMlC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,uBAAuB,EAChC,cAAc,EAAE,eAAe,GAAG,SAAS,GAC1C,uBAAuB,CAIzB"}
@@ -0,0 +1,185 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.registerRunAuthorizationResolver = registerRunAuthorizationResolver;
37
+ exports.unregisterRunAuthorizationResolver = unregisterRunAuthorizationResolver;
38
+ exports.resolveRunPolicyGates = resolveRunPolicyGates;
39
+ exports.__resetRunPolicyGatesCache = __resetRunPolicyGatesCache;
40
+ exports.withPolicyGate = withPolicyGate;
41
+ exports.applyPolicyGateSync = applyPolicyGateSync;
42
+ const cache = new Map();
43
+ /**
44
+ * Milestone E — the run's authorization store resolver, registered per workspace (the ALLOW
45
+ * path, §5 / AC-9 / AC-49). The orchestrator creates a run-level `AuthorizationStore` (from
46
+ * `@a5c-ai/policy-adapter`), populates it when a policy is satisfied from the run's trusted
47
+ * artifacts, and registers its `resolver` here keyed by workspace. `resolveRunPolicyGates`
48
+ * then threads that resolver into `loadPolicyEnforcementGate` so a legitimately-authorized
49
+ * covered action is ALLOWED — WITHOUT every session/spawn call site having to pass the
50
+ * resolver explicitly. With no store registered (or one that resolves none), a covered action
51
+ * DENIES (unchanged fail-closed Milestone-D posture). A resolver registered for a workspace
52
+ * MUST be re-applied to that workspace's cached gate, so registration clears the memo.
53
+ */
54
+ const authResolverByWorkspace = new Map();
55
+ /**
56
+ * Register the run's authorization-store resolver for a workspace so the load-bearing gates
57
+ * can ALLOW a legitimately-authorized covered action (AC-9 / AC-49). Clears the per-workspace
58
+ * gate memo so the next `resolveRunPolicyGates` rebuilds the gate WITH the resolver threaded.
59
+ */
60
+ function registerRunAuthorizationResolver(workspace, resolveAuthorization) {
61
+ const key = workspace ?? '';
62
+ authResolverByWorkspace.set(key, resolveAuthorization);
63
+ // The gate is memoized per workspace; a newly-registered resolver must take effect, so drop
64
+ // the cached (resolver-less) gate for this workspace.
65
+ cache.delete(key);
66
+ }
67
+ /** Test-only / end-of-run: drop the registered resolver for a workspace. */
68
+ function unregisterRunAuthorizationResolver(workspace) {
69
+ const key = workspace ?? '';
70
+ authResolverByWorkspace.delete(key);
71
+ cache.delete(key);
72
+ }
73
+ /**
74
+ * Build a DENY-ALL pair of gates. Used only when the config anchor is pinned (enforcement
75
+ * requested) but the policy adapter could not be loaded / reported inactive — a state that
76
+ * MUST fail closed rather than silently disable enforcement. Both gates deny every call so
77
+ * no covered action can slip through an unloadable adapter. Mirrors the adapter-side
78
+ * `makeConfigErrorEvaluator` posture (a config/adapter error denies).
79
+ */
80
+ function denyAllGates(reason) {
81
+ const deny = () => ({ allowed: false, reason: `policy enforcement unavailable (fail closed): ${reason}` });
82
+ return { policyToolGate: deny, mcpPolicyGate: deny };
83
+ }
84
+ /**
85
+ * Resolve the run's policy gates for a workspace. Memoized per workspace. The optional
86
+ * `resolveAuthorization` is the run's authorization store (the orchestrator issues a
87
+ * CommandAuthorization when evidence is present; with no store a covered action DENIES).
88
+ */
89
+ function resolveRunPolicyGates(workspace, resolveAuthorization) {
90
+ const key = workspace ?? '';
91
+ const existing = cache.get(key);
92
+ if (existing)
93
+ return existing;
94
+ // ALLOW path (AC-9 / AC-49): if the caller did not pass a resolver explicitly, fall back to
95
+ // the run's registered authorization-store resolver for this workspace (registered by the
96
+ // orchestrator). This threads the ALLOW path into EVERY session/spawn call site without each
97
+ // one passing the resolver. With no registered resolver, `undefined` ⇒ deny (fail closed).
98
+ const effectiveResolveAuthorization = resolveAuthorization ?? authResolverByWorkspace.get(key);
99
+ // Whether the off-workspace config anchor is pinned. When it IS pinned, enforcement is
100
+ // meant to be active and ANY failure to load the adapter is fail-closed (deny-all covered
101
+ // actions), NEVER a silent disable. When it is NOT pinned, we are in the documented
102
+ // back-compat posture and the absence of a gate leaves the run unchanged.
103
+ const anchorPinned = typeof process.env.POLICY_CONFIG_ROOT_FP === 'string'
104
+ && process.env.POLICY_CONFIG_ROOT_FP.length > 0;
105
+ // Fast path (back-compat): with NO anchor pinned, enforcement is inactive by design. Skip
106
+ // the dynamic policy-adapter import entirely — no gate is constructed and the run paths are
107
+ // unchanged. This keeps the un-enforced default free of any adapter load cost. (The adapter
108
+ // itself returns `enforcementActive: false` in this case; short-circuiting here is a pure
109
+ // optimization that does not change the fail-closed semantics — those apply only when the
110
+ // anchor IS pinned, handled below.)
111
+ if (!anchorPinned) {
112
+ const empty = Promise.resolve({});
113
+ cache.set(key, empty);
114
+ return empty;
115
+ }
116
+ const built = (async () => {
117
+ try {
118
+ // Dynamic import keeps the policy-adapter (ESM) out of any CJS build graph, matching
119
+ // the SDK's proven-verification.ts / trusted-breakpoint-policy.ts pattern.
120
+ const mod = await Promise.resolve().then(() => __importStar(require('@a5c-ai/policy-adapter')));
121
+ const result = await mod.loadPolicyEnforcementGate(workspace ?? process.cwd(), effectiveResolveAuthorization);
122
+ if (result.enforcementActive !== true) {
123
+ // Adapter reports inactive. If the anchor is pinned this is a contradiction (the
124
+ // adapter fails closed when pinned), so install a deny-all gate; otherwise no gate.
125
+ if (anchorPinned) {
126
+ return denyAllGates('policy adapter reported enforcement inactive while anchor is pinned');
127
+ }
128
+ return {};
129
+ }
130
+ const gate = result;
131
+ return {
132
+ policyToolGate: gate.policyToolGate,
133
+ mcpPolicyGate: gate.mcpPolicyGate,
134
+ };
135
+ }
136
+ catch (err) {
137
+ // The policy-adapter failing to LOAD is NOT a silent pass when the anchor is pinned:
138
+ // enforcement was requested, so we cannot silently disable it. Install a deny-all gate
139
+ // for covered actions (fail closed). Only when the anchor is UNPINNED (back-compat) do
140
+ // we return no gate — enforcement was never requested.
141
+ if (anchorPinned) {
142
+ return denyAllGates(`policy adapter failed to load while anchor is pinned: ${err?.message ?? String(err)}`);
143
+ }
144
+ return {};
145
+ }
146
+ })();
147
+ cache.set(key, built);
148
+ return built;
149
+ }
150
+ /** Test-only: clear the per-workspace memo so a test can re-resolve with a fresh env. */
151
+ function __resetRunPolicyGatesCache() {
152
+ cache.clear();
153
+ }
154
+ /**
155
+ * CENTRALIZED session-gate attachment (§9.4 / AC-49). EVERY tool-executing
156
+ * `createAgentCoreSession` construction MUST route its options through this helper so no
157
+ * site can silently omit the load-bearing `policyToolGate`. It resolves the run's gate for
158
+ * the session's workspace (memoized) and attaches `policyToolGate` when enforcement is
159
+ * active; when the config anchor is not pinned the options are returned unchanged
160
+ * (back-compat). Idempotent — re-applying to already-gated options is a no-op.
161
+ *
162
+ * `workspaceOverride` lets a caller pin the run's workspace when the session options carry
163
+ * a different/absent `workspace` (e.g. worker sessions whose workspace is the run root).
164
+ */
165
+ async function withPolicyGate(options, workspaceOverride, resolveAuthorization) {
166
+ // Already gated (e.g. the orchestrator session set it explicitly) — do not re-resolve.
167
+ if (options.policyToolGate)
168
+ return options;
169
+ const workspace = workspaceOverride ?? options.workspace;
170
+ const { policyToolGate } = await resolveRunPolicyGates(workspace, resolveAuthorization);
171
+ return applyPolicyGateSync(options, policyToolGate);
172
+ }
173
+ /**
174
+ * Synchronous applier for a PRE-RESOLVED gate. Sites that construct sessions inside a
175
+ * synchronous factory (e.g. the retry `piSessionFactory`) resolve the run's gate once
176
+ * (async) up front, then apply it synchronously to every session they build so no
177
+ * tool-executing session omits the gate. Idempotent.
178
+ */
179
+ function applyPolicyGateSync(options, policyToolGate) {
180
+ if (options.policyToolGate)
181
+ return options;
182
+ if (!policyToolGate)
183
+ return options;
184
+ return { ...options, policyToolGate };
185
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/delegation.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,UAAU,CAAC;AAgElB,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACjD,aAAa,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC;IAClE,WAAW,CAAC,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;CACxD,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAsFD;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB/D"}
1
+ {"version":3,"file":"delegation.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/delegation.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,UAAU,CAAC;AAiElB,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IACjD,aAAa,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC;IAClE,WAAW,CAAC,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;CACxD,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAwFD;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyB/D"}
@@ -42,6 +42,7 @@ const genty_core_1 = require("@a5c-ai/genty-core");
42
42
  const invoker_1 = require("../../../invoker");
43
43
  const utils_1 = require("../utils");
44
44
  const builtInHarness_1 = require("../../../builtInHarness");
45
+ const policy_enforcement_wiring_1 = require("../orchestration/policy-enforcement-wiring");
45
46
  function resolveSkillFileCandidates(workspace, skillRef) {
46
47
  const trimmed = skillRef.trim();
47
48
  if (!trimmed) {
@@ -125,7 +126,9 @@ async function runDelegatedHarnessTask(args) {
125
126
  ...(0, genty_core_1.createCodingToolDefinitions)({ workspace, interactive: false }, effectiveToolsMode === "readonly" ? "readonly" : "coding"),
126
127
  ...(args.customTools ?? []),
127
128
  ];
128
- const session = (0, utils_1.createAgentCoreSession)({
129
+ // §9.4 / AC-49 — the delegated worker executes coding tools, so it MUST carry the
130
+ // load-bearing policy tool gate (unpinned anchor → undefined, path unchanged).
131
+ const session = (0, utils_1.createAgentCoreSession)(await (0, policy_enforcement_wiring_1.withPolicyGate)({
129
132
  workspace,
130
133
  model: args.model,
131
134
  timeout: args.timeout,
@@ -148,7 +151,7 @@ async function runDelegatedHarnessTask(args) {
148
151
  ? { thinkingLevel: args.thinkingLevel }
149
152
  : {}),
150
153
  ...(skillInstructions.length > 0 ? { appendSystemPrompt: [skillInstructions.join("\n\n---\n\n")] } : {}),
151
- });
154
+ }, workspace));
152
155
  try {
153
156
  await session.initialize();
154
157
  const result = await (0, utils_1.promptPiWithRetry)({
@@ -1 +1 @@
1
- {"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/phase.ts"],"names":[],"mappings":"AAQA,OAAO,EAaL,KAAK,uBAAuB,EAG7B,MAAM,UAAU,CAAC;AAqBlB,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,OAAO,cAAc,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAiZhI;AAED,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,4BAAsB,CAAC"}
1
+ {"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../../../../../src/harness/internal/createRun/planProcess/phase.ts"],"names":[],"mappings":"AAQA,OAAO,EAaL,KAAK,uBAAuB,EAG7B,MAAM,UAAU,CAAC;AAsBlB,YAAY,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,OAAO,cAAc,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAmZhI;AAED,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,4BAAsB,CAAC"}
@@ -46,6 +46,7 @@ const phaseHelpers_1 = require("./phaseHelpers");
46
46
  const runState_1 = require("./runState");
47
47
  const understandIntent_1 = require("./understandIntent");
48
48
  const validation_1 = require("./validation");
49
+ const policy_enforcement_wiring_1 = require("../orchestration/policy-enforcement-wiring");
49
50
  async function runPlanProcessPhase(args) {
50
51
  const state = {};
51
52
  const phaseOutputs = [];
@@ -117,7 +118,9 @@ async function runPlanProcessPhase(args) {
117
118
  const planProcessToolsMode = workspaceAssessment.kind === "empty"
118
119
  ? "default"
119
120
  : "coding";
120
- sessionRef.current = (0, utils_1.createAgentCoreSession)({
121
+ // §9.4 / AC-49 — the plan-process session executes file/bash tools, so it MUST carry the
122
+ // load-bearing policy tool gate (unpinned anchor → undefined, path unchanged).
123
+ sessionRef.current = (0, utils_1.createAgentCoreSession)(await (0, policy_enforcement_wiring_1.withPolicyGate)({
121
124
  workspace: args.workspace,
122
125
  model: args.model,
123
126
  backend: resolvedBackend,
@@ -128,7 +131,7 @@ async function runPlanProcessPhase(args) {
128
131
  systemPrompt: processDefinitionSystemPrompt,
129
132
  isolated: true,
130
133
  ephemeral: true,
131
- });
134
+ }, args.workspace));
132
135
  try {
133
136
  await sessionRef.current.initialize();
134
137
  let unsubscribe = null;
@@ -157,6 +157,22 @@ export interface AgentCoreSessionOptions {
157
157
  outputSchemaName?: string;
158
158
  /** Provider strictness flag for APIs that support schema strictness. */
159
159
  outputSchemaStrict?: boolean;
160
+ /**
161
+ * Milestone D (§9.4 / AC-49) — the LOAD-BEARING genty session tool-execution gate. When
162
+ * present it is consulted BEFORE `definition.execute` for each tool call; a covered action
163
+ * without a valid CommandAuthorization is denied before execution. Populated by the
164
+ * centralized `withPolicyGate` / `applyPolicyGateSync` wiring; undefined when the config
165
+ * anchor is not pinned (path unchanged).
166
+ */
167
+ policyToolGate?: (context: {
168
+ toolName: string;
169
+ toolCallId: string;
170
+ input: unknown;
171
+ modelId?: string;
172
+ }) => {
173
+ allowed: boolean;
174
+ reason?: string;
175
+ };
160
176
  }
161
177
  /**
162
178
  * Event emitted by an agent-core session during prompt execution.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EA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,CAAC;CAChF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a5c-ai/genty-platform",
3
- "version": "6.0.2",
3
+ "version": "6.0.3-staging.032e07a1ffa0",
4
4
  "description": "Agent Platform layer — harness integration, governance, interaction, storage",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -124,13 +124,14 @@
124
124
  "test:seams": "vitest run --config vitest.config.ts src/seams/contract.test.ts"
125
125
  },
126
126
  "dependencies": {
127
- "@a5c-ai/adapters": "6.0.2",
128
- "@a5c-ai/babysitter-sdk": "6.0.2",
129
- "@a5c-ai/comm-adapter": "6.0.2",
130
- "@a5c-ai/genty-core": "6.0.2",
131
- "@a5c-ai/genty-runtime": "6.0.2",
132
- "@a5c-ai/tasks-adapter": "6.0.2",
133
- "@a5c-ai/tools-adapter": "6.0.2",
127
+ "@a5c-ai/adapters": "6.0.3-staging.032e07a1ffa0",
128
+ "@a5c-ai/babysitter-sdk": "6.0.3-staging.032e07a1ffa0",
129
+ "@a5c-ai/comm-adapter": "6.0.3-staging.032e07a1ffa0",
130
+ "@a5c-ai/genty-core": "6.0.3-staging.032e07a1ffa0",
131
+ "@a5c-ai/genty-runtime": "6.0.3-staging.032e07a1ffa0",
132
+ "@a5c-ai/policy-adapter": "6.0.3-staging.032e07a1ffa0",
133
+ "@a5c-ai/tasks-adapter": "6.0.3-staging.032e07a1ffa0",
134
+ "@a5c-ai/tools-adapter": "6.0.3-staging.032e07a1ffa0",
134
135
  "@agentsh/secure-sandbox": "^0.1.7",
135
136
  "@modelcontextprotocol/sdk": "^1.12.1",
136
137
  "@sinclair/typebox": "^0.34.48",