@exaudeus/workrail 3.71.0 → 3.71.1

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.
@@ -473,16 +473,16 @@
473
473
  "sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
474
474
  "bytes": 8011
475
475
  },
476
+ "console-ui/assets/index-CsX-nVV7.js": {
477
+ "sha256": "57fceecd0a6f6e93abe8744b152ff1e13e3c7634ffe16e23ea65a6c974365a44",
478
+ "bytes": 768234
479
+ },
476
480
  "console-ui/assets/index-DHrKiMCf.css": {
477
481
  "sha256": "40290b50e21ee7e82433efe13b1aa31c1ea608bd057a5c4e324982f284bc928b",
478
482
  "bytes": 60673
479
483
  },
480
- "console-ui/assets/index-DyREuUoq.js": {
481
- "sha256": "707d1b21939b7a0b64ce067f287c5e65d9d87e32b21a7834c1988fe0b1f4820a",
482
- "bytes": 768234
483
- },
484
484
  "console-ui/index.html": {
485
- "sha256": "c72b4bbd458e888ef0bd73fe92eb44ca0567fe2fcb5829da935005a51da8e3c8",
485
+ "sha256": "21656fcb9f9c4ed223af103ec300e178cf512e9354ee92bd2c4e0278151ebff4",
486
486
  "bytes": 417
487
487
  },
488
488
  "console/standalone-console.d.ts": {
@@ -654,12 +654,12 @@
654
654
  "bytes": 5921
655
655
  },
656
656
  "daemon/workflow-runner.d.ts": {
657
- "sha256": "4171b669c0c1fba24f1670c90f63d0697bb0ab359dfa80239f045c7f78ffab0c",
658
- "bytes": 11407
657
+ "sha256": "2d686ca9de2bcb88565782eb7070b3fddbe47ed423f2c0437e13fc9b900961d0",
658
+ "bytes": 14002
659
659
  },
660
660
  "daemon/workflow-runner.js": {
661
- "sha256": "dd20c7c497aed496da879f373065114500ba223970ad0e9425a52f83733cdd5e",
662
- "bytes": 112522
661
+ "sha256": "bac1125ad3099821552a934580be7b9b7953e8361735c8f20e798a4b2674ee28",
662
+ "bytes": 118834
663
663
  },
664
664
  "di/container.d.ts": {
665
665
  "sha256": "003bb7fb7478d627524b9b1e76bd0a963a243794a687ff233b96dc0e33a06d9f",
@@ -1082,8 +1082,8 @@
1082
1082
  "bytes": 1055
1083
1083
  },
1084
1084
  "mcp/handlers/v2-advance-core/outcome-success.js": {
1085
- "sha256": "da571c46173d12cc689abcfbf6d7e3768ef04c958f073ff1b22347ae23a68fde",
1086
- "bytes": 10703
1085
+ "sha256": "9b7169001269c1c94a158cd9b82ed60bcef1831202527446b75c23232f4fb031",
1086
+ "bytes": 10509
1087
1087
  },
1088
1088
  "mcp/handlers/v2-advance-events.d.ts": {
1089
1089
  "sha256": "318894df12e0dfc74cad9e81fcea44bc04ea972d6e887cd5b196de1f144e256b",
@@ -1102,12 +1102,12 @@
1102
1102
  "bytes": 10800
1103
1103
  },
1104
1104
  "mcp/handlers/v2-context-budget.d.ts": {
1105
- "sha256": "cbad1741a183d52c9cbe558be2e09f776843d1f3ec8cd28d6d0d230668e4298c",
1106
- "bytes": 674
1105
+ "sha256": "cc5c05d9b7843bd1eb8c7ea513cdac3a68b499ad915213db819e4e3c9945fcec",
1106
+ "bytes": 402
1107
1107
  },
1108
1108
  "mcp/handlers/v2-context-budget.js": {
1109
- "sha256": "e27121c84449f8bdcbcd37a242db54c1afda4a14bc6bc50e148aaf96fecd45b3",
1110
- "bytes": 8181
1109
+ "sha256": "a99bf293bc941e87ad0125db109e971fadf195d8424232d7871323141c9d9daf",
1110
+ "bytes": 7493
1111
1111
  },
1112
1112
  "mcp/handlers/v2-error-mapping.d.ts": {
1113
1113
  "sha256": "4522217a754afc6a2ee3834368decb7fb22ebf9d4c72fc0de9890903d652d76c",
@@ -1730,16 +1730,16 @@
1730
1730
  "bytes": 1798
1731
1731
  },
1732
1732
  "trigger/trigger-listener.js": {
1733
- "sha256": "4f009b4b5a8741f7208fcd44c773a07ae9fce4642060b8dc577ae05a2c3ffd05",
1734
- "bytes": 25710
1733
+ "sha256": "540e3942790b8b00f22b43575d83db4aa96cfdaf4ad6ea1fcaa8470e793b3bee",
1734
+ "bytes": 25847
1735
1735
  },
1736
1736
  "trigger/trigger-router.d.ts": {
1737
1737
  "sha256": "618f1b346eb18d83ea76f71c0008be6f7ae76cc7734a93abd8afd30d26d24806",
1738
1738
  "bytes": 3064
1739
1739
  },
1740
1740
  "trigger/trigger-router.js": {
1741
- "sha256": "605ca0c92206f24c95b0191c6c2064d52dccef18dca274c2cc2de9eab5140e5a",
1742
- "bytes": 24778
1741
+ "sha256": "68a9dacf69468aef7cfb0f0da72122d33f34236e5296b176def5f40dbb0f0839",
1742
+ "bytes": 24842
1743
1743
  },
1744
1744
  "trigger/trigger-store.d.ts": {
1745
1745
  "sha256": "f846ca66494a2a1b834914652c845373d777bdeaaaefdc101ad1e78083d9ad5b",
@@ -2342,7 +2342,7 @@
2342
2342
  "bytes": 3397
2343
2343
  },
2344
2344
  "v2/durable-core/schemas/export-bundle/index.d.ts": {
2345
- "sha256": "ff1ecf2c94733299d79f0a448038bb1db3c3fc015184e7c90d5124264443a22f",
2345
+ "sha256": "823a96b41bc27defef5ba7fc2eb34ab0cf09db2f2d71dd9820d02564b1cce788",
2346
2346
  "bytes": 551200
2347
2347
  },
2348
2348
  "v2/durable-core/schemas/export-bundle/index.js": {
@@ -8,7 +8,6 @@ const workflow_compiler_js_1 = require("../../../application/services/workflow-c
8
8
  const workflow_interpreter_js_1 = require("../../../application/services/workflow-interpreter.js");
9
9
  const recommendation_warnings_js_1 = require("../../../v2/durable-core/domain/recommendation-warnings.js");
10
10
  const v2_state_conversion_js_1 = require("../v2-state-conversion.js");
11
- const v2_context_budget_js_1 = require("../v2-context-budget.js");
12
11
  const v2_advance_events_js_1 = require("../v2-advance-events.js");
13
12
  const event_builders_js_1 = require("./event-builders.js");
14
13
  const assessment_recorded_event_builder_js_1 = require("../../../v2/durable-core/domain/assessment-recorded-event-builder.js");
@@ -63,10 +62,7 @@ function buildSuccessOutcome(args) {
63
62
  if (advanced.isErr()) {
64
63
  return errAsync({ kind: 'advance_apply_failed', message: advanced.error.message });
65
64
  }
66
- const artifactsForEval = (0, v2_context_budget_js_1.collectArtifactsForEvaluation)({
67
- truthEvents: truth.events,
68
- inputArtifacts: inputOutput?.artifacts ?? [],
69
- });
65
+ const artifactsForEval = inputOutput?.artifacts ?? [];
70
66
  const nextRes = interpreter.next(compiledWf.value, advanced.value, v.mergedContext, artifactsForEval);
71
67
  if (nextRes.isErr()) {
72
68
  if (nextRes.error._tag === 'MissingContext') {
@@ -10,8 +10,3 @@ export declare function checkContextBudget(args: {
10
10
  readonly tool: ContextToolNameV2;
11
11
  readonly context: unknown;
12
12
  }): ContextBudgetCheck;
13
- import type { DomainEventV1 } from '../../v2/durable-core/schemas/session/index.js';
14
- export declare function collectArtifactsForEvaluation(args: {
15
- readonly truthEvents: readonly DomainEventV1[];
16
- readonly inputArtifacts: readonly unknown[];
17
- }): readonly unknown[];
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkContextBudget = checkContextBudget;
4
- exports.collectArtifactsForEvaluation = collectArtifactsForEvaluation;
5
4
  const types_js_1 = require("../types.js");
6
5
  const jcs_js_1 = require("../../v2/durable-core/canonical/jcs.js");
7
6
  const constants_js_1 = require("../../v2/durable-core/constants.js");
@@ -169,19 +168,3 @@ function checkContextBudget(args) {
169
168
  }
170
169
  return { ok: true };
171
170
  }
172
- function collectArtifactsForEvaluation(args) {
173
- const collected = [];
174
- for (const e of args.truthEvents) {
175
- if (e.kind !== constants_js_1.EVENT_KIND.NODE_OUTPUT_APPENDED)
176
- continue;
177
- if (e.data.outputChannel !== constants_js_1.OUTPUT_CHANNEL.ARTIFACT)
178
- continue;
179
- if (e.data.payload.payloadKind !== constants_js_1.PAYLOAD_KIND.ARTIFACT_REF)
180
- continue;
181
- const payload = e.data.payload;
182
- if (payload.content === undefined)
183
- continue;
184
- collected.push(payload.content);
185
- }
186
- return [...collected, ...args.inputArtifacts];
187
- }
@@ -134,8 +134,9 @@ async function startTriggerListener(ctx, options) {
134
134
  if (env['WORKRAIL_TRIGGERS_ENABLED'] !== 'true') {
135
135
  return null;
136
136
  }
137
- const apiKey = options.apiKey ?? env['ANTHROPIC_API_KEY'];
138
- if (!apiKey) {
137
+ const apiKey = options.apiKey ?? env['ANTHROPIC_API_KEY'] ?? '';
138
+ const hasBedrock = !!(env['AWS_PROFILE'] || env['AWS_ACCESS_KEY_ID']);
139
+ if (!apiKey && !hasBedrock) {
139
140
  return { _kind: 'err', error: { kind: 'missing_api_key' } };
140
141
  }
141
142
  const workspaceResult = (0, config_file_js_1.loadWorkspacesFromConfigFile)();
@@ -499,7 +500,7 @@ async function startTriggerListener(ctx, options) {
499
500
  const polledEventStore = new polled_event_store_js_1.PolledEventStore(env);
500
501
  const pollingScheduler = new polling_scheduler_js_1.PollingScheduler(allTriggers, router, polledEventStore, options.fetchFn);
501
502
  pollingScheduler.start();
502
- await (0, workflow_runner_js_1.runStartupRecovery)(undefined, undefined, ctx).catch((err) => {
503
+ await (0, workflow_runner_js_1.runStartupRecovery)(undefined, undefined, ctx, undefined, undefined, undefined, apiKey).catch((err) => {
503
504
  console.warn('[TriggerListener] Startup recovery encountered an unexpected error:', err instanceof Error ? err.message : String(err));
504
505
  });
505
506
  const portEnv = env['WORKRAIL_TRIGGER_PORT'];
@@ -123,16 +123,16 @@ function validateHmac(rawBody, secret, headerValue) {
123
123
  async function maybeRunDelivery(triggerId, trigger, result, execFn) {
124
124
  if (result._tag !== 'success')
125
125
  return;
126
- if (result.lastStepNotes === undefined) {
127
- if (trigger.autoCommit === true) {
128
- console.warn(`[TriggerRouter] Delivery skipped: triggerId=${triggerId} -- ` +
129
- `lastStepNotes is absent (agent did not provide notes on the final step). ` +
130
- `Ensure the workflow produces a JSON handoff block in its final step notes.`);
131
- }
126
+ if (trigger.autoCommit !== true) {
127
+ console.log(`[TriggerRouter] Delivery skipped: triggerId=${triggerId} -- autoCommit not set for this trigger.`);
132
128
  return;
133
129
  }
134
- if (trigger.autoCommit !== true)
130
+ if (result.lastStepNotes === undefined) {
131
+ console.warn(`[TriggerRouter] Delivery skipped: triggerId=${triggerId} -- ` +
132
+ `lastStepNotes is absent (agent did not provide notes on the final step). ` +
133
+ `Ensure the workflow produces a JSON handoff block in its final step notes.`);
135
134
  return;
135
+ }
136
136
  const parseResult = (0, delivery_action_js_1.parseHandoffArtifact)(result.lastStepNotes);
137
137
  if (parseResult.kind === 'err') {
138
138
  console.warn(`[TriggerRouter] Delivery skipped: triggerId=${triggerId} -- ` +
@@ -11871,21 +11871,6 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
11871
11871
  pinnedWorkflows: Record<string, unknown>;
11872
11872
  }>;
11873
11873
  }, "strip", z.ZodTypeAny, {
11874
- bundleSchemaVersion: 1;
11875
- bundleId: string;
11876
- exportedAt: string;
11877
- producer: {
11878
- appVersion: string;
11879
- appliedConfigHash?: string | undefined;
11880
- };
11881
- integrity: {
11882
- kind: "sha256_manifest_v1";
11883
- entries: {
11884
- path: string;
11885
- sha256: string;
11886
- bytes: number;
11887
- }[];
11888
- };
11889
11874
  session: {
11890
11875
  sessionId: string;
11891
11876
  snapshots: Record<string, {
@@ -12512,7 +12497,6 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
12512
12497
  })[];
12513
12498
  pinnedWorkflows: Record<string, unknown>;
12514
12499
  };
12515
- }, {
12516
12500
  bundleSchemaVersion: 1;
12517
12501
  bundleId: string;
12518
12502
  exportedAt: string;
@@ -12528,6 +12512,7 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
12528
12512
  bytes: number;
12529
12513
  }[];
12530
12514
  };
12515
+ }, {
12531
12516
  session: {
12532
12517
  sessionId: string;
12533
12518
  snapshots: Record<string, {
@@ -13142,6 +13127,21 @@ export declare const ExportBundleV1Schema: z.ZodObject<{
13142
13127
  })[];
13143
13128
  pinnedWorkflows: Record<string, unknown>;
13144
13129
  };
13130
+ bundleSchemaVersion: 1;
13131
+ bundleId: string;
13132
+ exportedAt: string;
13133
+ producer: {
13134
+ appVersion: string;
13135
+ appliedConfigHash?: string | undefined;
13136
+ };
13137
+ integrity: {
13138
+ kind: "sha256_manifest_v1";
13139
+ entries: {
13140
+ path: string;
13141
+ sha256: string;
13142
+ bytes: number;
13143
+ }[];
13144
+ };
13145
13145
  }>;
13146
13146
  export type ExportBundleV1 = z.infer<typeof ExportBundleV1Schema>;
13147
13147
  export declare const BundleImportErrorCodeSchema: z.ZodEnum<["BUNDLE_INVALID_FORMAT", "BUNDLE_UNSUPPORTED_VERSION", "BUNDLE_INTEGRITY_FAILED", "BUNDLE_MISSING_SNAPSHOT", "BUNDLE_MISSING_PINNED_WORKFLOW", "BUNDLE_EVENT_ORDER_INVALID", "BUNDLE_MANIFEST_ORDER_INVALID"]>;