@atolis-hq/wake 0.4.83 → 0.4.85

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.
@@ -41,6 +41,7 @@ export interface CompositionRootOptions {
41
41
  readonly fakeDeliveryProvider?: DurableFakeDeliveryProvider;
42
42
  }
43
43
  export interface CompositionRoot {
44
+ readonly workflowNotices: readonly string[];
44
45
  readonly triggers: TriggerService;
45
46
  readonly config: ResolvedWakeModulesConfig;
46
47
  readonly fakeScenarios: FakeScenarioResolver;
@@ -54,9 +54,13 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
54
54
  publicUiUrl: config.surfaces.web.publicUrl,
55
55
  githubAdapters: githubAdapters(config),
56
56
  }, conversations));
57
+ const workflowNotices = [];
57
58
  const definitions = Object.fromEntries(Object.entries(config.orchestration.workflows).map(([name, definition]) => [
58
59
  name,
59
- compileWorkflow(name, definition, activities, Object.keys(config.orchestration.workflows)),
60
+ compileWorkflow(name, definition, activities, Object.keys(config.orchestration.workflows), (diagnostic) => {
61
+ workflowNotices.push(diagnostic.message);
62
+ process.stderr.write(`Warning: ${diagnostic.message}\n`);
63
+ }),
60
64
  ]));
61
65
  const orchestration = createOrchestrationService(journal, work, definitions, projections, createAgentActivityClassifier(activities));
62
66
  const workspaces = new GitWorkspaceProvider(paths.workspacesRoot, {
@@ -196,6 +200,7 @@ export async function createCompositionRoot(wakeRoot, options = {}) {
196
200
  });
197
201
  processorRuntime.register([activationSchedulerSubscriber.processor, ...runtime.processors]);
198
202
  return {
203
+ workflowNotices,
199
204
  config,
200
205
  fakeScenarios,
201
206
  paths,
@@ -95,12 +95,18 @@ workflows:
95
95
  with: { template: refine }
96
96
  execution: { workspace: read-only, runnerPool: light }
97
97
  on:
98
+ rejected: { then: await-human }
99
+ blocked: { then: await-human }
100
+ failed: { then: await-human }
98
101
  done: { then: implement }
99
102
  implement:
100
103
  activity: agent
101
104
  with: { template: implement }
102
105
  execution: { workspace: branch, runnerPool: standard }
103
106
  on:
107
+ rejected: { then: await-human }
108
+ blocked: { then: await-human }
109
+ failed: { then: await-human }
104
110
  done: { then: done }
105
111
  approval:
106
112
  entry: refine
@@ -110,6 +116,9 @@ workflows:
110
116
  with: { template: refine }
111
117
  execution: { workspace: read-only, runnerPool: light }
112
118
  on:
119
+ rejected: { then: await-human }
120
+ blocked: { then: await-human }
121
+ failed: { then: await-human }
113
122
  done:
114
123
  then: implement
115
124
  await:
@@ -120,6 +129,9 @@ workflows:
120
129
  with: { template: implement }
121
130
  execution: { workspace: branch, runnerPool: standard }
122
131
  on:
132
+ rejected: { then: await-human }
133
+ blocked: { then: await-human }
134
+ failed: { then: await-human }
123
135
  done: { then: done }`;
124
136
  // Frontmatter is limited to model/maxTurns/allowedTools/extraArgs (see
125
137
  // execution/infrastructure/prompt-templates.ts). The scaffold bodies use
@@ -660,7 +660,7 @@ function spawnDocker(arguments_, onChunk, cwd, options) {
660
660
  }
661
661
  async function doctorDiagnostics(root) {
662
662
  const failures = [];
663
- const notices = [];
663
+ const notices = [...root.workflowNotices];
664
664
  const templates = new Map();
665
665
  try {
666
666
  createRunnerRegistry(root.config.execution, root.fakeScenarios).resolve(root.config.execution.defaultRunnerPool);
@@ -740,6 +740,7 @@ async function checkProviders(root, failures, notices) {
740
740
  failures.push('configured provider has no adapter identity');
741
741
  continue;
742
742
  }
743
+ notices.push(...((await provider.webhook?.diagnostics?.()) ?? []));
743
744
  if (provider.checkConnectivity === undefined)
744
745
  continue;
745
746
  try {
@@ -124,6 +124,6 @@ export function resolveWakeVersion(options = {}) {
124
124
  return `g${headHash.slice(0, 7)}`;
125
125
  return '0.1.0-dev';
126
126
  }
127
- export const wakeVersion = "v0.4.83";
127
+ export const wakeVersion = "v0.4.85";
128
128
  /** The registry-installable version used by packaged sandbox images. */
129
129
  export const wakePackageVersion = packageVersion(defaultRepoRoot) ?? wakeVersion;
@@ -83,6 +83,8 @@ export interface ProviderInstance {
83
83
  }
84
84
  export interface ProviderWebhook {
85
85
  provision(): Promise<void>;
86
+ /** Safe provisioning notices, read without contacting the external provider. */
87
+ diagnostics?(): Promise<readonly string[]>;
86
88
  setupInstructions(): Promise<readonly ProviderWebhookSetup[]>;
87
89
  receive(body: Buffer, headers: Readonly<Record<string, string | string[] | undefined>>, trigger: () => void): Promise<404 | 400 | 401 | 202>;
88
90
  }
@@ -26,6 +26,9 @@ function logGitHubRequestFailure(message) {
26
26
  const text = redactGitHubRequestMessage(message);
27
27
  if (requestLogStatus(text) === 304)
28
28
  return;
29
+ // Provisioning reports a repository-specific, secret-free diagnosis instead.
30
+ if (/^(?:GET|POST|PATCH) \/repos\/[^/\s]+\/[^/\s]+\/hooks(?:\/\d+)? - /.test(text))
31
+ return;
29
32
  process.stderr.write(`GitHub request failed: ${text}\n`);
30
33
  }
31
34
  export function createGitHubClient(token) {
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ export declare const WebhookOperation: {
3
+ readonly Configure: "configure webhook";
4
+ readonly Read: "read managed webhook";
5
+ readonly Create: "create webhook";
6
+ readonly Update: "update managed webhook";
7
+ readonly State: "persist webhook state";
8
+ };
9
+ export declare const webhookDiagnosisSchema: z.ZodObject<{
10
+ operation: z.ZodEnum<{
11
+ readonly Configure: "configure webhook";
12
+ readonly Read: "read managed webhook";
13
+ readonly Create: "create webhook";
14
+ readonly Update: "update managed webhook";
15
+ readonly State: "persist webhook state";
16
+ }>;
17
+ status: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>;
19
+ export type WebhookDiagnosis = z.infer<typeof webhookDiagnosisSchema>;
20
+ export declare class WebhookProvisioningFailure extends Error {
21
+ readonly diagnosis: WebhookDiagnosis;
22
+ constructor(diagnosis: WebhookDiagnosis);
23
+ }
24
+ export declare function renderWebhookDiagnosis(scope: string, diagnosis: WebhookDiagnosis): string;
25
+ export declare function webhookOperation<T>(operation: WebhookDiagnosis['operation'], run: () => Promise<T>): Promise<T>;
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod';
2
+ import { defineClosedVocabulary } from '../../../kernel/index.js';
3
+ export const WebhookOperation = defineClosedVocabulary({
4
+ Configure: 'configure webhook',
5
+ Read: 'read managed webhook',
6
+ Create: 'create webhook',
7
+ Update: 'update managed webhook',
8
+ State: 'persist webhook state',
9
+ });
10
+ export const webhookDiagnosisSchema = z.object({
11
+ operation: z.enum(WebhookOperation),
12
+ status: z.number().int().min(100).max(599).optional(),
13
+ });
14
+ export class WebhookProvisioningFailure extends Error {
15
+ diagnosis;
16
+ constructor(diagnosis) {
17
+ super('Webhook provisioning failed');
18
+ this.diagnosis = diagnosis;
19
+ }
20
+ }
21
+ export function renderWebhookDiagnosis(scope, diagnosis) {
22
+ const { operation, status } = diagnosis;
23
+ const reason = operation === WebhookOperation.Configure
24
+ ? 'surfaces.web.publicUrl is not configured'
25
+ : status === 403 || status === 404
26
+ ? `HTTP ${status}; the token may lack repository Webhooks read/write permission; verify repository access and token permissions`
27
+ : status === undefined
28
+ ? 'request or local webhook state operation failed; check connectivity and provider state access'
29
+ : `HTTP ${status}; check GitHub availability and webhook configuration`;
30
+ return `GitHub ${scope}: ${operation} failed: ${reason}. Intake continues by polling.`;
31
+ }
32
+ export async function webhookOperation(operation, run) {
33
+ try {
34
+ return await run();
35
+ }
36
+ catch (error) {
37
+ const status = typeof error === 'object' &&
38
+ error !== null &&
39
+ 'status' in error &&
40
+ typeof error.status === 'number' &&
41
+ Number.isInteger(error.status) &&
42
+ error.status >= 100 &&
43
+ error.status <= 599
44
+ ? error.status
45
+ : undefined;
46
+ throw new WebhookProvisioningFailure({
47
+ operation,
48
+ ...(status === undefined ? {} : { status }),
49
+ });
50
+ }
51
+ }
@@ -1,7 +1,9 @@
1
1
  import type { AdapterId } from '../../contracts/identifiers.js';
2
+ import { type WebhookDiagnosis } from './webhook-diagnosis.js';
2
3
  export interface GitHubWebhookState {
3
4
  readonly secret: string;
4
5
  readonly hookId?: number;
6
+ readonly diagnosis?: WebhookDiagnosis;
5
7
  }
6
8
  /** Provider operational state: intentionally outside configuration and projections. */
7
9
  export declare class GitHubWebhookStateStore {
@@ -9,6 +11,7 @@ export declare class GitHubWebhookStateStore {
9
11
  private readonly adapter;
10
12
  constructor(root: string, adapter: AdapterId);
11
13
  load(owner: string, repo: string): Promise<GitHubWebhookState>;
14
+ diagnosis(owner: string, repo: string): Promise<WebhookDiagnosis | undefined>;
12
15
  save(owner: string, repo: string, state: GitHubWebhookState): Promise<void>;
13
16
  serialise<Value>(owner: string, repo: string, operation: () => Promise<Value>): Promise<Value>;
14
17
  private path;
@@ -1,6 +1,7 @@
1
1
  import { randomBytes } from 'node:crypto';
2
2
  import { mkdir, open, readFile, rename, unlink, writeFile } from 'node:fs/promises';
3
3
  import { join } from 'node:path';
4
+ import { WebhookOperation, webhookDiagnosisSchema, } from './webhook-diagnosis.js';
4
5
  /** Provider operational state: intentionally outside configuration and projections. */
5
6
  export class GitHubWebhookStateStore {
6
7
  root;
@@ -28,6 +29,21 @@ export class GitHubWebhookStateStore {
28
29
  await this.save(owner, repo, state);
29
30
  return state;
30
31
  }
32
+ async diagnosis(owner, repo) {
33
+ try {
34
+ const parsed = JSON.parse(await readFile(this.path(owner, repo), 'utf8'));
35
+ if (typeof parsed === 'object' && parsed !== null && 'diagnosis' in parsed) {
36
+ const result = webhookDiagnosisSchema.safeParse(parsed.diagnosis);
37
+ return result.success ? result.data : undefined;
38
+ }
39
+ return undefined;
40
+ }
41
+ catch (error) {
42
+ if (error.code === 'ENOENT')
43
+ return undefined;
44
+ return { operation: WebhookOperation.State };
45
+ }
46
+ }
31
47
  async save(owner, repo, state) {
32
48
  const path = this.path(owner, repo);
33
49
  await mkdir(join(this.root, 'github-webhooks', this.adapter), { recursive: true });
@@ -1,4 +1,5 @@
1
1
  import { createHmac, timingSafeEqual } from 'node:crypto';
2
+ import { WebhookOperation, WebhookProvisioningFailure, renderWebhookDiagnosis, webhookOperation, } from './webhook-diagnosis.js';
2
3
  import { GitHubWebhookStateStore } from './webhook-state.js';
3
4
  const events = new Set([
4
5
  'issues',
@@ -17,18 +18,22 @@ export function createGitHubWebhook(adapter, config, publicUrl, root, client, he
17
18
  for (const repository of config.repositories) {
18
19
  if (!config.webhooks.enabled)
19
20
  continue;
20
- if (endpoint === undefined) {
21
- health.recordFailure(`${repository.owner}/${repository.repo}`, 'webhook', new Error('surfaces.web.publicUrl is not configured'));
22
- continue;
23
- }
24
- try {
25
- await state.serialise(repository.owner, repository.repo, () => provisionRepository(repository, endpoint, state, client, health));
26
- }
27
- catch (error) {
28
- health.recordFailure(`${repository.owner}/${repository.repo}`, 'webhook', error);
29
- }
21
+ await provisionWithDiagnosis(repository, endpoint, state, client, health);
30
22
  }
31
23
  },
24
+ async diagnostics() {
25
+ if (!config.webhooks.enabled)
26
+ return [];
27
+ const messages = await Promise.all(config.repositories.map(async ({ owner, repo }) => {
28
+ const diagnosis = endpoint === undefined
29
+ ? { operation: WebhookOperation.Configure }
30
+ : await state.diagnosis(owner, repo);
31
+ return diagnosis === undefined
32
+ ? undefined
33
+ : renderWebhookDiagnosis(owner + '/' + repo, diagnosis);
34
+ }));
35
+ return messages.filter((message) => message !== undefined);
36
+ },
32
37
  async receive(body, headers, trigger) {
33
38
  if (!config.webhooks.enabled)
34
39
  return 404;
@@ -55,7 +60,8 @@ export function createGitHubWebhook(adapter, config, publicUrl, root, client, he
55
60
  return 401;
56
61
  if (!events.has(event))
57
62
  return 404;
58
- health.recordSuccess(`${owner}/${repo}`, 'webhook');
63
+ if (saved.diagnosis === undefined)
64
+ health.recordSuccess(`${owner}/${repo}`, 'webhook');
59
65
  trigger();
60
66
  return 202;
61
67
  });
@@ -72,42 +78,70 @@ export function createGitHubWebhook(adapter, config, publicUrl, root, client, he
72
78
  },
73
79
  };
74
80
  }
75
- async function provisionRepository(repository, endpoint, state, client, health) {
76
- const scope = `${repository.owner}/${repository.repo}`;
81
+ async function provisionWithDiagnosis(repository, endpoint, state, client, health) {
82
+ const scope = repository.owner + '/' + repository.repo;
77
83
  try {
78
- const saved = await state.load(repository.owner, repository.repo);
79
- if (saved.hookId !== undefined &&
80
- (await updateManagedHook(repository, endpoint, saved, client))) {
81
- return;
82
- }
83
- const hookId = await client.createHook({
84
- ...repository,
85
- url: endpoint,
86
- secret: saved.secret,
87
- events: [...events],
84
+ await state.serialise(repository.owner, repository.repo, async () => {
85
+ try {
86
+ if (endpoint === undefined)
87
+ throw new WebhookProvisioningFailure({ operation: WebhookOperation.Configure });
88
+ await provisionRepository(repository, endpoint, state, client);
89
+ const { diagnosis: _diagnosis, ...saved } = await state.load(repository.owner, repository.repo);
90
+ await state.save(repository.owner, repository.repo, saved);
91
+ health.recordSuccess(scope, 'webhook');
92
+ }
93
+ catch (error) {
94
+ const diagnosis = error instanceof WebhookProvisioningFailure
95
+ ? error.diagnosis
96
+ : { operation: WebhookOperation.State };
97
+ const message = renderWebhookDiagnosis(scope, diagnosis);
98
+ const saved = await state.load(repository.owner, repository.repo);
99
+ await state.save(repository.owner, repository.repo, { ...saved, diagnosis });
100
+ health.recordFailure(scope, 'webhook', new Error(message));
101
+ process.stderr.write(message + '\n');
102
+ }
88
103
  });
89
- await state.save(repository.owner, repository.repo, { ...saved, hookId });
90
104
  }
91
- catch (error) {
92
- health.recordFailure(scope, 'webhook', error);
105
+ catch {
106
+ // Unavailable provider state must not prevent polling from starting.
107
+ const message = renderWebhookDiagnosis(scope, { operation: WebhookOperation.State });
108
+ health.recordFailure(scope, 'webhook', new Error(message));
109
+ process.stderr.write(message + '\n');
93
110
  }
94
111
  }
112
+ async function provisionRepository(repository, endpoint, state, client) {
113
+ const saved = await state.load(repository.owner, repository.repo);
114
+ if (saved.hookId !== undefined &&
115
+ (await updateManagedHook(repository, endpoint, saved, client))) {
116
+ return;
117
+ }
118
+ const hookId = await webhookOperation(WebhookOperation.Create, () => client.createHook({
119
+ ...repository,
120
+ url: endpoint,
121
+ secret: saved.secret,
122
+ events: [...events],
123
+ }));
124
+ await state.save(repository.owner, repository.repo, { ...saved, hookId });
125
+ }
95
126
  async function updateManagedHook(repository, endpoint, saved, client) {
96
- if (saved.hookId === undefined)
127
+ const hookId = saved.hookId;
128
+ if (hookId === undefined)
97
129
  return false;
98
130
  try {
99
- await client.getHook(repository.owner, repository.repo, saved.hookId);
100
- await client.updateHook({
131
+ await webhookOperation(WebhookOperation.Read, () => client.getHook(repository.owner, repository.repo, hookId));
132
+ await webhookOperation(WebhookOperation.Update, () => client.updateHook({
101
133
  ...repository,
102
- hookId: saved.hookId,
134
+ hookId,
103
135
  url: endpoint,
104
136
  secret: saved.secret,
105
137
  events: [...events],
106
- });
138
+ }));
107
139
  return true;
108
140
  }
109
141
  catch (error) {
110
- if (statusOf(error) === 404)
142
+ if (error instanceof WebhookProvisioningFailure &&
143
+ error.diagnosis.operation === WebhookOperation.Read &&
144
+ error.diagnosis.status === 404)
111
145
  return false;
112
146
  throw error;
113
147
  }
@@ -140,14 +174,6 @@ function safeEqual(left, right) {
140
174
  const b = Buffer.from(right);
141
175
  return a.length === b.length && timingSafeEqual(a, b);
142
176
  }
143
- function statusOf(error) {
144
- return typeof error === 'object' &&
145
- error !== null &&
146
- 'status' in error &&
147
- typeof error.status === 'number'
148
- ? error.status
149
- : undefined;
150
- }
151
177
  function webhookEndpoint(publicUrl) {
152
178
  const base = new URL(publicUrl);
153
179
  base.pathname = `${base.pathname.replace(/\/$/, '')}/webhooks/github`;
@@ -67,7 +67,9 @@ export const gitHubProviderDefinition = {
67
67
  if (!config.webhooks.enabled)
68
68
  return [];
69
69
  return [
70
- check.successCount === 0 ? { ...check, status: AdapterHealthStatus.Unknown } : check,
70
+ check.successCount === 0 && check.failureCount === 0
71
+ ? { ...check, status: AdapterHealthStatus.Unknown }
72
+ : check,
71
73
  ];
72
74
  }),
73
75
  webhook: createGitHubWebhook(adapter, config, services.publicUiUrl, services.providerStateRoot, client, health),
@@ -0,0 +1,4 @@
1
+ import { type ActivityRegistry } from '../../activities/index.js';
2
+ import type { CompiledSupplementalCommand, WorkflowDefinitionConfig } from '../contracts/config.js';
3
+ import { commandName } from '../contracts/identifiers.js';
4
+ export declare function compileCommands(config: WorkflowDefinitionConfig, activities: ActivityRegistry): Record<ReturnType<typeof commandName>, CompiledSupplementalCommand>;
@@ -0,0 +1,12 @@
1
+ import { activityName } from '../../activities/index.js';
2
+ import { commandName } from '../contracts/identifiers.js';
3
+ export function compileCommands(config, activities) {
4
+ return Object.fromEntries(Object.entries(config.commands ?? {}).map(([command, configured]) => [
5
+ commandName(command),
6
+ Object.freeze({
7
+ activity: activityName(configured.activity),
8
+ with: activities.validateInput(activityName(configured.activity), configured.with),
9
+ allowedActors: Object.freeze([...configured.allowedActors]),
10
+ }),
11
+ ]));
12
+ }
@@ -0,0 +1,10 @@
1
+ import type { ActivityRegistry } from '../../activities/index.js';
2
+ import type { CompiledStage } from '../contracts/config.js';
3
+ import type { StageName } from '../contracts/identifiers.js';
4
+ export interface WorkflowCompileDiagnostic {
5
+ readonly workflow: string;
6
+ readonly stage: string;
7
+ readonly outcome: string;
8
+ readonly message: string;
9
+ }
10
+ export declare function reportUnroutedOutcomes(workflow: string, stages: Readonly<Record<StageName, CompiledStage>>, activities: ActivityRegistry, report: (diagnostic: WorkflowCompileDiagnostic) => void): void;
@@ -0,0 +1,14 @@
1
+ export function reportUnroutedOutcomes(workflow, stages, activities, report) {
2
+ for (const [stage, configured] of Object.entries(stages)) {
3
+ for (const outcome of activities.describe(configured.activity).outcomeKinds) {
4
+ if (Object.hasOwn(configured.on, outcome))
5
+ continue;
6
+ report({
7
+ workflow,
8
+ stage,
9
+ outcome,
10
+ message: `Workflow "${workflow}" stage "${stage}": declared outcome "${outcome}" has no route.`,
11
+ });
12
+ }
13
+ }
14
+ }
@@ -1,3 +1,4 @@
1
1
  import { type ActivityRegistry } from '../../activities/index.js';
2
2
  import { type CompiledWorkflow } from '../contracts/config.js';
3
- export declare function compileWorkflow(name: string, input: unknown, activities: ActivityRegistry, knownWorkflowNames?: readonly string[]): CompiledWorkflow;
3
+ import { type WorkflowCompileDiagnostic } from './compile-diagnostics.js';
4
+ export declare function compileWorkflow(name: string, input: unknown, activities: ActivityRegistry, knownWorkflowNames?: readonly string[], reportDiagnostic?: (diagnostic: WorkflowCompileDiagnostic) => void): CompiledWorkflow;
@@ -1,12 +1,14 @@
1
1
  import { ActivityEventType, ActivityExecutionKind, activityName, ActivityOutcomeKind, } from '../../activities/index.js';
2
2
  import { workflowDefinitionConfigSchema, } from '../contracts/config.js';
3
- import { commandName, signalName, stageName, watchId, workflowName, } from '../contracts/identifiers.js';
3
+ import { signalName, stageName, watchId, workflowName, } from '../contracts/identifiers.js';
4
4
  import { ApprovalAuthorityKind, TransitionTargetKind } from '../contracts/vocabulary.js';
5
5
  import { defaultApprovalAwait } from './approval-defaults.js';
6
+ import { compileCommands } from './command-compiler.js';
7
+ import { reportUnroutedOutcomes } from './compile-diagnostics.js';
6
8
  import { compileResourceTransitions } from './resource-transition-compiler.js';
7
9
  import { compileTarget, isReservedRouteTarget, isReservedTerminalTarget, } from './transition-target.js';
8
10
  import { assertCyclesBounded, assertReachable, remainingAgentSteps } from './workflow-graph.js';
9
- export function compileWorkflow(name, input, activities, knownWorkflowNames = [name]) {
11
+ export function compileWorkflow(name, input, activities, knownWorkflowNames = [name], reportDiagnostic = () => { }) {
10
12
  const compiledName = workflowName(name);
11
13
  const config = workflowDefinitionConfigSchema.parse(input);
12
14
  const rawStageNames = Object.keys(config.stages);
@@ -25,6 +27,7 @@ export function compileWorkflow(name, input, activities, knownWorkflowNames = [n
25
27
  const watches = compileWatches(config, rawStageNames, knownWorkflowNames);
26
28
  assertReachable(compiledEntry, stages);
27
29
  assertCyclesBounded(stages);
30
+ reportUnroutedOutcomes(name, stages, activities, reportDiagnostic);
28
31
  return Object.freeze({
29
32
  remainingAgentSteps: Object.freeze(remainingAgentSteps(stages, (activity) => activities.describe(activity).executionKind === ActivityExecutionKind.Agent)),
30
33
  name: compiledName,
@@ -173,13 +176,3 @@ function compileAuthority(workflow, rawStageName, entry, declaredWatchIds) {
173
176
  throw new Error(`Unknown watch reference in workflow "${workflow}" stage "${rawStageName}": "${entry.id}"`);
174
177
  return { kind: ApprovalAuthorityKind.Watch, watch: watchId(entry.id) };
175
178
  }
176
- function compileCommands(config, activities) {
177
- return Object.fromEntries(Object.entries(config.commands ?? {}).map(([command, configured]) => [
178
- commandName(command),
179
- Object.freeze({
180
- activity: activityName(configured.activity),
181
- with: activities.validateInput(activityName(configured.activity), configured.with),
182
- allowedActors: Object.freeze([...configured.allowedActors]),
183
- }),
184
- ]));
185
- }
@@ -31,3 +31,4 @@ export * from './domain/interpreter.js';
31
31
  export * from './domain/workflow-instance.js';
32
32
  export * from './domain/workflow-selector.js';
33
33
  export * from './application/work-completion-summary.js';
34
+ export type { WorkflowCompileDiagnostic } from './domain/compile-diagnostics.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atolis-hq/wake",
3
- "version": "0.4.83",
3
+ "version": "0.4.85",
4
4
  "description": "Local autonomous agent control plane for software development",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {