@modelprofile.com/flexharness 1.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/.smartconfig.json +34 -0
- package/dist_ts/00_commitinfo_data.d.ts +8 -0
- package/dist_ts/00_commitinfo_data.js +9 -0
- package/dist_ts/classes.flexharness.d.ts +61 -0
- package/dist_ts/classes.flexharness.js +1312 -0
- package/dist_ts/classes.stores.d.ts +26 -0
- package/dist_ts/classes.stores.js +156 -0
- package/dist_ts/errors.d.ts +44 -0
- package/dist_ts/errors.js +105 -0
- package/dist_ts/index.d.ts +5 -0
- package/dist_ts/index.js +6 -0
- package/dist_ts/interfaces.d.ts +288 -0
- package/dist_ts/interfaces.js +2 -0
- package/dist_ts/plugins.d.ts +7 -0
- package/dist_ts/plugins.js +9 -0
- package/dist_ts/utils.json.d.ts +8 -0
- package/dist_ts/utils.json.js +540 -0
- package/dist_ts/utils.prompt.d.ts +8 -0
- package/dist_ts/utils.prompt.js +170 -0
- package/license.md +21 -0
- package/package.json +36 -0
- package/readme.hints.md +29 -0
- package/readme.md +285 -0
- package/ts/00_commitinfo_data.ts +8 -0
- package/ts/classes.flexharness.ts +1648 -0
- package/ts/classes.stores.ts +195 -0
- package/ts/errors.ts +125 -0
- package/ts/index.ts +5 -0
- package/ts/interfaces.ts +369 -0
- package/ts/plugins.ts +15 -0
- package/ts/utils.json.ts +651 -0
- package/ts/utils.prompt.ts +193 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@git.zone/cli": {
|
|
3
|
+
"schemaVersion": 2,
|
|
4
|
+
"projectType": "npm",
|
|
5
|
+
"module": {
|
|
6
|
+
"githost": "code.foss.global",
|
|
7
|
+
"gitscope": "modelprofile.com",
|
|
8
|
+
"gitrepo": "flexharness",
|
|
9
|
+
"description": "Provider-neutral model-session runtime with durable history, permissions, typed events, and pluggable local or remote tool execution.",
|
|
10
|
+
"npmPackagename": "@modelprofile.com/flexharness",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"projectDomain": "modelprofile.com"
|
|
13
|
+
},
|
|
14
|
+
"release": {
|
|
15
|
+
"targets": {
|
|
16
|
+
"git": {
|
|
17
|
+
"enabled": true,
|
|
18
|
+
"remote": "origin",
|
|
19
|
+
"pushBranch": true,
|
|
20
|
+
"pushTags": true
|
|
21
|
+
},
|
|
22
|
+
"npm": {
|
|
23
|
+
"enabled": true,
|
|
24
|
+
"registries": [
|
|
25
|
+
"https://verdaccio.lossless.digital",
|
|
26
|
+
"https://registry.npmjs.org"
|
|
27
|
+
],
|
|
28
|
+
"accessLevel": "public",
|
|
29
|
+
"alreadyPublished": "success"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
|
+
*/
|
|
4
|
+
export const commitinfo = {
|
|
5
|
+
name: '@modelprofile.com/flexharness',
|
|
6
|
+
version: '1.0.0',
|
|
7
|
+
description: 'Provider-neutral model-session runtime with durable history, permissions, typed events, and pluggable local or remote tool execution.'
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwrQkFBK0I7SUFDckMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVJQUF1STtDQUNySixDQUFBIn0=
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { IFlexCreateSessionOptions, IFlexHarnessOptions, IFlexMessage, IFlexPermissionRequest, IFlexPromptOptions, IFlexPromptResult, IFlexSession, IFlexUpdateSessionOptions, TFlexHarnessEventListener, TFlexPermissionDecision, TFlexPrompt } from './interfaces.js';
|
|
2
|
+
export declare class FlexHarness<TScope = unknown> {
|
|
3
|
+
private readonly scopeResolver;
|
|
4
|
+
private readonly modelResolver;
|
|
5
|
+
private readonly toolProvider;
|
|
6
|
+
private readonly store;
|
|
7
|
+
private readonly runner;
|
|
8
|
+
private readonly toolOutputLimits;
|
|
9
|
+
private readonly callbackLimits;
|
|
10
|
+
private readonly stateLoads;
|
|
11
|
+
private readonly listeners;
|
|
12
|
+
private readonly detachedToolCleanups;
|
|
13
|
+
private sequence;
|
|
14
|
+
private closed;
|
|
15
|
+
private disposePromise?;
|
|
16
|
+
constructor(options: IFlexHarnessOptions<TScope>);
|
|
17
|
+
listSessions(scopeId: string): Promise<IFlexSession[]>;
|
|
18
|
+
createSession(scopeId: string, options?: IFlexCreateSessionOptions): Promise<IFlexSession>;
|
|
19
|
+
getSession(scopeId: string, sessionId: string): Promise<IFlexSession>;
|
|
20
|
+
updateSession(scopeId: string, sessionId: string, options: IFlexUpdateSessionOptions): Promise<IFlexSession>;
|
|
21
|
+
deleteSession(scopeId: string, sessionId: string): Promise<void>;
|
|
22
|
+
getMessages(scopeId: string, sessionId: string): Promise<IFlexMessage[]>;
|
|
23
|
+
prompt(scopeId: string, sessionId: string, prompt: TFlexPrompt, options?: IFlexPromptOptions): Promise<IFlexPromptResult>;
|
|
24
|
+
abort(scopeId: string, sessionId: string, reason?: string): Promise<boolean>;
|
|
25
|
+
listPendingPermissions(scopeId: string, sessionId?: string): Promise<IFlexPermissionRequest[]>;
|
|
26
|
+
respondToPermission(scopeId: string, sessionId: string, permissionId: string, decision: TFlexPermissionDecision): Promise<void>;
|
|
27
|
+
subscribe(listener: TFlexHarnessEventListener): () => void;
|
|
28
|
+
dispose(): Promise<void>;
|
|
29
|
+
private disposeInternal;
|
|
30
|
+
private executeRun;
|
|
31
|
+
private reserveRun;
|
|
32
|
+
private finalizeRun;
|
|
33
|
+
private applyRunFinalState;
|
|
34
|
+
private emitFinalMutationEvents;
|
|
35
|
+
private emitFinalRunEvent;
|
|
36
|
+
private onTextDelta;
|
|
37
|
+
private onReasoningStart;
|
|
38
|
+
private onReasoningDelta;
|
|
39
|
+
private onReasoningEnd;
|
|
40
|
+
private onToolStart;
|
|
41
|
+
private onToolFinish;
|
|
42
|
+
private reserveCallbackCapacity;
|
|
43
|
+
private requestPermission;
|
|
44
|
+
private applyPermissionResponse;
|
|
45
|
+
private rejectRunPermissions;
|
|
46
|
+
private rejectPending;
|
|
47
|
+
private forceRejectPending;
|
|
48
|
+
private emitPartEvent;
|
|
49
|
+
private abortRunInternally;
|
|
50
|
+
private observeDetachedToolProvider;
|
|
51
|
+
private emitEvent;
|
|
52
|
+
private resolveState;
|
|
53
|
+
private loadState;
|
|
54
|
+
private mutateAndSave;
|
|
55
|
+
private restorePersistentState;
|
|
56
|
+
private createSnapshot;
|
|
57
|
+
private requireSession;
|
|
58
|
+
private requireMessage;
|
|
59
|
+
private requireMutableSession;
|
|
60
|
+
private assertOpen;
|
|
61
|
+
}
|