nemo-fabric-adapters-common 0.0.0 → 0.3.0-beta.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 +42 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/lifecycle.d.ts +49 -0
- package/dist/lifecycle.js +293 -0
- package/package.json +40 -2
package/README.md
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
-->
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
`nemo-fabric-adapters-common` package name. It contains no runtime code and is
|
|
5
|
-
not a supported NVIDIA NeMo Fabric adapter release.
|
|
6
|
+
# NVIDIA NeMo Fabric TypeScript Adapter Utilities
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
This package provides the persistent process lifecycle host shared by
|
|
9
|
+
TypeScript adapters. It validates southbound configuration, requests, runtime
|
|
10
|
+
context, and terminal results against the schemas bundled with
|
|
11
|
+
`nemo-fabric-adapter-contract`.
|
|
12
|
+
|
|
13
|
+
The host owns JSONL framing, ordered `start`/`invoke`/`stop` dispatch, runtime
|
|
14
|
+
identity checks, safe lifecycle failures, and cleanup after partial startup or
|
|
15
|
+
end of input. Adapter implementations own only target translation and target
|
|
16
|
+
state.
|
|
17
|
+
|
|
18
|
+
The following example starts and serves a `MyAdapterRuntime` instance:
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { serve } from "nemo-fabric-adapters-common";
|
|
22
|
+
|
|
23
|
+
await serve(() => new MyAdapterRuntime());
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The factory may return a runtime directly or resolve one asynchronously. The
|
|
27
|
+
host begins reading lifecycle input before it awaits asynchronous adapter setup.
|
|
28
|
+
|
|
29
|
+
This package is intended to be published as the shared runtime dependency for
|
|
30
|
+
TypeScript adapters. Its public API will be versioned independently from the
|
|
31
|
+
adapters that use it.
|
|
32
|
+
|
|
33
|
+
## Dependency Rationale
|
|
34
|
+
|
|
35
|
+
`ajv` enforces the canonical JSON Schema contracts at the process boundary;
|
|
36
|
+
hand-written validators were rejected because they could drift from those
|
|
37
|
+
schemas. `nemo-fabric-adapter-contract` supplies the shared types and packaged
|
|
38
|
+
schemas; copying them into this package would create another contract authority.
|
|
39
|
+
|
|
40
|
+
`typescript` and `@types/node` are exact-pinned build inputs. They provide the
|
|
41
|
+
compiler and Node.js declarations without entering the published production
|
|
42
|
+
dependency graph. The private TypeScript workspace uses a local
|
|
43
|
+
`nemo-fabric-adapter-contract` file link so source builds test the checked-out
|
|
44
|
+
contract. Published package manifests use the registry version instead.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LifecycleError, serve, type AdapterRuntime, type AdapterRuntimeFactory, type AdapterStartInput, type LifecycleHostOptions, } from "./lifecycle.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// Public entry point for TypeScript process adapters. It exposes the lifecycle
|
|
4
|
+
// host, adapter-facing runtime interfaces, and normalized lifecycle errors
|
|
5
|
+
// without exposing the host's internal protocol machinery.
|
|
6
|
+
export { LifecycleError, serve, } from "./lifecycle.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Readable, Writable } from "node:stream";
|
|
2
|
+
import type { AgentConfig, AgentRunRequest, AgentRunResult, JsonObject, RuntimeContext } from "nemo-fabric-adapter-contract";
|
|
3
|
+
export interface AdapterStartInput {
|
|
4
|
+
agentName: string;
|
|
5
|
+
baseDir: string;
|
|
6
|
+
config: AgentConfig;
|
|
7
|
+
runtimeContext: RuntimeContext;
|
|
8
|
+
capabilityPlan?: JsonObject;
|
|
9
|
+
telemetryPlan?: JsonObject;
|
|
10
|
+
}
|
|
11
|
+
export interface AdapterRuntime {
|
|
12
|
+
start(input: AdapterStartInput): Promise<void>;
|
|
13
|
+
invoke(request: AgentRunRequest, context: RuntimeContext): Promise<AgentRunResult>;
|
|
14
|
+
stop(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export type AdapterRuntimeFactory = () => AdapterRuntime | Promise<AdapterRuntime>;
|
|
17
|
+
export interface LifecycleHostOptions {
|
|
18
|
+
input?: Readable;
|
|
19
|
+
output?: Writable;
|
|
20
|
+
diagnostics?: Writable;
|
|
21
|
+
}
|
|
22
|
+
export declare class LifecycleError extends Error {
|
|
23
|
+
readonly code: string;
|
|
24
|
+
readonly retryable: boolean;
|
|
25
|
+
readonly metadata?: JsonObject;
|
|
26
|
+
constructor(code: string, message: string, options?: {
|
|
27
|
+
retryable?: boolean;
|
|
28
|
+
metadata?: JsonObject;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Serve the persistent, newline-delimited lifecycle protocol for one adapter runtime.
|
|
33
|
+
*
|
|
34
|
+
* The host reads one JSON request per input line, validates normalized contract
|
|
35
|
+
* payloads, and writes exactly one normalized response per output line. A valid
|
|
36
|
+
* start request creates the runtime through `factory`; subsequent invoke and
|
|
37
|
+
* stop requests must carry the same runtime ID. The host validates adapter
|
|
38
|
+
* results, converts adapter failures into stable lifecycle errors, and prevents
|
|
39
|
+
* further invocation after an unexpected adapter or response-encoding failure.
|
|
40
|
+
*
|
|
41
|
+
* When the protocol uses process stdout, other stdout writes are redirected to
|
|
42
|
+
* stderr so logs cannot corrupt the response stream. The active runtime is
|
|
43
|
+
* cleaned up after a stop request, a failed start, or input termination. Tests
|
|
44
|
+
* can provide isolated input, output, and diagnostic streams through `options`.
|
|
45
|
+
*
|
|
46
|
+
* @param factory Creates the adapter-owned runtime for a valid start request.
|
|
47
|
+
* @param options Overrides the process streams, primarily for embedding and tests.
|
|
48
|
+
*/
|
|
49
|
+
export declare function serve(factory: AdapterRuntimeFactory, options?: LifecycleHostOptions): Promise<void>;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// Shared process-adapter lifecycle host. It validates newline-delimited
|
|
4
|
+
// lifecycle requests, owns one adapter runtime, dispatches start, invoke, and
|
|
5
|
+
// stop operations, and returns normalized responses while keeping diagnostics
|
|
6
|
+
// off the protocol output stream.
|
|
7
|
+
import { createRequire } from "node:module";
|
|
8
|
+
import { createInterface } from "node:readline";
|
|
9
|
+
export class LifecycleError extends Error {
|
|
10
|
+
code;
|
|
11
|
+
retryable;
|
|
12
|
+
metadata;
|
|
13
|
+
constructor(code, message, options = {}) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = "LifecycleError";
|
|
16
|
+
this.code = code;
|
|
17
|
+
this.retryable = options.retryable ?? false;
|
|
18
|
+
this.metadata = options.metadata;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
class AdapterCallError extends LifecycleError {
|
|
22
|
+
}
|
|
23
|
+
const require = createRequire(import.meta.url);
|
|
24
|
+
const Ajv2020 = require("ajv/dist/2020.js").default;
|
|
25
|
+
const ajv = new Ajv2020({ allErrors: true, strict: false });
|
|
26
|
+
ajv.addFormat("uint32", {
|
|
27
|
+
type: "number",
|
|
28
|
+
validate: (value) => Number.isInteger(value) && value >= 0 && value <= 0xffff_ffff,
|
|
29
|
+
});
|
|
30
|
+
ajv.addFormat("uint64", {
|
|
31
|
+
type: "number",
|
|
32
|
+
validate: (value) => Number.isSafeInteger(value) && value >= 0,
|
|
33
|
+
});
|
|
34
|
+
ajv.addFormat("double", {
|
|
35
|
+
type: "number",
|
|
36
|
+
validate: (value) => Number.isFinite(value),
|
|
37
|
+
});
|
|
38
|
+
const validateAgentConfig = compileSchema("agent-config");
|
|
39
|
+
const validateAgentRunRequest = compileSchema("agent-run-request");
|
|
40
|
+
const validateAgentRunResult = compileSchema("agent-run-result");
|
|
41
|
+
const validateRuntimeContext = compileSchema("runtime-context");
|
|
42
|
+
function compileSchema(name) {
|
|
43
|
+
const schema = require(`nemo-fabric-adapter-contract/schemas/${name}`);
|
|
44
|
+
return ajv.compile(schema);
|
|
45
|
+
}
|
|
46
|
+
function isRecord(value) {
|
|
47
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
49
|
+
function requireRecord(value, code, message) {
|
|
50
|
+
if (!isRecord(value)) {
|
|
51
|
+
throw new LifecycleError(code, message);
|
|
52
|
+
}
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
function validate(validator, value, code, message) {
|
|
56
|
+
if (!validator(value)) {
|
|
57
|
+
throw new LifecycleError(code, message);
|
|
58
|
+
}
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
function runtimeId(operation, payload) {
|
|
62
|
+
const value = operation === "stop"
|
|
63
|
+
? payload.runtime_id
|
|
64
|
+
: isRecord(payload.runtime_context)
|
|
65
|
+
? payload.runtime_context.runtime_id
|
|
66
|
+
: undefined;
|
|
67
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
68
|
+
}
|
|
69
|
+
function decodeRequest(value) {
|
|
70
|
+
const message = requireRecord(value, "lifecycle_invalid_request", "Lifecycle request must be an object");
|
|
71
|
+
const operation = message.operation;
|
|
72
|
+
if (operation !== "start" && operation !== "invoke" && operation !== "stop") {
|
|
73
|
+
throw new LifecycleError("lifecycle_invalid_operation", "Unknown lifecycle operation");
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
operation,
|
|
77
|
+
payload: requireRecord(message.payload, "lifecycle_invalid_payload", "Lifecycle payload must be an object"),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function decodeStart(payload) {
|
|
81
|
+
if (typeof payload.agent_name !== "string" || payload.agent_name.length === 0) {
|
|
82
|
+
throw new LifecycleError("lifecycle_invalid_start", "Start payload is missing an agent name");
|
|
83
|
+
}
|
|
84
|
+
if (typeof payload.base_dir !== "string" || payload.base_dir.length === 0) {
|
|
85
|
+
throw new LifecycleError("lifecycle_invalid_start", "Start payload is missing a base directory");
|
|
86
|
+
}
|
|
87
|
+
const config = validate(validateAgentConfig, payload.config, "lifecycle_invalid_config", "Adapter config does not match its typed contract");
|
|
88
|
+
const context = validate(validateRuntimeContext, payload.runtime_context, "lifecycle_invalid_context", "Runtime context does not match its typed contract");
|
|
89
|
+
const capabilityPlan = payload.capability_plan;
|
|
90
|
+
const telemetryPlan = payload.telemetry_plan;
|
|
91
|
+
if (capabilityPlan !== undefined && !isRecord(capabilityPlan)) {
|
|
92
|
+
throw new LifecycleError("lifecycle_invalid_start", "Capability plan must be an object");
|
|
93
|
+
}
|
|
94
|
+
if (telemetryPlan !== undefined && !isRecord(telemetryPlan)) {
|
|
95
|
+
throw new LifecycleError("lifecycle_invalid_start", "Telemetry plan must be an object");
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
agentName: payload.agent_name,
|
|
99
|
+
baseDir: payload.base_dir,
|
|
100
|
+
config,
|
|
101
|
+
runtimeContext: context,
|
|
102
|
+
capabilityPlan: capabilityPlan,
|
|
103
|
+
telemetryPlan: telemetryPlan,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function decodeInvocation(payload) {
|
|
107
|
+
return {
|
|
108
|
+
request: validate(validateAgentRunRequest, payload.request, "lifecycle_invalid_request", "Invocation request does not match its typed contract"),
|
|
109
|
+
context: validate(validateRuntimeContext, payload.runtime_context, "lifecycle_invalid_context", "Runtime context does not match its typed contract"),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
async function callAdapter(operation, call) {
|
|
113
|
+
try {
|
|
114
|
+
return await call();
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (error instanceof LifecycleError) {
|
|
118
|
+
throw new AdapterCallError(error.code, error.message, {
|
|
119
|
+
retryable: error.retryable,
|
|
120
|
+
metadata: error.metadata,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
throw new AdapterCallError(`lifecycle_adapter_${operation}_failed`, `Adapter failed during lifecycle ${operation}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
async function stopQuietly(runtime, diagnostics) {
|
|
127
|
+
try {
|
|
128
|
+
await callAdapter("stop", () => runtime.stop());
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
diagnostics.write(`Adapter cleanup failed: ${error instanceof Error ? error.message : "unknown error"}\n`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function success(operation, output = null) {
|
|
135
|
+
return { operation, outcome: { status: "succeeded", output } };
|
|
136
|
+
}
|
|
137
|
+
function failure(operation, error) {
|
|
138
|
+
const stage = operation === "invoke" ? "invoke" : operation;
|
|
139
|
+
const detail = {
|
|
140
|
+
stage,
|
|
141
|
+
code: error.code,
|
|
142
|
+
message: error.message,
|
|
143
|
+
retryable: error.retryable,
|
|
144
|
+
};
|
|
145
|
+
if (error.metadata !== undefined) {
|
|
146
|
+
detail.metadata = error.metadata;
|
|
147
|
+
}
|
|
148
|
+
return { operation, outcome: { status: "failed", error: detail } };
|
|
149
|
+
}
|
|
150
|
+
async function dispatch(state, factory, request, diagnostics) {
|
|
151
|
+
const messageRuntimeId = runtimeId(request.operation, request.payload);
|
|
152
|
+
if (messageRuntimeId === undefined) {
|
|
153
|
+
throw new LifecycleError("lifecycle_invalid_runtime", "Lifecycle payload is missing a runtime ID");
|
|
154
|
+
}
|
|
155
|
+
if (request.operation === "start") {
|
|
156
|
+
if (state.runtime !== undefined) {
|
|
157
|
+
throw new LifecycleError("lifecycle_already_started", "Lifecycle host already owns a runtime");
|
|
158
|
+
}
|
|
159
|
+
let candidate;
|
|
160
|
+
try {
|
|
161
|
+
candidate = await callAdapter("start", factory);
|
|
162
|
+
const active = candidate;
|
|
163
|
+
await callAdapter("start", () => active.start(decodeStart(request.payload)));
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
if (candidate !== undefined) {
|
|
167
|
+
await stopQuietly(candidate, diagnostics);
|
|
168
|
+
}
|
|
169
|
+
throw error;
|
|
170
|
+
}
|
|
171
|
+
state.runtime = candidate;
|
|
172
|
+
state.runtimeId = messageRuntimeId;
|
|
173
|
+
state.failed = false;
|
|
174
|
+
return success("start");
|
|
175
|
+
}
|
|
176
|
+
if (state.runtime === undefined || state.runtimeId === undefined) {
|
|
177
|
+
throw new LifecycleError("lifecycle_not_started", "Lifecycle host has not started a runtime");
|
|
178
|
+
}
|
|
179
|
+
if (state.runtimeId !== messageRuntimeId) {
|
|
180
|
+
throw new LifecycleError("lifecycle_runtime_mismatch", "Lifecycle payload does not match the active runtime");
|
|
181
|
+
}
|
|
182
|
+
if (request.operation === "stop") {
|
|
183
|
+
const active = state.runtime;
|
|
184
|
+
await callAdapter("stop", () => active.stop());
|
|
185
|
+
state.runtime = undefined;
|
|
186
|
+
state.runtimeId = undefined;
|
|
187
|
+
state.failed = false;
|
|
188
|
+
return success("stop");
|
|
189
|
+
}
|
|
190
|
+
if (state.failed) {
|
|
191
|
+
throw new LifecycleError("lifecycle_runtime_failed", "Lifecycle runtime cannot accept another invocation");
|
|
192
|
+
}
|
|
193
|
+
const { request: invocation, context } = decodeInvocation(request.payload);
|
|
194
|
+
try {
|
|
195
|
+
const result = await callAdapter("invoke", () => state.runtime.invoke(invocation, context));
|
|
196
|
+
validate(validateAgentRunResult, result, "lifecycle_invalid_response", "Adapter returned an invalid AgentRunResult");
|
|
197
|
+
return success("invoke", result);
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
if (error instanceof AdapterCallError ||
|
|
201
|
+
(error instanceof LifecycleError && error.code === "lifecycle_invalid_response")) {
|
|
202
|
+
state.failed = true;
|
|
203
|
+
}
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function parseLine(line) {
|
|
208
|
+
try {
|
|
209
|
+
return JSON.parse(line);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
throw new LifecycleError("lifecycle_invalid_request", "Lifecycle request is not valid JSON");
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Serve the persistent, newline-delimited lifecycle protocol for one adapter runtime.
|
|
217
|
+
*
|
|
218
|
+
* The host reads one JSON request per input line, validates normalized contract
|
|
219
|
+
* payloads, and writes exactly one normalized response per output line. A valid
|
|
220
|
+
* start request creates the runtime through `factory`; subsequent invoke and
|
|
221
|
+
* stop requests must carry the same runtime ID. The host validates adapter
|
|
222
|
+
* results, converts adapter failures into stable lifecycle errors, and prevents
|
|
223
|
+
* further invocation after an unexpected adapter or response-encoding failure.
|
|
224
|
+
*
|
|
225
|
+
* When the protocol uses process stdout, other stdout writes are redirected to
|
|
226
|
+
* stderr so logs cannot corrupt the response stream. The active runtime is
|
|
227
|
+
* cleaned up after a stop request, a failed start, or input termination. Tests
|
|
228
|
+
* can provide isolated input, output, and diagnostic streams through `options`.
|
|
229
|
+
*
|
|
230
|
+
* @param factory Creates the adapter-owned runtime for a valid start request.
|
|
231
|
+
* @param options Overrides the process streams, primarily for embedding and tests.
|
|
232
|
+
*/
|
|
233
|
+
export async function serve(factory, options = {}) {
|
|
234
|
+
const input = options.input ?? process.stdin;
|
|
235
|
+
const output = options.output ?? process.stdout;
|
|
236
|
+
const diagnostics = options.diagnostics ?? process.stderr;
|
|
237
|
+
const protocolWrite = output.write.bind(output);
|
|
238
|
+
const originalStdoutWrite = process.stdout.write;
|
|
239
|
+
const redirectsStdout = output === process.stdout;
|
|
240
|
+
if (redirectsStdout) {
|
|
241
|
+
process.stdout.write = process.stderr.write.bind(process.stderr);
|
|
242
|
+
}
|
|
243
|
+
const lines = createInterface({ input, crlfDelay: Infinity });
|
|
244
|
+
const state = { failed: false };
|
|
245
|
+
try {
|
|
246
|
+
for await (const line of lines) {
|
|
247
|
+
let operation = "start";
|
|
248
|
+
let shouldStop = false;
|
|
249
|
+
let response;
|
|
250
|
+
try {
|
|
251
|
+
const parsed = parseLine(line);
|
|
252
|
+
if (isRecord(parsed) && typeof parsed.operation === "string") {
|
|
253
|
+
operation = parsed.operation;
|
|
254
|
+
}
|
|
255
|
+
const request = decodeRequest(parsed);
|
|
256
|
+
operation = request.operation;
|
|
257
|
+
response = await dispatch(state, factory, request, diagnostics);
|
|
258
|
+
shouldStop = operation === "stop";
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
const lifecycleError = error instanceof LifecycleError
|
|
262
|
+
? error
|
|
263
|
+
: new LifecycleError("lifecycle_invalid_request", "Invalid lifecycle request");
|
|
264
|
+
response = failure(operation, lifecycleError);
|
|
265
|
+
shouldStop = operation === "start" || operation === "stop";
|
|
266
|
+
}
|
|
267
|
+
let encoded;
|
|
268
|
+
try {
|
|
269
|
+
encoded = JSON.stringify(response);
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
if (operation === "invoke") {
|
|
273
|
+
state.failed = true;
|
|
274
|
+
}
|
|
275
|
+
response = failure(operation, new LifecycleError("lifecycle_invalid_response", "Adapter response could not be encoded as lifecycle JSON"));
|
|
276
|
+
encoded = JSON.stringify(response);
|
|
277
|
+
}
|
|
278
|
+
protocolWrite(`${encoded}\n`);
|
|
279
|
+
if (shouldStop) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
finally {
|
|
285
|
+
lines.close();
|
|
286
|
+
if (state.runtime !== undefined) {
|
|
287
|
+
await stopQuietly(state.runtime, diagnostics);
|
|
288
|
+
}
|
|
289
|
+
if (redirectsStdout) {
|
|
290
|
+
process.stdout.write = originalStdoutWrite;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nemo-fabric-adapters-common",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0-beta.2",
|
|
4
|
+
"description": "Shared TypeScript lifecycle host for NVIDIA NeMo Fabric adapters.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
6
16
|
"files": [
|
|
17
|
+
"dist",
|
|
7
18
|
"README.md",
|
|
8
19
|
"LICENSE"
|
|
9
20
|
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.build.json",
|
|
23
|
+
"clean": "rm -rf dist",
|
|
24
|
+
"pack:check": "npm run build && node ../scripts/check-package.mjs",
|
|
25
|
+
"prepack": "npm run build",
|
|
26
|
+
"test": "npm run clean && npm run build && node --test test/*.test.mjs"
|
|
27
|
+
},
|
|
10
28
|
"publishConfig": {
|
|
11
29
|
"access": "public",
|
|
12
30
|
"registry": "https://registry.npmjs.org"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/NVIDIA/NeMo-Fabric.git",
|
|
35
|
+
"directory": "adapters/typescript/common"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/NVIDIA/NeMo-Fabric/issues"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/NVIDIA/NeMo-Fabric/tree/main/adapters/typescript/common#readme",
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20.18.3"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"ajv": "8.20.0",
|
|
46
|
+
"nemo-fabric-adapter-contract": "0.3.0-beta.2"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "22.19.19",
|
|
50
|
+
"typescript": "5.6.3"
|
|
13
51
|
}
|
|
14
52
|
}
|