nawabari 0.9.2 → 0.10.2
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 +142 -803
- package/dist/cli-command-registry.js +46 -6
- package/dist/cli-command-registry.js.map +1 -1
- package/dist/cli.d.ts +5 -3
- package/dist/cli.js +157 -34
- package/dist/cli.js.map +1 -1
- package/dist/contract.js +11 -3
- package/dist/contract.js.map +1 -1
- package/dist/domain/compatibility-runtime-projection.d.ts +24 -0
- package/dist/domain/compatibility-runtime-projection.js +197 -0
- package/dist/domain/compatibility-runtime-projection.js.map +1 -0
- package/dist/domain/doctor.d.ts +2 -2
- package/dist/domain/doctor.js +72 -51
- package/dist/domain/doctor.js.map +1 -1
- package/dist/domain/errors.d.ts +1 -1
- package/dist/domain/errors.js +5 -1
- package/dist/domain/errors.js.map +1 -1
- package/dist/domain/fhs-development-runtime.d.ts +90 -0
- package/dist/domain/fhs-development-runtime.js +385 -0
- package/dist/domain/fhs-development-runtime.js.map +1 -0
- package/dist/domain/fhs-runtime.d.ts +36 -0
- package/dist/domain/fhs-runtime.js +776 -0
- package/dist/domain/fhs-runtime.js.map +1 -0
- package/dist/domain/landlock.d.ts +11 -4
- package/dist/domain/landlock.js +44 -21
- package/dist/domain/landlock.js.map +1 -1
- package/dist/domain/nix-runtime-closure.d.ts +70 -0
- package/dist/domain/nix-runtime-closure.js +449 -0
- package/dist/domain/nix-runtime-closure.js.map +1 -0
- package/dist/domain/pnpm-middleware-backend-materialization.d.ts +117 -0
- package/dist/domain/pnpm-middleware-backend-materialization.js +311 -0
- package/dist/domain/pnpm-middleware-backend-materialization.js.map +1 -0
- package/dist/domain/runtime-executable-projection.d.ts +33 -0
- package/dist/domain/runtime-executable-projection.js +204 -0
- package/dist/domain/runtime-executable-projection.js.map +1 -0
- package/dist/domain/runtime-file-identity.d.ts +37 -0
- package/dist/domain/runtime-file-identity.js +114 -0
- package/dist/domain/runtime-file-identity.js.map +1 -0
- package/dist/domain/runtime-profile.d.ts +66 -0
- package/dist/domain/runtime-profile.js +356 -0
- package/dist/domain/runtime-profile.js.map +1 -0
- package/dist/domain/runtime-projection.d.ts +101 -0
- package/dist/domain/runtime-projection.js +316 -0
- package/dist/domain/runtime-projection.js.map +1 -0
- package/dist/domain/runtime-provider-pnpm-middleware.d.ts +41 -0
- package/dist/domain/runtime-provider-pnpm-middleware.js +316 -0
- package/dist/domain/runtime-provider-pnpm-middleware.js.map +1 -0
- package/dist/domain/runtime-provider-tgrep.d.ts +60 -0
- package/dist/domain/runtime-provider-tgrep.js +537 -0
- package/dist/domain/runtime-provider-tgrep.js.map +1 -0
- package/dist/domain/runtime-resolution.d.ts +57 -0
- package/dist/domain/runtime-resolution.js +242 -0
- package/dist/domain/runtime-resolution.js.map +1 -0
- package/dist/domain/sandbox-launcher.d.ts +7 -0
- package/dist/domain/sandbox-launcher.js +380 -56
- package/dist/domain/sandbox-launcher.js.map +1 -1
- package/dist/domain/sandbox.d.ts +59 -4
- package/dist/domain/sandbox.js +100 -5
- package/dist/domain/sandbox.js.map +1 -1
- package/dist/domain/session-backend.js +20 -1
- package/dist/domain/session-backend.js.map +1 -1
- package/dist/domain/session.d.ts +3 -2
- package/dist/domain/session.js.map +1 -1
- package/dist/domain/tgrep-runtime-materialization.d.ts +61 -0
- package/dist/domain/tgrep-runtime-materialization.js +172 -0
- package/dist/domain/tgrep-runtime-materialization.js.map +1 -0
- package/dist/operation-authorization.d.ts +10 -0
- package/dist/operation-authorization.js +12 -1
- package/dist/operation-authorization.js.map +1 -1
- package/dist/presentation.js +6 -3
- package/dist/presentation.js.map +1 -1
- package/dist/session-registry.d.ts +11 -3
- package/dist/session-registry.js +61 -45
- package/dist/session-registry.js.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { DomainError, failure, success } from "./errors.js";
|
|
4
|
+
import { createRuntimeFile, inspectRuntimeFile } from "./runtime-file-identity.js";
|
|
5
|
+
import { REAL_PNPM_BACKEND_PROVIDER, REAL_PNPM_BACKEND_REQUIREMENT, RTK_BACKEND_PROVIDER, RTK_BACKEND_REQUIREMENT, } from "./pnpm-middleware-backend-materialization.js";
|
|
6
|
+
import { CANONICAL_EXECUTABLE_ROOT, compileRuntimeExecutableProjection } from "./runtime-executable-projection.js";
|
|
7
|
+
import { runtimeMaterializationMissingError, runtimeProviderMissingError, validateSessionRuntimeProjection, } from "./runtime-projection.js";
|
|
8
|
+
/** The stable projected entrypoint supplied by this concrete provider. */
|
|
9
|
+
export const PROJECTED_PNPM_ENTRYPOINT = "pnpm";
|
|
10
|
+
export const PROJECTED_PNPM_TARGET = `${CANONICAL_EXECUTABLE_ROOT}/${PROJECTED_PNPM_ENTRYPOINT}`;
|
|
11
|
+
/** The one namespace file used as the launcher backing source. */
|
|
12
|
+
export const PNPM_MIDDLEWARE_LAUNCHER_TARGET = "/runtime/pnpm-middleware/pnpm-launcher";
|
|
13
|
+
export const PNPM_MIDDLEWARE_LAUNCHER_NODE_TARGET = `${CANONICAL_EXECUTABLE_ROOT}/node`;
|
|
14
|
+
/** The launcher provider is owned here; backend provider identities come from #311. */
|
|
15
|
+
export const PNPM_MIDDLEWARE_PROVIDER_IDS = Object.freeze({
|
|
16
|
+
launcher: "rtk-pnpm-launcher",
|
|
17
|
+
});
|
|
18
|
+
/** The command supported by the pinned RTK adapter. */
|
|
19
|
+
export const PINNED_RTK_BACKEND_BINDING = "proxy";
|
|
20
|
+
function invalid(field, reason, value) {
|
|
21
|
+
return failure(new DomainError("RUNTIME_PROJECTION_INVALID", `pnpm middleware field '${field}' is invalid: ${reason}.`, {
|
|
22
|
+
field,
|
|
23
|
+
...(value === undefined ? {} : { value }),
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
function ambiguous(field, reason, value) {
|
|
27
|
+
return failure(new DomainError("RUNTIME_PROJECTION_AMBIGUOUS", `pnpm middleware field '${field}' is ambiguous: ${reason}.`, {
|
|
28
|
+
field,
|
|
29
|
+
value,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
function materializationMissing(requirement, reason, source) {
|
|
33
|
+
const canonical = runtimeMaterializationMissingError(requirement.id, requirement.kind);
|
|
34
|
+
return failure(new DomainError(canonical.code, `${canonical.message.slice(0, -1)}: ${reason}.`, {
|
|
35
|
+
...(canonical.details ?? {}),
|
|
36
|
+
reason,
|
|
37
|
+
...(source === undefined ? {} : { source }),
|
|
38
|
+
}, canonical.exitCode));
|
|
39
|
+
}
|
|
40
|
+
function isCanonicalAbsolute(value) {
|
|
41
|
+
return (value.length > 0 &&
|
|
42
|
+
path.posix.isAbsolute(value) &&
|
|
43
|
+
!value.includes("\0") &&
|
|
44
|
+
path.posix.normalize(value) === value &&
|
|
45
|
+
value !== "/");
|
|
46
|
+
}
|
|
47
|
+
function isProjectedPath(value) {
|
|
48
|
+
return value === CANONICAL_EXECUTABLE_ROOT || value.startsWith(`${CANONICAL_EXECUTABLE_ROOT}/`);
|
|
49
|
+
}
|
|
50
|
+
function validateExactPath(value, field) {
|
|
51
|
+
if (typeof value !== "string" || !isCanonicalAbsolute(value)) {
|
|
52
|
+
return invalid(field, "expected a normalized absolute path", typeof value === "string" ? value : undefined);
|
|
53
|
+
}
|
|
54
|
+
if (isProjectedPath(value))
|
|
55
|
+
return invalid(field, "the canonical executable surface cannot be a backend", value);
|
|
56
|
+
return success(value);
|
|
57
|
+
}
|
|
58
|
+
function validateBackendFile(source, field, requirement) {
|
|
59
|
+
try {
|
|
60
|
+
inspectRuntimeFile(source, (_descriptor, stat) => {
|
|
61
|
+
if ((stat.mode & 73n) === 0n)
|
|
62
|
+
throw new Error("not executable");
|
|
63
|
+
return undefined;
|
|
64
|
+
}, { requireCanonicalPath: true });
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof Error && error.message.includes("symlink")) {
|
|
68
|
+
return invalid(field, "the backend must not be a symlink", source);
|
|
69
|
+
}
|
|
70
|
+
return materializationMissing(requirement, "the backend is missing, not regular, or cannot be inspected", source);
|
|
71
|
+
}
|
|
72
|
+
return success(null);
|
|
73
|
+
}
|
|
74
|
+
function validateProvider(value, expected, field) {
|
|
75
|
+
if (typeof value !== "object" ||
|
|
76
|
+
value === null ||
|
|
77
|
+
typeof value.id !== "string" ||
|
|
78
|
+
typeof value.requirement_id !== "string") {
|
|
79
|
+
return invalid(field, "expected a provider identity");
|
|
80
|
+
}
|
|
81
|
+
const provider = value;
|
|
82
|
+
if (provider.id !== expected.id || provider.requirement_id !== expected.requirement_id) {
|
|
83
|
+
return invalid(field, "provider identity does not match the fixed adapter requirement", provider.id);
|
|
84
|
+
}
|
|
85
|
+
return success(null);
|
|
86
|
+
}
|
|
87
|
+
function requirementFor(projection, requirement) {
|
|
88
|
+
const selected = projection.requirements.find((candidate) => candidate.id === requirement.id);
|
|
89
|
+
if (selected === undefined)
|
|
90
|
+
return materializationMissing(requirement, "the adapter requirement was not selected");
|
|
91
|
+
if (selected.kind !== requirement.kind ||
|
|
92
|
+
selected.name !== requirement.name ||
|
|
93
|
+
selected.version !== requirement.version) {
|
|
94
|
+
return invalid("requirements", "the selected adapter requirement does not match the pinned backend evidence", selected.id);
|
|
95
|
+
}
|
|
96
|
+
return success(selected);
|
|
97
|
+
}
|
|
98
|
+
function hasExactReadOnlyMaterialization(projection, source, target) {
|
|
99
|
+
return projection.filesystem.some((entry) => entry.source === source && entry.target === target && entry.access_mode === "read-only");
|
|
100
|
+
}
|
|
101
|
+
function validateBackend(projection, backend, requirement, field, expectedProvider) {
|
|
102
|
+
if (typeof backend !== "object" || backend === null)
|
|
103
|
+
return invalid(field, "expected an exact backend descriptor");
|
|
104
|
+
const candidate = backend;
|
|
105
|
+
const target = validateExactPath(candidate.path, `${field}.path`);
|
|
106
|
+
if (!target.ok)
|
|
107
|
+
return target;
|
|
108
|
+
const source = validateExactPath(candidate.source, `${field}.source`);
|
|
109
|
+
if (!source.ok)
|
|
110
|
+
return source;
|
|
111
|
+
const provider = validateProvider(candidate.provider, expectedProvider, `${field}.provider`);
|
|
112
|
+
if (!provider.ok)
|
|
113
|
+
return provider;
|
|
114
|
+
const selected = requirementFor(projection, requirement);
|
|
115
|
+
if (!selected.ok)
|
|
116
|
+
return selected;
|
|
117
|
+
const materialized = validateBackendFile(source.value, `${field}.source`, requirement);
|
|
118
|
+
if (!materialized.ok)
|
|
119
|
+
return materialized;
|
|
120
|
+
if (!hasExactReadOnlyMaterialization(projection, source.value, target.value)) {
|
|
121
|
+
return materializationMissing(selected.value, "no exact read-only source-to-target materialization exists", source.value);
|
|
122
|
+
}
|
|
123
|
+
return success(Object.freeze({
|
|
124
|
+
path: target.value,
|
|
125
|
+
source: source.value,
|
|
126
|
+
provider: candidate.provider,
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The launcher's shebang is a hard, undeclared dependency on a canonical
|
|
131
|
+
* `node` entrypoint. Confirm the incoming projection declares and resolves
|
|
132
|
+
* a `node` executable at `PNPM_MIDDLEWARE_LAUNCHER_NODE_TARGET` through the
|
|
133
|
+
* same strict compiler used for the executable surface, before this adapter
|
|
134
|
+
* ever writes a launcher whose interpreter may not exist inside the sandbox.
|
|
135
|
+
*/
|
|
136
|
+
function validateNodeInterpreter(projection) {
|
|
137
|
+
const entrypoint = projection.executables.find((candidate) => candidate.name === "node");
|
|
138
|
+
if (entrypoint === undefined) {
|
|
139
|
+
return failure(runtimeProviderMissingError("node", "node", "node-runtime"));
|
|
140
|
+
}
|
|
141
|
+
const compiled = compileRuntimeExecutableProjection(projection);
|
|
142
|
+
if (!compiled.ok)
|
|
143
|
+
return compiled;
|
|
144
|
+
const resolved = compiled.value.find((entry) => entry.target === PNPM_MIDDLEWARE_LAUNCHER_NODE_TARGET);
|
|
145
|
+
if (resolved === undefined) {
|
|
146
|
+
return failure(runtimeProviderMissingError(entrypoint.provider.id, entrypoint.name, entrypoint.provider.requirement_id));
|
|
147
|
+
}
|
|
148
|
+
return success(null);
|
|
149
|
+
}
|
|
150
|
+
function validateLauncherPath(value, backendSources, projection) {
|
|
151
|
+
if (typeof value !== "string" || !isCanonicalAbsolute(value)) {
|
|
152
|
+
return invalid("launcher_path", "expected a normalized absolute path", typeof value === "string" ? value : undefined);
|
|
153
|
+
}
|
|
154
|
+
if (isProjectedPath(value))
|
|
155
|
+
return invalid("launcher_path", "the launcher cannot be written in the projected surface", value);
|
|
156
|
+
if (backendSources.includes(value))
|
|
157
|
+
return ambiguous("launcher_path", "the launcher would overwrite a backend", value);
|
|
158
|
+
for (const entry of projection.filesystem) {
|
|
159
|
+
if (entry.source === value || entry.source.startsWith(`${value}/`) || value.startsWith(`${entry.source}/`)) {
|
|
160
|
+
return invalid("launcher_path", "the launcher cannot overlap an existing materialization", value);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const parent = path.posix.dirname(value);
|
|
164
|
+
try {
|
|
165
|
+
if (fs.realpathSync.native(parent) !== parent)
|
|
166
|
+
return invalid("launcher_path", "the parent is not canonical", parent);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return materializationMissing(REAL_PNPM_BACKEND_REQUIREMENT, "the launcher parent is unavailable", parent);
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
fs.lstatSync(value);
|
|
173
|
+
return ambiguous("launcher_path", "the launcher destination already exists", value);
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
if (error.code !== "ENOENT") {
|
|
177
|
+
return invalid("launcher_path", "the launcher destination cannot be inspected", value);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return success(value);
|
|
181
|
+
}
|
|
182
|
+
function renderLauncher(rtkPath, realPnpmPath) {
|
|
183
|
+
return `#!${PNPM_MIDDLEWARE_LAUNCHER_NODE_TARGET}
|
|
184
|
+
import { spawn } from "node:child_process";
|
|
185
|
+
import process from "node:process";
|
|
186
|
+
|
|
187
|
+
const rtkPath = ${JSON.stringify(rtkPath)};
|
|
188
|
+
const realPnpmPath = ${JSON.stringify(realPnpmPath)};
|
|
189
|
+
const child = spawn(rtkPath, ["${PINNED_RTK_BACKEND_BINDING}", realPnpmPath, ...process.argv.slice(2)], {
|
|
190
|
+
cwd: process.cwd(),
|
|
191
|
+
env: process.env,
|
|
192
|
+
shell: false,
|
|
193
|
+
stdio: "inherit",
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
let childExited = false;
|
|
197
|
+
let spawnFailed = false;
|
|
198
|
+
const signals = ["SIGHUP", "SIGINT", "SIGTERM", "SIGQUIT"];
|
|
199
|
+
const forwardSignal = (signal) => {
|
|
200
|
+
if (!childExited) child.kill(signal);
|
|
201
|
+
};
|
|
202
|
+
for (const signal of signals) process.on(signal, forwardSignal);
|
|
203
|
+
|
|
204
|
+
child.once("error", (error) => {
|
|
205
|
+
spawnFailed = true;
|
|
206
|
+
process.exitCode = 127;
|
|
207
|
+
process.stderr.write("pnpm middleware could not start RTK: " + error.message.slice(0, 200) + "\\n");
|
|
208
|
+
});
|
|
209
|
+
child.once("close", (code, signal) => {
|
|
210
|
+
childExited = true;
|
|
211
|
+
for (const forwarded of signals) process.removeListener(forwarded, forwardSignal);
|
|
212
|
+
if (spawnFailed) return;
|
|
213
|
+
if (signal !== null) {
|
|
214
|
+
process.kill(process.pid, signal);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
process.exitCode = code ?? 127;
|
|
218
|
+
});
|
|
219
|
+
`;
|
|
220
|
+
}
|
|
221
|
+
function writeLauncher(source, content) {
|
|
222
|
+
try {
|
|
223
|
+
createRuntimeFile(source, (descriptor) => {
|
|
224
|
+
fs.writeFileSync(descriptor, content, { encoding: "utf8" });
|
|
225
|
+
fs.fchmodSync(descriptor, 0o755);
|
|
226
|
+
return undefined;
|
|
227
|
+
});
|
|
228
|
+
return success(null);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
return failure(new DomainError("RUNTIME_MATERIALIZATION_MISSING", `Runtime package requirement '${REAL_PNPM_BACKEND_REQUIREMENT.id}' was not materialized: the fixed launcher could not be written.`, {
|
|
232
|
+
requirement_id: REAL_PNPM_BACKEND_REQUIREMENT.id,
|
|
233
|
+
requirement_kind: REAL_PNPM_BACKEND_REQUIREMENT.kind,
|
|
234
|
+
reason: error instanceof Error ? error.message.slice(0, 200) : "unknown",
|
|
235
|
+
source,
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Materialize the one concrete executable provider owned by Issue #296.
|
|
241
|
+
*
|
|
242
|
+
* The returned projection is still consumed by #293's canonical executable
|
|
243
|
+
* compiler. This function writes one launcher file and adds one file-level
|
|
244
|
+
* read-only projection; it never creates a directory projection or performs
|
|
245
|
+
* command discovery.
|
|
246
|
+
*/
|
|
247
|
+
export function materializePnpmMiddleware(input) {
|
|
248
|
+
if (typeof input !== "object" || input === null)
|
|
249
|
+
return invalid("materialization", "expected an object");
|
|
250
|
+
const candidate = input;
|
|
251
|
+
if (candidate.projection === undefined)
|
|
252
|
+
return invalid("projection", "is required");
|
|
253
|
+
const projection = candidate.projection;
|
|
254
|
+
const rtk = validateBackend(projection, candidate.rtk, RTK_BACKEND_REQUIREMENT, "rtk", RTK_BACKEND_PROVIDER);
|
|
255
|
+
if (!rtk.ok)
|
|
256
|
+
return rtk;
|
|
257
|
+
const realPnpm = validateBackend(projection, candidate.real_pnpm, REAL_PNPM_BACKEND_REQUIREMENT, "real_pnpm", REAL_PNPM_BACKEND_PROVIDER);
|
|
258
|
+
if (!realPnpm.ok)
|
|
259
|
+
return realPnpm;
|
|
260
|
+
if (rtk.value.path === realPnpm.value.path || rtk.value.source === realPnpm.value.source) {
|
|
261
|
+
return ambiguous("backends", "RTK and real pnpm cannot resolve to the same path", rtk.value.path);
|
|
262
|
+
}
|
|
263
|
+
if (rtk.value.path === realPnpm.value.source || rtk.value.source === realPnpm.value.path) {
|
|
264
|
+
return ambiguous("backends", "RTK and real pnpm cannot cross-resolve between host and sandbox paths", rtk.value.path);
|
|
265
|
+
}
|
|
266
|
+
const launcher = validateLauncherPath(candidate.launcher_path, [rtk.value.source, realPnpm.value.source], projection);
|
|
267
|
+
if (!launcher.ok)
|
|
268
|
+
return launcher;
|
|
269
|
+
const node = validateNodeInterpreter(projection);
|
|
270
|
+
if (!node.ok)
|
|
271
|
+
return node;
|
|
272
|
+
const projected = {
|
|
273
|
+
policy: projection.policy,
|
|
274
|
+
profile: projection.profile,
|
|
275
|
+
requirements: projection.requirements,
|
|
276
|
+
filesystem: [
|
|
277
|
+
...projection.filesystem,
|
|
278
|
+
{
|
|
279
|
+
source: launcher.value,
|
|
280
|
+
target: PNPM_MIDDLEWARE_LAUNCHER_TARGET,
|
|
281
|
+
access_mode: "read-only",
|
|
282
|
+
provenance: "package",
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
executables: [
|
|
286
|
+
...projection.executables,
|
|
287
|
+
{
|
|
288
|
+
name: PROJECTED_PNPM_ENTRYPOINT,
|
|
289
|
+
target: PNPM_MIDDLEWARE_LAUNCHER_TARGET,
|
|
290
|
+
provider: {
|
|
291
|
+
id: PNPM_MIDDLEWARE_PROVIDER_IDS.launcher,
|
|
292
|
+
requirement_id: realPnpm.value.provider.requirement_id,
|
|
293
|
+
},
|
|
294
|
+
provenance: "package",
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
};
|
|
298
|
+
const validated = validateProjectedPnpmProjection(projected);
|
|
299
|
+
if (!validated.ok)
|
|
300
|
+
return validated;
|
|
301
|
+
const written = writeLauncher(launcher.value, renderLauncher(rtk.value.path, realPnpm.value.path));
|
|
302
|
+
if (!written.ok)
|
|
303
|
+
return written;
|
|
304
|
+
return success(Object.freeze({
|
|
305
|
+
projection: validated.value,
|
|
306
|
+
launcher_source: launcher.value,
|
|
307
|
+
launcher_target: PNPM_MIDDLEWARE_LAUNCHER_TARGET,
|
|
308
|
+
executable_target: PROJECTED_PNPM_TARGET,
|
|
309
|
+
rtk_path: rtk.value.path,
|
|
310
|
+
real_pnpm_path: realPnpm.value.path,
|
|
311
|
+
}));
|
|
312
|
+
}
|
|
313
|
+
function validateProjectedPnpmProjection(input) {
|
|
314
|
+
return validateSessionRuntimeProjection(input);
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=runtime-provider-pnpm-middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-provider-pnpm-middleware.js","sourceRoot":"","sources":["../../src/domain/runtime-provider-pnpm-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAqB,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,EACpB,uBAAuB,GAExB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EACL,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,GAIjC,MAAM,yBAAyB,CAAC;AAEjC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAe,CAAC;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,yBAAyB,IAAI,yBAAyB,EAAW,CAAC;AAE1G,kEAAkE;AAClE,MAAM,CAAC,MAAM,+BAA+B,GAAG,wCAAiD,CAAC;AACjG,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,yBAAyB,OAAgB,CAAC;AAEjG,uFAAuF;AACvF,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC;IACxD,QAAQ,EAAE,mBAAmB;CAC9B,CAAC,CAAC;AA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,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc;iBACvD;gBACD,UAAU,EAAE,SAAkB;aAC/B;SACF;KACF,CAAC;IACF,MAAM,SAAS,GAAG,+BAA+B,CAAC,SAAS,CAAC,CAAC;IAC7D,IAAI,CAAC,SAAS,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC;IAEpC,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACnG,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,OAAO,CAAC;IAChC,OAAO,OAAO,CACZ,MAAM,CAAC,MAAM,CAAC;QACZ,UAAU,EAAE,SAAS,CAAC,KAAK;QAC3B,eAAe,EAAE,QAAQ,CAAC,KAAK;QAC/B,eAAe,EAAE,+BAA+B;QAChD,iBAAiB,EAAE,qBAAqB;QACxC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI;QACxB,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI;KACpC,CAAC,CACH,CAAC;AACJ,CAAC;AAED,SAAS,+BAA+B,CACtC,KAAuE;IAEvE,OAAO,gCAAgC,CAAC,KAAK,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type DomainResult } from "./errors.js";
|
|
2
|
+
import type { RuntimeExecutableProviderMaterialization } from "./runtime-executable-projection.js";
|
|
3
|
+
import { type SessionRuntimeProjection } from "./runtime-projection.js";
|
|
4
|
+
import { type TgrepRuntimeMaterialization } from "./tgrep-runtime-materialization.js";
|
|
5
|
+
/** Versioned identity for the public projected rg adapter. */
|
|
6
|
+
export declare const TGREP_RG_PROVIDER_CONTRACT_ID: "nawabari.tgrep-rg-provider.v1";
|
|
7
|
+
export declare const TGREP_RG_PROVIDER_SCHEMA_VERSION: 1;
|
|
8
|
+
export declare const TGREP_RG_COMPATIBILITY_CONTRACT_ID: "nawabari.tgrep-rg-compatibility.v1";
|
|
9
|
+
export declare const TGREP_RG_COMPATIBILITY_SCHEMA_VERSION: 1;
|
|
10
|
+
/** The only public name supplied by this provider. There is deliberately no grep alias. */
|
|
11
|
+
export declare const TGREP_RG_ENTRYPOINT_NAME: "rg";
|
|
12
|
+
export declare const TGREP_RG_ADAPTER_TARGET: "/runtime/tgrep-rg-adapter/rg";
|
|
13
|
+
export declare const TGREP_RG_PROVIDER: Readonly<{
|
|
14
|
+
id: "tgrep-rg-provider";
|
|
15
|
+
requirement_id: string;
|
|
16
|
+
}>;
|
|
17
|
+
export type TgrepRgCompatibilityEntry = Readonly<{
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly status: "supported" | "rejected";
|
|
20
|
+
readonly rg: readonly string[];
|
|
21
|
+
readonly backend: readonly string[];
|
|
22
|
+
readonly value: "none" | "required";
|
|
23
|
+
readonly conflict_group?: string;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Closed compatibility authority. Every supported spelling has one canonical
|
|
27
|
+
* backend transformation; all other spellings are rejected before spawn.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TGREP_RG_COMPATIBILITY_MATRIX: readonly TgrepRgCompatibilityEntry[];
|
|
30
|
+
export type TgrepRgTranslation = Readonly<{
|
|
31
|
+
readonly argv: readonly string[];
|
|
32
|
+
readonly options: readonly string[];
|
|
33
|
+
readonly positionals: readonly string[];
|
|
34
|
+
readonly files_mode: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
/** Translate one raw rg argv using only the closed compatibility matrix. */
|
|
37
|
+
export declare function translateTgrepRgArguments(argv: readonly string[]): DomainResult<TgrepRgTranslation>;
|
|
38
|
+
export type TgrepRgProviderMaterialization = Readonly<{
|
|
39
|
+
readonly contract_id: typeof TGREP_RG_PROVIDER_CONTRACT_ID;
|
|
40
|
+
readonly schema_version: typeof TGREP_RG_PROVIDER_SCHEMA_VERSION;
|
|
41
|
+
readonly compatibility_contract_id: typeof TGREP_RG_COMPATIBILITY_CONTRACT_ID;
|
|
42
|
+
readonly compatibility_schema_version: typeof TGREP_RG_COMPATIBILITY_SCHEMA_VERSION;
|
|
43
|
+
readonly backend_source: string;
|
|
44
|
+
readonly node_source: string;
|
|
45
|
+
readonly adapter_source: string;
|
|
46
|
+
readonly adapter_target: typeof TGREP_RG_ADAPTER_TARGET;
|
|
47
|
+
readonly provider: typeof TGREP_RG_PROVIDER;
|
|
48
|
+
readonly provider_materialization: RuntimeExecutableProviderMaterialization;
|
|
49
|
+
readonly projection: SessionRuntimeProjection;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Generate the concrete launcher artifact and feed it into #293's existing
|
|
53
|
+
* filesystem/executable projection. The supplied #308 materialization is the
|
|
54
|
+
* sole source of the tgrep backend and is never re-resolved here.
|
|
55
|
+
*/
|
|
56
|
+
export declare function materializeTgrepRgProvider(materialization: TgrepRuntimeMaterialization, options: Readonly<{
|
|
57
|
+
readonly artifact_root: string;
|
|
58
|
+
}>): DomainResult<TgrepRgProviderMaterialization>;
|
|
59
|
+
export declare const materializeTgrepRgRuntime: typeof materializeTgrepRgProvider;
|
|
60
|
+
export declare const projectTgrepRgRuntime: typeof materializeTgrepRgProvider;
|