@modelprofile.com/flexharness 10.11.0 → 10.13.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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/flexharness',
6
- version: '10.11.0',
6
+ version: '10.13.0',
7
7
  description: 'The FlexHarness toolbox source repository and shared dependency catalog.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwrQkFBK0I7SUFDckMsT0FBTyxFQUFFLFNBQVM7SUFDbEIsV0FBVyxFQUFFLDBFQUEwRTtDQUN4RixDQUFBIn0=
@@ -1,4 +1,4 @@
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, IFlexSessionView, 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, IFlexSessionView, IFlexSessionMetrics, 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> {
@@ -22,6 +22,7 @@ export declare class FlexHarness<TScope = unknown> {
22
22
  private readonly externalErrorProjector?;
23
23
  private readonly subagents;
24
24
  private readonly builtInTools;
25
+ private readonly toolCatalogOptions;
25
26
  private readonly slashCommands;
26
27
  private readonly maxSubagentDepth;
27
28
  private readonly maxSubagentCallsPerRun;
@@ -73,6 +74,8 @@ export declare class FlexHarness<TScope = unknown> {
73
74
  /** Discards a staged import. Nothing of it was persisted; an unknown or finished handle is ignored. */
74
75
  abortSessionImport(handle: IFlexSessionImportHandle): Promise<void>;
75
76
  getSession(scopeId: string, sessionId: string): Promise<IFlexSession>;
77
+ /** Bounded projection-state read: no message, event, archive or child-history scan. */
78
+ getSessionMetrics(scopeId: string, sessionId: string): Promise<IFlexSessionMetrics>;
76
79
  getSessionReversionInfo(scopeId: string, sessionId: string): Promise<IFlexSessionReversionInfo>;
77
80
  updateSession(scopeId: string, sessionId: string, options: IFlexUpdateSessionOptions): Promise<IFlexSession>;
78
81
  getProjectState(scopeId: string, sessionId: string): Promise<IFlexProjectStateResult>;
@@ -149,6 +152,13 @@ export declare class FlexHarness<TScope = unknown> {
149
152
  * next turn.
150
153
  */
151
154
  steerPrompt(scopeId: string, sessionId: string, queueId: string, steer: IFlexSteerInput): Promise<IFlexSteerAdmission>;
155
+ /** Sends follow-up input only to an exact running direct child owned by this parent run. */
156
+ sendSubagentInput(scopeId: string, parentSessionId: string, parentRunId: string, taskId: string, steer: IFlexSteerInput): Promise<IFlexSteerAdmission>;
157
+ /** The shared synchronous admission point; neither entrypoint starts or resumes a run. */
158
+ private admitRunSteer;
159
+ private sendSubagentInputInRun;
160
+ /** Fences live ownership by exact runtime pointers and admission seeds all the way to root. */
161
+ private assertLiveSubagentOwnership;
152
162
  abort(scopeId: string, sessionId: string): Promise<boolean>;
153
163
  listPendingPermissions(scopeId: string, sessionId?: string): Promise<IFlexPermissionRequest[]>;
154
164
  respondToPermission(scopeId: string, sessionId: string, permissionId: string, decision: TFlexPermissionDecision): Promise<void>;
@@ -202,7 +212,8 @@ export declare class FlexHarness<TScope = unknown> {
202
212
  /**
203
213
  * Holds the end of a run's generation until one more of its background subagents settles. The
204
214
  * subagent commits its result to the generation before it settles, so the model takes the result
205
- * in with another step instead of the run ending without it. Returns at once when none runs.
215
+ * in with another step instead of the run ending without it. The engine bounds the scoped
216
+ * wait from its observed dispatch and commits timer check-ins. Returns at once when none runs.
206
217
  */
207
218
  private awaitNextBackgroundSubagent;
208
219
  private executeRun;
@@ -235,6 +246,12 @@ export declare class FlexHarness<TScope = unknown> {
235
246
  private prepareGeneration;
236
247
  private enabledBuiltInToolNames;
237
248
  private assertNoBuiltInToolCollisions;
249
+ /**
250
+ * search_tools, describe_tools and execute. `execute` validates the call and runs the method
251
+ * inside this tool call, so the tool wrapper bounds its output and projects its errors, and the
252
+ * call's part, events and permission requests carry the method's path.
253
+ */
254
+ private createCatalogTools;
238
255
  private createBuiltInTools;
239
256
  private createRenameSessionTool;
240
257
  private createProjectTaskTool;
@@ -247,6 +264,7 @@ export declare class FlexHarness<TScope = unknown> {
247
264
  private createProjectTaskId;
248
265
  private createSubagentTool;
249
266
  private executeSubagentTask;
267
+ private createSubagentSendTool;
250
268
  private createSubagentResultTool;
251
269
  private createDelegatedRunAdmissionSeed;
252
270
  private acquireSubagentSession;
@@ -332,6 +350,7 @@ export declare class FlexHarness<TScope = unknown> {
332
350
  * the usage of a run that exhausted its callback budget or failed in a callback must not be lost.
333
351
  */
334
352
  private onModelCallUsage;
353
+ private settleMetricsOperation;
335
354
  private callbackRun;
336
355
  private reserveCallbackCapacity;
337
356
  private failCallback;