@atolis-hq/wake 0.4.110 → 0.4.112

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 (67) hide show
  1. package/dist/src/bootstrap/board-projection.d.ts +4 -0
  2. package/dist/src/bootstrap/board-projection.js +33 -19
  3. package/dist/src/bootstrap/composition-root.d.ts +3 -1
  4. package/dist/src/bootstrap/composition-root.js +21 -6
  5. package/dist/src/bootstrap/delegated-artifact-context.d.ts +15 -0
  6. package/dist/src/bootstrap/delegated-artifact-context.js +17 -0
  7. package/dist/src/bootstrap/initialise.js +20 -2
  8. package/dist/src/bootstrap/integration-runtime.js +1 -0
  9. package/dist/src/bootstrap/objective-title-context.d.ts +7 -0
  10. package/dist/src/bootstrap/objective-title-context.js +15 -0
  11. package/dist/src/bootstrap/self-update-application.d.ts +9 -0
  12. package/dist/src/bootstrap/self-update-application.js +15 -1
  13. package/dist/src/bootstrap/self-update-build-failure.d.ts +7 -0
  14. package/dist/src/bootstrap/self-update-build-failure.js +18 -0
  15. package/dist/src/bootstrap/surface-api-delivery.js +6 -1
  16. package/dist/src/bootstrap/surface-api-work-applications.js +39 -5
  17. package/dist/src/bootstrap/surface-api-workflow-diagrams.js +8 -4
  18. package/dist/src/bootstrap/surface-cli-applications.js +10 -4
  19. package/dist/src/bootstrap/version.js +1 -1
  20. package/dist/src/conversations/application/control-plane-entry.d.ts +14 -0
  21. package/dist/src/conversations/application/control-plane-entry.js +16 -0
  22. package/dist/src/conversations/index.d.ts +1 -0
  23. package/dist/src/conversations/index.js +1 -0
  24. package/dist/src/integrations/application/agent-run-publication-reactor.d.ts +2 -1
  25. package/dist/src/integrations/application/agent-run-publication-reactor.js +6 -17
  26. package/dist/src/integrations/application/agent-run-publication-target.d.ts +12 -0
  27. package/dist/src/integrations/application/agent-run-publication-target.js +31 -0
  28. package/dist/src/integrations/application/artifact-registration-reactor.js +4 -2
  29. package/dist/src/integrations/contracts/provider.d.ts +5 -0
  30. package/dist/src/integrations/github/application/inbound-translator.d.ts +7 -0
  31. package/dist/src/integrations/github/application/inbound-translator.js +46 -0
  32. package/dist/src/integrations/github/provider.js +1 -0
  33. package/dist/src/orchestration/application/conversation-command-reactor.js +6 -25
  34. package/dist/src/orchestration/application/delegated-work.d.ts +12 -2
  35. package/dist/src/orchestration/application/delegated-work.js +30 -3
  36. package/dist/src/orchestration/application/delegation-attention-state.d.ts +2 -0
  37. package/dist/src/orchestration/application/delegation-attention-state.js +11 -1
  38. package/dist/src/orchestration/application/delegation-attention.d.ts +9 -11
  39. package/dist/src/orchestration/application/delegation-attention.js +42 -23
  40. package/dist/src/orchestration/application/orchestration-service.d.ts +11 -4
  41. package/dist/src/orchestration/application/orchestration-service.js +22 -16
  42. package/dist/src/orchestration/application/prerequisite-readiness.d.ts +8 -0
  43. package/dist/src/orchestration/application/prerequisite-readiness.js +35 -0
  44. package/dist/src/orchestration/contracts/delegation-ports.d.ts +16 -0
  45. package/dist/src/orchestration/contracts/delegation.d.ts +6 -4
  46. package/dist/src/orchestration/contracts/delegation.js +13 -3
  47. package/dist/src/orchestration/contracts/vocabulary.d.ts +1 -0
  48. package/dist/src/orchestration/contracts/vocabulary.js +1 -0
  49. package/dist/src/orchestration/domain/delegated-brief.d.ts +8 -0
  50. package/dist/src/orchestration/domain/delegated-brief.js +35 -0
  51. package/dist/src/orchestration/index.d.ts +1 -1
  52. package/dist/src/resources/contracts/events.js +1 -0
  53. package/dist/src/resources/contracts/vocabulary.d.ts +2 -0
  54. package/dist/src/resources/contracts/vocabulary.js +2 -0
  55. package/dist/src/surfaces/api/contracts/board.d.ts +4 -0
  56. package/dist/src/surfaces/api/contracts/work.d.ts +9 -0
  57. package/dist/src/surfaces/mcp/delegation.js +2 -2
  58. package/dist/src/surfaces/web-assets/assets/index-BDXgDwPe.js +1192 -0
  59. package/dist/src/surfaces/web-assets/assets/index-DKNzCDQl.css +1 -0
  60. package/dist/src/surfaces/web-assets/index.html +2 -2
  61. package/docker/Dockerfile.runtime +10 -1
  62. package/docker/Dockerfile.runtime.packaged +10 -1
  63. package/package.json +1 -1
  64. package/dist/src/orchestration/application/delegation-attention-escalations.d.ts +0 -11
  65. package/dist/src/orchestration/application/delegation-attention-escalations.js +0 -36
  66. package/dist/src/surfaces/web-assets/assets/index-CJVgp3N-.js +0 -1192
  67. package/dist/src/surfaces/web-assets/assets/index-EVgZ9q9N.css +0 -1
@@ -62,14 +62,7 @@ export class OrchestrationService {
62
62
  this.claims = new CoordinationClaims(journal);
63
63
  this.definitions = new WorkflowDefinitionRegistry(journal, projections, definitions);
64
64
  this.startWorkflow = new StartWorkflow(repository, this.claims, work, this.definitions);
65
- this.delegatedWork = new DelegatedWork(repository, work, this.claims, this.definitions, this.startWorkflow, {
66
- authority: dependencies?.authority,
67
- artifacts: dependencies?.artifacts ?? unavailableArtifacts,
68
- repositories: dependencies?.repositories,
69
- runHasEnded: dependencies?.runHasEnded ?? unavailableRunCompletion,
70
- supportsAttention: isAgentActivity,
71
- resumeChild: this.resumeClarification,
72
- });
65
+ this.delegatedWork = new DelegatedWork(repository, work, this.claims, this.definitions, this.startWorkflow, delegatedWorkDependencies(dependencies, isAgentActivity, this.resumeClarification));
73
66
  this.delegationCommands = new DelegationCommands(repository, work, this.startWorkflow, this.definitions, this.delegatedWork, dependencies?.authority ?? unavailableDelegationAuthority);
74
67
  this.delivery = new DeliveryCoordinator(repository, deliveryDependencies(dependencies, async (parent) => this.startWorkflow.definitionFor(parent), work));
75
68
  this.advanceWorkflow = new AdvanceWorkflow(repository, this.startWorkflow, (command, context) => this.acceptOutcome(command, context), isAgentActivity);
@@ -155,8 +148,8 @@ export class OrchestrationService {
155
148
  delivery: await this.delivery.inspectFor(caller),
156
149
  };
157
150
  }
158
- deliveryTree(id) {
159
- return this.delegatedWork.inspect(id);
151
+ deliveryTree(id, options) {
152
+ return this.delegatedWork.inspect(id, options);
160
153
  }
161
154
  deliveryRunLimit(id) {
162
155
  return this.delegatedWork.runLimit(id);
@@ -204,14 +197,14 @@ export class OrchestrationService {
204
197
  await this.delegatedWork.reconcile(context);
205
198
  return (await this.repository.loadRequired(command.workflowInstanceId)).view;
206
199
  }
207
- /** Delegated children still blocked on a question this work item's parent escalated to a human. */
208
- async escalatedReplyTargets(workItemId) {
209
- const targets = [];
200
+ /**
201
+ * A human replied on this work item while delegated children wait on a clarification: wake
202
+ * the delegating stage once, so the parent decides how to pass the reply to each child.
203
+ */
204
+ async requestReplyAssessment(workItemId, replyEntryId, context) {
210
205
  for (const parent of await this.advanceWorkflow.listAll())
211
206
  if (parent.workItemId === workItemId)
212
- for (const target of await this.delegatedWork.attention.escalatedTargets(parent))
213
- targets.push(target.childWorkItemId);
214
- return targets;
207
+ await this.delegatedWork.assessReply(parent, replyEntryId, context);
215
208
  }
216
209
  /** The open attention request when `activationId` is the attention activation, else null. */
217
210
  async openDelegationAttention(id, activationId) {
@@ -500,6 +493,19 @@ function isReviewConversationCommand(command) {
500
493
  command === ConversationBuiltInCommand.Accepted ||
501
494
  command === ConversationBuiltInCommand.Changes);
502
495
  }
496
+ /** The delegation dependencies Orchestration hands to DelegatedWork, with safe unavailable stubs. */
497
+ function delegatedWorkDependencies(dependencies, supportsAttention, resumeChild) {
498
+ return {
499
+ authority: dependencies?.authority,
500
+ artifacts: dependencies?.artifacts ?? unavailableArtifacts,
501
+ repositories: dependencies?.repositories,
502
+ runHasEnded: dependencies?.runHasEnded ?? unavailableRunCompletion,
503
+ supportsAttention,
504
+ resumeChild,
505
+ messages: dependencies?.messages,
506
+ resources: dependencies?.resources,
507
+ };
508
+ }
503
509
  async function unavailableRunCompletion() {
504
510
  throw new Error('Delegation adapters unavailable');
505
511
  }
@@ -56,6 +56,14 @@ export declare class PrerequisiteReadiness {
56
56
  } | undefined;
57
57
  } | undefined;
58
58
  workflow(id: string): WorkflowInstanceView | undefined;
59
+ /**
60
+ * Why a child is held back, from recorded facts only. Read paths use this because the full
61
+ * evaluation asks the provider to re-verify upstream outputs; drift is detected by
62
+ * reconciliation, which records a block this method then reports.
63
+ */
64
+ recordedReason(id: string, seen?: Set<string>): string | undefined;
65
+ private upstreamOf;
66
+ private recordedUpstreamReason;
59
67
  reason(id: string): Promise<string | undefined>;
60
68
  block(id: string, seen?: Set<string>): Promise<PrerequisiteBlock | undefined>;
61
69
  private evaluate;
@@ -55,6 +55,41 @@ export class PrerequisiteReadiness {
55
55
  workflow(id) {
56
56
  return this.workflows.get(id);
57
57
  }
58
+ /**
59
+ * Why a child is held back, from recorded facts only. Read paths use this because the full
60
+ * evaluation asks the provider to re-verify upstream outputs; drift is detected by
61
+ * reconciliation, which records a block this method then reports.
62
+ */
63
+ recordedReason(id, seen = new Set()) {
64
+ const blocked = this.blockers.get(id);
65
+ if (blocked !== undefined)
66
+ return blocked.reason;
67
+ const child = this.children.get(id);
68
+ // Pinned inputs mean every prerequisite was met when the child was started.
69
+ if (child === undefined || this.receipts.has(id) || seen.has(id))
70
+ return undefined;
71
+ for (const edge of child.prerequisites ?? []) {
72
+ const upstream = this.upstreamOf(child, edge);
73
+ if (upstream === undefined)
74
+ continue;
75
+ return this.recordedUpstreamReason(upstream, edge, new Set([...seen, id]));
76
+ }
77
+ return undefined;
78
+ }
79
+ upstreamOf(child, edge) {
80
+ const owner = this.owners.get(child.workItemId);
81
+ return [...this.children.values()].find((entry) => this.owners.get(entry.workItemId) === owner && entry.assignmentId === edge.assignmentId);
82
+ }
83
+ recordedUpstreamReason(upstream, edge, seen) {
84
+ const inherited = this.recordedReason(upstream.workItemId, seen);
85
+ if (inherited !== undefined)
86
+ return inherited;
87
+ const workflow = this.workflows.get(upstream.workflowInstanceId);
88
+ if (workflow === undefined)
89
+ return `Waiting for upstream ${upstream.assignmentId}`;
90
+ return (workflowReason(workflow, edge) ??
91
+ `Waiting for ${edge.condition} output ${upstream.assignmentId}/${edge.output}`);
92
+ }
58
93
  async reason(id) {
59
94
  return (await this.block(id))?.reason;
60
95
  }
@@ -14,6 +14,22 @@ export interface DelegationArtifacts {
14
14
  }, context: CommandContext): Promise<void>;
15
15
  qualifyingOutputs(child: WorkflowInstanceView, outputs: DelegatedAssignment['outputs']): Promise<DelegationResult['outputs'] | null>;
16
16
  }
17
+ /** Posts Wake-authored messages, on a parent's behalf, to a delegated child's conversation. */
18
+ export interface DelegationMessages {
19
+ post(input: {
20
+ readonly workItemId: DelegationReservation['parentWorkItemId'];
21
+ readonly entryId: string;
22
+ readonly authorId: string;
23
+ readonly body: string;
24
+ }, context: CommandContext): Promise<void>;
25
+ }
26
+ /** Relates a delegated child to its parent's primary resource, e.g. so its runs publish there. */
27
+ export interface DelegationResources {
28
+ relateChild(input: {
29
+ readonly childWorkItemId: DelegationReservation['parentWorkItemId'];
30
+ readonly parentWorkItemId: DelegationReservation['parentWorkItemId'];
31
+ }, context: CommandContext): Promise<void>;
32
+ }
17
33
  export interface DelegationAuthority {
18
34
  assertQaCaller?(caller: DelegationCaller, candidateId: string, selectionRevision: number, revisions: readonly {
19
35
  resourceId: string;
@@ -288,20 +288,22 @@ export declare const delegationAttentionReplySchema: z.ZodObject<{
288
288
  childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
289
289
  blockerId: z.ZodString;
290
290
  expectedRevision: z.ZodNumber;
291
- references: z.ZodArray<z.ZodObject<{
291
+ references: z.ZodDefault<z.ZodArray<z.ZodObject<{
292
292
  workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
293
293
  revisionId: z.ZodString;
294
- }, z.core.$strict>>;
294
+ }, z.core.$strict>>>;
295
+ message: z.ZodOptional<z.ZodString>;
295
296
  }, z.core.$strict>;
296
297
  export type DelegationAttentionReply = z.infer<typeof delegationAttentionReplySchema>;
297
298
  export declare const delegationAttentionResponseSchema: z.ZodObject<{
298
299
  childWorkItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
299
300
  blockerId: z.ZodString;
300
301
  expectedRevision: z.ZodNumber;
301
- references: z.ZodArray<z.ZodObject<{
302
+ references: z.ZodDefault<z.ZodArray<z.ZodObject<{
302
303
  workItemId: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../work/index.js").WorkItemId, string>>;
303
304
  revisionId: z.ZodString;
304
- }, z.core.$strict>>;
305
+ }, z.core.$strict>>>;
306
+ message: z.ZodOptional<z.ZodString>;
305
307
  cohortId: z.ZodString;
306
308
  attentionKey: z.ZodString;
307
309
  }, z.core.$strict>;
@@ -33,8 +33,15 @@ export const repositoryAssignmentRequestSchema = z
33
33
  export const delegatedAssignmentSchema = z
34
34
  .object({
35
35
  assignmentId: z.string().min(1),
36
- objective: z.string().trim().min(1),
37
- criteria: z.array(z.string().trim().min(1)).min(1),
36
+ objective: z
37
+ .string()
38
+ .trim()
39
+ .min(1)
40
+ .describe('A one-line summary of the task. It becomes the child work item title, so keep it short and put instructions in criteria or a granted artifact.'),
41
+ criteria: z
42
+ .array(z.string().trim().min(1))
43
+ .min(1)
44
+ .describe('The specific, checkable requirements. They are delivered to the child, with the objective, as the opening message of its conversation.'),
38
45
  workflowName: brandedStringSchema(workflowName),
39
46
  repositoryResourceIds: z.array(z.string().min(1)).optional(),
40
47
  workflowFingerprint: z.string().min(1),
@@ -178,7 +185,10 @@ export const delegationAttentionReplySchema = z
178
185
  childWorkItemId: brandedStringSchema(workItemId),
179
186
  blockerId: z.string().min(1),
180
187
  expectedRevision: z.number().int().positive(),
181
- references: z.array(delegationRevisionReferenceSchema),
188
+ /** Accepted artifact revisions the child may read from now on. */
189
+ references: z.array(delegationRevisionReferenceSchema).default([]),
190
+ /** Free-text answer, posted to the child's conversation. */
191
+ message: z.string().trim().min(1).max(20_000).optional(),
182
192
  })
183
193
  .strict();
184
194
  export const delegationAttentionResponseSchema = delegationAttentionReplySchema
@@ -73,6 +73,7 @@ export declare const DelegationAttentionRejection: {
73
73
  readonly StaleRevision: "stale-revision";
74
74
  readonly NotBlocked: "not-blocked";
75
75
  readonly Duplicate: "duplicate";
76
+ readonly EmptyReply: "empty-reply";
76
77
  };
77
78
  export type DelegationAttentionRejection = ValueOf<typeof DelegationAttentionRejection>;
78
79
  export declare const DelegationConflictCode: {
@@ -65,6 +65,7 @@ export const DelegationAttentionRejection = defineClosedVocabulary({
65
65
  StaleRevision: 'stale-revision',
66
66
  NotBlocked: 'not-blocked',
67
67
  Duplicate: 'duplicate',
68
+ EmptyReply: 'empty-reply',
68
69
  });
69
70
  export const DelegationConflictCode = defineClosedVocabulary({
70
71
  SelfDependency: 'self-dependency',
@@ -0,0 +1,8 @@
1
+ import type { DelegationReservation } from '../contracts/delegation.js';
2
+ type Child = Pick<DelegationReservation['children'][number], 'objective' | 'criteria' | 'outputs' | 'context'>;
3
+ /**
4
+ * The text a delegated child is opened with. The objective stays a one-line summary and
5
+ * the work item's title; this is where the child reads what it was asked to do.
6
+ */
7
+ export declare function renderDelegatedBrief(child: Child): string;
8
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The text a delegated child is opened with. The objective stays a one-line summary and
3
+ * the work item's title; this is where the child reads what it was asked to do.
4
+ */
5
+ export function renderDelegatedBrief(child) {
6
+ return [
7
+ `Assignment from your delegating parent: ${child.objective}`,
8
+ '',
9
+ 'Acceptance criteria:',
10
+ ...child.criteria.map((criterion) => `- ${criterion}`),
11
+ ...outputLines(child.outputs),
12
+ ...contextLines(child.context),
13
+ ].join('\n');
14
+ }
15
+ function outputLines(outputs) {
16
+ if (outputs.length === 0)
17
+ return [];
18
+ return [
19
+ '',
20
+ 'Outputs to deliver:',
21
+ ...outputs.map((output) => {
22
+ const kind = 'kind' in output ? output.kind : 'artifact';
23
+ return `- ${output.name} (${kind}${output.required === false ? ', optional' : ''})`;
24
+ }),
25
+ ];
26
+ }
27
+ function contextLines(references) {
28
+ if (references.length === 0)
29
+ return [];
30
+ return [
31
+ '',
32
+ 'Artifacts granted to you (read each with wake_artifacts_read, passing its workItemId and revisionId; they are also in your artifact manifest):',
33
+ ...references.map((reference) => `- ${reference.workItemId} ${reference.revisionId}`),
34
+ ];
35
+ }
@@ -33,7 +33,7 @@ export * from './domain/workflow-selector.js';
33
33
  export * from './application/delivery-activity-report.js';
34
34
  export * from './application/work-completion-summary.js';
35
35
  export type { WorkflowCompileDiagnostic } from './domain/compile-diagnostics.js';
36
- export type { DelegationArtifacts, DelegationRepositories } from './contracts/delegation-ports.js';
36
+ export type { DelegationArtifacts, DelegationMessages, DelegationRepositories, DelegationResources, } from './contracts/delegation-ports.js';
37
37
  export { DelegationAttentionError, DelegationConflictError, DelegationPendingError, } from './contracts/delegation.js';
38
38
  export type { DelegationAuthority } from './contracts/delegation-ports.js';
39
39
  export type { DeliveryIntegration, DeliveryPullRequest } from './contracts/delivery-ports.js';
@@ -89,6 +89,7 @@ const eventSchema = eventEnvelopeSchema.extend({
89
89
  ResourceCorrelationProvenance.ProviderObserved,
90
90
  ResourceCorrelationProvenance.AgentReported,
91
91
  ResourceCorrelationProvenance.OperatorDeclared,
92
+ ResourceCorrelationProvenance.Delegated,
92
93
  ]),
93
94
  })
94
95
  .strict(),
@@ -25,6 +25,8 @@ export declare const ResourceCorrelationProvenance: {
25
25
  readonly ProviderObserved: "provider-observed";
26
26
  readonly AgentReported: "agent-reported";
27
27
  readonly OperatorDeclared: "operator-declared";
28
+ /** Wake related a delegated child to its parent's resource; never an ownership claim. */
29
+ readonly Delegated: "delegated";
28
30
  };
29
31
  export type ResourceCorrelationProvenance = ValueOf<typeof ResourceCorrelationProvenance>;
30
32
  export declare const ResourceExternalOutcome: {
@@ -25,6 +25,8 @@ export const ResourceCorrelationProvenance = defineClosedVocabulary({
25
25
  ProviderObserved: 'provider-observed',
26
26
  AgentReported: 'agent-reported',
27
27
  OperatorDeclared: 'operator-declared',
28
+ /** Wake related a delegated child to its parent's resource; never an ownership claim. */
29
+ Delegated: 'delegated',
28
30
  });
29
31
  export const ResourceExternalOutcome = defineClosedVocabulary({
30
32
  Completed: 'completed',
@@ -20,6 +20,10 @@ export interface BoardCardResponse {
20
20
  readonly workItemId: string;
21
21
  readonly objective: string;
22
22
  readonly condition: BoardCardCondition;
23
+ /** Present on delegated children: the work item that delegated this one. */
24
+ readonly parentWorkItemKey?: string;
25
+ /** Present on a delegating parent: how many child work items it created. */
26
+ readonly childCount?: number;
23
27
  readonly frozen?: boolean;
24
28
  readonly awaitingApproval?: boolean;
25
29
  /** Whether the primary workflow needs a gate-budget extension to continue. */
@@ -91,6 +91,9 @@ export interface WorkDetailResponse {
91
91
  }[];
92
92
  readonly children: readonly {
93
93
  readonly workItemKey: WorkItemKey;
94
+ readonly workItemId: string;
95
+ /** Provider reference of the child's primary resource (e.g. its PR), once it has one. */
96
+ readonly externalRef?: string;
94
97
  readonly parentWorkItemKey: WorkItemKey;
95
98
  readonly objective: string;
96
99
  readonly workflowName: string;
@@ -151,6 +154,12 @@ export interface WorkDetailResponse {
151
154
  readonly byteLength?: number;
152
155
  readonly digest?: string;
153
156
  readonly href: string;
157
+ /** Set when another work item published this artifact and it is in this item's context. */
158
+ readonly source?: {
159
+ readonly workItemKey: WorkItemKey;
160
+ /** `granted` by a delegating parent, or `shared` through a trigger context. */
161
+ readonly relation: 'granted' | 'shared';
162
+ };
154
163
  }[];
155
164
  readonly conversation: {
156
165
  /** Whether this authenticated surface may create control-plane entries. */
@@ -2,7 +2,7 @@ import { DelegationAttentionError, DelegationConflictError, DeliveryRejectionErr
2
2
  /** The bound caller is never accepted as a tool argument. */
3
3
  export function registerDelegationTools(server, input) {
4
4
  server.registerTool('wake_delegation_submit', {
5
- description: 'Submit child work with optional queued named-output prerequisites under this workflow delegation policy. Use expectedPlanRevision from inspection; useAsBase selects only a same-repository upstream change. End the current activity normally after submission; Wake waits and resumes it with joined results or terminal failure facts. Inspect failureReason and blockers before submitting replacement assignments in a new cohort; existing receipts remain immutable.',
5
+ description: 'Submit child work with optional queued named-output prerequisites under this workflow delegation policy. An assignment objective is a one-line summary that titles the child work item; the child reads its objective and criteria as the opening message of its conversation, so put detail in criteria or a granted artifact. Use expectedPlanRevision from inspection; useAsBase selects only a same-repository upstream change. End the current activity normally after submission; Wake waits and resumes it with joined results or terminal failure facts. Inspect failureReason and blockers before submitting replacement assignments in a new cohort; existing receipts remain immutable.',
6
6
  inputSchema: delegationSubmissionSchema,
7
7
  }, async (command) => {
8
8
  try {
@@ -21,7 +21,7 @@ export function registerDelegationTools(server, input) {
21
21
  }
22
22
  });
23
23
  server.registerTool('wake_delegation_respond', {
24
- description: 'Answer one assignment-context blocker from the attention request returned by wake_delegation_inspect. Name the child, blocker and expectedRevision, and list the exact accepted artifact revisions the child may read. Only a child blocked for assignment context can be resumed; failures need follow-up work in a new cohort and human review, consent or approval gates cannot be answered here. End the activity normally afterwards; unresolved reasons stay tracked and the cohort wait resumes.',
24
+ description: 'Answer one assignment-context blocker from the attention request returned by wake_delegation_inspect. Name the child, blocker and expectedRevision, then answer with a free-text `message` (posted to the conversation of the child, which it reads when it resumes), with accepted artifact `references` it may read, or both; a reply needs at least one. Only a child blocked for assignment context can be resumed; failures need follow-up work in a new cohort and human review, consent or approval gates cannot be answered here. End the activity normally afterwards; unresolved reasons stay tracked and the cohort wait resumes.',
25
25
  inputSchema: delegationAttentionReplySchema,
26
26
  }, async (reply) => {
27
27
  try {