@dot-agent/compiler 0.5.0-alpha.2 → 0.10.1
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/dist/core.cjs +13 -250
- package/dist/core.d.cts +2 -3
- package/dist/core.d.mts +2 -0
- package/dist/core.mjs +2 -0
- package/dist/index.cjs +1016 -1205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -28
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +66 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1057 -0
- package/dist/index.mjs.map +1 -0
- package/dist/zip-core-BCiH0sUt.d.cts +123 -0
- package/dist/zip-core-BCiH0sUt.d.cts.map +1 -0
- package/dist/zip-core-BCiH0sUt.d.mts +123 -0
- package/dist/zip-core-BCiH0sUt.d.mts.map +1 -0
- package/dist/zip-core-BjnIQMRA.cjs +292 -0
- package/dist/zip-core-BjnIQMRA.cjs.map +1 -0
- package/dist/zip-core-Dw_OgIjV.mjs +180 -0
- package/dist/zip-core-Dw_OgIjV.mjs.map +1 -0
- package/package.json +28 -19
- package/dist/chunk-P5LFGJ6P.js +0 -206
- package/dist/chunk-P5LFGJ6P.js.map +0 -1
- package/dist/core-b-7c6X6q.d.cts +0 -120
- package/dist/core-b-7c6X6q.d.ts +0 -120
- package/dist/core.cjs.map +0 -1
- package/dist/core.d.ts +0 -3
- package/dist/core.js +0 -27
- package/dist/core.js.map +0 -1
- package/dist/index.d.ts +0 -64
- package/dist/index.js +0 -1029
- package/dist/index.js.map +0 -1
package/dist/chunk-P5LFGJ6P.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
// src/generated-version.ts
|
|
2
|
-
var DSL_VERSION = "0.1-alpha";
|
|
3
|
-
var COMPILER_VERSION = "0.5.0-alpha.2";
|
|
4
|
-
|
|
5
|
-
// src/manifest.ts
|
|
6
|
-
function parseAboutme(json) {
|
|
7
|
-
if (!json.dslVersion) throw new Error("Missing dslVersion in aboutme.json");
|
|
8
|
-
if (!json.id) throw new Error("Missing id in aboutme.json");
|
|
9
|
-
if (!json.name) throw new Error("Missing name in aboutme.json");
|
|
10
|
-
if (!json.description) throw new Error("Missing description in aboutme.json");
|
|
11
|
-
if (!json.version) throw new Error("Missing version in aboutme.json");
|
|
12
|
-
if (!json.domain) throw new Error("Missing domain in aboutme.json");
|
|
13
|
-
if (!json.persona) throw new Error("Missing persona in aboutme.json");
|
|
14
|
-
if (!json.compiler) throw new Error("Missing compiler in aboutme.json");
|
|
15
|
-
if (!Array.isArray(json.capabilities)) throw new Error("Missing capabilities array in aboutme.json");
|
|
16
|
-
if (!Array.isArray(json.requires)) throw new Error("Missing requires array in aboutme.json");
|
|
17
|
-
if (!json.integrity) throw new Error("Missing integrity in aboutme.json");
|
|
18
|
-
return {
|
|
19
|
-
dslVersion: json.dslVersion,
|
|
20
|
-
id: json.id,
|
|
21
|
-
name: json.name,
|
|
22
|
-
description: json.description,
|
|
23
|
-
version: json.version,
|
|
24
|
-
domain: json.domain,
|
|
25
|
-
license: json.license ?? "",
|
|
26
|
-
persona: json.persona,
|
|
27
|
-
purpose: json.purpose ?? "unknown",
|
|
28
|
-
compiler: json.compiler,
|
|
29
|
-
commit: json.commit,
|
|
30
|
-
capabilities: json.capabilities,
|
|
31
|
-
requires: json.requires,
|
|
32
|
-
integrity: json.integrity
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function buildAboutme(opts) {
|
|
36
|
-
return {
|
|
37
|
-
dslVersion: `dot-agent/${DSL_VERSION}`,
|
|
38
|
-
id: opts.id,
|
|
39
|
-
name: opts.name,
|
|
40
|
-
description: opts.description,
|
|
41
|
-
version: opts.version,
|
|
42
|
-
domain: opts.domain,
|
|
43
|
-
license: opts.license ?? "",
|
|
44
|
-
persona: opts.persona,
|
|
45
|
-
purpose: opts.purpose ?? "unknown",
|
|
46
|
-
compiler: opts.compiler,
|
|
47
|
-
commit: opts.commit,
|
|
48
|
-
capabilities: opts.capabilities ?? [],
|
|
49
|
-
requires: opts.requires ?? [],
|
|
50
|
-
integrity: opts.integrity
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function aboutmeToJson(aboutme) {
|
|
54
|
-
return JSON.stringify(aboutme, null, 2);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// src/id.ts
|
|
58
|
-
var KNOWN_PLATFORMS = ["github.com", "gitlab.com", "codeberg.org", "sr.ht"];
|
|
59
|
-
function parseNamespaceName(identifier) {
|
|
60
|
-
const atIdx = identifier.indexOf("@");
|
|
61
|
-
if (atIdx !== -1 && (identifier.indexOf("/") === -1 || atIdx < identifier.indexOf("/"))) {
|
|
62
|
-
const slashIdx = identifier.indexOf("/");
|
|
63
|
-
if (slashIdx === -1) {
|
|
64
|
-
throw new Error(`Invalid agent ID: email namespace requires a name after '/' (got '${identifier}')`);
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
namespace: identifier.slice(0, slashIdx),
|
|
68
|
-
name: identifier.slice(slashIdx + 1)
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
for (const platform of KNOWN_PLATFORMS) {
|
|
72
|
-
if (identifier.startsWith(platform + "/")) {
|
|
73
|
-
const afterPlatform = identifier.slice(platform.length + 1);
|
|
74
|
-
const slashIdx = afterPlatform.indexOf("/");
|
|
75
|
-
if (slashIdx === -1) {
|
|
76
|
-
throw new Error(
|
|
77
|
-
`Invalid agent ID: '${platform}' namespace requires a user segment and a name (got '${identifier}')`
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
namespace: platform + "/" + afterPlatform.slice(0, slashIdx),
|
|
82
|
-
name: afterPlatform.slice(slashIdx + 1)
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const lastSlash = identifier.lastIndexOf("/");
|
|
87
|
-
if (lastSlash === -1) {
|
|
88
|
-
throw new Error(`Invalid agent ID: missing '/' separator in '${identifier}'`);
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
namespace: identifier.slice(0, lastSlash),
|
|
92
|
-
name: identifier.slice(lastSlash + 1)
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function parseId(id) {
|
|
96
|
-
if (!id) throw new Error("Invalid agent ID: empty string");
|
|
97
|
-
const colonIdx = id.indexOf(":");
|
|
98
|
-
let identifier;
|
|
99
|
-
let version;
|
|
100
|
-
let digest;
|
|
101
|
-
if (colonIdx === -1) {
|
|
102
|
-
identifier = id;
|
|
103
|
-
} else {
|
|
104
|
-
identifier = id.slice(0, colonIdx);
|
|
105
|
-
const rest = id.slice(colonIdx + 1);
|
|
106
|
-
if (!rest) throw new Error(`Invalid agent ID: empty version after ':' in '${id}'`);
|
|
107
|
-
const tildeIdx = rest.indexOf("~");
|
|
108
|
-
if (tildeIdx === -1) {
|
|
109
|
-
version = rest;
|
|
110
|
-
} else {
|
|
111
|
-
version = rest.slice(0, tildeIdx);
|
|
112
|
-
digest = rest.slice(tildeIdx + 1);
|
|
113
|
-
if (!version) throw new Error(`Invalid agent ID: empty version before '~' in '${id}'`);
|
|
114
|
-
if (!digest) throw new Error(`Invalid agent ID: empty digest after '~' in '${id}'`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
const { namespace, name } = parseNamespaceName(identifier);
|
|
118
|
-
if (!namespace) throw new Error(`Invalid agent ID: empty namespace in '${id}'`);
|
|
119
|
-
if (!name) throw new Error(`Invalid agent ID: empty name in '${id}'`);
|
|
120
|
-
return { namespace, name, version, digest };
|
|
121
|
-
}
|
|
122
|
-
function buildId(parts) {
|
|
123
|
-
const { namespace, name, version, digest } = parts;
|
|
124
|
-
if (!namespace || !name) {
|
|
125
|
-
throw new Error("Missing required ID parts: namespace and name");
|
|
126
|
-
}
|
|
127
|
-
if (digest && !version) {
|
|
128
|
-
throw new Error("Invalid ID parts: digest requires version");
|
|
129
|
-
}
|
|
130
|
-
let result = `${namespace}/${name}`;
|
|
131
|
-
if (version) {
|
|
132
|
-
result += `:${version}`;
|
|
133
|
-
if (digest) result += `~${digest}`;
|
|
134
|
-
}
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
function extractDigest(id) {
|
|
138
|
-
try {
|
|
139
|
-
return parseId(id).digest ?? "";
|
|
140
|
-
} catch {
|
|
141
|
-
return "";
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function extractName(id) {
|
|
145
|
-
try {
|
|
146
|
-
return parseId(id).name;
|
|
147
|
-
} catch {
|
|
148
|
-
return "";
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// src/zip-core.ts
|
|
153
|
-
import JSZip from "jszip";
|
|
154
|
-
var MAX_ZIP_SIZE = 500 * 1024 * 1024;
|
|
155
|
-
var MAX_COMPRESSION_RATIO = 100;
|
|
156
|
-
function validateMagicBytes(bytes) {
|
|
157
|
-
if (!(bytes[0] === 80 && bytes[1] === 75 && bytes[2] === 3 && bytes[3] === 4)) {
|
|
158
|
-
throw new Error("Not a valid .agent file (invalid magic bytes)");
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function validateZipBomb(zip, compressedSize) {
|
|
162
|
-
let totalUncompressed = 0;
|
|
163
|
-
zip.forEach((_path, file) => {
|
|
164
|
-
if (!file.dir) totalUncompressed += file._data?.uncompressedSize || 0;
|
|
165
|
-
});
|
|
166
|
-
if (totalUncompressed > MAX_ZIP_SIZE) {
|
|
167
|
-
throw new Error(`Bundle exceeds 500MB uncompressed: ${totalUncompressed}`);
|
|
168
|
-
}
|
|
169
|
-
if (totalUncompressed / compressedSize > MAX_COMPRESSION_RATIO) {
|
|
170
|
-
throw new Error(`Compression ratio exceeds 100x: ${(totalUncompressed / compressedSize).toFixed(1)}x`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function createZip() {
|
|
174
|
-
return new JSZip();
|
|
175
|
-
}
|
|
176
|
-
async function extractFiles(zip, filter) {
|
|
177
|
-
const files = /* @__PURE__ */ new Map();
|
|
178
|
-
const promises = [];
|
|
179
|
-
zip.forEach((relativePath, file) => {
|
|
180
|
-
if (file.dir) return;
|
|
181
|
-
if (filter && !filter.some((f) => relativePath.startsWith(f))) return;
|
|
182
|
-
promises.push(
|
|
183
|
-
file.async("text").then((content) => {
|
|
184
|
-
files.set(relativePath, content);
|
|
185
|
-
})
|
|
186
|
-
);
|
|
187
|
-
});
|
|
188
|
-
await Promise.all(promises);
|
|
189
|
-
return files;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export {
|
|
193
|
-
COMPILER_VERSION,
|
|
194
|
-
parseAboutme,
|
|
195
|
-
buildAboutme,
|
|
196
|
-
aboutmeToJson,
|
|
197
|
-
parseId,
|
|
198
|
-
buildId,
|
|
199
|
-
extractDigest,
|
|
200
|
-
extractName,
|
|
201
|
-
validateMagicBytes,
|
|
202
|
-
validateZipBomb,
|
|
203
|
-
createZip,
|
|
204
|
-
extractFiles
|
|
205
|
-
};
|
|
206
|
-
//# sourceMappingURL=chunk-P5LFGJ6P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generated-version.ts","../src/manifest.ts","../src/id.ts","../src/zip-core.ts"],"sourcesContent":["// Generated by scripts/embed-version.mjs from dsl/VERSION and package.json — do not edit by hand.\nexport const DSL_VERSION = '0.1-alpha'\nexport const COMPILER_VERSION = '0.5.0-alpha.2'\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n\nimport type { AboutMe, BuildAboutmeOptions } from './types.js'\nimport { DSL_VERSION } from './generated-version.js'\n\nexport function parseAboutme(json: any): AboutMe {\n if (!json.dslVersion) throw new Error('Missing dslVersion in aboutme.json')\n if (!json.id) throw new Error('Missing id in aboutme.json')\n if (!json.name) throw new Error('Missing name in aboutme.json')\n if (!json.description) throw new Error('Missing description in aboutme.json')\n if (!json.version) throw new Error('Missing version in aboutme.json')\n if (!json.domain) throw new Error('Missing domain in aboutme.json')\n if (!json.persona) throw new Error('Missing persona in aboutme.json')\n if (!json.compiler) throw new Error('Missing compiler in aboutme.json')\n if (!Array.isArray(json.capabilities)) throw new Error('Missing capabilities array in aboutme.json')\n if (!Array.isArray(json.requires)) throw new Error('Missing requires array in aboutme.json')\n if (!json.integrity) throw new Error('Missing integrity in aboutme.json')\n\n return {\n dslVersion: json.dslVersion,\n id: json.id,\n name: json.name,\n description: json.description,\n version: json.version,\n domain: json.domain,\n license: json.license ?? '',\n persona: json.persona,\n purpose: json.purpose ?? 'unknown',\n compiler: json.compiler,\n commit: json.commit,\n capabilities: json.capabilities,\n requires: json.requires,\n integrity: json.integrity,\n }\n}\n\nexport function buildAboutme(opts: BuildAboutmeOptions): AboutMe {\n return {\n dslVersion: `dot-agent/${DSL_VERSION}`,\n id: opts.id,\n name: opts.name,\n description: opts.description,\n version: opts.version,\n domain: opts.domain,\n license: opts.license ?? '',\n persona: opts.persona,\n purpose: opts.purpose ?? 'unknown',\n compiler: opts.compiler,\n commit: opts.commit,\n capabilities: opts.capabilities ?? [],\n requires: opts.requires ?? [],\n integrity: opts.integrity,\n }\n}\n\nexport function aboutmeToJson(aboutme: AboutMe): string {\n return JSON.stringify(aboutme, null, 2)\n}\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { IdParts } from './types.js'\n\n// Code hosting platforms whose namespace format is platform/user rather than plain domain.\n// The list is maintained by the compiler and updated via CLI releases.\nexport const KNOWN_PLATFORMS = ['github.com', 'gitlab.com', 'codeberg.org', 'sr.ht'] as const\n\nfunction parseNamespaceName(identifier: string): { namespace: string; name: string } {\n // Email namespace: @ appears before any /\n const atIdx = identifier.indexOf('@')\n if (atIdx !== -1 && (identifier.indexOf('/') === -1 || atIdx < identifier.indexOf('/'))) {\n const slashIdx = identifier.indexOf('/')\n if (slashIdx === -1) {\n throw new Error(`Invalid agent ID: email namespace requires a name after '/' (got '${identifier}')`)\n }\n return {\n namespace: identifier.slice(0, slashIdx),\n name: identifier.slice(slashIdx + 1),\n }\n }\n\n // Known code-hosting platforms: namespace is platform/user, name is the next segment.\n for (const platform of KNOWN_PLATFORMS) {\n if (identifier.startsWith(platform + '/')) {\n const afterPlatform = identifier.slice(platform.length + 1)\n const slashIdx = afterPlatform.indexOf('/')\n if (slashIdx === -1) {\n throw new Error(\n `Invalid agent ID: '${platform}' namespace requires a user segment and a name (got '${identifier}')`,\n )\n }\n return {\n namespace: platform + '/' + afterPlatform.slice(0, slashIdx),\n name: afterPlatform.slice(slashIdx + 1),\n }\n }\n }\n\n // Domain or reserved keyword (e.g. 'unknown'): last '/' separates namespace from name.\n const lastSlash = identifier.lastIndexOf('/')\n if (lastSlash === -1) {\n throw new Error(`Invalid agent ID: missing '/' separator in '${identifier}'`)\n }\n return {\n namespace: identifier.slice(0, lastSlash),\n name: identifier.slice(lastSlash + 1),\n }\n}\n\nexport function parseId(id: string): IdParts {\n if (!id) throw new Error('Invalid agent ID: empty string')\n\n // Phase 1: split on the first ':' to isolate the identifier from version~digest.\n const colonIdx = id.indexOf(':')\n\n let identifier: string\n let version: string | undefined\n let digest: string | undefined\n\n if (colonIdx === -1) {\n // Form A: namespace/name\n identifier = id\n } else {\n identifier = id.slice(0, colonIdx)\n const rest = id.slice(colonIdx + 1)\n if (!rest) throw new Error(`Invalid agent ID: empty version after ':' in '${id}'`)\n\n // Phase 2: split version~digest\n const tildeIdx = rest.indexOf('~')\n if (tildeIdx === -1) {\n // Form B: namespace/name:version\n version = rest\n } else {\n // Form D: namespace/name:version~digest\n version = rest.slice(0, tildeIdx)\n digest = rest.slice(tildeIdx + 1)\n if (!version) throw new Error(`Invalid agent ID: empty version before '~' in '${id}'`)\n if (!digest) throw new Error(`Invalid agent ID: empty digest after '~' in '${id}'`)\n }\n }\n\n // Phase 3: extract namespace and name from the identifier\n const { namespace, name } = parseNamespaceName(identifier)\n\n if (!namespace) throw new Error(`Invalid agent ID: empty namespace in '${id}'`)\n if (!name) throw new Error(`Invalid agent ID: empty name in '${id}'`)\n\n return { namespace, name, version, digest }\n}\n\nexport function buildId(parts: IdParts): string {\n const { namespace, name, version, digest } = parts\n if (!namespace || !name) {\n throw new Error('Missing required ID parts: namespace and name')\n }\n if (digest && !version) {\n throw new Error('Invalid ID parts: digest requires version')\n }\n let result = `${namespace}/${name}`\n if (version) {\n result += `:${version}`\n if (digest) result += `~${digest}`\n }\n return result\n}\n\nexport function extractDigest(id: string): string {\n try {\n return parseId(id).digest ?? ''\n } catch {\n return ''\n }\n}\n\nexport function extractName(id: string): string {\n try {\n return parseId(id).name\n } catch {\n return ''\n }\n}\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport JSZip from 'jszip'\n\nexport const MAX_ZIP_SIZE = 500 * 1024 * 1024\nexport const MAX_COMPRESSION_RATIO = 100\n\nexport function validateMagicBytes(bytes: Uint8Array): void {\n if (!(bytes[0] === 0x50 && bytes[1] === 0x4b && bytes[2] === 0x03 && bytes[3] === 0x04)) {\n throw new Error('Not a valid .agent file (invalid magic bytes)')\n }\n}\n\nexport function validateZipBomb(zip: JSZip, compressedSize: number): void {\n let totalUncompressed = 0\n zip.forEach((_path, file) => {\n if (!file.dir) totalUncompressed += (file as any)._data?.uncompressedSize || 0\n })\n if (totalUncompressed > MAX_ZIP_SIZE) {\n throw new Error(`Bundle exceeds 500MB uncompressed: ${totalUncompressed}`)\n }\n if (totalUncompressed / compressedSize > MAX_COMPRESSION_RATIO) {\n throw new Error(`Compression ratio exceeds 100x: ${(totalUncompressed / compressedSize).toFixed(1)}x`)\n }\n}\n\nexport function createZip(): JSZip {\n return new JSZip()\n}\n\nexport async function extractFiles(zip: JSZip, filter?: string[]): Promise<Map<string, string>> {\n const files = new Map<string, string>()\n const promises: Promise<void>[] = []\n\n zip.forEach((relativePath, file) => {\n if (file.dir) return\n if (filter && !filter.some(f => relativePath.startsWith(f))) return\n promises.push(\n file.async('text').then(content => {\n files.set(relativePath, content)\n })\n )\n })\n\n await Promise.all(promises)\n return files\n}\n"],"mappings":";AACO,IAAM,cAAc;AACpB,IAAM,mBAAmB;;;ACSzB,SAAS,aAAa,MAAoB;AAC/C,MAAI,CAAC,KAAK,WAAY,OAAM,IAAI,MAAM,oCAAoC;AAC1E,MAAI,CAAC,KAAK,GAAI,OAAM,IAAI,MAAM,4BAA4B;AAC1D,MAAI,CAAC,KAAK,KAAM,OAAM,IAAI,MAAM,8BAA8B;AAC9D,MAAI,CAAC,KAAK,YAAa,OAAM,IAAI,MAAM,qCAAqC;AAC5E,MAAI,CAAC,KAAK,QAAS,OAAM,IAAI,MAAM,iCAAiC;AACpE,MAAI,CAAC,KAAK,OAAQ,OAAM,IAAI,MAAM,gCAAgC;AAClE,MAAI,CAAC,KAAK,QAAS,OAAM,IAAI,MAAM,iCAAiC;AACpE,MAAI,CAAC,KAAK,SAAU,OAAM,IAAI,MAAM,kCAAkC;AACtE,MAAI,CAAC,MAAM,QAAQ,KAAK,YAAY,EAAG,OAAM,IAAI,MAAM,4CAA4C;AACnG,MAAI,CAAC,MAAM,QAAQ,KAAK,QAAQ,EAAG,OAAM,IAAI,MAAM,wCAAwC;A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Q,MAAM,CAAC,MAAM,KAAQ,MAAM,CAAC,MAAM,IAAO;AACvF,UAAM,IAAI,MAAM,+CAA+C;AAAA,EACjE;AACF;AAEO,SAAS,gBAAgB,KAAY,gBAA8B;AACxE,MAAI,oBAAoB;AACxB,MAAI,QAAQ,CAAC,OAAO,SAAS;AAC3B,QAAI,CAAC,KAAK,IAAK,sBAAsB,KAAa,OAAO,oBAAoB;AAAA,EAC/E,CAAC;AACD,MAAI,oBAAoB,cAAc;AACpC,UAAM,IAAI,MAAM,sCAAsC,iBAAiB,EAAE;AAAA,EAC3E;AACA,MAAI,oBAAoB,iBAAiB,uBAAuB;AAC9D,UAAM,IAAI,MAAM,oCAAoC,oBAAoB,gBAAgB,QAAQ,CAAC,CAAC,GAAG;AAAA,EACvG;AACF;AAEO,SAAS,YAAmB;AACjC,SAAO,IAAI,MAAM;AACnB;AAEA,eAAsB,aAAa,KAAY,QAAiD;AAC9F,QAAM,QAAQ,oBAAI,IAAoB;AACtC,QAAM,WAA4B,CAAC;AAEnC,MAAI,QAAQ,CAAC,cAAc,SAAS;AAClC,QAAI,KAAK,IAAK;AACd,QAAI,UAAU,CAAC,OAAO,KAAK,OAAK,aAAa,WAAW,CAAC,CAAC,EAAG;AAC7D,aAAS;AAAA,MACP,KAAK,MAAM,MAAM,EAAE,KAAK,aAAW;AACjC,cAAM,IAAI,cAAc,OAAO;AAAA,MACjC,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AAED,QAAM,QAAQ,IAAI,QAAQ;AAC1B,SAAO;AACT;","names":[]}
|
package/dist/core-b-7c6X6q.d.cts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { AnnotatedRef } from '@dot-agent/parser-dsl';
|
|
2
|
-
import JSZip from 'jszip';
|
|
3
|
-
|
|
4
|
-
type LangId = 'description' | 'behavior';
|
|
5
|
-
|
|
6
|
-
/** Structured diagnostic from the Rust WASM parser. */
|
|
7
|
-
interface ParseDiagnostic {
|
|
8
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
9
|
-
code: string;
|
|
10
|
-
message: string;
|
|
11
|
-
hint?: string;
|
|
12
|
-
/** [line, col] 1-based, absent when position is unavailable (e.g. serde errors). */
|
|
13
|
-
start?: [number, number];
|
|
14
|
-
end?: [number, number];
|
|
15
|
-
}
|
|
16
|
-
interface LintMessage {
|
|
17
|
-
file: string;
|
|
18
|
-
line: number;
|
|
19
|
-
col: number;
|
|
20
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
hint?: string;
|
|
24
|
-
}
|
|
25
|
-
interface IdParts {
|
|
26
|
-
namespace: string;
|
|
27
|
-
name: string;
|
|
28
|
-
version?: string;
|
|
29
|
-
digest?: string;
|
|
30
|
-
}
|
|
31
|
-
interface Capability {
|
|
32
|
-
id: string;
|
|
33
|
-
description: string;
|
|
34
|
-
}
|
|
35
|
-
interface Integrity {
|
|
36
|
-
sha256: string;
|
|
37
|
-
types?: string;
|
|
38
|
-
files?: string;
|
|
39
|
-
}
|
|
40
|
-
interface AboutMe {
|
|
41
|
-
dslVersion: string;
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
description: string;
|
|
45
|
-
version: string;
|
|
46
|
-
domain: string;
|
|
47
|
-
license: string;
|
|
48
|
-
persona: string;
|
|
49
|
-
purpose: string;
|
|
50
|
-
compiler: string;
|
|
51
|
-
commit?: string;
|
|
52
|
-
capabilities: Capability[];
|
|
53
|
-
requires: AnnotatedRef[];
|
|
54
|
-
integrity: Integrity;
|
|
55
|
-
}
|
|
56
|
-
interface AgentFiles {
|
|
57
|
-
description: string;
|
|
58
|
-
behavior: string;
|
|
59
|
-
soul?: string;
|
|
60
|
-
guides: Array<{
|
|
61
|
-
path: string;
|
|
62
|
-
content: string;
|
|
63
|
-
}>;
|
|
64
|
-
knowledge: Array<{
|
|
65
|
-
path: string;
|
|
66
|
-
content: string;
|
|
67
|
-
}>;
|
|
68
|
-
behaviors: Array<{
|
|
69
|
-
path: string;
|
|
70
|
-
content: string;
|
|
71
|
-
}>;
|
|
72
|
-
}
|
|
73
|
-
interface AgentBundle {
|
|
74
|
-
id: string;
|
|
75
|
-
aboutme: AboutMe;
|
|
76
|
-
files: AgentFiles;
|
|
77
|
-
}
|
|
78
|
-
interface PackOptions {
|
|
79
|
-
dir?: string;
|
|
80
|
-
out?: string;
|
|
81
|
-
commit?: string;
|
|
82
|
-
version?: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
}
|
|
85
|
-
interface PackResult {
|
|
86
|
-
path: string;
|
|
87
|
-
id: string;
|
|
88
|
-
warnings: LintMessage[];
|
|
89
|
-
}
|
|
90
|
-
interface BuildAboutmeOptions {
|
|
91
|
-
id: string;
|
|
92
|
-
name: string;
|
|
93
|
-
description: string;
|
|
94
|
-
version: string;
|
|
95
|
-
domain: string;
|
|
96
|
-
license?: string;
|
|
97
|
-
persona: string;
|
|
98
|
-
purpose?: string;
|
|
99
|
-
compiler: string;
|
|
100
|
-
commit?: string;
|
|
101
|
-
capabilities?: Capability[];
|
|
102
|
-
requires?: AnnotatedRef[];
|
|
103
|
-
integrity: Integrity;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
declare function parseAboutme(json: any): AboutMe;
|
|
107
|
-
declare function buildAboutme(opts: BuildAboutmeOptions): AboutMe;
|
|
108
|
-
declare function aboutmeToJson(aboutme: AboutMe): string;
|
|
109
|
-
|
|
110
|
-
declare function parseId(id: string): IdParts;
|
|
111
|
-
declare function buildId(parts: IdParts): string;
|
|
112
|
-
declare function extractDigest(id: string): string;
|
|
113
|
-
declare function extractName(id: string): string;
|
|
114
|
-
|
|
115
|
-
declare function validateMagicBytes(bytes: Uint8Array): void;
|
|
116
|
-
declare function validateZipBomb(zip: JSZip, compressedSize: number): void;
|
|
117
|
-
declare function createZip(): JSZip;
|
|
118
|
-
declare function extractFiles(zip: JSZip, filter?: string[]): Promise<Map<string, string>>;
|
|
119
|
-
|
|
120
|
-
export { type AgentBundle as A, type BuildAboutmeOptions as B, type Capability as C, type IdParts as I, type LangId as L, type ParseDiagnostic as P, type LintMessage as a, type PackOptions as b, type PackResult as c, type AboutMe as d, type AgentFiles as e, type Integrity as f, aboutmeToJson as g, buildAboutme as h, buildId as i, createZip as j, extractDigest as k, extractFiles as l, extractName as m, parseId as n, validateZipBomb as o, parseAboutme as p, validateMagicBytes as v };
|
package/dist/core-b-7c6X6q.d.ts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { AnnotatedRef } from '@dot-agent/parser-dsl';
|
|
2
|
-
import JSZip from 'jszip';
|
|
3
|
-
|
|
4
|
-
type LangId = 'description' | 'behavior';
|
|
5
|
-
|
|
6
|
-
/** Structured diagnostic from the Rust WASM parser. */
|
|
7
|
-
interface ParseDiagnostic {
|
|
8
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
9
|
-
code: string;
|
|
10
|
-
message: string;
|
|
11
|
-
hint?: string;
|
|
12
|
-
/** [line, col] 1-based, absent when position is unavailable (e.g. serde errors). */
|
|
13
|
-
start?: [number, number];
|
|
14
|
-
end?: [number, number];
|
|
15
|
-
}
|
|
16
|
-
interface LintMessage {
|
|
17
|
-
file: string;
|
|
18
|
-
line: number;
|
|
19
|
-
col: number;
|
|
20
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
hint?: string;
|
|
24
|
-
}
|
|
25
|
-
interface IdParts {
|
|
26
|
-
namespace: string;
|
|
27
|
-
name: string;
|
|
28
|
-
version?: string;
|
|
29
|
-
digest?: string;
|
|
30
|
-
}
|
|
31
|
-
interface Capability {
|
|
32
|
-
id: string;
|
|
33
|
-
description: string;
|
|
34
|
-
}
|
|
35
|
-
interface Integrity {
|
|
36
|
-
sha256: string;
|
|
37
|
-
types?: string;
|
|
38
|
-
files?: string;
|
|
39
|
-
}
|
|
40
|
-
interface AboutMe {
|
|
41
|
-
dslVersion: string;
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
description: string;
|
|
45
|
-
version: string;
|
|
46
|
-
domain: string;
|
|
47
|
-
license: string;
|
|
48
|
-
persona: string;
|
|
49
|
-
purpose: string;
|
|
50
|
-
compiler: string;
|
|
51
|
-
commit?: string;
|
|
52
|
-
capabilities: Capability[];
|
|
53
|
-
requires: AnnotatedRef[];
|
|
54
|
-
integrity: Integrity;
|
|
55
|
-
}
|
|
56
|
-
interface AgentFiles {
|
|
57
|
-
description: string;
|
|
58
|
-
behavior: string;
|
|
59
|
-
soul?: string;
|
|
60
|
-
guides: Array<{
|
|
61
|
-
path: string;
|
|
62
|
-
content: string;
|
|
63
|
-
}>;
|
|
64
|
-
knowledge: Array<{
|
|
65
|
-
path: string;
|
|
66
|
-
content: string;
|
|
67
|
-
}>;
|
|
68
|
-
behaviors: Array<{
|
|
69
|
-
path: string;
|
|
70
|
-
content: string;
|
|
71
|
-
}>;
|
|
72
|
-
}
|
|
73
|
-
interface AgentBundle {
|
|
74
|
-
id: string;
|
|
75
|
-
aboutme: AboutMe;
|
|
76
|
-
files: AgentFiles;
|
|
77
|
-
}
|
|
78
|
-
interface PackOptions {
|
|
79
|
-
dir?: string;
|
|
80
|
-
out?: string;
|
|
81
|
-
commit?: string;
|
|
82
|
-
version?: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
}
|
|
85
|
-
interface PackResult {
|
|
86
|
-
path: string;
|
|
87
|
-
id: string;
|
|
88
|
-
warnings: LintMessage[];
|
|
89
|
-
}
|
|
90
|
-
interface BuildAboutmeOptions {
|
|
91
|
-
id: string;
|
|
92
|
-
name: string;
|
|
93
|
-
description: string;
|
|
94
|
-
version: string;
|
|
95
|
-
domain: string;
|
|
96
|
-
license?: string;
|
|
97
|
-
persona: string;
|
|
98
|
-
purpose?: string;
|
|
99
|
-
compiler: string;
|
|
100
|
-
commit?: string;
|
|
101
|
-
capabilities?: Capability[];
|
|
102
|
-
requires?: AnnotatedRef[];
|
|
103
|
-
integrity: Integrity;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
declare function parseAboutme(json: any): AboutMe;
|
|
107
|
-
declare function buildAboutme(opts: BuildAboutmeOptions): AboutMe;
|
|
108
|
-
declare function aboutmeToJson(aboutme: AboutMe): string;
|
|
109
|
-
|
|
110
|
-
declare function parseId(id: string): IdParts;
|
|
111
|
-
declare function buildId(parts: IdParts): string;
|
|
112
|
-
declare function extractDigest(id: string): string;
|
|
113
|
-
declare function extractName(id: string): string;
|
|
114
|
-
|
|
115
|
-
declare function validateMagicBytes(bytes: Uint8Array): void;
|
|
116
|
-
declare function validateZipBomb(zip: JSZip, compressedSize: number): void;
|
|
117
|
-
declare function createZip(): JSZip;
|
|
118
|
-
declare function extractFiles(zip: JSZip, filter?: string[]): Promise<Map<string, string>>;
|
|
119
|
-
|
|
120
|
-
export { type AgentBundle as A, type BuildAboutmeOptions as B, type Capability as C, type IdParts as I, type LangId as L, type ParseDiagnostic as P, type LintMessage as a, type PackOptions as b, type PackResult as c, type AboutMe as d, type AgentFiles as e, type Integrity as f, aboutmeToJson as g, buildAboutme as h, buildId as i, createZip as j, extractDigest as k, extractFiles as l, extractName as m, parseId as n, validateZipBomb as o, parseAboutme as p, validateMagicBytes as v };
|
package/dist/core.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core.ts","../src/generated-version.ts","../src/manifest.ts","../src/id.ts","../src/zip-core.ts"],"sourcesContent":["// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Browser-safe sub-path export — no Node.js dependencies.\n// Import via: import { ... } from '@dot-agent/compiler/core'\n\nexport { parseAboutme, buildAboutme, aboutmeToJson } from './manifest.js'\nexport { parseId, buildId, extractDigest, extractName } from './id.js'\nexport { createZip, extractFiles, validateMagicBytes, validateZipBomb } from './zip-core.js'\n\nexport type {\n AboutMe,\n AgentBundle,\n AgentFiles,\n Capability,\n AnnotatedRef,\n DescriptionFile,\n Integrity,\n BuildAboutmeOptions,\n IdParts,\n LintMessage,\n} from './types.js'\n","// Generated by scripts/embed-version.mjs from dsl/VERSION and package.json — do not edit by hand.\nexport const DSL_VERSION = '0.1-alpha'\nexport const COMPILER_VERSION = '0.5.0-alpha.2'\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n\nimport type { AboutMe, BuildAboutmeOptions } from './types.js'\nimport { DSL_VERSION } from './generated-version.js'\n\nexport function parseAboutme(json: any): AboutMe {\n if (!json.dslVersion) throw new Error('Missing dslVersion in aboutme.json')\n if (!json.id) throw new Error('Missing id in aboutme.json')\n if (!json.name) throw new Error('Missing name in aboutme.json')\n if (!json.description) throw new Error('Missing description in aboutme.json')\n if (!json.version) throw new Error('Missing version in aboutme.json')\n if (!json.domain) throw new Error('Missing domain in aboutme.json')\n if (!json.persona) throw new Error('Missing persona in aboutme.json')\n if (!json.compiler) throw new Error('Missing compiler in aboutme.json')\n if (!Array.isArray(json.capabilities)) throw new Error('Missing capabilities array in aboutme.json')\n if (!Array.isArray(json.requires)) throw new Error('Missing requires array in aboutme.json')\n if (!json.integrity) throw new Error('Missing integrity in aboutme.json')\n\n return {\n dslVersion: json.dslVersion,\n id: json.id,\n name: json.name,\n description: json.description,\n version: json.version,\n domain: json.domain,\n license: json.license ?? '',\n persona: json.persona,\n purpose: json.purpose ?? 'unknown',\n compiler: json.compiler,\n commit: json.commit,\n capabilities: json.capabilities,\n requires: json.requires,\n integrity: json.integrity,\n }\n}\n\nexport function buildAboutme(opts: BuildAboutmeOptions): AboutMe {\n return {\n dslVersion: `dot-agent/${DSL_VERSION}`,\n id: opts.id,\n name: opts.name,\n description: opts.description,\n version: opts.version,\n domain: opts.domain,\n license: opts.license ?? '',\n persona: opts.persona,\n purpose: opts.purpose ?? 'unknown',\n compiler: opts.compiler,\n commit: opts.commit,\n capabilities: opts.capabilities ?? [],\n requires: opts.requires ?? [],\n integrity: opts.integrity,\n }\n}\n\nexport function aboutmeToJson(aboutme: AboutMe): string {\n return JSON.stringify(aboutme, null, 2)\n}\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { IdParts } from './types.js'\n\n// Code hosting platforms whose namespace format is platform/user rather than plain domain.\n// The list is maintained by the compiler and updated via CLI releases.\nexport const KNOWN_PLATFORMS = ['github.com', 'gitlab.com', 'codeberg.org', 'sr.ht'] as const\n\nfunction parseNamespaceName(identifier: string): { namespace: string; name: string } {\n // Email namespace: @ appears before any /\n const atIdx = identifier.indexOf('@')\n if (atIdx !== -1 && (identifier.indexOf('/') === -1 || atIdx < identifier.indexOf('/'))) {\n const slashIdx = identifier.indexOf('/')\n if (slashIdx === -1) {\n throw new Error(`Invalid agent ID: email namespace requires a name after '/' (got '${identifier}')`)\n }\n return {\n namespace: identifier.slice(0, slashIdx),\n name: identifier.slice(slashIdx + 1),\n }\n }\n\n // Known code-hosting platforms: namespace is platform/user, name is the next segment.\n for (const platform of KNOWN_PLATFORMS) {\n if (identifier.startsWith(platform + '/')) {\n const afterPlatform = identifier.slice(platform.length + 1)\n const slashIdx = afterPlatform.indexOf('/')\n if (slashIdx === -1) {\n throw new Error(\n `Invalid agent ID: '${platform}' namespace requires a user segment and a name (got '${identifier}')`,\n )\n }\n return {\n namespace: platform + '/' + afterPlatform.slice(0, slashIdx),\n name: afterPlatform.slice(slashIdx + 1),\n }\n }\n }\n\n // Domain or reserved keyword (e.g. 'unknown'): last '/' separates namespace from name.\n const lastSlash = identifier.lastIndexOf('/')\n if (lastSlash === -1) {\n throw new Error(`Invalid agent ID: missing '/' separator in '${identifier}'`)\n }\n return {\n namespace: identifier.slice(0, lastSlash),\n name: identifier.slice(lastSlash + 1),\n }\n}\n\nexport function parseId(id: string): IdParts {\n if (!id) throw new Error('Invalid agent ID: empty string')\n\n // Phase 1: split on the first ':' to isolate the identifier from version~digest.\n const colonIdx = id.indexOf(':')\n\n let identifier: string\n let version: string | undefined\n let digest: string | undefined\n\n if (colonIdx === -1) {\n // Form A: namespace/name\n identifier = id\n } else {\n identifier = id.slice(0, colonIdx)\n const rest = id.slice(colonIdx + 1)\n if (!rest) throw new Error(`Invalid agent ID: empty version after ':' in '${id}'`)\n\n // Phase 2: split version~digest\n const tildeIdx = rest.indexOf('~')\n if (tildeIdx === -1) {\n // Form B: namespace/name:version\n version = rest\n } else {\n // Form D: namespace/name:version~digest\n version = rest.slice(0, tildeIdx)\n digest = rest.slice(tildeIdx + 1)\n if (!version) throw new Error(`Invalid agent ID: empty version before '~' in '${id}'`)\n if (!digest) throw new Error(`Invalid agent ID: empty digest after '~' in '${id}'`)\n }\n }\n\n // Phase 3: extract namespace and name from the identifier\n const { namespace, name } = parseNamespaceName(identifier)\n\n if (!namespace) throw new Error(`Invalid agent ID: empty namespace in '${id}'`)\n if (!name) throw new Error(`Invalid agent ID: empty name in '${id}'`)\n\n return { namespace, name, version, digest }\n}\n\nexport function buildId(parts: IdParts): string {\n const { namespace, name, version, digest } = parts\n if (!namespace || !name) {\n throw new Error('Missing required ID parts: namespace and name')\n }\n if (digest && !version) {\n throw new Error('Invalid ID parts: digest requires version')\n }\n let result = `${namespace}/${name}`\n if (version) {\n result += `:${version}`\n if (digest) result += `~${digest}`\n }\n return result\n}\n\nexport function extractDigest(id: string): string {\n try {\n return parseId(id).digest ?? ''\n } catch {\n return ''\n }\n}\n\nexport function extractName(id: string): string {\n try {\n return parseId(id).name\n } catch {\n return ''\n }\n}\n","// Copyright 2026 Danilo Borges\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport JSZip from 'jszip'\n\nexport const MAX_ZIP_SIZE = 500 * 1024 * 1024\nexport const MAX_COMPRESSION_RATIO = 100\n\nexport function validateMagicBytes(bytes: Uint8Array): void {\n if (!(bytes[0] === 0x50 && bytes[1] === 0x4b && bytes[2] === 0x03 && bytes[3] === 0x04)) {\n throw new Error('Not a valid .agent file (invalid magic bytes)')\n }\n}\n\nexport function validateZipBomb(zip: JSZip, compressedSize: number): void {\n let totalUncompressed = 0\n zip.forEach((_path, file) => {\n if (!file.dir) totalUncompressed += (file as any)._data?.uncompressedSize || 0\n })\n if (totalUncompressed > MAX_ZIP_SIZE) {\n throw new Error(`Bundle exceeds 500MB uncompressed: ${totalUncompressed}`)\n }\n if (totalUncompressed / compressedSize > MAX_COMPRESSION_RATIO) {\n throw new Error(`Compression ratio exceeds 100x: ${(totalUncompressed / compressedSize).toFixed(1)}x`)\n }\n}\n\nexport function createZip(): JSZip {\n return new JSZip()\n}\n\nexport async function extractFiles(zip: JSZip, filter?: string[]): Promise<Map<string, string>> {\n const files = new Map<string, string>()\n const promises: Promise<void>[] = []\n\n zip.forEach((relativePath, file) => {\n if (file.dir) return\n if (filter && !filter.some(f => relativePath.startsWith(f))) return\n promises.push(\n file.async('text').then(content => {\n files.set(relativePath, content)\n })\n )\n })\n\n await Promise.all(promises)\n return files\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAM,cAAc;;;ACUpB,SAAS,aAAa,MAAoB;AAC/C,MAAI,CAAC,KAAK,WAAY,OAAM,IAAI,MAAM,oCAAoC;AAC1E,MAAI,CAAC,KAAK,GAAI,OAAM,IAAI,MAAM,4BAA4B;AAC1D,MAAI,CAAC,KAAK,KAAM,OAAM,IAAI,MAAM,8BAA8B;AAC9D,MAAI,CAAC,KAAK,YAAa,OAAM,IAAI,MAAM,qCAAqC;AAC5E,MAAI,CAAC,KAAK,QAAS,OAAM,IAAI,MAAM,iCAAiC;AACpE,MAAI,CAAC,KAAK,OAAQ,OAAM,IAAI,MAAM,gCAAgC;AAClE,MAAI,CAAC,KAAK,QAAS,OAAM,IAAI,MAAM,iCAAiC;AACpE,MAAI,CAAC,KAAK,SAAU,OAAM,IAAI,MAAM,kCAAkC;AACtE,MAAI,CAAC,MAAM,QAAQ,KAAK,YAAY,EAAG,OAAM,IAAI,MAAM,4CAA4C;AACnG,MAAI,CAAC,MAAM,QAAQ,KAAK,QAAQ,EAAG,OAAM,IAAI,MAAM,wCAAwC;AAC3F,MAAI,CAAC,KAAK,UAAW,OAAM,IAAI,MAAM,mCAAmC;AAExE,SAAO;AAAA,IACL,YAAY,KAAK;AAAA,IACjB,IAAI,KAAK;AAAA,IACT,MAAM,KAAK;AAAA,IACX,aAAa,KAAK;AAAA,IAClB,SAAS,KAAK;AAAA,IACd,QAAQ,KAAK;AAAA,IACb,SAAS,KAAK,WAAW;AAAA,IACzB,SAAS,KAAK;AAAA,IACd,SAAS,KAAK,WAAW;AAAA,IACzB,UAAU,KAAK;AAAA,IACf,QAAQ,KAAK;AAAA,IACb,cAAc,KA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A,MAAI,oBAAoB,iBAAiB,uBAAuB;AAC9D,UAAM,IAAI,MAAM,oCAAoC,oBAAoB,gBAAgB,QAAQ,CAAC,CAAC,GAAG;AAAA,EACvG;AACF;AAEO,SAAS,YAAmB;AACjC,SAAO,IAAI,aAAAA,QAAM;AACnB;AAEA,eAAsB,aAAa,KAAY,QAAiD;AAC9F,QAAM,QAAQ,oBAAI,IAAoB;AACtC,QAAM,WAA4B,CAAC;AAEnC,MAAI,QAAQ,CAAC,cAAc,SAAS;AAClC,QAAI,KAAK,IAAK;AACd,QAAI,UAAU,CAAC,OAAO,KAAK,OAAK,aAAa,WAAW,CAAC,CAAC,EAAG;AAC7D,aAAS;AAAA,MACP,KAAK,MAAM,MAAM,EAAE,KAAK,aAAW;AACjC,cAAM,IAAI,cAAc,OAAO;AAAA,MACjC,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AAED,QAAM,QAAQ,IAAI,QAAQ;AAC1B,SAAO;AACT;","names":["JSZip"]}
|
package/dist/core.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { d as AboutMe, A as AgentBundle, e as AgentFiles, B as BuildAboutmeOptions, C as Capability, I as IdParts, f as Integrity, a as LintMessage, g as aboutmeToJson, h as buildAboutme, i as buildId, j as createZip, k as extractDigest, l as extractFiles, m as extractName, p as parseAboutme, n as parseId, v as validateMagicBytes, o as validateZipBomb } from './core-b-7c6X6q.js';
|
|
2
|
-
export { AnnotatedRef, DescriptionFile } from '@dot-agent/parser-dsl';
|
|
3
|
-
import 'jszip';
|
package/dist/core.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
aboutmeToJson,
|
|
3
|
-
buildAboutme,
|
|
4
|
-
buildId,
|
|
5
|
-
createZip,
|
|
6
|
-
extractDigest,
|
|
7
|
-
extractFiles,
|
|
8
|
-
extractName,
|
|
9
|
-
parseAboutme,
|
|
10
|
-
parseId,
|
|
11
|
-
validateMagicBytes,
|
|
12
|
-
validateZipBomb
|
|
13
|
-
} from "./chunk-P5LFGJ6P.js";
|
|
14
|
-
export {
|
|
15
|
-
aboutmeToJson,
|
|
16
|
-
buildAboutme,
|
|
17
|
-
buildId,
|
|
18
|
-
createZip,
|
|
19
|
-
extractDigest,
|
|
20
|
-
extractFiles,
|
|
21
|
-
extractName,
|
|
22
|
-
parseAboutme,
|
|
23
|
-
parseId,
|
|
24
|
-
validateMagicBytes,
|
|
25
|
-
validateZipBomb
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Tree, Node } from 'web-tree-sitter';
|
|
2
|
-
import { L as LangId, P as ParseDiagnostic, a as LintMessage, b as PackOptions, c as PackResult, A as AgentBundle } from './core-b-7c6X6q.js';
|
|
3
|
-
export { d as AboutMe, e as AgentFiles, B as BuildAboutmeOptions, C as Capability, I as IdParts, f as Integrity, g as aboutmeToJson, h as buildAboutme, i as buildId, j as createZip, k as extractDigest, l as extractFiles, m as extractName, p as parseAboutme, n as parseId } from './core-b-7c6X6q.js';
|
|
4
|
-
import { BehaviorFile, DescriptionFile } from '@dot-agent/parser-dsl';
|
|
5
|
-
export { AgentDecl, AnnotatedRef, BehaviorFile, DescriptionFile, OntologyRef, PropertyDecl, PropertyType, StateDef, Statement, TriggerDecl, TypeDefinition } from '@dot-agent/parser-dsl';
|
|
6
|
-
import JSZip from 'jszip';
|
|
7
|
-
|
|
8
|
-
declare function initBehaviorParser(): Promise<void>;
|
|
9
|
-
interface ParseResult<T> {
|
|
10
|
-
ok: T | null;
|
|
11
|
-
diagnostics: ParseDiagnostic[];
|
|
12
|
-
}
|
|
13
|
-
declare function parseBehaviorFile(text: string): ParseResult<BehaviorFile>;
|
|
14
|
-
declare function parseDescriptionFile(text: string): ParseResult<DescriptionFile>;
|
|
15
|
-
declare function getBehaviorScxml(text: string): string;
|
|
16
|
-
declare function initParsers(): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Parse source text and return a tree-sitter Tree.
|
|
19
|
-
*
|
|
20
|
-
* @param langId - 'description' or 'behavior'
|
|
21
|
-
* @param text - source text to parse
|
|
22
|
-
* @param previousTree - optional previous tree for incremental parsing (LSP use)
|
|
23
|
-
*/
|
|
24
|
-
declare function parse(langId: LangId, text: string, previousTree?: Tree): Promise<Tree>;
|
|
25
|
-
/** Parse without initializing if parsers are already ready. Returns null if not initialized. */
|
|
26
|
-
declare function parseSync(langId: LangId, text: string, previousTree?: Tree): Tree | null;
|
|
27
|
-
declare function nodesOfType(tree: Tree, type: string): Node[];
|
|
28
|
-
declare function nodeAtOffset(tree: Tree, offset: number): Node | null;
|
|
29
|
-
declare function nodeToRange(node: Node): {
|
|
30
|
-
start: {
|
|
31
|
-
line: number;
|
|
32
|
-
character: number;
|
|
33
|
-
};
|
|
34
|
-
end: {
|
|
35
|
-
line: number;
|
|
36
|
-
character: number;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
declare function positionToOffset(text: string, line: number, character: number): number;
|
|
40
|
-
declare function getContextNode(tree: Tree, offset: number): Node;
|
|
41
|
-
|
|
42
|
-
declare function lintDescription(text: string, file?: string): Promise<LintMessage[]>;
|
|
43
|
-
declare function lintBehavior(text: string, file?: string, docPath?: string, consolidated?: boolean, externalStates?: Set<string>, mergedText?: string): Promise<LintMessage[]>;
|
|
44
|
-
declare function createLinter(): Promise<{
|
|
45
|
-
lintDescription: typeof lintDescription;
|
|
46
|
-
lintBehavior: typeof lintBehavior;
|
|
47
|
-
}>;
|
|
48
|
-
|
|
49
|
-
declare function readZip(filePath: string): Promise<JSZip>;
|
|
50
|
-
declare function validateZipBomb(filePath: string): Promise<boolean>;
|
|
51
|
-
declare function validateMagicBytes(filePath: string): Promise<boolean>;
|
|
52
|
-
declare function writeZip(zip: JSZip, outPath: string): Promise<void>;
|
|
53
|
-
|
|
54
|
-
interface ConsolidateResult {
|
|
55
|
-
mergedText: string;
|
|
56
|
-
mergeSources: string[];
|
|
57
|
-
}
|
|
58
|
-
declare function consolidate(agentRoot: string, entryFile: string): Promise<ConsolidateResult>;
|
|
59
|
-
declare function collectFiles(dir: string, descriptionFile: string, mergedBehaviorText: string, mergeSources: string[]): Promise<Map<string, string>>;
|
|
60
|
-
declare function pack(options?: PackOptions): Promise<PackResult>;
|
|
61
|
-
|
|
62
|
-
declare function bundleFromDir(dir: string): Promise<AgentBundle>;
|
|
63
|
-
|
|
64
|
-
export { AgentBundle, LangId, LintMessage, PackOptions, PackResult, bundleFromDir, collectFiles, consolidate, createLinter, getBehaviorScxml, getContextNode, initBehaviorParser, initParsers, lintBehavior, lintDescription, nodeAtOffset, nodeToRange, nodesOfType, pack, parse, parseBehaviorFile, parseDescriptionFile, parseSync, positionToOffset, readZip, validateMagicBytes, validateZipBomb, writeZip };
|