@modelprofile.com/flexharness 3.6.0 → 3.7.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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-08-13 - 3.7.0
4
+
5
+ ### Features
6
+
7
+ - add native slash commands and turn reversion (harness)
8
+ - Add built-in, template, and typed-handler slash commands with authoritative parsing, availability, execution, and literal unknown-command fallback.
9
+ - Add durable grouped undo and redo with optional workspace capture, crash recovery, branch commitment, release ownership, and archival horizons.
10
+ - Upgrade projection persistence to schema version 2 while preserving version 1 loading, and document the public command and reversion contracts.
11
+
3
12
  ## 2026-08-13 - 3.6.0
4
13
 
5
14
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/flexharness',
6
- version: '3.6.0',
6
+ version: '3.7.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, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexUncertainToolExecution, IFlexUpdateSessionOptions, IJsonObject, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexToolExecutionReconciliation } from './interfaces.js';
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';
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> {
@@ -12,8 +12,11 @@ export declare class FlexHarness<TScope = unknown> {
12
12
  private readonly toolOutputLimits;
13
13
  private readonly callbackLimits;
14
14
  private readonly promptQueueLimits;
15
+ private readonly reversionLimits;
16
+ private readonly turnReversionProvider;
15
17
  private readonly externalErrorProjector?;
16
18
  private readonly subagents;
19
+ private readonly slashCommands;
17
20
  private readonly maxSubagentDepth;
18
21
  private readonly maxSubagentCallsPerRun;
19
22
  private readonly stateLoads;
@@ -28,8 +31,12 @@ export declare class FlexHarness<TScope = unknown> {
28
31
  private readonly orphanedExecutionContexts;
29
32
  private readonly orphanedProviderReleases;
30
33
  private readonly orphanedTombstoneCleanups;
34
+ private readonly orphanedTombstoneOwners;
31
35
  private readonly pendingPromptAdmissionOwners;
36
+ private readonly activeSlashCommandExecutions;
37
+ private readonly activeSlashCommandListings;
32
38
  private readonly compactorInvocationContext;
39
+ private readonly slashCommandInvocationContext;
33
40
  private readonly deferredCompactorContexts;
34
41
  private sequence;
35
42
  private promptQueueSequence;
@@ -47,6 +54,20 @@ export declare class FlexHarness<TScope = unknown> {
47
54
  getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
48
55
  listMessagePage(scopeId: string, sessionId: string, options?: IFlexMessagePageOptions): Promise<IFlexMessagePage>;
49
56
  getMessage(scopeId: string, sessionId: string, messageId: string): Promise<IFlexMessage>;
57
+ listSlashCommands(scopeId: string, sessionId: string): Promise<IFlexSlashCommandDescriptor[]>;
58
+ private createSlashCommandDescriptors;
59
+ executeSlashCommand(scopeId: string, sessionId: string, untouchedInput: string, options?: IFlexSlashCommandExecutionOptions): Promise<TFlexSlashCommandExecutionResult>;
60
+ private isSessionAvailableForSlashCommand;
61
+ private slashCommandPromptUnavailableReason;
62
+ private slashCommandPromptAvailability;
63
+ private requireSlashCommandPromptAvailable;
64
+ private promptAdmissionByteSize;
65
+ private isSessionRuntimeIdle;
66
+ private slashCommandSessionKey;
67
+ private requireSessionAvailableForSlashCommand;
68
+ private trackSlashCommandExecution;
69
+ private trackSlashCommandListing;
70
+ private executeSlashCommandHandler;
50
71
  prompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptResult>;
51
72
  startPrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptAdmission>;
52
73
  enqueuePrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptQueueAdmission>;
@@ -64,6 +85,19 @@ export declare class FlexHarness<TScope = unknown> {
64
85
  type: string;
65
86
  }): Promise<void>;
66
87
  compactSession(scopeId: string, sessionId: string): Promise<void>;
88
+ private compactStoredSession;
89
+ undoSession(scopeId: string, sessionId: string, signal?: AbortSignal): Promise<IFlexUndoSessionResult>;
90
+ redoSession(scopeId: string, sessionId: string, signal?: AbortSignal): Promise<IFlexRedoSessionResult>;
91
+ private reversionUnit;
92
+ private requireReversionIdle;
93
+ private reversionUnavailableReason;
94
+ private awaitReversionOperation;
95
+ private changeReversionCursor;
96
+ private changeReversionCursorResolved;
97
+ private reconcileContextAvailability;
98
+ private resumePendingApply;
99
+ private persistKnownNotApplied;
100
+ private recoverPendingCapture;
67
101
  archiveSessionEvents(scopeId: string, sessionId: string, compactionEventId?: string): Promise<IFlexEventArchiveMetadata | undefined>;
68
102
  listBackgroundExecutions(scopeId: string, sessionId: string): Promise<IFlexBackgroundExecution[]>;
69
103
  getBackgroundExecution(scopeId: string, sessionId: string, executionId: string): Promise<IFlexBackgroundExecution>;
@@ -96,6 +130,24 @@ export declare class FlexHarness<TScope = unknown> {
96
130
  private abortExactRun;
97
131
  private createReservation;
98
132
  private buildTerminal;
133
+ private reversionId;
134
+ private reversionCaptureContext;
135
+ private withReversionMaintenanceSignal;
136
+ private inspectReversionCapture;
137
+ private finalizeReversionCapture;
138
+ private resolveReversionCaptureReference;
139
+ private normalizeReversionReference;
140
+ private prepareRunReversion;
141
+ private finalizeRunReversion;
142
+ private hiddenReversionSegments;
143
+ private enqueueReversionRelease;
144
+ private pruneReversionState;
145
+ private commitRevertedBranch;
146
+ private commitRevertedBranchState;
147
+ private commitArchivedHiddenBranchState;
148
+ private filterReversionContextEvents;
149
+ private drainReversionReleases;
150
+ private releaseDeletedSessionReversions;
99
151
  private promoteCompletedTerminal;
100
152
  private publishFailedTerminal;
101
153
  private replaceStagedTerminal;
@@ -146,6 +198,7 @@ export declare class FlexHarness<TScope = unknown> {
146
198
  private mutatePermissions;
147
199
  private createScopeSnapshot;
148
200
  private createProjectionSnapshot;
201
+ private reconcileProjectionFromStore;
149
202
  private cleanupSessionDomains;
150
203
  private collectSessionSubtree;
151
204
  private tombstoneGroup;
@@ -155,6 +208,7 @@ export declare class FlexHarness<TScope = unknown> {
155
208
  private finishTombstoneCleanupInternal;
156
209
  private fenceNamespace;
157
210
  private deferNamespaceDrain;
211
+ private deferReversionReleaseDrain;
158
212
  private sessionsAreDependencyRelated;
159
213
  private isSessionAncestor;
160
214
  private sessionAncestryDepth;
@@ -174,6 +228,8 @@ export declare class FlexHarness<TScope = unknown> {
174
228
  private drainStorage;
175
229
  private drainStorageInternal;
176
230
  private disposeInternal;
231
+ private abortSlashCommandExecutions;
232
+ private abortSlashCommandListings;
177
233
  private appendUnexpectedErrors;
178
234
  private abortCompactorLifecycle;
179
235
  private resolveState;
@@ -187,6 +243,8 @@ export declare class FlexHarness<TScope = unknown> {
187
243
  private effectiveRunCompactorContext;
188
244
  private withRunCompactorContext;
189
245
  private requireSession;
246
+ private completedReversionCandidates;
247
+ private visibleMessages;
190
248
  private requireMutableSession;
191
249
  private requireMessage;
192
250
  private isTombstoned;