@modelprofile.com/flexharness-agent 6.0.0 → 7.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_agent/classes.sessionengine.d.ts +93 -0
- package/dist_ts_agent/classes.sessionengine.js +2140 -0
- package/dist_ts_agent/index.d.ts +3 -2
- package/dist_ts_agent/index.js +3 -2
- package/dist_ts_agent/persistence.file.d.ts +24 -0
- package/dist_ts_agent/persistence.file.js +199 -0
- package/dist_ts_agent/plugins.d.ts +0 -7
- package/dist_ts_agent/plugins.js +1 -9
- package/dist_ts_agent/plugins.node.d.ts +7 -0
- package/dist_ts_agent/plugins.node.js +9 -0
- package/dist_ts_agent/plugins.portable.d.ts +4 -0
- package/dist_ts_agent/plugins.portable.js +5 -0
- package/dist_ts_agent/runner.d.ts +4 -0
- package/dist_ts_agent/runner.js +34 -0
- package/dist_ts_agent/runtime.interfaces.d.ts +21 -0
- package/dist_ts_agent/runtime.interfaces.js +2 -0
- package/dist_ts_agent/runtime.run.d.ts +3 -0
- package/dist_ts_agent/runtime.run.js +94 -0
- package/dist_ts_agent/smartagent.classes.agent.js +4 -93
- package/dist_ts_agent/smartagent.classes.session.d.ts +5 -88
- package/dist_ts_agent/smartagent.classes.session.js +19 -2134
- package/dist_ts_agent/smartagent.events.js +2 -2
- package/dist_ts_agent/smartagent.persistence.d.ts +2 -22
- package/dist_ts_agent/smartagent.persistence.js +3 -198
- package/package.json +9 -3
- package/readme.md +9 -3
- package/ts_agent/classes.sessionengine.ts +2591 -0
- package/ts_agent/index.ts +2 -2
- package/ts_agent/persistence.file.ts +232 -0
- package/ts_agent/plugins.node.ts +10 -0
- package/ts_agent/plugins.portable.ts +5 -0
- package/ts_agent/plugins.ts +0 -10
- package/ts_agent/readme.md +9 -3
- package/ts_agent/runner.ts +40 -0
- package/ts_agent/runtime.interfaces.ts +21 -0
- package/ts_agent/runtime.run.ts +107 -0
- package/ts_agent/smartagent.classes.agent.ts +4 -101
- package/ts_agent/smartagent.classes.session.ts +24 -2582
- package/ts_agent/smartagent.events.ts +1 -1
- package/ts_agent/smartagent.persistence.ts +2 -224
|
@@ -1,90 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare class AgentSession implements IAgentSession {
|
|
6
|
-
private readonly options;
|
|
7
|
-
private readonly events;
|
|
8
|
-
private readonly eventIds;
|
|
9
|
-
private readonly generationHandles;
|
|
10
|
-
private readonly unresolvedLeaseCleanups;
|
|
11
|
-
private sequence;
|
|
12
|
-
private persistenceRevision;
|
|
13
|
-
private persistenceQueue;
|
|
14
|
-
private persistenceError;
|
|
15
|
-
private readonly notificationDispatches;
|
|
16
|
-
private readonly listeners;
|
|
17
|
-
private readonly scheduledGenerations;
|
|
18
|
-
private readonly generationCallbackContext;
|
|
19
|
-
private retentionPromise;
|
|
20
|
-
private maintenanceError;
|
|
21
|
-
private generationQueue;
|
|
22
|
-
private currentGenerationAbortController;
|
|
23
|
-
private readonly sessionAbortController;
|
|
24
|
-
private jobUnsubscribe;
|
|
25
|
-
private closed;
|
|
26
|
-
private closeFinalizationReached;
|
|
27
|
-
private closeCleanupCompletedState;
|
|
28
|
-
get closeCleanupCompleted(): boolean;
|
|
29
|
-
private refreshCloseCleanupCompleted;
|
|
30
|
-
static create(options: IAgentSessionOptions): Promise<AgentSession>;
|
|
1
|
+
import { AgentSessionEngine } from './classes.sessionengine.js';
|
|
2
|
+
import type { IAgentSessionOptions } from './smartagent.interfaces.js';
|
|
3
|
+
/** Node session facade; callback ancestry remains isolated with AsyncLocalStorage. */
|
|
4
|
+
export declare class AgentSession extends AgentSessionEngine {
|
|
31
5
|
constructor(options: IAgentSessionOptions);
|
|
32
|
-
|
|
33
|
-
private restoreEvent;
|
|
34
|
-
private queuePersistence;
|
|
35
|
-
private flushPersistence;
|
|
36
|
-
private reportListenerError;
|
|
37
|
-
private queueNotification;
|
|
38
|
-
private enqueueListenerChange;
|
|
39
|
-
private deliverListenerChanges;
|
|
40
|
-
private commitEvents;
|
|
41
|
-
private commitEvent;
|
|
42
|
-
pushEvent(event: TAgentEvent): Promise<void>;
|
|
43
|
-
pushUserMessage(content: TAgentPrompt): Promise<void>;
|
|
44
|
-
pushRuntimeEvent(event: import('./smartagent.events.js').IAgentRuntimeEventPayload): Promise<void>;
|
|
45
|
-
private transaction;
|
|
46
|
-
private archivedTransaction;
|
|
47
|
-
private verifyGenerationClaim;
|
|
48
|
-
private interruptRestoredTransactions;
|
|
49
|
-
private transactionalStoreCapabilityError;
|
|
50
|
-
beginGeneration(content: TAgentPrompt, options?: IAgentBeginGenerationOptions): Promise<IAgentGenerationHandle>;
|
|
51
|
-
private appendGenerationOutcome;
|
|
52
|
-
private transactionOutcomeErrorReason;
|
|
53
|
-
finalizeGeneration(transaction: IAgentGenerationHandle, outcome: TAgentGenerationOutcome): Promise<void>;
|
|
54
|
-
listUncertainToolExecutions(): IToolExecutionIntentEvent[];
|
|
55
|
-
reconcileToolExecution(intentId: string, reconciliation: TAgentToolExecutionReconciliationOptions): Promise<void>;
|
|
56
|
-
getEvents(): readonly TAgentEvent[];
|
|
57
|
-
getModelMessages(): plugins.ModelMessage[];
|
|
58
|
-
private buildContext;
|
|
59
|
-
subscribe(listener: TAgentSessionChangeListener): () => void;
|
|
60
|
-
scheduleGenerate(options: IAgentScheduleGenerateOptions): Promise<IAgentGenerateResult>;
|
|
61
|
-
private startScheduledGeneration;
|
|
62
|
-
private settleScheduledGeneration;
|
|
63
|
-
cancelScheduledGeneration(key: string, reason?: unknown): boolean;
|
|
64
|
-
private performCompaction;
|
|
65
|
-
private queueExclusive;
|
|
66
|
-
compact(options?: IAgentCompactOptions): Promise<void>;
|
|
67
|
-
archiveCompactedEvents(compactionEventId?: string): Promise<TAgentEventArchive | undefined>;
|
|
68
|
-
private archiveCompactedEventsLocked;
|
|
69
|
-
private runEventRetentionLocked;
|
|
70
|
-
private scheduleEventRetention;
|
|
71
|
-
private eventsByIds;
|
|
72
|
-
private currentGenerationEvent;
|
|
73
|
-
private reconcileToolResult;
|
|
74
|
-
private commitResponseMessages;
|
|
75
|
-
private wrapToolsForGeneration;
|
|
76
|
-
private trackToolExecutionIterable;
|
|
77
|
-
private ownGenerationLeaseCleanup;
|
|
78
|
-
private cleanupGenerationLease;
|
|
79
|
-
generate(options?: IAgentGenerateOptions): Promise<IAgentGenerateResult>;
|
|
80
|
-
private resolveEffectiveGenerationRuntime;
|
|
81
|
-
private generateLocked;
|
|
82
|
-
abortCurrentGeneration(reason?: unknown): void;
|
|
83
|
-
abortSession(reason?: unknown, options?: IAgentSessionAbortOptions): Promise<void>;
|
|
84
|
-
getBackgroundExecution(executionId: string): Promise<plugins.IToolJobState>;
|
|
85
|
-
abortBackgroundExecution(executionId: string): Promise<void>;
|
|
86
|
-
close(): Promise<void>;
|
|
87
|
-
private invokeGenerationCallback;
|
|
88
|
-
private adoptGenerationCallbackResult;
|
|
89
|
-
private wrapGenerationCallbackIterable;
|
|
6
|
+
static create(options: IAgentSessionOptions): Promise<AgentSession>;
|
|
90
7
|
}
|