@modelprofile.com/flexharness 3.1.0 → 3.2.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 +10 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.flexharness.d.ts +24 -2
- package/dist_ts/classes.flexharness.js +438 -78
- package/dist_ts/errors.d.ts +3 -0
- package/dist_ts/errors.js +7 -1
- package/dist_ts/interfaces.d.ts +34 -3
- package/package.json +1 -1
- package/readme.hints.md +8 -0
- package/readme.md +32 -6
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexharness.ts +540 -76
- package/ts/errors.ts +7 -0
- package/ts/interfaces.ts +47 -3
package/changelog.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-08-11 - 3.2.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add bounded prompt queue APIs (harness)
|
|
8
|
+
- Introduce enqueuePrompt(), queue entry inspection, cancellation, and prompt queue events for FIFO session admission.
|
|
9
|
+
- Extend scheduled prompts to share queue ownership with stable schedule keys and cancellable queued work.
|
|
10
|
+
- Enforce pending admission, outstanding prompt, byte, and terminal retention limits while clearing private queue payloads at settlement.
|
|
11
|
+
- Document queue lifecycle behavior and add coverage for cancellation, disposal, retirement, limits, and immutable queued inputs.
|
|
12
|
+
|
|
3
13
|
## 2026-08-11 - 3.1.0
|
|
4
14
|
|
|
5
15
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@modelprofile.com/flexharness',
|
|
6
|
-
version: '3.
|
|
6
|
+
version: '3.2.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, 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, IFlexScheduledPromptAdmission, IFlexSchedulePromptOptions, IFlexSession, IFlexUncertainToolExecution, IFlexUpdateSessionOptions, IJsonObject, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt, TFlexToolExecutionReconciliation } from './interfaces.js';
|
|
2
2
|
export declare class FlexHarness<TScope = unknown> {
|
|
3
3
|
private readonly scopeResolver;
|
|
4
4
|
private readonly modelResolver;
|
|
@@ -8,6 +8,7 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
8
8
|
private readonly agentSessionPolicy;
|
|
9
9
|
private readonly toolOutputLimits;
|
|
10
10
|
private readonly callbackLimits;
|
|
11
|
+
private readonly promptQueueLimits;
|
|
11
12
|
private readonly externalErrorProjector?;
|
|
12
13
|
private readonly stateLoads;
|
|
13
14
|
private readonly scopeAdmissions;
|
|
@@ -19,7 +20,11 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
19
20
|
private readonly orphanedStoredSessions;
|
|
20
21
|
private readonly orphanedExecutionContexts;
|
|
21
22
|
private readonly orphanedProviderReleases;
|
|
23
|
+
private readonly pendingPromptAdmissionOwners;
|
|
22
24
|
private sequence;
|
|
25
|
+
private promptQueueSequence;
|
|
26
|
+
private pendingPromptAdmissions;
|
|
27
|
+
private pendingPromptAdmissionBytes;
|
|
23
28
|
private closed;
|
|
24
29
|
private disposePromise?;
|
|
25
30
|
constructor(options: IFlexHarnessOptions<TScope>);
|
|
@@ -34,7 +39,11 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
34
39
|
getMessage(scopeId: string, sessionId: string, messageId: string): Promise<IFlexMessage>;
|
|
35
40
|
prompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptResult>;
|
|
36
41
|
startPrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptAdmission>;
|
|
42
|
+
enqueuePrompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptQueueAdmission>;
|
|
37
43
|
schedulePrompt(scopeId: string, sessionId: string, scheduleKey: string, prompt: TFlexPrompt, options?: IFlexSchedulePromptOptions): Promise<IFlexScheduledPromptAdmission>;
|
|
44
|
+
getPromptQueueEntry(scopeId: string, sessionId: string, queueId: string): Promise<IFlexPromptQueueEntry>;
|
|
45
|
+
listPromptQueueEntries(scopeId: string, sessionId: string): Promise<IFlexPromptQueueEntry[]>;
|
|
46
|
+
cancelPrompt(scopeId: string, sessionId: string, queueId: string): Promise<boolean>;
|
|
38
47
|
cancelScheduledPrompt(scopeId: string, sessionId: string, scheduleKey: string): Promise<boolean>;
|
|
39
48
|
abort(scopeId: string, sessionId: string): Promise<boolean>;
|
|
40
49
|
listPendingPermissions(scopeId: string, sessionId?: string): Promise<IFlexPermissionRequest[]>;
|
|
@@ -52,7 +61,20 @@ export declare class FlexHarness<TScope = unknown> {
|
|
|
52
61
|
subscribe(listener: TFlexHarnessEventListener): () => void;
|
|
53
62
|
retireScope(scopeId: string): Promise<void>;
|
|
54
63
|
dispose(): Promise<void>;
|
|
55
|
-
private
|
|
64
|
+
private enqueuePromptInternal;
|
|
65
|
+
private reservePendingPromptAdmission;
|
|
66
|
+
private schedulePromptQueueDrain;
|
|
67
|
+
private drainPromptQueue;
|
|
68
|
+
private createActiveRun;
|
|
69
|
+
private assertPromptPromotion;
|
|
70
|
+
private promoteQueuedPrompt;
|
|
71
|
+
private projectPromptQueueEntry;
|
|
72
|
+
private promptQueueEntry;
|
|
73
|
+
private emitPromptQueueEvent;
|
|
74
|
+
private finishQueuedPrompt;
|
|
75
|
+
private cancelQueuedPrompt;
|
|
76
|
+
private cancelStoredPromptQueue;
|
|
77
|
+
private purgeStoredPromptQueue;
|
|
56
78
|
private executeRun;
|
|
57
79
|
private finishFailedRun;
|
|
58
80
|
private prepareGeneration;
|