@modelprofile.com/flexharness 5.1.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-08-30 - 5.3.0
4
+
5
+ ### Features
6
+
7
+ - add delegated child-run admission leases (subagents)
8
+ - Add a frozen exact child/current-parent admission context and an optional delegatedRunAdmissionProvider for internally delegated runs.
9
+ - Acquire before generation-side reversion, compaction, model, tool, and resource callbacks, while retaining generation-scoped ownership through terminal reversion finalization.
10
+ - Close before canonical acceptance or failed/cancelled finalization, preserve abort progress across late acquisition, and retry failed idempotent closes during exact deletion, retirement, or disposal.
11
+ - Explain new-child versus later-run resume semantics in the model-visible delegate schema and return safe corrective feedback for unknown task IDs.
12
+
13
+ ## 2026-08-26 - 5.2.0
14
+
15
+ ### Features
16
+
17
+ - add generation-fenced session cohort deletion (session-generation)
18
+ - Add deleteSessionGenerationCohort with strict root and authorized cohort validation.
19
+ - Allow createSession callers to provide a validated sessionGenerationId while preserving harness-assigned sequences.
20
+ - Propagate session generation metadata through model resolver contexts, permission requests, and emitted events.
21
+
3
22
  ## 2026-08-26 - 5.1.0
4
23
 
5
24
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/flexharness',
6
- version: '5.1.0',
6
+ version: '5.3.0',
7
7
  description: 'Provider-neutral model-session runtime with durable history, permissions, typed events, and pluggable local or remote tool execution.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwrQkFBK0I7SUFDckMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVJQUF1STtDQUNySixDQUFBIn0=
@@ -1,4 +1,4 @@
1
- import type { IFlexBackgroundExecution, IFlexCreateProjectTaskInput, IFlexCreateSessionOptions, IFlexEventArchiveMetadata, IFlexHarnessOptions, IFlexMessage, IFlexMessagePage, IFlexMessagePageOptions, IFlexPermissionRequest, IFlexProjectGoalResult, IFlexProjectScratchpadResult, IFlexProjectStateResult, IFlexProjectTaskResult, IFlexProjectTasksResult, IFlexPromptAdmission, IFlexPromptQueueAdmission, IFlexPromptQueueEntry, IFlexPromptOptions, IFlexPromptResult, IFlexRedoSessionResult, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexSessionReversionInfo, IFlexSlashCommandDescriptor, IFlexSlashCommandExecutionOptions, IFlexUncertainToolExecution, IFlexUndoSessionResult, IFlexUpdateSessionOptions, IFlexUpdateProjectTaskInput, IJsonObject, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexSlashCommandExecutionResult, TFlexToolExecutionReconciliation } from './interfaces.js';
1
+ import type { IFlexBackgroundExecution, IFlexCreateProjectTaskInput, IFlexCreateSessionOptions, IFlexDeleteSessionGenerationCohortInput, IFlexDeleteSessionGenerationCohortResult, IFlexEventArchiveMetadata, IFlexHarnessOptions, IFlexMessage, IFlexMessagePage, IFlexMessagePageOptions, IFlexPermissionRequest, IFlexProjectGoalResult, IFlexProjectScratchpadResult, IFlexProjectStateResult, IFlexProjectTaskResult, IFlexProjectTasksResult, IFlexPromptAdmission, IFlexPromptQueueAdmission, IFlexPromptQueueEntry, IFlexPromptOptions, IFlexPromptResult, IFlexRedoSessionResult, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexSessionReversionInfo, IFlexSlashCommandDescriptor, IFlexSlashCommandExecutionOptions, IFlexUncertainToolExecution, IFlexUndoSessionResult, IFlexUpdateSessionOptions, IFlexUpdateProjectTaskInput, IJsonObject, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexSlashCommandExecutionResult, TFlexToolExecutionReconciliation } from './interfaces.js';
2
2
  export declare function createFlexResourceToolNamespace(resourceId: string, attachmentRevision: number): string;
3
3
  export declare function createFlexResourceToolName(namespace: string, toolName: string): string;
4
4
  export declare class FlexHarness<TScope = unknown> {
@@ -7,6 +7,7 @@ export declare class FlexHarness<TScope = unknown> {
7
7
  private readonly toolProvider;
8
8
  private readonly resourceToolProviderResolver;
9
9
  private readonly executionContextProvider;
10
+ private readonly delegatedRunAdmissionProvider;
10
11
  private readonly stores;
11
12
  private readonly agentSessionPolicy;
12
13
  private readonly toolOutputLimits;
@@ -67,8 +68,15 @@ export declare class FlexHarness<TScope = unknown> {
67
68
  setProjectScratchpad(scopeId: string, sessionId: string, content: string): Promise<IFlexProjectScratchpadResult>;
68
69
  appendProjectScratchpad(scopeId: string, sessionId: string, content: string): Promise<IFlexProjectScratchpadResult>;
69
70
  clearProjectScratchpad(scopeId: string, sessionId: string): Promise<IFlexProjectScratchpadResult>;
71
+ deleteSessionGenerationCohort(scopeId: string, input: IFlexDeleteSessionGenerationCohortInput): Promise<IFlexDeleteSessionGenerationCohortResult>;
70
72
  deleteSession(scopeId: string, sessionId: string): Promise<void>;
73
+ private startSessionDeletion;
74
+ private startReservedSessionDeletion;
75
+ private registerSessionDeletion;
76
+ private assertAuthorizedSessionGenerationCohort;
77
+ private reserveLiveSessionDeletion;
71
78
  private deleteSessionInternal;
79
+ private finishReservedSessionDeletion;
72
80
  getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
73
81
  listMessagePage(scopeId: string, sessionId: string, options?: IFlexMessagePageOptions): Promise<IFlexMessagePage>;
74
82
  getMessage(scopeId: string, sessionId: string, messageId: string): Promise<IFlexMessage>;
@@ -130,6 +138,12 @@ export declare class FlexHarness<TScope = unknown> {
130
138
  private drainPromptQueue;
131
139
  private createActiveRun;
132
140
  private assertPromptPromotion;
141
+ private assertDelegatedRunAdmissionOwnership;
142
+ private acquireDelegatedRunAdmission;
143
+ private normalizeDelegatedRunAdmissionLease;
144
+ private requestDelegatedRunAdmissionClose;
145
+ private startDelegatedRunAdmissionCloseAttempt;
146
+ private closeRunDelegatedRunAdmission;
133
147
  private promoteQueuedPrompt;
134
148
  private projectPromptQueueEntry;
135
149
  private promptQueueEntry;
@@ -178,6 +192,7 @@ export declare class FlexHarness<TScope = unknown> {
178
192
  private createProjectTaskId;
179
193
  private createSubagentTool;
180
194
  private executeSubagentTask;
195
+ private createDelegatedRunAdmissionSeed;
181
196
  private acquireSubagentSession;
182
197
  private createSubagentSessionId;
183
198
  private updateSubagentToolPart;
@@ -244,6 +259,8 @@ export declare class FlexHarness<TScope = unknown> {
244
259
  private runDetachedCleanup;
245
260
  private beginDetachedCleanupSettlement;
246
261
  private settleDetachedCleanups;
262
+ private delegatedRunAdmissionOwnersForGeneration;
263
+ private settleDelegatedRunAdmissionOwners;
247
264
  private projectExternalError;
248
265
  private projectOperationError;
249
266
  private trustInternalError;
@@ -254,7 +271,9 @@ export declare class FlexHarness<TScope = unknown> {
254
271
  private loadSessionRuntime;
255
272
  private repairLoadedSession;
256
273
  private repairTerminal;
274
+ private withScopeMutationOwnership;
257
275
  private mutateScope;
276
+ private mutateScopeOwned;
258
277
  private mutateProjection;
259
278
  private mutatePermissions;
260
279
  private createScopeSnapshot;
@@ -265,6 +284,7 @@ export declare class FlexHarness<TScope = unknown> {
265
284
  private tombstoneProjectManagementSession;
266
285
  private collectSessionSubtree;
267
286
  private tombstoneGroup;
287
+ private tombstonesForRoots;
268
288
  private descendantTombstoneRoots;
269
289
  private orderTombstoneRootsChildFirst;
270
290
  private finishTombstoneCleanup;