nemo-fabric-adapter-contract 0.2.0-rc.2 → 0.2.0
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 +9 -14
- package/dist/generated/adapter-descriptor.d.ts +0 -4
- package/dist/generated/agent-run-request.d.ts +1 -4
- package/dist/index.d.ts +1 -3
- package/package.json +1 -1
- package/schemas/adapter-descriptor.schema.json +1 -18
- package/schemas/agent-run-request.schema.json +1 -1
- package/schemas/agent-run-result.schema.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All
|
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
-->
|
|
5
5
|
|
|
6
|
-
# NVIDIA NeMo Fabric Adapter Contract
|
|
6
|
+
# NVIDIA NeMo Fabric Adapter Contract
|
|
7
7
|
|
|
8
8
|
Dependency-free TypeScript types for implementing adapters against the NVIDIA
|
|
9
9
|
NeMo Fabric adapter contract. The package is generated from the versioned JSON
|
|
@@ -11,21 +11,12 @@ Schemas maintained in the NeMo Fabric repository.
|
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
the public registry:
|
|
14
|
+
Install the package from the public npm registry:
|
|
16
15
|
|
|
17
16
|
```bash
|
|
18
17
|
npm install nemo-fabric-adapter-contract
|
|
19
18
|
```
|
|
20
19
|
|
|
21
|
-
Until then, build and install an exact tarball from a NeMo Fabric checkout:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm ci --prefix adapter-contract/typescript --ignore-scripts
|
|
25
|
-
npm pack ./adapter-contract/typescript
|
|
26
|
-
npm install ./nemo-fabric-adapter-contract-0.2.0.tgz
|
|
27
|
-
```
|
|
28
|
-
|
|
29
20
|
Use Node.js 20.18.3 or later and TypeScript 5.6 or later. The TypeScript floor
|
|
30
21
|
ensures NodeNext consumers can import the bundled JSON Schemas. Use a compatible
|
|
31
22
|
TypeScript module pair: `module: "NodeNext"` with
|
|
@@ -51,9 +42,8 @@ import type {
|
|
|
51
42
|
|
|
52
43
|
const descriptor: AdapterDescriptor = {
|
|
53
44
|
contract_version: ADAPTER_CONTRACT_VERSION,
|
|
54
|
-
adapter_id: "
|
|
55
|
-
|
|
56
|
-
adapter_kind: "process",
|
|
45
|
+
adapter_id: "com.acme.fabric.example",
|
|
46
|
+
adapter_kind: "http",
|
|
57
47
|
};
|
|
58
48
|
```
|
|
59
49
|
|
|
@@ -61,6 +51,11 @@ Property names intentionally match the JSON wire format and remain
|
|
|
61
51
|
`snake_case`. Optional properties are distinct from properties whose value may
|
|
62
52
|
be `null`.
|
|
63
53
|
|
|
54
|
+
Use the maintained
|
|
55
|
+
[adapter contract documentation](https://github.com/NVIDIA/NeMo-Fabric/tree/main/docs/adapter-contract)
|
|
56
|
+
for the implementation sequence and the bundled schemas for runtime
|
|
57
|
+
validation.
|
|
58
|
+
|
|
64
59
|
## Invocation Types
|
|
65
60
|
|
|
66
61
|
The package root also exports the same request and result models as the Python
|
|
@@ -93,10 +93,6 @@ export type AdapterConfigSupport = {
|
|
|
93
93
|
* Harness-native files generated by this adapter.
|
|
94
94
|
*/
|
|
95
95
|
generates?: string[];
|
|
96
|
-
/**
|
|
97
|
-
* Configuration object delivered to the adapter lifecycle host.
|
|
98
|
-
*/
|
|
99
|
-
input?: "agent_config";
|
|
100
96
|
} & JsonObject;
|
|
101
97
|
/**
|
|
102
98
|
* Runtime requirements.
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { JsonObject, JsonValue } from "../json.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* The current local-host transport does not enforce this type. It will join
|
|
6
|
-
* the negotiated adapter contract when typed invoke transport is implemented.
|
|
3
|
+
* Southbound invocation request passed to an adapter target.
|
|
7
4
|
*/
|
|
8
5
|
export interface AgentRunRequest {
|
|
9
6
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AdapterDescriptor } from "./generated/adapter-descriptor.js";
|
|
2
2
|
import type { AgentInstructionConfig } from "./generated/agent-config.js";
|
|
3
3
|
import type { AgentRunResult } from "./generated/agent-run-result.js";
|
|
4
4
|
import type { EnvironmentHandle } from "./generated/runtime-context.js";
|
|
@@ -14,8 +14,6 @@ export type { JsonArray, JsonObject, JsonPrimitive, JsonValue, } from "./json.js
|
|
|
14
14
|
export type AdapterContractVersion = typeof ADAPTER_CONTRACT_VERSION;
|
|
15
15
|
/** Adapter implementation kind. */
|
|
16
16
|
export type AdapterKind = AdapterDescriptor["adapter_kind"];
|
|
17
|
-
/** Configuration object delivered to an adapter lifecycle host. */
|
|
18
|
-
export type AdapterConfigInput = NonNullable<AdapterConfigSupport["input"]>;
|
|
19
17
|
/** How an instruction value is applied to the selected harness. */
|
|
20
18
|
export type InstructionMode = NonNullable<AgentInstructionConfig["mode"]>;
|
|
21
19
|
/** Where NeMo Fabric control code runs relative to the environment. */
|
package/package.json
CHANGED
|
@@ -70,16 +70,6 @@
|
|
|
70
70
|
}
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
|
-
"AdapterConfigInput": {
|
|
74
|
-
"description": "Configuration object delivered to an adapter lifecycle host.",
|
|
75
|
-
"oneOf": [
|
|
76
|
-
{
|
|
77
|
-
"const": "agent_config",
|
|
78
|
-
"description": "Deliver the resolved southbound `AgentConfig` contract.",
|
|
79
|
-
"type": "string"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
73
|
"AdapterConfigSupport": {
|
|
84
74
|
"additionalProperties": true,
|
|
85
75
|
"description": "Adapter config support.",
|
|
@@ -97,11 +87,6 @@
|
|
|
97
87
|
"type": "string"
|
|
98
88
|
},
|
|
99
89
|
"type": "array"
|
|
100
|
-
},
|
|
101
|
-
"input": {
|
|
102
|
-
"$ref": "#/$defs/AdapterConfigInput",
|
|
103
|
-
"default": "agent_config",
|
|
104
|
-
"description": "Configuration object delivered to the adapter lifecycle host."
|
|
105
90
|
}
|
|
106
91
|
},
|
|
107
92
|
"type": "object"
|
|
@@ -282,9 +267,7 @@
|
|
|
282
267
|
},
|
|
283
268
|
"config": {
|
|
284
269
|
"$ref": "#/$defs/AdapterConfigSupport",
|
|
285
|
-
"default": {
|
|
286
|
-
"input": "agent_config"
|
|
287
|
-
},
|
|
270
|
+
"default": {},
|
|
288
271
|
"description": "NeMo Fabric config areas this adapter consumes or generates."
|
|
289
272
|
},
|
|
290
273
|
"contract_version": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"additionalProperties": false,
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Southbound invocation request passed to an adapter target.",
|
|
5
5
|
"properties": {
|
|
6
6
|
"context": {
|
|
7
7
|
"additionalProperties": true,
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
],
|
|
210
|
-
"description": "
|
|
210
|
+
"description": "Southbound terminal result returned by an adapter target.",
|
|
211
211
|
"properties": {
|
|
212
212
|
"artifacts": {
|
|
213
213
|
"description": "Artifacts produced by the adapter target.",
|