@botbotgo/agent-harness 0.0.309 → 0.0.311
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/README.md +14 -0
- package/README.zh.md +14 -0
- package/dist/acp.d.ts +1 -116
- package/dist/acp.js +1 -310
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/cli/chat-interactive.d.ts +24 -0
- package/dist/cli/chat-interactive.js +244 -0
- package/dist/cli/chat-rendering.d.ts +9 -0
- package/dist/cli/chat-rendering.js +102 -0
- package/dist/cli/chat-stream.d.ts +23 -0
- package/dist/cli/chat-stream.js +330 -0
- package/dist/cli/chat-ui.d.ts +20 -0
- package/dist/cli/chat-ui.js +198 -0
- package/dist/cli/chat-workspace.d.ts +15 -0
- package/dist/cli/chat-workspace.js +205 -0
- package/dist/cli/main.d.ts +52 -0
- package/dist/cli/main.js +323 -0
- package/dist/cli/managed-service-commands.d.ts +23 -0
- package/dist/cli/managed-service-commands.js +63 -0
- package/dist/cli/managed-service.d.ts +27 -0
- package/dist/cli/managed-service.js +61 -0
- package/dist/cli/options-init-chat.d.ts +16 -0
- package/dist/cli/options-init-chat.js +108 -0
- package/dist/cli/options-runtime.d.ts +27 -0
- package/dist/cli/options-runtime.js +158 -0
- package/dist/cli/options-serve.d.ts +24 -0
- package/dist/cli/options-serve.js +166 -0
- package/dist/cli/options.d.ts +5 -0
- package/dist/cli/options.js +47 -0
- package/dist/cli/process-guards.d.ts +14 -0
- package/dist/cli/process-guards.js +139 -0
- package/dist/cli/request-tree.d.ts +12 -0
- package/dist/cli/request-tree.js +296 -0
- package/dist/cli/runtime-commands.d.ts +15 -0
- package/dist/cli/runtime-commands.js +247 -0
- package/dist/cli/runtime-output.d.ts +5 -0
- package/dist/cli/runtime-output.js +124 -0
- package/dist/cli/server-commands.d.ts +36 -0
- package/dist/cli/server-commands.js +250 -0
- package/dist/cli/workspace.d.ts +6 -0
- package/dist/cli/workspace.js +71 -0
- package/dist/cli.d.ts +1 -77
- package/dist/cli.js +2 -3023
- package/dist/client/acp.d.ts +1 -50
- package/dist/client/acp.js +1 -219
- package/dist/client/in-process.d.ts +5 -5
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/contracts/runtime-evaluation.d.ts +103 -0
- package/dist/contracts/runtime-evaluation.js +1 -0
- package/dist/contracts/runtime-memory.d.ts +162 -0
- package/dist/contracts/runtime-memory.js +1 -0
- package/dist/contracts/runtime-observability.d.ts +248 -0
- package/dist/contracts/runtime-observability.js +1 -0
- package/dist/contracts/runtime-requests.d.ts +342 -0
- package/dist/contracts/runtime-requests.js +1 -0
- package/dist/contracts/runtime-scheduling.d.ts +146 -0
- package/dist/contracts/runtime-scheduling.js +1 -0
- package/dist/contracts/runtime.d.ts +5 -1042
- package/dist/contracts/runtime.js +27 -1
- package/dist/flow/build-flow-graph.js +4 -875
- package/dist/flow/flow-graph-normalization.d.ts +56 -0
- package/dist/flow/flow-graph-normalization.js +214 -0
- package/dist/flow/flow-graph-runtime.d.ts +8 -0
- package/dist/flow/flow-graph-runtime.js +107 -0
- package/dist/flow/flow-graph-upstream.d.ts +18 -0
- package/dist/flow/flow-graph-upstream.js +498 -0
- package/dist/flow/types.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/init-project.d.ts +1 -12
- package/dist/init-project.js +1 -651
- package/dist/{procedural → knowledge/procedural}/manager.d.ts +3 -3
- package/dist/{procedural → knowledge/procedural}/manager.js +6 -6
- package/dist/mcp.d.ts +2 -76
- package/dist/mcp.js +2 -428
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/persistence/file-store.js +1 -1
- package/dist/persistence/sqlite-runtime.d.ts +19 -0
- package/dist/persistence/sqlite-runtime.js +86 -0
- package/dist/persistence/sqlite-store.js +11 -99
- package/dist/{request-events.d.ts → projections/request-events.d.ts} +1 -1
- package/dist/{upstream-events.js → projections/upstream-events.js} +1 -1
- package/dist/protocol/a2a/http-discovery.d.ts +39 -0
- package/dist/protocol/a2a/http-discovery.js +178 -0
- package/dist/protocol/a2a/http-rpc.d.ts +28 -0
- package/dist/protocol/a2a/http-rpc.js +623 -0
- package/dist/protocol/a2a/http.d.ts +72 -1
- package/dist/protocol/a2a/http.js +14 -1124
- package/dist/protocol/a2a/task-state.d.ts +29 -0
- package/dist/protocol/a2a/task-state.js +317 -0
- package/dist/protocol/acp/client.js +1 -1
- package/dist/protocol/acp/harness-client.d.ts +50 -0
- package/dist/protocol/acp/harness-client.js +219 -0
- package/dist/protocol/acp/server.d.ts +116 -0
- package/dist/protocol/acp/server.js +310 -0
- package/dist/protocol/ag-ui/http.js +1 -1
- package/dist/protocol/mcp/server.d.ts +76 -0
- package/dist/protocol/mcp/server.js +428 -0
- package/dist/resource/backend/workspace-scoped-backend.d.ts +40 -0
- package/dist/resource/backend/workspace-scoped-backend.js +296 -0
- package/dist/resource/mcp/tool-support.d.ts +35 -0
- package/dist/resource/mcp/tool-support.js +296 -0
- package/dist/resource/mcp-tool-support.d.ts +2 -35
- package/dist/resource/mcp-tool-support.js +2 -296
- package/dist/resource/providers/resource-provider.d.ts +22 -0
- package/dist/resource/providers/resource-provider.js +215 -0
- package/dist/resource/resource-impl.d.ts +3 -33
- package/dist/resource/resource-impl.js +2 -808
- package/dist/resource/resource-types.d.ts +33 -0
- package/dist/resource/resource-types.js +1 -0
- package/dist/resource/tools/function-tool-resolver.d.ts +2 -0
- package/dist/resource/tools/function-tool-resolver.js +306 -0
- package/dist/runtime/adapter/middleware-assembly.js +1 -1
- package/dist/runtime/adapter/model/invocation-request.js +2 -2
- package/dist/runtime/adapter/model/message-assembly.js +1 -1
- package/dist/runtime/agent-runtime-adapter.d.ts +3 -63
- package/dist/runtime/agent-runtime-adapter.js +7 -235
- package/dist/runtime/agent-runtime-assembly.d.ts +67 -0
- package/dist/runtime/agent-runtime-assembly.js +211 -0
- package/dist/runtime/harness/background-runtime.d.ts +1 -1
- package/dist/runtime/harness/events/event-sink.js +1 -1
- package/dist/runtime/harness/events/runtime-event-operations.d.ts +1 -1
- package/dist/runtime/harness/events/streaming.js +1 -1
- package/dist/runtime/harness/public-shapes.d.ts +43 -0
- package/dist/runtime/harness/public-shapes.js +186 -0
- package/dist/runtime/harness/run/inspection.js +2 -2
- package/dist/runtime/harness/run/resources.js +1 -1
- package/dist/runtime/harness/run/surface-semantics.js +1 -1
- package/dist/runtime/harness/system/inventory.d.ts +1 -1
- package/dist/runtime/harness/system/inventory.js +2 -2
- package/dist/runtime/harness/system/policy-engine.js +1 -1
- package/dist/runtime/harness/system/runtime-memory-manager.js +1 -1
- package/dist/runtime/harness/system/skill-requirements.d.ts +1 -1
- package/dist/runtime/harness/system/skill-requirements.js +1 -1
- package/dist/runtime/harness.d.ts +2 -2
- package/dist/runtime/harness.js +7 -191
- package/dist/runtime/maintenance/checkpoint-maintenance.js +1 -1
- package/dist/runtime/maintenance/runtime-record-maintenance.js +1 -1
- package/dist/runtime/parsing/output-content.d.ts +11 -0
- package/dist/runtime/parsing/output-content.js +442 -0
- package/dist/runtime/parsing/output-parsing.d.ts +3 -29
- package/dist/runtime/parsing/output-parsing.js +3 -806
- package/dist/runtime/parsing/output-recovery.d.ts +14 -0
- package/dist/runtime/parsing/output-recovery.js +288 -0
- package/dist/runtime/parsing/output-tool-args.d.ts +4 -0
- package/dist/runtime/parsing/output-tool-args.js +120 -0
- package/dist/runtime/support/runtime-factories.js +1 -1
- package/dist/scaffold/init-project.d.ts +12 -0
- package/dist/scaffold/init-project.js +651 -0
- package/dist/{extensions.d.ts → tooling/extensions.d.ts} +1 -1
- package/dist/{extensions.js → tooling/extensions.js} +3 -3
- package/dist/{tool-modules.d.ts → tooling/module-loader.d.ts} +1 -1
- package/dist/{tool-modules.js → tooling/module-loader.js} +2 -2
- package/dist/workspace/agent-binding-compiler.js +2 -2
- package/dist/workspace/compile.js +2 -2
- package/dist/workspace/object-loader-paths.d.ts +11 -0
- package/dist/workspace/object-loader-paths.js +75 -0
- package/dist/workspace/object-loader-readers.d.ts +21 -0
- package/dist/workspace/object-loader-readers.js +187 -0
- package/dist/workspace/object-loader.d.ts +0 -1
- package/dist/workspace/object-loader.js +6 -260
- package/dist/workspace/resource-compilers.js +1 -1
- package/dist/workspace/support/discovery.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/adapter/index.d.ts +0 -13
- package/dist/runtime/adapter/index.js +0 -13
- package/dist/runtime/harness/index.d.ts +0 -19
- package/dist/runtime/harness/index.js +0 -19
- package/dist/runtime/maintenance/index.d.ts +0 -4
- package/dist/runtime/maintenance/index.js +0 -4
- package/dist/runtime/parsing/index.d.ts +0 -2
- package/dist/runtime/parsing/index.js +0 -2
- package/dist/runtime/support/index.d.ts +0 -4
- package/dist/runtime/support/index.js +0 -4
- package/dist/workspace/support/index.d.ts +0 -2
- package/dist/workspace/support/index.js +0 -2
- /package/dist/{procedural → knowledge/procedural}/config.d.ts +0 -0
- /package/dist/{procedural → knowledge/procedural}/config.js +0 -0
- /package/dist/{procedural → knowledge/procedural}/index.d.ts +0 -0
- /package/dist/{procedural → knowledge/procedural}/index.js +0 -0
- /package/dist/{presentation.d.ts → projections/presentation.d.ts} +0 -0
- /package/dist/{presentation.js → projections/presentation.js} +0 -0
- /package/dist/{request-events.js → projections/request-events.js} +0 -0
- /package/dist/{upstream-events.d.ts → projections/upstream-events.d.ts} +0 -0
- /package/dist/runtime/{support → env}/runtime-env.d.ts +0 -0
- /package/dist/runtime/{support → env}/runtime-env.js +0 -0
- /package/dist/runtime/{support → layout}/runtime-layout.d.ts +0 -0
- /package/dist/runtime/{support → layout}/runtime-layout.js +0 -0
- /package/dist/runtime/{support → prompts}/runtime-prompts.d.ts +0 -0
- /package/dist/runtime/{support → prompts}/runtime-prompts.js +0 -0
- /package/dist/runtime/{support → skills}/skill-metadata.d.ts +0 -0
- /package/dist/runtime/{support → skills}/skill-metadata.js +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { CompiledAgentBinding, CompiledModel, CompiledTool, ParsedAgentObject, ParsedToolObject } from "./workspace.js";
|
|
2
|
+
import type { HarnessEventListener } from "./runtime-observability.js";
|
|
3
|
+
import type { RuntimeGovernanceBundle } from "./runtime-observability.js";
|
|
4
|
+
export type RuntimeToolResolver = (toolIds: string[], binding?: CompiledAgentBinding) => unknown[];
|
|
5
|
+
export type RuntimeModelResolver = (modelId: string) => unknown;
|
|
6
|
+
export type RuntimeEmbeddingModelResolver = (embeddingModelId: string) => unknown;
|
|
7
|
+
export type RuntimeVectorStoreResolver = (vectorStoreId: string) => unknown;
|
|
8
|
+
export type RuntimeMiddlewareResolver = (binding: CompiledAgentBinding) => unknown[];
|
|
9
|
+
export type RuntimeDeclaredMiddlewareResolver = (input: {
|
|
10
|
+
kind: string;
|
|
11
|
+
config: Record<string, unknown>;
|
|
12
|
+
binding?: CompiledAgentBinding;
|
|
13
|
+
resolveModel: (model: CompiledModel) => Promise<unknown>;
|
|
14
|
+
}) => unknown | unknown[] | null | undefined | Promise<unknown | unknown[] | null | undefined>;
|
|
15
|
+
export type RuntimeCheckpointerResolver = (binding: CompiledAgentBinding) => unknown;
|
|
16
|
+
export type RuntimeStoreResolver = (binding: CompiledAgentBinding) => unknown;
|
|
17
|
+
export type RuntimeBackendResolver = (binding: CompiledAgentBinding) => unknown;
|
|
18
|
+
export type RuntimeScheduleDefinition = {
|
|
19
|
+
type: "cron";
|
|
20
|
+
expression: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: "interval";
|
|
23
|
+
everyMinutes: number;
|
|
24
|
+
} | {
|
|
25
|
+
type: "daily";
|
|
26
|
+
time: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: "weekly";
|
|
29
|
+
time: string;
|
|
30
|
+
days: string[];
|
|
31
|
+
};
|
|
32
|
+
export type RuntimeScheduleStatus = "active" | "missing";
|
|
33
|
+
export type RuntimeScheduleSource = "crontab" | "schtasks";
|
|
34
|
+
export type RuntimeScheduleRecord = {
|
|
35
|
+
scheduleId: string;
|
|
36
|
+
name: string;
|
|
37
|
+
instruction: string;
|
|
38
|
+
agentId?: string;
|
|
39
|
+
schedule: RuntimeScheduleDefinition;
|
|
40
|
+
source: RuntimeScheduleSource;
|
|
41
|
+
platform: NodeJS.Platform;
|
|
42
|
+
status: RuntimeScheduleStatus;
|
|
43
|
+
systemId: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
metadata?: Record<string, unknown>;
|
|
47
|
+
};
|
|
48
|
+
export type RuntimeScheduleListFilter = {
|
|
49
|
+
scheduleId?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
agentId?: string;
|
|
52
|
+
source?: RuntimeScheduleSource;
|
|
53
|
+
status?: RuntimeScheduleStatus;
|
|
54
|
+
query?: string;
|
|
55
|
+
};
|
|
56
|
+
export type RuntimeScheduleManageInput = {
|
|
57
|
+
operation?: "create" | "list" | "get" | "update" | "delete";
|
|
58
|
+
scheduleId?: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
instruction?: string;
|
|
61
|
+
agentId?: string;
|
|
62
|
+
schedule?: RuntimeScheduleDefinition;
|
|
63
|
+
metadata?: Record<string, unknown>;
|
|
64
|
+
filters?: RuntimeScheduleListFilter;
|
|
65
|
+
};
|
|
66
|
+
export type RuntimeScheduleManageResult = {
|
|
67
|
+
ok: true;
|
|
68
|
+
operation: "create" | "get" | "update";
|
|
69
|
+
schedule: RuntimeScheduleRecord;
|
|
70
|
+
} | {
|
|
71
|
+
ok: true;
|
|
72
|
+
operation: "list";
|
|
73
|
+
items: RuntimeScheduleRecord[];
|
|
74
|
+
total: number;
|
|
75
|
+
} | {
|
|
76
|
+
ok: true;
|
|
77
|
+
operation: "delete";
|
|
78
|
+
scheduleId: string;
|
|
79
|
+
};
|
|
80
|
+
export type RuntimeScheduleManager = {
|
|
81
|
+
manageSchedule(input: RuntimeScheduleManageInput): Promise<RuntimeScheduleManageResult>;
|
|
82
|
+
getSchedule(scheduleId: string): Promise<RuntimeScheduleRecord | null>;
|
|
83
|
+
};
|
|
84
|
+
export type RuntimeAdapterOptions = {
|
|
85
|
+
toolResolver?: RuntimeToolResolver;
|
|
86
|
+
modelResolver?: RuntimeModelResolver;
|
|
87
|
+
embeddingModelResolver?: RuntimeEmbeddingModelResolver;
|
|
88
|
+
vectorStoreResolver?: RuntimeVectorStoreResolver;
|
|
89
|
+
middlewareResolver?: RuntimeMiddlewareResolver;
|
|
90
|
+
declaredMiddlewareResolver?: RuntimeDeclaredMiddlewareResolver;
|
|
91
|
+
checkpointerResolver?: RuntimeCheckpointerResolver;
|
|
92
|
+
storeResolver?: RuntimeStoreResolver;
|
|
93
|
+
backendResolver?: RuntimeBackendResolver;
|
|
94
|
+
scheduleManager?: RuntimeScheduleManager;
|
|
95
|
+
functionToolContextResolver?: (input: {
|
|
96
|
+
binding?: CompiledAgentBinding;
|
|
97
|
+
sessionId?: string;
|
|
98
|
+
requestId?: string;
|
|
99
|
+
}) => Record<string, unknown> | undefined;
|
|
100
|
+
deepAgentUpstreamSubstrateMode?: "full" | "minimal";
|
|
101
|
+
};
|
|
102
|
+
export type ToolKindAdapter = {
|
|
103
|
+
type: string;
|
|
104
|
+
validate: (tool: ParsedToolObject, tools: Map<string, ParsedToolObject>) => void;
|
|
105
|
+
compile: (tool: ParsedToolObject, tools: Map<string, ParsedToolObject>) => CompiledTool[];
|
|
106
|
+
};
|
|
107
|
+
export type SkillSourceResolver = {
|
|
108
|
+
kind: string;
|
|
109
|
+
resolve: (input: {
|
|
110
|
+
workspaceRoot: string;
|
|
111
|
+
skill: {
|
|
112
|
+
sourcePathRef: string;
|
|
113
|
+
};
|
|
114
|
+
packagingRoots: string[];
|
|
115
|
+
}) => string[];
|
|
116
|
+
};
|
|
117
|
+
export type SkillInheritancePolicy = {
|
|
118
|
+
kind: string;
|
|
119
|
+
apply: (input: {
|
|
120
|
+
agent: ParsedAgentObject;
|
|
121
|
+
ownSkills: string[];
|
|
122
|
+
parentSkills: string[];
|
|
123
|
+
}) => string[];
|
|
124
|
+
};
|
|
125
|
+
export type SkillPackagingConvention = {
|
|
126
|
+
kind: string;
|
|
127
|
+
resolve: (input: {
|
|
128
|
+
workspaceRoot: string;
|
|
129
|
+
skill: {
|
|
130
|
+
sourcePathRef: string;
|
|
131
|
+
};
|
|
132
|
+
}) => string[];
|
|
133
|
+
};
|
|
134
|
+
export type PolicyDecision = {
|
|
135
|
+
allowed: boolean;
|
|
136
|
+
reasons: string[];
|
|
137
|
+
bundles?: RuntimeGovernanceBundle[];
|
|
138
|
+
};
|
|
139
|
+
export type PolicyEvaluator = {
|
|
140
|
+
kind: string;
|
|
141
|
+
evaluate: (binding: CompiledAgentBinding) => PolicyDecision | null;
|
|
142
|
+
};
|
|
143
|
+
export type EventSubscriber = {
|
|
144
|
+
kind: string;
|
|
145
|
+
onEvent: HarnessEventListener;
|
|
146
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|