@agents24/cli 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.
- package/LICENSE +21 -0
- package/README.md +33 -0
- package/compatibility.json +54 -0
- package/dist/chunk-I2XQSX32.js +435 -0
- package/dist/chunk-I2XQSX32.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +173 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/generated/schemas/resource-package/1.0/agent.schema.json +134 -0
- package/generated/schemas/resource-package/1.0/manifest.schema.json +154 -0
- package/generated/schemas/resource-package/1.0/rag.schema.json +96 -0
- package/generated/schemas/resource-package/1.0/skill.schema.json +30 -0
- package/generated/schemas/resource-package/1.0/workflow.schema.json +126 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Talmudpedia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `@agents24/cli`
|
|
2
|
+
|
|
3
|
+
Last Updated: 2026-07-19
|
|
4
|
+
|
|
5
|
+
Command-line tooling for editable `agents24.resource_package` source packages.
|
|
6
|
+
|
|
7
|
+
Requires Node.js 22 or newer.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
agents24 package init ./customer-service --name "Customer Service"
|
|
11
|
+
agents24 package validate ./customer-service
|
|
12
|
+
agents24 package pack ./customer-service
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`init`, `validate`, and `pack` work offline. Add `--remote` to `validate` for canonical platform graph/operator validation.
|
|
16
|
+
|
|
17
|
+
Remote commands use the canonical `@agents24/node` client and require:
|
|
18
|
+
|
|
19
|
+
- `AGENTS24_BASE_URL`
|
|
20
|
+
- `AGENTS24_API_KEY`
|
|
21
|
+
- `AGENTS24_ORGANIZATION_ID`
|
|
22
|
+
- `AGENTS24_PROJECT_ID`
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
agents24 package export --kind agent --id <id> --target draft
|
|
26
|
+
agents24 package compile customer-service.agents24.zip --output bundle.json
|
|
27
|
+
agents24 package preview customer-service.agents24.zip --map '$models.primary=<model-id>'
|
|
28
|
+
agents24 package import customer-service.agents24.zip --map '$models.primary=<model-id>' --allow-incomplete --yes
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`export`, `compile`, `preview`, and `import` are remote commands. Every command supports `--json`; `--map` remains repeatable. Exact JSON bundle commands may select dependencies, while source export and source import always use the complete reachable local graph. Mapping suggestions are never accepted automatically. Incomplete external requirements require `--allow-incomplete`, and a non-interactive import also requires `--yes`.
|
|
32
|
+
|
|
33
|
+
The canonical source tree is `agents24.yaml`, `workflows/*.yaml`, `agents/*.md`, `rag/*.yaml`, `skills/*.md`, and optional `files/*.md`. It uses relative local references, external `$namespace.slug` requirements, and `[[skill:<slug>]]` inline Instruction mentions. `pack` writes stable ZIP order and metadata. See the [resource movement guide](https://docs.agents24.dev/guides/move-resource-bundles) and [manifest schema](https://docs.agents24.dev/schemas/resource-package/1.0/manifest.schema.json).
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractHash": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
|
|
3
|
+
"contractVersion": "0.2.0",
|
|
4
|
+
"corpus": "conformance/v1/corpus.json",
|
|
5
|
+
"generatedBy": "@agents24/sdk-contract",
|
|
6
|
+
"packages": {
|
|
7
|
+
"@agents24/ai-sdk": {
|
|
8
|
+
"ai": ">=7 <8",
|
|
9
|
+
"aiSdkReact": ">=4 <5",
|
|
10
|
+
"peer": "@agents24/client"
|
|
11
|
+
},
|
|
12
|
+
"@agents24/chat-react": {
|
|
13
|
+
"peer": "@agents24/react",
|
|
14
|
+
"react": ">=19 <20",
|
|
15
|
+
"reactDom": ">=19 <20"
|
|
16
|
+
},
|
|
17
|
+
"@agents24/client": {
|
|
18
|
+
"contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
|
|
19
|
+
"runtime": "run-stream.v2"
|
|
20
|
+
},
|
|
21
|
+
"@agents24/node": {
|
|
22
|
+
"contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
|
|
23
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
24
|
+
},
|
|
25
|
+
"@agents24/react": {
|
|
26
|
+
"peer": "@agents24/client",
|
|
27
|
+
"react": ">=19 <20"
|
|
28
|
+
},
|
|
29
|
+
"@talmudpedia/runtime-sdk": {
|
|
30
|
+
"contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
|
|
31
|
+
"protocolOwner": "@agents24/client"
|
|
32
|
+
},
|
|
33
|
+
"agents24": {
|
|
34
|
+
"contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
|
|
35
|
+
"python": ">=3.10"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"protocols": {
|
|
39
|
+
"runtime": {
|
|
40
|
+
"minimum": "2.0.0",
|
|
41
|
+
"wire": "run-stream.v2"
|
|
42
|
+
},
|
|
43
|
+
"threadSummary": {
|
|
44
|
+
"minimum": "1.0.0",
|
|
45
|
+
"wire": "agents24.thread_summary_event.v1"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"schemaVersion": "agents24.compatibility.v1",
|
|
49
|
+
"targetOperationCounts": {
|
|
50
|
+
"client": 19,
|
|
51
|
+
"node": 60,
|
|
52
|
+
"python": 55
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/archive.ts
|
|
4
|
+
import { inflateRawSync, deflateRawSync } from "zlib";
|
|
5
|
+
var MAX_COMPRESSED = 5 * 1024 * 1024;
|
|
6
|
+
var MAX_UNCOMPRESSED = 10 * 1024 * 1024;
|
|
7
|
+
var MAX_FILE = 2 * 1024 * 1024;
|
|
8
|
+
var MAX_FILES = 512;
|
|
9
|
+
var MAX_DEPTH = 12;
|
|
10
|
+
var CRC_TABLE = Array.from({ length: 256 }, (_, start) => {
|
|
11
|
+
let value = start;
|
|
12
|
+
for (let bit = 0; bit < 8; bit += 1) {
|
|
13
|
+
value = value & 1 ? 3988292384 ^ value >>> 1 : value >>> 1;
|
|
14
|
+
}
|
|
15
|
+
return value >>> 0;
|
|
16
|
+
});
|
|
17
|
+
function crc32(value) {
|
|
18
|
+
let crc = 4294967295;
|
|
19
|
+
for (const byte of value) crc = CRC_TABLE[(crc ^ byte) & 255] ^ crc >>> 8;
|
|
20
|
+
return (crc ^ 4294967295) >>> 0;
|
|
21
|
+
}
|
|
22
|
+
function safePath(raw) {
|
|
23
|
+
if (!raw || raw.startsWith("/") || raw.includes("\\")) throw new Error("Archive contains an unsafe path");
|
|
24
|
+
const parts = raw.split("/");
|
|
25
|
+
if (parts.some((part) => !part || part === "." || part === "..")) throw new Error("Archive contains an unsafe path");
|
|
26
|
+
if (parts.length > MAX_DEPTH) throw new Error(`Archive path exceeds depth ${MAX_DEPTH}: ${raw}`);
|
|
27
|
+
if (/\.(?:zip|tar|tgz|gz)$/i.test(raw)) throw new Error(`Nested archives are unsupported: ${raw}`);
|
|
28
|
+
if (!/\.(?:yaml|md)$/.test(raw) || raw.endsWith(".yml")) throw new Error(`Unsupported package file: ${raw}`);
|
|
29
|
+
return raw;
|
|
30
|
+
}
|
|
31
|
+
function writeUInt32(value) {
|
|
32
|
+
const result = Buffer.allocUnsafe(4);
|
|
33
|
+
result.writeUInt32LE(value >>> 0);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
function writeUInt16(value) {
|
|
37
|
+
const result = Buffer.allocUnsafe(2);
|
|
38
|
+
result.writeUInt16LE(value);
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
function packFiles(files) {
|
|
42
|
+
if (files.size > MAX_FILES) throw new Error("Package exceeds the 512-file limit");
|
|
43
|
+
const localParts = [];
|
|
44
|
+
const centralParts = [];
|
|
45
|
+
let offset = 0;
|
|
46
|
+
let total = 0;
|
|
47
|
+
const normalized = /* @__PURE__ */ new Set();
|
|
48
|
+
for (const [rawPath, text] of [...files.entries()].sort(([left], [right]) => left.localeCompare(right))) {
|
|
49
|
+
const path2 = safePath(rawPath);
|
|
50
|
+
const folded = path2.toLocaleLowerCase("en-US");
|
|
51
|
+
if (normalized.has(folded)) throw new Error(`Package contains duplicate path: ${path2}`);
|
|
52
|
+
normalized.add(folded);
|
|
53
|
+
const name = Buffer.from(path2, "utf8");
|
|
54
|
+
const content = Buffer.from(text, "utf8");
|
|
55
|
+
if (content.byteLength > MAX_FILE) throw new Error(`Package file exceeds the 2 MiB limit: ${path2}`);
|
|
56
|
+
total += content.byteLength;
|
|
57
|
+
if (total > MAX_UNCOMPRESSED) throw new Error("Package exceeds the 10 MiB uncompressed limit");
|
|
58
|
+
const compressed = deflateRawSync(content, { level: 9 });
|
|
59
|
+
const checksum = crc32(content);
|
|
60
|
+
const local = Buffer.concat([
|
|
61
|
+
writeUInt32(67324752),
|
|
62
|
+
writeUInt16(20),
|
|
63
|
+
writeUInt16(2048),
|
|
64
|
+
writeUInt16(8),
|
|
65
|
+
writeUInt16(0),
|
|
66
|
+
writeUInt16(33),
|
|
67
|
+
writeUInt32(checksum),
|
|
68
|
+
writeUInt32(compressed.byteLength),
|
|
69
|
+
writeUInt32(content.byteLength),
|
|
70
|
+
writeUInt16(name.byteLength),
|
|
71
|
+
writeUInt16(0),
|
|
72
|
+
name,
|
|
73
|
+
compressed
|
|
74
|
+
]);
|
|
75
|
+
localParts.push(local);
|
|
76
|
+
centralParts.push(Buffer.concat([
|
|
77
|
+
writeUInt32(33639248),
|
|
78
|
+
writeUInt16(788),
|
|
79
|
+
writeUInt16(20),
|
|
80
|
+
writeUInt16(2048),
|
|
81
|
+
writeUInt16(8),
|
|
82
|
+
writeUInt16(0),
|
|
83
|
+
writeUInt16(33),
|
|
84
|
+
writeUInt32(checksum),
|
|
85
|
+
writeUInt32(compressed.byteLength),
|
|
86
|
+
writeUInt32(content.byteLength),
|
|
87
|
+
writeUInt16(name.byteLength),
|
|
88
|
+
writeUInt16(0),
|
|
89
|
+
writeUInt16(0),
|
|
90
|
+
writeUInt16(0),
|
|
91
|
+
writeUInt16(0),
|
|
92
|
+
writeUInt32(33188 << 16),
|
|
93
|
+
writeUInt32(offset),
|
|
94
|
+
name
|
|
95
|
+
]));
|
|
96
|
+
offset += local.byteLength;
|
|
97
|
+
}
|
|
98
|
+
const central = Buffer.concat(centralParts);
|
|
99
|
+
const result = Buffer.concat([
|
|
100
|
+
...localParts,
|
|
101
|
+
central,
|
|
102
|
+
writeUInt32(101010256),
|
|
103
|
+
writeUInt16(0),
|
|
104
|
+
writeUInt16(0),
|
|
105
|
+
writeUInt16(files.size),
|
|
106
|
+
writeUInt16(files.size),
|
|
107
|
+
writeUInt32(central.byteLength),
|
|
108
|
+
writeUInt32(offset),
|
|
109
|
+
writeUInt16(0)
|
|
110
|
+
]);
|
|
111
|
+
if (result.byteLength > MAX_COMPRESSED) throw new Error("Package exceeds the 5 MiB compressed limit");
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
function endOfCentralDirectory(data) {
|
|
115
|
+
const minimum = Math.max(0, data.byteLength - 65557);
|
|
116
|
+
for (let index = data.byteLength - 22; index >= minimum; index -= 1) {
|
|
117
|
+
if (data.readUInt32LE(index) === 101010256) return index;
|
|
118
|
+
}
|
|
119
|
+
throw new Error("Package must be a valid ZIP archive");
|
|
120
|
+
}
|
|
121
|
+
function unpackFiles(value) {
|
|
122
|
+
const data = Buffer.from(value);
|
|
123
|
+
if (data.byteLength > MAX_COMPRESSED) throw new Error("Package exceeds the 5 MiB compressed limit");
|
|
124
|
+
const end = endOfCentralDirectory(data);
|
|
125
|
+
const count = data.readUInt16LE(end + 10);
|
|
126
|
+
const centralOffset = data.readUInt32LE(end + 16);
|
|
127
|
+
if (count > MAX_FILES) throw new Error("Package exceeds the 512-file limit");
|
|
128
|
+
const files = /* @__PURE__ */ new Map();
|
|
129
|
+
const normalized = /* @__PURE__ */ new Set();
|
|
130
|
+
let cursor = centralOffset;
|
|
131
|
+
let total = 0;
|
|
132
|
+
for (let index = 0; index < count; index += 1) {
|
|
133
|
+
if (data.readUInt32LE(cursor) !== 33639248) throw new Error("Package central directory is invalid");
|
|
134
|
+
const method = data.readUInt16LE(cursor + 10);
|
|
135
|
+
const expectedCrc = data.readUInt32LE(cursor + 16);
|
|
136
|
+
const compressedSize = data.readUInt32LE(cursor + 20);
|
|
137
|
+
const uncompressedSize = data.readUInt32LE(cursor + 24);
|
|
138
|
+
const nameLength = data.readUInt16LE(cursor + 28);
|
|
139
|
+
const extraLength = data.readUInt16LE(cursor + 30);
|
|
140
|
+
const commentLength = data.readUInt16LE(cursor + 32);
|
|
141
|
+
const externalAttributes = data.readUInt32LE(cursor + 38);
|
|
142
|
+
const localOffset = data.readUInt32LE(cursor + 42);
|
|
143
|
+
const path2 = safePath(data.subarray(cursor + 46, cursor + 46 + nameLength).toString("utf8"));
|
|
144
|
+
if ((externalAttributes >>> 16 & 61440) === 40960) throw new Error(`Package symlinks are unsupported: ${path2}`);
|
|
145
|
+
const folded = path2.toLocaleLowerCase("en-US");
|
|
146
|
+
if (normalized.has(folded)) throw new Error(`Package contains duplicate path: ${path2}`);
|
|
147
|
+
normalized.add(folded);
|
|
148
|
+
if (uncompressedSize > MAX_FILE) throw new Error(`Package file exceeds the 2 MiB limit: ${path2}`);
|
|
149
|
+
total += uncompressedSize;
|
|
150
|
+
if (total > MAX_UNCOMPRESSED) throw new Error("Package exceeds the 10 MiB uncompressed limit");
|
|
151
|
+
if (data.readUInt32LE(localOffset) !== 67324752) throw new Error("Package local header is invalid");
|
|
152
|
+
const localNameLength = data.readUInt16LE(localOffset + 26);
|
|
153
|
+
const localExtraLength = data.readUInt16LE(localOffset + 28);
|
|
154
|
+
const contentOffset = localOffset + 30 + localNameLength + localExtraLength;
|
|
155
|
+
const compressed = data.subarray(contentOffset, contentOffset + compressedSize);
|
|
156
|
+
let content = null;
|
|
157
|
+
try {
|
|
158
|
+
content = method === 8 ? inflateRawSync(compressed, { maxOutputLength: Math.min(MAX_FILE, uncompressedSize) + 1 }) : method === 0 ? compressed : null;
|
|
159
|
+
} catch {
|
|
160
|
+
throw new Error(`Package file is invalid or exceeds its declared size: ${path2}`);
|
|
161
|
+
}
|
|
162
|
+
if (!content || content.byteLength !== uncompressedSize || crc32(content) !== expectedCrc) {
|
|
163
|
+
throw new Error(`Package file is invalid: ${path2}`);
|
|
164
|
+
}
|
|
165
|
+
if (content.includes(0)) throw new Error(`Binary package file is unsupported: ${path2}`);
|
|
166
|
+
files.set(path2, new TextDecoder("utf-8", { fatal: true }).decode(content));
|
|
167
|
+
cursor += 46 + nameLength + extraLength + commentLength;
|
|
168
|
+
}
|
|
169
|
+
if (!files.has("agents24.yaml")) throw new Error("Package requires agents24.yaml at the archive root");
|
|
170
|
+
return files;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// src/package-source.ts
|
|
174
|
+
import { lstat, mkdir, readFile, readdir, stat, writeFile } from "fs/promises";
|
|
175
|
+
import { readFileSync as readSync } from "fs";
|
|
176
|
+
import path from "path";
|
|
177
|
+
import { fileURLToPath } from "url";
|
|
178
|
+
import Ajv2020 from "ajv/dist/2020.js";
|
|
179
|
+
import { parseDocument } from "yaml";
|
|
180
|
+
var MANIFEST = "agents24.yaml";
|
|
181
|
+
var SYMBOL = /^\$(workflows|rag|skills|models|stores|tools|toolsets|artifacts|integrations|secrets)\.([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
|
182
|
+
var UUID = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i;
|
|
183
|
+
var URL_PATTERN = /\b[A-Za-z][A-Za-z0-9+.-]*:\/\//;
|
|
184
|
+
var LOCAL = /^(workflows|agents|rag|skills|files)\/(?:[a-z0-9][a-z0-9-]*\/)*[a-z0-9][a-z0-9-]*\.(yaml|md)$/;
|
|
185
|
+
var SECRET_FIELDS = /* @__PURE__ */ new Set(["access_token", "api_key", "authorization", "bearer_token", "client_secret", "credential", "credentials", "fixed_account_connection_id", "oauth_client_id", "oauth_client_secret", "password", "private_key", "refresh_token", "secret_name", "secret_value", "static_bearer_token", "static_headers", "token", "url", "account_id", "organization_id", "project_id", "publication_state", "governance_policy"]);
|
|
186
|
+
function add(rows, severity, code, itemPath, message) {
|
|
187
|
+
rows.push({ severity, code, path: itemPath, message });
|
|
188
|
+
}
|
|
189
|
+
function slug(value) {
|
|
190
|
+
return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64) || "agent";
|
|
191
|
+
}
|
|
192
|
+
function parseYaml(text, itemPath, diagnostics) {
|
|
193
|
+
const doc = parseDocument(text, { uniqueKeys: true });
|
|
194
|
+
for (const error of doc.errors) add(diagnostics, "error", "YAML_INVALID", itemPath, error.message);
|
|
195
|
+
if (doc.errors.length) return {};
|
|
196
|
+
const value = doc.toJS({ maxAliasCount: 0 });
|
|
197
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
198
|
+
add(diagnostics, "error", "YAML_INVALID", itemPath, "YAML source must contain a mapping");
|
|
199
|
+
return {};
|
|
200
|
+
}
|
|
201
|
+
return value;
|
|
202
|
+
}
|
|
203
|
+
function frontmatter(text, itemPath, diagnostics) {
|
|
204
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);
|
|
205
|
+
if (!match) {
|
|
206
|
+
add(diagnostics, "error", "FRONTMATTER_REQUIRED", itemPath, "Markdown source requires YAML frontmatter");
|
|
207
|
+
return {};
|
|
208
|
+
}
|
|
209
|
+
return parseYaml(match[1], itemPath, diagnostics);
|
|
210
|
+
}
|
|
211
|
+
function markdownBody(text) {
|
|
212
|
+
const match = /^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)([\s\S]*)$/.exec(text);
|
|
213
|
+
return match?.[1] || "";
|
|
214
|
+
}
|
|
215
|
+
function schema(name) {
|
|
216
|
+
const location = new URL(`../generated/schemas/resource-package/1.0/${name}.schema.json`, import.meta.url);
|
|
217
|
+
return JSON.parse(readSync(fileURLToPath(location), "utf8"));
|
|
218
|
+
}
|
|
219
|
+
var AjvConstructor = Ajv2020;
|
|
220
|
+
var ajv = new AjvConstructor({ allErrors: true, strict: true, strictRequired: false });
|
|
221
|
+
var validators = Object.fromEntries(["manifest", "workflow", "agent", "rag", "skill"].map((name) => [name, ajv.compile(schema(name))]));
|
|
222
|
+
async function directoryFiles(root) {
|
|
223
|
+
const files = /* @__PURE__ */ new Map();
|
|
224
|
+
let total = 0;
|
|
225
|
+
async function visit(directory) {
|
|
226
|
+
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
227
|
+
const absolute = path.join(directory, entry.name);
|
|
228
|
+
const relative = path.relative(root, absolute).split(path.sep).join("/");
|
|
229
|
+
const metadata = await lstat(absolute);
|
|
230
|
+
if (metadata.isSymbolicLink()) throw new Error(`Package symlinks are unsupported: ${relative}`);
|
|
231
|
+
if (metadata.isDirectory()) {
|
|
232
|
+
await visit(absolute);
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
if (!metadata.isFile()) continue;
|
|
236
|
+
if (relative.split("/").length > 12) throw new Error(`Package path exceeds depth 12: ${relative}`);
|
|
237
|
+
if (!/\.(?:yaml|md)$/.test(relative) || relative.endsWith(".yml")) throw new Error(`Unsupported package file: ${relative}`);
|
|
238
|
+
if (metadata.size > 2 * 1024 * 1024) throw new Error(`Package file exceeds the 2 MiB limit: ${relative}`);
|
|
239
|
+
total += metadata.size;
|
|
240
|
+
if (total > 10 * 1024 * 1024) throw new Error("Package exceeds the 10 MiB uncompressed limit");
|
|
241
|
+
const body = await readFile(absolute);
|
|
242
|
+
if (body.includes(0)) throw new Error(`Binary package file is unsupported: ${relative}`);
|
|
243
|
+
files.set(relative, new TextDecoder("utf-8", { fatal: true }).decode(body));
|
|
244
|
+
if (files.size > 512) throw new Error("Package exceeds the 512-file limit");
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
await visit(root);
|
|
248
|
+
return files;
|
|
249
|
+
}
|
|
250
|
+
async function loadPackageFiles(input) {
|
|
251
|
+
return (await stat(input)).isDirectory() ? directoryFiles(input) : unpackFiles(await readFile(input));
|
|
252
|
+
}
|
|
253
|
+
function validateSchema(kind, value, itemPath, diagnostics) {
|
|
254
|
+
const validate = validators[kind];
|
|
255
|
+
if (validate(value)) return;
|
|
256
|
+
for (const error of validate.errors || []) add(diagnostics, "error", "SCHEMA_INVALID", itemPath + (error.instancePath || ""), error.message || "Schema validation failed");
|
|
257
|
+
}
|
|
258
|
+
function resolve(source, target) {
|
|
259
|
+
if (!target || target.startsWith("/") || target.includes("\\")) return null;
|
|
260
|
+
const value = path.posix.normalize(path.posix.join(path.posix.dirname(source), target));
|
|
261
|
+
return value === ".." || value.startsWith("../") || !LOCAL.test(value) ? null : value;
|
|
262
|
+
}
|
|
263
|
+
function walk(value, visit, itemPath = "", key) {
|
|
264
|
+
visit(value, itemPath, key);
|
|
265
|
+
if (Array.isArray(value)) value.forEach((item, index) => walk(item, visit, `${itemPath}/${index}`, key));
|
|
266
|
+
else if (value && typeof value === "object") for (const [key2, item] of Object.entries(value)) {
|
|
267
|
+
walk(item, visit, `${itemPath}/${key2}`, key2);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function validateFiles(files) {
|
|
271
|
+
const diagnostics = [];
|
|
272
|
+
const manifest = parseYaml(files.get(MANIFEST) || "", MANIFEST, diagnostics);
|
|
273
|
+
validateSchema("manifest", manifest, MANIFEST, diagnostics);
|
|
274
|
+
walk(manifest, (item, itemPath, key) => {
|
|
275
|
+
if (key && SECRET_FIELDS.has(key.toLowerCase())) add(diagnostics, "error", "FORBIDDEN_FIELD", MANIFEST + itemPath, "Secret and platform identity fields are forbidden");
|
|
276
|
+
if (typeof item === "string" && (UUID.test(item) || URL_PATTERN.test(item))) add(diagnostics, "error", "FORBIDDEN_VALUE", MANIFEST + itemPath, "Platform UUIDs and URLs are forbidden in source packages");
|
|
277
|
+
});
|
|
278
|
+
const parsed = /* @__PURE__ */ new Map();
|
|
279
|
+
const resources = [];
|
|
280
|
+
for (const [filePath, text] of [...files].sort(([left], [right]) => left.localeCompare(right))) {
|
|
281
|
+
if (filePath === MANIFEST) continue;
|
|
282
|
+
let kind = null;
|
|
283
|
+
if (/^workflows\/[a-z0-9][a-z0-9-]*\.yaml$/.test(filePath)) kind = "workflow";
|
|
284
|
+
else if (/^agents\/[a-z0-9][a-z0-9-]*\.md$/.test(filePath)) kind = "agent";
|
|
285
|
+
else if (/^rag\/[a-z0-9][a-z0-9-]*\.yaml$/.test(filePath)) kind = "rag";
|
|
286
|
+
else if (/^skills\/[a-z0-9][a-z0-9-]*\.md$/.test(filePath)) kind = "skill";
|
|
287
|
+
else if (/^files\/.+\.md$/.test(filePath)) {
|
|
288
|
+
parsed.set(filePath, {});
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (!kind) {
|
|
292
|
+
add(diagnostics, "error", "UNKNOWN_FILE", filePath, "File is not in a canonical package directory");
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
const value = kind === "workflow" || kind === "rag" ? parseYaml(text, filePath, diagnostics) : frontmatter(text, filePath, diagnostics);
|
|
296
|
+
validateSchema(kind, value, filePath, diagnostics);
|
|
297
|
+
if ((kind === "agent" || kind === "skill") && (UUID.test(markdownBody(text).trim()) || URL_PATTERN.test(markdownBody(text).trim()))) {
|
|
298
|
+
add(diagnostics, "error", "FORBIDDEN_VALUE", `${filePath}/body`, "Platform UUIDs and URLs are forbidden in source packages");
|
|
299
|
+
}
|
|
300
|
+
parsed.set(filePath, value);
|
|
301
|
+
if (kind !== "agent") resources.push({ path: filePath, kind: kind === "workflow" ? "agent" : kind === "rag" ? "rag_pipeline" : "instruction", name: value.name });
|
|
302
|
+
}
|
|
303
|
+
const entrypoint = String(manifest.entrypoint || "");
|
|
304
|
+
if (!parsed.has(entrypoint) || entrypoint.startsWith("agents/") || entrypoint.startsWith("files/")) add(diagnostics, "error", "ENTRYPOINT_INVALID", MANIFEST, "Entrypoint must reference a Workflow, RAG pipeline, or Skill");
|
|
305
|
+
const reachable = /* @__PURE__ */ new Set();
|
|
306
|
+
const queue = entrypoint ? [entrypoint] : [];
|
|
307
|
+
let referenceCount = 0;
|
|
308
|
+
while (queue.length) {
|
|
309
|
+
const source = queue.shift();
|
|
310
|
+
if (reachable.has(source)) continue;
|
|
311
|
+
reachable.add(source);
|
|
312
|
+
const value = parsed.get(source) || {};
|
|
313
|
+
if (source.startsWith("agents/")) {
|
|
314
|
+
for (const match of (files.get(source) || "").matchAll(/\[\[skill:([a-z0-9]+(?:-[a-z0-9]+)*)\]\]/g)) {
|
|
315
|
+
referenceCount += 1;
|
|
316
|
+
const target = `skills/${match[1]}.md`;
|
|
317
|
+
if (!parsed.has(target)) add(diagnostics, "error", "LOCAL_REFERENCE_MISSING", `${source}/body`, `Missing local reference: ${target}`);
|
|
318
|
+
else queue.push(target);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
walk(value, (item, itemPath, key) => {
|
|
322
|
+
if (key && SECRET_FIELDS.has(key.toLowerCase())) add(diagnostics, "error", "FORBIDDEN_FIELD", source + itemPath, "Secret and platform identity fields are forbidden");
|
|
323
|
+
if (typeof item !== "string") return;
|
|
324
|
+
if (UUID.test(item) || URL_PATTERN.test(item)) add(diagnostics, "error", "FORBIDDEN_VALUE", source + itemPath, "Platform UUIDs and URLs are forbidden in source packages");
|
|
325
|
+
const symbol = SYMBOL.exec(item);
|
|
326
|
+
if (symbol) {
|
|
327
|
+
referenceCount += 1;
|
|
328
|
+
const declarations = manifest.requires?.[symbol[1]];
|
|
329
|
+
if (!declarations || !(symbol[2] in declarations)) add(diagnostics, "error", "REQUIREMENT_UNDECLARED", source + itemPath, `${item} is not declared`);
|
|
330
|
+
}
|
|
331
|
+
if (!["uses", "skills", "instructions", "file"].includes(String(key))) return;
|
|
332
|
+
const target = resolve(source, item);
|
|
333
|
+
if (target) {
|
|
334
|
+
referenceCount += 1;
|
|
335
|
+
if (!parsed.has(target)) add(diagnostics, "error", "LOCAL_REFERENCE_MISSING", source + itemPath, `Missing local reference: ${target}`);
|
|
336
|
+
else queue.push(target);
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
for (const filePath of parsed.keys()) if (!reachable.has(filePath)) add(diagnostics, "error", "UNREACHABLE_RESOURCE", filePath, "Local source is not reachable from the entrypoint");
|
|
341
|
+
if (resources.length > 250) add(diagnostics, "error", "RESOURCE_LIMIT", MANIFEST, "Package exceeds 250 resources");
|
|
342
|
+
if (referenceCount > 5e3) add(diagnostics, "error", "REFERENCE_LIMIT", MANIFEST, "Package exceeds 5,000 references");
|
|
343
|
+
diagnostics.sort((left, right) => left.path.localeCompare(right.path) || left.code.localeCompare(right.code) || left.message.localeCompare(right.message));
|
|
344
|
+
const requirements = [...new Set([...files.values()].flatMap((text) => [...text.matchAll(/\$(?:workflows|rag|skills|models|stores|tools|toolsets|artifacts|integrations|secrets)\.[a-z0-9-]+/g)].map((match) => match[0])))].sort();
|
|
345
|
+
return { valid: !diagnostics.some((item) => item.severity === "error"), package: manifest, resources, requirements, diagnostics, files };
|
|
346
|
+
}
|
|
347
|
+
async function validatePackage(input) {
|
|
348
|
+
return validateFiles(await loadPackageFiles(input));
|
|
349
|
+
}
|
|
350
|
+
async function packPackage(input) {
|
|
351
|
+
const result = await validatePackage(input);
|
|
352
|
+
if (!result.valid) throw Object.assign(new Error("Resource package is invalid"), { diagnostics: result.diagnostics });
|
|
353
|
+
return packFiles(result.files);
|
|
354
|
+
}
|
|
355
|
+
async function initializePackage(directory, packageName) {
|
|
356
|
+
const packageSlug = slug(packageName);
|
|
357
|
+
await mkdir(path.join(directory, "workflows"), { recursive: true });
|
|
358
|
+
await mkdir(path.join(directory, "agents"), { recursive: true });
|
|
359
|
+
await mkdir(path.join(directory, "rag"), { recursive: true });
|
|
360
|
+
await mkdir(path.join(directory, "skills"), { recursive: true });
|
|
361
|
+
await mkdir(path.join(directory, "files"), { recursive: true });
|
|
362
|
+
const manifest = { schema: "agents24.package/v1", name: packageSlug, description: `${packageName} agent package`, entrypoint: "workflows/main.yaml", requires: { models: { primary: { required: true } } } };
|
|
363
|
+
const workflow = { schema: "agents24.workflow/v1", name: packageName, description: "", inputs: { text: "string" }, outputs: { response: "string" }, entry: "assistant", nodes: { assistant: { uses: "../agents/assistant.md" } }, flow: [{ from: "assistant.output", to: "output.response" }] };
|
|
364
|
+
const agent = `---
|
|
365
|
+
schema: agents24.agent/v1
|
|
366
|
+
name: Assistant
|
|
367
|
+
description: Primary assistant
|
|
368
|
+
model: $models.primary
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
You are a helpful assistant.
|
|
372
|
+
`;
|
|
373
|
+
await writeFile(path.join(directory, MANIFEST), _yaml(manifest), { flag: "wx" });
|
|
374
|
+
await writeFile(path.join(directory, "workflows/main.yaml"), _yaml(workflow), { flag: "wx" });
|
|
375
|
+
await writeFile(path.join(directory, "agents/assistant.md"), agent, { flag: "wx" });
|
|
376
|
+
return packageSlug;
|
|
377
|
+
}
|
|
378
|
+
function _yaml(value) {
|
|
379
|
+
const doc = parseDocument("{}");
|
|
380
|
+
doc.contents = doc.createNode(value);
|
|
381
|
+
return String(doc);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// src/remote.ts
|
|
385
|
+
async function createRemoteClient(environment = process.env) {
|
|
386
|
+
const required = [
|
|
387
|
+
"AGENTS24_BASE_URL",
|
|
388
|
+
"AGENTS24_API_KEY",
|
|
389
|
+
"AGENTS24_ORGANIZATION_ID",
|
|
390
|
+
"AGENTS24_PROJECT_ID"
|
|
391
|
+
];
|
|
392
|
+
const missing = required.filter((name) => !String(environment[name] || "").trim());
|
|
393
|
+
if (missing.length) throw new Error(`Missing remote configuration: ${missing.join(", ")}`);
|
|
394
|
+
const canonicalNodePackage = "@agents24/node";
|
|
395
|
+
const module = await import(canonicalNodePackage);
|
|
396
|
+
if (!module.Agents24) throw new Error("@agents24/node does not export Agents24");
|
|
397
|
+
return new module.Agents24({
|
|
398
|
+
baseUrl: environment.AGENTS24_BASE_URL,
|
|
399
|
+
apiKey: environment.AGENTS24_API_KEY,
|
|
400
|
+
organizationId: environment.AGENTS24_ORGANIZATION_ID,
|
|
401
|
+
projectId: environment.AGENTS24_PROJECT_ID
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// src/import-guards.ts
|
|
406
|
+
function parseMappings(items) {
|
|
407
|
+
return Object.fromEntries(items.map((item) => {
|
|
408
|
+
const separator = item.indexOf("=");
|
|
409
|
+
if (separator <= 0 || separator === item.length - 1) {
|
|
410
|
+
throw new Error("--map must use requirement-key=target-id");
|
|
411
|
+
}
|
|
412
|
+
return [item.slice(0, separator), item.slice(separator + 1)];
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
function assertImportAllowed(preview, options) {
|
|
416
|
+
const resources = Array.isArray(preview.resources) ? preview.resources : [];
|
|
417
|
+
if (resources.some((item) => item.status === "incomplete") && !options.allowIncomplete) {
|
|
418
|
+
throw new Error("Import would create incomplete drafts; pass --allow-incomplete to continue");
|
|
419
|
+
}
|
|
420
|
+
if (!options.yes && !options.interactive) throw new Error("Non-interactive import requires --yes");
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export {
|
|
424
|
+
packFiles,
|
|
425
|
+
unpackFiles,
|
|
426
|
+
loadPackageFiles,
|
|
427
|
+
validateFiles,
|
|
428
|
+
validatePackage,
|
|
429
|
+
packPackage,
|
|
430
|
+
initializePackage,
|
|
431
|
+
createRemoteClient,
|
|
432
|
+
parseMappings,
|
|
433
|
+
assertImportAllowed
|
|
434
|
+
};
|
|
435
|
+
//# sourceMappingURL=chunk-I2XQSX32.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/archive.ts","../src/package-source.ts","../src/remote.ts","../src/import-guards.ts"],"sourcesContent":["import { inflateRawSync, deflateRawSync } from \"node:zlib\";\n\nconst MAX_COMPRESSED = 5 * 1024 * 1024;\nconst MAX_UNCOMPRESSED = 10 * 1024 * 1024;\nconst MAX_FILE = 2 * 1024 * 1024;\nconst MAX_FILES = 512;\nconst MAX_DEPTH = 12;\n\nconst CRC_TABLE = Array.from({ length: 256 }, (_, start) => {\n let value = start;\n for (let bit = 0; bit < 8; bit += 1) {\n value = (value & 1) ? 0xedb88320 ^ (value >>> 1) : value >>> 1;\n }\n return value >>> 0;\n});\n\nfunction crc32(value: Uint8Array): number {\n let crc = 0xffffffff;\n for (const byte of value) crc = CRC_TABLE[(crc ^ byte) & 0xff] ^ (crc >>> 8);\n return (crc ^ 0xffffffff) >>> 0;\n}\n\nfunction safePath(raw: string): string {\n if (!raw || raw.startsWith(\"/\") || raw.includes(\"\\\\\")) throw new Error(\"Archive contains an unsafe path\");\n const parts = raw.split(\"/\");\n if (parts.some((part) => !part || part === \".\" || part === \"..\")) throw new Error(\"Archive contains an unsafe path\");\n if (parts.length > MAX_DEPTH) throw new Error(`Archive path exceeds depth ${MAX_DEPTH}: ${raw}`);\n if (/\\.(?:zip|tar|tgz|gz)$/i.test(raw)) throw new Error(`Nested archives are unsupported: ${raw}`);\n if (!/\\.(?:yaml|md)$/.test(raw) || raw.endsWith(\".yml\")) throw new Error(`Unsupported package file: ${raw}`);\n return raw;\n}\n\nfunction writeUInt32(value: number): Buffer {\n const result = Buffer.allocUnsafe(4);\n result.writeUInt32LE(value >>> 0);\n return result;\n}\n\nfunction writeUInt16(value: number): Buffer {\n const result = Buffer.allocUnsafe(2);\n result.writeUInt16LE(value);\n return result;\n}\n\nexport function packFiles(files: Map<string, string>): Uint8Array {\n if (files.size > MAX_FILES) throw new Error(\"Package exceeds the 512-file limit\");\n const localParts: Buffer[] = [];\n const centralParts: Buffer[] = [];\n let offset = 0;\n let total = 0;\n const normalized = new Set<string>();\n\n for (const [rawPath, text] of [...files.entries()].sort(([left], [right]) => left.localeCompare(right))) {\n const path = safePath(rawPath);\n const folded = path.toLocaleLowerCase(\"en-US\");\n if (normalized.has(folded)) throw new Error(`Package contains duplicate path: ${path}`);\n normalized.add(folded);\n const name = Buffer.from(path, \"utf8\");\n const content = Buffer.from(text, \"utf8\");\n if (content.byteLength > MAX_FILE) throw new Error(`Package file exceeds the 2 MiB limit: ${path}`);\n total += content.byteLength;\n if (total > MAX_UNCOMPRESSED) throw new Error(\"Package exceeds the 10 MiB uncompressed limit\");\n const compressed = deflateRawSync(content, { level: 9 });\n const checksum = crc32(content);\n const local = Buffer.concat([\n writeUInt32(0x04034b50),\n writeUInt16(20),\n writeUInt16(0x0800),\n writeUInt16(8),\n writeUInt16(0),\n writeUInt16(0x0021),\n writeUInt32(checksum),\n writeUInt32(compressed.byteLength),\n writeUInt32(content.byteLength),\n writeUInt16(name.byteLength),\n writeUInt16(0),\n name,\n compressed,\n ]);\n localParts.push(local);\n centralParts.push(Buffer.concat([\n writeUInt32(0x02014b50),\n writeUInt16(0x0314),\n writeUInt16(20),\n writeUInt16(0x0800),\n writeUInt16(8),\n writeUInt16(0),\n writeUInt16(0x0021),\n writeUInt32(checksum),\n writeUInt32(compressed.byteLength),\n writeUInt32(content.byteLength),\n writeUInt16(name.byteLength),\n writeUInt16(0),\n writeUInt16(0),\n writeUInt16(0),\n writeUInt16(0),\n writeUInt32(0o100644 << 16),\n writeUInt32(offset),\n name,\n ]));\n offset += local.byteLength;\n }\n\n const central = Buffer.concat(centralParts);\n const result = Buffer.concat([\n ...localParts,\n central,\n writeUInt32(0x06054b50),\n writeUInt16(0),\n writeUInt16(0),\n writeUInt16(files.size),\n writeUInt16(files.size),\n writeUInt32(central.byteLength),\n writeUInt32(offset),\n writeUInt16(0),\n ]);\n if (result.byteLength > MAX_COMPRESSED) throw new Error(\"Package exceeds the 5 MiB compressed limit\");\n return result;\n}\n\nfunction endOfCentralDirectory(data: Buffer): number {\n const minimum = Math.max(0, data.byteLength - 65557);\n for (let index = data.byteLength - 22; index >= minimum; index -= 1) {\n if (data.readUInt32LE(index) === 0x06054b50) return index;\n }\n throw new Error(\"Package must be a valid ZIP archive\");\n}\n\nexport function unpackFiles(value: Uint8Array): Map<string, string> {\n const data = Buffer.from(value);\n if (data.byteLength > MAX_COMPRESSED) throw new Error(\"Package exceeds the 5 MiB compressed limit\");\n const end = endOfCentralDirectory(data);\n const count = data.readUInt16LE(end + 10);\n const centralOffset = data.readUInt32LE(end + 16);\n if (count > MAX_FILES) throw new Error(\"Package exceeds the 512-file limit\");\n const files = new Map<string, string>();\n const normalized = new Set<string>();\n let cursor = centralOffset;\n let total = 0;\n\n for (let index = 0; index < count; index += 1) {\n if (data.readUInt32LE(cursor) !== 0x02014b50) throw new Error(\"Package central directory is invalid\");\n const method = data.readUInt16LE(cursor + 10);\n const expectedCrc = data.readUInt32LE(cursor + 16);\n const compressedSize = data.readUInt32LE(cursor + 20);\n const uncompressedSize = data.readUInt32LE(cursor + 24);\n const nameLength = data.readUInt16LE(cursor + 28);\n const extraLength = data.readUInt16LE(cursor + 30);\n const commentLength = data.readUInt16LE(cursor + 32);\n const externalAttributes = data.readUInt32LE(cursor + 38);\n const localOffset = data.readUInt32LE(cursor + 42);\n const path = safePath(data.subarray(cursor + 46, cursor + 46 + nameLength).toString(\"utf8\"));\n if ((externalAttributes >>> 16 & 0o170000) === 0o120000) throw new Error(`Package symlinks are unsupported: ${path}`);\n const folded = path.toLocaleLowerCase(\"en-US\");\n if (normalized.has(folded)) throw new Error(`Package contains duplicate path: ${path}`);\n normalized.add(folded);\n if (uncompressedSize > MAX_FILE) throw new Error(`Package file exceeds the 2 MiB limit: ${path}`);\n total += uncompressedSize;\n if (total > MAX_UNCOMPRESSED) throw new Error(\"Package exceeds the 10 MiB uncompressed limit\");\n if (data.readUInt32LE(localOffset) !== 0x04034b50) throw new Error(\"Package local header is invalid\");\n const localNameLength = data.readUInt16LE(localOffset + 26);\n const localExtraLength = data.readUInt16LE(localOffset + 28);\n const contentOffset = localOffset + 30 + localNameLength + localExtraLength;\n const compressed = data.subarray(contentOffset, contentOffset + compressedSize);\n let content: Buffer | null = null;\n try {\n content = method === 8\n ? inflateRawSync(compressed, { maxOutputLength: Math.min(MAX_FILE, uncompressedSize) + 1 })\n : method === 0 ? compressed : null;\n } catch {\n throw new Error(`Package file is invalid or exceeds its declared size: ${path}`);\n }\n if (!content || content.byteLength !== uncompressedSize || crc32(content) !== expectedCrc) {\n throw new Error(`Package file is invalid: ${path}`);\n }\n if (content.includes(0)) throw new Error(`Binary package file is unsupported: ${path}`);\n files.set(path, new TextDecoder(\"utf-8\", { fatal: true }).decode(content));\n cursor += 46 + nameLength + extraLength + commentLength;\n }\n if (!files.has(\"agents24.yaml\")) throw new Error(\"Package requires agents24.yaml at the archive root\");\n return files;\n}\n","import { lstat, mkdir, readFile, readdir, stat, writeFile } from \"node:fs/promises\";\nimport { readFileSync as readSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport Ajv2020 from \"ajv/dist/2020.js\";\nimport { parseDocument } from \"yaml\";\n\nimport { packFiles, unpackFiles } from \"./archive.js\";\n\nexport type Diagnostic = { severity: \"error\" | \"warning\"; code: string; path: string; message: string };\nexport type ValidationResult = {\n valid: boolean;\n package: Record<string, unknown>;\n resources: Array<Record<string, unknown>>;\n requirements: string[];\n diagnostics: Diagnostic[];\n files: Map<string, string>;\n};\n\nconst MANIFEST = \"agents24.yaml\";\nconst SYMBOL = /^\\$(workflows|rag|skills|models|stores|tools|toolsets|artifacts|integrations|secrets)\\.([a-z0-9]+(?:-[a-z0-9]+)*)$/;\nconst UUID = /\\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\b/i;\nconst URL_PATTERN = /\\b[A-Za-z][A-Za-z0-9+.-]*:\\/\\//;\nconst LOCAL = /^(workflows|agents|rag|skills|files)\\/(?:[a-z0-9][a-z0-9-]*\\/)*[a-z0-9][a-z0-9-]*\\.(yaml|md)$/;\nconst SECRET_FIELDS = new Set([\"access_token\",\"api_key\",\"authorization\",\"bearer_token\",\"client_secret\",\"credential\",\"credentials\",\"fixed_account_connection_id\",\"oauth_client_id\",\"oauth_client_secret\",\"password\",\"private_key\",\"refresh_token\",\"secret_name\",\"secret_value\",\"static_bearer_token\",\"static_headers\",\"token\",\"url\",\"account_id\",\"organization_id\",\"project_id\",\"publication_state\",\"governance_policy\"]);\n\nfunction add(rows: Diagnostic[], severity: Diagnostic[\"severity\"], code: string, itemPath: string, message: string): void {\n rows.push({ severity, code, path: itemPath, message });\n}\nfunction slug(value: string): string {\n return value.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\").slice(0, 64) || \"agent\";\n}\nfunction parseYaml(text: string, itemPath: string, diagnostics: Diagnostic[]): Record<string, unknown> {\n const doc = parseDocument(text, { uniqueKeys: true });\n for (const error of doc.errors) add(diagnostics, \"error\", \"YAML_INVALID\", itemPath, error.message);\n if (doc.errors.length) return {};\n const value = doc.toJS({ maxAliasCount: 0 });\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n add(diagnostics, \"error\", \"YAML_INVALID\", itemPath, \"YAML source must contain a mapping\");\n return {};\n }\n return value as Record<string, unknown>;\n}\nfunction frontmatter(text: string, itemPath: string, diagnostics: Diagnostic[]): Record<string, unknown> {\n const match = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---(?:\\r?\\n|$)/.exec(text);\n if (!match) {\n add(diagnostics, \"error\", \"FRONTMATTER_REQUIRED\", itemPath, \"Markdown source requires YAML frontmatter\");\n return {};\n }\n return parseYaml(match[1], itemPath, diagnostics);\n}\nfunction markdownBody(text: string): string {\n const match = /^---\\r?\\n[\\s\\S]*?\\r?\\n---(?:\\r?\\n|$)([\\s\\S]*)$/.exec(text);\n return match?.[1] || \"\";\n}\nfunction schema(name: string): Record<string, unknown> {\n const location = new URL(`../generated/schemas/resource-package/1.0/${name}.schema.json`, import.meta.url);\n return JSON.parse(readSync(fileURLToPath(location), \"utf8\")) as Record<string, unknown>;\n}\nconst AjvConstructor = Ajv2020 as unknown as new (options: Record<string, unknown>) => {\n compile(schema: Record<string, unknown>): ((value: unknown) => boolean) & { errors?: Array<{ instancePath?: string; message?: string }> };\n};\nconst ajv = new AjvConstructor({ allErrors: true, strict: true, strictRequired: false });\nconst validators = Object.fromEntries([\"manifest\",\"workflow\",\"agent\",\"rag\",\"skill\"].map((name) => [name, ajv.compile(schema(name))]));\n\nasync function directoryFiles(root: string): Promise<Map<string, string>> {\n const files = new Map<string, string>();\n let total = 0;\n async function visit(directory: string): Promise<void> {\n for (const entry of await readdir(directory, { withFileTypes: true })) {\n const absolute = path.join(directory, entry.name);\n const relative = path.relative(root, absolute).split(path.sep).join(\"/\");\n const metadata = await lstat(absolute);\n if (metadata.isSymbolicLink()) throw new Error(`Package symlinks are unsupported: ${relative}`);\n if (metadata.isDirectory()) { await visit(absolute); continue; }\n if (!metadata.isFile()) continue;\n if (relative.split(\"/\").length > 12) throw new Error(`Package path exceeds depth 12: ${relative}`);\n if (!/\\.(?:yaml|md)$/.test(relative) || relative.endsWith(\".yml\")) throw new Error(`Unsupported package file: ${relative}`);\n if (metadata.size > 2 * 1024 * 1024) throw new Error(`Package file exceeds the 2 MiB limit: ${relative}`);\n total += metadata.size;\n if (total > 10 * 1024 * 1024) throw new Error(\"Package exceeds the 10 MiB uncompressed limit\");\n const body = await readFile(absolute);\n if (body.includes(0)) throw new Error(`Binary package file is unsupported: ${relative}`);\n files.set(relative, new TextDecoder(\"utf-8\", { fatal: true }).decode(body));\n if (files.size > 512) throw new Error(\"Package exceeds the 512-file limit\");\n }\n }\n await visit(root);\n return files;\n}\nexport async function loadPackageFiles(input: string): Promise<Map<string, string>> {\n return (await stat(input)).isDirectory() ? directoryFiles(input) : unpackFiles(await readFile(input));\n}\nfunction validateSchema(kind: keyof typeof validators, value: Record<string, unknown>, itemPath: string, diagnostics: Diagnostic[]): void {\n const validate = validators[kind];\n if (validate(value)) return;\n for (const error of validate.errors || []) add(diagnostics, \"error\", \"SCHEMA_INVALID\", itemPath + (error.instancePath || \"\"), error.message || \"Schema validation failed\");\n}\nfunction resolve(source: string, target: string): string | null {\n if (!target || target.startsWith(\"/\") || target.includes(\"\\\\\")) return null;\n const value = path.posix.normalize(path.posix.join(path.posix.dirname(source), target));\n return value === \"..\" || value.startsWith(\"../\") || !LOCAL.test(value) ? null : value;\n}\nfunction walk(value: unknown, visit: (value: unknown, itemPath: string, key?: string) => void, itemPath = \"\", key?: string): void {\n visit(value, itemPath, key);\n if (Array.isArray(value)) value.forEach((item, index) => walk(item, visit, `${itemPath}/${index}`, key));\n else if (value && typeof value === \"object\") for (const [key, item] of Object.entries(value as Record<string, unknown>)) {\n walk(item, visit, `${itemPath}/${key}`, key);\n }\n}\n\nexport function validateFiles(files: Map<string, string>): ValidationResult {\n const diagnostics: Diagnostic[] = [];\n const manifest = parseYaml(files.get(MANIFEST) || \"\", MANIFEST, diagnostics);\n validateSchema(\"manifest\", manifest, MANIFEST, diagnostics);\n walk(manifest, (item, itemPath, key) => {\n if (key && SECRET_FIELDS.has(key.toLowerCase())) add(diagnostics, \"error\", \"FORBIDDEN_FIELD\", MANIFEST + itemPath, \"Secret and platform identity fields are forbidden\");\n if (typeof item === \"string\" && (UUID.test(item) || URL_PATTERN.test(item))) add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", MANIFEST + itemPath, \"Platform UUIDs and URLs are forbidden in source packages\");\n });\n const parsed = new Map<string, Record<string, unknown>>();\n const resources: Array<Record<string, unknown>> = [];\n for (const [filePath, text] of [...files].sort(([left],[right]) => left.localeCompare(right))) {\n if (filePath === MANIFEST) continue;\n let kind: \"workflow\"|\"agent\"|\"rag\"|\"skill\"|null = null;\n if (/^workflows\\/[a-z0-9][a-z0-9-]*\\.yaml$/.test(filePath)) kind = \"workflow\";\n else if (/^agents\\/[a-z0-9][a-z0-9-]*\\.md$/.test(filePath)) kind = \"agent\";\n else if (/^rag\\/[a-z0-9][a-z0-9-]*\\.yaml$/.test(filePath)) kind = \"rag\";\n else if (/^skills\\/[a-z0-9][a-z0-9-]*\\.md$/.test(filePath)) kind = \"skill\";\n else if (/^files\\/.+\\.md$/.test(filePath)) { parsed.set(filePath, {}); continue; }\n if (!kind) { add(diagnostics, \"error\", \"UNKNOWN_FILE\", filePath, \"File is not in a canonical package directory\"); continue; }\n const value = kind === \"workflow\" || kind === \"rag\" ? parseYaml(text, filePath, diagnostics) : frontmatter(text, filePath, diagnostics);\n validateSchema(kind, value, filePath, diagnostics);\n if ((kind === \"agent\" || kind === \"skill\") && (UUID.test(markdownBody(text).trim()) || URL_PATTERN.test(markdownBody(text).trim()))) {\n add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", `${filePath}/body`, \"Platform UUIDs and URLs are forbidden in source packages\");\n }\n parsed.set(filePath, value);\n if (kind !== \"agent\") resources.push({ path: filePath, kind: kind === \"workflow\" ? \"agent\" : kind === \"rag\" ? \"rag_pipeline\" : \"instruction\", name: value.name });\n }\n const entrypoint = String(manifest.entrypoint || \"\");\n if (!parsed.has(entrypoint) || entrypoint.startsWith(\"agents/\") || entrypoint.startsWith(\"files/\")) add(diagnostics, \"error\", \"ENTRYPOINT_INVALID\", MANIFEST, \"Entrypoint must reference a Workflow, RAG pipeline, or Skill\");\n const reachable = new Set<string>();\n const queue = entrypoint ? [entrypoint] : [];\n let referenceCount = 0;\n while (queue.length) {\n const source = queue.shift() as string;\n if (reachable.has(source)) continue;\n reachable.add(source);\n const value = parsed.get(source) || {};\n if (source.startsWith(\"agents/\")) {\n for (const match of (files.get(source) || \"\").matchAll(/\\[\\[skill:([a-z0-9]+(?:-[a-z0-9]+)*)\\]\\]/g)) {\n referenceCount += 1;\n const target = `skills/${match[1]}.md`;\n if (!parsed.has(target)) add(diagnostics, \"error\", \"LOCAL_REFERENCE_MISSING\", `${source}/body`, `Missing local reference: ${target}`);\n else queue.push(target);\n }\n }\n walk(value, (item, itemPath, key) => {\n if (key && SECRET_FIELDS.has(key.toLowerCase())) add(diagnostics, \"error\", \"FORBIDDEN_FIELD\", source + itemPath, \"Secret and platform identity fields are forbidden\");\n if (typeof item !== \"string\") return;\n if (UUID.test(item) || URL_PATTERN.test(item)) add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", source + itemPath, \"Platform UUIDs and URLs are forbidden in source packages\");\n const symbol = SYMBOL.exec(item);\n if (symbol) {\n referenceCount += 1;\n const declarations = (manifest.requires as Record<string, Record<string, unknown>> | undefined)?.[symbol[1]];\n if (!declarations || !(symbol[2] in declarations)) add(diagnostics, \"error\", \"REQUIREMENT_UNDECLARED\", source + itemPath, `${item} is not declared`);\n }\n if (![\"uses\",\"skills\",\"instructions\",\"file\"].includes(String(key))) return;\n const target = resolve(source, item);\n if (target) {\n referenceCount += 1;\n if (!parsed.has(target)) add(diagnostics, \"error\", \"LOCAL_REFERENCE_MISSING\", source + itemPath, `Missing local reference: ${target}`);\n else queue.push(target);\n }\n });\n }\n for (const filePath of parsed.keys()) if (!reachable.has(filePath)) add(diagnostics, \"error\", \"UNREACHABLE_RESOURCE\", filePath, \"Local source is not reachable from the entrypoint\");\n if (resources.length > 250) add(diagnostics, \"error\", \"RESOURCE_LIMIT\", MANIFEST, \"Package exceeds 250 resources\");\n if (referenceCount > 5000) add(diagnostics, \"error\", \"REFERENCE_LIMIT\", MANIFEST, \"Package exceeds 5,000 references\");\n diagnostics.sort((left,right) => left.path.localeCompare(right.path) || left.code.localeCompare(right.code) || left.message.localeCompare(right.message));\n const requirements = [...new Set([...files.values()].flatMap((text) => [...text.matchAll(/\\$(?:workflows|rag|skills|models|stores|tools|toolsets|artifacts|integrations|secrets)\\.[a-z0-9-]+/g)].map((match) => match[0])))].sort();\n return { valid: !diagnostics.some((item) => item.severity === \"error\"), package: manifest, resources, requirements, diagnostics, files };\n}\nexport async function validatePackage(input: string): Promise<ValidationResult> {\n return validateFiles(await loadPackageFiles(input));\n}\nexport async function packPackage(input: string): Promise<Uint8Array> {\n const result = await validatePackage(input);\n if (!result.valid) throw Object.assign(new Error(\"Resource package is invalid\"), { diagnostics: result.diagnostics });\n return packFiles(result.files);\n}\nexport async function initializePackage(directory: string, packageName: string): Promise<string> {\n const packageSlug = slug(packageName);\n await mkdir(path.join(directory, \"workflows\"), { recursive: true });\n await mkdir(path.join(directory, \"agents\"), { recursive: true });\n await mkdir(path.join(directory, \"rag\"), { recursive: true });\n await mkdir(path.join(directory, \"skills\"), { recursive: true });\n await mkdir(path.join(directory, \"files\"), { recursive: true });\n const manifest = { schema: \"agents24.package/v1\", name: packageSlug, description: `${packageName} agent package`, entrypoint: \"workflows/main.yaml\", requires: { models: { primary: { required: true } } } };\n const workflow = { schema: \"agents24.workflow/v1\", name: packageName, description: \"\", inputs: { text: \"string\" }, outputs: { response: \"string\" }, entry: \"assistant\", nodes: { assistant: { uses: \"../agents/assistant.md\" } }, flow: [{ from: \"assistant.output\", to: \"output.response\" }] };\n const agent = `---\\nschema: agents24.agent/v1\\nname: Assistant\\ndescription: Primary assistant\\nmodel: $models.primary\\n---\\n\\nYou are a helpful assistant.\\n`;\n await writeFile(path.join(directory, MANIFEST), _yaml(manifest), { flag: \"wx\" });\n await writeFile(path.join(directory, \"workflows/main.yaml\"), _yaml(workflow), { flag: \"wx\" });\n await writeFile(path.join(directory, \"agents/assistant.md\"), agent, { flag: \"wx\" });\n return packageSlug;\n}\nfunction _yaml(value: unknown): string {\n const doc = parseDocument(\"{}\");\n doc.contents = doc.createNode(value) as typeof doc.contents;\n return String(doc);\n}\n","type ResourcePackageUpload = { data: Uint8Array; filename?: string };\ntype ResourceBundleRequest = {\n bundle: Record<string, unknown>;\n selected_resource_keys?: string[];\n mappings?: Record<string, string>;\n};\n\nexport type RemoteClient = {\n resourcePackages: {\n exportPackage(request: Record<string, unknown>): Promise<{ data: Uint8Array; filename: string }>;\n validatePackage(upload: ResourcePackageUpload): Promise<Record<string, unknown>>;\n compilePackage(upload: ResourcePackageUpload): Promise<Record<string, unknown>>;\n };\n resourceBundles: {\n importPreview(request: ResourceBundleRequest): Promise<Record<string, unknown>>;\n importBundle(request: ResourceBundleRequest): Promise<Record<string, unknown>>;\n };\n};\n\nexport async function createRemoteClient(environment: NodeJS.ProcessEnv = process.env): Promise<RemoteClient> {\n const required = [\n \"AGENTS24_BASE_URL\",\n \"AGENTS24_API_KEY\",\n \"AGENTS24_ORGANIZATION_ID\",\n \"AGENTS24_PROJECT_ID\",\n ] as const;\n const missing = required.filter((name) => !String(environment[name] || \"\").trim());\n if (missing.length) throw new Error(`Missing remote configuration: ${missing.join(\", \")}`);\n\n const canonicalNodePackage = \"@agents24/node\";\n const module = await import(canonicalNodePackage) as { Agents24?: new (options: Record<string, unknown>) => unknown };\n if (!module.Agents24) throw new Error(\"@agents24/node does not export Agents24\");\n return new module.Agents24({\n baseUrl: environment.AGENTS24_BASE_URL,\n apiKey: environment.AGENTS24_API_KEY,\n organizationId: environment.AGENTS24_ORGANIZATION_ID,\n projectId: environment.AGENTS24_PROJECT_ID,\n }) as unknown as RemoteClient;\n}\n","export function parseMappings(items: string[]): Record<string, string> {\n return Object.fromEntries(items.map((item) => {\n const separator = item.indexOf(\"=\");\n if (separator <= 0 || separator === item.length - 1) {\n throw new Error(\"--map must use requirement-key=target-id\");\n }\n return [item.slice(0, separator), item.slice(separator + 1)];\n }));\n}\n\nexport function assertImportAllowed(\n preview: Record<string, unknown>,\n options: { allowIncomplete: boolean; yes: boolean; interactive: boolean },\n): void {\n const resources = Array.isArray(preview.resources) ? preview.resources as Array<Record<string, unknown>> : [];\n if (resources.some((item) => item.status === \"incomplete\") && !options.allowIncomplete) {\n throw new Error(\"Import would create incomplete drafts; pass --allow-incomplete to continue\");\n }\n if (!options.yes && !options.interactive) throw new Error(\"Non-interactive import requires --yes\");\n}\n"],"mappings":";;;AAAA,SAAS,gBAAgB,sBAAsB;AAE/C,IAAM,iBAAiB,IAAI,OAAO;AAClC,IAAM,mBAAmB,KAAK,OAAO;AACrC,IAAM,WAAW,IAAI,OAAO;AAC5B,IAAM,YAAY;AAClB,IAAM,YAAY;AAElB,IAAM,YAAY,MAAM,KAAK,EAAE,QAAQ,IAAI,GAAG,CAAC,GAAG,UAAU;AAC1D,MAAI,QAAQ;AACZ,WAAS,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG;AACnC,YAAS,QAAQ,IAAK,aAAc,UAAU,IAAK,UAAU;AAAA,EAC/D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