@hey-hey/cli 3.0.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +308 -193
  2. package/package.json +2 -3
package/dist/index.js CHANGED
@@ -403,7 +403,7 @@ var require_cli_options = __commonJS({
403
403
  var version;
404
404
  var init_package = __esm({
405
405
  "package.json"() {
406
- version = "3.0.2";
406
+ version = "3.1.0";
407
407
  }
408
408
  });
409
409
 
@@ -1382,7 +1382,7 @@ search_implementation_hints({
1382
1382
  \`\`\`
1383
1383
 
1384
1384
  If a hint contradicts what you observe in the code, trust the code and update or delete the hint \u2014 hints can go stale.`;
1385
- ephemeralAgentIterationGuidance = `When updating or iterating on existing work, remember that agents are ephemeral and do not share an ongoing dialogue with prior iterations; avoid telling an agent not to do something it could not otherwise know about, because that context only creates confusion.`;
1385
+ ephemeralAgentIterationGuidance = `When updating or iterating on existing work, remember that agents are ephemeral and do not share an ongoing dialogue with prior iterations; avoid telling an agent not to do something it could not otherwise know about, because that context only creates confusion. Because future agents do not inherit the current conversation, preserve its material conclusions in authored entities.`;
1386
1386
  deferredMcpTools = `## Deferred MCP Tools Are Not Disconnected
1387
1387
 
1388
1388
  MCP tools listed as "deferred" or behind "still connecting" reminders are not disconnected \u2014 they are lazy-loaded via \`ToolSearch\`. The platform MCP server is connected; the tool schemas just have not been fetched yet.
@@ -32734,7 +32734,7 @@ var init_api2 = __esm({
32734
32734
  MachinesApiAxiosParamCreator = function(configuration) {
32735
32735
  return {
32736
32736
  /**
32737
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
32737
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
32738
32738
  * @summary Abandon a machine enrollment claim
32739
32739
  * @param {AbandonMachineEnrollmentClaimRequestDto} abandonMachineEnrollmentClaimRequestDto
32740
32740
  * @param {*} [options] Override http request option.
@@ -32763,7 +32763,7 @@ var init_api2 = __esm({
32763
32763
  };
32764
32764
  },
32765
32765
  /**
32766
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
32766
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
32767
32767
  * @summary Begin a machine enrollment claim
32768
32768
  * @param {BeginMachineEnrollmentClaimRequestDto} beginMachineEnrollmentClaimRequestDto
32769
32769
  * @param {*} [options] Override http request option.
@@ -32792,7 +32792,7 @@ var init_api2 = __esm({
32792
32792
  };
32793
32793
  },
32794
32794
  /**
32795
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
32795
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
32796
32796
  * @summary Complete a machine enrollment claim
32797
32797
  * @param {CompleteMachineEnrollmentClaimRequestDto} completeMachineEnrollmentClaimRequestDto
32798
32798
  * @param {*} [options] Override http request option.
@@ -33049,13 +33049,12 @@ var init_api2 = __esm({
33049
33049
  };
33050
33050
  },
33051
33051
  /**
33052
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
33052
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
33053
33053
  * @summary List paired machines
33054
- * @param {string} [controllerInstallationId] Optional stable identifier for the passkey-prompting browser installation. When supplied, the API resolves an enrolled controller binding for each machine; the identifier alone grants no authority. Non-browser inventory callers omit it.
33055
33054
  * @param {*} [options] Override http request option.
33056
33055
  * @throws {RequiredError}
33057
33056
  */
33058
- listMachines: async (controllerInstallationId, options = {}) => {
33057
+ listMachines: async (options = {}) => {
33059
33058
  const localVarPath = `/machines`;
33060
33059
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
33061
33060
  let baseOptions;
@@ -33066,9 +33065,6 @@ var init_api2 = __esm({
33066
33065
  const localVarHeaderParameter = {};
33067
33066
  const localVarQueryParameter = {};
33068
33067
  await setBearerAuthToObject(localVarHeaderParameter, configuration);
33069
- if (controllerInstallationId !== void 0) {
33070
- localVarQueryParameter["controllerInstallationId"] = controllerInstallationId;
33071
- }
33072
33068
  setSearchParams(localVarUrlObj, localVarQueryParameter);
33073
33069
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
33074
33070
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -33352,7 +33348,7 @@ var init_api2 = __esm({
33352
33348
  const localVarAxiosParamCreator = MachinesApiAxiosParamCreator(configuration);
33353
33349
  return {
33354
33350
  /**
33355
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33351
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
33356
33352
  * @summary Abandon a machine enrollment claim
33357
33353
  * @param {AbandonMachineEnrollmentClaimRequestDto} abandonMachineEnrollmentClaimRequestDto
33358
33354
  * @param {*} [options] Override http request option.
@@ -33365,7 +33361,7 @@ var init_api2 = __esm({
33365
33361
  return (axios3, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios3, localVarOperationServerBasePath || basePath);
33366
33362
  },
33367
33363
  /**
33368
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33364
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
33369
33365
  * @summary Begin a machine enrollment claim
33370
33366
  * @param {BeginMachineEnrollmentClaimRequestDto} beginMachineEnrollmentClaimRequestDto
33371
33367
  * @param {*} [options] Override http request option.
@@ -33378,7 +33374,7 @@ var init_api2 = __esm({
33378
33374
  return (axios3, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios3, localVarOperationServerBasePath || basePath);
33379
33375
  },
33380
33376
  /**
33381
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33377
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
33382
33378
  * @summary Complete a machine enrollment claim
33383
33379
  * @param {CompleteMachineEnrollmentClaimRequestDto} completeMachineEnrollmentClaimRequestDto
33384
33380
  * @param {*} [options] Override http request option.
@@ -33499,14 +33495,13 @@ var init_api2 = __esm({
33499
33495
  return (axios3, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios3, localVarOperationServerBasePath || basePath);
33500
33496
  },
33501
33497
  /**
33502
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
33498
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
33503
33499
  * @summary List paired machines
33504
- * @param {string} [controllerInstallationId] Optional stable identifier for the passkey-prompting browser installation. When supplied, the API resolves an enrolled controller binding for each machine; the identifier alone grants no authority. Non-browser inventory callers omit it.
33505
33500
  * @param {*} [options] Override http request option.
33506
33501
  * @throws {RequiredError}
33507
33502
  */
33508
- async listMachines(controllerInstallationId, options) {
33509
- const localVarAxiosArgs = await localVarAxiosParamCreator.listMachines(controllerInstallationId, options);
33503
+ async listMachines(options) {
33504
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMachines(options);
33510
33505
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
33511
33506
  const localVarOperationServerBasePath = operationServerMap["MachinesApi.listMachines"]?.[localVarOperationServerIndex]?.url;
33512
33507
  return (axios3, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios3, localVarOperationServerBasePath || basePath);
@@ -33640,7 +33635,7 @@ var init_api2 = __esm({
33640
33635
  };
33641
33636
  MachinesApi = class extends BaseAPI {
33642
33637
  /**
33643
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33638
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
33644
33639
  * @summary Abandon a machine enrollment claim
33645
33640
  * @param {MachinesApiAbandonMachineEnrollmentClaimRequest} requestParameters Request parameters.
33646
33641
  * @param {*} [options] Override http request option.
@@ -33651,7 +33646,7 @@ var init_api2 = __esm({
33651
33646
  return MachinesApiFp(this.configuration).abandonMachineEnrollmentClaim(requestParameters.abandonMachineEnrollmentClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
33652
33647
  }
33653
33648
  /**
33654
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33649
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
33655
33650
  * @summary Begin a machine enrollment claim
33656
33651
  * @param {MachinesApiBeginMachineEnrollmentClaimRequest} requestParameters Request parameters.
33657
33652
  * @param {*} [options] Override http request option.
@@ -33662,7 +33657,7 @@ var init_api2 = __esm({
33662
33657
  return MachinesApiFp(this.configuration).beginMachineEnrollmentClaim(requestParameters.beginMachineEnrollmentClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
33663
33658
  }
33664
33659
  /**
33665
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
33660
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
33666
33661
  * @summary Complete a machine enrollment claim
33667
33662
  * @param {MachinesApiCompleteMachineEnrollmentClaimRequest} requestParameters Request parameters.
33668
33663
  * @param {*} [options] Override http request option.
@@ -33762,15 +33757,14 @@ var init_api2 = __esm({
33762
33757
  return MachinesApiFp(this.configuration).listMachineSecurityEvents(requestParameters.machineId, options).then((request) => request(this.axios, this.basePath));
33763
33758
  }
33764
33759
  /**
33765
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
33760
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
33766
33761
  * @summary List paired machines
33767
- * @param {MachinesApiListMachinesRequest} requestParameters Request parameters.
33768
33762
  * @param {*} [options] Override http request option.
33769
33763
  * @throws {RequiredError}
33770
33764
  * @memberof MachinesApi
33771
33765
  */
33772
- listMachines(requestParameters = {}, options) {
33773
- return MachinesApiFp(this.configuration).listMachines(requestParameters.controllerInstallationId, options).then((request) => request(this.axios, this.basePath));
33766
+ listMachines(options) {
33767
+ return MachinesApiFp(this.configuration).listMachines(options).then((request) => request(this.axios, this.basePath));
33774
33768
  }
33775
33769
  /**
33776
33770
  * Acknowledged pre-flight liveness check. Emits a lightweight `machine.ping` frame over the authenticated WebSocket to the machine and awaits a socket acknowledgement within a short timeout. Unlike `MachineDto.active` (a heartbeat-maintained Redis presence flag, up to ~90s stale) this performs an actual round-trip, confirming the CLI will respond *right now*. Intended to gate submit actions on press so an unreachable machine surfaces an actionable error before any navigation, rather than as a later failed dispatch. Always responds 200 with `{ acknowledged }`; a machine that is not connected or does not ack within the timeout yields `acknowledged: false` rather than an error status, leaving the UX decision to the caller. The machine must belong to the authenticated user and not be revoked.
@@ -39404,6 +39398,24 @@ var init_create_commit_report_tool = __esm({
39404
39398
  const summary = summaryRaw;
39405
39399
  const files = Array.isArray(filesRaw) ? filesRaw : [];
39406
39400
  const hashes = Array.isArray(hashesRaw) ? hashesRaw : [];
39401
+ const entities = run2.taskId ? [
39402
+ {
39403
+ entityType: "TASK",
39404
+ entityId: run2.taskId,
39405
+ relation: "PRIMARY"
39406
+ }
39407
+ ] : [
39408
+ {
39409
+ entityType: "AGENT_SESSION",
39410
+ entityId: run2.runId,
39411
+ relation: "PRIMARY"
39412
+ },
39413
+ ...hashes.map(({ service }) => ({
39414
+ entityType: "SERVICE",
39415
+ entityId: service,
39416
+ relation: "CONTEXT"
39417
+ }))
39418
+ ];
39407
39419
  const platformArgs = {
39408
39420
  reportType: "COMMIT",
39409
39421
  audience: "PROJECT_VISIBLE",
@@ -39412,7 +39424,8 @@ var init_create_commit_report_tool = __esm({
39412
39424
  summary,
39413
39425
  files,
39414
39426
  hashes
39415
- }
39427
+ },
39428
+ entities
39416
39429
  };
39417
39430
  const proxyResult = await this.proxy.create({
39418
39431
  runId: ctx.runId,
@@ -39941,7 +39954,7 @@ var init_file_change_facts = __esm({
39941
39954
  });
39942
39955
 
39943
39956
  // src/agents/commit/commit-executor.ts
39944
- var import_node_child_process3, import_node_path3, import_node_util2, execFileAsync2, MAX_GIT_BUFFER, git, runGitOperation, readCommittedFiles, getServiceWorkspaces, buildScopes, validateTraceability, executeValidatedCommit, executeCanonicalCommit;
39957
+ var import_node_child_process3, import_node_path3, import_node_util2, execFileAsync2, MAX_GIT_BUFFER, git, runGitOperation, readCommittedFiles, getServiceWorkspaces, buildScopes, deriveCommitTraceability, buildCommitTrailers, executeValidatedCommit, executeCanonicalCommit;
39945
39958
  var init_commit_executor = __esm({
39946
39959
  "src/agents/commit/commit-executor.ts"() {
39947
39960
  "use strict";
@@ -40103,20 +40116,40 @@ var init_commit_executor = __esm({
40103
40116
  });
40104
40117
  return resolvedScopes;
40105
40118
  };
40106
- validateTraceability = (run2, payload) => {
40107
- if (!run2.taskId) {
40108
- throw new Error("Commit validation failed: the active Run has no task identifier.");
40109
- }
40110
- if (payload.taskId && payload.taskId !== run2.taskId) {
40111
- throw new Error("Commit validation failed: caller task identifier disagrees with Run context.");
40112
- }
40119
+ deriveCommitTraceability = (run2, payload) => {
40113
40120
  if (payload.codingSessionId && payload.codingSessionId !== run2.runId) {
40114
40121
  throw new Error(
40115
40122
  "Commit validation failed: caller coding-session identifier disagrees with Run context."
40116
40123
  );
40117
40124
  }
40118
- return run2.taskId;
40125
+ if (run2.taskId) {
40126
+ if (payload.taskId && payload.taskId !== run2.taskId) {
40127
+ throw new Error(
40128
+ "Commit validation failed: caller task identifier disagrees with Run context."
40129
+ );
40130
+ }
40131
+ return { kind: "task", taskId: run2.taskId, runId: run2.runId };
40132
+ }
40133
+ if (payload.taskId) {
40134
+ throw new Error(
40135
+ "Commit validation failed: taskless Run cannot accept caller task traceability."
40136
+ );
40137
+ }
40138
+ const serviceIds = [...new Set(run2.session.services.map(({ id }) => id))].sort();
40139
+ const subject = run2.entity;
40140
+ if (subject?.entityType !== "SERVICE" || !serviceIds.includes(subject.entityId) || !run2.session.launchServiceId || !serviceIds.includes(run2.session.launchServiceId)) {
40141
+ throw new Error(
40142
+ "Commit validation failed: the taskless Run has no valid Service execution scope."
40143
+ );
40144
+ }
40145
+ return { kind: "service", runId: run2.runId, serviceIds };
40119
40146
  };
40147
+ buildCommitTrailers = (traceability, serviceId, planId) => [
40148
+ ...traceability.kind === "task" ? [`Task-Id: ${traceability.taskId}`] : [],
40149
+ ...planId ? [`Plan-Id: ${planId}`] : [],
40150
+ `Coding-Session-Id: ${traceability.runId}`,
40151
+ ...traceability.kind === "service" ? [`Service-Id: ${serviceId}`] : []
40152
+ ];
40120
40153
  executeValidatedCommit = async (input) => {
40121
40154
  const { run: run2, payload, liveFiles, message, commitReportTool, logger } = input;
40122
40155
  logger.debug("local.commit_runtime.validation_started", {
@@ -40129,7 +40162,12 @@ var init_commit_executor = __esm({
40129
40162
  "Commit validation failed: commit agent did not submit a typed message result."
40130
40163
  );
40131
40164
  }
40132
- const taskId = validateTraceability(run2, payload);
40165
+ const traceability = deriveCommitTraceability(run2, payload);
40166
+ logger.debug("local.commit_runtime.traceability_derived", {
40167
+ runId: run2.runId,
40168
+ traceabilityKind: traceability.kind,
40169
+ ...traceability.kind === "task" ? { taskId: traceability.taskId } : { serviceIds: traceability.serviceIds }
40170
+ });
40133
40171
  const scopes = buildScopes(run2, liveFiles, logger);
40134
40172
  if (scopes.length === 0) {
40135
40173
  throw new Error("Commit validation failed: no uncommitted canonical Run files remain.");
@@ -40138,11 +40176,10 @@ var init_commit_executor = __esm({
40138
40176
  runId: run2.runId,
40139
40177
  services: scopes.map((scope) => ({ serviceId: scope.serviceId, files: scope.files }))
40140
40178
  });
40141
- const trailers = [`Task-Id: ${taskId}`, `Coding-Session-Id: ${run2.runId}`];
40142
40179
  const planId = run2.session.contextMetadata.launchPlanId;
40143
- if (planId) trailers.splice(1, 0, `Plan-Id: ${planId}`);
40144
40180
  const commits = [];
40145
40181
  for (const scope of scopes) {
40182
+ const trailers = buildCommitTrailers(traceability, scope.serviceId, planId);
40146
40183
  logger.info("local.commit_runtime.staging_started", {
40147
40184
  runId: run2.runId,
40148
40185
  serviceId: scope.serviceId,
@@ -40229,7 +40266,7 @@ var init_commit_message_result = __esm({
40229
40266
  "use strict";
40230
40267
  init_zod();
40231
40268
  commitMessageSchema = external_exports.string().trim().min(1).max(72).refine((message) => !message.includes("\n"), "Commit message must be a single line").refine(
40232
- (message) => !/^(Task-Id|Plan-Id|Coding-Session-Id):/imu.test(message),
40269
+ (message) => !/^(Task-Id|Plan-Id|Coding-Session-Id|Service-Id):/imu.test(message),
40233
40270
  "Commit message must not contain runtime-owned trailers"
40234
40271
  );
40235
40272
  CommitMessageResultStore = class {
@@ -67031,7 +67068,7 @@ var init_axios4 = __esm({
67031
67068
  }
67032
67069
  });
67033
67070
 
67034
- // ../ui-common/dist/chunk-T6JACYZU.mjs
67071
+ // ../ui-common/dist/chunk-Y256XDSH.mjs
67035
67072
  function setFlattenedQueryParams2(urlSearchParams, parameter, key = "") {
67036
67073
  if (parameter == null) return;
67037
67074
  if (typeof parameter === "object") {
@@ -67051,8 +67088,8 @@ function setFlattenedQueryParams2(urlSearchParams, parameter, key = "") {
67051
67088
  }
67052
67089
  }
67053
67090
  var BASE_PATH2, COLLECTION_FORMATS2, BaseAPI2, RequiredError3, operationServerMap2, DUMMY_BASE_URL2, assertParamExists2, setBearerAuthToObject2, setSearchParams2, serializeDataIfNeeded2, toPathString2, createRequestFunction2, ConversationStartRunRequestDtoProviderEnum2, CreateImplementationHintDtoSourceTypeEnum, DesignDocSectionUpdateSource, EvidenceItemTypeEnum2, EvidenceItemSourceEnum, LocalPromptType2, RunEntityReferenceEntityTypeEnum2, TaskSectionUpdateSource2, WorkStatus2, WorkflowName2, ActivityCorrelationApiAxiosParamCreator, ActivityCorrelationApiFp, ActivityCorrelationApi, AgentEdgesApiAxiosParamCreator, AgentEdgesApiFp, AgentEdgesApi, AgentSessionsApiAxiosParamCreator2, AgentSessionsApiFp2, AgentSessionsApi, AnalyticsApiAxiosParamCreator, AnalyticsApiFp, AnalyticsApi, ControllerAuthorizationApiAxiosParamCreator, ControllerAuthorizationApiFp, ControllerAuthorizationApi, DebugAdminApiAxiosParamCreator, DebugAdminApiFp, DebugAdminApi, DefaultApiAxiosParamCreator2, DefaultApiFp2, DefaultApi2, DesignDocsApiAxiosParamCreator, DesignDocsApiFp, DesignDocsApi, EntitiesApiAxiosParamCreator, EntitiesApiFp, EntitiesApi, EntityContextApiAxiosParamCreator, EntityContextApiFp, EntityContextApi, HelpApiAxiosParamCreator, HelpApiFp, HelpApi, MachinesApiAxiosParamCreator2, MachinesApiFp2, MachinesApi2, NotificationsApiAxiosParamCreator, NotificationsApiFp, NotificationsApi, PlansApiAxiosParamCreator, PlansApiFp, PlansApi, PrivateBetaAccessApiAxiosParamCreator, PrivateBetaAccessApiFp, PrivateBetaAccessApi, ProjectsApiAxiosParamCreator, ProjectsApiFp, ProjectsApi, ProposalsApiAxiosParamCreator, ProposalsApiFp, ProposalsApi, ReportBugsApiAxiosParamCreator, ReportBugsApiFp, ReportBugsApi, ReportsApiAxiosParamCreator, ReportsApiFp, ReportsApi, SecondaryActionsApiAxiosParamCreator, SecondaryActionsApiFp, SecondaryActionsApi, StagedContentApiAxiosParamCreator, StagedContentApiFp, StagedContentApi, SuggestionsApiAxiosParamCreator, SuggestionsApiFp, SuggestionsApi, TasksApiAxiosParamCreator, TasksApiFp, TasksApi, WorkItemRefinementApiAxiosParamCreator, WorkItemRefinementApiFp, WorkItemRefinementApi, WorkflowsApiAxiosParamCreator, WorkflowsApiFp, WorkflowsApi, Configuration2;
67054
- var init_chunk_T6JACYZU = __esm({
67055
- "../ui-common/dist/chunk-T6JACYZU.mjs"() {
67091
+ var init_chunk_Y256XDSH = __esm({
67092
+ "../ui-common/dist/chunk-Y256XDSH.mjs"() {
67056
67093
  "use strict";
67057
67094
  init_axios4();
67058
67095
  init_axios4();
@@ -83101,7 +83138,7 @@ var init_chunk_T6JACYZU = __esm({
83101
83138
  MachinesApiAxiosParamCreator2 = function(configuration) {
83102
83139
  return {
83103
83140
  /**
83104
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83141
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
83105
83142
  * @summary Abandon a machine enrollment claim
83106
83143
  * @param {AbandonMachineEnrollmentClaimRequestDto} abandonMachineEnrollmentClaimRequestDto
83107
83144
  * @param {*} [options] Override http request option.
@@ -83130,7 +83167,7 @@ var init_chunk_T6JACYZU = __esm({
83130
83167
  };
83131
83168
  },
83132
83169
  /**
83133
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83170
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
83134
83171
  * @summary Begin a machine enrollment claim
83135
83172
  * @param {BeginMachineEnrollmentClaimRequestDto} beginMachineEnrollmentClaimRequestDto
83136
83173
  * @param {*} [options] Override http request option.
@@ -83159,7 +83196,7 @@ var init_chunk_T6JACYZU = __esm({
83159
83196
  };
83160
83197
  },
83161
83198
  /**
83162
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83199
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
83163
83200
  * @summary Complete a machine enrollment claim
83164
83201
  * @param {CompleteMachineEnrollmentClaimRequestDto} completeMachineEnrollmentClaimRequestDto
83165
83202
  * @param {*} [options] Override http request option.
@@ -83416,13 +83453,12 @@ var init_chunk_T6JACYZU = __esm({
83416
83453
  };
83417
83454
  },
83418
83455
  /**
83419
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
83456
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
83420
83457
  * @summary List paired machines
83421
- * @param {string} [controllerInstallationId] Optional stable identifier for the passkey-prompting browser installation. When supplied, the API resolves an enrolled controller binding for each machine; the identifier alone grants no authority. Non-browser inventory callers omit it.
83422
83458
  * @param {*} [options] Override http request option.
83423
83459
  * @throws {RequiredError}
83424
83460
  */
83425
- listMachines: async (controllerInstallationId, options = {}) => {
83461
+ listMachines: async (options = {}) => {
83426
83462
  const localVarPath = `/machines`;
83427
83463
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL2);
83428
83464
  let baseOptions;
@@ -83433,9 +83469,6 @@ var init_chunk_T6JACYZU = __esm({
83433
83469
  const localVarHeaderParameter = {};
83434
83470
  const localVarQueryParameter = {};
83435
83471
  await setBearerAuthToObject2(localVarHeaderParameter, configuration);
83436
- if (controllerInstallationId !== void 0) {
83437
- localVarQueryParameter["controllerInstallationId"] = controllerInstallationId;
83438
- }
83439
83472
  setSearchParams2(localVarUrlObj, localVarQueryParameter);
83440
83473
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
83441
83474
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
@@ -83719,7 +83752,7 @@ var init_chunk_T6JACYZU = __esm({
83719
83752
  const localVarAxiosParamCreator = MachinesApiAxiosParamCreator2(configuration);
83720
83753
  return {
83721
83754
  /**
83722
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83755
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
83723
83756
  * @summary Abandon a machine enrollment claim
83724
83757
  * @param {AbandonMachineEnrollmentClaimRequestDto} abandonMachineEnrollmentClaimRequestDto
83725
83758
  * @param {*} [options] Override http request option.
@@ -83733,7 +83766,7 @@ var init_chunk_T6JACYZU = __esm({
83733
83766
  return (axios3, basePath) => createRequestFunction2(localVarAxiosArgs, axios_default2, BASE_PATH2, configuration)(axios3, localVarOperationServerBasePath || basePath);
83734
83767
  },
83735
83768
  /**
83736
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83769
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
83737
83770
  * @summary Begin a machine enrollment claim
83738
83771
  * @param {BeginMachineEnrollmentClaimRequestDto} beginMachineEnrollmentClaimRequestDto
83739
83772
  * @param {*} [options] Override http request option.
@@ -83747,7 +83780,7 @@ var init_chunk_T6JACYZU = __esm({
83747
83780
  return (axios3, basePath) => createRequestFunction2(localVarAxiosArgs, axios_default2, BASE_PATH2, configuration)(axios3, localVarOperationServerBasePath || basePath);
83748
83781
  },
83749
83782
  /**
83750
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
83783
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
83751
83784
  * @summary Complete a machine enrollment claim
83752
83785
  * @param {CompleteMachineEnrollmentClaimRequestDto} completeMachineEnrollmentClaimRequestDto
83753
83786
  * @param {*} [options] Override http request option.
@@ -83877,15 +83910,14 @@ var init_chunk_T6JACYZU = __esm({
83877
83910
  return (axios3, basePath) => createRequestFunction2(localVarAxiosArgs, axios_default2, BASE_PATH2, configuration)(axios3, localVarOperationServerBasePath || basePath);
83878
83911
  },
83879
83912
  /**
83880
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
83913
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
83881
83914
  * @summary List paired machines
83882
- * @param {string} [controllerInstallationId] Optional stable identifier for the passkey-prompting browser installation. When supplied, the API resolves an enrolled controller binding for each machine; the identifier alone grants no authority. Non-browser inventory callers omit it.
83883
83915
  * @param {*} [options] Override http request option.
83884
83916
  * @throws {RequiredError}
83885
83917
  */
83886
- async listMachines(controllerInstallationId, options) {
83918
+ async listMachines(options) {
83887
83919
  var _a, _b, _c;
83888
- const localVarAxiosArgs = await localVarAxiosParamCreator.listMachines(controllerInstallationId, options);
83920
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMachines(options);
83889
83921
  const localVarOperationServerIndex = (_a = configuration == null ? void 0 : configuration.serverIndex) != null ? _a : 0;
83890
83922
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap2["MachinesApi.listMachines"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
83891
83923
  return (axios3, basePath) => createRequestFunction2(localVarAxiosArgs, axios_default2, BASE_PATH2, configuration)(axios3, localVarOperationServerBasePath || basePath);
@@ -84028,7 +84060,7 @@ var init_chunk_T6JACYZU = __esm({
84028
84060
  };
84029
84061
  MachinesApi2 = class extends BaseAPI2 {
84030
84062
  /**
84031
- * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Unknown, expired, consumed, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
84063
+ * Reject a protocol-version-2 enrollment after the authenticated browser has begun its claim but cannot complete WebAuthn registration. Only the user and organization that claimed the unexpired enrollment can abandon it. A retry by the same claimant also succeeds when the enrollment is already rejected, including when rejection completed before an earlier response was received. Success consumes any outstanding challenge and confirms the enrollment is terminal without activating the machine. Recognized same-claimant lifecycle failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
84032
84064
  * @summary Abandon a machine enrollment claim
84033
84065
  * @param {MachinesApiAbandonMachineEnrollmentClaimRequest} requestParameters Request parameters.
84034
84066
  * @param {*} [options] Override http request option.
@@ -84039,7 +84071,7 @@ var init_chunk_T6JACYZU = __esm({
84039
84071
  return MachinesApiFp2(this.configuration).abandonMachineEnrollmentClaim(requestParameters.abandonMachineEnrollmentClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
84040
84072
  }
84041
84073
  /**
84042
- * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
84074
+ * Begin the authenticated browser half of a protocol-version-2 machine enrollment. The caller supplies the normalized human enrollment code and controller label in the context of the authenticated account and current organization. A claimable enrollment returns its original non-secret review data and server-fixed WebAuthn creation options. A claim already completed by the same claimant returns the authoritative awaiting-machine-confirmation state without reopening WebAuthn and rotates the opaque HttpOnly browser identity needed to observe local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown codes, cross-account enrollments, and otherwise privacy-sensitive failures remain indistinguishable.
84043
84075
  * @summary Begin a machine enrollment claim
84044
84076
  * @param {MachinesApiBeginMachineEnrollmentClaimRequest} requestParameters Request parameters.
84045
84077
  * @param {*} [options] Override http request option.
@@ -84050,7 +84082,7 @@ var init_chunk_T6JACYZU = __esm({
84050
84082
  return MachinesApiFp2(this.configuration).beginMachineEnrollmentClaim(requestParameters.beginMachineEnrollmentClaimRequestDto, options).then((request) => request(this.axios, this.basePath));
84051
84083
  }
84052
84084
  /**
84053
- * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. Unknown, expired, consumed, invalid, cross-account, and invalid-transition enrollments use the same browser-visible failure response.
84085
+ * Submit the browser\'s WebAuthn registration credential for a previously begun protocol-version-2 enrollment claim. The API verifies the stored challenge, exact origin and RP ID, user presence and verification, ES256, credential uniqueness, and expected enrollment state. Success records the controller evidence and stops at `awaiting-machine-confirmation`; it never activates the machine or returns a machine credential. It also issues an opaque HttpOnly browser identity whose hash is promoted to the exact controller credential only after successful local confirmation. Recognized same-claimant lifecycle and client compatibility failures return truthful browser-safe guidance. Unknown, cross-account, and otherwise privacy-sensitive failures remain indistinguishable.
84054
84086
  * @summary Complete a machine enrollment claim
84055
84087
  * @param {MachinesApiCompleteMachineEnrollmentClaimRequest} requestParameters Request parameters.
84056
84088
  * @param {*} [options] Override http request option.
@@ -84150,15 +84182,14 @@ var init_chunk_T6JACYZU = __esm({
84150
84182
  return MachinesApiFp2(this.configuration).listMachineSecurityEvents(requestParameters.machineId, options).then((request) => request(this.axios, this.basePath));
84151
84183
  }
84152
84184
  /**
84153
- * Returns every machine currently paired to the authenticated user and optionally projects the requesting controller installation\'s binding eligibility independently from global machine execution readiness.
84185
+ * Returns every machine currently paired to the authenticated user and projects the server-resolved browser controller identity independently from global machine execution readiness. An expired authorization window cannot be reused, but its still-valid browser identity can select the exact controller credential for a fresh passkey authorization.
84154
84186
  * @summary List paired machines
84155
- * @param {MachinesApiListMachinesRequest} requestParameters Request parameters.
84156
84187
  * @param {*} [options] Override http request option.
84157
84188
  * @throws {RequiredError}
84158
84189
  * @memberof MachinesApi
84159
84190
  */
84160
- listMachines(requestParameters = {}, options) {
84161
- return MachinesApiFp2(this.configuration).listMachines(requestParameters.controllerInstallationId, options).then((request) => request(this.axios, this.basePath));
84191
+ listMachines(options) {
84192
+ return MachinesApiFp2(this.configuration).listMachines(options).then((request) => request(this.axios, this.basePath));
84162
84193
  }
84163
84194
  /**
84164
84195
  * Acknowledged pre-flight liveness check. Emits a lightweight `machine.ping` frame over the authenticated WebSocket to the machine and awaits a socket acknowledgement within a short timeout. Unlike `MachineDto.active` (a heartbeat-maintained Redis presence flag, up to ~90s stale) this performs an actual round-trip, confirming the CLI will respond *right now*. Intended to gate submit actions on press so an unreachable machine surfaces an actionable error before any navigation, rather than as a later failed dispatch. Always responds 200 with `{ acknowledged }`; a machine that is not connected or does not ack within the timeout yields `acknowledged: false` rather than an error status, leaving the UX decision to the caller. The machine must belong to the authenticated user and not be revoked.
@@ -90336,7 +90367,7 @@ var init_chunk_T6JACYZU = __esm({
90336
90367
  }
90337
90368
  });
90338
90369
 
90339
- // ../ui-common/dist/chunk-7YOBXJPW.mjs
90370
+ // ../ui-common/dist/chunk-H5IGJ4AG.mjs
90340
90371
  function getCurrentInitiator() {
90341
90372
  return currentInitiator;
90342
90373
  }
@@ -90346,10 +90377,10 @@ function isInitiatorTrackingEnabled() {
90346
90377
  return host === "localhost" || host === "heyhey.dev" || host === "127.0.0.1" || host === "0.0.0.0" || host.endsWith(".local");
90347
90378
  }
90348
90379
  var currentInitiator, createAccessToken, ensureAxiosHeaders, getRequestPath, coerceAccessToken, createFallbackApiClient, createLegacyAuthAdapter, createClientSet, attachAuthInterceptors, createApiRuntime, attachInitiatorBaseOptions, createBrowserApiRuntime, toGeneratedCreateAgentEdgeRequest, fallbackAxios, fallbackRuntime, runtimeClients, runtimeUnifiedClient, registerRuntimeClients, registerRuntimeUnifiedClient, getResolvedClients, createClientProxy, defaultClient, identityClient, platformClient, knowledgeClient, conversationsClient, workflowsClient, eventsClient, tasksClient, projectsClient, workItemRefinementClient, suggestionsClient, plansClient, debugAdminClient, stagedContentClient, designDocsClient, agentSessionsClient, analyticsClient, reportsClient, notificationsClient, privateBetaAccessClient, activityCorrelationClient, agentEdgesClient, secondaryActionsClient, entityContextClient, helpClient, entitiesClient, proposalsClient, reportBugsClient, machinesClient, controllerAuthorizationClient, UnifiedApiClient, fallbackUnifiedApiClient, unifiedApiClient, createUnifiedApiClient;
90349
- var init_chunk_7YOBXJPW = __esm({
90350
- "../ui-common/dist/chunk-7YOBXJPW.mjs"() {
90380
+ var init_chunk_H5IGJ4AG = __esm({
90381
+ "../ui-common/dist/chunk-H5IGJ4AG.mjs"() {
90351
90382
  "use strict";
90352
- init_chunk_T6JACYZU();
90383
+ init_chunk_Y256XDSH();
90353
90384
  init_axios4();
90354
90385
  init_axios4();
90355
90386
  createAccessToken = (token) => token;
@@ -90486,7 +90517,7 @@ var init_chunk_7YOBXJPW = __esm({
90486
90517
  attachAuthInterceptors = ({
90487
90518
  axiosInstance,
90488
90519
  authAdapter,
90489
- includeAuthCookies
90520
+ includeBrowserCredentials
90490
90521
  }) => {
90491
90522
  var _a;
90492
90523
  let authToken = (_a = authAdapter == null ? void 0 : authAdapter.getAccessToken()) != null ? _a : null;
@@ -90542,7 +90573,7 @@ var init_chunk_7YOBXJPW = __esm({
90542
90573
  if (authToken) {
90543
90574
  headers.set("Authorization", `Bearer ${authToken}`);
90544
90575
  }
90545
- if (includeAuthCookies && config3.url && config3.url.includes("/auth/")) {
90576
+ if (includeBrowserCredentials) {
90546
90577
  config3.withCredentials = true;
90547
90578
  }
90548
90579
  config3.headers = headers;
@@ -90640,7 +90671,7 @@ var init_chunk_7YOBXJPW = __esm({
90640
90671
  const authControls = attachAuthInterceptors({
90641
90672
  axiosInstance,
90642
90673
  authAdapter,
90643
- includeAuthCookies: true
90674
+ includeBrowserCredentials: true
90644
90675
  });
90645
90676
  if (options.onUnauthorized && options.authAdapter) {
90646
90677
  authControls.onUnauthorized(options.onUnauthorized);
@@ -91326,14 +91357,14 @@ var init_chunk_7YOBXJPW = __esm({
91326
91357
  }
91327
91358
  });
91328
91359
 
91329
- // ../ui-common/dist/chunk-3BOLOLCV.mjs
91360
+ // ../ui-common/dist/chunk-R2IVSE3G.mjs
91330
91361
  var buildTaskEntity, buildSetSplittingPayload, SESSION_METHOD_REGISTRY, DEFAULT_HANDLER_PROMPT_TYPE, groupOrder, toneByGroup, methodOrder, SESSION_METHOD_GROUP_LISTINGS, WORKFLOW_NAME_VALUES;
91331
- var init_chunk_3BOLOLCV = __esm({
91332
- "../ui-common/dist/chunk-3BOLOLCV.mjs"() {
91362
+ var init_chunk_R2IVSE3G = __esm({
91363
+ "../ui-common/dist/chunk-R2IVSE3G.mjs"() {
91333
91364
  "use strict";
91334
91365
  init_chunk_O2CI6TZP();
91335
- init_chunk_7YOBXJPW();
91336
- init_chunk_T6JACYZU();
91366
+ init_chunk_H5IGJ4AG();
91367
+ init_chunk_Y256XDSH();
91337
91368
  buildTaskEntity = (startupInput) => {
91338
91369
  var _a;
91339
91370
  const entityId = (_a = startupInput.task.id) == null ? void 0 : _a.trim();
@@ -95755,12 +95786,12 @@ var init_zod2 = __esm({
95755
95786
  }
95756
95787
  });
95757
95788
 
95758
- // ../ui-common/dist/chunk-BJEDXRLF.mjs
95789
+ // ../ui-common/dist/chunk-5JBQCMKR.mjs
95759
95790
  var evidenceItemTypeSchema, startupSourceTypeSchema2, startupSourceRefSchema2, startupPlanReferenceSchema2, startupPlanStepSchema2, startupPrimaryImplementationConnectionSchema2, startupPrimaryImplementationSchema2, startupDiscrepancySchema2, startupClarificationQuestionSchema2, startupRequiredServiceIdsSchema, startupEvidenceItemSchema, startupSessionPlanResponseSchema2, finalAssessmentSourceTypeSchema, finalAssessmentSourceRefSchema, finalTaskTargetSchema, finalDesignDocTargetSchema, finalImplementationHintTargetSchema, finalEvidenceItemTargetSchema, finalValidationRecommendationTargetOptionalFieldsSchema, finalValidationRecommendationTargetSchema, finalValidationRecommendationFileReferenceSchema, finalValidationRecommendationSchema, finalAssessmentResponseSchema2, verificationResponseSourceTypeSchema2, verificationPlanResponseSchema2, toErrorString2, parseStartupSessionPlanResponse2, childTaskDescriptionUpdateResponseSchema2, setSplittingGeneratedTaskSchema2, setSplittingResponseSchema2, extractJsonFromFence2, extractJsonFromBraces2, extractStructuredJsonPayload2, parseTextAsJson2, parseStartupSessionPlanResponseFromText2;
95760
- var init_chunk_BJEDXRLF = __esm({
95761
- "../ui-common/dist/chunk-BJEDXRLF.mjs"() {
95791
+ var init_chunk_5JBQCMKR = __esm({
95792
+ "../ui-common/dist/chunk-5JBQCMKR.mjs"() {
95762
95793
  "use strict";
95763
- init_chunk_T6JACYZU();
95794
+ init_chunk_Y256XDSH();
95764
95795
  init_zod2();
95765
95796
  evidenceItemTypeSchema = external_exports2.nativeEnum(EvidenceItemTypeEnum2);
95766
95797
  startupSourceTypeSchema2 = external_exports2.enum([
@@ -109215,12 +109246,12 @@ var import_promises8, import_os, import_path2, import_os2, import_path3, import_
109215
109246
  var init_agents = __esm({
109216
109247
  "../ui-common/dist/agents.mjs"() {
109217
109248
  "use strict";
109218
- init_chunk_3BOLOLCV();
109249
+ init_chunk_R2IVSE3G();
109219
109250
  init_chunk_QRG63FEH();
109220
- init_chunk_BJEDXRLF();
109251
+ init_chunk_5JBQCMKR();
109221
109252
  init_chunk_O2CI6TZP();
109222
- init_chunk_7YOBXJPW();
109223
- init_chunk_T6JACYZU();
109253
+ init_chunk_H5IGJ4AG();
109254
+ init_chunk_Y256XDSH();
109224
109255
  import_promises8 = require("fs/promises");
109225
109256
  import_os = require("os");
109226
109257
  import_path2 = require("path");
@@ -119187,6 +119218,12 @@ Go wide. A handful of calls does not cover a real project \u2014 half a dozen se
119187
119218
 
119188
119219
  The toolset carries no file-reading tools. The project graph is the only investigation surface.
119189
119220
 
119221
+ ## Source-conversation continuity
119222
+
119223
+ Treat the focal entity's proposal lineage as a research input for every focal entity type. When an applicable proposal identifies an originating conversation, resolve the Agent Session that owns that conversation and call \`get_agent_session\` for its canonical session plus a newest-first page of Conversation messages. Read the first page before deciding whether more history is needed; when \`nextCursor\` is present, pass it back as \`cursor\` to continue toward older messages until you have enough context to understand the material conclusions and any later corrections. Do not substitute \`get_agent_sessions\`, which is the separate accomplishment-summary lookup, or a Conversations \`since\` cursor, which pages forward from an existing message.
119224
+
119225
+ Inspect at least the latest relevant messages, and do not assume the focal entity's title, summary, description, requirements, or acceptance criteria fully preserve the discussion. Carry material settled reasoning, decisions, debugging conclusions, design choices, agreed direction, and later corrections into the downstream \`frame\`, \`analysis\`, and \`summary\`; preserve the corrected conclusion rather than an earlier superseded interpretation. This source-conversation duty is independent of recent Project Assistant report reuse: do not change report selection, age or staleness caveats, advisory freshness checks, or the behavior when no reusable report exists.
119226
+
119190
119227
  ## Capability gates
119191
119228
 
119192
119229
  ${edgePosture}
@@ -147068,29 +147105,29 @@ var init_runtime = __esm({
147068
147105
  this.store = store;
147069
147106
  this.logger = logger;
147070
147107
  }
147071
- async admit(definition, admitted) {
147108
+ async admit(definition, admitted2) {
147072
147109
  this.logger.debug("state_machine.runtime.admission.received", {
147073
- machineType: admitted.identity.machineType,
147074
- instanceId: admitted.identity.instanceId,
147075
- ingressId: admitted.ingressId,
147076
- eventType: admitted.event.type
147077
- });
147078
- return this.runSerial(admitted.identity.instanceId, async () => {
147079
- const stored = await this.store.findByInstanceId(admitted.identity.instanceId);
147080
- if (stored && stored.snapshot.identity.machineType !== admitted.identity.machineType) {
147110
+ machineType: admitted2.identity.machineType,
147111
+ instanceId: admitted2.identity.instanceId,
147112
+ ingressId: admitted2.ingressId,
147113
+ eventType: admitted2.event.type
147114
+ });
147115
+ return this.runSerial(admitted2.identity.instanceId, async () => {
147116
+ const stored = await this.store.findByInstanceId(admitted2.identity.instanceId);
147117
+ if (stored && stored.snapshot.identity.machineType !== admitted2.identity.machineType) {
147081
147118
  this.logger.debug("state_machine.runtime.admission.identity_mismatch", {
147082
- requestedMachineType: admitted.identity.machineType,
147119
+ requestedMachineType: admitted2.identity.machineType,
147083
147120
  persistedMachineType: stored.snapshot.identity.machineType,
147084
- instanceId: admitted.identity.instanceId,
147085
- ingressId: admitted.ingressId
147121
+ instanceId: admitted2.identity.instanceId,
147122
+ ingressId: admitted2.ingressId
147086
147123
  });
147087
147124
  return {
147088
147125
  status: "rejected",
147089
147126
  code: "identity_mismatch",
147090
- reason: `Machine instance ${admitted.identity.instanceId} belongs to ${stored.snapshot.identity.machineType}, not ${admitted.identity.machineType}.`
147127
+ reason: `Machine instance ${admitted2.identity.instanceId} belongs to ${stored.snapshot.identity.machineType}, not ${admitted2.identity.machineType}.`
147091
147128
  };
147092
147129
  }
147093
- const previous = stored?.acceptedIngress.get(admitted.ingressId);
147130
+ const previous = stored?.acceptedIngress.get(admitted2.ingressId);
147094
147131
  if (previous) {
147095
147132
  const replay = {
147096
147133
  status: "replayed",
@@ -147099,9 +147136,9 @@ var init_runtime = __esm({
147099
147136
  effects: previous.effects
147100
147137
  };
147101
147138
  this.logger.debug("state_machine.runtime.admission.replayed", {
147102
- machineType: admitted.identity.machineType,
147103
- instanceId: admitted.identity.instanceId,
147104
- ingressId: admitted.ingressId,
147139
+ machineType: admitted2.identity.machineType,
147140
+ instanceId: admitted2.identity.instanceId,
147141
+ ingressId: admitted2.ingressId,
147105
147142
  revision: previous.snapshot.revision,
147106
147143
  effectCount: previous.effects.length
147107
147144
  });
@@ -147118,24 +147155,24 @@ var init_runtime = __esm({
147118
147155
  } else {
147119
147156
  const [createdSnapshot, createdActions] = initialTransition(
147120
147157
  definition.machine,
147121
- definition.createInitialInput(admitted.identity)
147158
+ definition.createInitialInput(admitted2.identity)
147122
147159
  );
147123
147160
  initialSnapshot = createdSnapshot;
147124
147161
  initialActions = createdActions;
147125
147162
  }
147126
147163
  const snapshot = stored?.snapshot ?? {
147127
- identity: admitted.identity,
147164
+ identity: admitted2.identity,
147128
147165
  revision: 0,
147129
147166
  ...definition.readSnapshot(initialSnapshot)
147130
147167
  };
147131
147168
  this.logger.debug("state_machine.runtime.transition.evaluating", {
147132
- machineType: admitted.identity.machineType,
147133
- instanceId: admitted.identity.instanceId,
147134
- ingressId: admitted.ingressId,
147169
+ machineType: admitted2.identity.machineType,
147170
+ instanceId: admitted2.identity.instanceId,
147171
+ ingressId: admitted2.ingressId,
147135
147172
  currentRevision: snapshot.revision,
147136
147173
  isInitialEvent: stored === null
147137
147174
  });
147138
- const xstateEvent = definition.toXStateEvent(admitted.event);
147175
+ const xstateEvent = definition.toXStateEvent(admitted2.event);
147139
147176
  const [evaluatedSnapshot, transitionActions] = transition(
147140
147177
  definition.machine,
147141
147178
  initialSnapshot,
@@ -147146,11 +147183,11 @@ var init_runtime = __esm({
147146
147183
  const candidateTransitions = transitionChangedSnapshot || transitionActions.length > 0 ? [true] : definition.machine.getTransitionData(initialSnapshot, xstateEvent);
147147
147184
  if (candidateTransitions.length === 0) {
147148
147185
  const code = stored ? "transition_rejected" : "unsupported_initial_event";
147149
- const reason = `Event ${admitted.event.type} is not accepted from the current state.`;
147186
+ const reason = `Event ${admitted2.event.type} is not accepted from the current state.`;
147150
147187
  this.logger.debug("state_machine.runtime.transition.rejected", {
147151
- machineType: admitted.identity.machineType,
147152
- instanceId: admitted.identity.instanceId,
147153
- ingressId: admitted.ingressId,
147188
+ machineType: admitted2.identity.machineType,
147189
+ instanceId: admitted2.identity.instanceId,
147190
+ ingressId: admitted2.ingressId,
147154
147191
  code,
147155
147192
  reason
147156
147193
  });
@@ -147161,20 +147198,20 @@ var init_runtime = __esm({
147161
147198
  return effect === null ? [] : [effect];
147162
147199
  });
147163
147200
  const nextSnapshot = {
147164
- identity: admitted.identity,
147201
+ identity: admitted2.identity,
147165
147202
  revision: snapshot.revision + 1,
147166
147203
  ...definition.readSnapshot(nextXStateSnapshot)
147167
147204
  };
147168
147205
  const accepted = {
147169
147206
  status: "accepted",
147170
- ingressId: admitted.ingressId,
147207
+ ingressId: admitted2.ingressId,
147171
147208
  snapshot: nextSnapshot,
147172
147209
  effects
147173
147210
  };
147174
147211
  this.logger.debug("state_machine.runtime.commit.started", {
147175
- machineType: admitted.identity.machineType,
147176
- instanceId: admitted.identity.instanceId,
147177
- ingressId: admitted.ingressId,
147212
+ machineType: admitted2.identity.machineType,
147213
+ instanceId: admitted2.identity.instanceId,
147214
+ ingressId: admitted2.ingressId,
147178
147215
  expectedRevision: stored?.snapshot.revision ?? null,
147179
147216
  nextRevision: nextSnapshot.revision,
147180
147217
  effectCount: accepted.effects.length
@@ -147184,9 +147221,9 @@ var init_runtime = __esm({
147184
147221
  result: accepted
147185
147222
  });
147186
147223
  this.logger.debug("state_machine.runtime.commit.completed", {
147187
- machineType: admitted.identity.machineType,
147188
- instanceId: admitted.identity.instanceId,
147189
- ingressId: admitted.ingressId,
147224
+ machineType: admitted2.identity.machineType,
147225
+ instanceId: admitted2.identity.instanceId,
147226
+ ingressId: admitted2.ingressId,
147190
147227
  revision: nextSnapshot.revision,
147191
147228
  effectCount: accepted.effects.length
147192
147229
  });
@@ -151934,12 +151971,12 @@ var require_jsx_runtime = __commonJS({
151934
151971
  }
151935
151972
  });
151936
151973
 
151937
- // ../ui-common/dist/chunk-HL2BGDUB.mjs
151974
+ // ../ui-common/dist/chunk-ASBL2UIR.mjs
151938
151975
  var import_react, import_memoize, import_jsx_runtime, import_meta, ConfigService, configService, currentRuntime, currentClient, runtimeListeners, registerApiRuntime, getApiClient, apiClient, BrowserSessionContinuityDecision, browserSessionContinuityDecision, base64UrlDecode2, decodeJwtPayload2;
151939
- var init_chunk_HL2BGDUB = __esm({
151940
- "../ui-common/dist/chunk-HL2BGDUB.mjs"() {
151976
+ var init_chunk_ASBL2UIR = __esm({
151977
+ "../ui-common/dist/chunk-ASBL2UIR.mjs"() {
151941
151978
  "use strict";
151942
- init_chunk_7YOBXJPW();
151979
+ init_chunk_H5IGJ4AG();
151943
151980
  import_react = __toESM(require_react(), 1);
151944
151981
  import_memoize = __toESM(require_memoize(), 1);
151945
151982
  import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
@@ -152119,9 +152156,9 @@ var init_chunk_HL2BGDUB = __esm({
152119
152156
  var init_clients = __esm({
152120
152157
  "../ui-common/dist/clients.mjs"() {
152121
152158
  "use strict";
152122
- init_chunk_HL2BGDUB();
152123
- init_chunk_7YOBXJPW();
152124
- init_chunk_T6JACYZU();
152159
+ init_chunk_ASBL2UIR();
152160
+ init_chunk_H5IGJ4AG();
152161
+ init_chunk_Y256XDSH();
152125
152162
  }
152126
152163
  });
152127
152164
 
@@ -156524,7 +156561,7 @@ var init_authorization_replay_store = __esm({
156524
156561
  });
156525
156562
 
156526
156563
  // src/server/controller-authorization/types.ts
156527
- var CURRENT_AGENT_OPERATIONS, CURRENT_AGENT_OPERATION_SET, CURRENT_AGENT_OPERATION_CATEGORY, isCurrentAgentOperation, hasExactCurrentAgentOperations;
156564
+ var CURRENT_AGENT_OPERATIONS, CURRENT_AGENT_OPERATION_SET, CURRENT_AGENT_OPERATION_CATEGORY, isCurrentAgentOperation, hasExactCurrentAgentOperations, AdmittedHostAction;
156528
156565
  var init_types5 = __esm({
156529
156566
  "src/server/controller-authorization/types.ts"() {
156530
156567
  "use strict";
@@ -156559,9 +156596,18 @@ var init_types5 = __esm({
156559
156596
  EXACT_ACTION_DELIVERY: "EXACT_ACTION"
156560
156597
  };
156561
156598
  isCurrentAgentOperation = (value2) => CURRENT_AGENT_OPERATION_SET.has(value2);
156562
- hasExactCurrentAgentOperations = (values) => values.length === CURRENT_AGENT_OPERATIONS.length && new Set(values).size === CURRENT_AGENT_OPERATIONS.length && values.every(
156563
- (value2) => typeof value2 === "string" && CURRENT_AGENT_OPERATION_SET.has(value2)
156564
- );
156599
+ hasExactCurrentAgentOperations = (values) => values.length === CURRENT_AGENT_OPERATIONS.length && new Set(values).size === CURRENT_AGENT_OPERATIONS.length && values.every((value2) => typeof value2 === "string" && CURRENT_AGENT_OPERATION_SET.has(value2));
156600
+ AdmittedHostAction = class {
156601
+ constructor(actionType, authorizationId, envelopeNonce) {
156602
+ this.actionType = actionType;
156603
+ this.authorizationId = authorizationId;
156604
+ this.envelopeNonce = envelopeNonce;
156605
+ }
156606
+ actionType;
156607
+ authorizationId;
156608
+ envelopeNonce;
156609
+ #admittedHostAction = true;
156610
+ };
156565
156611
  }
156566
156612
  });
156567
156613
 
@@ -157287,11 +157333,12 @@ var init_execution_grant_store = __esm({
157287
157333
  });
157288
157334
 
157289
157335
  // src/server/controller-authorization/host-action-admission.ts
157290
- var denialFromError, HostActionAdmission;
157336
+ var denialFromError, AdmittedHostActionCapability, admitted, HostActionAdmission;
157291
157337
  var init_host_action_admission = __esm({
157292
157338
  "src/server/controller-authorization/host-action-admission.ts"() {
157293
157339
  "use strict";
157294
157340
  init_types5();
157341
+ init_types5();
157295
157342
  denialFromError = (error41) => {
157296
157343
  switch (error41.message) {
157297
157344
  case "GRANT_SCOPE_MISMATCH":
@@ -157302,6 +157349,21 @@ var init_host_action_admission = __esm({
157302
157349
  return "STORAGE_UNAVAILABLE";
157303
157350
  }
157304
157351
  };
157352
+ AdmittedHostActionCapability = class extends AdmittedHostAction {
157353
+ constructor(actionType, authorizationId, envelopeNonce) {
157354
+ super(actionType, authorizationId, envelopeNonce);
157355
+ }
157356
+ };
157357
+ admitted = (request, authorizationId, grantId) => ({
157358
+ admitted: true,
157359
+ authorizationId,
157360
+ ...grantId ? { grantId } : {},
157361
+ capability: new AdmittedHostActionCapability(
157362
+ request.actionType,
157363
+ authorizationId,
157364
+ request.envelopeNonce
157365
+ )
157366
+ });
157305
157367
  HostActionAdmission = class {
157306
157368
  constructor(options) {
157307
157369
  this.options = options;
@@ -157317,7 +157379,7 @@ var init_host_action_admission = __esm({
157317
157379
  actionType: context.actionType,
157318
157380
  actionCategory: context.actionCategory
157319
157381
  });
157320
- return { admitted: true, authorizationId: authorization.grantId, grantId: grant.grantId };
157382
+ return admitted(context, authorization.grantId, grant.grantId);
157321
157383
  } catch (error41) {
157322
157384
  return {
157323
157385
  admitted: false,
@@ -157348,15 +157410,9 @@ var init_host_action_admission = __esm({
157348
157410
  actionType: request.actionType,
157349
157411
  actionCategory: request.actionCategory
157350
157412
  });
157351
- const freshEnvelope = await this.options.replayStore.consume(
157352
- request.envelopeNonce
157353
- );
157413
+ const freshEnvelope = await this.options.replayStore.consume(request.envelopeNonce);
157354
157414
  if (!freshEnvelope) return { admitted: false, reason: "REPLAY_DETECTED" };
157355
- return {
157356
- admitted: true,
157357
- authorizationId: assertion.authorizationId,
157358
- grantId: existingGrant.grantId
157359
- };
157415
+ return admitted(request, assertion.authorizationId, existingGrant.grantId);
157360
157416
  } catch (error41) {
157361
157417
  if (error41 instanceof Error && error41.message !== "GRANT_NOT_ACTIVE") {
157362
157418
  return { admitted: false, reason: denialFromError(error41) };
@@ -157373,7 +157429,7 @@ var init_host_action_admission = __esm({
157373
157429
  return { admitted: false, reason: "STORAGE_UNAVAILABLE" };
157374
157430
  }
157375
157431
  if (authorization.grantId === null) {
157376
- return { admitted: true, authorizationId: assertion.authorizationId };
157432
+ return admitted(request, assertion.authorizationId);
157377
157433
  }
157378
157434
  try {
157379
157435
  const grant = await this.options.grantStore.create({
@@ -157382,7 +157438,7 @@ var init_host_action_admission = __esm({
157382
157438
  descriptorHash: assertion.intent.grantDescriptorHash,
157383
157439
  controllerCredentialFingerprint: assertion.credentialFingerprint
157384
157440
  });
157385
- return { admitted: true, authorizationId: assertion.authorizationId, grantId: grant.grantId };
157441
+ return admitted(request, assertion.authorizationId, grant.grantId);
157386
157442
  } catch {
157387
157443
  return { admitted: false, reason: "STORAGE_UNAVAILABLE" };
157388
157444
  }
@@ -157408,7 +157464,15 @@ var init_host_action_admission = __esm({
157408
157464
  async admitReduction(envelopeNonce) {
157409
157465
  try {
157410
157466
  const fresh = await this.options.replayStore.consume(envelopeNonce);
157411
- return fresh ? { admitted: true, authorizationId: envelopeNonce } : { admitted: false, reason: "REPLAY_DETECTED" };
157467
+ return fresh ? {
157468
+ admitted: true,
157469
+ authorizationId: envelopeNonce,
157470
+ capability: new AdmittedHostActionCapability(
157471
+ "CONVERSATION_TRIGGER",
157472
+ envelopeNonce,
157473
+ envelopeNonce
157474
+ )
157475
+ } : { admitted: false, reason: "REPLAY_DETECTED" };
157412
157476
  } catch {
157413
157477
  return { admitted: false, reason: "STORAGE_UNAVAILABLE" };
157414
157478
  }
@@ -181415,12 +181479,12 @@ var init_task_monitor_launch_authorization = __esm({
181415
181479
  }
181416
181480
  });
181417
181481
 
181418
- // ../ui-common/dist/chunk-FKF3DMHU.mjs
181482
+ // ../ui-common/dist/chunk-CECF2WYD.mjs
181419
181483
  var CAPABILITY_CATALOG, activeCatalog, loadState, getCatalog, isLocalReasoningEffort, listModels, listEfforts, getOpencodeModelRef, supportsFastMode;
181420
- var init_chunk_FKF3DMHU = __esm({
181421
- "../ui-common/dist/chunk-FKF3DMHU.mjs"() {
181484
+ var init_chunk_CECF2WYD = __esm({
181485
+ "../ui-common/dist/chunk-CECF2WYD.mjs"() {
181422
181486
  "use strict";
181423
- init_chunk_T6JACYZU();
181487
+ init_chunk_Y256XDSH();
181424
181488
  CAPABILITY_CATALOG = [
181425
181489
  {
181426
181490
  provider: ConversationStartRunRequestDtoProviderEnum2.Claude,
@@ -181573,8 +181637,8 @@ var init_chunk_FKF3DMHU = __esm({
181573
181637
  var init_capability_catalog = __esm({
181574
181638
  "../ui-common/dist/capability-catalog.mjs"() {
181575
181639
  "use strict";
181576
- init_chunk_FKF3DMHU();
181577
- init_chunk_T6JACYZU();
181640
+ init_chunk_CECF2WYD();
181641
+ init_chunk_Y256XDSH();
181578
181642
  }
181579
181643
  });
181580
181644
 
@@ -185211,7 +185275,7 @@ var init_session_monitor_turn_evaluator = __esm({
185211
185275
  timeoutMs: this.dependencies.timeoutMs ?? DEFAULT_EVALUATION_TIMEOUT_MS
185212
185276
  });
185213
185277
  }, this.dependencies.timeoutMs ?? DEFAULT_EVALUATION_TIMEOUT_MS);
185214
- void agentService.sendMessage(monitorRunId, {
185278
+ void agentService.sendSystemMessage(monitorRunId, {
185215
185279
  promptType: LocalPromptType.SessionMonitor,
185216
185280
  payload: {
185217
185281
  promptType: LocalPromptType.SessionMonitor,
@@ -185690,7 +185754,7 @@ var init_runner = __esm({
185690
185754
  },
185691
185755
  ...command2.launchConfig ? { taskMonitorLaunchConfig: command2.launchConfig } : {}
185692
185756
  });
185693
- await agentService.sendMessage(runId, {
185757
+ await agentService.sendSystemMessage(runId, {
185694
185758
  promptType: LocalPromptType.TaskMonitor,
185695
185759
  payload: {
185696
185760
  promptType: LocalPromptType.TaskMonitor,
@@ -185776,7 +185840,7 @@ var init_runner = __esm({
185776
185840
  });
185777
185841
  await runStore.updateRunSessionContext(runId, { triggerDelta: delta });
185778
185842
  logger.info(DAILY_SESSION_MONITOR_LOG_EVENT, { stage: "turn_dispatch_started", runId });
185779
- await agentService.sendMessage(runId, {
185843
+ await agentService.sendSystemMessage(runId, {
185780
185844
  promptType: LocalPromptType.DailySession,
185781
185845
  payload: { promptType: LocalPromptType.DailySession, payloadVersion: 1 },
185782
185846
  references: { resolved: [], unresolved: [] }
@@ -185951,7 +186015,7 @@ var init_supervision_effect_handlers = __esm({
185951
186015
  throw new Error("Selected Task read returned an invalid response.");
185952
186016
  }
185953
186017
  requestReview(agentSessionId, rationale) {
185954
- return this.dependencies.agentService.sendMessage(agentSessionId, buildCodeReviewRequest(rationale)).then(() => void 0);
186018
+ return this.dependencies.agentService.sendSystemMessage(agentSessionId, buildCodeReviewRequest(rationale)).then(() => void 0);
185955
186019
  }
185956
186020
  sendGuidance(auth2, conversationId, guidance) {
185957
186021
  return postTaskMonitorGuidanceMessage({
@@ -186066,7 +186130,10 @@ var init_supervision_effect_handlers = __esm({
186066
186130
  effect.agentSessionId
186067
186131
  );
186068
186132
  if (monitor.status !== WorkStatus.Active || entry?.agentSessionId !== effect.agentSessionId || !session?.conversationId || session.config?.type !== "CODING_SESSION" || session.config.version !== "v2" || session.config.taskMonitorId !== effect.taskMonitorId) {
186069
- return this.failed(effect, "Settled-Run supervision no longer matches canonical ownership.");
186133
+ return this.failed(
186134
+ effect,
186135
+ "Settled-Run supervision no longer matches canonical ownership."
186136
+ );
186070
186137
  }
186071
186138
  const completedAssistantMessage = effect.completedAssistantMessageId ? await this.dependencies.agentService.readAssistantMessage({
186072
186139
  organizationId: auth2.organizationId,
@@ -186077,10 +186144,7 @@ var init_supervision_effect_handlers = __esm({
186077
186144
  if (effect.completedAssistantMessageId && !completedAssistantMessage) {
186078
186145
  return this.failed(effect, "Completed assistant Message could not be resolved.");
186079
186146
  }
186080
- const launchConfig = launchConfigFor(
186081
- entry,
186082
- monitor.definition.launchPolicy.worktree
186083
- );
186147
+ const launchConfig = launchConfigFor(entry, monitor.definition.launchPolicy.worktree);
186084
186148
  const evaluation = await this.coordinator.runTaskMonitor(
186085
186149
  {
186086
186150
  monitorId: effect.taskMonitorId,
@@ -186112,7 +186176,10 @@ var init_supervision_effect_handlers = __esm({
186112
186176
  });
186113
186177
  const currentEntry = current.definition.executionPlan[current.definition.cursor];
186114
186178
  if (current.status !== WorkStatus.Active || current.definition.cursor !== executionIndex || currentEntry?.taskId !== entry.taskId || currentEntry.agentSessionId !== effect.agentSessionId) {
186115
- return this.failed(effect, "Task Monitor changed while settled-Run supervision was active.");
186179
+ return this.failed(
186180
+ effect,
186181
+ "Task Monitor changed while settled-Run supervision was active."
186182
+ );
186116
186183
  }
186117
186184
  return await this.applyDecision(
186118
186185
  effect,
@@ -186196,11 +186263,7 @@ var init_supervision_effect_handlers = __esm({
186196
186263
  return this.failed(effect, "Next Agent Session has no Conversation owner.");
186197
186264
  }
186198
186265
  await this.owners.publishDecision(auth2, coordinatorRunId, decision);
186199
- return this.continues(
186200
- effect,
186201
- startResult.agentSessionId,
186202
- nextSession.conversationId
186203
- );
186266
+ return this.continues(effect, startResult.agentSessionId, nextSession.conversationId);
186204
186267
  }
186205
186268
  if (startResult.status !== "exhausted") {
186206
186269
  return this.failed(effect, `Next launch did not settle (${startResult.status}).`);
@@ -186570,9 +186633,9 @@ var init_monitors = __esm({
186570
186633
  if (!subscribed) {
186571
186634
  continue;
186572
186635
  }
186573
- let admitted;
186636
+ let admitted2;
186574
186637
  try {
186575
- admitted = await monitor.admits(event);
186638
+ admitted2 = await monitor.admits(event);
186576
186639
  } catch (error41) {
186577
186640
  logger.error("monitors.pipeline.opt-in-failed", {
186578
186641
  declarationId: monitor.id,
@@ -186580,7 +186643,7 @@ var init_monitors = __esm({
186580
186643
  });
186581
186644
  continue;
186582
186645
  }
186583
- if (!admitted) {
186646
+ if (!admitted2) {
186584
186647
  logger.info("monitors.pipeline.opt-in-rejected", {
186585
186648
  declarationId: monitor.id,
186586
186649
  eventType: event.eventType
@@ -189409,7 +189472,9 @@ var init_dispatch = __esm({
189409
189472
  if (verified.kind === "trigger.authority_reduction") {
189410
189473
  return { admitted: false, reason: "acknowledged_route_required" };
189411
189474
  }
189412
- if (verified.envelope.protocolVersion !== 2) return { admitted: true };
189475
+ if (verified.envelope.protocolVersion !== 2) {
189476
+ return { admitted: false, reason: "protocol_version" };
189477
+ }
189413
189478
  const admission = this.dependencies.hostActionAdmission;
189414
189479
  if (!admission) {
189415
189480
  this.dependencies.logger.warn("trigger-verification.authority.denied", {
@@ -189420,6 +189485,15 @@ var init_dispatch = __esm({
189420
189485
  return { admitted: false, reason: "admission_not_ready" };
189421
189486
  }
189422
189487
  if (!verified.envelope.authorization) {
189488
+ const isAuthorityNonIncreasing = verified.kind === "trigger.control" && verified.body.kind === "stop_run" || verified.kind === "trigger.monitor_command" && (verified.body.command.cause === "PAUSE" || verified.body.command.cause === "STOP" || verified.body.command.cause === "HALT" || verified.body.command.cause === "GUIDANCE_CHANGED" || verified.body.command.cause === "HUMAN_DECISION");
189489
+ if (!isAuthorityNonIncreasing) {
189490
+ this.dependencies.logger.warn("trigger-verification.authority.denied", {
189491
+ reason: "authorization_not_found",
189492
+ frameType: verified.kind,
189493
+ nonce: verified.envelope.nonce
189494
+ });
189495
+ return { admitted: false, reason: "authorization_not_found" };
189496
+ }
189423
189497
  const result2 = await admission.admitReduction(verified.envelope.nonce);
189424
189498
  if (!result2.admitted) {
189425
189499
  this.dependencies.logger.warn("trigger-verification.authority.denied", {
@@ -189429,7 +189503,7 @@ var init_dispatch = __esm({
189429
189503
  });
189430
189504
  return { admitted: false, reason: result2.reason };
189431
189505
  }
189432
- return { admitted: true };
189506
+ return { admitted: true, capability: result2.capability };
189433
189507
  }
189434
189508
  const request = await this.admissionRequestFor(verified);
189435
189509
  if (!request) return { admitted: false, reason: "routing_mismatch" };
@@ -189450,10 +189524,11 @@ var init_dispatch = __esm({
189450
189524
  });
189451
189525
  return {
189452
189526
  admitted: true,
189527
+ capability: result.capability,
189453
189528
  authorization: toAdmissionAuthorization(verified.envelope.authorization)
189454
189529
  };
189455
189530
  }
189456
- async dispatchVerified(verified) {
189531
+ async dispatchVerified(verified, capability) {
189457
189532
  const { agentService, logger, runRegistry } = this.dependencies;
189458
189533
  if (verified.kind === "trigger.authority_reduction") {
189459
189534
  logger.warn("trigger-verification.authority_reduction.dropped", {
@@ -189473,7 +189548,7 @@ var init_dispatch = __esm({
189473
189548
  });
189474
189549
  return;
189475
189550
  }
189476
- void executor.execute(verified.body).catch((error41) => {
189551
+ void executor.execute(capability, verified.body).catch((error41) => {
189477
189552
  logger.error("trigger-verification.application_effect.failed", {
189478
189553
  effectId: verified.body.effectId,
189479
189554
  nonce: verified.envelope.nonce,
@@ -189492,7 +189567,7 @@ var init_dispatch = __esm({
189492
189567
  });
189493
189568
  return;
189494
189569
  }
189495
- void executor.execute(verified.body).catch((error41) => {
189570
+ void executor.execute(capability, verified.body).catch((error41) => {
189496
189571
  logger.error("trigger-verification.exact_action.failed", {
189497
189572
  exactActionId: verified.body.exactActionId,
189498
189573
  nonce: verified.envelope.nonce,
@@ -189541,6 +189616,18 @@ var init_dispatch = __esm({
189541
189616
  });
189542
189617
  return;
189543
189618
  }
189619
+ if (body.kind === "compact_run" && binding2.runId !== body.runId) {
189620
+ logDropped(logger, {
189621
+ frameType: "trigger.control",
189622
+ reason: "run_binding_mismatch",
189623
+ kind: body.kind,
189624
+ conversationId: conversationId2,
189625
+ runId: binding2.runId,
189626
+ envelopeRunId: body.runId,
189627
+ nonce: verified.envelope.nonce
189628
+ });
189629
+ return;
189630
+ }
189544
189631
  logger.info("trigger-verification.control.dispatch", {
189545
189632
  kind: body.kind,
189546
189633
  conversationId: conversationId2,
@@ -189548,7 +189635,7 @@ var init_dispatch = __esm({
189548
189635
  envelopeRunId: body.runId,
189549
189636
  nonce: verified.envelope.nonce
189550
189637
  });
189551
- const controlOperation = body.kind === "compact_run" ? agentService.compactRun(binding2.runId) : agentService.stopRun(binding2.runId);
189638
+ const controlOperation = body.kind === "compact_run" ? agentService.compactRun(capability, binding2.runId) : agentService.stopRun(binding2.runId);
189552
189639
  controlOperation.catch((error41) => {
189553
189640
  logger.error("trigger-verification.control.dispatch_failed", {
189554
189641
  kind: body.kind,
@@ -189659,7 +189746,7 @@ var init_dispatch = __esm({
189659
189746
  nonce: verified.envelope.nonce
189660
189747
  });
189661
189748
  try {
189662
- await agentService.createRunFromTrigger(request2);
189749
+ await agentService.createRunFromTrigger(capability, request2);
189663
189750
  await this.operationReceiptStore.complete(operationId2, operationFingerprint2, true);
189664
189751
  return {
189665
189752
  status: "ACCEPTED",
@@ -189780,7 +189867,7 @@ var init_dispatch = __esm({
189780
189867
  nonce: verified.envelope.nonce
189781
189868
  });
189782
189869
  try {
189783
- await agentService.sendMessage(binding.runId, request);
189870
+ await agentService.sendMessage(capability, binding.runId, request);
189784
189871
  if (operationId && operationFingerprint)
189785
189872
  await this.operationReceiptStore.complete(operationId, operationFingerprint, true);
189786
189873
  if (operationId && operationFingerprint) {
@@ -189843,16 +189930,13 @@ var init_dispatch = __esm({
189843
189930
  if (typeof event.conversationId === "string") {
189844
189931
  this.dropRecoverySurface.reset(event.conversationId);
189845
189932
  }
189846
- if (result.verified.envelope.protocolVersion === 2) {
189847
- return this.admitVerified(result.verified).then(
189848
- (admission) => admission.admitted ? this.dispatchVerified(result.verified) : {
189849
- status: "REJECTED",
189850
- stage: "ADMISSION",
189851
- reason: "AUTHORIZATION_REJECTED"
189852
- }
189853
- );
189854
- }
189855
- return this.dispatchVerified(result.verified);
189933
+ return this.admitVerified(result.verified).then(
189934
+ (admission) => admission.admitted ? this.dispatchVerified(result.verified, admission.capability) : {
189935
+ status: "REJECTED",
189936
+ stage: "ADMISSION",
189937
+ reason: "AUTHORIZATION_REJECTED"
189938
+ }
189939
+ );
189856
189940
  }
189857
189941
  verificationRejectionReason(reason) {
189858
189942
  const mapped = reason === "signature_invalid" || reason === "signature_decode" ? "SIGNATURE_INVALID" : reason === "machine_id_mismatch" ? "MACHINE_MISMATCH" : reason === "user_id_mismatch" ? "OWNER_MISMATCH" : reason === "timestamp_window" ? "STALE" : reason === "nonce_replay" ? "NONCE_REPLAY" : reason === "allowlist" ? "KIND_NOT_ALLOWED" : reason === "expired" ? "EXPIRED" : reason === "routing_mismatch" ? "ROUTING_MISMATCH" : "SCHEMA_INVALID";
@@ -189939,7 +190023,7 @@ var init_dispatch = __esm({
189939
190023
  reason: "KIND_NOT_ALLOWED"
189940
190024
  };
189941
190025
  }
189942
- const admission = result.verified.envelope.protocolVersion === 2 ? await this.admitVerified(result.verified) : { admitted: true };
190026
+ const admission = await this.admitVerified(result.verified);
189943
190027
  if (!admission.admitted) {
189944
190028
  return {
189945
190029
  status: "REJECTED",
@@ -190739,7 +190823,7 @@ var init_schemas5 = __esm({
190739
190823
  });
190740
190824
 
190741
190825
  // src/server/trigger-verification/verify.ts
190742
- var import_node_crypto21, CONVERSATION_PROMPT_TYPE_ACCEPTANCE, CONVERSATION_PROMPT_TYPE_ALLOWLIST, PLATFORM_EVENT_KIND_ALLOWLIST, CONTROL_KIND_ALLOWLIST, TIMESTAMP_WINDOW_MS, ED25519_SPKI_DER_PREFIX2, rawEd25519PublicKeyToKeyObject, reconstructCanonicalBytes, decodeBase64, TriggerVerifier;
190826
+ var import_node_crypto21, cliSettingsFrameV2Schema, CONVERSATION_PROMPT_TYPE_ACCEPTANCE, CONVERSATION_PROMPT_TYPE_ALLOWLIST, PLATFORM_EVENT_KIND_ALLOWLIST, CONTROL_KIND_ALLOWLIST, TIMESTAMP_WINDOW_MS, ED25519_SPKI_DER_PREFIX2, rawEd25519PublicKeyToKeyObject, reconstructCanonicalBytes, decodeBase64, TriggerVerifier;
190743
190827
  var init_verify = __esm({
190744
190828
  "src/server/trigger-verification/verify.ts"() {
190745
190829
  "use strict";
@@ -190748,6 +190832,15 @@ var init_verify = __esm({
190748
190832
  init_jcs();
190749
190833
  init_nonce_store();
190750
190834
  init_schemas5();
190835
+ cliSettingsFrameV2Schema = cliSettingsFrameSchema.extend({
190836
+ organizationId: cliReadFrameV2Schema.shape.organizationId,
190837
+ projectId: cliReadFrameV2Schema.shape.projectId,
190838
+ conversationId: cliReadFrameV2Schema.shape.conversationId,
190839
+ userId: cliReadFrameV2Schema.shape.userId,
190840
+ envelope: cliReadFrameV2Schema.shape.envelope.extend({
190841
+ event: signedCliSettingsEnvelopeSchema.shape.event
190842
+ })
190843
+ });
190751
190844
  CONVERSATION_PROMPT_TYPE_ACCEPTANCE = {
190752
190845
  feature_sync_analyze: true,
190753
190846
  feature_sync_iterate: true,
@@ -191485,7 +191578,15 @@ var init_verify = __esm({
191485
191578
  };
191486
191579
  }
191487
191580
  verifyCliSettingsFrame(rawFrame) {
191488
- const parsed = cliSettingsFrameSchema.safeParse(rawFrame);
191581
+ const rawEnvelope = typeof rawFrame === "object" && rawFrame !== null && "envelope" in rawFrame && typeof rawFrame.envelope === "object" && rawFrame.envelope !== null ? rawFrame.envelope : void 0;
191582
+ if (this.requireProtocolVersion2 && rawEnvelope?.protocolVersion !== 2) {
191583
+ return {
191584
+ ok: false,
191585
+ reason: "protocol_version",
191586
+ details: { frameType: "cli.settings.request" }
191587
+ };
191588
+ }
191589
+ const parsed = cliSettingsFrameV2Schema.safeParse(rawFrame);
191489
191590
  if (!parsed.success) {
191490
191591
  return {
191491
191592
  ok: false,
@@ -191503,6 +191604,8 @@ var init_verify = __esm({
191503
191604
  const envelope = frame.envelope;
191504
191605
  const common = this.runCommonChecks("cli.settings.request", envelope);
191505
191606
  if (common) return common;
191607
+ const addressing = this.checkV2FrameAddressing(frame, envelope, envelope.event.projectId);
191608
+ if (addressing) return addressing;
191506
191609
  return {
191507
191610
  ok: true,
191508
191611
  verified: {
@@ -191618,7 +191721,7 @@ var init_trigger_verification_runtime = __esm({
191618
191721
  expectedMachineId: machineId,
191619
191722
  expectedUserId: userId,
191620
191723
  ...activatedBinding ? { expectedOrganizationId: activatedBinding.organizationId } : {},
191621
- requireProtocolVersion2: Boolean(controllerRegistryStore),
191724
+ requireProtocolVersion2: true,
191622
191725
  logger
191623
191726
  });
191624
191727
  this.router = new TriggerFrameRouter({
@@ -210177,18 +210280,30 @@ var init_local_agent_service = __esm({
210177
210280
  createRun(input) {
210178
210281
  return this.runCreationCoordinator.createRun(input);
210179
210282
  }
210180
- createRunFromTrigger(input) {
210283
+ createRunFromTrigger(capability, input) {
210284
+ this.assertCapability(capability, "CONVERSATION_TRIGGER");
210181
210285
  return this.runCreationCoordinator.createRunFromTrigger(input);
210182
210286
  }
210183
210287
  stopRun(runId) {
210184
210288
  return this.runService.stopRun(runId);
210185
210289
  }
210186
- compactRun(runId) {
210290
+ compactRun(capability, runId) {
210291
+ this.assertCapability(capability, "CONVERSATION_CONTROL_COMPACT_RUN");
210187
210292
  return this.runService.compactRun(runId);
210188
210293
  }
210189
- sendMessage(runId, input, options) {
210294
+ sendMessage(capability, runId, input, options) {
210295
+ this.assertCapability(capability, "CONVERSATION_TRIGGER");
210296
+ return this.messageService.sendMessage(runId, input, options);
210297
+ }
210298
+ /** Local lifecycle continuations that do not originate from a browser request. */
210299
+ sendSystemMessage(runId, input, options) {
210190
210300
  return this.messageService.sendMessage(runId, input, options);
210191
210301
  }
210302
+ assertCapability(capability, expectedAction) {
210303
+ if (capability.actionType !== expectedAction) {
210304
+ throw new Error(`Host action capability does not admit ${expectedAction}.`);
210305
+ }
210306
+ }
210192
210307
  readWorkflowVerdict(identity) {
210193
210308
  return this.messageService.readWorkflowVerdict(identity);
210194
210309
  }