@modelprofile.com/flexharness 3.5.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,23 @@
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
+
12
+ ## 2026-08-13 - 3.6.0
13
+
14
+ ### Features
15
+
16
+ - compose run-scoped resource tool providers (harness)
17
+ - Resolve fresh resource providers per run while preserving the existing application tool provider.
18
+ - Expose deterministic bounded tool namespaces and bind permissions to non-spoofable resource revision identity.
19
+ - Reject duplicate resources, namespaces, and exposed tools before execution, with complete retryable cleanup across failure, cancellation, retirement, and disposal.
20
+
3
21
  ## 2026-08-13 - 3.5.0
4
22
 
5
23
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/flexharness',
6
- version: '3.5.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,16 +1,22 @@
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
+ export declare function createFlexResourceToolNamespace(resourceId: string, attachmentRevision: number): string;
3
+ export declare function createFlexResourceToolName(namespace: string, toolName: string): string;
2
4
  export declare class FlexHarness<TScope = unknown> {
3
5
  private readonly scopeResolver;
4
6
  private readonly modelResolver;
5
7
  private readonly toolProvider;
8
+ private readonly resourceToolProviderResolver;
6
9
  private readonly executionContextProvider;
7
10
  private readonly stores;
8
11
  private readonly agentSessionPolicy;
9
12
  private readonly toolOutputLimits;
10
13
  private readonly callbackLimits;
11
14
  private readonly promptQueueLimits;
15
+ private readonly reversionLimits;
16
+ private readonly turnReversionProvider;
12
17
  private readonly externalErrorProjector?;
13
18
  private readonly subagents;
19
+ private readonly slashCommands;
14
20
  private readonly maxSubagentDepth;
15
21
  private readonly maxSubagentCallsPerRun;
16
22
  private readonly stateLoads;
@@ -25,8 +31,12 @@ export declare class FlexHarness<TScope = unknown> {
25
31
  private readonly orphanedExecutionContexts;
26
32
  private readonly orphanedProviderReleases;
27
33
  private readonly orphanedTombstoneCleanups;
34
+ private readonly orphanedTombstoneOwners;
28
35
  private readonly pendingPromptAdmissionOwners;
36
+ private readonly activeSlashCommandExecutions;
37
+ private readonly activeSlashCommandListings;
29
38
  private readonly compactorInvocationContext;
39
+ private readonly slashCommandInvocationContext;
30
40
  private readonly deferredCompactorContexts;
31
41
  private sequence;
32
42
  private promptQueueSequence;
@@ -44,6 +54,20 @@ export declare class FlexHarness<TScope = unknown> {
44
54
  getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
45
55
  listMessagePage(scopeId: string, sessionId: string, options?: IFlexMessagePageOptions): Promise<IFlexMessagePage>;
46
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;
47
71
  prompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptResult>;
48
72
  startPrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptAdmission>;
49
73
  enqueuePrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptQueueAdmission>;
@@ -61,6 +85,19 @@ export declare class FlexHarness<TScope = unknown> {
61
85
  type: string;
62
86
  }): Promise<void>;
63
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;
64
101
  archiveSessionEvents(scopeId: string, sessionId: string, compactionEventId?: string): Promise<IFlexEventArchiveMetadata | undefined>;
65
102
  listBackgroundExecutions(scopeId: string, sessionId: string): Promise<IFlexBackgroundExecution[]>;
66
103
  getBackgroundExecution(scopeId: string, sessionId: string, executionId: string): Promise<IFlexBackgroundExecution>;
@@ -93,6 +130,24 @@ export declare class FlexHarness<TScope = unknown> {
93
130
  private abortExactRun;
94
131
  private createReservation;
95
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;
96
151
  private promoteCompletedTerminal;
97
152
  private publishFailedTerminal;
98
153
  private replaceStagedTerminal;
@@ -119,6 +174,8 @@ export declare class FlexHarness<TScope = unknown> {
119
174
  private abortRunInternally;
120
175
  private rollbackAdmission;
121
176
  private normalizeToolHandle;
177
+ private provideRunToolHandle;
178
+ private normalizeResourceToolProviderDescriptors;
122
179
  private closePartialToolHandle;
123
180
  private retainDetachedCleanup;
124
181
  private observeDetachedToolProvider;
@@ -141,6 +198,7 @@ export declare class FlexHarness<TScope = unknown> {
141
198
  private mutatePermissions;
142
199
  private createScopeSnapshot;
143
200
  private createProjectionSnapshot;
201
+ private reconcileProjectionFromStore;
144
202
  private cleanupSessionDomains;
145
203
  private collectSessionSubtree;
146
204
  private tombstoneGroup;
@@ -150,6 +208,7 @@ export declare class FlexHarness<TScope = unknown> {
150
208
  private finishTombstoneCleanupInternal;
151
209
  private fenceNamespace;
152
210
  private deferNamespaceDrain;
211
+ private deferReversionReleaseDrain;
153
212
  private sessionsAreDependencyRelated;
154
213
  private isSessionAncestor;
155
214
  private sessionAncestryDepth;
@@ -169,6 +228,8 @@ export declare class FlexHarness<TScope = unknown> {
169
228
  private drainStorage;
170
229
  private drainStorageInternal;
171
230
  private disposeInternal;
231
+ private abortSlashCommandExecutions;
232
+ private abortSlashCommandListings;
172
233
  private appendUnexpectedErrors;
173
234
  private abortCompactorLifecycle;
174
235
  private resolveState;
@@ -182,6 +243,8 @@ export declare class FlexHarness<TScope = unknown> {
182
243
  private effectiveRunCompactorContext;
183
244
  private withRunCompactorContext;
184
245
  private requireSession;
246
+ private completedReversionCandidates;
247
+ private visibleMessages;
185
248
  private requireMutableSession;
186
249
  private requireMessage;
187
250
  private isTombstoned;