@botbotgo/agent-harness 0.0.126 → 0.0.128
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/api.d.ts +1 -0
- package/dist/api.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/runtime/harness/system/inventory.d.ts +8 -0
- package/dist/runtime/harness/system/inventory.js +23 -1
- package/dist/runtime/harness.d.ts +1 -0
- package/dist/runtime/harness.js +7 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export declare function listApprovals(runtime: AgentHarnessRuntime, filter?: Pub
|
|
|
59
59
|
export declare function getApproval(runtime: AgentHarnessRuntime, approvalId: string): Promise<PublicApprovalRecord | null>;
|
|
60
60
|
export declare function getHealth(runtime: AgentHarnessRuntime): Promise<RuntimeHealthSnapshot>;
|
|
61
61
|
export declare function listAgentSkills(runtime: AgentHarnessRuntime, agentId: string, options?: RequirementAssessmentOptions): InventorySkillRecord[];
|
|
62
|
+
export declare function getAgent(runtime: AgentHarnessRuntime, agentId: string, options?: RequirementAssessmentOptions): InventoryAgentRecord | null;
|
|
62
63
|
export declare function describeInventory(runtime: AgentHarnessRuntime, options?: RequirementAssessmentOptions): {
|
|
63
64
|
workspaceRoot: string;
|
|
64
65
|
agents: InventoryAgentRecord[];
|
package/dist/api.js
CHANGED
|
@@ -154,6 +154,9 @@ export async function getHealth(runtime) {
|
|
|
154
154
|
export function listAgentSkills(runtime, agentId, options) {
|
|
155
155
|
return runtime.listAgentSkills(agentId, options);
|
|
156
156
|
}
|
|
157
|
+
export function getAgent(runtime, agentId, options) {
|
|
158
|
+
return runtime.getAgent(agentId, options);
|
|
159
|
+
}
|
|
157
160
|
export function describeInventory(runtime, options) {
|
|
158
161
|
return runtime.describeWorkspaceInventory(options);
|
|
159
162
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AgentHarnessRuntime, cancelRun, createAgentHarness, createUpstreamTimelineReducer, createToolMcpServer, deleteSession, describeInventory, getApproval, getRequest, getHealth, getSession, listAgentSkills, listApprovals, listRequests, listSessions, resolveApproval, run, serveToolsOverStdio, subscribe, stop, } from "./api.js";
|
|
1
|
+
export { AgentHarnessRuntime, cancelRun, createAgentHarness, createUpstreamTimelineReducer, createToolMcpServer, deleteSession, describeInventory, getAgent, getApproval, getRequest, getHealth, getSession, listAgentSkills, listApprovals, listRequests, listSessions, resolveApproval, run, serveToolsOverStdio, subscribe, stop, } from "./api.js";
|
|
2
2
|
export type { ToolMcpServerOptions } from "./mcp.js";
|
|
3
3
|
export { tool } from "./tools.js";
|
|
4
4
|
export type { UpstreamTimelineProjection, UpstreamTimelineReducer } from "./upstream-events.js";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AgentHarnessRuntime, cancelRun, createAgentHarness, createUpstreamTimelineReducer, createToolMcpServer, deleteSession, describeInventory, getApproval, getRequest, getHealth, getSession, listAgentSkills, listApprovals, listRequests, listSessions, resolveApproval, run, serveToolsOverStdio, subscribe, stop, } from "./api.js";
|
|
1
|
+
export { AgentHarnessRuntime, cancelRun, createAgentHarness, createUpstreamTimelineReducer, createToolMcpServer, deleteSession, describeInventory, getAgent, getApproval, getRequest, getHealth, getSession, listAgentSkills, listApprovals, listRequests, listSessions, resolveApproval, run, serveToolsOverStdio, subscribe, stop, } from "./api.js";
|
|
2
2
|
export { tool } from "./tools.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.127";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.127";
|
|
@@ -17,10 +17,17 @@ export type InventorySkillRecord = {
|
|
|
17
17
|
openclaw?: OpenClawSkillMetadata;
|
|
18
18
|
requirements?: SkillRequirementAssessment;
|
|
19
19
|
};
|
|
20
|
+
export type InventoryModelRecord = {
|
|
21
|
+
id: string;
|
|
22
|
+
provider: string;
|
|
23
|
+
model: string;
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
};
|
|
20
26
|
export type InventoryAgentRecord = {
|
|
21
27
|
id: string;
|
|
22
28
|
description: string;
|
|
23
29
|
parentAgentId?: string;
|
|
30
|
+
model?: InventoryModelRecord;
|
|
24
31
|
tools: InventoryToolRecord[];
|
|
25
32
|
skills: InventorySkillRecord[];
|
|
26
33
|
};
|
|
@@ -29,6 +36,7 @@ export declare function listAgentTools(workspace: WorkspaceBundle, agentId: stri
|
|
|
29
36
|
export declare function listAgentSkills(workspace: WorkspaceBundle, agentId: string, options?: RequirementAssessmentOptions): InventorySkillRecord[];
|
|
30
37
|
export declare function listSubagents(workspace: WorkspaceBundle, options?: RequirementAssessmentOptions): InventoryAgentRecord[];
|
|
31
38
|
export declare function listAvailableAgents(workspace: WorkspaceBundle, options?: RequirementAssessmentOptions): InventoryAgentRecord[];
|
|
39
|
+
export declare function getAgentInventoryRecord(workspace: WorkspaceBundle, agentId: string, options?: RequirementAssessmentOptions): InventoryAgentRecord | null;
|
|
32
40
|
export declare function describeWorkspaceInventory(workspace: WorkspaceBundle, options?: RequirementAssessmentOptions): {
|
|
33
41
|
workspaceRoot: string;
|
|
34
42
|
agents: InventoryAgentRecord[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readSkillMetadata } from "../../support/skill-metadata.js";
|
|
2
|
-
import { getBindingBackendConfig, getBindingPrimaryTools, getBindingSkills, getBindingSubagents } from "../../support/compiled-binding.js";
|
|
2
|
+
import { getBindingBackendConfig, getBindingPrimaryModel, getBindingPrimaryTools, getBindingSkills, getBindingSubagents, } from "../../support/compiled-binding.js";
|
|
3
3
|
import { assessSkillRequirements, } from "./skill-requirements.js";
|
|
4
4
|
import { createRuntimeEnv } from "../../support/runtime-env.js";
|
|
5
5
|
function listHostBindings(workspace) {
|
|
@@ -60,6 +60,23 @@ function toSkillRecords(skillPaths, options = {}) {
|
|
|
60
60
|
};
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
+
function toInventoryModelRecord(model) {
|
|
64
|
+
if (!model) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const init = typeof model.init === "object" && model.init ? model.init : {};
|
|
68
|
+
const baseUrl = typeof init.baseUrl === "string" && init.baseUrl.trim().length > 0
|
|
69
|
+
? init.baseUrl.trim()
|
|
70
|
+
: typeof init.baseURL === "string" && init.baseURL.trim().length > 0
|
|
71
|
+
? init.baseURL.trim()
|
|
72
|
+
: undefined;
|
|
73
|
+
return {
|
|
74
|
+
id: model.id,
|
|
75
|
+
provider: model.provider,
|
|
76
|
+
model: model.model,
|
|
77
|
+
...(baseUrl ? { baseUrl } : {}),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
63
80
|
export function listAgentTools(workspace, agentId) {
|
|
64
81
|
const binding = findAgentBinding(workspace, agentId);
|
|
65
82
|
if (!binding) {
|
|
@@ -80,6 +97,7 @@ function describeSubagent(subagent, parentAgentId, options = {}) {
|
|
|
80
97
|
id: subagent.name,
|
|
81
98
|
description: subagent.description,
|
|
82
99
|
parentAgentId,
|
|
100
|
+
model: toInventoryModelRecord(subagent.model),
|
|
83
101
|
tools: dedupeTools(subagent.tools ?? []),
|
|
84
102
|
skills: toSkillRecords(subagent.skills ?? [], options),
|
|
85
103
|
};
|
|
@@ -94,11 +112,15 @@ export function listAvailableAgents(workspace, options = {}) {
|
|
|
94
112
|
const topLevel = listHostBindings(workspace).map((binding) => ({
|
|
95
113
|
id: binding.agent.id,
|
|
96
114
|
description: binding.agent.description,
|
|
115
|
+
model: toInventoryModelRecord(getBindingPrimaryModel(binding)),
|
|
97
116
|
tools: listAgentTools(workspace, binding.agent.id),
|
|
98
117
|
skills: listAgentSkills(workspace, binding.agent.id, options),
|
|
99
118
|
}));
|
|
100
119
|
return [...topLevel, ...listSubagents(workspace, options)];
|
|
101
120
|
}
|
|
121
|
+
export function getAgentInventoryRecord(workspace, agentId, options = {}) {
|
|
122
|
+
return listAvailableAgents(workspace, options).find((agent) => agent.id === agentId) ?? null;
|
|
123
|
+
}
|
|
102
124
|
export function describeWorkspaceInventory(workspace, options = {}) {
|
|
103
125
|
return {
|
|
104
126
|
workspaceRoot: workspace.workspaceRoot,
|
|
@@ -66,6 +66,7 @@ export declare class AgentHarnessRuntime {
|
|
|
66
66
|
}): Promise<ApprovalRecord[]>;
|
|
67
67
|
getApproval(approvalId: string): Promise<ApprovalRecord | null>;
|
|
68
68
|
listAgentSkills(agentId: string, options?: RequirementAssessmentOptions): InventorySkillRecord[];
|
|
69
|
+
getAgent(agentId: string, options?: RequirementAssessmentOptions): InventoryAgentRecord | null;
|
|
69
70
|
describeWorkspaceInventory(options?: RequirementAssessmentOptions): {
|
|
70
71
|
workspaceRoot: string;
|
|
71
72
|
agents: InventoryAgentRecord[];
|
package/dist/runtime/harness.js
CHANGED
|
@@ -23,7 +23,7 @@ import { resolveStoreFromConfig, } from "./harness/run/resources.js";
|
|
|
23
23
|
import { createToolMcpServerFromTools, serveToolsOverStdioFromHarness } from "../mcp.js";
|
|
24
24
|
import { getBindingRuntimeExecutionMode, } from "./support/compiled-binding.js";
|
|
25
25
|
import { bindingSupportsRunningReplay, getWorkspaceBinding, resolveWorkspaceAgentTools, } from "./harness/bindings.js";
|
|
26
|
-
import { describeWorkspaceInventory, listAgentSkills as listWorkspaceAgentSkills, } from "./harness/system/inventory.js";
|
|
26
|
+
import { describeWorkspaceInventory, getAgentInventoryRecord, listAgentSkills as listWorkspaceAgentSkills, } from "./harness/system/inventory.js";
|
|
27
27
|
import { createDefaultHealthSnapshot, isInventoryEnabled, isThreadMemorySyncEnabled, } from "./harness/runtime-defaults.js";
|
|
28
28
|
import { resolveRuntimeAdapterOptions } from "./support/runtime-adapter-options.js";
|
|
29
29
|
import { initializeHarnessRuntime, reclaimExpiredClaimedRuns as reclaimHarnessExpiredClaimedRuns, recoverStartupRuns as recoverHarnessStartupRuns, isStaleRunningRun as isHarnessStaleRunningRun, } from "./harness/run/startup-runtime.js";
|
|
@@ -220,6 +220,12 @@ export class AgentHarnessRuntime {
|
|
|
220
220
|
...options,
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
+
getAgent(agentId, options = {}) {
|
|
224
|
+
return getAgentInventoryRecord(this.workspace, agentId, {
|
|
225
|
+
assessRequirements: isInventoryEnabled(this.workspace),
|
|
226
|
+
...options,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
223
229
|
describeWorkspaceInventory(options = {}) {
|
|
224
230
|
return describeWorkspaceInventory(this.workspace, {
|
|
225
231
|
assessRequirements: isInventoryEnabled(this.workspace),
|