@modelprofile.com/flexharness 10.23.0 → 10.24.1
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 +1 -1
- package/dist_ts/classes.flexharness.admission.d.ts +17 -0
- package/dist_ts/classes.flexharness.admission.js +263 -0
- package/dist_ts/classes.flexharness.callbacks.d.ts +38 -0
- package/dist_ts/classes.flexharness.callbacks.js +313 -0
- package/dist_ts/classes.flexharness.compaction.d.ts +25 -0
- package/dist_ts/classes.flexharness.compaction.js +87 -0
- package/dist_ts/classes.flexharness.configurations.d.ts +11 -0
- package/dist_ts/classes.flexharness.configurations.js +137 -0
- package/dist_ts/classes.flexharness.core.d.ts +143 -0
- package/dist_ts/classes.flexharness.core.js +1538 -0
- package/dist_ts/classes.flexharness.d.ts +2 -437
- package/dist_ts/classes.flexharness.deletion.d.ts +31 -0
- package/dist_ts/classes.flexharness.deletion.js +396 -0
- package/dist_ts/classes.flexharness.imports.d.ts +24 -0
- package/dist_ts/classes.flexharness.imports.js +345 -0
- package/dist_ts/classes.flexharness.js +119 -9776
- package/dist_ts/classes.flexharness.lifecycle.d.ts +47 -0
- package/dist_ts/classes.flexharness.lifecycle.js +625 -0
- package/dist_ts/classes.flexharness.permissions.d.ts +19 -0
- package/dist_ts/classes.flexharness.permissions.js +450 -0
- package/dist_ts/classes.flexharness.projects.d.ts +55 -0
- package/dist_ts/classes.flexharness.projects.js +575 -0
- package/dist_ts/classes.flexharness.prompts.d.ts +44 -0
- package/dist_ts/classes.flexharness.prompts.js +659 -0
- package/dist_ts/classes.flexharness.providers.d.ts +18 -0
- package/dist_ts/classes.flexharness.providers.js +267 -0
- package/dist_ts/classes.flexharness.results.d.ts +26 -0
- package/dist_ts/classes.flexharness.results.js +89 -0
- package/dist_ts/classes.flexharness.reversions.d.ts +52 -0
- package/dist_ts/classes.flexharness.reversions.js +1306 -0
- package/dist_ts/classes.flexharness.runs.d.ts +63 -0
- package/dist_ts/classes.flexharness.runs.js +1058 -0
- package/dist_ts/classes.flexharness.sessions.d.ts +20 -0
- package/dist_ts/classes.flexharness.sessions.js +381 -0
- package/dist_ts/classes.flexharness.slashcommands.d.ts +40 -0
- package/dist_ts/classes.flexharness.slashcommands.js +458 -0
- package/dist_ts/classes.flexharness.subagents.d.ts +31 -0
- package/dist_ts/classes.flexharness.subagents.js +690 -0
- package/dist_ts/classes.flexharness.tooldispatch.d.ts +53 -0
- package/dist_ts/classes.flexharness.tooldispatch.js +418 -0
- package/dist_ts/interfaces.flexharness.d.ts +455 -0
- package/dist_ts/interfaces.flexharness.js +2 -0
- package/dist_ts/utils.flexharness.d.ts +19 -0
- package/dist_ts/utils.flexharness.js +83 -0
- package/dist_ts_compaction/plugins.d.ts +2 -2
- package/dist_ts_compaction/plugins.js +3 -3
- package/dist_ts_compaction/smartagent.compaction.js +6 -5
- package/dist_ts_stores_nosqldb/classes.nosqldbstores.d.ts +9 -0
- package/dist_ts_stores_nosqldb/classes.nosqldbstores.js +13 -1
- package/dist_ts_stores_nosqldb/classes.recordstore.d.ts +2 -2
- package/dist_ts_stores_nosqldb/classes.recordstore.js +3 -3
- package/package.json +3 -3
- package/readme.md +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexharness.admission.ts +331 -0
- package/ts/classes.flexharness.callbacks.ts +352 -0
- package/ts/classes.flexharness.compaction.ts +167 -0
- package/ts/classes.flexharness.configurations.ts +167 -0
- package/ts/classes.flexharness.core.ts +1830 -0
- package/ts/classes.flexharness.deletion.ts +616 -0
- package/ts/classes.flexharness.imports.ts +414 -0
- package/ts/classes.flexharness.lifecycle.ts +786 -0
- package/ts/classes.flexharness.permissions.ts +535 -0
- package/ts/classes.flexharness.projects.ts +1006 -0
- package/ts/classes.flexharness.prompts.ts +857 -0
- package/ts/classes.flexharness.providers.ts +322 -0
- package/ts/classes.flexharness.results.ts +98 -0
- package/ts/classes.flexharness.reversions.ts +1684 -0
- package/ts/classes.flexharness.runs.ts +1204 -0
- package/ts/classes.flexharness.sessions.ts +483 -0
- package/ts/classes.flexharness.slashcommands.ts +705 -0
- package/ts/classes.flexharness.subagents.ts +860 -0
- package/ts/classes.flexharness.tooldispatch.ts +475 -0
- package/ts/classes.flexharness.ts +147 -12567
- package/ts/interfaces.flexharness.ts +517 -0
- package/ts/readme.md +1 -1
- package/ts/utils.flexharness.ts +121 -0
- package/ts_compaction/plugins.ts +2 -2
- package/ts_compaction/smartagent.compaction.ts +5 -4
- package/ts_stores_nosqldb/classes.nosqldbstores.ts +13 -0
- package/ts_stores_nosqldb/classes.recordstore.ts +5 -5
- package/ts_stores_nosqldb/readme.md +7 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as plugins from './plugins.js';
|
|
2
|
+
import { FlexHarnessAbortError } from './errors.js';
|
|
3
|
+
import { type IFlexAgentContextInvocation, type IFlexMessage, type IFlexPromptOptions, type IFlexPromptResult, type IFlexTerminalProjection, type TFlexAgentToolSet } from './interfaces.js';
|
|
4
|
+
import type { INormalizedFlexPrompt } from './utils.prompt.js';
|
|
5
|
+
import type { IStoredSessionState, IStorageState, IActiveRun, IRunSteering, IRunSteeringOutcome, IQueuedPrompt } from './interfaces.flexharness.js';
|
|
6
|
+
import type { FlexHarnessCore } from './classes.flexharness.core.js';
|
|
7
|
+
/** The run execution engine: generations, terminal outcomes, steering and cancellation. */
|
|
8
|
+
export declare class FlexHarnessRuns<TScope> {
|
|
9
|
+
private readonly core;
|
|
10
|
+
constructor(core: FlexHarnessCore<TScope>);
|
|
11
|
+
abort(scopeId: string, sessionId: string): Promise<boolean>;
|
|
12
|
+
createActiveRun(queued: IQueuedPrompt): IActiveRun;
|
|
13
|
+
executeRun(run: IActiveRun, generation: Promise<plugins.IAgentGenerateResult>): Promise<IFlexPromptResult>;
|
|
14
|
+
private finishFailedRun;
|
|
15
|
+
prepareGeneration(run: IActiveRun, options: IFlexPromptOptions, signal: AbortSignal): Promise<plugins.IAgentGenerationLease>;
|
|
16
|
+
enabledBuiltInToolNames(run: IActiveRun): Set<string>;
|
|
17
|
+
assertNoBuiltInToolCollisions(run: IActiveRun, tools: TFlexAgentToolSet): void;
|
|
18
|
+
private createBuiltInTools;
|
|
19
|
+
private createRenameSessionTool;
|
|
20
|
+
abortExactRun(state: IStorageState, sessionId: string, runId: string, reason: unknown): boolean;
|
|
21
|
+
createReservation(run: IActiveRun, prompt: INormalizedFlexPrompt): {
|
|
22
|
+
userMessage: IFlexMessage;
|
|
23
|
+
assistantMessage: IFlexMessage;
|
|
24
|
+
};
|
|
25
|
+
private userMessageParts;
|
|
26
|
+
/**
|
|
27
|
+
* Ends steering intake once the run's generation has settled and fixes what became of its
|
|
28
|
+
* steers. A run that stays in the model context reports the steers its generation did not
|
|
29
|
+
* record; a run that does not, because it failed, was stopped before any model output or its
|
|
30
|
+
* outcome could not be established, reports every steer it accepted, since the model context
|
|
31
|
+
* of later turns holds none of them. The bytes of the steers not taken in are released.
|
|
32
|
+
*/
|
|
33
|
+
closeRunSteering(steering: IRunSteering): IRunSteeringOutcome;
|
|
34
|
+
/**
|
|
35
|
+
* Projects a steer the run's generation took in as a user message of the run. The assistant
|
|
36
|
+
* message that answered before it is completed and the run answers on in a new one; a steer
|
|
37
|
+
* taken in before the run answered anything is placed before its still empty assistant message.
|
|
38
|
+
*/
|
|
39
|
+
applyRunSteer(run: IActiveRun, applied: plugins.IAgentAppliedInput): Promise<void>;
|
|
40
|
+
private buildTerminal;
|
|
41
|
+
private promoteCompletedTerminal;
|
|
42
|
+
private publishFailedTerminal;
|
|
43
|
+
private replaceStagedTerminal;
|
|
44
|
+
/**
|
|
45
|
+
* Puts a run's terminal messages in place of their projected versions: its prompt, and its last
|
|
46
|
+
* assistant message. The steers a run took in, and the assistant messages it completed before
|
|
47
|
+
* them, stay where they are. A terminal message that is not projected yet is added: the prompt
|
|
48
|
+
* before the run's other messages, the assistant message after them.
|
|
49
|
+
*/
|
|
50
|
+
replaceVisibleRun(stored: IStoredSessionState, terminal: IFlexTerminalProjection): void;
|
|
51
|
+
private emitTerminalProjection;
|
|
52
|
+
/**
|
|
53
|
+
* Ends a run that fails without publishing a terminal projection, because its namespace was
|
|
54
|
+
* fenced or retired or its durable outcome could not be established: listeners still receive
|
|
55
|
+
* its terminal message events and its one `run.finished`. Nothing here is persisted; the next
|
|
56
|
+
* load of the namespace repairs the stored projection from the canonical outcome.
|
|
57
|
+
*/
|
|
58
|
+
private emitUnpublishedRunFinish;
|
|
59
|
+
private emitFinalRunEvent;
|
|
60
|
+
cancelRun(run: IActiveRun, reason: FlexHarnessAbortError, context?: IFlexAgentContextInvocation<TScope>): void;
|
|
61
|
+
abortRunInternally(run: IActiveRun, error: unknown, context?: IFlexAgentContextInvocation<TScope>): void;
|
|
62
|
+
rollbackAdmission(run: IActiveRun, projectionReserved: boolean, originalError: Error): Promise<unknown[]>;
|
|
63
|
+
}
|