@lamplitisles/dsh-nanocodex 0.1.0-beta.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/LICENSE +65 -0
- package/NOTICE +2 -0
- package/README.md +182 -0
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/cordis.patch.yml +52 -0
- package/dist/index.d.ts +435 -0
- package/dist/index.js +3405 -0
- package/dist/standard-preset.d.ts +7 -0
- package/dist/standard-preset.js +25 -0
- package/engine-release.json +14 -0
- package/package.json +119 -0
- package/presets/standard/agent.cordis.yml +6 -0
- package/presets/standard/preset.yml +2 -0
- package/vendor/nanocodex/README.md +1344 -0
- package/vendor/nanocodex/actions/events.d.mts +10 -0
- package/vendor/nanocodex/actions/events.mjs +163 -0
- package/vendor/nanocodex/actions/index.d.mts +13 -0
- package/vendor/nanocodex/actions/index.mjs +35 -0
- package/vendor/nanocodex/actions/session.d.mts +66 -0
- package/vendor/nanocodex/actions/session.mjs +59 -0
- package/vendor/nanocodex/actions/turn.d.mts +59 -0
- package/vendor/nanocodex/actions/turn.mjs +37 -0
- package/vendor/nanocodex/actions/voice.d.mts +22 -0
- package/vendor/nanocodex/actions/voice.mjs +50 -0
- package/vendor/nanocodex/browser/Agent.d.mts +55 -0
- package/vendor/nanocodex/browser/Agent.mjs +11 -0
- package/vendor/nanocodex/browser/ChatGptSubscription.d.mts +7 -0
- package/vendor/nanocodex/browser/ChatGptSubscription.mjs +19 -0
- package/vendor/nanocodex/browser/InlineAgent.mjs +266 -0
- package/vendor/nanocodex/browser/Transport.d.mts +74 -0
- package/vendor/nanocodex/browser/Transport.mjs +61 -0
- package/vendor/nanocodex/browser/Voice.d.mts +71 -0
- package/vendor/nanocodex/browser/Voice.mjs +291 -0
- package/vendor/nanocodex/browser/VoiceSession.mjs +688 -0
- package/vendor/nanocodex/browser/WorkerAgent.d.mts +65 -0
- package/vendor/nanocodex/browser/WorkerAgent.mjs +1472 -0
- package/vendor/nanocodex/browser/agent.worker.mjs +3 -0
- package/vendor/nanocodex/browser/config.d.mts +36 -0
- package/vendor/nanocodex/browser/config.mjs +439 -0
- package/vendor/nanocodex/browser/engine.mjs +13 -0
- package/vendor/nanocodex/browser/harness.mjs +55 -0
- package/vendor/nanocodex/browser/host.d.mts +83 -0
- package/vendor/nanocodex/browser/host.mjs +555 -0
- package/vendor/nanocodex/browser/hostManagedWebSocket.d.mts +14 -0
- package/vendor/nanocodex/browser/hostManagedWebSocket.mjs +110 -0
- package/vendor/nanocodex/browser/index.d.mts +92 -0
- package/vendor/nanocodex/browser/index.mjs +23 -0
- package/vendor/nanocodex/browser/indexeddb-durability-store.mjs +197 -0
- package/vendor/nanocodex/browser/workspace.d.mts +16 -0
- package/vendor/nanocodex/browser/workspace.mjs +107 -0
- package/vendor/nanocodex/cloud/Client.d.mts +83 -0
- package/vendor/nanocodex/cloud/Client.mjs +231 -0
- package/vendor/nanocodex/cloud/Decorator.d.mts +31 -0
- package/vendor/nanocodex/cloud/Decorator.mjs +37 -0
- package/vendor/nanocodex/cloud/Dialog.d.mts +113 -0
- package/vendor/nanocodex/cloud/Dialog.mjs +366 -0
- package/vendor/nanocodex/cloud/Errors.d.mts +22 -0
- package/vendor/nanocodex/cloud/Errors.mjs +39 -0
- package/vendor/nanocodex/cloud/Principal.d.mts +26 -0
- package/vendor/nanocodex/cloud/Principal.mjs +88 -0
- package/vendor/nanocodex/cloud/RemoteProvider.mjs +88 -0
- package/vendor/nanocodex/cloud/Transport.d.mts +47 -0
- package/vendor/nanocodex/cloud/Transport.mjs +454 -0
- package/vendor/nanocodex/cloud/actions/account.d.mts +9 -0
- package/vendor/nanocodex/cloud/actions/account.mjs +19 -0
- package/vendor/nanocodex/cloud/actions/agent.d.mts +18 -0
- package/vendor/nanocodex/cloud/actions/agent.mjs +428 -0
- package/vendor/nanocodex/cloud/actions/connection.d.mts +133 -0
- package/vendor/nanocodex/cloud/actions/connection.mjs +580 -0
- package/vendor/nanocodex/cloud/actions/grant.d.mts +10 -0
- package/vendor/nanocodex/cloud/actions/grant.mjs +12 -0
- package/vendor/nanocodex/cloud/actions/index.d.mts +7 -0
- package/vendor/nanocodex/cloud/actions/index.mjs +7 -0
- package/vendor/nanocodex/cloud/actions/machineUsd.d.mts +23 -0
- package/vendor/nanocodex/cloud/actions/machineUsd.mjs +37 -0
- package/vendor/nanocodex/cloud/actions/model.d.mts +12 -0
- package/vendor/nanocodex/cloud/actions/model.mjs +50 -0
- package/vendor/nanocodex/cloud/actions/mpp.d.mts +28 -0
- package/vendor/nanocodex/cloud/actions/mpp.mjs +39 -0
- package/vendor/nanocodex/cloud/index.d.mts +30 -0
- package/vendor/nanocodex/cloud/index.mjs +9 -0
- package/vendor/nanocodex/cloud/internal.mjs +533 -0
- package/vendor/nanocodex/cloud/mercator.mjs +108 -0
- package/vendor/nanocodex/cloud/server/HostPrincipal.d.mts +34 -0
- package/vendor/nanocodex/cloud/server/HostPrincipal.mjs +202 -0
- package/vendor/nanocodex/cloud/server/index.d.mts +1 -0
- package/vendor/nanocodex/cloud/server/index.mjs +1 -0
- package/vendor/nanocodex/cloud/types.d.mts +211 -0
- package/vendor/nanocodex/cloudflare/Agent.d.mts +133 -0
- package/vendor/nanocodex/cloudflare/Agent.mjs +811 -0
- package/vendor/nanocodex/cloudflare/egress-subject.mjs +19 -0
- package/vendor/nanocodex/cloudflare/egress.d.mts +41 -0
- package/vendor/nanocodex/cloudflare/egress.mjs +119 -0
- package/vendor/nanocodex/cloudflare/event-socket.mjs +316 -0
- package/vendor/nanocodex/cloudflare/index.d.mts +7 -0
- package/vendor/nanocodex/cloudflare/index.mjs +6 -0
- package/vendor/nanocodex/host/Agent.d.mts +55 -0
- package/vendor/nanocodex/host/Agent.mjs +1 -0
- package/vendor/nanocodex/host/index.d.mts +82 -0
- package/vendor/nanocodex/host/index.mjs +10 -0
- package/vendor/nanocodex/index.d.mts +81 -0
- package/vendor/nanocodex/index.mjs +12 -0
- package/vendor/nanocodex/internal.mjs +1275 -0
- package/vendor/nanocodex/managed/Agent.d.mts +380 -0
- package/vendor/nanocodex/managed/Agent.mjs +1694 -0
- package/vendor/nanocodex/managed/ManagedError.d.mts +9 -0
- package/vendor/nanocodex/managed/ManagedError.mjs +8 -0
- package/vendor/nanocodex/managed/README.md +241 -0
- package/vendor/nanocodex/managed/Voice.mjs +202 -0
- package/vendor/nanocodex/managed/index.d.mts +20 -0
- package/vendor/nanocodex/managed/index.mjs +2 -0
- package/vendor/nanocodex/managed/internal.mjs +119 -0
- package/vendor/nanocodex/node/Agent.d.mts +50 -0
- package/vendor/nanocodex/node/Agent.mjs +203 -0
- package/vendor/nanocodex/node/ChatGptSubscription.d.mts +9 -0
- package/vendor/nanocodex/node/ChatGptSubscription.mjs +17 -0
- package/vendor/nanocodex/node/Transport.d.mts +44 -0
- package/vendor/nanocodex/node/Transport.mjs +46 -0
- package/vendor/nanocodex/node/host.mjs +731 -0
- package/vendor/nanocodex/node/index.d.mts +73 -0
- package/vendor/nanocodex/node/index.mjs +17 -0
- package/vendor/nanocodex/node/workspace.d.mts +10 -0
- package/vendor/nanocodex/node/workspace.mjs +198 -0
- package/vendor/nanocodex/package.json +200 -0
- package/vendor/nanocodex/pkg-node/nanocodex.d.ts +675 -0
- package/vendor/nanocodex/pkg-node/nanocodex.js +2628 -0
- package/vendor/nanocodex/pkg-node/nanocodex_bg.wasm.d.ts +105 -0
- package/vendor/nanocodex/pkg-node/package.json +1 -0
- package/vendor/nanocodex/pkg-web/.nanocodex-bindgen-stamp +6 -0
- package/vendor/nanocodex/pkg-web/nanocodex-build.json +1 -0
- package/vendor/nanocodex/pkg-web/nanocodex.d.ts +805 -0
- package/vendor/nanocodex/pkg-web/nanocodex.js +2714 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.js +2615 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.wasm +0 -0
- package/vendor/nanocodex/pkg-web/nanocodex_bg.wasm.d.ts +105 -0
- package/vendor/nanocodex/pkg-web/nanocodex_worker.js +9 -0
- package/vendor/nanocodex/pkg-web/package.json +1 -0
- package/vendor/nanocodex/runtime/chatgpt-subscription.mjs +212 -0
- package/vendor/nanocodex/runtime/cloudflare-durability-store.d.mts +26 -0
- package/vendor/nanocodex/runtime/cloudflare-durability-store.mjs +168 -0
- package/vendor/nanocodex/runtime/code-evaluator.worker.mjs +137 -0
- package/vendor/nanocodex/runtime/code-runtime.mjs +1 -0
- package/vendor/nanocodex/runtime/durability-store.d.mts +85 -0
- package/vendor/nanocodex/runtime/durability-store.mjs +631 -0
- package/vendor/nanocodex/runtime/durability.mjs +153 -0
- package/vendor/nanocodex/runtime/managed-transport.mjs +460 -0
- package/vendor/nanocodex/runtime/mcp-runtime.mjs +534 -0
- package/vendor/nanocodex/runtime/postgres-durability-store.d.mts +64 -0
- package/vendor/nanocodex/runtime/postgres-durability-store.mjs +532 -0
- package/vendor/nanocodex/runtime/quickjs-evaluator.d.mts +17 -0
- package/vendor/nanocodex/runtime/quickjs-evaluator.mjs +236 -0
- package/vendor/nanocodex/runtime/responses-transport.mjs +22 -0
- package/vendor/nanocodex/runtime/subagents.d.mts +107 -0
- package/vendor/nanocodex/runtime/subagents.mjs +54 -0
- package/vendor/nanocodex/runtime/subscription-store.d.mts +8 -0
- package/vendor/nanocodex/runtime/subscription-store.mjs +42 -0
- package/vendor/nanocodex/runtime/tempo-provider.d.mts +125 -0
- package/vendor/nanocodex/runtime/tempo-provider.mjs +264 -0
- package/vendor/nanocodex/runtime/tool-configuration.mjs +1 -0
- package/vendor/nanocodex/runtime/tool-router.mjs +1 -0
- package/vendor/nanocodex/runtime/utf8.mjs +1 -0
- package/vendor/nanocodex/runtime/worker-evaluator.mjs +162 -0
- package/vendor/nanocodex/runtime/workspace.d.mts +1 -0
- package/vendor/nanocodex/runtime/workspace.mjs +1 -0
- package/vendor/nanocodex/tools/Tools.d.mts +56 -0
- package/vendor/nanocodex/tools/Tools.mjs +136 -0
- package/vendor/nanocodex/tools/artifact.d.mts +1 -0
- package/vendor/nanocodex/tools/artifact.mjs +1 -0
- package/vendor/nanocodex/tools/attachment.mjs +1 -0
- package/vendor/nanocodex/tools/bash.d.mts +1 -0
- package/vendor/nanocodex/tools/bash.mjs +1 -0
- package/vendor/nanocodex/tools/browser/accountInfo.mjs +795 -0
- package/vendor/nanocodex/tools/browser/browserBuffer.mjs +18 -0
- package/vendor/nanocodex/tools/browser/browserCompiler.mjs +155 -0
- package/vendor/nanocodex/tools/browser/browserEgress.mjs +161 -0
- package/vendor/nanocodex/tools/browser/browserPython.mjs +133 -0
- package/vendor/nanocodex/tools/browser/browserShell.mjs +1075 -0
- package/vendor/nanocodex/tools/browser/browserSprintf.mjs +4 -0
- package/vendor/nanocodex/tools/browser/browserSsh.mjs +201 -0
- package/vendor/nanocodex/tools/browser/browserZlib.mjs +136 -0
- package/vendor/nanocodex/tools/browser/compiler.worker.mjs +160 -0
- package/vendor/nanocodex/tools/browser/devTunnelsSshBrowser.mjs +13 -0
- package/vendor/nanocodex/tools/browser/index.d.mts +209 -0
- package/vendor/nanocodex/tools/browser/index.mjs +174 -0
- package/vendor/nanocodex/tools/browser/opfsGit.mjs +248 -0
- package/vendor/nanocodex/tools/browser/python.worker.mjs +114 -0
- package/vendor/nanocodex/tools/browser/threadGit.mjs +197 -0
- package/vendor/nanocodex/tools/browser/unsupportedNodeRsa.mjs +5 -0
- package/vendor/nanocodex/tools/browser/workspace.mjs +83 -0
- package/vendor/nanocodex/tools/dataset.d.mts +1 -0
- package/vendor/nanocodex/tools/dataset.mjs +1 -0
- package/vendor/nanocodex/tools/datasetContract.mjs +1 -0
- package/vendor/nanocodex/tools/datasetEngine.mjs +1 -0
- package/vendor/nanocodex/tools/hostedCatalog.d.mts +1 -0
- package/vendor/nanocodex/tools/hostedCatalog.mjs +1 -0
- package/vendor/nanocodex/tools/index.d.mts +49 -0
- package/vendor/nanocodex/tools/index.mjs +19 -0
- package/vendor/nanocodex/tools/namedTool.mjs +1 -0
- package/vendor/nanocodex/tools/repository-workspace.d.mts +1 -0
- package/vendor/nanocodex/tools/repository-workspace.mjs +1 -0
- package/vendor/nanocodex/tools/ssh.d.mts +1 -0
- package/vendor/nanocodex/tools/ssh.mjs +1 -0
- package/vendor/nanocodex/tools/standard.mjs +1 -0
- package/vendor/nanocodex/tools/standardDescriptions.mjs +1 -0
- package/vendor/nanocodex/types.d.mts +663 -0
- package/vendor/nanocodex/wasm.d.mts +4 -0
- package/vendor/nanocodex/worker/ChatGptSubscription.d.mts +9 -0
- package/vendor/nanocodex/worker/ChatGptSubscription.mjs +29 -0
- package/vendor/nanocodex/worker/index.d.mts +18 -0
- package/vendor/nanocodex/worker/index.mjs +5 -0
- package/vendor/nanocodex-tools/README.md +65 -0
- package/vendor/nanocodex-tools/dist/hosted/app-tool-catalog.d.ts +7 -0
- package/vendor/nanocodex-tools/dist/hosted/app-tool-catalog.js +14 -0
- package/vendor/nanocodex-tools/dist/hosted/broker-core.d.ts +172 -0
- package/vendor/nanocodex-tools/dist/hosted/broker-core.js +1278 -0
- package/vendor/nanocodex-tools/dist/hosted/index.d.ts +3 -0
- package/vendor/nanocodex-tools/dist/hosted/index.js +3 -0
- package/vendor/nanocodex-tools/dist/hosted/protocol.d.ts +120 -0
- package/vendor/nanocodex-tools/dist/hosted/protocol.js +415 -0
- package/vendor/nanocodex-tools/dist/index.d.ts +19 -0
- package/vendor/nanocodex-tools/dist/index.js +14 -0
- package/vendor/nanocodex-tools/dist/memory.d.ts +204 -0
- package/vendor/nanocodex-tools/dist/memory.js +411 -0
- package/vendor/nanocodex-tools/dist/namespace.d.ts +87 -0
- package/vendor/nanocodex-tools/dist/namespace.js +338 -0
- package/vendor/nanocodex-tools/dist/repository-archive.d.ts +4 -0
- package/vendor/nanocodex-tools/dist/repository-archive.js +104 -0
- package/vendor/nanocodex-tools/dist/runtime.d.ts +30 -0
- package/vendor/nanocodex-tools/dist/runtime.js +37 -0
- package/vendor/nanocodex-tools/dist/session.d.ts +167 -0
- package/vendor/nanocodex-tools/dist/session.js +286 -0
- package/vendor/nanocodex-tools/dist/shell.d.ts +51 -0
- package/vendor/nanocodex-tools/dist/shell.js +553 -0
- package/vendor/nanocodex-tools/dist/ssh.d.ts +29 -0
- package/vendor/nanocodex-tools/dist/ssh.js +66 -0
- package/vendor/nanocodex-tools/dist/workspace.d.ts +45 -0
- package/vendor/nanocodex-tools/dist/workspace.js +237 -0
- package/vendor/nanocodex-tools/package.json +122 -0
- package/vendor/nanocodex-tools/runtime/code-runtime.mjs +817 -0
- package/vendor/nanocodex-tools/runtime/tool-configuration.mjs +50 -0
- package/vendor/nanocodex-tools/runtime/tool-router.mjs +730 -0
- package/vendor/nanocodex-tools/runtime/utf8.d.mts +2 -0
- package/vendor/nanocodex-tools/runtime/utf8.mjs +25 -0
- package/vendor/nanocodex-tools/tools/artifact.d.mts +69 -0
- package/vendor/nanocodex-tools/tools/artifact.mjs +270 -0
- package/vendor/nanocodex-tools/tools/attachment.mjs +603 -0
- package/vendor/nanocodex-tools/tools/bash.d.mts +90 -0
- package/vendor/nanocodex-tools/tools/bash.mjs +742 -0
- package/vendor/nanocodex-tools/tools/dataset.d.mts +9 -0
- package/vendor/nanocodex-tools/tools/dataset.mjs +47 -0
- package/vendor/nanocodex-tools/tools/datasetContract.mjs +54 -0
- package/vendor/nanocodex-tools/tools/datasetEngine.mjs +1167 -0
- package/vendor/nanocodex-tools/tools/execution-contract.d.mts +5 -0
- package/vendor/nanocodex-tools/tools/execution-contract.mjs +63 -0
- package/vendor/nanocodex-tools/tools/hostedCatalog.d.mts +20 -0
- package/vendor/nanocodex-tools/tools/hostedCatalog.mjs +67 -0
- package/vendor/nanocodex-tools/tools/hostedMachine.d.mts +10 -0
- package/vendor/nanocodex-tools/tools/hostedMachine.mjs +56 -0
- package/vendor/nanocodex-tools/tools/just-bash-browser.d.mts +1 -0
- package/vendor/nanocodex-tools/tools/just-bash-browser.mjs +1 -0
- package/vendor/nanocodex-tools/tools/namedTool.d.mts +3 -0
- package/vendor/nanocodex-tools/tools/namedTool.mjs +3 -0
- package/vendor/nanocodex-tools/tools/nodeProcess.d.mts +10 -0
- package/vendor/nanocodex-tools/tools/nodeProcess.mjs +314 -0
- package/vendor/nanocodex-tools/tools/processOutput.mjs +56 -0
- package/vendor/nanocodex-tools/tools/repository-workspace.d.mts +55 -0
- package/vendor/nanocodex-tools/tools/repository-workspace.mjs +397 -0
- package/vendor/nanocodex-tools/tools/ssh.d.mts +56 -0
- package/vendor/nanocodex-tools/tools/ssh.mjs +503 -0
- package/vendor/nanocodex-tools/tools/standard.mjs +458 -0
- package/vendor/nanocodex-tools/tools/standardDescriptions.mjs +3 -0
- package/vendor/nanocodex-tools/tools/types.d.mts +83 -0
- package/vendor/nanocodex-tools/tools/workspace.d.mts +25 -0
- package/vendor/nanocodex-tools/tools/workspace.mjs +282 -0
- package/vendor/nanocodex-tools/tools/x.d.mts +30 -0
- package/vendor/nanocodex-tools/tools/x.mjs +91 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of fifty percent (50%) or more of the outstanding shares.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work of authorship, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this definition, Derivative Works shall not include works that remain separable from, or merely link (or bind) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner.
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain all copyright, patent, trademark, and attribution notices from the Source form.
|
|
40
|
+
|
|
41
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work shall be under the terms and conditions of this License.
|
|
42
|
+
|
|
43
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor.
|
|
44
|
+
|
|
45
|
+
7. Disclaimer of Warranty. The Work is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
46
|
+
|
|
47
|
+
8. Limitation of Liability. In no event shall any Contributor be liable for any damages arising from the use or inability to use the Work.
|
|
48
|
+
|
|
49
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work, You may choose to offer support or warranty obligations consistent with this License, but only on Your own behalf.
|
|
50
|
+
|
|
51
|
+
END OF TERMS AND CONDITIONS
|
|
52
|
+
|
|
53
|
+
Copyright 2026 LamplitIsles
|
|
54
|
+
|
|
55
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
56
|
+
you may not use this file except in compliance with the License.
|
|
57
|
+
You may obtain a copy of the License at
|
|
58
|
+
|
|
59
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
60
|
+
|
|
61
|
+
Unless required by applicable law or agreed to in writing, software
|
|
62
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
63
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
64
|
+
See the License for the specific language governing permissions and
|
|
65
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# DSH Nanocodex
|
|
2
|
+
|
|
3
|
+
This package replaces the selected DeepSeek Harness agent loop with the
|
|
4
|
+
Nanocodex Node/WASM engine. DSH remains the owner of session events, settings,
|
|
5
|
+
credentials, workspace policy, and tool execution; Nanocodex owns model
|
|
6
|
+
execution, Code Mode, QuickJS, and model-context compaction.
|
|
7
|
+
|
|
8
|
+
The workspace install hook downloads the Nanocodex SDK and tools from the
|
|
9
|
+
GitHub release pinned in `engine-release.json`, verifies their SHA-256 hashes,
|
|
10
|
+
and caches them under the repository's `.cache/nanocodex/`. Local development
|
|
11
|
+
and CI use these same archives without a sibling checkout. During packing,
|
|
12
|
+
`prepack` copies both archives into `vendor/`, rewrites their internal imports,
|
|
13
|
+
and removes the local dependency entries from the packed manifest. The packed
|
|
14
|
+
plugin includes the release pin and runs without downloading engine artifacts.
|
|
15
|
+
Source provenance is recorded in `docs/IMPORTS.md` and
|
|
16
|
+
`docs/nanocodex-companion-engine.md`.
|
|
17
|
+
|
|
18
|
+
## Supported route
|
|
19
|
+
|
|
20
|
+
The adapter accepts only the explicit OpenAI Responses route (`openai` or
|
|
21
|
+
`openai-codex-responses`) and the four Nanocodex model ids:
|
|
22
|
+
`gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, and `gpt-6-astra`.
|
|
23
|
+
The selected route's `apiKeyEnv` and optional `baseURL` are read from the
|
|
24
|
+
DSH-owned `llm-pi-ai` settings shape and its credential is resolved through
|
|
25
|
+
`ctx.credentials` for each engine creation. Unsupported routes fail before a
|
|
26
|
+
provider request. The adapter accepts only the named `openai` and
|
|
27
|
+
`openai-codex-responses` providers with an `openai`/`openai-responses` API.
|
|
28
|
+
|
|
29
|
+
## Tool surface
|
|
30
|
+
|
|
31
|
+
Nanocodex exposes the ordinary tools composed by the active DSH profile,
|
|
32
|
+
including DSH Bash, MCP, and delegation. Nanocodex's built-in subagent tools
|
|
33
|
+
are disabled so delegation remains DSH-owned. The package also registers the
|
|
34
|
+
DSH-authorized `apply_patch` tool as a raw custom model tool:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
*** Begin Patch
|
|
38
|
+
*** Add File: notes/example.txt
|
|
39
|
+
+new text
|
|
40
|
+
*** Update File: notes/existing.txt
|
|
41
|
+
@@
|
|
42
|
+
-old text
|
|
43
|
+
+new text
|
|
44
|
+
*** End Patch
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Only `Add File` and `Update File` operations are supported. `Delete File` and
|
|
48
|
+
`Move to` are rejected. The patch parser and matcher are maintained in this
|
|
49
|
+
package, while the active DSH filesystem resolves paths, observes versions,
|
|
50
|
+
enforces workspace containment, and performs guarded writes. Historical patch
|
|
51
|
+
calls are hydrated as raw custom calls and are never executed again during
|
|
52
|
+
resume or compaction; their results retain diff metadata for the Host.
|
|
53
|
+
|
|
54
|
+
For local images, use DSH's official `read_image` tool and emit its adapted
|
|
55
|
+
Code Mode result:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
image(await tools.read_image({ file_path: "picture.png" }));
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The Code Mode result contains only `path` and `image_url`; the DSH result
|
|
62
|
+
keeps its durable attachment reference. Call `image(result)` to emit the image;
|
|
63
|
+
a bare `return result` completes the script without emitting it. Reading images
|
|
64
|
+
through bash output is unnecessary and can truncate binary data.
|
|
65
|
+
|
|
66
|
+
At a stopped driver boundary, interrupted calls receive an explicit error
|
|
67
|
+
result. Agent activation also closes missing results left by an earlier failed
|
|
68
|
+
turn, preserving the original calls and completed child operations. Recovery
|
|
69
|
+
never re-executes tools or assumes their side effects were rolled back. A
|
|
70
|
+
projection failure retains its original cause instead of reporting only the
|
|
71
|
+
cancellation used to stop generation.
|
|
72
|
+
|
|
73
|
+
Existing sessions are continued from DSH's active surface through typed
|
|
74
|
+
`historySeed` hydration. Text-only reasoning blocks remain in the DSH transcript
|
|
75
|
+
but are omitted from the model history: they are not portable provider reasoning
|
|
76
|
+
items. Visible answers and tool exchanges retain their order, and reasoning-only
|
|
77
|
+
messages do not create empty model messages.
|
|
78
|
+
Pi-style `call_id|item_id` tool identities are split before replay: calls and
|
|
79
|
+
results share the sanitized, at-most-64-character call part. DSH keeps the full
|
|
80
|
+
original identity, including during compaction; ambiguous projected call IDs
|
|
81
|
+
are rejected instead of merging tool exchanges.
|
|
82
|
+
|
|
83
|
+
After each successful turn, the adapter replaces that session's checkpoint in
|
|
84
|
+
DSH's private `nanocodex_checkpoints` storage domain and awaits persistence.
|
|
85
|
+
The record includes the Nanocodex snapshot and an exact active
|
|
86
|
+
surface boundary (replacement generation, surface sequence list, message count,
|
|
87
|
+
and fingerprint). A new Host uses a checkpoint only when its route and boundary
|
|
88
|
+
match; otherwise it hydrates the current DSH surface and never lets stale engine
|
|
89
|
+
state override newer facts. Browser-visible `request/context` events contain
|
|
90
|
+
only route and context-window metadata; image-heavy engine snapshots never
|
|
91
|
+
travel in history pages. The private domain closes with the plugin and retains
|
|
92
|
+
one latest checkpoint per session across Host restarts.
|
|
93
|
+
|
|
94
|
+
## Compaction ownership
|
|
95
|
+
|
|
96
|
+
Nanocodex performs manual and automatic custom compaction on the retained live
|
|
97
|
+
runtime. Before each summary it sends a non-generating `purpose: "compaction"`
|
|
98
|
+
request through DSH's existing `llm/stream` waterfall, ending at an empty
|
|
99
|
+
stream. The original Companion middleware therefore selects its product-owned
|
|
100
|
+
continuity instruction for configured sessions; this package does not copy
|
|
101
|
+
that prompt. Unconfigured sessions use the adapter's short generic continuity
|
|
102
|
+
instruction.
|
|
103
|
+
|
|
104
|
+
The adapter consumes Nanocodex's `model.compaction.replaced` outcome exactly
|
|
105
|
+
once per live runtime/revision. Its half-open model-history range and ordered
|
|
106
|
+
retained-tail identities are mapped to DSH messages by exact history-item
|
|
107
|
+
`kind`, `id`, and `call_id`, including complete retained tool exchanges. The
|
|
108
|
+
DSH surface then replaces the prefix before the latest real user-led tail with
|
|
109
|
+
the normal private compaction checkpoint. A public `compactRegion` request is
|
|
110
|
+
supported only for that current prefix; arbitrary middle ranges fail with a
|
|
111
|
+
`changed` error before any model or surface mutation.
|
|
112
|
+
|
|
113
|
+
The successful replacement stays in the same Nanocodex runtime, preserving its
|
|
114
|
+
model/tool configuration and transport policy. If mapping or DSH persistence
|
|
115
|
+
fails after installation, the runtime is invalidated and the next request
|
|
116
|
+
rebuilds from the authoritative DSH surface. Failed or canceled generation
|
|
117
|
+
does not publish a successful checkpoint. The next ordinary request may miss
|
|
118
|
+
the provider cache after replacement; cache-hit evidence requires authorized
|
|
119
|
+
Owner acceptance and is not inferred from the local smoke.
|
|
120
|
+
|
|
121
|
+
## Hosted transport fallback
|
|
122
|
+
|
|
123
|
+
The adapter passes the configured `baseURL` and `websocketURL` to Nanocodex's
|
|
124
|
+
public Node `Transport.openAi` route for ordinary Agent turns, manual
|
|
125
|
+
compaction, and ancillary LLM requests. Nanocodex initially prefers its
|
|
126
|
+
WebSocket transport. A failure during connection, before response output or
|
|
127
|
+
tool execution, falls back to POST HTTPS/SSE; caller cancellation,
|
|
128
|
+
authentication or validation failures, and failures after output begins are not
|
|
129
|
+
resubmitted. SSE remains sticky for the affected Node runtime, so the adapter
|
|
130
|
+
does not add a second loop, provider switch, or fallback settings surface.
|
|
131
|
+
|
|
132
|
+
Each eligible fallback is projected to the existing Host logger under
|
|
133
|
+
`dsh-nanocodex.transport` as a sanitized
|
|
134
|
+
`nanocodex.transport_fallback` record containing the DSH session, request
|
|
135
|
+
correlation, previous/next transport, error class, and reason. Credentials,
|
|
136
|
+
headers, request bodies, prompts, provider errors, and private compaction data
|
|
137
|
+
are not included, and the record is not published as Companion chat.
|
|
138
|
+
|
|
139
|
+
For an authorized live check, obtain the exact Host PID (for example, with
|
|
140
|
+
`systemctl --user show dsh-dev.service --property=MainPID --value`), attach a
|
|
141
|
+
loopback Node Inspector to that process (if it is not already listening, the
|
|
142
|
+
authorized operator can send `SIGUSR1`, then use the target from
|
|
143
|
+
`http://127.0.0.1:9229/json/list`), and pause in a Nanocodex engine or LLM
|
|
144
|
+
adapter method where the live `this.ctx` is in scope. Evaluate this scoped
|
|
145
|
+
query; do not import a new Cordis root or dump the full buffer:
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
this.ctx.logger.buffer
|
|
149
|
+
.filter((entry) => entry.name === "dsh-nanocodex.transport")
|
|
150
|
+
.map((entry) => entry.args[0])
|
|
151
|
+
.filter((record) => record?.kind === "nanocodex.transport_fallback");
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Resume execution, disconnect the Inspector, and disable/close the loopback
|
|
155
|
+
Inspector when finished. The in-process logger retains the latest 1,000
|
|
156
|
+
messages across logger names; a Host restart discards them. The built-in buffer
|
|
157
|
+
is not exported to the systemd journal by default, so use an existing Host
|
|
158
|
+
logger exporter only when an external sink is already configured. The plugin
|
|
159
|
+
does not create a second telemetry store.
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
corepack pnpm --filter @lamplitisles/dsh-nanocodex run typecheck
|
|
165
|
+
corepack pnpm --filter @lamplitisles/dsh-nanocodex run test
|
|
166
|
+
corepack pnpm --filter @lamplitisles/dsh-nanocodex run build
|
|
167
|
+
DSH_CLI=/absolute/path/to/dsh corepack pnpm --filter @lamplitisles/dsh-nanocodex run pack-smoke
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The plugin uses Nanocodex's public `createQuickJsEvaluator` binding. DSH tools
|
|
171
|
+
are exposed to Code Mode as guarded bridge functions; their calls retain the
|
|
172
|
+
real DSH agent, session identity, and cancellation signal.
|
|
173
|
+
|
|
174
|
+
The packed smoke uses a test-owned official DSH `0.1.2-rc.1` runtime and a
|
|
175
|
+
loopback scripted provider. It does not use live credentials or the persistent
|
|
176
|
+
development profile. Its Nanocodex provider rejects WebSocket upgrades and
|
|
177
|
+
serves the scripted responses through local HTTP/SSE, proving the actual packed
|
|
178
|
+
WASM/QuickJS fallback path and the queryable Host diagnostic.
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The direct `apply_patch` tool carries the parser, matcher, and text-file
|
|
4
|
+
portions of OpenAI Codex at commit
|
|
5
|
+
`8e6a44b428e31f91b21edc97904fcdf4f0931ade`. It is limited to Codex `Add File`
|
|
6
|
+
and `Update File` operations; Delete File and Move to are intentionally
|
|
7
|
+
rejected. The wire grammar follows the same source with those operations
|
|
8
|
+
removed.
|
|
9
|
+
|
|
10
|
+
Sources:
|
|
11
|
+
|
|
12
|
+
- <https://github.com/openai/codex/blob/8e6a44b428e31f91b21edc97904fcdf4f0931ade/codex-rs/core/assets/tools/apply_patch.lark>
|
|
13
|
+
- <https://github.com/openai/codex/tree/8e6a44b428e31f91b21edc97904fcdf4f0931ade/codex-rs/apply-patch/src>
|
|
14
|
+
|
|
15
|
+
OpenAI's attribution is reproduced in [`NOTICE`](NOTICE). The port is
|
|
16
|
+
distributed under the Apache License 2.0; [`LICENSE`](LICENSE) contains the
|
|
17
|
+
license text.
|
|
18
|
+
|
|
19
|
+
This package carries the packed JavaScript and WebAssembly runtime from the
|
|
20
|
+
Nanocodex project and its platform-neutral tool package so the DSH artifact does
|
|
21
|
+
not depend on a sibling checkout.
|
|
22
|
+
|
|
23
|
+
- `vendor/nanocodex` — Nanocodex, version 0.5.0, licensed under MIT OR Apache-2.0.
|
|
24
|
+
Source: <https://github.com/gakonst/nanocodex>.
|
|
25
|
+
- `vendor/nanocodex-tools` — nanocodex-tools, version 0.1.0, licensed under MIT
|
|
26
|
+
OR Apache-2.0. Source: <https://github.com/gakonst/nanocodex>.
|
|
27
|
+
|
|
28
|
+
The exact local source checkout and packing procedure are recorded in
|
|
29
|
+
[`docs/nanocodex-companion-engine.md`](../../docs/nanocodex-companion-engine.md).
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Nanocodex is the selected profile's only agent driver. The rows disabled here
|
|
2
|
+
# are the old request/compaction/code-mode owners; ordinary DSH tools and their
|
|
3
|
+
# business integrations remain composed by the profile.
|
|
4
|
+
- id: agent-loop
|
|
5
|
+
disabled: true
|
|
6
|
+
|
|
7
|
+
- id: llm-pi-ai
|
|
8
|
+
disabled: true
|
|
9
|
+
|
|
10
|
+
- id: llm-deepseek
|
|
11
|
+
disabled: true
|
|
12
|
+
|
|
13
|
+
- id: compaction-basic
|
|
14
|
+
disabled: true
|
|
15
|
+
|
|
16
|
+
- id: command-compact
|
|
17
|
+
disabled: true
|
|
18
|
+
|
|
19
|
+
# Replace only the shipped standard preset with the package-owned wrapper. The
|
|
20
|
+
# wrapper includes the installed official composition and disables the nested
|
|
21
|
+
# Basic owner through cordis-plugin-include's public patch seam. Other shipped
|
|
22
|
+
# presets remain discoverable from the official root, and the user root remains
|
|
23
|
+
# enabled by the agent-presets defaults.
|
|
24
|
+
- id: agent-presets
|
|
25
|
+
name: "@deepseek-ai/dsh-agent-presets"
|
|
26
|
+
config:
|
|
27
|
+
default: standard
|
|
28
|
+
includeShippedRoot: false
|
|
29
|
+
includeUserRoot: true
|
|
30
|
+
roots:
|
|
31
|
+
- path: !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@lamplitisles/dsh-nanocodex/package.json')), 'presets')"
|
|
32
|
+
trust: system
|
|
33
|
+
- path: !!js "process.getBuiltinModule('node:path').join(process.getBuiltinModule('node:path').dirname(process.getBuiltinModule('node:module').createRequire(baseUrl).resolve('@deepseek-ai/dsh-agent-presets/package.json')), 'presets')"
|
|
34
|
+
trust: system
|
|
35
|
+
|
|
36
|
+
- insert:
|
|
37
|
+
- id: dsh-nanocodex
|
|
38
|
+
name: "@lamplitisles/dsh-nanocodex"
|
|
39
|
+
inject:
|
|
40
|
+
[
|
|
41
|
+
agents,
|
|
42
|
+
sessions,
|
|
43
|
+
settings,
|
|
44
|
+
credentials,
|
|
45
|
+
attachments,
|
|
46
|
+
commands,
|
|
47
|
+
systemPrompt,
|
|
48
|
+
tools,
|
|
49
|
+
fs,
|
|
50
|
+
storageDomain,
|
|
51
|
+
llm,
|
|
52
|
+
]
|