@dsh-enhanced/assistant-work-items 0.1.67 → 0.1.70

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 (44) hide show
  1. package/README.md +17 -10
  2. package/lib/acceptance-binding.d.ts +3 -1
  3. package/lib/acceptance-binding.d.ts.map +1 -1
  4. package/lib/acceptance-binding.js +26 -1
  5. package/lib/acceptance-binding.js.map +1 -1
  6. package/lib/continuation-contract.d.ts +1 -1
  7. package/lib/continuation-contract.d.ts.map +1 -1
  8. package/lib/continuation-contract.js +5 -2
  9. package/lib/continuation-contract.js.map +1 -1
  10. package/lib/continuation.d.ts.map +1 -1
  11. package/lib/continuation.js +7 -2
  12. package/lib/continuation.js.map +1 -1
  13. package/lib/dispatch.d.ts +6 -16
  14. package/lib/dispatch.d.ts.map +1 -1
  15. package/lib/dispatch.js +14 -18
  16. package/lib/dispatch.js.map +1 -1
  17. package/lib/intake-admission.d.ts +28 -2
  18. package/lib/intake-admission.d.ts.map +1 -1
  19. package/lib/intake-admission.js +22 -4
  20. package/lib/intake-admission.js.map +1 -1
  21. package/lib/intake.d.ts +38 -0
  22. package/lib/intake.d.ts.map +1 -1
  23. package/lib/intake.js +55 -1
  24. package/lib/intake.js.map +1 -1
  25. package/lib/mandate.d.ts.map +1 -1
  26. package/lib/mandate.js +4 -0
  27. package/lib/mandate.js.map +1 -1
  28. package/lib/reply-contract.d.ts +1 -1
  29. package/lib/reply-contract.d.ts.map +1 -1
  30. package/lib/reply-contract.js +2 -2
  31. package/lib/reply-contract.js.map +1 -1
  32. package/lib/service.d.ts +22 -35
  33. package/lib/service.d.ts.map +1 -1
  34. package/lib/service.js +118 -105
  35. package/lib/service.js.map +1 -1
  36. package/lib/store.d.ts +3 -3
  37. package/lib/store.d.ts.map +1 -1
  38. package/lib/store.js +13 -6
  39. package/lib/store.js.map +1 -1
  40. package/lib/types.d.ts +3 -1
  41. package/lib/types.d.ts.map +1 -1
  42. package/lib/version.d.ts +1 -1
  43. package/lib/version.js +1 -1
  44. package/package.json +7 -7
@@ -13,14 +13,14 @@ export function immutableReply(source) {
13
13
  owner: source.owner, binding: source.binding, target: source.target };
14
14
  }
15
15
  export const isReplyContinuationPlan = (plan) => plan.protocol === 'assistant-work-items/owner-continuation-plan/v2';
16
- export function createReplyContinuationPlan(item, source, parent, supplier, config, activation, schemas) {
16
+ export function createReplyContinuationPlan(item, source, parent, supplier, config, activation, schemas, requireAcceptance) {
17
17
  if (!config.ownerReplyContinuation || source.state === 'cancelled' || source.executionParentItemId !== parent.itemId
18
18
  || source.scope.workspace !== item.scope.workspace || source.scope.preset !== item.scope.preset || source.principalId !== item.scope.principalId
19
19
  || source.owner.principalRecordId !== item.owner.principalRecordId || source.owner.principalVersion !== item.owner.principalVersion
20
20
  || source.binding.id !== item.originBindingId || source.binding.version !== item.owner.bindingVersion || source.binding.generation !== item.owner.generation
21
21
  || supplier.evidence.itemId !== parent.itemId || acceptanceCanonicalJson(supplier.evidence.production) !== acceptanceCanonicalJson(parent.production))
22
22
  continuationFail('reply source admission association differs');
23
- const base = createContinuationPlan(item, { sourceDigest: source.sourceDigest, inputText: source.inputText, modelSelection: supplier.modelSelection }, parent, config, activation, schemas);
23
+ const base = createContinuationPlan(item, { sourceDigest: source.sourceDigest, inputText: source.inputText, modelSelection: supplier.modelSelection }, parent, config, activation, schemas, requireAcceptance);
24
24
  const { digest: _digest, ...common } = base;
25
25
  const unsigned = { ...common, protocol: 'assistant-work-items/owner-continuation-plan/v2',
26
26
  source: { ...base.source, origin: { kind: 'owner-report-reply', reply: immutableReply(source), supplier: supplier.evidence } },
@@ -1 +1 @@
1
- {"version":3,"file":"reply-contract.js","sourceRoot":"","sources":["../src/reply-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAIlG,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,0BAA0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BAAgB,CAAC,QAAQ,CAAC;QAAE,gBAAgB,CAAC,kCAAkC,CAAC,CAAA;IACxH,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAC"}
package/lib/service.d.ts CHANGED
@@ -148,6 +148,9 @@ export declare class AssistantWorkItemsService extends Service {
148
148
  private readonly workItemsMalformedBindingWarned;
149
149
  private readonly workItemsOwnerReads;
150
150
  private readonly workItemsOwnerContinuations;
151
+ /** Bounded, memory-only producer hints for inferred auto admission; never persisted. */
152
+ private readonly workItemsIntakeHints;
153
+ private static readonly MAX_INTAKE_HINTS;
151
154
  constructor(ctx: Context, input: Config);
152
155
  /** One native wake may admit at most ten already-due waiting occurrences. */
153
156
  private workItemsOnSchedulerWake;
@@ -207,48 +210,24 @@ export declare class AssistantWorkItemsService extends Service {
207
210
  /**
208
211
  * WP21 slice 8 (`acceptance.holdReport`): the mandate binding, or else the
209
212
  * latest late binding while it still belongs to the item's current
210
- * occurrence. A malformed late row throws `storage`; callers decide whether
211
- * to hold (fail closed) or treat the item as unbound.
213
+ * occurrence. A malformed late row throws `storage` and cannot release a report.
212
214
  */
213
215
  private workItemsAcceptanceBinding;
214
- /**
215
- * Whether this report must be held instead of dispatched: `holdReport` is
216
- * on, it is the terminal `ready` self-report of an executed item, the status
217
- * is notifiable, and the item already has an independent acceptance binding.
218
- * An item that has not been bound yet (for example a run that reports before
219
- * the wake that binds it) is reported normally, exactly as today.
220
- *
221
- * A verdict recorded for an earlier generation can never settle this report
222
- * (the store keeps at most one verdict per item and excludes settled items
223
- * from auto-settle), so holding it would just wait out `holdTimeoutMs` before
224
- * releasing it unverified. It is dispatched now, exactly like flag-off.
225
- * An unreadable verdict row fails closed and holds, like a malformed binding.
226
- */
216
+ /** An admission-time contract does not carry over to a new worker occurrence. */
217
+ private workItemsRetryContractMatches;
218
+ /** Hold the worker's terminal self-report even when its contract is not visible yet. */
227
219
  private workItemsHoldsReport;
228
- /**
229
- * Whether this `ready` report is still held. Used to imply the verdict gate
230
- * for held items even when `acceptance.verdictGate` itself is off: the gate
231
- * must move the item before the held report can be replaced by the blocked
232
- * one. A malformed binding row fails closed (treated as bound).
233
- */
220
+ /** Read the requirement frozen at admission, including after live configuration changes. */
221
+ private workItemsContinuationRequiresAcceptance;
222
+ /** The held report implies the verdict gate for this executed item. */
234
223
  private workItemsReportIsHeld;
235
224
  /**
236
- * WP21 slice 8: on the same native wake, release at most
237
- * `HELD_REPORT_RELEASE_LIMIT` held reports through an in-memory
238
- * `(recordedAt, itemId)` round-robin cursor. A full page advances the cursor
239
- * past rows that are still waiting, so they cannot starve a releasable row
240
- * behind them; a short page resets it and the next wake restarts from the
241
- * oldest row. Achievement sends the ordinary report; any other settled
242
- * verdict (or a verdict-gate `blocked` item) sends a blocked report instead;
243
- * a still-pending item stays held, and one whose `holdTimeoutMs` elapsed is
244
- * sent marked unverified. A row with no acceptance binding any more was never
245
- * really held and is recovered as an ordinary report instead of stranded.
246
- * One unreadable row (a malformed binding or verdict event) is warned about
247
- * and skipped without aborting the remaining releases; the fail-closed hold
248
- * itself is unchanged.
225
+ * Revisit undelivered terminal reports after binding and settlement on the
226
+ * same scheduler wake. The bounded cursor lets waiting rows share the scan
227
+ * with reports ready to release, including after a restart.
249
228
  */
250
229
  private workItemsReleaseHeldReports;
251
- /** Decide one held report without writing: release it, or wait for a later wake. */
230
+ /** Release only a verdict for this execution and its still-current contract. */
252
231
  private workItemsHeldRelease;
253
232
  get enabled(): boolean;
254
233
  get mode(): 'observe' | 'active';
@@ -394,6 +373,14 @@ export declare class AssistantWorkItemsService extends Service {
394
373
  * replay of the same `(source, sourceEventId)` returns the original row.
395
374
  */
396
375
  recordIntake(input: WorkItemIntakeInput, sourceText?: string): WorkItemIntakeResult;
376
+ private intakeHintKey;
377
+ /**
378
+ * Remember producer-supplied objective/acceptance for at most
379
+ * `MAX_INTAKE_HINTS` candidates. The text is deliberately memory-only:
380
+ * restart loses it and auto admission fails closed to observe, rather than
381
+ * opening a new plaintext ledger for owner messages.
382
+ */
383
+ private rememberIntakeHint;
397
384
  /**
398
385
  * Host-only: register the injectable WP20 inferred-evaluation supplier
399
386
  * (Policy snapshot + model call). Requires `intakeLedger.evaluation`.
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AACvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAE5E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAA4D,KAAK,8BAA8B,EAAE,KAAK,mCAAmC,EAAE,MAAM,gCAAgC,CAAA;AACxL,OAAO,EAAiC,KAAK,6BAA6B,EAAE,MAAM,uBAAuB,CAAA;AACzG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAG3D,OAAO,EAAiD,KAAK,MAAM,EAAyB,MAAM,aAAa,CAAA;AAG/G,OAAO,EAA8B,KAAK,8BAA8B,EAAE,MAAM,iBAAiB,CAAA;AASjG,OAAO,EAAuB,KAAK,sBAAsB,EAAE,KAAK,sBAAsB,EAAE,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAChJ,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACvI,OAAO,EAA+C,KAAK,sBAAsB,EAAwC,MAAM,YAAY,CAAA;AAG3I,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAA;AAErB,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B;IAqB7B,+EAA+E;IAC/E,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,aAAa;IA8GrB,yEAAyE;IACzE,OAAO,CAAC,qBAAqB;IA4B7B,+EAA+E;IAC/E,OAAO,CAAC,yBAAyB;IAoCjC;;;;;;;;OAQG;IACH,OAAO,CAAC,4BAA4B;IAoBpC,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,eAAe;IAIvB,6FAA6F;IAC7F,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,oBAAoB;CAG7B"}
package/lib/service.js CHANGED
@@ -1,6 +1,7 @@
1
+ import { acceptanceDigest } from '@dsh-enhanced/task-acceptance-contract';
1
2
  import { WorkItemEngineeringTargets } from './engineering-context.js';
2
3
  import { Service } from '@deepseek-ai/cordis';
3
- import { classifyIntake, intakeSourcePolicy } from './intake.js';
4
+ import { classifyIntake, intakeAcceptanceOf, intakeObjectiveOf, intakeSourcePolicy, MAX_INTAKE_OBJECTIVE_BYTES } from './intake.js';
4
5
  import { authenticatesIntakeText, WorkItemIntakeEvaluationRuntime } from './intake-evaluation-runtime.js';
5
6
  import { WorkItemIntakeAdmissionBridge } from './intake-admission.js';
6
7
  import { WorkItemAdmission } from './admission.js';
@@ -14,7 +15,8 @@ import { settleOutcomes as runSettlement } from './settlement.js';
14
15
  import { WorkItemOwnerRecall } from './owner-recall.js';
15
16
  import { MALFORMED_ACCEPTANCE_BINDING, WorkItemStore } from './store.js';
16
17
  import { normalizeFollowUp, normalizePolicyChange, noticePolicyChange } from './policy-notice.js';
17
- import { resolveAcceptanceBinding, settleAcceptance, workerRunTaskRef } from './acceptance-binding.js';
18
+ import { parseStoredContinuationPlan } from './reply-contract.js';
19
+ import { hasFreshAcceptanceReceipt, resolveAcceptanceBinding, settleAcceptance, workerRunTaskRef } from './acceptance-binding.js';
18
20
  import { WorkItemSignalIntake, } from './signals.js';
19
21
  import { registerWorkItemTools, workItemReportKey } from './tools.js';
20
22
  import { TERMINAL_STATES, WorkItemError } from './types.js';
@@ -155,6 +157,9 @@ export class AssistantWorkItemsService extends Service {
155
157
  workItemsMalformedBindingWarned = new Set();
156
158
  workItemsOwnerReads;
157
159
  workItemsOwnerContinuations;
160
+ /** Bounded, memory-only producer hints for inferred auto admission; never persisted. */
161
+ workItemsIntakeHints = new Map();
162
+ static MAX_INTAKE_HINTS = 256;
158
163
  constructor(ctx, input) {
159
164
  super(ctx, 'assistantWorkItems');
160
165
  this.workItemsConfig = Object.freeze(normalizeConfig(input, Date.now()));
@@ -174,6 +179,13 @@ export class AssistantWorkItemsService extends Service {
174
179
  store: () => this.workItemsClosed ? undefined : this.workItemsComponents?.store,
175
180
  // The public Host path, so an admitted item wakes its worker like any decision.
176
181
  admit: decision => this.admitDecision(decision),
182
+ hint: (source, sourceEventId) => {
183
+ const hint = this.workItemsIntakeHints.get(this.intakeHintKey(source, sourceEventId));
184
+ if (hint?.objective === undefined)
185
+ return undefined;
186
+ return Object.freeze({ objective: hint.objective,
187
+ ...(hint.acceptance === undefined ? {} : { acceptance: hint.acceptance }) });
188
+ },
177
189
  log: message => ctx.logger.debug(message),
178
190
  });
179
191
  this.workItemsOwnerReads = new WorkItemOwnerRecall({ ...ownerDependencies, access });
@@ -632,12 +644,13 @@ export class AssistantWorkItemsService extends Service {
632
644
  if (bind === undefined || worker === null || this.workItemsClosed || this.workItemsVerifier() === undefined
633
645
  || typeof automations?.inspectOccurrenceAcceptance !== 'function')
634
646
  return;
647
+ const continuation = this.workItemsConfig.ownerContinuation?.automationId;
635
648
  const limit = bind.maxPerTick;
636
649
  const skips = this.workItemsBindWorkerRunSkips;
637
650
  const seen = new Set();
638
651
  let processed = 0, scanned = 0, wrapped = this.workItemsBindWorkerRunCursor === null, done = false;
639
652
  while (!done && processed < limit && scanned < WORKER_RUN_BIND_SCAN_LIMIT && !this.workItemsClosed) {
640
- const page = components.store.listLateAcceptanceCandidates(worker, this.workItemsBindWorkerRunCursor, 10);
653
+ const page = components.store.listLateAcceptanceCandidates(worker, this.workItemsBindWorkerRunCursor, 10, continuation === worker ? undefined : continuation);
641
654
  if (page.length === 0) {
642
655
  if (wrapped)
643
656
  break;
@@ -851,86 +864,63 @@ export class AssistantWorkItemsService extends Service {
851
864
  /**
852
865
  * WP21 slice 8 (`acceptance.holdReport`): the mandate binding, or else the
853
866
  * latest late binding while it still belongs to the item's current
854
- * occurrence. A malformed late row throws `storage`; callers decide whether
855
- * to hold (fail closed) or treat the item as unbound.
867
+ * occurrence. A malformed late row throws `storage` and cannot release a report.
856
868
  */
857
869
  workItemsAcceptanceBinding(components, item) {
858
870
  const mandate = item.authority?.mandate?.acceptance;
859
- if (mandate !== undefined)
871
+ if (mandate !== undefined) {
872
+ if (item.attempt > 1 && !this.workItemsRetryContractMatches(item, mandate))
873
+ return undefined;
860
874
  return mandate;
875
+ }
861
876
  const late = components.store.lateAcceptanceBinding(item.id);
862
877
  return late !== undefined && late.occurrenceId === item.occurrenceId ? late.binding : undefined;
863
878
  }
864
- /**
865
- * Whether this report must be held instead of dispatched: `holdReport` is
866
- * on, it is the terminal `ready` self-report of an executed item, the status
867
- * is notifiable, and the item already has an independent acceptance binding.
868
- * An item that has not been bound yet (for example a run that reports before
869
- * the wake that binds it) is reported normally, exactly as today.
870
- *
871
- * A verdict recorded for an earlier generation can never settle this report
872
- * (the store keeps at most one verdict per item and excludes settled items
873
- * from auto-settle), so holding it would just wait out `holdTimeoutMs` before
874
- * releasing it unverified. It is dispatched now, exactly like flag-off.
875
- * An unreadable verdict row fails closed and holds, like a malformed binding.
876
- */
879
+ /** An admission-time contract does not carry over to a new worker occurrence. */
880
+ workItemsRetryContractMatches(item, binding) {
881
+ return item.occurrenceId !== null && binding.taskKind === 'automation-run'
882
+ && binding.taskDigest === acceptanceDigest({ kind: 'automation-run', ref: workerRunTaskRef(item.occurrenceId) });
883
+ }
884
+ /** Hold the worker's terminal self-report even when its contract is not visible yet. */
877
885
  workItemsHoldsReport(components, item, report) {
878
- if (this.workItemsConfig.acceptanceHoldReport === undefined || this.workItemsClosed
879
- || report.status !== 'ready' || item.state !== 'ready' || item.observed)
880
- return false;
881
- if (!components.dispatch.shouldNotify(report))
882
- return false;
883
- if (this.workItemsAcceptanceBinding(components, item) === undefined)
886
+ return !this.workItemsClosed && item.attempt >= 1 && item.state === 'ready' && !item.observed
887
+ && report.status === 'ready' && report.deliveryState === null
888
+ && (this.workItemsConfig.acceptanceHoldReport !== undefined || this.workItemsContinuationRequiresAcceptance(components, item));
889
+ }
890
+ /** Read the requirement frozen at admission, including after live configuration changes. */
891
+ workItemsContinuationRequiresAcceptance(components, item) {
892
+ if (item.kind !== 'owner-continuation')
884
893
  return false;
885
- let verdict;
886
894
  try {
887
- verdict = components.store.acceptanceVerdict(item.id);
895
+ const record = components.store.getContinuation(item.id);
896
+ if (record === undefined)
897
+ return true;
898
+ return parseStoredContinuationPlan(record.planJson).contract.acceptance !== undefined;
888
899
  }
889
- catch {
900
+ catch (error) {
901
+ this.ctx.logger.warn(`assistant-work-items: continuation acceptance plan for ${item.id} is unreadable: ${describe(error)}`);
890
902
  return true;
891
903
  }
892
- return verdict === undefined || (verdict.attempt === item.attempt && verdict.occurrenceId === item.occurrenceId);
893
904
  }
894
- /**
895
- * Whether this `ready` report is still held. Used to imply the verdict gate
896
- * for held items even when `acceptance.verdictGate` itself is off: the gate
897
- * must move the item before the held report can be replaced by the blocked
898
- * one. A malformed binding row fails closed (treated as bound).
899
- */
905
+ /** The held report implies the verdict gate for this executed item. */
900
906
  workItemsReportIsHeld(components, item) {
901
- if (this.workItemsConfig.acceptanceHoldReport === undefined || item.state !== 'ready' || item.observed)
907
+ if (this.workItemsClosed || item.observed
908
+ || (this.workItemsConfig.acceptanceHoldReport === undefined && item.kind !== 'owner-continuation'))
902
909
  return false;
903
910
  const report = components.store.lastReport(item.id);
904
- if (report === undefined || report.status !== 'ready' || report.deliveryState !== null)
905
- return false;
906
- try {
907
- return this.workItemsAcceptanceBinding(components, item) !== undefined;
908
- }
909
- catch {
910
- return true;
911
- }
911
+ return report !== undefined && this.workItemsHoldsReport(components, item, report);
912
912
  }
913
913
  /**
914
- * WP21 slice 8: on the same native wake, release at most
915
- * `HELD_REPORT_RELEASE_LIMIT` held reports through an in-memory
916
- * `(recordedAt, itemId)` round-robin cursor. A full page advances the cursor
917
- * past rows that are still waiting, so they cannot starve a releasable row
918
- * behind them; a short page resets it and the next wake restarts from the
919
- * oldest row. Achievement sends the ordinary report; any other settled
920
- * verdict (or a verdict-gate `blocked` item) sends a blocked report instead;
921
- * a still-pending item stays held, and one whose `holdTimeoutMs` elapsed is
922
- * sent marked unverified. A row with no acceptance binding any more was never
923
- * really held and is recovered as an ordinary report instead of stranded.
924
- * One unreadable row (a malformed binding or verdict event) is warned about
925
- * and skipped without aborting the remaining releases; the fail-closed hold
926
- * itself is unchanged.
914
+ * Revisit undelivered terminal reports after binding and settlement on the
915
+ * same scheduler wake. The bounded cursor lets waiting rows share the scan
916
+ * with reports ready to release, including after a restart.
927
917
  */
928
918
  workItemsReleaseHeldReports(components) {
929
919
  const hold = this.workItemsConfig.acceptanceHoldReport;
930
- if (hold === undefined || this.workItemsClosed)
920
+ if (this.workItemsClosed)
931
921
  return;
932
922
  const now = Date.now();
933
- const page = components.store.listHeldAcceptanceReports(HELD_REPORT_RELEASE_LIMIT, this.workItemsHeldReportCursor ?? undefined);
923
+ const page = components.store.listHeldAcceptanceReports(HELD_REPORT_RELEASE_LIMIT, this.workItemsHeldReportCursor ?? undefined, hold === undefined);
934
924
  // Only a full page proves there may be rows this wake did not examine; a
935
925
  // short page ends the rotation so the next wake starts from the oldest.
936
926
  if (page.length < HELD_REPORT_RELEASE_LIMIT)
@@ -944,31 +934,21 @@ export class AssistantWorkItemsService extends Service {
944
934
  break;
945
935
  let release;
946
936
  try {
947
- let bound;
948
- try {
949
- bound = this.workItemsAcceptanceBinding(components, item) !== undefined;
937
+ if (hold !== undefined)
938
+ release = this.workItemsHeldRelease(components, item);
939
+ else if (this.workItemsContinuationRequiresAcceptance(components, item)) {
940
+ release = { kind: 'blocked', reason: 'acceptance-disabled' };
950
941
  }
951
- catch (error) {
952
- if (!this.workItemsWarnMalformedLateBinding(item.id, error)) {
953
- this.ctx.logger.debug(`assistant-work-items: held report of ${item.id} cannot read its acceptance binding: ${describe(error)}`);
954
- }
955
- bound = true;
956
- }
957
- // No binding any more means the row was never actually held (the report
958
- // committed before its pending delivery write, Delivery was missing,
959
- // `notifyOn` excluded `ready`, or a re-arm lost the binding). Recovery
960
- // sends the ordinary report instead of leaving it undelivered forever.
961
- release = bound
962
- ? this.workItemsHeldRelease(components, item, report, now, hold.holdTimeoutMs)
963
- : Object.freeze({ kind: 'plain' });
964
942
  }
965
943
  catch (error) {
966
- // One poison row (a malformed binding or verdict event) must not abort
967
- // the scan: warn and keep releasing the remaining rows.
968
944
  if (!this.workItemsWarnMalformedLateBinding(item.id, error)) {
969
945
  this.ctx.logger.warn(`assistant-work-items: held report of ${item.id} cannot be decided: ${describe(error)}`);
970
946
  }
971
- continue;
947
+ }
948
+ // A missing, stale or unreadable binding/verdict proves no achievement.
949
+ // The same deadline applies whether or not independent checking began.
950
+ if (release === undefined && hold !== undefined && now >= report.recordedAt + hold.holdTimeoutMs) {
951
+ release = { kind: 'unverified', timeoutMs: hold.holdTimeoutMs };
972
952
  }
973
953
  if (release === undefined)
974
954
  continue;
@@ -983,23 +963,26 @@ export class AssistantWorkItemsService extends Service {
983
963
  });
984
964
  }
985
965
  }
986
- /** Decide one held report without writing: release it, or wait for a later wake. */
987
- workItemsHeldRelease(components, item, report, now, timeoutMs) {
988
- if (item.state === 'blocked') {
989
- // The store query only returns acceptance-gated blocked rows.
966
+ /** Release only a verdict for this execution and its still-current contract. */
967
+ workItemsHeldRelease(components, item) {
968
+ const required = this.workItemsContinuationRequiresAcceptance(components, item);
969
+ if (item.state === 'blocked' && (!required || item.stateReason === 'acceptance-needs-attention')) {
970
+ // Needs-attention has no verdict. A persisted negative verdict for a
971
+ // required task must pass the same freshness checks as an achievement.
990
972
  return { kind: 'blocked', reason: item.stateReason ?? 'acceptance-blocked' };
991
973
  }
974
+ const binding = this.workItemsAcceptanceBinding(components, item);
975
+ if (binding === undefined || !storedBasisHolds(item))
976
+ return undefined;
992
977
  const verdict = components.store.acceptanceVerdict(item.id);
993
- // Only the verdict of this executed generation decides this report; an
994
- // older generation's verdict cannot be moved by the gate either, so the
995
- // held report waits for this run's verdict or the timeout.
996
- if (verdict !== undefined && verdict.attempt === item.attempt && verdict.occurrenceId === item.occurrenceId) {
997
- return verdict.objectiveStatus === 'achieved'
998
- ? { kind: 'achieved' }
999
- : { kind: 'blocked', reason: `acceptance-${verdict.objectiveStatus}` };
1000
- }
1001
- // A released report is never held again; the owning revision records the send.
1002
- return now >= report.recordedAt + timeoutMs ? { kind: 'unverified', timeoutMs } : undefined;
978
+ if (verdict === undefined || verdict.attempt !== item.attempt || verdict.occurrenceId !== item.occurrenceId
979
+ || verdict.contractId !== binding.contractId || verdict.contractDigest !== binding.contractDigest)
980
+ return undefined;
981
+ if (required && !hasFreshAcceptanceReceipt(this.workItemsVerifier(), verdict))
982
+ return undefined;
983
+ return verdict.objectiveStatus === 'achieved'
984
+ ? { kind: 'achieved' }
985
+ : { kind: 'blocked', reason: `acceptance-${verdict.objectiveStatus}` };
1003
986
  }
1004
987
  get enabled() {
1005
988
  return this.workItemsConfig.enabled;
@@ -1261,6 +1244,9 @@ export class AssistantWorkItemsService extends Service {
1261
1244
  }
1262
1245
  if (binding === undefined)
1263
1246
  fail('invalid-state', 'work item has no independent acceptance binding');
1247
+ if (this.workItemsConfig.acceptanceHoldReport !== undefined && item.attempt > 1
1248
+ && !this.workItemsRetryContractMatches(item, binding))
1249
+ fail('invalid-state', 'acceptance contract is not for the current retry occurrence');
1264
1250
  // The stored mandate must still be intact for this exact item; checked
1265
1251
  // locally so a pull-based settle never writes Policy audit.
1266
1252
  if (!storedBasisHolds(item))
@@ -1274,7 +1260,7 @@ export class AssistantWorkItemsService extends Service {
1274
1260
  // item before the held report is replaced by the blocked one.
1275
1261
  const gate = this.workItemsConfig.acceptanceVerdictGate === true || this.workItemsReportIsHeld(components, item)
1276
1262
  ? Object.freeze({ attempt: item.attempt, occurrenceId: item.occurrenceId }) : undefined;
1277
- const result = settleAcceptance(components.store, this.workItemsVerifier(), item, binding, gate);
1263
+ const result = settleAcceptance(components.store, this.workItemsVerifier(), item, binding, gate, this.workItemsContinuationRequiresAcceptance(components, item));
1278
1264
  // WP21 slice 7: the verifier's needs-attention writes no verdict, but with
1279
1265
  // the gate on it still moves this executed generation to `blocked`.
1280
1266
  if (gate !== undefined && result.outcome === 'needs-attention'
@@ -1342,13 +1328,51 @@ export class AssistantWorkItemsService extends Service {
1342
1328
  if (sourceText !== undefined && !authenticatesIntakeText(sourceText, candidate.contentDigest)) {
1343
1329
  fail('invalid-input', 'intake source text must be at most 65,536 UTF-16 units and match the content digest');
1344
1330
  }
1331
+ // Producer extensions are validated before any ledger write; an over-limit
1332
+ // objective or malformed handle rejects the whole call instead of being
1333
+ // truncated or stripped.
1334
+ const objective = intakeObjectiveOf(input, sourceText);
1335
+ // The objective becomes the work-item brief; admission truncates to
1336
+ // admission.maxBriefBytes, so a longer objective is rejected here rather
1337
+ // than silently truncated later.
1338
+ if (objective !== undefined && Buffer.byteLength(objective.text, 'utf8') > Math.min(MAX_INTAKE_OBJECTIVE_BYTES, this.workItemsConfig.admission.maxBriefBytes)) {
1339
+ fail('invalid-input', 'intake objective exceeds the configured admission brief limit');
1340
+ }
1341
+ const acceptance = intakeAcceptanceOf(input);
1345
1342
  const result = this.workItemsAvailable().store.recordIntake(candidate);
1343
+ this.rememberIntakeHint(result.record.source, result.record.sourceEventId, objective, acceptance);
1346
1344
  // `sourceText` is the authenticated text the content digest covers; with
1347
1345
  // evaluation off it is ignored, with it on it is held in memory only.
1348
1346
  if (sourceText !== undefined)
1349
1347
  this.workItemsIntakeEvaluation?.observe(result.record, sourceText);
1350
1348
  return result;
1351
1349
  }
1350
+ intakeHintKey(source, sourceEventId) {
1351
+ return `${source}\u0000${sourceEventId}`;
1352
+ }
1353
+ /**
1354
+ * Remember producer-supplied objective/acceptance for at most
1355
+ * `MAX_INTAKE_HINTS` candidates. The text is deliberately memory-only:
1356
+ * restart loses it and auto admission fails closed to observe, rather than
1357
+ * opening a new plaintext ledger for owner messages.
1358
+ */
1359
+ rememberIntakeHint(source, sourceEventId, objective, acceptance) {
1360
+ if (objective === undefined && acceptance === undefined)
1361
+ return;
1362
+ const key = this.intakeHintKey(source, sourceEventId);
1363
+ const previous = this.workItemsIntakeHints.get(key);
1364
+ this.workItemsIntakeHints.delete(key);
1365
+ this.workItemsIntakeHints.set(key, Object.freeze({
1366
+ ...(objective === undefined ? (previous?.objective === undefined ? {} : { objective: previous.objective }) : { objective }),
1367
+ ...(acceptance === undefined ? (previous?.acceptance === undefined ? {} : { acceptance: previous.acceptance }) : { acceptance }),
1368
+ }));
1369
+ while (this.workItemsIntakeHints.size > AssistantWorkItemsService.MAX_INTAKE_HINTS) {
1370
+ const oldest = this.workItemsIntakeHints.keys().next().value;
1371
+ if (oldest === undefined)
1372
+ break;
1373
+ this.workItemsIntakeHints.delete(oldest);
1374
+ }
1375
+ }
1352
1376
  /**
1353
1377
  * Host-only: register the injectable WP20 inferred-evaluation supplier
1354
1378
  * (Policy snapshot + model call). Requires `intakeLedger.evaluation`.
@@ -1532,18 +1556,7 @@ export class AssistantWorkItemsService extends Service {
1532
1556
  try {
1533
1557
  // A held report is simply not dispatched this pass: the same scheduler
1534
1558
  // wake that settles the binding releases it in `workItemsReleaseHeldReports`.
1535
- let held = false;
1536
- try {
1537
- held = this.workItemsHoldsReport(components, result.item, result.report);
1538
- }
1539
- catch (error) {
1540
- // A malformed late binding fails closed: keep holding; the timeout
1541
- // still releases it unverified rather than dropping the report.
1542
- if (!this.workItemsWarnMalformedLateBinding(item.id, error)) {
1543
- this.ctx.logger.debug(`assistant-work-items: report hold for ${item.id} cannot read its acceptance binding: ${describe(error)}`);
1544
- }
1545
- held = this.workItemsConfig.acceptanceHoldReport !== undefined && result.report.status === 'ready';
1546
- }
1559
+ const held = this.workItemsHoldsReport(components, result.item, result.report);
1547
1560
  notified = held ? false : await components.dispatch.notify(result.item, result.report);
1548
1561
  }
1549
1562
  catch (error) {