@modelprofile.com/flexharness 9.9.1 → 10.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/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/classes.flexharness.d.ts +34 -1
- package/dist_ts/classes.flexharness.js +369 -26
- package/dist_ts/errors.d.ts +11 -0
- package/dist_ts/errors.js +18 -1
- package/dist_ts/interfaces.d.ts +59 -1
- package/dist_ts/interfaces.js +1 -1
- package/dist_ts/plugins.d.ts +3 -3
- package/dist_ts/plugins.js +3 -3
- package/dist_ts/utils.harnessoptions.js +2 -1
- package/dist_ts/utils.json.js +8 -1
- package/dist_ts/utils.transfer.js +3 -1
- package/dist_ts_kvm/classes.browserkvm.js +3 -3
- package/dist_ts_kvm/plugins.d.ts +1 -1
- package/dist_ts_kvm/plugins.js +2 -2
- package/package.json +6 -6
- package/readme.md +39 -8
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexharness.ts +440 -30
- package/ts/errors.ts +24 -0
- package/ts/interfaces.ts +64 -0
- package/ts/plugins.ts +7 -0
- package/ts/readme.md +39 -8
- package/ts/utils.harnessoptions.ts +1 -0
- package/ts/utils.json.ts +7 -0
- package/ts/utils.transfer.ts +1 -0
- package/ts_kvm/classes.browserkvm.ts +2 -2
- package/ts_kvm/plugins.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/flexharness',
|
|
6
|
-
version: '
|
|
6
|
+
version: '10.0.0',
|
|
7
7
|
description: 'The FlexHarness toolbox source repository and shared dependency catalog.'
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwrQkFBK0I7SUFDckMsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLDBFQUEwRTtDQUN4RixDQUFBIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IFlexBackgroundExecution, IFlexBeginSessionImportOptions, IFlexCompactSessionOptions, IFlexCreateProjectTaskInput, IFlexCreateSessionOptions, IFlexDeleteSessionGenerationCohortInput, IFlexDeleteSessionGenerationCohortResult, IFlexEventArchiveMetadata, IFlexHarnessOptions, IFlexImportedRun, IFlexMessage, IFlexMessagePage, IFlexMessagePageOptions, IFlexPermissionRequest, IFlexProjectGoalResult, IFlexProjectScratchpadResult, IFlexProjectStateResult, IFlexProjectTaskResult, IFlexProjectTasksResult, IFlexPromptAdmission, IFlexPromptQueueAdmission, IFlexPromptQueueEntry, IFlexPromptOptions, IFlexPromptResult, IFlexRedoSessionResult, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexSessionImportHandle, IFlexSessionImportProgress, IFlexSessionReversionInfo, IFlexSlashCommandDescriptor, IFlexSlashCommandExecutionOptions, IFlexUncertainToolExecution, IFlexUndoSessionResult, IFlexUpdateSessionOptions, IFlexUpdateProjectTaskInput, IJsonObject, TFlexBeginSessionImportResult, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexSlashCommandExecutionResult, TFlexToolExecutionReconciliation } from './interfaces.js';
|
|
1
|
+
import type { IFlexBackgroundExecution, IFlexBeginSessionImportOptions, IFlexCompactSessionOptions, IFlexCreateProjectTaskInput, IFlexCreateSessionOptions, IFlexDeleteSessionGenerationCohortInput, IFlexDeleteSessionGenerationCohortResult, IFlexEventArchiveMetadata, IFlexHarnessOptions, IFlexImportedRun, IFlexMessage, IFlexMessagePage, IFlexMessagePageOptions, IFlexPermissionRequest, IFlexProjectGoalResult, IFlexSteerAdmission, IFlexSteerInput, IFlexProjectScratchpadResult, IFlexProjectStateResult, IFlexProjectTaskResult, IFlexProjectTasksResult, IFlexPromptAdmission, IFlexPromptQueueAdmission, IFlexPromptQueueEntry, IFlexPromptOptions, IFlexPromptResult, IFlexRedoSessionResult, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexSessionImportHandle, IFlexSessionImportProgress, IFlexSessionReversionInfo, IFlexSlashCommandDescriptor, IFlexSlashCommandExecutionOptions, IFlexUncertainToolExecution, IFlexUndoSessionResult, IFlexUpdateSessionOptions, IFlexUpdateProjectTaskInput, IJsonObject, TFlexBeginSessionImportResult, 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> {
|
|
@@ -127,6 +127,16 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
127
127
|
listPromptQueueEntries(scopeId: string, sessionId: string): Promise<IFlexPromptQueueEntry[]>;
|
|
128
128
|
cancelPrompt(scopeId: string, sessionId: string, queueId: string): Promise<boolean>;
|
|
129
129
|
cancelScheduledPrompt(scopeId: string, sessionId: string, scheduleKey: string): Promise<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Steers the running run of the prompt `queueId`: the run takes `steer.prompt` in as a user
|
|
132
|
+
* message at its next step boundary, after the tool results of its current model step are
|
|
133
|
+
* recorded and before its next model call. A running tool call or permission wait is not
|
|
134
|
+
* interrupted. A steer the run has not taken in when it ends is reported in its
|
|
135
|
+
* `unappliedSteerIds`; a steer for a prompt that has no running run, or whose run is ending,
|
|
136
|
+
* is refused with `FlexHarnessSteerRejectedError` reason `not-running` and belongs to the
|
|
137
|
+
* next turn.
|
|
138
|
+
*/
|
|
139
|
+
steerPrompt(scopeId: string, sessionId: string, queueId: string, steer: IFlexSteerInput): Promise<IFlexSteerAdmission>;
|
|
130
140
|
abort(scopeId: string, sessionId: string): Promise<boolean>;
|
|
131
141
|
listPendingPermissions(scopeId: string, sessionId?: string): Promise<IFlexPermissionRequest[]>;
|
|
132
142
|
respondToPermission(scopeId: string, sessionId: string, permissionId: string, decision: TFlexPermissionDecision): Promise<void>;
|
|
@@ -219,12 +229,28 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
219
229
|
private createProjectTaskId;
|
|
220
230
|
private createSubagentTool;
|
|
221
231
|
private executeSubagentTask;
|
|
232
|
+
private createSubagentResultTool;
|
|
222
233
|
private createDelegatedRunAdmissionSeed;
|
|
223
234
|
private acquireSubagentSession;
|
|
224
235
|
private createSubagentSessionId;
|
|
225
236
|
private updateSubagentToolPart;
|
|
226
237
|
private abortExactRun;
|
|
227
238
|
private createReservation;
|
|
239
|
+
private userMessageParts;
|
|
240
|
+
/**
|
|
241
|
+
* Ends steering intake once the run's generation has settled and fixes what became of its
|
|
242
|
+
* steers. A run that stays in the model context reports the steers its generation did not
|
|
243
|
+
* record; a run that does not, because it failed, was stopped before any model output or its
|
|
244
|
+
* outcome could not be established, reports every steer it accepted, since the model context
|
|
245
|
+
* of later turns holds none of them. The bytes of the steers not taken in are released.
|
|
246
|
+
*/
|
|
247
|
+
private closeRunSteering;
|
|
248
|
+
/**
|
|
249
|
+
* Projects a steer the run's generation took in as a user message of the run. The assistant
|
|
250
|
+
* message that answered before it is completed and the run answers on in a new one; a steer
|
|
251
|
+
* taken in before the run answered anything is placed before its still empty assistant message.
|
|
252
|
+
*/
|
|
253
|
+
private applyRunSteer;
|
|
228
254
|
private buildTerminal;
|
|
229
255
|
private reversionId;
|
|
230
256
|
private reversionProviderProtocolVersion;
|
|
@@ -246,12 +272,19 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
246
272
|
private commitRevertedBranch;
|
|
247
273
|
private commitRevertedBranchState;
|
|
248
274
|
private commitArchivedHiddenBranchState;
|
|
275
|
+
private refreshAutomaticArchiveHorizon;
|
|
249
276
|
private filterReversionContextEvents;
|
|
250
277
|
private drainReversionReleases;
|
|
251
278
|
private releaseDeletedSessionReversions;
|
|
252
279
|
private promoteCompletedTerminal;
|
|
253
280
|
private publishFailedTerminal;
|
|
254
281
|
private replaceStagedTerminal;
|
|
282
|
+
/**
|
|
283
|
+
* Puts a run's terminal messages in place of their projected versions: its prompt, and its last
|
|
284
|
+
* assistant message. The steers a run took in, and the assistant messages it completed before
|
|
285
|
+
* them, stay where they are. A terminal message that is not projected yet is added: the prompt
|
|
286
|
+
* before the run's other messages, the assistant message after them.
|
|
287
|
+
*/
|
|
255
288
|
private replaceVisibleRun;
|
|
256
289
|
private emitTerminalProjection;
|
|
257
290
|
private emitFinalRunEvent;
|