antpath 0.10.15 → 0.11.4
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/LICENSE +201 -0
- package/README.md +16 -8
- package/dist/_shared/blueprint.d.ts +93 -108
- package/dist/_shared/blueprint.js +144 -78
- package/dist/_shared/cleanup-policy.d.ts +2 -2
- package/dist/_shared/cleanup-policy.js +2 -5
- package/dist/_shared/http.d.ts +2 -2
- package/dist/_shared/index.d.ts +5 -1
- package/dist/_shared/index.js +5 -1
- package/dist/_shared/mcp-proxy-url.d.ts +55 -0
- package/dist/_shared/mcp-proxy-url.js +65 -0
- package/dist/_shared/operations.d.ts +7 -8
- package/dist/_shared/operations.js +14 -20
- package/dist/_shared/provider-proxy-url.d.ts +64 -0
- package/dist/_shared/provider-proxy-url.js +73 -0
- package/dist/_shared/proxy-validation.d.ts +1 -1
- package/dist/_shared/proxy-validation.js +2 -2
- package/dist/_shared/run-unit.d.ts +23 -36
- package/dist/_shared/run-unit.js +30 -46
- package/dist/_shared/runner-event.d.ts +120 -0
- package/dist/_shared/runner-event.js +193 -0
- package/dist/_shared/runner-job.d.ts +159 -0
- package/dist/_shared/runner-job.js +54 -0
- package/dist/_shared/runtime-manifest.d.ts +191 -0
- package/dist/_shared/runtime-manifest.js +221 -0
- package/dist/_shared/runtime-types.d.ts +7 -16
- package/dist/_shared/stable.d.ts +15 -10
- package/dist/_shared/stable.js +15 -10
- package/dist/_shared/submission.d.ts +221 -73
- package/dist/_shared/submission.js +442 -212
- package/dist/_shared/telemetry.d.ts +2 -2
- package/dist/_shared/telemetry.js +2 -2
- package/dist/_shared/template/index.d.ts +0 -1
- package/dist/_shared/template/index.js +0 -1
- package/dist/agents-md.d.ts +25 -67
- package/dist/agents-md.js +35 -121
- package/dist/agents-md.js.map +1 -1
- package/dist/asset-upload.d.ts +34 -0
- package/dist/asset-upload.js +34 -0
- package/dist/asset-upload.js.map +1 -1
- package/dist/blueprint.d.ts +3 -3
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +1 -1
- package/dist/cli.mjs +191 -100
- package/dist/cli.mjs.sha256 +1 -1
- package/dist/client.d.ts +56 -19
- package/dist/client.js +147 -125
- package/dist/client.js.map +1 -1
- package/dist/file.d.ts +28 -94
- package/dist/file.js +35 -175
- package/dist/file.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts +10 -2
- package/dist/mcp-server.js +17 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/skill.d.ts +44 -214
- package/dist/skill.js +50 -284
- package/dist/skill.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/cleanup.md +1 -1
- package/docs/credentials.md +2 -2
- package/docs/events.md +8 -8
- package/docs/outputs.md +2 -0
- package/docs/quickstart.md +18 -2
- package/docs/skills.md +1 -3
- package/docs/templates.md +6 -5
- package/package.json +3 -2
- package/dist/_shared/secrets.d.ts +0 -7
- package/dist/_shared/secrets.js +0 -20
- package/dist/_shared/template/mapper.d.ts +0 -11
- package/dist/_shared/template/mapper.js +0 -70
package/dist/_shared/secrets.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const REDACTED = "[secret]";
|
|
2
|
-
export function redactedSecret(value) {
|
|
3
|
-
if (value.length === 0) {
|
|
4
|
-
throw new Error("Secret value must not be empty");
|
|
5
|
-
}
|
|
6
|
-
return Object.freeze({
|
|
7
|
-
expose: () => value,
|
|
8
|
-
toJSON: () => REDACTED,
|
|
9
|
-
toString: () => REDACTED
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
export function redactKnownSecrets(input, secrets) {
|
|
13
|
-
let output = input;
|
|
14
|
-
const longestFirst = [...secrets].sort((a, b) => b.expose().length - a.expose().length);
|
|
15
|
-
for (const secret of longestFirst) {
|
|
16
|
-
output = output.split(secret.expose()).join(REDACTED);
|
|
17
|
-
}
|
|
18
|
-
return output;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=secrets.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PlatformTemplateSubmission } from "../submission.js";
|
|
2
|
-
import type { ResolvedTemplate } from "./compiler.js";
|
|
3
|
-
/**
|
|
4
|
-
* Convert a SDK-compiled ResolvedTemplate into the strict
|
|
5
|
-
* PlatformTemplateSubmission shape the BFF parser requires.
|
|
6
|
-
*
|
|
7
|
-
* The mapper is the SINGLE source of truth for the SDK<->BFF template
|
|
8
|
-
* shape contract. Both the AntpathClient class and the CLI's `run`
|
|
9
|
-
* subcommand call this so they cannot drift.
|
|
10
|
-
*/
|
|
11
|
-
export declare function toPlatformSubmissionTemplate(resolved: ResolvedTemplate): PlatformTemplateSubmission;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a SDK-compiled ResolvedTemplate into the strict
|
|
3
|
-
* PlatformTemplateSubmission shape the BFF parser requires.
|
|
4
|
-
*
|
|
5
|
-
* The mapper is the SINGLE source of truth for the SDK<->BFF template
|
|
6
|
-
* shape contract. Both the AntpathClient class and the CLI's `run`
|
|
7
|
-
* subcommand call this so they cannot drift.
|
|
8
|
-
*/
|
|
9
|
-
export function toPlatformSubmissionTemplate(resolved) {
|
|
10
|
-
const modelId = typeof resolved.model === "string" ? resolved.model : resolved.model.id;
|
|
11
|
-
const environment = mapEnvironment(resolved.environment);
|
|
12
|
-
const metadata = filterMetadata(resolved.metadata);
|
|
13
|
-
const submission = {
|
|
14
|
-
name: resolved.name,
|
|
15
|
-
model: modelId,
|
|
16
|
-
templateHash: resolved.hash,
|
|
17
|
-
messages: resolved.messages
|
|
18
|
-
};
|
|
19
|
-
return {
|
|
20
|
-
...submission,
|
|
21
|
-
...(resolved.system ? { system: resolved.system } : {}),
|
|
22
|
-
...(metadata ? { metadata } : {}),
|
|
23
|
-
...(environment ? { environment } : {})
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function mapEnvironment(env) {
|
|
27
|
-
if (!env)
|
|
28
|
-
return undefined;
|
|
29
|
-
let networking;
|
|
30
|
-
if (env.network) {
|
|
31
|
-
if (env.network === "restricted") {
|
|
32
|
-
networking = { mode: "limited", allowedHosts: [] };
|
|
33
|
-
}
|
|
34
|
-
else if (env.network === "unrestricted") {
|
|
35
|
-
networking = { mode: "open" };
|
|
36
|
-
}
|
|
37
|
-
else if (typeof env.network === "object" && env.network.type === "limited") {
|
|
38
|
-
const allowedHosts = env.network.allowedHosts ?? [];
|
|
39
|
-
networking = { mode: "limited", allowedHosts };
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
let packages;
|
|
43
|
-
if (env.packages) {
|
|
44
|
-
const collected = [];
|
|
45
|
-
for (const [manager, list] of Object.entries(env.packages)) {
|
|
46
|
-
if (!list)
|
|
47
|
-
continue;
|
|
48
|
-
for (const item of list) {
|
|
49
|
-
collected.push({ name: `${manager}:${item}` });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (collected.length > 0)
|
|
53
|
-
packages = collected;
|
|
54
|
-
}
|
|
55
|
-
if (!networking && !packages)
|
|
56
|
-
return undefined;
|
|
57
|
-
return {
|
|
58
|
-
...(networking ? { networking } : {}),
|
|
59
|
-
...(packages ? { packages } : {})
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function filterMetadata(metadata) {
|
|
63
|
-
if (!metadata)
|
|
64
|
-
return undefined;
|
|
65
|
-
const entries = Object.entries(metadata);
|
|
66
|
-
if (entries.length === 0)
|
|
67
|
-
return undefined;
|
|
68
|
-
return Object.fromEntries(entries);
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=mapper.js.map
|