orkestrator 2.38.2-beta → 2.38.3-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -208,17 +208,22 @@ derives that list from the built artifacts, so adding a dependency the bundles d
208
208
  not resolve — or bumping one in `apps/backend` or `bridges/` without mirroring it
209
209
  here — fails the suite.
210
210
 
211
- Publish from the repository root:
211
+ Releases publish this package through the "Publish npm package" GitHub
212
+ workflow, which `mise run release:publish` starts (see
213
+ [releasing.md](../../docs/development/releasing.md#publishing-the-npm-package-from-github)).
214
+ From a workstation, as the fallback:
212
215
 
213
216
  ```bash
214
217
  mise run publish:cli
215
218
  ```
216
219
 
217
- That runs `smoke:cli` first, which packs the tarball, installs it into a scratch
218
- project, checks the unbundled dependencies resolve from the installed layout,
219
- runs client help/version/errors with no backend, starts the backend, drives a
220
- fixture project/environment lifecycle through the installed client, confirms
221
- only one backend ran, and stops it. It needs network access, which is why it is
220
+ Either way, a smoke test runs first: `smoke:cli` locally, and in the workflow
221
+ `smoke-packed.ts --tarball` on the tarball it is about to publish. It packs the
222
+ tarball (unless given one), installs it into a scratch project, checks the
223
+ unbundled dependencies resolve from the installed layout, runs client
224
+ help/version/errors with no backend, starts the backend, drives a fixture
225
+ project/environment lifecycle through the installed client, confirms only one
226
+ backend ran, and stops it. It needs network access, which is why it is
222
227
  a publish gate rather than part of `mise run test`.
223
228
 
224
229
  The npm dist-tag follows the version's update channel: `2.23.0` publishes as
@@ -36,6 +36,7 @@ import path from "node:path";
36
36
 
37
37
  const MAX_BOOT_ATTEMPTS = 2;
38
38
  const READY_TIMEOUT_MS = Number(process.env.ORKESTRATOR_LAUNCHER_READY_TIMEOUT_MS ?? 120_000);
39
+ const READY_POLL_MS = shorterInterval("ORKESTRATOR_LAUNCHER_READY_POLL_MS", 500);
39
40
  const RETRY_DELAY_MS = Number(process.env.ORKESTRATOR_LAUNCHER_RETRY_DELAY_MS ?? 2_000);
40
41
  const CRASH_DELAY_MS = Number(process.env.ORKESTRATOR_LAUNCHER_CRASH_DELAY_MS ?? 5_000);
41
42
  const STOP_TIMEOUT_MS = Number(process.env.ORKESTRATOR_LAUNCHER_STOP_TIMEOUT_MS ?? 10_000);
@@ -60,6 +61,25 @@ function log(message) {
60
61
  console.error(`[launcher] ${new Date().toISOString()} ${message}`);
61
62
  }
62
63
 
64
+ /**
65
+ * A test-only override that can only shorten `fallback`: a positive integer
66
+ * no larger than it. Anything else (empty, not a number, zero, negative,
67
+ * fractional or longer) keeps `fallback` and says so, rather than letting a
68
+ * typo poll every millisecond or stretch the cadence.
69
+ */
70
+ function shorterInterval(name, fallback) {
71
+ const raw = process.env[name];
72
+ if (raw === undefined) return fallback;
73
+ const value = Number(raw);
74
+ if (raw.trim() !== "" && Number.isSafeInteger(value) && value > 0 && value <= fallback) {
75
+ return value;
76
+ }
77
+ log(
78
+ `ignoring ${name}=${JSON.stringify(raw.slice(0, 32))}: it must be a positive integer of at most ${fallback}; using ${fallback} ms`,
79
+ );
80
+ return fallback;
81
+ }
82
+
63
83
  function readJson(file) {
64
84
  try {
65
85
  return JSON.parse(readFileSync(file, "utf8"));
@@ -146,7 +166,7 @@ async function waitForReady(pid, version, exited) {
146
166
  while (Date.now() < deadline && !exited()) {
147
167
  const instance = readJson(layout.instance);
148
168
  if (instance && instance.pid === pid && instance.appVersion === version) return true;
149
- await sleep(500);
169
+ await sleep(READY_POLL_MS);
150
170
  }
151
171
  return false;
152
172
  }
package/dist/client.js CHANGED
@@ -263,13 +263,27 @@ var init_bridge = __esm(() => {
263
263
  "plugins.read-failed": "Listing plugins failed; the route answered 500.",
264
264
  "prompt.accepted": "The route accepted a prompt and answered 202.",
265
265
  "prompt.failed": "A prompt turn failed; the session reports the error.",
266
- "prompt.processing-failed": "A prompt accepted by the route failed while processing.",
266
+ "prompt.processing-provider-refused": "A prompt accepted by the route ended on a provider refusal; the turn already logged prompt.provider-refused.",
267
+ "prompt.processing-failed": "A prompt accepted by the route failed while processing, before the turn could report it.",
268
+ "prompt.processing-reported": "A prompt accepted by the route failed; the turn already logged prompt.failed.",
267
269
  "prompt.processing-usage-limited": "A prompt accepted by the route ended on a usage limit; the turn already logged prompt.usage-limited.",
270
+ "prompt.provider-refused": "A prompt turn ended because Claude refused it on the account's or the service's state; `reason` is the SDK's API error code and the session reports the error.",
268
271
  "prompt.received": "A prompt reached the bridge; only its length is logged.",
269
272
  "prompt.send-failed": "A prompt request failed; the route answered with an error.",
270
273
  "prompt.usage-limited": "A prompt turn ended because the account's plan allowance is used up; the session reports the limit.",
271
274
  "query.close-failed": "Stopping the Claude query failed while closing a tab; the close stays pending.",
272
- "query.failed": "A Claude query ended with an error result.",
275
+ "query.failed": {
276
+ description: "A Claude query ended with an error result the bridge does not know to be the account's or the service's state: `subtype` and `isError` from the result, `reason` the SDK's API error code when the turn ended on one, `apiStatus` its HTTP status, `startupFailure` whether the CLI failed to start.",
277
+ essential: true,
278
+ fields: {
279
+ subtype: "label",
280
+ isError: "boolean",
281
+ reason: "label",
282
+ apiStatus: "number",
283
+ startupFailure: "boolean"
284
+ }
285
+ },
286
+ "query.provider-refused": "Claude refused a query on the account's or the service's state (a refused login, an account on hold, an overloaded or failing API); `reason` is the SDK's API error code and the turn reports the provider's words.",
273
287
  "query.usage-limited": "Claude refused a query because the account's plan allowance is used up; the turn reports the limit.",
274
288
  "question.answer-failed": "The answer-question route failed.",
275
289
  "question.answering": "Answering a parked question.",
@@ -898,6 +912,7 @@ var init_native_agent = __esm(() => {
898
912
  "title.strategy-failed": "A session title strategy failed, so the next is tried. Content-free: the error can quote the prompt.",
899
913
  "steer.qualification-failed": "A bridge's steer qualification failed or answered non-OK, so steering is not offered. Agent and status code or error class only.",
900
914
  "steer.capability-cleared": "A projection cleared `actions.steer` because its bridge did not qualify. Identifiers and turn status only.",
915
+ "queue.turn-not-running": "A projection holds queued prompts while its turn is not `running`; once per change of phase. Identifiers, phase and queue length only.",
901
916
  ...THROTTLE_LOG_EVENTS
902
917
  }
903
918
  },
@@ -1404,6 +1419,7 @@ var init_build_pipeline = __esm(() => {
1404
1419
  "sidebar.reconcile-failed": "Sidebar activity for pipelines could not be reconciled.",
1405
1420
  "sidebar.update-failed": "The sidebar could not be updated for one pipeline.",
1406
1421
  "result.consume-deferred": "Consuming a stage's workflow result failed; it stays staged and is retried.",
1422
+ "review.prompt-reads": "A review fan-out pass built or tried to build reviewer prompts; how many it built, and how often building them read the review instruction and project notes, failed reads included. Counts only.",
1407
1423
  "consolidation.consume-deferred": "Consuming a review consolidation result failed; it stays pending and is retried.",
1408
1424
  "dispatch.prepare-failed": "Attaching the agent before dispatch failed; the prompt request does the same work and answers authoritatively.",
1409
1425
  "interaction.resolved": "A human interaction on a pipeline stage resolved. Metadata only.",
@@ -1460,6 +1476,8 @@ var init_change_tracking = __esm(() => {
1460
1476
  "retention.failed": "A retention pass failed partway; what it deleted stands and the next pass goes on.",
1461
1477
  "projection.failed": "Projecting a change event onto its environment failed.",
1462
1478
  "startup.reconcile-failed": "Reconciling change tracking at startup failed.",
1479
+ "deleted-environments.purge-requested": "The startup reconcile found ledger rows of environments the environment store no longer holds and requested their purge.",
1480
+ "deleted-environments.reconcile-failed": "The startup reconcile of deleted environments could not read the environment store, so it requested no purge.",
1463
1481
  "turn-start.capture-failed": "Capturing a turn's start failed, so the turn is untracked.",
1464
1482
  "dispatch.record-failed": "Recording a turn's dispatch outcome failed.",
1465
1483
  "turn.finalize-failed": "Finalizing a turn failed.",
@@ -1720,9 +1738,15 @@ var init_docker = __esm(() => {
1720
1738
  essential: true,
1721
1739
  fields: { staleForMs: "number" }
1722
1740
  },
1723
- "writer-lease.listener-failed": "The callback told about a lost registry writer lease threw, so the schedules settings learn of the loss only at their next read.",
1741
+ "writer-lease.listener-failed": "The callback told about a lost, or a late-won, registry writer lease threw, so the schedules settings learn of the change only at their next read.",
1742
+ "writer-lease.acquired-late": {
1743
+ description: "A backend that started without the registry writer lease won it later, because its holder stopped refreshing it (most often a crash just before this backend started). Schedules fire and container changes are allowed from now on; the `writer-lease.regained` line before it gives the stale lease's age.",
1744
+ essential: true,
1745
+ fields: {}
1746
+ },
1747
+ "writer-lease.retry-failed": "A backend without the registry writer lease could not try for it again for a reason other than the lease being held (an unreadable data directory, say). It tries again on its next tick.",
1724
1748
  "writer-lease.not-acquired": {
1725
- description: "This backend started without the registry writer lease, for the fixed `reason` given. A second backend on one data directory is normal: it serves reads, runs no schedules and refuses container changes.",
1749
+ description: "This backend started without the registry writer lease, for the fixed `reason` given. A second backend on one data directory is normal: it serves reads, runs no schedules and refuses container changes. A `busy` one keeps trying and writes `writer-lease.acquired-late` if it wins the lease once its holder stops refreshing it.",
1726
1750
  essential: true,
1727
1751
  fields: { reason: "label" }
1728
1752
  },
@@ -1951,6 +1975,7 @@ var init_feature = __esm(() => {
1951
1975
  feature: {
1952
1976
  description: "Pipeline environments started from a feature, and feature planning.",
1953
1977
  events: {
1978
+ "debug-build.launched": "The debug button's pipeline environment was launched. Ids and counts only: no ticket text, transcript or screenshot.",
1954
1979
  "naming.fallback": "Automatic naming failed, so a local fallback name is used. Error kind only: the description stays out.",
1955
1980
  "planning.legacy-adopt-failed": "Legacy planning conversations could not be adopted.",
1956
1981
  "planning.tick-retrying": "A planning tick failed on a transient error; the next tick retries."
@@ -2680,7 +2705,7 @@ var init_log_vocabulary = __esm(() => {
2680
2705
  var init_renderer_errors = () => {};
2681
2706
 
2682
2707
  // ../protocol/src/log-essential-labels.ts
2683
- var ERROR_NAMES, ERROR_CODES, SYSCALLS, SIGNALS, PROVIDERS, BRIDGE_LISTENER_REASONS, UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", SOURCE, STORAGE_DATABASES, STORAGE_OPERATIONS, TRANSACTION_MODES, STORAGE_TABLES;
2708
+ var ERROR_NAMES, ERROR_CODES, SYSCALLS, SIGNALS, PROVIDERS, BRIDGE_LISTENER_REASONS, CLAUDE_RESULT_SUBTYPES, CLAUDE_API_ERRORS, UUID = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", SOURCE, STORAGE_DATABASES, STORAGE_OPERATIONS, TRANSACTION_MODES, STORAGE_TABLES;
2684
2709
  var init_log_essential_labels = __esm(() => {
2685
2710
  init_log_vocabulary();
2686
2711
  init_renderer_errors();
@@ -2797,6 +2822,28 @@ var init_log_essential_labels = __esm(() => {
2797
2822
  "no-listener",
2798
2823
  "launch-exited"
2799
2824
  ]);
2825
+ CLAUDE_RESULT_SUBTYPES = new Set([
2826
+ "success",
2827
+ "error_during_execution",
2828
+ "error_max_turns",
2829
+ "error_max_budget_usd",
2830
+ "error_max_structured_output_retries"
2831
+ ]);
2832
+ CLAUDE_API_ERRORS = new Set([
2833
+ "authentication_failed",
2834
+ "oauth_org_not_allowed",
2835
+ "account_on_hold",
2836
+ "verification_required",
2837
+ "billing_error",
2838
+ "rate_limit",
2839
+ "overloaded",
2840
+ "invalid_request",
2841
+ "model_not_found",
2842
+ "server_error",
2843
+ "unknown",
2844
+ "max_output_tokens",
2845
+ "cloud_credential_error"
2846
+ ]);
2800
2847
  SOURCE = new RegExp(`^(?:claude|codex|opencode|cursor|grok|acp|pi):${UUID}$`, "i");
2801
2848
  STORAGE_DATABASES = new Set(["main", "ledger", "other"]);
2802
2849
  STORAGE_OPERATIONS = new Set([
@@ -13209,7 +13256,7 @@ import path5 from "path";
13209
13256
  // ../../apps/backend/package.json
13210
13257
  var package_default = {
13211
13258
  name: "@orkestrator/backend",
13212
- version: "2.38.2-beta",
13259
+ version: "2.38.3-beta",
13213
13260
  private: true,
13214
13261
  type: "module",
13215
13262
  exports: {
@@ -14405,6 +14452,9 @@ var WORKFLOW_RESULT_TOOL_NAMES = {
14405
14452
  "subork-answer": "submit_subork_answer"
14406
14453
  };
14407
14454
  var WORKFLOW_RESULT_VALIDATION_TOOL_NAME = "validate_workflow_result";
14455
+ var WORKFLOW_RESULT_TOOL_META = Object.freeze({
14456
+ "anthropic/alwaysLoad": true
14457
+ });
14408
14458
  var GRAPH_PORT_SUBMIT_PREFIX = "submit_";
14409
14459
  var GRAPH_PORT_VALIDATE_PREFIX = "validate_";
14410
14460
  var WORKFLOW_RESULT_KIND_TOOLS = new Set(Object.values(WORKFLOW_RESULT_TOOL_NAMES));