@finalai/agent-definition 0.1.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.
Potentially problematic release.
This version of @finalai/agent-definition might be problematic. Click here for more details.
- package/README.md +16 -0
- package/THIRD_PARTY_NOTICES.md +303 -0
- package/dist/compiler-assets/chunk-2CZRHOLL.ts +10 -0
- package/dist/compiler-assets/chunk-32O3ODZE.ts +39 -0
- package/dist/compiler-assets/chunk-5BK6FVRE.ts +75 -0
- package/dist/compiler-assets/chunk-6WR3PGNF.ts +0 -0
- package/dist/compiler-assets/chunk-7QP2CKPI.ts +30 -0
- package/dist/compiler-assets/chunk-7VSSVZM4.ts +55 -0
- package/dist/compiler-assets/chunk-7WGYG73V.ts +42 -0
- package/dist/compiler-assets/chunk-BLB6JGLO.ts +481 -0
- package/dist/compiler-assets/chunk-CWWRTRWW.ts +76 -0
- package/dist/compiler-assets/chunk-EVQIK62B.ts +188 -0
- package/dist/compiler-assets/chunk-GNR7XBPN.ts +3364 -0
- package/dist/compiler-assets/chunk-GTUZOATD.ts +10 -0
- package/dist/compiler-assets/chunk-HFS4KLEL.ts +10 -0
- package/dist/compiler-assets/chunk-HGW4YHAY.ts +6865 -0
- package/dist/compiler-assets/chunk-HNPUTP35.ts +172 -0
- package/dist/compiler-assets/chunk-JIPNTA56.ts +59 -0
- package/dist/compiler-assets/chunk-JNJE72EH.ts +10 -0
- package/dist/compiler-assets/chunk-JPY4L2UJ.ts +349 -0
- package/dist/compiler-assets/chunk-JTGTLYDT.ts +0 -0
- package/dist/compiler-assets/chunk-LUSAAV4L.ts +33 -0
- package/dist/compiler-assets/chunk-MZMSKIKU.ts +472 -0
- package/dist/compiler-assets/chunk-NMYHO2QN.ts +25 -0
- package/dist/compiler-assets/chunk-NYTOYKKF.ts +28 -0
- package/dist/compiler-assets/chunk-OWC6SFFF.ts +295 -0
- package/dist/compiler-assets/chunk-QMKWAFVZ.ts +59 -0
- package/dist/compiler-assets/chunk-QMWTDPNT.ts +79 -0
- package/dist/compiler-assets/chunk-RWUIMTBI.ts +13 -0
- package/dist/compiler-assets/chunk-SKTNMUO7.ts +64 -0
- package/dist/compiler-assets/chunk-T6WG4L4M.ts +19 -0
- package/dist/compiler-assets/chunk-TATN3PYK.ts +81 -0
- package/dist/compiler-assets/chunk-VHXHUU7L.ts +16 -0
- package/dist/compiler-assets/chunk-WMXMVFHM.ts +121 -0
- package/dist/compiler-assets/chunk-XHKPWT3G.ts +55 -0
- package/dist/compiler-assets/chunk-ZDLVA6XF.ts +476 -0
- package/dist/compiler-assets/src/authoring/agent.ts +10 -0
- package/dist/compiler-assets/src/authoring/approval.ts +19 -0
- package/dist/compiler-assets/src/authoring/brand.ts +23 -0
- package/dist/compiler-assets/src/authoring/channels.ts +26 -0
- package/dist/compiler-assets/src/authoring/connections.ts +10 -0
- package/dist/compiler-assets/src/authoring/context.ts +7 -0
- package/dist/compiler-assets/src/authoring/credentials.ts +21 -0
- package/dist/compiler-assets/src/authoring/dynamic.ts +10 -0
- package/dist/compiler-assets/src/authoring/harness.ts +17 -0
- package/dist/compiler-assets/src/authoring/hooks.ts +28 -0
- package/dist/compiler-assets/src/authoring/index.ts +110 -0
- package/dist/compiler-assets/src/authoring/instructions.ts +14 -0
- package/dist/compiler-assets/src/authoring/sandbox.ts +25 -0
- package/dist/compiler-assets/src/authoring/schedules.ts +10 -0
- package/dist/compiler-assets/src/authoring/skills.ts +10 -0
- package/dist/compiler-assets/src/authoring/tools.ts +23 -0
- package/dist/compiler-assets/src/compatibility.ts +14810 -0
- package/dist/compiler-assets/src/compiler/evaluate-child.mjs +77 -0
- package/dist/compiler-assets/src/index.ts +195 -0
- package/dist/compiler-assets/src/manifest.ts +72 -0
- package/dist/compiler-assets/src/resolve.ts +19 -0
- package/dist/compiler-assets/src/runtime/bundle.ts +72 -0
- package/dist/compiler-assets/src/runtime/describe.ts +31 -0
- package/dist/compiler-assets/src/runtime/described.ts +142 -0
- package/dist/compiler-assets/src/runtime/isolate.ts +28 -0
- package/dist/compiler-assets/src/runtime/layout.ts +15 -0
- package/dist/compiler-assets/src/runtime/lower.ts +52 -0
- package/dist/compiler-assets/src/runtime/schema-validation.ts +21 -0
- package/dist/compiler-assets/src/runtime/values.ts +38 -0
- package/dist/modules/authoring/agent.d.mts +22 -0
- package/dist/modules/authoring/agent.mjs +6 -0
- package/dist/modules/authoring/agent.mjs.map +7 -0
- package/dist/modules/authoring/approval.d.mts +17 -0
- package/dist/modules/authoring/approval.mjs +42 -0
- package/dist/modules/authoring/approval.mjs.map +7 -0
- package/dist/modules/authoring/brand.d.mts +27 -0
- package/dist/modules/authoring/brand.mjs +51 -0
- package/dist/modules/authoring/brand.mjs.map +7 -0
- package/dist/modules/authoring/channels.d.mts +41 -0
- package/dist/modules/authoring/channels.mjs +65 -0
- package/dist/modules/authoring/channels.mjs.map +7 -0
- package/dist/modules/authoring/connections.d.mts +23 -0
- package/dist/modules/authoring/connections.mjs +6 -0
- package/dist/modules/authoring/connections.mjs.map +7 -0
- package/dist/modules/authoring/context.d.mts +83 -0
- package/dist/modules/authoring/context.mjs +12 -0
- package/dist/modules/authoring/context.mjs.map +7 -0
- package/dist/modules/authoring/credentials.d.mts +10 -0
- package/dist/modules/authoring/credentials.mjs +31 -0
- package/dist/modules/authoring/credentials.mjs.map +7 -0
- package/dist/modules/authoring/dynamic.d.mts +30 -0
- package/dist/modules/authoring/dynamic.mjs +15 -0
- package/dist/modules/authoring/dynamic.mjs.map +7 -0
- package/dist/modules/authoring/harness.d.mts +85 -0
- package/dist/modules/authoring/harness.mjs +55 -0
- package/dist/modules/authoring/harness.mjs.map +7 -0
- package/dist/modules/authoring/hooks.d.mts +120 -0
- package/dist/modules/authoring/hooks.mjs +72 -0
- package/dist/modules/authoring/hooks.mjs.map +7 -0
- package/dist/modules/authoring/index.d.mts +27 -0
- package/dist/modules/authoring/index.mjs +63 -0
- package/dist/modules/authoring/index.mjs.map +7 -0
- package/dist/modules/authoring/instructions.d.mts +13 -0
- package/dist/modules/authoring/instructions.mjs +15 -0
- package/dist/modules/authoring/instructions.mjs.map +7 -0
- package/dist/modules/authoring/sandbox.d.mts +21 -0
- package/dist/modules/authoring/sandbox.mjs +13 -0
- package/dist/modules/authoring/sandbox.mjs.map +7 -0
- package/dist/modules/authoring/schedules.d.mts +8 -0
- package/dist/modules/authoring/schedules.mjs +6 -0
- package/dist/modules/authoring/schedules.mjs.map +7 -0
- package/dist/modules/authoring/skills.d.mts +8 -0
- package/dist/modules/authoring/skills.mjs +6 -0
- package/dist/modules/authoring/skills.mjs.map +7 -0
- package/dist/modules/authoring/tools.d.mts +80 -0
- package/dist/modules/authoring/tools.mjs +70 -0
- package/dist/modules/authoring/tools.mjs.map +7 -0
- package/dist/modules/compatibility.d.mts +36 -0
- package/dist/modules/compatibility.mjs +536 -0
- package/dist/modules/compatibility.mjs.map +7 -0
- package/dist/modules/compiler/assemble.d.mts +30 -0
- package/dist/modules/compiler/assemble.mjs +923 -0
- package/dist/modules/compiler/assemble.mjs.map +7 -0
- package/dist/modules/compiler/bundle.d.mts +22 -0
- package/dist/modules/compiler/bundle.mjs +385 -0
- package/dist/modules/compiler/bundle.mjs.map +7 -0
- package/dist/modules/compiler/diagnostics.d.mts +40 -0
- package/dist/modules/compiler/diagnostics.mjs +38 -0
- package/dist/modules/compiler/diagnostics.mjs.map +7 -0
- package/dist/modules/compiler/discovery.d.mts +36 -0
- package/dist/modules/compiler/discovery.mjs +158 -0
- package/dist/modules/compiler/discovery.mjs.map +7 -0
- package/dist/modules/compiler/evaluate.d.mts +13 -0
- package/dist/modules/compiler/evaluate.mjs +194 -0
- package/dist/modules/compiler/evaluate.mjs.map +7 -0
- package/dist/modules/compiler/files.d.mts +19 -0
- package/dist/modules/compiler/files.mjs +90 -0
- package/dist/modules/compiler/files.mjs.map +7 -0
- package/dist/modules/compiler/frontmatter.d.mts +9 -0
- package/dist/modules/compiler/frontmatter.mjs +34 -0
- package/dist/modules/compiler/frontmatter.mjs.map +7 -0
- package/dist/modules/compiler/index.d.mts +49 -0
- package/dist/modules/compiler/index.mjs +244 -0
- package/dist/modules/compiler/index.mjs.map +7 -0
- package/dist/modules/compiler/load.d.mts +8 -0
- package/dist/modules/compiler/load.mjs +45 -0
- package/dist/modules/compiler/load.mjs.map +7 -0
- package/dist/modules/compiler/local-isolate.d.mts +20 -0
- package/dist/modules/compiler/local-isolate.mjs +93 -0
- package/dist/modules/compiler/local-isolate.mjs.map +7 -0
- package/dist/modules/compiler/packages.d.mts +66 -0
- package/dist/modules/compiler/packages.mjs +307 -0
- package/dist/modules/compiler/packages.mjs.map +7 -0
- package/dist/modules/index.d.mts +7 -0
- package/dist/modules/index.mjs +25 -0
- package/dist/modules/index.mjs.map +7 -0
- package/dist/modules/manifest.d.mts +2 -0
- package/dist/modules/manifest.mjs +67 -0
- package/dist/modules/manifest.mjs.map +7 -0
- package/dist/modules/resolve.d.mts +24 -0
- package/dist/modules/resolve.mjs +176 -0
- package/dist/modules/resolve.mjs.map +7 -0
- package/dist/modules/runtime/bundle.d.mts +12 -0
- package/dist/modules/runtime/bundle.mjs +48 -0
- package/dist/modules/runtime/bundle.mjs.map +7 -0
- package/dist/modules/runtime/describe.d.mts +19 -0
- package/dist/modules/runtime/describe.mjs +471 -0
- package/dist/modules/runtime/describe.mjs.map +7 -0
- package/dist/modules/runtime/described.d.mts +376 -0
- package/dist/modules/runtime/described.mjs +116 -0
- package/dist/modules/runtime/described.mjs.map +7 -0
- package/dist/modules/runtime/isolate.d.mts +70 -0
- package/dist/modules/runtime/isolate.mjs +454 -0
- package/dist/modules/runtime/isolate.mjs.map +7 -0
- package/dist/modules/runtime/layout.d.mts +21 -0
- package/dist/modules/runtime/layout.mjs +24 -0
- package/dist/modules/runtime/layout.mjs.map +7 -0
- package/dist/modules/runtime/lower.d.mts +73 -0
- package/dist/modules/runtime/lower.mjs +463 -0
- package/dist/modules/runtime/lower.mjs.map +7 -0
- package/dist/modules/runtime/schema-validation.d.mts +21 -0
- package/dist/modules/runtime/schema-validation.mjs +238 -0
- package/dist/modules/runtime/schema-validation.mjs.map +7 -0
- package/dist/modules/runtime/values.d.mts +20 -0
- package/dist/modules/runtime/values.mjs +48 -0
- package/dist/modules/runtime/values.mjs.map +7 -0
- package/fixtures/acme-fleet/agent/agent.ts +74 -0
- package/fixtures/acme-fleet/agent/instructions.md +1 -0
- package/fixtures/assistant/agent/agent.ts +16 -0
- package/fixtures/assistant/agent/instructions.md +1 -0
- package/fixtures/assistant/agent/tools/current_time.ts +9 -0
- package/fixtures/assistant-with-tools/agent/agent.ts +16 -0
- package/fixtures/assistant-with-tools/agent/instructions.md +1 -0
- package/fixtures/assistant-with-tools/agent/tools/current_time.ts +9 -0
- package/fixtures/final-connection/agent/agent.ts +15 -0
- package/fixtures/final-connection/agent/connections/final.ts +9 -0
- package/fixtures/release-scout/agent/agent.ts +22 -0
- package/fixtures/release-scout/agent/channels/github-signature.ts +27 -0
- package/fixtures/release-scout/agent/channels/github.ts +38 -0
- package/fixtures/release-scout/agent/connections/linear.ts +9 -0
- package/fixtures/release-scout/agent/hooks/audit.ts +24 -0
- package/fixtures/release-scout/agent/instructions/org-context.ts +26 -0
- package/fixtures/release-scout/agent/instructions.md +2 -0
- package/fixtures/release-scout/agent/sandbox.ts +20 -0
- package/fixtures/release-scout/agent/schedules/daily-digest.md +7 -0
- package/fixtures/release-scout/agent/skills/triage/SKILL.md +8 -0
- package/fixtures/release-scout/agent/skills/triage/checklist.md +3 -0
- package/fixtures/release-scout/agent/tools/lookup_release_notes.ts +24 -0
- package/fixtures/tsconfig.json +5 -0
- package/package.json +94 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseCapability,
|
|
3
|
+
BaseToolProvision,
|
|
4
|
+
CredentialDelivery,
|
|
5
|
+
CredentialNodeKind,
|
|
6
|
+
CredentialPayer,
|
|
7
|
+
credentialPolicySchema,
|
|
8
|
+
deliveredHarnessConfig,
|
|
9
|
+
findDynamicSlots,
|
|
10
|
+
formatProviderRef,
|
|
11
|
+
inferenceKindOfNode,
|
|
12
|
+
InstructionRole,
|
|
13
|
+
isDynamicSlot,
|
|
14
|
+
jsonObjectSchema,
|
|
15
|
+
McpTransportKind,
|
|
16
|
+
PromptWhileRunning,
|
|
17
|
+
referencedSharedSchemas,
|
|
18
|
+
SandboxWire,
|
|
19
|
+
SCHEMA_IDS,
|
|
20
|
+
SHARED_SCHEMAS,
|
|
21
|
+
UserInstructionDelivery
|
|
22
|
+
} from "@finalai/agent-provider";
|
|
23
|
+
import addFormats from "ajv-formats";
|
|
24
|
+
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
25
|
+
import { RE2JS } from "re2js";
|
|
26
|
+
import * as z from "zod";
|
|
27
|
+
var CompatibilityResult = /* @__PURE__ */ ((CompatibilityResult2) => {
|
|
28
|
+
CompatibilityResult2["Valid"] = "valid";
|
|
29
|
+
CompatibilityResult2["Invalid"] = "invalid";
|
|
30
|
+
CompatibilityResult2["Applies"] = "applies";
|
|
31
|
+
CompatibilityResult2["Unused"] = "unused";
|
|
32
|
+
CompatibilityResult2["Transformed"] = "transformed";
|
|
33
|
+
CompatibilityResult2["Unavailable"] = "unavailable";
|
|
34
|
+
CompatibilityResult2["Host"] = "host";
|
|
35
|
+
CompatibilityResult2["Absent"] = "absent";
|
|
36
|
+
CompatibilityResult2["Dynamic"] = "dynamic";
|
|
37
|
+
return CompatibilityResult2;
|
|
38
|
+
})(CompatibilityResult || {});
|
|
39
|
+
const isObject = (value) => jsonObjectSchema.safeParse(value).success;
|
|
40
|
+
const stringOf = (value) => {
|
|
41
|
+
const parsed = z.string().safeParse(value);
|
|
42
|
+
return parsed.success ? parsed.data : null;
|
|
43
|
+
};
|
|
44
|
+
const configObjectOf = (manifest) => {
|
|
45
|
+
const parsed = jsonObjectSchema.safeParse(manifest.harness.config);
|
|
46
|
+
return parsed.success && !isDynamicSlot(parsed.data) ? parsed.data : null;
|
|
47
|
+
};
|
|
48
|
+
const code = (value) => `\`${value}\``;
|
|
49
|
+
const pointerOf = (path) => path.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part.length > 0).map((part) => `/${part.replaceAll("~", "~0").replaceAll("/", "~1")}`).join("");
|
|
50
|
+
const createValidator = () => {
|
|
51
|
+
const regExp = Object.assign(
|
|
52
|
+
(pattern) => {
|
|
53
|
+
const regex = RE2JS.compile(pattern);
|
|
54
|
+
return {
|
|
55
|
+
test: (value) => regex.matcher(value).find(),
|
|
56
|
+
toString: () => pattern
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
{ code: "RE2JS" }
|
|
60
|
+
);
|
|
61
|
+
const ajv = new Ajv2020({
|
|
62
|
+
strict: false,
|
|
63
|
+
allErrors: true,
|
|
64
|
+
validateFormats: true,
|
|
65
|
+
code: { regExp }
|
|
66
|
+
});
|
|
67
|
+
addFormats(ajv);
|
|
68
|
+
for (const schema of Object.values(SHARED_SCHEMAS)) ajv.addSchema(schema);
|
|
69
|
+
return ajv;
|
|
70
|
+
};
|
|
71
|
+
const describeErrors = (errors) => errors.slice(0, 8).map(
|
|
72
|
+
(item) => `${item.instancePath.length === 0 ? "config" : item.instancePath} ${item.message ?? "is invalid"}`
|
|
73
|
+
).join("; ");
|
|
74
|
+
const fieldForSchema = (configSchema, schemaId) => {
|
|
75
|
+
const references = referencedSharedSchemas(configSchema);
|
|
76
|
+
return Object.entries(references).find(([, ref]) => ref === schemaId)?.[0] ?? null;
|
|
77
|
+
};
|
|
78
|
+
const schemaProperty = (configSchema, field) => {
|
|
79
|
+
const properties = configSchema["properties"];
|
|
80
|
+
return isObject(properties) ? properties[field] : void 0;
|
|
81
|
+
};
|
|
82
|
+
const harnessName = (ref) => ref.kind === "package" ? ref.specifier.split("/").at(-1) ?? ref.specifier : ref.export;
|
|
83
|
+
const directoryFieldFiles = (manifest, field) => {
|
|
84
|
+
const config = configObjectOf(manifest);
|
|
85
|
+
if (config == null) return [];
|
|
86
|
+
const value = config[field];
|
|
87
|
+
if (!Array.isArray(value)) return [];
|
|
88
|
+
return value.flatMap((item) => {
|
|
89
|
+
if (!isObject(item)) return [];
|
|
90
|
+
if (field === "instructions") {
|
|
91
|
+
const source = stringOf(item["source"]);
|
|
92
|
+
return source == null ? [] : [source];
|
|
93
|
+
}
|
|
94
|
+
const key = stringOf(item["key"]);
|
|
95
|
+
return key == null ? [] : [`skills/${key}`];
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const compiledConfigSchemas = /* @__PURE__ */ new Map();
|
|
99
|
+
const MAX_COMPILED_CONFIG_SCHEMAS = 64;
|
|
100
|
+
const configValidatorFor = (schema) => {
|
|
101
|
+
const key = JSON.stringify(schema);
|
|
102
|
+
const cached = compiledConfigSchemas.get(key);
|
|
103
|
+
if (cached != null) return cached;
|
|
104
|
+
const validate = createValidator().compile(schema);
|
|
105
|
+
if (compiledConfigSchemas.size >= MAX_COMPILED_CONFIG_SCHEMAS) compiledConfigSchemas.clear();
|
|
106
|
+
compiledConfigSchemas.set(key, validate);
|
|
107
|
+
return validate;
|
|
108
|
+
};
|
|
109
|
+
const harnessConfigError = (args) => {
|
|
110
|
+
const schema = args.description.configSchema;
|
|
111
|
+
const delivered = deliveredHarnessConfig(args);
|
|
112
|
+
const validated = isObject(delivered) ? { ...delivered } : delivered;
|
|
113
|
+
if (isObject(validated)) {
|
|
114
|
+
for (const [field, schemaId] of [
|
|
115
|
+
["instructions", SCHEMA_IDS.instructions],
|
|
116
|
+
["skills", SCHEMA_IDS.skills]
|
|
117
|
+
]) {
|
|
118
|
+
if (validated[field] == null) continue;
|
|
119
|
+
if (fieldForSchema(schema, schemaId) === field || schemaProperty(schema, field) != null)
|
|
120
|
+
continue;
|
|
121
|
+
delete validated[field];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
const validate = configValidatorFor(schema);
|
|
126
|
+
return validate(validated) ? null : describeErrors(validate.errors ?? []);
|
|
127
|
+
} catch (cause) {
|
|
128
|
+
return `the config schema could not be compiled: ${cause instanceof Error ? cause.message : String(cause)}`;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const configRows = (args) => {
|
|
132
|
+
const { manifest, description } = args;
|
|
133
|
+
const rows = [];
|
|
134
|
+
const name = harnessName(manifest.harness.harness);
|
|
135
|
+
const config = deliveredHarnessConfig({ config: manifest.harness.config, description });
|
|
136
|
+
if (isDynamicSlot(config)) {
|
|
137
|
+
return [
|
|
138
|
+
{
|
|
139
|
+
item: "harness config",
|
|
140
|
+
result: "dynamic" /* Dynamic */,
|
|
141
|
+
why: "the whole config is resolved per session and validated then"
|
|
142
|
+
}
|
|
143
|
+
];
|
|
144
|
+
}
|
|
145
|
+
const schema = description.configSchema;
|
|
146
|
+
const validated = isObject(config) ? { ...config } : config;
|
|
147
|
+
const unusedFields = [];
|
|
148
|
+
for (const [field, schemaId] of [
|
|
149
|
+
["instructions", SCHEMA_IDS.instructions],
|
|
150
|
+
["skills", SCHEMA_IDS.skills]
|
|
151
|
+
]) {
|
|
152
|
+
if (!isObject(validated) || validated[field] == null) continue;
|
|
153
|
+
const files = args.directoryFiles[field];
|
|
154
|
+
if (fieldForSchema(schema, schemaId) === field || schemaProperty(schema, field) != null)
|
|
155
|
+
continue;
|
|
156
|
+
if (files.length === 0) continue;
|
|
157
|
+
delete validated[field];
|
|
158
|
+
unusedFields.push(field);
|
|
159
|
+
for (const file of files) {
|
|
160
|
+
rows.push({
|
|
161
|
+
item: file,
|
|
162
|
+
result: "unused" /* Unused */,
|
|
163
|
+
why: `${name}'s config schema has no ${field} field, so the harness never receives it`
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const dynamicPointers = findDynamicSlots(validated).map((slot) => pointerOf(slot.path));
|
|
168
|
+
let errors = [];
|
|
169
|
+
try {
|
|
170
|
+
const validate = createValidator().compile(schema);
|
|
171
|
+
if (!validate(validated)) errors = validate.errors ?? [];
|
|
172
|
+
} catch (cause) {
|
|
173
|
+
rows.unshift({
|
|
174
|
+
item: "harness config",
|
|
175
|
+
result: "invalid" /* Invalid */,
|
|
176
|
+
why: `${name}'s config schema could not be compiled: ${cause instanceof Error ? cause.message : String(cause)}`
|
|
177
|
+
});
|
|
178
|
+
return rows;
|
|
179
|
+
}
|
|
180
|
+
const relevant = errors.filter(
|
|
181
|
+
(item) => !dynamicPointers.some(
|
|
182
|
+
(pointer) => item.instancePath === pointer || item.instancePath.startsWith(`${pointer}/`)
|
|
183
|
+
)
|
|
184
|
+
);
|
|
185
|
+
if (relevant.length > 0) {
|
|
186
|
+
rows.unshift({
|
|
187
|
+
item: "harness config",
|
|
188
|
+
result: "invalid" /* Invalid */,
|
|
189
|
+
why: describeErrors(relevant)
|
|
190
|
+
});
|
|
191
|
+
return rows;
|
|
192
|
+
}
|
|
193
|
+
const fields = isObject(validated) ? Object.keys(validated) : [];
|
|
194
|
+
const details = [];
|
|
195
|
+
if (isObject(validated)) {
|
|
196
|
+
const instructions = validated["instructions"];
|
|
197
|
+
if (Array.isArray(instructions)) {
|
|
198
|
+
const dynamic = instructions.filter((item) => isDynamicSlot(item)).length;
|
|
199
|
+
details.push(
|
|
200
|
+
`${code("instructions")} (${instructions.length} fragment${instructions.length === 1 ? "" : "s"}${dynamic > 0 ? `, ${dynamic} dynamic` : ""})`
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
const model = stringOf(validated["model"]);
|
|
204
|
+
const modelSchema = schemaProperty(schema, "model");
|
|
205
|
+
const modelEnum = isObject(modelSchema) ? modelSchema["enum"] : void 0;
|
|
206
|
+
if (model != null && Array.isArray(modelEnum) && modelEnum.includes(model)) {
|
|
207
|
+
details.push(`${code(model)} is in its model enum`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
rows.unshift({
|
|
211
|
+
item: "harness config",
|
|
212
|
+
result: "valid" /* Valid */,
|
|
213
|
+
why: `${fields.map(code).join(", ") || "the empty config"} validate${fields.length === 1 ? "s" : ""} against ${code(name)}'s schema${details.length > 0 ? `; ${details.join("; ")}` : ""}${unusedFields.length > 0 ? `; ${unusedFields.join(" and ")} left out (unused)` : ""}`
|
|
214
|
+
});
|
|
215
|
+
return rows;
|
|
216
|
+
};
|
|
217
|
+
const instructionDeliveryRows = (manifest, description) => {
|
|
218
|
+
const config = configObjectOf(manifest);
|
|
219
|
+
if (config == null) return [];
|
|
220
|
+
const field = fieldForSchema(description.configSchema, SCHEMA_IDS.instructions) ?? "instructions";
|
|
221
|
+
const instructions = config[field];
|
|
222
|
+
if (!Array.isArray(instructions)) return [];
|
|
223
|
+
const userFragments = instructions.filter(
|
|
224
|
+
(item) => isObject(item) && item["role"] === InstructionRole.User
|
|
225
|
+
).length;
|
|
226
|
+
const dynamicFragments = instructions.filter((item) => isDynamicSlot(item)).length;
|
|
227
|
+
if (userFragments === 0 && dynamicFragments === 0) return [];
|
|
228
|
+
if (description.userInstructionDelivery === UserInstructionDelivery.System)
|
|
229
|
+
return [
|
|
230
|
+
{
|
|
231
|
+
item: "user-role instructions",
|
|
232
|
+
result: "transformed" /* Transformed */,
|
|
233
|
+
why: "the harness declares system-only instruction delivery; user-role fragments are converted to system fragments in its config instead of appended to user history"
|
|
234
|
+
}
|
|
235
|
+
];
|
|
236
|
+
if (description.supports.observe) return [];
|
|
237
|
+
return [
|
|
238
|
+
{
|
|
239
|
+
item: "user-role instructions",
|
|
240
|
+
result: "transformed" /* Transformed */,
|
|
241
|
+
why: `the harness has no observe support, so ${userFragments > 0 ? `${userFragments} user-role fragment${userFragments === 1 ? "" : "s"}` : "user-role fragments a resolver returns"} arrive as a leading content block at their lifecycle boundary (_meta["final.ai"].role = 'instruction')`
|
|
242
|
+
}
|
|
243
|
+
];
|
|
244
|
+
};
|
|
245
|
+
const preferredTransport = (transports) => {
|
|
246
|
+
if (transports.includes(McpTransportKind.Acp)) return McpTransportKind.Acp;
|
|
247
|
+
if (transports.includes(McpTransportKind.Http)) return McpTransportKind.Http;
|
|
248
|
+
return null;
|
|
249
|
+
};
|
|
250
|
+
const mcpRows = (manifest, description) => {
|
|
251
|
+
const transports = description.acp.mcp;
|
|
252
|
+
const row = (item, _binding) => {
|
|
253
|
+
if (transports.length === 0) {
|
|
254
|
+
return {
|
|
255
|
+
item,
|
|
256
|
+
result: "unavailable" /* Unavailable */,
|
|
257
|
+
why: "none: harness has no MCP capability"
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
const transport = preferredTransport(transports);
|
|
261
|
+
if (transport == null) {
|
|
262
|
+
return {
|
|
263
|
+
item,
|
|
264
|
+
result: "unavailable" /* Unavailable */,
|
|
265
|
+
why: `the harness accepts only ${transports.join(", ")} MCP servers; the MCP host serves this one over acp or http`
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
return {
|
|
269
|
+
item,
|
|
270
|
+
result: "applies" /* Applies */,
|
|
271
|
+
why: `over ${code(transport)}: the harness advertises ACP MCP with the ${transport} transport`
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
if (isDynamicSlot(manifest.mcpServers)) return [row("MCP servers (resolved per session)", null)];
|
|
275
|
+
return manifest.mcpServers.map((binding) => row(`MCP ${code(binding.key)}`, binding));
|
|
276
|
+
};
|
|
277
|
+
const baseToolRows = (manifest, description) => {
|
|
278
|
+
const sandboxes = isDynamicSlot(manifest.sandboxes) ? null : manifest.sandboxes;
|
|
279
|
+
return Object.values(BaseCapability).map((capability) => {
|
|
280
|
+
const declared = manifest.tools.base[capability];
|
|
281
|
+
const provided = description.baseTools[capability];
|
|
282
|
+
const native = provided == null || provided.nativeTools.length === 0 ? "" : ` (${provided.nativeTools.map(code).join(", ")})`;
|
|
283
|
+
if (declared == null && manifest.tools.host?.includes(capability) === true) {
|
|
284
|
+
const item2 = `base tools: ${capability} \u2192 harness host`;
|
|
285
|
+
if (provided == null) {
|
|
286
|
+
return {
|
|
287
|
+
item: item2,
|
|
288
|
+
result: "unavailable" /* Unavailable */,
|
|
289
|
+
why: `the harness does not provide ${capability}`
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
if (provided.provision === BaseToolProvision.Bound) {
|
|
293
|
+
return {
|
|
294
|
+
item: item2,
|
|
295
|
+
result: "unavailable" /* Unavailable */,
|
|
296
|
+
why: `the harness has no ${capability} of its own; bind it to a sandbox target`
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
return {
|
|
300
|
+
item: item2,
|
|
301
|
+
result: "host" /* Host */,
|
|
302
|
+
why: `${capability} \u2192 host${native}${provided.provision === BaseToolProvision.HostDisableable ? ", switchable through the harness allow-lists" : ""}`
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
if (declared == null) {
|
|
306
|
+
if (provided?.provision === BaseToolProvision.HostFixed) {
|
|
307
|
+
return {
|
|
308
|
+
item: `base tools: ${capability}`,
|
|
309
|
+
result: "host" /* Host */,
|
|
310
|
+
why: `${capability}: not declared, but native on the harness host and not switchable${native}`
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
return {
|
|
314
|
+
item: `base tools: ${capability}`,
|
|
315
|
+
result: "absent" /* Absent */,
|
|
316
|
+
why: `${capability}: not declared, tool absent`
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
const item = `base tools: ${capability} \u2192 ${declared.target}`;
|
|
320
|
+
if (sandboxes != null && sandboxes[declared.target] == null) {
|
|
321
|
+
return {
|
|
322
|
+
item,
|
|
323
|
+
result: "invalid" /* Invalid */,
|
|
324
|
+
why: `${declared.target} is not a sandbox target of this definition`
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
if (provided == null) {
|
|
328
|
+
return {
|
|
329
|
+
item,
|
|
330
|
+
result: "unavailable" /* Unavailable */,
|
|
331
|
+
why: `the harness does not provide ${capability}; the binding to ${declared.target} is unused`
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
const routesTargets = provided.provision === BaseToolProvision.HostDisableable && description.consumes.includes(SandboxWire.HandleRpc);
|
|
335
|
+
if (provided.provision === BaseToolProvision.Bound || routesTargets) {
|
|
336
|
+
const wire = description.consumes.includes(SandboxWire.HandleRpc) ? "direct" : description.consumes.includes(SandboxWire.Mcp) ? "over MCP" : null;
|
|
337
|
+
if (wire == null) {
|
|
338
|
+
return {
|
|
339
|
+
item,
|
|
340
|
+
result: "unavailable" /* Unavailable */,
|
|
341
|
+
why: `the harness declares ${capability} as bound but consumes no sandbox wire`
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
return {
|
|
345
|
+
item,
|
|
346
|
+
result: "applies" /* Applies */,
|
|
347
|
+
why: `${capability} \u2192 ${declared.target}, ${wire}${native}; attached lazily on the first call`
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
item,
|
|
352
|
+
result: "host" /* Host */,
|
|
353
|
+
why: `${capability} \u2192 host${native}; cannot be rebound to ${declared.target}${provided.provision === BaseToolProvision.HostDisableable ? " (switchable through the harness allow-lists)" : ""}`
|
|
354
|
+
};
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
const supportRows = (description) => [
|
|
358
|
+
description.supports.observe ? {
|
|
359
|
+
item: "observe",
|
|
360
|
+
result: "applies" /* Applies */,
|
|
361
|
+
why: "group messages and user-role instructions arrive through _final/session/observe"
|
|
362
|
+
} : {
|
|
363
|
+
item: "observe",
|
|
364
|
+
result: "unavailable" /* Unavailable */,
|
|
365
|
+
why: "no observe support: group All routing falls back to prompts with replyExpected: false"
|
|
366
|
+
},
|
|
367
|
+
description.supports.authorMeta ? {
|
|
368
|
+
item: "author attribution",
|
|
369
|
+
result: "applies" /* Applies */,
|
|
370
|
+
why: 'the harness renders _meta["final.ai"].author'
|
|
371
|
+
} : {
|
|
372
|
+
item: "author attribution",
|
|
373
|
+
result: "transformed" /* Transformed */,
|
|
374
|
+
why: 'the harness ignores _meta["final.ai"].author, so the channel prepends author names to the text'
|
|
375
|
+
},
|
|
376
|
+
// Both profiles are valid; the report states which one applies.
|
|
377
|
+
{
|
|
378
|
+
item: "prompt while running",
|
|
379
|
+
result: "applies" /* Applies */,
|
|
380
|
+
why: description.promptWhileRunning === PromptWhileRunning.Inject ? "a message sent during a turn joins the running work" : "a message sent during a turn runs after the current work goes idle"
|
|
381
|
+
},
|
|
382
|
+
description.sessionSurvivesDisconnect ? {
|
|
383
|
+
item: "reconnect",
|
|
384
|
+
result: "applies" /* Applies */,
|
|
385
|
+
why: "running work and open requests survive a dropped connection and resume"
|
|
386
|
+
} : {
|
|
387
|
+
item: "reconnect",
|
|
388
|
+
result: "unavailable" /* Unavailable */,
|
|
389
|
+
why: "a dropped connection ends the running turn with harness_state_lost"
|
|
390
|
+
}
|
|
391
|
+
];
|
|
392
|
+
const credentialRows = (manifest, description) => {
|
|
393
|
+
const config = configObjectOf(manifest);
|
|
394
|
+
if (config == null) return [];
|
|
395
|
+
const field = fieldForSchema(description.configSchema, SCHEMA_IDS.credentialPolicy) ?? "credentials";
|
|
396
|
+
const raw = config[field];
|
|
397
|
+
if (raw == null) {
|
|
398
|
+
return [
|
|
399
|
+
{
|
|
400
|
+
item: "credentials",
|
|
401
|
+
result: "absent" /* Absent */,
|
|
402
|
+
why: "no credential policy: the broker applies the owner's or organization's default chain"
|
|
403
|
+
}
|
|
404
|
+
];
|
|
405
|
+
}
|
|
406
|
+
if (isDynamicSlot(raw))
|
|
407
|
+
return [
|
|
408
|
+
{ item: "credentials", result: "dynamic" /* Dynamic */, why: "resolved per session" }
|
|
409
|
+
];
|
|
410
|
+
const parsed = credentialPolicySchema.safeParse(raw);
|
|
411
|
+
if (!parsed.success) {
|
|
412
|
+
return [
|
|
413
|
+
{
|
|
414
|
+
item: "credentials",
|
|
415
|
+
result: "invalid" /* Invalid */,
|
|
416
|
+
why: "the credential policy does not parse"
|
|
417
|
+
}
|
|
418
|
+
];
|
|
419
|
+
}
|
|
420
|
+
const { inference } = description;
|
|
421
|
+
const rows = [];
|
|
422
|
+
if (parsed.data.payer === CredentialPayer.PromptingUser && inference.delivery !== CredentialDelivery.PerRequest) {
|
|
423
|
+
rows.push({
|
|
424
|
+
item: "credentials payer",
|
|
425
|
+
result: "invalid" /* Invalid */,
|
|
426
|
+
why: "prompting-user pays per turn, which needs per-request delivery; this harness takes its credential at open"
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
let usable = 0;
|
|
430
|
+
parsed.data.tryInOrder.forEach((node, index) => {
|
|
431
|
+
const item = `credentials[${index}] ${node.kind}`;
|
|
432
|
+
const kind = inferenceKindOfNode(node);
|
|
433
|
+
if (kind == null) {
|
|
434
|
+
if (node.kind === CredentialNodeKind.Custom) {
|
|
435
|
+
usable += 1;
|
|
436
|
+
rows.push({
|
|
437
|
+
item,
|
|
438
|
+
result: "dynamic" /* Dynamic */,
|
|
439
|
+
why: `resolved at open by ${code(node.resolver)}; its result is checked like a static entry`
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
if (!inference.kinds.includes(kind)) {
|
|
445
|
+
rows.push({
|
|
446
|
+
item,
|
|
447
|
+
result: "unavailable" /* Unavailable */,
|
|
448
|
+
why: `the harness accepts ${inference.kinds.join(", ") || "no"} credentials; the broker skips this entry`
|
|
449
|
+
});
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const vendor = "vendor" in node ? node.vendor : void 0;
|
|
453
|
+
if (vendor != null && !inference.vendors.includes(vendor)) {
|
|
454
|
+
rows.push({
|
|
455
|
+
item,
|
|
456
|
+
result: "unavailable" /* Unavailable */,
|
|
457
|
+
why: `vendor ${vendor} is not one the harness uses (${inference.vendors.join(", ")}); the broker skips this entry`
|
|
458
|
+
});
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
usable += 1;
|
|
462
|
+
rows.push({
|
|
463
|
+
item,
|
|
464
|
+
result: "valid" /* Valid */,
|
|
465
|
+
why: `${kind} is a kind this harness accepts for ${vendor ?? (inference.vendors.join(", ") || "its vendors")}, delivered ${inference.delivery}`
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
if (usable === 0) {
|
|
469
|
+
rows.push({
|
|
470
|
+
item: "credentials",
|
|
471
|
+
result: "invalid" /* Invalid */,
|
|
472
|
+
why: "no entry in the chain is usable by this harness"
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
return rows;
|
|
476
|
+
};
|
|
477
|
+
const platformRows = (manifest) => {
|
|
478
|
+
const rows = [];
|
|
479
|
+
const independent = "platform feature, harness-independent";
|
|
480
|
+
for (const schedule of manifest.schedules) {
|
|
481
|
+
rows.push({
|
|
482
|
+
item: `schedule ${code(schedule.key)}`,
|
|
483
|
+
result: "applies" /* Applies */,
|
|
484
|
+
why: `${independent} (${schedule.cron} ${schedule.timezone})`
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
for (const channel of manifest.channels) {
|
|
488
|
+
rows.push({
|
|
489
|
+
item: `channel ${code(channel.key)}`,
|
|
490
|
+
result: "applies" /* Applies */,
|
|
491
|
+
why: `${independent} (${formatProviderRef(channel.channel)})`
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
for (const hook of manifest.hooks) {
|
|
495
|
+
rows.push({
|
|
496
|
+
item: `hook ${code(hook.slug)}`,
|
|
497
|
+
result: "applies" /* Applies */,
|
|
498
|
+
why: `${independent}; events: ${hook.events.join(", ")}`
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
return rows;
|
|
502
|
+
};
|
|
503
|
+
const compatibilityReport = (args) => {
|
|
504
|
+
const { manifest, description } = args;
|
|
505
|
+
const directoryFiles = args.directoryFiles ?? {
|
|
506
|
+
instructions: directoryFieldFiles(manifest, "instructions"),
|
|
507
|
+
skills: directoryFieldFiles(manifest, "skills")
|
|
508
|
+
};
|
|
509
|
+
const rows = [
|
|
510
|
+
...configRows({ manifest, description, directoryFiles }),
|
|
511
|
+
...instructionDeliveryRows(manifest, description),
|
|
512
|
+
...credentialRows(manifest, description),
|
|
513
|
+
...mcpRows(manifest, description),
|
|
514
|
+
...baseToolRows(manifest, description),
|
|
515
|
+
...Object.keys(manifest.toolPolicy).filter((key) => !key.includes("/") && description.supports.nativeToolPolicy === false).map(
|
|
516
|
+
(key) => ({
|
|
517
|
+
item: `tool policy ${code(key)}`,
|
|
518
|
+
result: "invalid" /* Invalid */,
|
|
519
|
+
why: "the adapter cannot enforce native per-tool policy through its public surface; use its native permission configuration"
|
|
520
|
+
})
|
|
521
|
+
),
|
|
522
|
+
...supportRows(description),
|
|
523
|
+
...platformRows(manifest)
|
|
524
|
+
];
|
|
525
|
+
return {
|
|
526
|
+
harness: manifest.harness.harness,
|
|
527
|
+
ok: rows.every((row) => row.result !== "invalid" /* Invalid */),
|
|
528
|
+
rows
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
export {
|
|
532
|
+
CompatibilityResult,
|
|
533
|
+
compatibilityReport,
|
|
534
|
+
harnessConfigError
|
|
535
|
+
};
|
|
536
|
+
//# sourceMappingURL=compatibility.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/compatibility.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n CredentialNodeKind,\n CredentialPayer,\n credentialPolicySchema,\n deliveredHarnessConfig,\n findDynamicSlots,\n formatProviderRef,\n inferenceKindOfNode,\n InstructionRole,\n isDynamicSlot,\n jsonObjectSchema,\n McpTransportKind,\n PromptWhileRunning,\n referencedSharedSchemas,\n SandboxWire,\n SCHEMA_IDS,\n SHARED_SCHEMAS,\n UserInstructionDelivery,\n type AgentManifestIface,\n type HarnessDescriptionIface,\n type JsonObject,\n type JsonValue,\n type McpServerBinding,\n type ProviderRef,\n} from '@finalai/agent-provider';\nimport addFormats from 'ajv-formats';\nimport { Ajv2020, type ErrorObject } from 'ajv/dist/2020.js';\nimport { RE2JS } from 're2js';\nimport * as z from 'zod';\n\n// The per-harness compatibility report: what\n// of a manifest a chosen harness can honor, row by row, for Build to show\n// next to the harness picker.\n\nexport enum CompatibilityResult {\n Valid = 'valid',\n Invalid = 'invalid',\n Applies = 'applies',\n Unused = 'unused',\n Transformed = 'transformed',\n Unavailable = 'unavailable',\n // Native on the harness host; not routed to a sandbox target.\n Host = 'host',\n // Not declared; the capability is off.\n Absent = 'absent',\n // Resolved per session; checked when resolved.\n Dynamic = 'dynamic',\n}\n\nexport interface CompatibilityRowIface {\n item: string;\n result: CompatibilityResult;\n why: string;\n}\n\nexport interface CompatibilityReportIface {\n harness: ProviderRef;\n // False when any row is invalid.\n ok: boolean;\n rows: CompatibilityRowIface[];\n}\n\nexport interface DirectoryFieldFilesIface {\n // Directory files that filled `harness.config.instructions` / `.skills`.\n instructions: string[];\n skills: string[];\n}\n\nexport interface CompatibilityReportArgsIface {\n manifest: AgentManifestIface;\n description: HarnessDescriptionIface;\n directoryFiles?: DirectoryFieldFilesIface;\n}\n\nconst isObject = (value: JsonValue | undefined): value is JsonObject =>\n jsonObjectSchema.safeParse(value).success;\n\nconst stringOf = (value: JsonValue | undefined): string | null => {\n const parsed = z.string().safeParse(value);\n return parsed.success ? parsed.data : null;\n};\n\nconst configObjectOf = (manifest: AgentManifestIface): JsonObject | null => {\n const parsed = jsonObjectSchema.safeParse(manifest.harness.config);\n return parsed.success && !isDynamicSlot(parsed.data) ? parsed.data : null;\n};\n\nconst code = (value: string): string => `\\`${value}\\``;\n\nconst pointerOf = (path: string): string =>\n path\n .replace(/\\[(\\d+)\\]/g, '.$1')\n .split('.')\n .filter((part) => part.length > 0)\n .map((part) => `/${part.replaceAll('~', '~0').replaceAll('/', '~1')}`)\n .join('');\n\nconst createValidator = (): Ajv2020 => {\n const regExp = Object.assign(\n (pattern: string) => {\n const regex = RE2JS.compile(pattern);\n return {\n test: (value: string) => regex.matcher(value).find(),\n toString: () => pattern,\n };\n },\n { code: 'RE2JS' },\n );\n const ajv = new Ajv2020({\n strict: false,\n allErrors: true,\n validateFormats: true,\n code: { regExp },\n });\n addFormats(ajv);\n for (const schema of Object.values(SHARED_SCHEMAS)) ajv.addSchema(schema);\n return ajv;\n};\n\nconst describeErrors = (errors: ErrorObject[]): string =>\n errors\n .slice(0, 8)\n .map(\n (item) =>\n `${item.instancePath.length === 0 ? 'config' : item.instancePath} ${item.message ?? 'is invalid'}`,\n )\n .join('; ');\n\nconst fieldForSchema = (configSchema: JsonObject, schemaId: string): string | null => {\n const references = referencedSharedSchemas(configSchema);\n return Object.entries(references).find(([, ref]) => ref === schemaId)?.[0] ?? null;\n};\n\nconst schemaProperty = (configSchema: JsonObject, field: string): JsonValue | undefined => {\n const properties = configSchema['properties'];\n return isObject(properties) ? properties[field] : undefined;\n};\n\nconst harnessName = (ref: ProviderRef): string =>\n ref.kind === 'package' ? (ref.specifier.split('/').at(-1) ?? ref.specifier) : ref.export;\n\nconst directoryFieldFiles = (\n manifest: AgentManifestIface,\n field: 'instructions' | 'skills',\n): string[] => {\n const config = configObjectOf(manifest);\n if (config == null) return [];\n const value = config[field];\n if (!Array.isArray(value)) return [];\n return value.flatMap((item) => {\n if (!isObject(item)) return [];\n if (field === 'instructions') {\n const source = stringOf(item['source']);\n return source == null ? [] : [source];\n }\n const key = stringOf(item['key']);\n return key == null ? [] : [`skills/${key}`];\n });\n};\n\n// Compiled config validators by schema (harness schemas are few and stable).\nconst compiledConfigSchemas = new Map<string, ReturnType<Ajv2020['compile']>>();\nconst MAX_COMPILED_CONFIG_SCHEMAS = 64;\n\nconst configValidatorFor = (schema: JsonObject): ReturnType<Ajv2020['compile']> => {\n const key = JSON.stringify(schema);\n const cached = compiledConfigSchemas.get(key);\n if (cached != null) return cached;\n const validate = createValidator().compile(schema);\n if (compiledConfigSchemas.size >= MAX_COMPILED_CONFIG_SCHEMAS) compiledConfigSchemas.clear();\n compiledConfigSchemas.set(key, validate);\n return validate;\n};\n\n// Checks a resolved (slot-free) harness config against the harness's config\n// schema before the session service opens the harness, by the report's rules:\n// instructions or skills the schema has no field for are not validated (the\n// harness never reads them). Null when valid, else what is wrong.\nexport const harnessConfigError = (args: {\n config: JsonValue;\n description: HarnessDescriptionIface;\n}): string | null => {\n const schema = args.description.configSchema;\n const delivered = deliveredHarnessConfig(args);\n const validated: JsonValue = isObject(delivered) ? { ...delivered } : delivered;\n if (isObject(validated)) {\n for (const [field, schemaId] of [\n ['instructions', SCHEMA_IDS.instructions],\n ['skills', SCHEMA_IDS.skills],\n ] as const) {\n if (validated[field] == null) continue;\n if (fieldForSchema(schema, schemaId) === field || schemaProperty(schema, field) != null)\n continue;\n delete validated[field];\n }\n }\n try {\n const validate = configValidatorFor(schema);\n return validate(validated) ? null : describeErrors(validate.errors ?? []);\n } catch (cause) {\n return `the config schema could not be compiled: ${cause instanceof Error ? cause.message : String(cause)}`;\n }\n};\n\nconst configRows = (args: {\n manifest: AgentManifestIface;\n description: HarnessDescriptionIface;\n directoryFiles: DirectoryFieldFilesIface;\n}): CompatibilityRowIface[] => {\n const { manifest, description } = args;\n const rows: CompatibilityRowIface[] = [];\n const name = harnessName(manifest.harness.harness);\n const config = deliveredHarnessConfig({ config: manifest.harness.config, description });\n if (isDynamicSlot(config)) {\n return [\n {\n item: 'harness config',\n result: CompatibilityResult.Dynamic,\n why: 'the whole config is resolved per session and validated then',\n },\n ];\n }\n const schema = description.configSchema;\n const validated: JsonValue = isObject(config) ? { ...config } : config;\n const unusedFields: string[] = [];\n for (const [field, schemaId] of [\n ['instructions', SCHEMA_IDS.instructions],\n ['skills', SCHEMA_IDS.skills],\n ] as const) {\n if (!isObject(validated) || validated[field] == null) continue;\n const files = args.directoryFiles[field];\n if (fieldForSchema(schema, schemaId) === field || schemaProperty(schema, field) != null)\n continue;\n if (files.length === 0) continue;\n delete validated[field];\n unusedFields.push(field);\n for (const file of files) {\n rows.push({\n item: file,\n result: CompatibilityResult.Unused,\n why: `${name}'s config schema has no ${field} field, so the harness never receives it`,\n });\n }\n }\n const dynamicPointers = findDynamicSlots(validated).map((slot) => pointerOf(slot.path));\n let errors: ErrorObject[] = [];\n try {\n const validate = createValidator().compile(schema);\n if (!validate(validated)) errors = validate.errors ?? [];\n } catch (cause) {\n rows.unshift({\n item: 'harness config',\n result: CompatibilityResult.Invalid,\n why: `${name}'s config schema could not be compiled: ${cause instanceof Error ? cause.message : String(cause)}`,\n });\n return rows;\n }\n // A dynamic slot is validated when it resolves, not against the static schema.\n const relevant = errors.filter(\n (item) =>\n !dynamicPointers.some(\n (pointer) => item.instancePath === pointer || item.instancePath.startsWith(`${pointer}/`),\n ),\n );\n if (relevant.length > 0) {\n rows.unshift({\n item: 'harness config',\n result: CompatibilityResult.Invalid,\n why: describeErrors(relevant),\n });\n return rows;\n }\n const fields = isObject(validated) ? Object.keys(validated) : [];\n const details: string[] = [];\n if (isObject(validated)) {\n const instructions = validated['instructions'];\n if (Array.isArray(instructions)) {\n const dynamic = instructions.filter((item) => isDynamicSlot(item)).length;\n details.push(\n `${code('instructions')} (${instructions.length} fragment${instructions.length === 1 ? '' : 's'}${dynamic > 0 ? `, ${dynamic} dynamic` : ''})`,\n );\n }\n const model = stringOf(validated['model']);\n const modelSchema = schemaProperty(schema, 'model');\n const modelEnum = isObject(modelSchema) ? modelSchema['enum'] : undefined;\n if (model != null && Array.isArray(modelEnum) && modelEnum.includes(model)) {\n details.push(`${code(model)} is in its model enum`);\n }\n }\n rows.unshift({\n item: 'harness config',\n result: CompatibilityResult.Valid,\n why: `${fields.map(code).join(', ') || 'the empty config'} validate${fields.length === 1 ? 's' : ''} against ${code(name)}'s schema${\n details.length > 0 ? `; ${details.join('; ')}` : ''\n }${unusedFields.length > 0 ? `; ${unusedFields.join(' and ')} left out (unused)` : ''}`,\n });\n return rows;\n};\n\nconst instructionDeliveryRows = (\n manifest: AgentManifestIface,\n description: HarnessDescriptionIface,\n): CompatibilityRowIface[] => {\n const config = configObjectOf(manifest);\n if (config == null) return [];\n const field = fieldForSchema(description.configSchema, SCHEMA_IDS.instructions) ?? 'instructions';\n const instructions = config[field];\n if (!Array.isArray(instructions)) return [];\n const userFragments = instructions.filter(\n (item) => isObject(item) && item['role'] === InstructionRole.User,\n ).length;\n const dynamicFragments = instructions.filter((item) => isDynamicSlot(item)).length;\n if (userFragments === 0 && dynamicFragments === 0) return [];\n if (description.userInstructionDelivery === UserInstructionDelivery.System)\n return [\n {\n item: 'user-role instructions',\n result: CompatibilityResult.Transformed,\n why: 'the harness declares system-only instruction delivery; user-role fragments are converted to system fragments in its config instead of appended to user history',\n },\n ];\n if (description.supports.observe) return [];\n return [\n {\n item: 'user-role instructions',\n result: CompatibilityResult.Transformed,\n why: `the harness has no observe support, so ${\n userFragments > 0\n ? `${userFragments} user-role fragment${userFragments === 1 ? '' : 's'}`\n : 'user-role fragments a resolver returns'\n } arrive as a leading content block at their lifecycle boundary (_meta[\"final.ai\"].role = 'instruction')`,\n },\n ];\n};\n\nconst preferredTransport = (transports: McpTransportKind[]): McpTransportKind | null => {\n if (transports.includes(McpTransportKind.Acp)) return McpTransportKind.Acp;\n if (transports.includes(McpTransportKind.Http)) return McpTransportKind.Http;\n return null;\n};\n\nconst mcpRows = (\n manifest: AgentManifestIface,\n description: HarnessDescriptionIface,\n): CompatibilityRowIface[] => {\n const transports = description.acp.mcp;\n const row = (item: string, _binding: McpServerBinding | null): CompatibilityRowIface => {\n if (transports.length === 0) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: 'none: harness has no MCP capability',\n };\n }\n const transport = preferredTransport(transports);\n if (transport == null) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness accepts only ${transports.join(', ')} MCP servers; the MCP host serves this one over acp or http`,\n };\n }\n return {\n item,\n result: CompatibilityResult.Applies,\n why: `over ${code(transport)}: the harness advertises ACP MCP with the ${transport} transport`,\n };\n };\n if (isDynamicSlot(manifest.mcpServers)) return [row('MCP servers (resolved per session)', null)];\n return manifest.mcpServers.map((binding) => row(`MCP ${code(binding.key)}`, binding));\n};\n\nconst baseToolRows = (\n manifest: AgentManifestIface,\n description: HarnessDescriptionIface,\n): CompatibilityRowIface[] => {\n const sandboxes = isDynamicSlot(manifest.sandboxes) ? null : manifest.sandboxes;\n return Object.values(BaseCapability).map((capability): CompatibilityRowIface => {\n const declared = manifest.tools.base[capability];\n const provided = description.baseTools[capability];\n const native =\n provided == null || provided.nativeTools.length === 0\n ? ''\n : ` (${provided.nativeTools.map(code).join(', ')})`;\n if (declared == null && manifest.tools.host?.includes(capability) === true) {\n const item = `base tools: ${capability} \u2192 harness host`;\n if (provided == null) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness does not provide ${capability}`,\n };\n }\n if (provided.provision === BaseToolProvision.Bound) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness has no ${capability} of its own; bind it to a sandbox target`,\n };\n }\n return {\n item,\n result: CompatibilityResult.Host,\n why: `${capability} \u2192 host${native}${\n provided.provision === BaseToolProvision.HostDisableable\n ? ', switchable through the harness allow-lists'\n : ''\n }`,\n };\n }\n if (declared == null) {\n if (provided?.provision === BaseToolProvision.HostFixed) {\n return {\n item: `base tools: ${capability}`,\n result: CompatibilityResult.Host,\n why: `${capability}: not declared, but native on the harness host and not switchable${native}`,\n };\n }\n return {\n item: `base tools: ${capability}`,\n result: CompatibilityResult.Absent,\n why: `${capability}: not declared, tool absent`,\n };\n }\n const item = `base tools: ${capability} \u2192 ${declared.target}`;\n if (sandboxes != null && sandboxes[declared.target] == null) {\n return {\n item,\n result: CompatibilityResult.Invalid,\n why: `${declared.target} is not a sandbox target of this definition`,\n };\n }\n if (provided == null) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness does not provide ${capability}; the binding to ${declared.target} is unused`,\n };\n }\n // A host-disableable harness that speaks the handle RPC routes a declared\n // target's capability to it (remote-pi), and runs it natively otherwise.\n const routesTargets =\n provided.provision === BaseToolProvision.HostDisableable &&\n description.consumes.includes(SandboxWire.HandleRpc);\n if (provided.provision === BaseToolProvision.Bound || routesTargets) {\n const wire = description.consumes.includes(SandboxWire.HandleRpc)\n ? 'direct'\n : description.consumes.includes(SandboxWire.Mcp)\n ? 'over MCP'\n : null;\n if (wire == null) {\n return {\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness declares ${capability} as bound but consumes no sandbox wire`,\n };\n }\n return {\n item,\n result: CompatibilityResult.Applies,\n why: `${capability} \u2192 ${declared.target}, ${wire}${native}; attached lazily on the first call`,\n };\n }\n return {\n item,\n result: CompatibilityResult.Host,\n why: `${capability} \u2192 host${native}; cannot be rebound to ${declared.target}${\n provided.provision === BaseToolProvision.HostDisableable\n ? ' (switchable through the harness allow-lists)'\n : ''\n }`,\n };\n });\n};\n\nconst supportRows = (description: HarnessDescriptionIface): CompatibilityRowIface[] => [\n description.supports.observe\n ? {\n item: 'observe',\n result: CompatibilityResult.Applies,\n why: 'group messages and user-role instructions arrive through _final/session/observe',\n }\n : {\n item: 'observe',\n result: CompatibilityResult.Unavailable,\n why: 'no observe support: group All routing falls back to prompts with replyExpected: false',\n },\n description.supports.authorMeta\n ? {\n item: 'author attribution',\n result: CompatibilityResult.Applies,\n why: 'the harness renders _meta[\"final.ai\"].author',\n }\n : {\n item: 'author attribution',\n result: CompatibilityResult.Transformed,\n why: 'the harness ignores _meta[\"final.ai\"].author, so the channel prepends author names to the text',\n },\n // Both profiles are valid; the report states which one applies.\n {\n item: 'prompt while running',\n result: CompatibilityResult.Applies,\n why:\n description.promptWhileRunning === PromptWhileRunning.Inject\n ? 'a message sent during a turn joins the running work'\n : 'a message sent during a turn runs after the current work goes idle',\n },\n description.sessionSurvivesDisconnect\n ? {\n item: 'reconnect',\n result: CompatibilityResult.Applies,\n why: 'running work and open requests survive a dropped connection and resume',\n }\n : {\n item: 'reconnect',\n result: CompatibilityResult.Unavailable,\n why: 'a dropped connection ends the running turn with harness_state_lost',\n },\n];\n\nconst credentialRows = (\n manifest: AgentManifestIface,\n description: HarnessDescriptionIface,\n): CompatibilityRowIface[] => {\n const config = configObjectOf(manifest);\n if (config == null) return [];\n const field =\n fieldForSchema(description.configSchema, SCHEMA_IDS.credentialPolicy) ?? 'credentials';\n const raw = config[field];\n if (raw == null) {\n return [\n {\n item: 'credentials',\n result: CompatibilityResult.Absent,\n why: \"no credential policy: the broker applies the owner's or organization's default chain\",\n },\n ];\n }\n if (isDynamicSlot(raw))\n return [\n { item: 'credentials', result: CompatibilityResult.Dynamic, why: 'resolved per session' },\n ];\n const parsed = credentialPolicySchema.safeParse(raw);\n if (!parsed.success) {\n return [\n {\n item: 'credentials',\n result: CompatibilityResult.Invalid,\n why: 'the credential policy does not parse',\n },\n ];\n }\n const { inference } = description;\n const rows: CompatibilityRowIface[] = [];\n if (\n parsed.data.payer === CredentialPayer.PromptingUser &&\n inference.delivery !== CredentialDelivery.PerRequest\n ) {\n rows.push({\n item: 'credentials payer',\n result: CompatibilityResult.Invalid,\n why: 'prompting-user pays per turn, which needs per-request delivery; this harness takes its credential at open',\n });\n }\n let usable = 0;\n parsed.data.tryInOrder.forEach((node, index) => {\n const item = `credentials[${index}] ${node.kind}`;\n const kind = inferenceKindOfNode(node);\n if (kind == null) {\n if (node.kind === CredentialNodeKind.Custom) {\n usable += 1;\n rows.push({\n item,\n result: CompatibilityResult.Dynamic,\n why: `resolved at open by ${code(node.resolver)}; its result is checked like a static entry`,\n });\n }\n return;\n }\n if (!inference.kinds.includes(kind)) {\n rows.push({\n item,\n result: CompatibilityResult.Unavailable,\n why: `the harness accepts ${inference.kinds.join(', ') || 'no'} credentials; the broker skips this entry`,\n });\n return;\n }\n const vendor = 'vendor' in node ? node.vendor : undefined;\n if (vendor != null && !inference.vendors.includes(vendor)) {\n rows.push({\n item,\n result: CompatibilityResult.Unavailable,\n why: `vendor ${vendor} is not one the harness uses (${inference.vendors.join(', ')}); the broker skips this entry`,\n });\n return;\n }\n usable += 1;\n rows.push({\n item,\n result: CompatibilityResult.Valid,\n why: `${kind} is a kind this harness accepts for ${vendor ?? (inference.vendors.join(', ') || 'its vendors')}, delivered ${inference.delivery}`,\n });\n });\n if (usable === 0) {\n rows.push({\n item: 'credentials',\n result: CompatibilityResult.Invalid,\n why: 'no entry in the chain is usable by this harness',\n });\n }\n return rows;\n};\n\nconst platformRows = (manifest: AgentManifestIface): CompatibilityRowIface[] => {\n const rows: CompatibilityRowIface[] = [];\n const independent = 'platform feature, harness-independent';\n for (const schedule of manifest.schedules) {\n rows.push({\n item: `schedule ${code(schedule.key)}`,\n result: CompatibilityResult.Applies,\n why: `${independent} (${schedule.cron} ${schedule.timezone})`,\n });\n }\n for (const channel of manifest.channels) {\n rows.push({\n item: `channel ${code(channel.key)}`,\n result: CompatibilityResult.Applies,\n why: `${independent} (${formatProviderRef(channel.channel)})`,\n });\n }\n for (const hook of manifest.hooks) {\n rows.push({\n item: `hook ${code(hook.slug)}`,\n result: CompatibilityResult.Applies,\n why: `${independent}; events: ${hook.events.join(', ')}`,\n });\n }\n return rows;\n};\n\nexport const compatibilityReport = (\n args: CompatibilityReportArgsIface,\n): CompatibilityReportIface => {\n const { manifest, description } = args;\n const directoryFiles = args.directoryFiles ?? {\n instructions: directoryFieldFiles(manifest, 'instructions'),\n skills: directoryFieldFiles(manifest, 'skills'),\n };\n const rows = [\n ...configRows({ manifest, description, directoryFiles }),\n ...instructionDeliveryRows(manifest, description),\n ...credentialRows(manifest, description),\n ...mcpRows(manifest, description),\n ...baseToolRows(manifest, description),\n ...Object.keys(manifest.toolPolicy)\n .filter((key) => !key.includes('/') && description.supports.nativeToolPolicy === false)\n .map(\n (key): CompatibilityRowIface => ({\n item: `tool policy ${code(key)}`,\n result: CompatibilityResult.Invalid,\n why: 'the adapter cannot enforce native per-tool policy through its public surface; use its native permission configuration',\n }),\n ),\n ...supportRows(description),\n ...platformRows(manifest),\n ];\n return {\n harness: manifest.harness.harness,\n ok: rows.every((row) => row.result !== CompatibilityResult.Invalid),\n rows,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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AAO;AACjC,SAAK,KAAK;AAAA,MACR,MAAM,QAAQ,KAAK,KAAK,IAAI,CAAC;AAAA,MAC7B,QAAQ;AAAA,MACR,KAAK,GAAG,WAAW,aAAa,KAAK,OAAO,KAAK,IAAI,CAAC;AAAA,IACxD,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEO,MAAM,sBAAsB,CACjC,SAC6B;AAC7B,QAAM,EAAE,UAAU,YAAY,IAAI;AAClC,QAAM,iBAAiB,KAAK,kBAAkB;AAAA,IAC5C,cAAc,oBAAoB,UAAU,cAAc;AAAA,IAC1D,QAAQ,oBAAoB,UAAU,QAAQ;AAAA,EAChD;AACA,QAAM,OAAO;AAAA,IACX,GAAG,WAAW,EAAE,UAAU,aAAa,eAAe,CAAC;AAAA,IACvD,GAAG,wBAAwB,UAAU,WAAW;AAAA,IAChD,GAAG,eAAe,UAAU,WAAW;AAAA,IACvC,GAAG,QAAQ,UAAU,WAAW;AAAA,IAChC,GAAG,aAAa,UAAU,WAAW;AAAA,IACrC,GAAG,OAAO,KAAK,SAAS,UAAU,EAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI,SAAS,GAAG,KAAK,YAAY,SAAS,qBAAqB,KAAK,EACrF;AAAA,MACC,CAAC,SAAgC;AAAA,QAC/B,MAAM,eAAe,KAAK,GAAG,CAAC;AAAA,QAC9B,QAAQ;AAAA,QACR,KAAK;AAAA,MACP;AAAA,IACF;AAAA,IACF,GAAG,YAAY,WAAW;AAAA,IAC1B,GAAG,aAAa,QAAQ;AAAA,EAC1B;AACA,SAAO;AAAA,IACL,SAAS,SAAS,QAAQ;AAAA,IAC1B,IAAI,KAAK,MAAM,CAAC,QAAQ,IAAI,WAAW,uBAA2B;AAAA,IAClE;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["CompatibilityResult", "item"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AgentManifestIface } from '@finalai/agent-provider';
|
|
2
|
+
import type { DescribedBundleIface } from "../runtime/described.mjs";
|
|
3
|
+
import { type DiagnosticIface } from "./diagnostics.mjs";
|
|
4
|
+
import { type DiscoveryIface } from "./discovery.mjs";
|
|
5
|
+
export interface AssembleInputIface {
|
|
6
|
+
installedSandboxProviders?: Readonly<Record<string, string>>;
|
|
7
|
+
files: Record<string, string>;
|
|
8
|
+
discovery: DiscoveryIface;
|
|
9
|
+
described: DescribedBundleIface | null;
|
|
10
|
+
fallbackName: string;
|
|
11
|
+
bundle: {
|
|
12
|
+
hash: string;
|
|
13
|
+
code: string;
|
|
14
|
+
} | null;
|
|
15
|
+
}
|
|
16
|
+
export interface AssembleOutputIface {
|
|
17
|
+
manifest: AgentManifestIface | null;
|
|
18
|
+
modules: Record<string, string>;
|
|
19
|
+
sandboxOpeners: Record<string, string>;
|
|
20
|
+
channelRoutes: Record<string, {
|
|
21
|
+
method: string;
|
|
22
|
+
path: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
directoryFields: {
|
|
25
|
+
instructions: string[];
|
|
26
|
+
skills: string[];
|
|
27
|
+
};
|
|
28
|
+
diagnostics: DiagnosticIface[];
|
|
29
|
+
}
|
|
30
|
+
export declare const assemble: (input: AssembleInputIface) => AssembleOutputIface;
|