@modelprofile.com/flexharness 3.7.0 → 4.0.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,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-08-14 - 4.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - rename the foreground subagent tool and add opt-in project-management tools (harness)
8
+ - Rename the foreground subagent wire tool from `task` to `delegate` while retaining durable `taskId` input/output and child-session persistence semantics.
9
+ - Add configurable `task`, `goal`, `scratchpad`, and `rename_session` built-ins backed by strict session-local CAS state, public controller APIs, attribution context, and durable deletion fencing.
10
+ - Require `IFlexHarnessStores.projectManagement` independently of tool enablement, with generation-aware CAS tombstones and explicit whole-namespace purge.
11
+ - Add random durable session generation identity, deterministic legacy backfill, and monotonic generation sequencing so explicit session IDs can be safely reused without stale writes.
12
+ - Reserve built-in names only while enabled and reject collisions from application and resource providers before model execution.
13
+ - Bound existing `createSession()` and `updateSession()` title inputs to 2048 UTF-8 bytes.
14
+
15
+ ## 2026-08-14 - 3.8.0
16
+
17
+ ### Features
18
+
19
+ - add workspace-required turn reversion (harness)
20
+ - Add a versioned provider contract for revertible, no-change, and nonrevertible workspace outcomes with bounded affected-workspace metadata.
21
+ - Add workspace-required history grouping, nonrevertible barriers, and public reversion information while preserving the existing transcript-optional policy.
22
+ - Upgrade projection persistence to schema version 3 with version 1 and 2 loading, durable cleanup ownership, and crash-safe apply and deletion recovery.
23
+
3
24
  ## 2026-08-13 - 3.7.0
4
25
 
5
26
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/flexharness',
6
- version: '3.7.0',
6
+ version: '4.0.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, IFlexCreateSessionOptions, IFlexEventArchiveMetadata, IFlexHarnessOptions, IFlexMessage, IFlexMessagePage, IFlexMessagePageOptions, IFlexPermissionRequest, IFlexPromptAdmission, IFlexPromptQueueAdmission, IFlexPromptQueueEntry, IFlexPromptOptions, IFlexPromptResult, IFlexRedoSessionResult, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexSlashCommandDescriptor, IFlexSlashCommandExecutionOptions, IFlexUncertainToolExecution, IFlexUndoSessionResult, IFlexUpdateSessionOptions, IJsonObject, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexSlashCommandExecutionResult, TFlexToolExecutionReconciliation } from './interfaces.js';
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';
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> {
@@ -14,8 +14,10 @@ export declare class FlexHarness<TScope = unknown> {
14
14
  private readonly promptQueueLimits;
15
15
  private readonly reversionLimits;
16
16
  private readonly turnReversionProvider;
17
+ private readonly reversionPolicy;
17
18
  private readonly externalErrorProjector?;
18
19
  private readonly subagents;
20
+ private readonly builtInTools;
19
21
  private readonly slashCommands;
20
22
  private readonly maxSubagentDepth;
21
23
  private readonly maxSubagentCallsPerRun;
@@ -33,10 +35,12 @@ export declare class FlexHarness<TScope = unknown> {
33
35
  private readonly orphanedTombstoneCleanups;
34
36
  private readonly orphanedTombstoneOwners;
35
37
  private readonly pendingPromptAdmissionOwners;
38
+ private readonly projectManagementQueues;
36
39
  private readonly activeSlashCommandExecutions;
37
40
  private readonly activeSlashCommandListings;
38
41
  private readonly compactorInvocationContext;
39
42
  private readonly slashCommandInvocationContext;
43
+ private readonly slashCommandActivityContext;
40
44
  private readonly deferredCompactorContexts;
41
45
  private sequence;
42
46
  private promptQueueSequence;
@@ -48,7 +52,21 @@ export declare class FlexHarness<TScope = unknown> {
48
52
  listSessions(scopeId: string): Promise<IFlexSession[]>;
49
53
  createSession(scopeId: string, options?: IFlexCreateSessionOptions): Promise<IFlexSession>;
50
54
  getSession(scopeId: string, sessionId: string): Promise<IFlexSession>;
55
+ getSessionReversionInfo(scopeId: string, sessionId: string): Promise<IFlexSessionReversionInfo>;
51
56
  updateSession(scopeId: string, sessionId: string, options: IFlexUpdateSessionOptions): Promise<IFlexSession>;
57
+ getProjectState(scopeId: string, sessionId: string): Promise<IFlexProjectStateResult>;
58
+ listProjectTasks(scopeId: string, sessionId: string): Promise<IFlexProjectTasksResult>;
59
+ createProjectTask(scopeId: string, sessionId: string, input: IFlexCreateProjectTaskInput): Promise<IFlexProjectTaskResult>;
60
+ updateProjectTask(scopeId: string, sessionId: string, input: IFlexUpdateProjectTaskInput): Promise<IFlexProjectTaskResult>;
61
+ deleteProjectTask(scopeId: string, sessionId: string, taskId: string): Promise<IFlexProjectTaskResult>;
62
+ clearProjectTasks(scopeId: string, sessionId: string): Promise<IFlexProjectTasksResult>;
63
+ getProjectGoal(scopeId: string, sessionId: string): Promise<IFlexProjectGoalResult>;
64
+ setProjectGoal(scopeId: string, sessionId: string, goal: string): Promise<IFlexProjectGoalResult>;
65
+ clearProjectGoal(scopeId: string, sessionId: string): Promise<IFlexProjectGoalResult>;
66
+ getProjectScratchpad(scopeId: string, sessionId: string): Promise<IFlexProjectScratchpadResult>;
67
+ setProjectScratchpad(scopeId: string, sessionId: string, content: string): Promise<IFlexProjectScratchpadResult>;
68
+ appendProjectScratchpad(scopeId: string, sessionId: string, content: string): Promise<IFlexProjectScratchpadResult>;
69
+ clearProjectScratchpad(scopeId: string, sessionId: string): Promise<IFlexProjectScratchpadResult>;
52
70
  deleteSession(scopeId: string, sessionId: string): Promise<void>;
53
71
  private deleteSessionInternal;
54
72
  getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
@@ -89,6 +107,7 @@ export declare class FlexHarness<TScope = unknown> {
89
107
  undoSession(scopeId: string, sessionId: string, signal?: AbortSignal): Promise<IFlexUndoSessionResult>;
90
108
  redoSession(scopeId: string, sessionId: string, signal?: AbortSignal): Promise<IFlexRedoSessionResult>;
91
109
  private reversionUnit;
110
+ private reversionGroups;
92
111
  private requireReversionIdle;
93
112
  private reversionUnavailableReason;
94
113
  private awaitReversionOperation;
@@ -121,7 +140,42 @@ export declare class FlexHarness<TScope = unknown> {
121
140
  private purgeStoredPromptQueue;
122
141
  private executeRun;
123
142
  private finishFailedRun;
143
+ private requireProjectManagementTools;
144
+ private projectManagementKey;
145
+ private queueProjectManagementOperation;
146
+ private awaitProjectManagementOperations;
147
+ private resolveProjectManagementSession;
148
+ private assertProjectManagementSession;
149
+ private loadProjectManagementState;
150
+ private readProjectManagementState;
151
+ private mutateProjectManagementState;
152
+ private projectStateResult;
153
+ private projectTaskResult;
154
+ private projectTasksResult;
155
+ private projectGoalResult;
156
+ private projectScratchpadResult;
157
+ private createProjectTaskInState;
158
+ private updateProjectTaskInState;
159
+ private deleteProjectTaskInState;
160
+ private clearProjectTasksInState;
161
+ private setProjectGoalInState;
162
+ private clearProjectGoalInState;
163
+ private setProjectScratchpadInState;
164
+ private appendProjectScratchpadInState;
165
+ private clearProjectScratchpadInState;
124
166
  private prepareGeneration;
167
+ private enabledBuiltInToolNames;
168
+ private assertNoBuiltInToolCollisions;
169
+ private createBuiltInTools;
170
+ private createRenameSessionTool;
171
+ private createProjectTaskTool;
172
+ private createProjectGoalTool;
173
+ private createProjectScratchpadTool;
174
+ private projectManagementAgentWriteContext;
175
+ private executeProjectTaskTool;
176
+ private executeProjectGoalTool;
177
+ private executeProjectScratchpadTool;
178
+ private createProjectTaskId;
125
179
  private createSubagentTool;
126
180
  private executeSubagentTask;
127
181
  private acquireSubagentSession;
@@ -131,16 +185,21 @@ export declare class FlexHarness<TScope = unknown> {
131
185
  private createReservation;
132
186
  private buildTerminal;
133
187
  private reversionId;
188
+ private reversionProviderProtocolVersion;
134
189
  private reversionCaptureContext;
135
190
  private withReversionMaintenanceSignal;
136
191
  private inspectReversionCapture;
137
192
  private finalizeReversionCapture;
138
- private resolveReversionCaptureReference;
193
+ private resolveReversionCaptureOutcome;
139
194
  private normalizeReversionReference;
195
+ private normalizeReversionOutcome;
196
+ private normalizeAffectedWorkspaces;
140
197
  private prepareRunReversion;
141
198
  private finalizeRunReversion;
199
+ private applyFinalizedReversionOutcome;
142
200
  private hiddenReversionSegments;
143
201
  private enqueueReversionRelease;
202
+ private enqueueReversionReleaseReference;
144
203
  private pruneReversionState;
145
204
  private commitRevertedBranch;
146
205
  private commitRevertedBranchState;
@@ -198,8 +257,10 @@ export declare class FlexHarness<TScope = unknown> {
198
257
  private mutatePermissions;
199
258
  private createScopeSnapshot;
200
259
  private createProjectionSnapshot;
260
+ private upgradeProjectionSnapshot;
201
261
  private reconcileProjectionFromStore;
202
262
  private cleanupSessionDomains;
263
+ private tombstoneProjectManagementSession;
203
264
  private collectSessionSubtree;
204
265
  private tombstoneGroup;
205
266
  private descendantTombstoneRoots;
@@ -236,6 +297,8 @@ export declare class FlexHarness<TScope = unknown> {
236
297
  private getScopeAdmission;
237
298
  private pruneScopeAdmission;
238
299
  private createScopeRetirementError;
300
+ private ambientSlashCommandOwner;
301
+ private assertNoAmbientSlashCommandTeardown;
239
302
  private assertStateAcceptingWork;
240
303
  private createCompactorContext;
241
304
  private withCompactorContext;