@modelprofile.com/flexharness 3.8.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 +12 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.flexharness.d.ts +52 -1
- package/dist_ts/classes.flexharness.js +736 -25
- package/dist_ts/classes.stores.d.ts +10 -1
- package/dist_ts/classes.stores.js +164 -2
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/interfaces.d.ts +94 -0
- package/dist_ts/interfaces.js +12 -1
- package/dist_ts/utils.json.js +37 -3
- package/dist_ts/utils.projectmanagement.d.ts +5 -0
- package/dist_ts/utils.projectmanagement.js +141 -0
- package/package.json +1 -1
- package/readme.hints.md +4 -2
- package/readme.md +121 -15
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexharness.ts +1234 -24
- package/ts/classes.stores.ts +262 -3
- package/ts/index.ts +6 -0
- package/ts/interfaces.ts +129 -0
- package/ts/utils.json.ts +50 -1
- package/ts/utils.projectmanagement.ts +226 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
3
15
|
## 2026-08-14 - 3.8.0
|
|
4
16
|
|
|
5
17
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/flexharness',
|
|
6
|
-
version: '
|
|
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, IFlexSessionReversionInfo, 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> {
|
|
@@ -17,6 +17,7 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
17
17
|
private readonly reversionPolicy;
|
|
18
18
|
private readonly externalErrorProjector?;
|
|
19
19
|
private readonly subagents;
|
|
20
|
+
private readonly builtInTools;
|
|
20
21
|
private readonly slashCommands;
|
|
21
22
|
private readonly maxSubagentDepth;
|
|
22
23
|
private readonly maxSubagentCallsPerRun;
|
|
@@ -34,6 +35,7 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
34
35
|
private readonly orphanedTombstoneCleanups;
|
|
35
36
|
private readonly orphanedTombstoneOwners;
|
|
36
37
|
private readonly pendingPromptAdmissionOwners;
|
|
38
|
+
private readonly projectManagementQueues;
|
|
37
39
|
private readonly activeSlashCommandExecutions;
|
|
38
40
|
private readonly activeSlashCommandListings;
|
|
39
41
|
private readonly compactorInvocationContext;
|
|
@@ -52,6 +54,19 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
52
54
|
getSession(scopeId: string, sessionId: string): Promise<IFlexSession>;
|
|
53
55
|
getSessionReversionInfo(scopeId: string, sessionId: string): Promise<IFlexSessionReversionInfo>;
|
|
54
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>;
|
|
55
70
|
deleteSession(scopeId: string, sessionId: string): Promise<void>;
|
|
56
71
|
private deleteSessionInternal;
|
|
57
72
|
getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
|
|
@@ -125,7 +140,42 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
125
140
|
private purgeStoredPromptQueue;
|
|
126
141
|
private executeRun;
|
|
127
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;
|
|
128
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;
|
|
129
179
|
private createSubagentTool;
|
|
130
180
|
private executeSubagentTask;
|
|
131
181
|
private acquireSubagentSession;
|
|
@@ -210,6 +260,7 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
210
260
|
private upgradeProjectionSnapshot;
|
|
211
261
|
private reconcileProjectionFromStore;
|
|
212
262
|
private cleanupSessionDomains;
|
|
263
|
+
private tombstoneProjectManagementSession;
|
|
213
264
|
private collectSessionSubtree;
|
|
214
265
|
private tombstoneGroup;
|
|
215
266
|
private descendantTombstoneRoots;
|