openshell-agent-runner 0.0.1__py3-none-any.whl

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.
@@ -0,0 +1,404 @@
1
+ Metadata-Version: 2.5
2
+ Name: openshell-agent-runner
3
+ Version: 0.0.1
4
+ Summary: Launch ephemeral agents for single tasks in OpenShell sandboxes.
5
+ Project-URL: Repository, https://github.com/NVIDIA/OpenShell-Research
6
+ Project-URL: Documentation, https://github.com/NVIDIA/OpenShell-Research/blob/main/projects/openshell-agent-runner/docs/index.md
7
+ Author: NVIDIA CORPORATION & AFFILIATES
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Topic :: Software Development
17
+ Requires-Python: >=3.12
18
+ Requires-Dist: jsonschema<5,>=4.25
19
+ Requires-Dist: pydantic<3,>=2.11
20
+ Requires-Dist: pyyaml<7,>=6
21
+ Requires-Dist: typer<1,>=0.16
22
+ Description-Content-Type: text/markdown
23
+
24
+ # OpenShell Agent Runner
25
+
26
+ `openshell-agent-runner` provides the `oar` CLI for launching an ephemeral agent
27
+ to accomplish one configured task. Each `oar run` creates an isolated OpenShell
28
+ sandbox, runs the task, publishes one result, and removes the sandbox. This
29
+ single-task lifecycle makes OAR a natural fit for CI jobs and other automated
30
+ workflows that need bounded agent execution.
31
+
32
+ OAR has four commands:
33
+
34
+ ```text
35
+ oar init PROFILE_ROOT --model MODEL_ID [OPTIONS]
36
+ oar validate PROFILE_DIRECTORY
37
+ oar run PROFILE_DIRECTORY --task TASK --output PATH [OPTIONS]
38
+ oar doctor [OPTIONS]
39
+ ```
40
+
41
+ The profile defines what the ephemeral agent can see and do. OAR uploads the
42
+ declared inputs, starts Pi for the selected task, captures its result, optionally
43
+ validates it against a configured JSON Schema, publishes it atomically, and
44
+ deletes the sandbox. Repository inspection, Git operations, and conclusions
45
+ belong to Pi inside the sandbox.
46
+
47
+ ## Why OAR fits CI
48
+
49
+ - Each invocation has a bounded lifecycle: one task, one ephemeral sandbox, one
50
+ result, then cleanup.
51
+ - Profiles can be versioned with the repository so agent behavior, permissions,
52
+ model settings, and output contracts are reviewable inputs to the job.
53
+ - Stable exit codes and an explicit `--output` path let later CI steps consume
54
+ the result or fail the job.
55
+
56
+ The CI worker must be able to reach an existing OpenShell gateway with an
57
+ inference route for the profile's model. OAR uses that configured runtime; it
58
+ does not provision providers or credentials.
59
+
60
+ ## Documentation
61
+
62
+ - [Launch ephemeral agents with OAR](https://github.com/NVIDIA/OpenShell-Research/blob/main/projects/openshell-agent-runner/docs/index.md):
63
+ install, run a starter task, and understand the execution lifecycle.
64
+
65
+ ## Requirements
66
+
67
+ - [`uv`](https://docs.astral.sh/uv/).
68
+ - OpenShell 0.0.111 or newer.
69
+ - A running OpenShell gateway that the host can reach.
70
+ - An inference route and its model ID.
71
+
72
+ OAR uses the gateway's `default` workspace unless `--workspace` selects another
73
+ one. An OpenShell workspace is a gateway-side namespace for sandboxes,
74
+ inference routes, and access controls; it is not the `/workspace` directory
75
+ inside a sandbox.
76
+
77
+ ## Quick start
78
+
79
+ Create every profile packaged with OAR, check the gateway, and preview the
80
+ starter review task:
81
+
82
+ ```bash
83
+ export MODEL_ID="provider/model"
84
+
85
+ uvx --from openshell-agent-runner oar init ./profiles \
86
+ --model "$MODEL_ID"
87
+ uvx --from openshell-agent-runner oar doctor --gateway openshell
88
+ uvx --from openshell-agent-runner oar validate ./profiles/reviewer
89
+ uvx --from openshell-agent-runner oar run ./profiles/reviewer \
90
+ --task review \
91
+ --gateway openshell \
92
+ --input document.md \
93
+ --output review.md \
94
+ --dry-run
95
+ ```
96
+
97
+ Replace `provider/model` with the model ID configured on your inference route
98
+ and `openshell` with your gateway name. Remove `--dry-run` after `doctor`
99
+ confirms that the gateway and route are ready.
100
+
101
+ `init` copies packaged profiles into an ordinary local directory so they can be
102
+ inspected, edited, and committed. Omit `--profile` to create all packaged
103
+ profiles, or select one or more explicitly:
104
+
105
+ ```bash
106
+ uvx --from openshell-agent-runner oar init ./profiles \
107
+ --profile reviewer \
108
+ --model "$MODEL_ID" \
109
+ --thinking high
110
+ ```
111
+
112
+ The `openshell` Pi provider, managed inference URL, and non-secret adapter value
113
+ are generated by OAR. `MODEL_ID` is only a shell variable passed to the required
114
+ `--model` option; OAR does not read it implicitly. Pass `--thinking off` when
115
+ the selected model does not support reasoning.
116
+
117
+ ## Development install
118
+
119
+ Directly from this checkout:
120
+
121
+ ```bash
122
+ uvx --from ./projects/openshell-agent-runner oar --help
123
+ ```
124
+
125
+ For an editable development environment:
126
+
127
+ ```bash
128
+ uv sync --project projects/openshell-agent-runner --locked
129
+ uv run --project projects/openshell-agent-runner pre-commit install
130
+ uv run --project projects/openshell-agent-runner oar --help
131
+ ```
132
+
133
+ The pre-commit hook automatically applies Ruff's Black-compatible formatter to
134
+ staged Python files in this project. Hook installation is required once per
135
+ checkout.
136
+
137
+ See the [release instructions](https://github.com/NVIDIA/OpenShell-Research/blob/main/projects/openshell-agent-runner/RELEASING.md)
138
+ for package publication. The release command builds and publishes only
139
+ `openshell-agent-runner`; it does not package other projects in this repository.
140
+
141
+ OAR consumes existing OpenShell state and never creates or changes gateways,
142
+ providers, workspaces, or inference routes.
143
+
144
+ ## Validate a profile
145
+
146
+ Pass the profile directory containing `profile.yaml`:
147
+
148
+ ```bash
149
+ uv run --project projects/openshell-agent-runner oar validate \
150
+ ./profiles/reviewer
151
+ ```
152
+
153
+ Validation loads every referenced prompt, policy, skill, extension, and optional
154
+ output schema; rejects unknown keys and path escapes; and checks each schema.
155
+
156
+ ## Check OpenShell
157
+
158
+ `doctor` performs read-only checks of the OpenShell CLI, selected gateway, and
159
+ inference configuration:
160
+
161
+ ```bash
162
+ uv run --project projects/openshell-agent-runner oar doctor \
163
+ --gateway openshell
164
+ ```
165
+
166
+ ## Run a profile task
167
+
168
+ Show help for a specific task by placing its profile and task before `--help`:
169
+
170
+ ```bash
171
+ uv run --project projects/openshell-agent-runner oar run \
172
+ ./profiles/reviewer \
173
+ --task review \
174
+ --help
175
+ ```
176
+
177
+ This prints focused task help from the executable profile and task
178
+ configuration: the invocation, configured uploads and environment, and the
179
+ resulting output. Generic CLI options remain in `oar run --help`.
180
+
181
+ ```bash
182
+ uv run --project projects/openshell-agent-runner oar run \
183
+ .github/openshell-agents/profiles/dev-note-reviewer \
184
+ --task editorial \
185
+ --gateway openshell \
186
+ --upload .:/workspace/source \
187
+ --upload .git:/workspace/source/.git \
188
+ --env REVIEW_TARGET_PATH=docs/dev-notes/posts/2026-08-07-formal-methods-ai-generated-robot-actions.md \
189
+ --output /tmp/dev-note-review.json
190
+ ```
191
+
192
+ The supported run options are deliberately small:
193
+
194
+ - `--task`: task identifier from the profile.
195
+ - `--output`: host destination for the agent result.
196
+ - `--input`: host document required by tasks declaring `required_input: document`.
197
+ - `--upload`: repeatable native OpenShell `SOURCE:DESTINATION` mapping.
198
+ - `--env`: repeatable non-secret `KEY=VALUE` sandbox environment value. Keys use
199
+ shell identifier syntax; OpenShell reserves the `OPENSHELL_` prefix.
200
+ - `--gateway`: select an existing OpenShell gateway.
201
+ - `--workspace`: select a gateway-side OpenShell namespace. It defaults to
202
+ `default` and is unrelated to the sandbox's `/workspace` directory.
203
+ - `--timeout-seconds`: maximum agent runtime.
204
+ - `--keep-sandbox`: retain the sandbox for deliberate debugging.
205
+ - `--dry-run`: print the complete command sequence and host actions without
206
+ executing anything.
207
+
208
+ A source can be a file or directory. For native file uploads, the destination
209
+ is the exact filename; for directory uploads, it is the destination directory.
210
+ OAR does not add repository, snapshot, changed-file, or Git abstractions. The
211
+ first upload above uses OpenShell's default Git-aware filtering, while the
212
+ explicit `.git` upload provides repository history without also uploading every
213
+ ignored file. Review upload contents before sending private source to a remote
214
+ gateway. OAR always preserves OpenShell's Git-aware filtering; upload an ignored
215
+ file explicitly when a task genuinely needs it.
216
+
217
+ ### Inspect the execution
218
+
219
+ Add `--dry-run` to the same `run` invocation:
220
+
221
+ ```bash
222
+ uv run --project projects/openshell-agent-runner oar run \
223
+ .github/openshell-agents/profiles/dev-note-reviewer \
224
+ --task editorial \
225
+ --gateway openshell \
226
+ --upload .:/workspace/source \
227
+ --upload .git:/workspace/source/.git \
228
+ --env REVIEW_TARGET_PATH=docs/dev-notes/posts/2026-08-07-formal-methods-ai-generated-robot-actions.md \
229
+ --output /tmp/dev-note-review.json \
230
+ --dry-run
231
+ ```
232
+
233
+ The preview prints the exact dynamically generated `openshell sandbox create`,
234
+ `download`, ownership `get`, and `delete` commands in execution order. It also
235
+ shows host-side result validation and atomic publication. Temporary paths,
236
+ sandbox identity, and the ownership token are generated exactly as they are for
237
+ a real run, but no subprocess or sandbox operation is executed.
238
+
239
+ ## Profile format
240
+
241
+ A profile contains only settings that can change model behavior, sandbox
242
+ permissions, inputs, or task execution:
243
+
244
+ ```yaml
245
+ id: reviewer
246
+ description: Review an uploaded document.
247
+
248
+ sandbox:
249
+ policy: policy.yaml
250
+ upload: []
251
+ env: []
252
+
253
+ tasks:
254
+ review:
255
+ required_input: document
256
+ prompt: prompt.md
257
+ tools: [read, grep, find, ls, bash]
258
+ skills: []
259
+ extensions: []
260
+ ```
261
+
262
+ Each profile directory must contain `profile.yaml`, `models.json`, and
263
+ `settings.json`. Profile-owned paths resolve relative to that directory. Native
264
+ upload sources retain OpenShell's current-directory semantics.
265
+
266
+ `models.json` is Pi's native provider and model registry. OAR requires exactly
267
+ one provider named `openshell` and exactly one model. `settings.json` is Pi's
268
+ native runtime selection and must set `defaultProvider`, `defaultModel`, and
269
+ `defaultThinkingLevel`. OAR copies both files unchanged and passes that same
270
+ selection explicitly as `--provider`, `--model`, and `--thinking`, so every task
271
+ uses one visible runtime configuration. Never place real credentials in these
272
+ files; OpenShell supplies inference access.
273
+
274
+ Profiles created by `oar init` use this minimal Pi model configuration:
275
+
276
+ ```json
277
+ {
278
+ "providers": {
279
+ "openshell": {
280
+ "baseUrl": "https://inference.local/v1",
281
+ "api": "openai-completions",
282
+ "apiKey": "unused",
283
+ "authHeader": true,
284
+ "compat": {
285
+ "supportsDeveloperRole": false
286
+ },
287
+ "models": [
288
+ {
289
+ "id": "provider/model",
290
+ "reasoning": true
291
+ }
292
+ ]
293
+ }
294
+ }
295
+ }
296
+ ```
297
+
298
+ The matching runtime selection is:
299
+
300
+ ```json
301
+ {
302
+ "defaultProvider": "openshell",
303
+ "defaultModel": "provider/model",
304
+ "defaultThinkingLevel": "high"
305
+ }
306
+ ```
307
+
308
+ Pi supplies conservative defaults for omitted model capabilities. `oar init`
309
+ sets `reasoning` from the selected thinking level and retains the compatibility
310
+ override required by the OpenAI-compatible route. Add explicit model behavior
311
+ to the initialized profile when the selected route needs it.
312
+
313
+ ### Result protocol
314
+
315
+ By default, OAR captures Pi's final headless response and publishes it without
316
+ interpreting its contents. The result must exist, be non-empty, and fit within
317
+ the one-MiB transport limit. OAR applies that limit to the download process and
318
+ checks the downloaded file again before publication.
319
+
320
+ A task can optionally require structured JSON by referencing a JSON Schema:
321
+
322
+ ```yaml
323
+ tasks:
324
+ review:
325
+ prompt: prompt.md
326
+ output_schema: schemas/review.json
327
+ tools: [read, grep, find, ls, bash]
328
+ ```
329
+
330
+ OAR uploads the schema and automatically enables the generic `submit_result`
331
+ tool. Invalid submissions return schema diagnostics to Pi so it can correct and
332
+ resubmit within the same session. OAR validates the accepted JSON against the
333
+ same Draft 2020-12 schema again before publishing it. Pi's tool parameters use
334
+ TypeBox, as required by its extension API, while the submitted result is
335
+ validated with Ajv. The schema and its domain concepts belong entirely to the
336
+ profile; OAR has no built-in review result type. JSON Schema extension keywords
337
+ and `format` values are treated as annotations rather than additional validation
338
+ rules on both sides. OAR rejects `pattern` and `patternProperties` because Python
339
+ and JavaScript use different regular-expression dialects; use `enum`, `const`,
340
+ length, and numeric constraints for portable validation.
341
+
342
+ OAR fixes implementation details that do not change the intended result: Pi is
343
+ the harness, its image is bundled with the package, autonomous approval and
344
+ provider isolation are enabled, the result is written to a standard sandbox
345
+ path, and the result size guard is one MiB.
346
+
347
+ The package includes a repository-neutral `reviewer` profile. Run `oar init` to
348
+ create an editable local copy. Its `review` task requires `--input DOCUMENT` and
349
+ uploads that file to OAR's standard document location in the sandbox.
350
+
351
+ ## Image contract
352
+
353
+ The runner packages the Pi image context, pins the tested Pi version, and
354
+ installs the read-only harness under `/opt/oar`. OAR passes that packaged
355
+ context to native `openshell sandbox create`; profiles do not select an image.
356
+ This keeps the harness implementation and image contract in one release unit.
357
+
358
+ ## Security boundary
359
+
360
+ - Pi runs as the image's unprivileged user under the profile policy.
361
+ - Caller uploads under `/workspace` and generated resources under
362
+ `/sandbox/oar-runtime` are writable because OpenShell performs uploads through
363
+ the workload policy.
364
+ - `/sandbox/oar-runtime` and `/sandbox/artifacts` are reserved for the runner;
365
+ profile and command-line uploads cannot write there.
366
+ - Source changes are disposable and are never synchronized back.
367
+ - Only OAR's standard result path is downloaded.
368
+ - Host-side transport checks, optional JSON Schema validation, and atomic
369
+ publication are the result acceptance boundary.
370
+ - Result claims and provenance remain agent-produced; schema
371
+ validation does not independently prove their factual accuracy.
372
+ - `--env` is for non-secret values. Credentials remain in OpenShell's provider
373
+ and inference mechanisms.
374
+ - Cleanup checks a reserved ownership label before deleting the sandbox.
375
+
376
+ The supplied Dev Note policy permits no ordinary network egress. Inference uses
377
+ OpenShell's managed inference path.
378
+
379
+ ## Exit codes
380
+
381
+ | Code | Meaning |
382
+ | --- | --- |
383
+ | `0` | Execution completed and the output validated. |
384
+ | `1` | OpenShell execution, timeout, missing remote output, download size limit, ownership inspection, or cleanup failed. |
385
+ | `2` | CLI input or profile configuration was invalid. |
386
+ | `3` | A downloaded output was empty, invalid, or failed its contract. |
387
+
388
+ ## Development
389
+
390
+ Run from `projects/openshell-agent-runner`:
391
+
392
+ ```bash
393
+ uv sync --locked
394
+ uv run ruff format --check .
395
+ uv run ruff check .
396
+ uv run ty check
397
+ uv run pytest
398
+ uv build
399
+ ```
400
+
401
+ The repository workflow validates the repository and starter profiles, runs the
402
+ credential-free suite, builds the distributions, verifies the wheel contents,
403
+ and builds the Pi image. Real inference requires an authenticated OpenShell
404
+ gateway and is intentionally not run on GitHub-hosted workers.
@@ -0,0 +1,26 @@
1
+ openshell_agent_runner/__init__.py,sha256=X4Ygd8wrsDiQ23VElSABQ3j_VhRAwqu-tbogSgLEjR0,168
2
+ openshell_agent_runner/artifacts.py,sha256=qTvvbfBMMCYH-5_YIiMw1u1CDrEZ_DIVx2i4CuTvKu8,2794
3
+ openshell_agent_runner/cli.py,sha256=QoWipuUOWX3SU8C6IGjASlAJPSn4tixRTNVem7v433g,9073
4
+ openshell_agent_runner/config.py,sha256=OVVESqovkf6qIByP6fi0joL0d8v4DzR0eSTQTHbBJy0,14520
5
+ openshell_agent_runner/errors.py,sha256=QAxQH0K4FkKX9kl4dEbch1JNVnkIUAiFsQdKAmozzlQ,563
6
+ openshell_agent_runner/openshell.py,sha256=0NTnXmw_tVOKt1LmiG4ViY5UikmVCg7NuXFbaZCmOU4,4883
7
+ openshell_agent_runner/profile_init.py,sha256=dOYnQ-DHnCnXXds7tf1nluHLFYUPVd10xTLYTAbwboA,3774
8
+ openshell_agent_runner/runner.py,sha256=qW_-r02d-AR6a1sgQq6W095-LKZg5y9A-6jkG1FzFtc,9575
9
+ openshell_agent_runner/harnesses/__init__.py,sha256=H2D661vnuaoeQE6UJzVRMBLt7tq9aysY1B9-c09DZBA,169
10
+ openshell_agent_runner/harnesses/resources.py,sha256=M8GlD-rc3exiJ3EVn0xBHUKGg5AzxEW974TNFLrctj4,451
11
+ openshell_agent_runner/harnesses/pi/__init__.py,sha256=f-CGDaCDSf-Se9oiYncJQhmlLAQRDV0hHfPfiHilx6Q,169
12
+ openshell_agent_runner/harnesses/pi/resources.py,sha256=90ORUf5IcYFxf9v52h8ca6kyl7OmeqWHf1BLm8UzO7w,3576
13
+ openshell_agent_runner/harnesses/pi/runtime/extensions/submit-result.ts,sha256=DctxMaFhCGGBHYaVBmjYyQIc2n3-CZdJ-vECSITTePE,2405
14
+ openshell_agent_runner/harnesses/pi/runtime/image/Dockerfile,sha256=035imf6tjJMOq1LH_hP6hOJspN_ksKfw6QFnL9rz0Bs,892
15
+ openshell_agent_runner/harnesses/pi/runtime/image/exec.sh,sha256=iJJy9AGlUdMUMDg00275T20wA8FKby2Lvv_3yh6xlNM,1793
16
+ openshell_agent_runner/profiles/__init__.py,sha256=JbDHEyDKrezKKFRvEWGY97Vkn35-0CSTKWc2f1XmOOU,191
17
+ openshell_agent_runner/profiles/reviewer/models.json,sha256=K-vutCCQWLnE5erCXgOslQYfeKknop7AFU2FGJ8ay-E,352
18
+ openshell_agent_runner/profiles/reviewer/policy.yaml,sha256=cHpLtxGI9yFZB3M_wdZv-rjmlPMSy1LVLA6dILko2l4,295
19
+ openshell_agent_runner/profiles/reviewer/profile.yaml,sha256=Ac3xwvog47l0-1mjLUIJENskOp8V25W9LIQclrhreVA,302
20
+ openshell_agent_runner/profiles/reviewer/prompt.md,sha256=-URrHvHc3EKXxhRJLnUKbn8v8gceDXxp_ij5a4P22x8,268
21
+ openshell_agent_runner/profiles/reviewer/settings.json,sha256=tBeJZIeZMAWAwsVusaMATbRtM6Qj6wvJyYG9sKgjP-Q,101
22
+ openshell_agent_runner-0.0.1.dist-info/METADATA,sha256=Bk9MBUSGkr3IkRDBWo3pkbWaWZteti4dIwMpET5vEeE,15261
23
+ openshell_agent_runner-0.0.1.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
24
+ openshell_agent_runner-0.0.1.dist-info/entry_points.txt,sha256=dfoKjv1ZLNBVPNSzSTgnUh9xH2Low1AuXUYFz9zj1Vs,111
25
+ openshell_agent_runner-0.0.1.dist-info/licenses/LICENSE,sha256=f3UActQuMTHyc9P1zQMAQSaHHqGxoMDa8SJk7F1vGnI,11436
26
+ openshell_agent_runner-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ oar = openshell_agent_runner.cli:app
3
+ openshell-agent-runner = openshell_agent_runner.cli:app
@@ -0,0 +1,203 @@
1
+ Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright 2026 NVIDIA CORPORATION & AFFILIATES.
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.