@agents24/cli 0.3.28 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/compatibility.json +7 -7
- package/dist/{chunk-Z7P3CO2J.js → chunk-FT7LOHJF.js} +2 -2
- package/dist/chunk-FT7LOHJF.js.map +1 -0
- package/dist/cli.js +157 -111
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +1 -1
- package/generated/schemas/resource-package/2.0/agent.schema.json +5 -0
- package/generated/schemas/resource-package/2.0/manifest.schema.json +26 -1
- package/package.json +2 -2
- package/dist/chunk-Z7P3CO2J.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@agents24/cli`
|
|
2
2
|
|
|
3
|
-
Last Updated: 2026-
|
|
3
|
+
Last Updated: 2026-10-11
|
|
4
4
|
|
|
5
5
|
Command-line tooling for editable `agents24.resource_package` source packages.
|
|
6
6
|
|
|
@@ -54,3 +54,14 @@ Lifecycle commands resolve installations only by organization plus manifest `pac
|
|
|
54
54
|
Artifact development servers are framework-neutral. A configured `development.command` plus `args` runs directly with `shell: false`; omit the command to attach to an existing localhost server. Use watch mode in the server command for code reload, such as `node --watch src/server.mjs` or `uvicorn app:app --reload --host 127.0.0.1 --port 4312`. The relay's automatic manifest synchronization is independent of that language-specific hot reload.
|
|
55
55
|
|
|
56
56
|
The canonical tree is `agents24.yaml`, Workflows, Agent Markdown, RAG, Skills, Store declarations, optional Artifacts/source trees, and optional `files/`. Packages do not carry Knowledge Store corpus content; ingestion belongs to RAG pipelines. A local Artifact callable uses `kind: artifact`, a relative `uses` path, an explicit `export`, and optional `load: static|dynamic`; the verified manifest determines whether that export is exactly one Tool or exactly one Toolset. Toolset exports attach as Toolsets and are not flattened into member Tools. `$artifacts.*` and `$toolsets.*` are only external requirements. See the [resource movement guide](https://docs.agents24.dev/guides/move-resource-packages) and [manifest schema](https://docs.agents24.dev/schemas/resource-package/2.0/manifest.schema.json).
|
|
57
|
+
|
|
58
|
+
## Knowledge Store data
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
agents24 knowledge records fetch --store "$STORE_ID" --input fetch.json --json
|
|
62
|
+
agents24 knowledge records upsert --store "$STORE_ID" --input records.json --batch --json
|
|
63
|
+
agents24 knowledge namespaces list --store "$STORE_ID" --limit 100 --json
|
|
64
|
+
agents24 knowledge namespaces stats --store "$STORE_ID" --input namespace.json --json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Record operations: `upsert`, `fetch`, `list`, `query`, `update`, `delete`. Supply canonical JSON through `--input <file>` or `--input -` (stdin). Record requests include an explicit `namespace`, with `""` selecting the default partition. `--batch` on upsert uses SDK batching and stops on failure; partial/unknown receipts exit nonzero and use the existing stderr JSON format. Authentication uses `AGENTS24_API_KEY` and optional `AGENTS24_BASE_URL`. These commands make no model calls and do not update ingestion manifests. See the [data API guide](https://docs.agents24.dev/sdk/knowledge-store-data) for schemas, limits, backend capabilities and pipeline coordination.
|
package/compatibility.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractHash": "
|
|
2
|
+
"contractHash": "673a1b3f6eadf325e036c6c61b3048baeb6b6d914425e40c941e177c56bb1888",
|
|
3
3
|
"contractVersion": "0.3.0",
|
|
4
4
|
"corpus": "conformance/v1/corpus.json",
|
|
5
5
|
"generatedBy": "@agents24/sdk-contract",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"reactDom": ">=19 <20"
|
|
16
16
|
},
|
|
17
17
|
"@agents24/client": {
|
|
18
|
-
"contract": "
|
|
18
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
19
19
|
"runtime": "run-stream.v3"
|
|
20
20
|
},
|
|
21
21
|
"@agents24/node": {
|
|
22
|
-
"contract": "
|
|
22
|
+
"contract": "673a1b3f6eadf325e036c6c61b3048baeb6b6d914425e40c941e177c56bb1888",
|
|
23
23
|
"node": "^22.0.0 || ^24.0.0"
|
|
24
24
|
},
|
|
25
25
|
"@agents24/react": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"react": ">=19 <20"
|
|
28
28
|
},
|
|
29
29
|
"@talmudpedia/runtime-sdk": {
|
|
30
|
-
"contract": "
|
|
30
|
+
"contract": "904701fe1c173854cd4154f2156020da471397fbc6bb644cea60f44c71a1a0d2",
|
|
31
31
|
"protocolOwner": "@agents24/client"
|
|
32
32
|
},
|
|
33
33
|
"agents24": {
|
|
34
|
-
"contract": "
|
|
34
|
+
"contract": "673a1b3f6eadf325e036c6c61b3048baeb6b6d914425e40c941e177c56bb1888",
|
|
35
35
|
"python": ">=3.10"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"schemaVersion": "agents24.compatibility.v1",
|
|
49
49
|
"targetOperationCounts": {
|
|
50
50
|
"client": 36,
|
|
51
|
-
"node":
|
|
52
|
-
"python":
|
|
51
|
+
"node": 187,
|
|
52
|
+
"python": 181
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -473,7 +473,7 @@ async function initializePackage(directory, packageName) {
|
|
|
473
473
|
await mkdir(path.join(directory, "artifacts"), { recursive: true });
|
|
474
474
|
await mkdir(path.join(directory, "files"), { recursive: true });
|
|
475
475
|
const manifest = { schema: "agents24.package/v2", package_id: createPackageId(), name: packageSlug, description: `${packageName} agent package`, resources: [{ key: "main", path: "workflows/main.yaml" }], requires: { models: { primary: { required: true, capability: "chat" } } } };
|
|
476
|
-
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.
|
|
476
|
+
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_text", to: "output.response" }] };
|
|
477
477
|
const agent = `---
|
|
478
478
|
schema: agents24.agent/v1
|
|
479
479
|
name: Assistant
|
|
@@ -576,4 +576,4 @@ export {
|
|
|
576
576
|
shouldPromptForDependency,
|
|
577
577
|
assertImportAllowed
|
|
578
578
|
};
|
|
579
|
-
//# sourceMappingURL=chunk-
|
|
579
|
+
//# sourceMappingURL=chunk-FT7LOHJF.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|txt|html|json|csv|py|js|mjs|ts)$/.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 { copyFile, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile } from \"node:fs/promises\";\nimport { readFileSync as readSync } from \"node:fs\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { randomBytes } from \"node:crypto\";\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 PACKAGE_ROOTS = new Set([\"workflows\", \"agents\", \"rag\", \"skills\", \"stores\", \"artifacts\", \"files\"]);\nconst PACKAGE_ID = /^pkg_[0-9a-f]{32}$/;\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 LOCAL = /^(workflows|agents|rag|skills|stores|artifacts|files)\\//;\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\",\"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}\nexport function createPackageId(): string {\n return `pkg_${randomBytes(16).toString(\"hex\")}`;\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/2.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, formats: { uri: true } });\nconst validators = Object.fromEntries([\"manifest\",\"workflow\",\"agent\",\"rag\",\"skill\",\"store\",\"artifact\"].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 if ([\".agents24\", \".git\", \"node_modules\"].includes(entry.name) || [\".env.local\", \".gitignore\"].includes(entry.name)) continue;\n if (directory === root && entry.name === \"knowledge\") {\n throw new Error(\"Package knowledge/ content is unsupported; ingest Store content through a RAG pipeline\");\n }\n if (directory === root && entry.name !== MANIFEST && !PACKAGE_ROOTS.has(entry.name)) continue;\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|txt|html|json|csv|py|js|mjs|ts)$/.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)) add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", MANIFEST + itemPath, \"Platform UUIDs 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\"|\"store\"|\"artifact\"|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 (/^stores\\/[a-z0-9][a-z0-9-]*\\.yaml$/.test(filePath)) kind = \"store\";\n else if (/^artifacts\\/[a-z0-9][a-z0-9-]*\\/artifact\\.yaml$/.test(filePath)) kind = \"artifact\";\n else if (/^artifacts\\/[a-z0-9][a-z0-9-]*\\/src\\/.+\\.(?:py|js|mjs|ts)$/.test(filePath)) { parsed.set(filePath, {}); continue; }\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\" || kind === \"store\" || kind === \"artifact\" ? 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())) {\n add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", `${filePath}/body`, \"Platform UUIDs 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\" : kind === \"store\" ? \"knowledge_store\" : kind === \"skill\" ? \"instruction\" : kind, name: value.name });\n }\n const declarations = Array.isArray(manifest.resources) ? manifest.resources.filter((item): item is Record<string, unknown> => Boolean(item && typeof item === \"object\" && !Array.isArray(item))) : [];\n const declaredRows = declarations.map((item) => String(item.path || \"\"));\n const declaredKeys = declarations.map((item) => String(item.key || \"\"));\n if (declaredKeys.some((item, index) => item !== [...declaredKeys].sort()[index])) add(diagnostics, \"error\", \"RESOURCE_ORDER\", MANIFEST, \"resources must be sorted by key\");\n if (new Set(declaredKeys).size !== declaredKeys.length) add(diagnostics, \"error\", \"RESOURCE_KEY_DUPLICATE\", MANIFEST, \"resource keys must be unique\");\n if (new Set(declaredRows).size !== declaredRows.length) add(diagnostics, \"error\", \"RESOURCE_PATH_DUPLICATE\", MANIFEST, \"resource paths must be unique\");\n const declared = new Set(declaredRows);\n const platformResources = new Set(resources.map((item) => String(item.path)));\n declaredRows.forEach((filePath, index) => {\n if (!platformResources.has(filePath)) add(diagnostics, \"error\", \"RESOURCE_DECLARATION_INVALID\", `${MANIFEST}/resources/${index}`, `Declared resource does not exist or is not a platform resource: ${filePath}`);\n });\n for (const filePath of platformResources) if (!declared.has(filePath)) add(diagnostics, \"error\", \"RESOURCE_NOT_DECLARED\", filePath, \"Platform resource must be listed in agents24.yaml resources\");\n const reachable = new Set<string>();\n const queue = declaredRows.filter((filePath) => platformResources.has(filePath));\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)) add(diagnostics, \"error\", \"FORBIDDEN_VALUE\", source + itemPath, \"Platform UUIDs 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 const target = item.startsWith(\"../\") || item.startsWith(\"./\") ? resolve(source, item) : null;\n const platformTarget = Boolean(target && /^(workflows|rag|skills|stores|artifacts)\\//.test(target));\n if (target && (platformTarget || [\"uses\",\"skills\",\"instructions\",\"file\"].includes(String(key)))) {\n referenceCount += 1;\n if (!parsed.has(target)) add(diagnostics, \"error\", \"LOCAL_REFERENCE_MISSING\", source + itemPath, `Missing local reference: ${target}`);\n else {\n if (platformTarget && !declared.has(target)) add(diagnostics, \"error\", \"RESOURCE_NOT_DECLARED\", source + itemPath, `Referenced platform resource is not declared: ${target}`);\n queue.push(target);\n }\n }\n });\n }\n for (const filePath of parsed.keys()) if (/^(agents|files)\\//.test(filePath) && !reachable.has(filePath)) add(diagnostics, \"error\", \"ORPHAN_AUXILIARY\", filePath, \"Auxiliary file is not referenced by a declared resource\");\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}\n\nexport async function packPackageSnapshot(input: string): Promise<Uint8Array> {\n return packFiles(await loadPackageFiles(input));\n}\n\nexport async function replacePackageFiles(\n directory: string,\n proposed: Record<string, string>,\n afterWrite?: () => Promise<void>,\n): Promise<void> {\n const root = path.resolve(directory);\n if (!(await stat(root)).isDirectory()) throw new Error(\"pull requires a Resource Package directory\");\n const files = new Map(Object.entries(proposed));\n const current = await directoryFiles(root);\n preserveLocalSelfHostedArtifactSources(current, files);\n const validated = validateFiles(files);\n if (!validated.valid) throw Object.assign(new Error(\"Pulled Resource Package is invalid\"), { diagnostics: validated.diagnostics });\n const changed = [...new Set([...current.keys(), ...files.keys()])].filter((item) => current.get(item) !== files.get(item));\n const staging = await mkdtemp(path.join(path.dirname(root), \".agents24-pull-\"));\n const backups = path.join(staging, \"backups\");\n const writes = path.join(staging, \"writes\");\n const existing = new Set<string>();\n try {\n for (const relative of changed) {\n const destination = safeDestination(root, relative);\n if (current.has(relative)) {\n existing.add(relative);\n const backup = path.join(backups, relative);\n await mkdir(path.dirname(backup), { recursive: true });\n await copyFile(destination, backup);\n }\n if (files.has(relative)) {\n const staged = path.join(writes, relative);\n await mkdir(path.dirname(staged), { recursive: true });\n await writeFile(staged, files.get(relative)!, \"utf8\");\n }\n }\n for (const relative of changed) {\n const destination = safeDestination(root, relative);\n if (!files.has(relative)) {\n await rm(destination, { force: true });\n continue;\n }\n await mkdir(path.dirname(destination), { recursive: true });\n await rename(path.join(writes, relative), destination);\n }\n if (afterWrite) await afterWrite();\n } catch (error) {\n for (const relative of changed) {\n const destination = safeDestination(root, relative);\n if (!existing.has(relative)) {\n await rm(destination, { force: true });\n continue;\n }\n await mkdir(path.dirname(destination), { recursive: true });\n await copyFile(path.join(backups, relative), destination);\n }\n throw error;\n } finally {\n await rm(staging, { recursive: true, force: true });\n }\n}\n\nfunction preserveLocalSelfHostedArtifactSources(current: Map<string, string>, proposed: Map<string, string>): void {\n const prefixes = new Set([\n ...selfHostedArtifactSourcePrefixes(current),\n ...selfHostedArtifactSourcePrefixes(proposed),\n ]);\n for (const [filePath, content] of current) {\n if ([...prefixes].some((prefix) => filePath.startsWith(prefix))) proposed.set(filePath, content);\n }\n}\n\nfunction selfHostedArtifactSourcePrefixes(files: Map<string, string>): string[] {\n const diagnostics: Diagnostic[] = [];\n const manifest = parseYaml(files.get(MANIFEST) || \"\", MANIFEST, diagnostics);\n const resources = Array.isArray(manifest.resources) ? manifest.resources : [];\n return resources.flatMap((resource) => {\n if (!resource || typeof resource !== \"object\" || Array.isArray(resource)) return [];\n const artifactPath = String((resource as Record<string, unknown>).path || \"\");\n if (!/^artifacts\\/[a-z0-9][a-z0-9-]*\\/artifact\\.yaml$/.test(artifactPath)) return [];\n const source = parseYaml(files.get(artifactPath) || \"\", artifactPath, diagnostics);\n return source.execution_target === \"self_hosted\" ? [artifactPath.replace(/artifact\\.yaml$/, \"src/\")] : [];\n });\n}\n\nfunction safeDestination(root: string, relative: string): string {\n if (!relative || relative.startsWith(\"/\") || relative.includes(\"\\\\\")) throw new Error(\"Pulled package contains an unsafe path\");\n const destination = path.resolve(root, relative);\n if (!destination.startsWith(`${root}${path.sep}`)) throw new Error(\"Pulled package contains an unsafe path\");\n return destination;\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, \"stores\"), { recursive: true });\n await mkdir(path.join(directory, \"artifacts\"), { recursive: true });\n await mkdir(path.join(directory, \"files\"), { recursive: true });\n const manifest = { schema: \"agents24.package/v2\", package_id: createPackageId(), name: packageSlug, description: `${packageName} agent package`, resources: [{ key: \"main\", path: \"workflows/main.yaml\" }], requires: { models: { primary: { required: true, capability: \"chat\" } } } };\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_text\", 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}\nexport async function forkPackage(source: string, target: string, requestedName?: string): Promise<{ name: string; packageId: string }> {\n const sourceFiles = await loadPackageFiles(source);\n const diagnostics: Diagnostic[] = [];\n const manifest = parseYaml(sourceFiles.get(MANIFEST) || \"\", MANIFEST, diagnostics);\n if (diagnostics.length) throw Object.assign(new Error(\"Resource package manifest is invalid\"), { diagnostics });\n const packageName = slug(requestedName || path.basename(path.resolve(target)));\n const packageId = createPackageId();\n manifest.package_id = packageId;\n manifest.name = packageName;\n sourceFiles.set(MANIFEST, _yaml(manifest));\n const validated = validateFiles(sourceFiles);\n if (!validated.valid) throw Object.assign(new Error(\"Resource package is invalid\"), { diagnostics: validated.diagnostics });\n let targetExists = true;\n try {\n const metadata = await stat(target);\n if (!metadata.isDirectory()) throw new Error(\"Fork target must be a directory\");\n if ((await readdir(target)).length) throw new Error(\"Fork target directory must be empty\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") targetExists = false;\n else throw error;\n }\n if (!targetExists) await mkdir(target, { recursive: true });\n for (const [relative, content] of validated.files) {\n const destination = path.join(target, relative);\n await mkdir(path.dirname(destination), { recursive: true });\n await writeFile(destination, content, { flag: \"wx\" });\n }\n if (!PACKAGE_ID.test(packageId)) throw new Error(\"Generated package identity is invalid\");\n return { name: packageName, packageId };\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 ResourcePackageImportUpload = ResourcePackageUpload & { mappings?: Record<string, string> };\ntype ResourceInstallationPlanUpload = ResourcePackageUpload & { prune?: boolean; integrationMode?: \"publish-only\" | \"bff\" | \"client-deployment\"; primaryResourceKey?: string };\n\nexport type RemoteClient = {\n knowledgeStores: {\n upsertRecords(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n upsertRecordsBatched(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n fetchRecords(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n listRecords(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n queryRecords(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n updateRecord(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n deleteRecords(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n listNamespaces(storeId: string, options: Record<string, unknown>): Promise<Record<string, unknown>>;\n namespaceStats(storeId: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n };\n hostedArtifacts: {\n create(payload: Record<string, unknown>): Promise<Record<string, unknown>>;\n get(id: string): Promise<Record<string, unknown>>;\n draft(id: string): Promise<Record<string, unknown>>;\n saveDraft(id: string, snapshot: Record<string, unknown>, expectedVersion: number): Promise<Record<string, unknown>>;\n build(id: string, draft: { draft_version: number; draft_hash: string; runtime_hash: string }): Promise<Record<string, unknown>>;\n buildStatus(id: string, buildId: string): Promise<Record<string, unknown>>;\n test(id: string, payload: Record<string, unknown>): Promise<Record<string, unknown>>;\n run(runId: string): Promise<Record<string, unknown>>;\n analyzeDependencies(payload: Record<string, unknown>): Promise<Record<string, unknown>>;\n };\n resourcePackages: {\n exportPackage(request: Record<string, unknown>): Promise<{ data: Uint8Array; filename: string }>;\n validatePackage(upload: ResourcePackageUpload): Promise<Record<string, unknown>>;\n importPreview(upload: ResourcePackageImportUpload): Promise<Record<string, unknown>>;\n importPackage(upload: ResourcePackageImportUpload, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n candidates(options: { limit?: number; offset?: number; kind: string; query?: string; requiredCapability?: \"chat\" | \"embedding\" | \"speech_to_text\" | \"rerank\" | \"ocr\"; modelRequirements?: Record<string, unknown> }): Promise<Record<string, unknown>>;\n };\n resourceInstallations: {\n list(): Promise<Record<string, unknown>>;\n create(request: { package_id: string; package_name: string; operation_id: string }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n get(id: string): Promise<Record<string, unknown>>;\n getByPackageId(packageId: string): Promise<Record<string, unknown>>;\n plan(upload: ResourceInstallationPlanUpload): Promise<Record<string, unknown>>;\n planPull(id: string, upload: ResourcePackageUpload): Promise<Record<string, unknown>>;\n downloadPull(id: string, pullId: string): Promise<Record<string, unknown>>;\n acceptPull(id: string, pullId: string, request: { platform_snapshot_hash: string; package_hash: string }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n link(id: string, request: { resource_key: string; resource_id: string }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n configureSecrets(id: string, request: { secrets: Record<string, string> }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n apply(operationId: string, request: Record<string, unknown>, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n operationStatus(operationId: string): Promise<Record<string, unknown>>;\n publish(id: string, request: { package_hash: string }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n prepareDevelopmentSession(id: string, request: Record<string, unknown>): Promise<Record<string, unknown>>;\n developmentSessionStatus(id: string, resourceKey: string): Promise<Record<string, unknown>>;\n revokeDevelopmentSession(id: string, sessionId: string, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n bindDeployment(id: string, request: { client_deployment_id: string | null }, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n resources(options: { kind: string; query?: string; limit?: number }): Promise<Record<string, unknown>>;\n };\n agents: { publish(id: string, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>> };\n resourcePolicies: { list(): Promise<Array<Record<string, unknown>>> };\n clientDeployments: {\n create(request: Record<string, unknown>, options?: { idempotencyKey?: string }): Promise<Record<string, unknown>>;\n get(id: string): Promise<Record<string, unknown>>;\n };\n};\n\nexport async function createRemoteClient(environment: NodeJS.ProcessEnv = process.env): Promise<RemoteClient> {\n const required = [\"AGENTS24_API_KEY\"] 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: String(environment.AGENTS24_BASE_URL || \"https://api.agents24.dev\").trim(),\n apiKey: environment.AGENTS24_API_KEY,\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 shouldPromptForDependency(dependency: Record<string, unknown>): boolean {\n return dependency.kind !== \"model\";\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;AACA,SAAO,UAAU;AACnB,CAAC;AAED,SAAS,MAAM,OAA2B;AACxC,MAAI,MAAM;AACV,aAAW,QAAQ,MAAO,OAAM,WAAW,MAAM,QAAQ,GAAI,IAAK,QAAQ;AAC1E,UAAQ,MAAM,gBAAgB;AAChC;AAEA,SAAS,SAAS,KAAqB;AACrC,MAAI,CAAC,OAAO,IAAI,WAAW,GAAG,K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