@maycombhq/sdk 2.0.0-beta.1 → 2.0.0-beta.3

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.
Files changed (87) hide show
  1. package/{dist → npm}/cache.d.ts +1 -1
  2. package/npm/core/api.d.ts +6098 -0
  3. package/npm/core/assistant-actor.d.ts +15 -0
  4. package/npm/core/branches.d.ts +21 -0
  5. package/npm/core/cancel.d.ts +9 -0
  6. package/npm/core/catalog.d.ts +4733 -0
  7. package/npm/core/change-types-migrate.d.ts +10 -0
  8. package/npm/core/cite.d.ts +54 -0
  9. package/npm/core/curated.d.ts +37 -0
  10. package/npm/core/facts-callers.d.ts +150 -0
  11. package/npm/core/facts-carry.d.ts +36 -0
  12. package/npm/core/facts-join-prototype.d.ts +177 -0
  13. package/npm/core/facts-join-vendor.d.ts +92 -0
  14. package/npm/core/facts-join.d.ts +256 -0
  15. package/npm/core/facts.d.ts +94 -0
  16. package/npm/core/fs.d.ts +47 -0
  17. package/npm/core/gates-migrate.d.ts +10 -0
  18. package/npm/core/host-questions.d.ts +24 -0
  19. package/npm/core/identity.d.ts +17 -0
  20. package/npm/core/index.d.ts +62 -0
  21. package/npm/core/json-schema.d.ts +20 -0
  22. package/npm/core/judgments.d.ts +63 -0
  23. package/npm/core/light.d.ts +8 -0
  24. package/npm/core/log.d.ts +49 -0
  25. package/npm/core/manifest-edit.d.ts +48 -0
  26. package/npm/core/merge.d.ts +78 -0
  27. package/npm/core/metarepo.d.ts +83 -0
  28. package/npm/core/migrate.d.ts +31 -0
  29. package/npm/core/migration-files.d.ts +13 -0
  30. package/npm/core/orgpack-defaults.d.ts +194 -0
  31. package/npm/core/orgpack-load.d.ts +86 -0
  32. package/npm/core/questions.d.ts +267 -0
  33. package/npm/core/record-cache.d.ts +52 -0
  34. package/npm/core/refs.d.ts +9 -0
  35. package/npm/core/repo-description.d.ts +44 -0
  36. package/npm/core/runtime-migrate.d.ts +11 -0
  37. package/npm/core/schema/ai.d.ts +397 -0
  38. package/npm/core/schema/change.d.ts +244 -0
  39. package/npm/core/schema/common.d.ts +135 -0
  40. package/npm/core/schema/dialect.d.ts +801 -0
  41. package/npm/core/schema/executors.d.ts +396 -0
  42. package/npm/core/schema/fact-corrections.d.ts +55 -0
  43. package/npm/core/schema/facts.d.ts +1476 -0
  44. package/npm/core/schema/frameworks.d.ts +371 -0
  45. package/npm/core/schema/judgment.d.ts +77 -0
  46. package/npm/core/schema/kinds.d.ts +5166 -0
  47. package/npm/core/schema/layout.d.ts +25 -0
  48. package/npm/core/schema/orgpack.d.ts +1167 -0
  49. package/npm/core/schema/plugin.d.ts +73 -0
  50. package/npm/core/schema/question.d.ts +152 -0
  51. package/npm/core/schema/repo-type.d.ts +109 -0
  52. package/npm/core/schema/review.d.ts +558 -0
  53. package/npm/core/schema/scan-settings.d.ts +34 -0
  54. package/npm/core/schema/scan-verify.d.ts +535 -0
  55. package/npm/core/schema/spec.d.ts +269 -0
  56. package/npm/core/schema/version.d.ts +9 -0
  57. package/npm/core/schema/workspace.d.ts +312 -0
  58. package/npm/core/serialize.d.ts +17 -0
  59. package/npm/core/sources-migrate.d.ts +15 -0
  60. package/npm/core/specs.d.ts +66 -0
  61. package/npm/core/tar-read.d.ts +13 -0
  62. package/npm/core/template.d.ts +101 -0
  63. package/npm/core/words.d.ts +13 -0
  64. package/npm/core/zip-read.d.ts +37 -0
  65. package/npm/core/zip.d.ts +13 -0
  66. package/npm/index.js +8892 -0
  67. package/{dist → npm}/plugin.d.ts +1 -1
  68. package/{dist → npm}/runner.d.ts +1 -1
  69. package/package.json +10 -11
  70. package/dist/cache.js +0 -115
  71. package/dist/cache.js.map +0 -1
  72. package/dist/fs-repo.js +0 -120
  73. package/dist/fs-repo.js.map +0 -1
  74. package/dist/index.js +0 -7
  75. package/dist/index.js.map +0 -1
  76. package/dist/parse-cache.js +0 -275
  77. package/dist/parse-cache.js.map +0 -1
  78. package/dist/plugin.js +0 -85
  79. package/dist/plugin.js.map +0 -1
  80. package/dist/runner.js +0 -209
  81. package/dist/runner.js.map +0 -1
  82. package/dist/sandbox.js +0 -443
  83. package/dist/sandbox.js.map +0 -1
  84. /package/{dist → npm}/fs-repo.d.ts +0 -0
  85. /package/{dist → npm}/index.d.ts +0 -0
  86. /package/{dist → npm}/parse-cache.d.ts +0 -0
  87. /package/{dist → npm}/sandbox.d.ts +0 -0
package/dist/sandbox.js DELETED
@@ -1,443 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { readFile } from "node:fs/promises";
3
- import { join } from "node:path";
4
- import { Worker } from "node:worker_threads";
5
- /** Plugins' records carry this prefix on their extractor id, so they can't pose as a built-in. */
6
- export const PLUGIN_EXTRACTOR_PREFIX = "plugin-";
7
- /** Most records one plugin run may return; more is a runaway plugin. */
8
- const MAX_RECORDS = 100_000;
9
- /** The sha256 of an entry file, with line endings normalised so every checkout agrees. */
10
- export function pluginEntryHash(text) {
11
- return createHash("sha256").update(text.replace(/\r\n/g, "\n"), "utf8").digest("hex");
12
- }
13
- /** Read a plugin's entry file, refusing one that isn't pinned or changed after it was pinned. */
14
- export async function readPinnedEntry(dir, manifest) {
15
- if (!manifest.sha256)
16
- return { ok: false, message: "isn't pinned: run atticus plugin pin once it is reviewed" };
17
- let source;
18
- try {
19
- source = await readFile(join(dir, ...manifest.entry.split("/")), "utf8");
20
- }
21
- catch (e) {
22
- return { ok: false, message: `can't read ${manifest.entry}: ${e.message}` };
23
- }
24
- if (pluginEntryHash(source) !== manifest.sha256)
25
- return {
26
- ok: false,
27
- message: `${manifest.entry} changed after it was pinned: its sha256 isn't the one in plugin.yaml. Review the change, then run atticus plugin pin`,
28
- };
29
- return { ok: true, source };
30
- }
31
- /** Why a plugin run stopped, for the scan's problems. */
32
- export class PluginRunError extends Error {
33
- reason;
34
- constructor(message, reason) {
35
- super(message);
36
- this.reason = reason;
37
- this.name = "PluginRunError";
38
- }
39
- }
40
- /** A repo-relative path or glob: never absolute, never `..`, forward slashes only. */
41
- function insideRepo(p) {
42
- return (p.length > 0 &&
43
- !p.startsWith("/") &&
44
- !/^[A-Za-z]:/.test(p) &&
45
- !p.includes("\\") &&
46
- !p.includes("\0") &&
47
- !p.split("/").includes(".."));
48
- }
49
- /**
50
- * Runs inside the sandbox's context before the plugin: freezes the built-ins, puts reporting
51
- * stubs where Node's globals and the Function constructors were, and returns the two functions
52
- * the worker drives the plugin with. `host` (the worker's function) is only ever called with
53
- * strings and numbers, and never handed to plugin code: the plugin only ever sees objects made
54
- * in its own context.
55
- */
56
- const HARDEN = String.raw ` "use strict";
57
- const g = globalThis;
58
- const send = host;
59
- const blocked = (what) => {
60
- send("violation", 0, String(what));
61
- return new Error("blocked: " + what + " is not allowed in a scanner plugin");
62
- };
63
- // Code from strings: the constructors every function reaches, and eval.
64
- const compileStub = function () { throw blocked("compile code from a string (eval or Function)"); };
65
- for (const f of [function () {}, async function () {}, function* () {}, async function* () {}])
66
- Object.defineProperty(Object.getPrototypeOf(f), "constructor", { value: compileStub });
67
- Object.defineProperty(g, "Function", { value: compileStub });
68
- Object.defineProperty(g, "eval", { value: compileStub });
69
- // Node's way out of the sandbox, if it were there: reported when touched.
70
- for (const name of ["require", "process", "module", "exports", "Buffer", "fetch", "XMLHttpRequest",
71
- "WebSocket", "setTimeout", "setInterval", "setImmediate", "queueMicrotask", "WebAssembly",
72
- "SharedArrayBuffer", "Atomics"]) {
73
- Object.defineProperty(g, name, { get() { throw blocked("use " + name); }, configurable: false });
74
- }
75
- // The same commit must read the same (ADR 0074): no clock, no randomness.
76
- Object.defineProperty(g, "Date", { get() { throw blocked("use Date (the scan's time is ctx.scannedAt)"); }, configurable: false });
77
- Object.defineProperty(Math, "random", { value: function () { throw blocked("use Math.random"); } });
78
- const noop = () => undefined;
79
- Object.defineProperty(g, "console", { value: Object.freeze({ log: noop, info: noop, warn: noop, error: noop, debug: noop }) });
80
- // Freeze what the plugin and this bootstrap share, so neither can be changed under the other.
81
- const seen = new Set();
82
- const freeze = (o) => {
83
- if ((typeof o !== "object" && typeof o !== "function") || o === null || seen.has(o)) return;
84
- seen.add(o);
85
- Object.freeze(o);
86
- for (const k of Reflect.ownKeys(o)) {
87
- const d = Object.getOwnPropertyDescriptor(o, k);
88
- if (d && "value" in d) freeze(d.value);
89
- }
90
- freeze(Object.getPrototypeOf(o));
91
- };
92
- for (const k of Reflect.ownKeys(g)) {
93
- const d = Object.getOwnPropertyDescriptor(g, k);
94
- if (d && "value" in d) freeze(d.value);
95
- }
96
- for (const f of [function () {}, async function () {}, function* () {}, async function* () {}])
97
- freeze(Object.getPrototypeOf(f));
98
- for (const f of [function* () {}, async function* () {}]) freeze(Object.getPrototypeOf(f()));
99
- freeze(Object.getPrototypeOf([][Symbol.iterator]()));
100
- freeze(Object.getPrototypeOf(new Map()[Symbol.iterator]()));
101
- freeze(Object.getPrototypeOf(new Set()[Symbol.iterator]()));
102
- freeze(Object.getPrototypeOf(""[Symbol.iterator]()));
103
- freeze(Object.getPrototypeOf(/x/[Symbol.matchAll]("")));
104
- Object.freeze(g);
105
-
106
- const parse = JSON.parse;
107
- const stringify = JSON.stringify;
108
- const pending = new Map();
109
- let next = 0;
110
- const ask = (op, arg) =>
111
- new Promise((resolve, reject) => {
112
- const id = ++next;
113
- pending.set(id, { resolve, reject });
114
- send(op, id, arg);
115
- });
116
- function answer(id, ok, text) {
117
- const p = pending.get(id);
118
- if (!p) return;
119
- pending.delete(id);
120
- if (ok) p.resolve(parse(text));
121
- else p.reject(new Error(text));
122
- }
123
- `;
124
- /** Drives an extractor: its records, warnings and file reads, through the host. */
125
- const EXTRACTOR_DRIVER = String.raw ` async function drive(x, input) {
126
- const data = parse(input);
127
- if (!x || typeof x !== "object" || typeof x.scan !== "function")
128
- throw new Error("the entry file's default export isn't an extractor (id, version, claims, scan)");
129
- send("meta", 0, stringify({ id: String(x.id), version: String(x.version) }));
130
- const repo = Object.freeze({
131
- name: data.repo.name,
132
- commit: data.repo.commit,
133
- listFiles: async function* (globs) {
134
- const list = await ask("list", stringify(Array.from(globs, (s) => String(s))));
135
- for (const p of list) yield p;
136
- },
137
- readText: (path) => ask("read", String(path)),
138
- });
139
- const ctx = Object.freeze({
140
- ...data.ctx,
141
- warn: (message, path) =>
142
- send("warn", 0, stringify(path === undefined ? { message: String(message) } : { message: String(message), path: String(path) })),
143
- });
144
- for await (const r of x.scan(repo, ctx)) send("record", 0, stringify(r));
145
- }
146
- function run(x, input) {
147
- drive(x, input).then(
148
- () => send("done", 0, ""),
149
- (e) => send("error", 0, String(e && e.message !== undefined ? e.message : e)),
150
- );
151
- }
152
- `;
153
- /**
154
- * Drives a translator (ADR 0121 item 4): calls one function of the default export with data
155
- * and sends back what it returns, as data. It has no file reads: a translator only turns data
156
- * into data.
157
- */
158
- const TRANSLATOR_DRIVER = String.raw ` function run(x, input) {
159
- Promise.resolve()
160
- .then(() => {
161
- const data = parse(input);
162
- if (!x || typeof x !== "object") throw new Error("the entry file has no default export");
163
- send("meta", 0, stringify({ id: String(x.id), version: String(x.version) }));
164
- if (typeof x[data.fn] !== "function")
165
- throw new Error("the entry file's default export has no " + data.fn + " function");
166
- return x[data.fn](data.arg);
167
- })
168
- .then(
169
- (r) => send("result", 0, stringify(r === undefined ? null : r)),
170
- (e) => send("error", 0, String(e && e.message !== undefined ? e.message : e)),
171
- );
172
- }
173
- `;
174
- const bootstrapWith = (driver) => `(function (host) {
175
- ${HARDEN}${driver} return Object.freeze({ answer, run });
176
- })`;
177
- const BOOTSTRAP = bootstrapWith(EXTRACTOR_DRIVER);
178
- const TRANSLATOR_BOOTSTRAP = bootstrapWith(TRANSLATOR_DRIVER);
179
- /**
180
- * The worker's own code (CommonJS, run with `eval: true`). It has Node, the plugin doesn't:
181
- * this code compiles the plugin in a fresh context and relays its requests to the host.
182
- */
183
- const WORKER = String.raw `"use strict";
184
- const vm = require("node:vm");
185
- const { parentPort, workerData } = require("node:worker_threads");
186
- const { source, identifier, input, bootstrap } = workerData;
187
- const post = (m) => parentPort.postMessage(m);
188
- const context = vm.createContext(
189
- vm.constants && vm.constants.DONT_CONTEXTIFY !== undefined ? vm.constants.DONT_CONTEXTIFY : {},
190
- { name: identifier, codeGeneration: { strings: false, wasm: false } },
191
- );
192
- // Errors thrown into plugin code are made in its context, never the worker's.
193
- const makeError = vm.runInContext("(m) => new Error(m)", context);
194
- let bridge;
195
- const host = (op, id, arg) => {
196
- try {
197
- if (typeof op !== "string" || typeof id !== "number" || typeof arg !== "string") return;
198
- post({ t: op, id, arg });
199
- } catch {
200
- // Never throw a worker error into the plugin's context.
201
- }
202
- };
203
- parentPort.on("message", (m) => {
204
- if (m && m.t === "answer") bridge.answer(m.id, m.ok, m.text);
205
- });
206
- (async () => {
207
- try {
208
- bridge = vm.runInContext(bootstrap, context)(host);
209
- const refuse = (spec) => {
210
- post({ t: "violation", id: 0, arg: "import " + String(spec) });
211
- throw makeError("blocked: import " + String(spec) + " is not allowed in a scanner plugin");
212
- };
213
- const mod = new vm.SourceTextModule(source, {
214
- context,
215
- identifier,
216
- importModuleDynamically: (spec) => refuse(spec),
217
- });
218
- await mod.link((spec) => refuse(spec));
219
- await mod.evaluate();
220
- bridge.run(mod.namespace.default, input);
221
- } catch (e) {
222
- post({ t: "error", id: 0, arg: String(e && e.message !== undefined ? e.message : e) });
223
- }
224
- })();
225
- `;
226
- /** The scan context as data the sandbox can take: everything but `warn`. */
227
- function contextData(ctx) {
228
- return {
229
- dialects: [...ctx.dialects],
230
- scannedAt: ctx.scannedAt,
231
- ...(ctx.component !== undefined ? { component: ctx.component } : {}),
232
- ...(ctx.system !== undefined ? { system: ctx.system } : {}),
233
- ...(ctx.repoType !== undefined ? { repoType: ctx.repoType } : {}),
234
- ...(ctx.modules ? { modules: ctx.modules } : {}),
235
- ...(ctx.frameworks ? { frameworks: ctx.frameworks } : {}),
236
- };
237
- }
238
- /** A fresh worker running the plugin's source in the sandbox, with its memory limit. */
239
- function spawnSandbox(o) {
240
- const memoryMb = o.limits.memoryMb;
241
- return new Worker(WORKER, {
242
- eval: true,
243
- workerData: {
244
- source: o.source,
245
- identifier: `plugin:${o.id}/${o.entry ?? "index.js"}`,
246
- input: o.input,
247
- bootstrap: o.bootstrap,
248
- },
249
- execArgv: ["--experimental-vm-modules", "--no-warnings"],
250
- argv: [],
251
- env: {},
252
- stdout: true,
253
- stderr: true,
254
- stdin: false,
255
- trackUnmanagedFds: true,
256
- resourceLimits: {
257
- maxOldGenerationSizeMb: memoryMb,
258
- maxYoungGenerationSizeMb: Math.max(4, Math.min(16, Math.floor(memoryMb / 4))),
259
- codeRangeSizeMb: 16,
260
- stackSizeMb: 4,
261
- },
262
- name: `atticus-plugin-${o.id}`,
263
- });
264
- }
265
- /** Run the plugin once over the repo in a fresh worker; resolves with its records. */
266
- function runInWorker(p, repo, ctx) {
267
- const records = [];
268
- const emits = new Set(p.emits);
269
- const memoryMb = p.limits.memoryMb;
270
- return new Promise((resolve, reject) => {
271
- let settled = false;
272
- const worker = spawnSandbox({
273
- ...p,
274
- input: JSON.stringify({
275
- repo: { name: repo.name, commit: repo.commit },
276
- ctx: contextData(ctx),
277
- }),
278
- bootstrap: BOOTSTRAP,
279
- });
280
- // Its output goes nowhere: a plugin talks to the scan only through its records and warnings.
281
- worker.stdout.resume();
282
- worker.stderr.resume();
283
- const finish = (err) => {
284
- if (settled)
285
- return;
286
- settled = true;
287
- clearTimeout(timer);
288
- void worker.terminate();
289
- if (err)
290
- reject(err);
291
- else
292
- resolve(records);
293
- };
294
- const timer = setTimeout(() => finish(new PluginRunError(`stopped after ${p.limits.timeoutMs} ms, its time limit`, "timeout")), p.limits.timeoutMs);
295
- const outside = (what, path) => finish(new PluginRunError(`blocked: tried to ${what} ${JSON.stringify(path)}, which is outside the repo`, "blocked"));
296
- const answer = (id, ok, text) => {
297
- if (!settled)
298
- worker.postMessage({ t: "answer", id, ok, text });
299
- };
300
- worker.on("message", (m) => {
301
- if (settled)
302
- return;
303
- void (async () => {
304
- switch (m.t) {
305
- case "list": {
306
- const globs = JSON.parse(m.arg);
307
- const bad = globs.find((g) => typeof g !== "string" || !insideRepo(g));
308
- if (bad !== undefined)
309
- return outside("list", String(bad));
310
- try {
311
- const out = [];
312
- for await (const f of repo.listFiles(globs))
313
- out.push(f);
314
- answer(m.id, true, JSON.stringify(out));
315
- }
316
- catch (e) {
317
- answer(m.id, false, e.message);
318
- }
319
- return;
320
- }
321
- case "read": {
322
- if (!insideRepo(m.arg))
323
- return outside("read", m.arg);
324
- try {
325
- answer(m.id, true, JSON.stringify(await repo.readText(m.arg)));
326
- }
327
- catch (e) {
328
- answer(m.id, false, e.message);
329
- }
330
- return;
331
- }
332
- case "meta": {
333
- const meta = JSON.parse(m.arg);
334
- if (meta.id !== p.id || meta.version !== p.version)
335
- finish(new PluginRunError(`the entry file exports ${meta.id} ${meta.version}, but its manifest says ${p.id} ${p.version}`, "invalid"));
336
- return;
337
- }
338
- case "record": {
339
- const r = JSON.parse(m.arg);
340
- if (!emits.has(String(r?.kind)))
341
- return finish(new PluginRunError(`emitted a ${String(r?.kind)} record; its manifest allows ${[...emits].join(", ")}`, "invalid"));
342
- if (records.length >= MAX_RECORDS)
343
- return finish(new PluginRunError(`emitted more than ${MAX_RECORDS} records`, "invalid"));
344
- records.push(r);
345
- return;
346
- }
347
- case "warn": {
348
- const w = JSON.parse(m.arg);
349
- ctx.warn(w.message, w.path);
350
- return;
351
- }
352
- case "violation":
353
- return finish(new PluginRunError(`blocked: tried to ${m.arg}`, "blocked"));
354
- case "error":
355
- return finish(new PluginRunError(`failed: ${m.arg}`, "failed"));
356
- case "done":
357
- return finish();
358
- }
359
- })().catch((e) => finish(new PluginRunError(`failed: ${e.message}`, "failed")));
360
- });
361
- worker.on("error", (e) => finish(e.code === "ERR_WORKER_OUT_OF_MEMORY"
362
- ? new PluginRunError(`stopped: it used more than its ${memoryMb} MB memory limit`, "memory")
363
- : new PluginRunError(`failed: ${e.message}`, "failed")));
364
- worker.on("exit", (code) => finish(new PluginRunError(`stopped before it finished (exit code ${code})`, "failed")));
365
- });
366
- }
367
- /** Largest answer a translator may give back: a request body or an answer's text. */
368
- const MAX_RESULT_CHARS = 32 * 1024 * 1024;
369
- /**
370
- * Call one function of a translator plugin (ADR 0121 item 4) in a fresh sandbox, with data, and
371
- * resolve with the data it returns. It has no files, no network and no clock: it only turns a
372
- * prompt into a request and an answer into text. What it tries that is forbidden, a time or
373
- * memory limit passed, or an entry file that says it is another plugin rejects with
374
- * PluginRunError.
375
- */
376
- export function runTranslator(p, fn, arg) {
377
- return new Promise((resolve, reject) => {
378
- let settled = false;
379
- const worker = spawnSandbox({
380
- ...p,
381
- input: JSON.stringify({ fn, arg: arg ?? null }),
382
- bootstrap: TRANSLATOR_BOOTSTRAP,
383
- });
384
- worker.stdout.resume();
385
- worker.stderr.resume();
386
- const finish = (err, value) => {
387
- if (settled)
388
- return;
389
- settled = true;
390
- clearTimeout(timer);
391
- void worker.terminate();
392
- if (err)
393
- reject(err);
394
- else
395
- resolve(value);
396
- };
397
- const timer = setTimeout(() => finish(new PluginRunError(`stopped after ${p.limits.timeoutMs} ms, its time limit`, "timeout")), p.limits.timeoutMs);
398
- worker.on("message", (m) => {
399
- if (settled)
400
- return;
401
- switch (m.t) {
402
- case "meta": {
403
- const meta = JSON.parse(m.arg);
404
- if (meta.id !== p.id || meta.version !== p.version)
405
- finish(new PluginRunError(`the entry file exports ${meta.id} ${meta.version}, but its manifest says ${p.id} ${p.version}`, "invalid"));
406
- return;
407
- }
408
- case "result":
409
- if (m.arg.length > MAX_RESULT_CHARS)
410
- return finish(new PluginRunError("gave back more than 32 MB", "invalid"));
411
- return finish(undefined, JSON.parse(m.arg));
412
- case "violation":
413
- return finish(new PluginRunError(`blocked: tried to ${m.arg}`, "blocked"));
414
- case "error":
415
- return finish(new PluginRunError(`failed: ${m.arg}`, "failed"));
416
- default:
417
- // A translator has no files to read: anything else is refused.
418
- return finish(new PluginRunError(`blocked: tried to ${m.t}`, "blocked"));
419
- }
420
- });
421
- worker.on("error", (e) => finish(e.code === "ERR_WORKER_OUT_OF_MEMORY"
422
- ? new PluginRunError(`stopped: it used more than its ${p.limits.memoryMb} MB memory limit`, "memory")
423
- : new PluginRunError(`failed: ${e.message}`, "failed")));
424
- worker.on("exit", (code) => finish(new PluginRunError(`stopped before it finished (exit code ${code})`, "failed")));
425
- });
426
- }
427
- /**
428
- * An org-pack plugin as an Extractor: each scan runs it in a fresh sandbox. Its id is
429
- * `plugin-<id>`; the scan validates what it returns against C1 like any extractor's.
430
- */
431
- export function sandboxedExtractor(p) {
432
- return {
433
- id: `${PLUGIN_EXTRACTOR_PREFIX}${p.id}`,
434
- version: p.version,
435
- // What the plugin reads is up to it, through the handle: the run is never skipped.
436
- claims: ["**/*"],
437
- async *scan(repo, ctx) {
438
- for (const r of await runInWorker(p, repo, ctx))
439
- yield r;
440
- },
441
- };
442
- }
443
- //# sourceMappingURL=sandbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAqC7C,kGAAkG;AAClG,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC;AAEjD,wEAAwE;AACxE,MAAM,WAAW,GAAG,OAAO,CAAC;AAE5B,0FAA0F;AAC1F,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACxF,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,GAAW,EACX,QAAwD;IAEx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