@arcfold/dsh 0.0.0-stage → 0.4.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.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -2
  3. package/THIRD_PARTY_NOTICES.md +11 -0
  4. package/cordis.patch.yml +138 -0
  5. package/package.json +70 -4
  6. package/patches/deepseek-0.2.2-rc.1-transport.json +65 -0
  7. package/patches/deepseek-0.2.2-rc.1-transport.patch +61 -0
  8. package/presets/arcfold.patch.yml +110 -0
  9. package/runtime/README.md +19 -0
  10. package/runtime/bootstrap.json +15 -0
  11. package/runtime/desktop-python.tar.gz +0 -0
  12. package/runtime/host/package.json +11 -0
  13. package/runtime/host/pnpm-workspace.yaml +9 -0
  14. package/runtime/initial-policy.json +94 -0
  15. package/runtime/profile/pnpm-workspace.yaml +7 -0
  16. package/scripts/exact-package-patch.mjs +106 -0
  17. package/scripts/patch-deepseek-transport.mjs +14 -0
  18. package/src/agent.mjs +56 -0
  19. package/src/browse-scope.mjs +14 -0
  20. package/src/budget.mjs +369 -0
  21. package/src/business.mjs +334 -0
  22. package/src/context-material.mjs +119 -0
  23. package/src/deepseek-budget-plugin.mjs +58 -0
  24. package/src/deepseek-provider.mjs +57 -0
  25. package/src/deepseek-receipt.mjs +97 -0
  26. package/src/deepseek-transport.mjs +97 -0
  27. package/src/desktop/adapter.mjs +16 -0
  28. package/src/desktop/bootstrap.mjs +84 -0
  29. package/src/desktop/configuration.mjs +117 -0
  30. package/src/desktop/provider.mjs +46 -0
  31. package/src/desktop/python-runtime.mjs +105 -0
  32. package/src/desktop/setup-service.mjs +81 -0
  33. package/src/desktop/vendor/LICENSE.deepseek +21 -0
  34. package/src/desktop/vendor/NOTICE.md +5 -0
  35. package/src/desktop/vendor/deepseek-0.2.2-rc.1.mjs +2919 -0
  36. package/src/evidence-ownership.mjs +51 -0
  37. package/src/evidence.mjs +35 -0
  38. package/src/goal-context.mjs +52 -0
  39. package/src/goal-execution-tool.mjs +74 -0
  40. package/src/goal-execution.mjs +333 -0
  41. package/src/goal-tool.mjs +56 -0
  42. package/src/goal-work-control.mjs +63 -0
  43. package/src/goal-work.mjs +257 -0
  44. package/src/goals.mjs +578 -0
  45. package/src/importer.mjs +298 -0
  46. package/src/index.mjs +53 -0
  47. package/src/learning-contracts.mjs +220 -0
  48. package/src/learning-defaults.mjs +98 -0
  49. package/src/learning-goals.mjs +165 -0
  50. package/src/learning-plugin.mjs +28 -0
  51. package/src/learning-runner.mjs +275 -0
  52. package/src/learning.mjs +534 -0
  53. package/src/legacy-export.mjs +332 -0
  54. package/src/legacy-import-source.mjs +356 -0
  55. package/src/metered-provider-host.mjs +101 -0
  56. package/src/metered-transport.mjs +435 -0
  57. package/src/method-context.mjs +57 -0
  58. package/src/method-lifecycle.mjs +34 -0
  59. package/src/method-tool.mjs +61 -0
  60. package/src/methods.mjs +425 -0
  61. package/src/model-selection.mjs +41 -0
  62. package/src/native-context-call.mjs +88 -0
  63. package/src/native-continuation.mjs +217 -0
  64. package/src/native-request-authority.mjs +90 -0
  65. package/src/openai-models.mjs +4 -0
  66. package/src/openai-receipt.mjs +98 -0
  67. package/src/openai-transport.mjs +167 -0
  68. package/src/openai-usage.mjs +194 -0
  69. package/src/opportunities.mjs +295 -0
  70. package/src/preparation-artifacts.mjs +213 -0
  71. package/src/preparation-plugin.mjs +290 -0
  72. package/src/runtime-command.mjs +264 -0
  73. package/src/runtime-config.mjs +417 -0
  74. package/src/runtime-guard.mjs +284 -0
  75. package/src/runtime-host.mjs +212 -0
  76. package/src/runtime-init.mjs +278 -0
  77. package/src/runtime-installation.mjs +518 -0
  78. package/src/runtime-lifecycle.mjs +227 -0
  79. package/src/runtime-model-settings.mjs +111 -0
  80. package/src/runtime-readiness.mjs +285 -0
  81. package/src/runtime-workspace.mjs +18 -0
  82. package/src/session-bridge.mjs +365 -0
  83. package/src/store.mjs +394 -0
  84. package/src/tree/LICENSE +21 -0
  85. package/src/tree/attribution.mjs +120 -0
  86. package/src/tree/clusters.mjs +61 -0
  87. package/src/tree/consolidation.mjs +103 -0
  88. package/src/tree/context.mjs +211 -0
  89. package/src/tree/contracts.mjs +142 -0
  90. package/src/tree/experience.mjs +140 -0
  91. package/src/tree/experiment-budget.mjs +84 -0
  92. package/src/tree/hooks.mjs +254 -0
  93. package/src/tree/host-context.mjs +107 -0
  94. package/src/tree/host-process.mjs +288 -0
  95. package/src/tree/host.mjs +37 -0
  96. package/src/tree/improvement.mjs +106 -0
  97. package/src/tree/items.mjs +294 -0
  98. package/src/tree/jobs.mjs +184 -0
  99. package/src/tree/learning.mjs +202 -0
  100. package/src/tree/metrics.mjs +203 -0
  101. package/src/tree/model-owner.mjs +254 -0
  102. package/src/tree/observations.mjs +73 -0
  103. package/src/tree/prompts.mjs +500 -0
  104. package/src/tree/reports.mjs +67 -0
  105. package/src/tree/repository.mjs +236 -0
  106. package/src/tree/runtime.mjs +745 -0
  107. package/src/tree/script-writer.mjs +149 -0
  108. package/src/tree/scripts.mjs +208 -0
  109. package/src/tree/signals.mjs +118 -0
  110. package/src/tree/snapshots.mjs +379 -0
  111. package/src/tree/token-counter.mjs +75 -0
  112. package/src/tree/token-counter.py +37 -0
  113. package/src/tree/tokenizer-resources/LICENSE +21 -0
  114. package/src/tree/tokenizer-resources/README.md +31 -0
  115. package/src/tree/tokenizer-resources/deepseek_recipe-0.2.0-cp310-abi3-macosx_11_0_arm64.whl +0 -0
  116. package/src/tree/tokenizer-resources/manifest.json +61 -0
  117. package/src/tree/tokenizer-resources/native.pyi +1042 -0
  118. package/src/tree/tokenizer-resources/tokenizer-NOTICE.md +26 -0
  119. package/src/tree/tokenizer-resources/tokenizer-v4-NOTICE.md +27 -0
  120. package/src/tree/tokenizer-resources/tokenizer-v4.json +267359 -0
  121. package/src/tree/tokenizer-resources/tokenizer.json +267359 -0
  122. package/src/tree/tools.mjs +99 -0
  123. package/src/tree/tree.mjs +202 -0
  124. package/src/tree/ui.mjs +285 -0
  125. package/src/tree/verification.mjs +143 -0
  126. package/src/understandings.mjs +309 -0
  127. package/src/web-budget-recovery.mjs +181 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arcfold contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
- # Temporary Holding Version
1
+ # Arcfold for DeepSeek Harness Desktop
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Arcfold 0.4.0 runs in DSH 0.2.2-rc.1 on macOS with Apple silicon.
4
+
5
+ Open Plugins, choose Add plugin, and enter `@arcfold/dsh`. Enable Arcfold and complete its first-run setup. It creates its own workspace and data. Configure DeepSeek in DSH's Models settings when ready.
6
+
7
+ To update, open the installed Arcfold entry in Plugins, choose a compatible version, and confirm. Back up your Desktop data before replacing the installed version.
8
+
9
+ The Desktop plugin currently supports DeepSeek Pro and Flash.
@@ -0,0 +1,11 @@
1
+ # 第三方组件说明(待公开审查)
2
+
3
+ Arcfold 自身贡献采用 [MIT 许可证](LICENSE)。本仓库同时包含或依赖第三方组件,它们的版权与许可不因项目选择 MIT 而改变:
4
+
5
+ - `src/desktop/vendor/` 包含 DeepSeek 的适配代码及其 [MIT 许可](src/desktop/vendor/LICENSE.deepseek)和[来源说明](src/desktop/vendor/NOTICE.md)。
6
+ - `src/tree/tokenizer-resources/` 包含 DeepSeek 的分词资源及其 [MIT 许可](src/tree/tokenizer-resources/LICENSE)、[V4 说明](src/tree/tokenizer-resources/tokenizer-v4-NOTICE.md)和 [V4.1 说明](src/tree/tokenizer-resources/tokenizer-NOTICE.md)。
7
+ - 同目录的 `deepseek_recipe` wheel 包内自带 `LICENSE`、`THIRD_PARTY_LICENSES` 和材料清单;其中还包含其他依赖,需一并保留和核查。
8
+ - Desktop 核心包内的 `runtime/desktop-python.tar.gz` 保留 [Astral Python Build Standalone](https://github.com/astral-sh/python-build-standalone/releases/tag/20260901) 提供的完整原包。CPython 许可位于包内的 `python/lib/python3.12/LICENSE.txt`,pip 及其随附依赖的许可也在原包内。进一步的发行核查仍按本页下方的范围执行。
9
+ - 安装过程中取得的其他依赖以锁定文件和各依赖自身的许可为准;完整依赖许可核查尚未完成。
10
+
11
+ 本页是公开准备的索引,不代表全部第三方授权已经审核完成。
@@ -0,0 +1,138 @@
1
+ # Arcfold's host layer, after the official dsh-base and dsh-web-app bundles.
2
+ # A later profile/home/CLI patch provides every deployment-specific config.
3
+ # Cordis replaces a row's WHOLE config; it does not deep-merge these values.
4
+ # No personal paths, credentials, model prices, budget or new ledger live here.
5
+
6
+ # Keep the native DSH mark and name; Arcfold remains a conversation view.
7
+ - id: ui-brand-official
8
+ disabled: false
9
+
10
+ # Remove the three alternative model routes, not the official LLM runtime.
11
+ - id: llm-deepseek
12
+ disabled: true
13
+ - id: llm-deepseek-account
14
+ disabled: true
15
+ - id: llm-pi-ai
16
+ disabled: true
17
+
18
+ # These request extensions are outside the metered Messages contract.
19
+ # Native local persistence/query/observations remain enabled.
20
+ - id: deepseek-llm-api-extensions
21
+ disabled: true
22
+ - id: session-log-deepseek
23
+ disabled: true
24
+ - id: plugin-package-inventory-deepseek
25
+ disabled: true
26
+
27
+ # The current transport owns one main/native step or one frozen Learn call.
28
+ # Do not expose unaccounted retries, purpose calls, child sessions or scheduling.
29
+ - id: llm-retry
30
+ disabled: true
31
+ - id: session-title-llm
32
+ disabled: true
33
+ - id: goal-round-driver
34
+ # The native module identity is immutable in the official patch protocol.
35
+ # Wait for an explicit old-mode decision; new mode has no round driver.
36
+ disabled: false
37
+ inject: [arcfoldLegacyMode]
38
+ - id: fs-sandbox
39
+ inject: [arcfoldLegacyMode]
40
+ - id: bash-sandbox
41
+ inject: [arcfoldLegacyMode]
42
+ - id: compaction-basic
43
+ inject: [arcfoldLegacyMode]
44
+ - id: schedule
45
+ disabled: true
46
+ - id: ui-schedule
47
+ disabled: true
48
+ - id: subagent-spawn-in-process
49
+ disabled: true
50
+ - id: subagent-fork-in-process
51
+ disabled: true
52
+
53
+ # Preserve native no-clobber/version guards for main and preparation writes.
54
+ - id: fs-observation-policy
55
+ disabled: false
56
+
57
+ # Search has a separate paid HTTP path; plain public URL fetch stays native.
58
+ - id: web-search-deepseek
59
+ disabled: true
60
+ - id: web-deepseek-api
61
+ disabled: true
62
+
63
+ # The official alternative presets lack Arcfold's main ownership hook.
64
+ - id: preset-standard
65
+ disabled: true
66
+ - id: preset-minimal
67
+ disabled: true
68
+ - id: preset-ptc
69
+ disabled: true
70
+ - id: preset-cordis
71
+ disabled: true
72
+
73
+ # Launcher defaults belong below native user/home settings. Without a launcher,
74
+ # the independent plugin still requires its explicit deployment configuration.
75
+ - id: agent-default-model
76
+ # Fixed object paths let the official Loader update only volatile fields.
77
+ config:
78
+ provider: !!js "ctx.get('arcfoldRuntimeGuard')?.configuration.initialMain?.provider ?? ''"
79
+ model: !!js "ctx.get('arcfoldRuntimeGuard')?.configuration.initialMain?.model ?? ''"
80
+ reasoningEffort: !!js "ctx.get('arcfoldRuntimeGuard')?.configuration.initialMain?.reasoningEffort"
81
+
82
+ - id: agent-preset-registry
83
+ config:
84
+ default: arcfold-main
85
+
86
+ - insert:
87
+ - id: arcfold-tree-filesystem
88
+ name: '@arcfold/dsh/tree-host'
89
+ config:
90
+ component: filesystem
91
+ - id: arcfold-tree-shell
92
+ name: '@arcfold/dsh/tree-host'
93
+ config:
94
+ component: shell
95
+ timeoutMs: 60000
96
+ - id: arcfold-tree-compaction
97
+ name: '@arcfold/dsh/tree-host'
98
+ config:
99
+ component: compaction
100
+ - id: arcfold-desktop-bootstrap
101
+ name: '@arcfold/dsh/desktop-bootstrap'
102
+ - id: arcfold-business
103
+ name: '@arcfold/dsh'
104
+ inject: [arcfoldDesktopSetup]
105
+ config: {}
106
+
107
+ - id: arcfold-metered-budget
108
+ # Desktop tree mode supplies its own services after first-run setup.
109
+ disabled: !!js "Boolean(process.versions.electron && process.argv.some(value => value.includes('dsh-desktop-host')))"
110
+ name: '@arcfold/dsh/deepseek-budget'
111
+ config: {}
112
+
113
+ - id: arcfold-metered-provider
114
+ # Desktop tree mode supplies its own services after first-run setup.
115
+ disabled: !!js "Boolean(process.versions.electron && process.argv.some(value => value.includes('dsh-desktop-host')))"
116
+ name: '@arcfold/dsh/deepseek'
117
+ config: {}
118
+
119
+ - id: arcfold-shared-metered-host
120
+ name: '@arcfold/dsh/metered-budget'
121
+ disabled: true
122
+ config: {}
123
+
124
+
125
+ - id: arcfold-learning
126
+ # Desktop tree mode supplies its own services after first-run setup.
127
+ disabled: !!js "Boolean(process.versions.electron && process.argv.some(value => value.includes('dsh-desktop-host')))"
128
+ name: '@arcfold/dsh/learning'
129
+ config: {}
130
+
131
+ - id: arcfold-preparation
132
+ # Desktop tree mode supplies its own services after first-run setup.
133
+ disabled: !!js "Boolean(process.versions.electron && process.argv.some(value => value.includes('dsh-desktop-host')))"
134
+ name: '@arcfold/dsh/preparation'
135
+ config: {}
136
+
137
+ - id: arcfold-ui
138
+ name: '@arcfold/dsh-method-ui'
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "@arcfold/dsh",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "main": "./src/index.mjs",
6
+ "exports": {
7
+ ".": "./src/index.mjs",
8
+ "./agent": "./src/agent.mjs",
9
+ "./tree-host": "./src/tree/host.mjs",
10
+ "./learning": "./src/learning-plugin.mjs",
11
+ "./deepseek-budget": "./src/deepseek-budget-plugin.mjs",
12
+ "./deepseek": "./src/deepseek-provider.mjs",
13
+ "./cordis.patch.yml": "./cordis.patch.yml",
14
+ "./presets/*.patch.yml": "./presets/*.patch.yml",
15
+ "./package.json": "./package.json",
16
+ "./metered-budget": "./src/metered-provider-host.mjs",
17
+ "./preparation": "./src/preparation-plugin.mjs",
18
+ "./desktop-deepseek": "./src/desktop/provider.mjs",
19
+ "./desktop-configuration": "./src/desktop/configuration.mjs",
20
+ "./desktop-bootstrap": "./src/desktop/bootstrap.mjs"
21
+ },
22
+ "files": [
23
+ "src",
24
+ "runtime",
25
+ "cordis.patch.yml",
26
+ "presets",
27
+ "scripts/patch-deepseek-transport.mjs",
28
+ "patches",
29
+ "scripts/exact-package-patch.mjs",
30
+ "LICENSE",
31
+ "THIRD_PARTY_NOTICES.md"
32
+ ],
33
+ "engines": {
34
+ "node": ">=24.15.0",
35
+ "dsh": "0.2.2-rc.1"
36
+ },
37
+ "peerDependencies": {
38
+ "@deepseek-ai/cordis": "4.1.0"
39
+ },
40
+ "dependencies": {
41
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.1",
42
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.2-rc.1",
43
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.2-rc.1",
44
+ "@deepseek-ai/dsh-launch-environment": "0.2.2-rc.1",
45
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
46
+ "@deepseek-ai/node-addon-system": "0.1.2",
47
+ "eventsource-parser": "3.1.1",
48
+ "undici": "7.29.1",
49
+ "stream-json": "3.7.0",
50
+ "stream-chain": "4.2.5",
51
+ "@deepseek-ai/cosmokit": "1.9.0",
52
+ "@deepseek-ai/dsh-anonymous-user-id": "0.2.2-rc.1",
53
+ "@deepseek-ai/dsh-atomic-write": "0.2.2-rc.1",
54
+ "@deepseek-ai/dsh-attachment": "0.2.2-rc.1",
55
+ "@deepseek-ai/dsh-home-paths": "0.2.2-rc.1",
56
+ "@deepseek-ai/dsh-timeout": "0.2.2-rc.1",
57
+ "@deepseek-ai/dsh-util-values": "0.2.2-rc.1",
58
+ "@deepseek-ai/schemastery": "3.19.0",
59
+ "semver": "7.8.6",
60
+ "@arcfold/dsh-method-ui": "0.4.0"
61
+ },
62
+ "dsh": {
63
+ "bundle": {
64
+ "patch": [
65
+ "./cordis.patch.yml",
66
+ "./presets/arcfold.patch.yml"
67
+ ]
68
+ }
69
+ },
70
+ "license": "MIT",
71
+ "description": "Arcfold for DeepSeek Harness Desktop"
72
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "id": "deepseek-0.2.2-rc.1-transport-v1",
3
+ "package": "@deepseek-ai/dsh-llm-deepseek",
4
+ "version": "0.2.2-rc.1",
5
+ "upstreamCommit": "66491b05e3f05ad35bcdd4f6cd7ed26041d9e3db",
6
+ "scope": "Published npm dist only; optional per-stream Messages sender; no serializer/translator or Arcfold-specific upstream service",
7
+ "files": [
8
+ {
9
+ "path": "lib/index.js",
10
+ "beforeSha256": "955dc7bc7ca6c857ff4a7e373b87c143b96a4c43fc80325b67dc0982600dcc75",
11
+ "afterSha256": "fc27ceacbed59c8d32100f3aa41cf79e1acab403ac0bc12b0e7f807a6274c752",
12
+ "edits": [
13
+ {
14
+ "before": "\tasync *request(options, connection, signal, activity) {\n\t\tsignal.throwIfAborted();\n",
15
+ "after": "\tasync *request(options, connection, signal, activity) {\n\t\tsignal.throwIfAborted();\n\t\tconst transport = this.dependencies.createTransport === void 0 ? { send: (url, init) => fetch(url, init) } : this.dependencies.createTransport(options);\n\t\tif (transport === null || typeof transport !== \"object\" || typeof transport.send !== \"function\") throw new TypeError(\"DeepSeek createTransport must return an object with send(url, init)\");\n"
16
+ },
17
+ {
18
+ "before": "const response = await fetch(`${messagesApiRoot(connection.baseURL)}/messages`, {",
19
+ "after": "const response = await transport.send(`${messagesApiRoot(connection.baseURL)}/messages`, {"
20
+ },
21
+ {
22
+ "before": "}\n//#endregion\n//#region lib/types/listing-config.js",
23
+ "after": "}\nObject.defineProperty(registerDeepSeekProvider, \"transportSeam\", { value: \"deepseek-messages-create-transport-v1\", enumerable: true });\n//#endregion\n//#region lib/types/listing-config.js"
24
+ }
25
+ ]
26
+ },
27
+ {
28
+ "path": "lib/types/types.d.ts",
29
+ "beforeSha256": "8949419d7ed87dd227132dc331909c3e234ee2aebe72ca9c57569fa426ee062d",
30
+ "afterSha256": "a3a7284f64c5467e4bc359b9e79050f190c389c6807e6f30c75f475d9ab95c7a",
31
+ "edits": [
32
+ {
33
+ "before": "import type { LlmModelInfo, ModelModality, SystemPromptUpdate, ToolUpdate, ResolvedRetryPolicy, ImageAttachmentAccess }",
34
+ "after": "import type { GenerateOptions, LlmModelInfo, ModelModality, SystemPromptUpdate, ToolUpdate, ResolvedRetryPolicy, ImageAttachmentAccess }"
35
+ },
36
+ {
37
+ "before": "export interface DeepSeekAdapterOptions<Connection extends DeepSeekConnectionOptions = DeepSeekConnectionOptions> {\n",
38
+ "after": "export interface DeepSeekAdapterOptions<Connection extends DeepSeekConnectionOptions = DeepSeekConnectionOptions> {\n /** Create one stream-local Messages sender before image preparation or authentication. A supplied callback must return a valid sender; errors never fall back to fetch. */\n createTransport?: (options: GenerateOptions<string>) => {\n send(url: string, init: RequestInit): Promise<Response>;\n };\n"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "path": "lib/types/host.d.ts",
44
+ "beforeSha256": "c80712e47c5909c85d1e1736c84fa5da698f3493201b7870b4a02dc1e801a4ef",
45
+ "afterSha256": "7b8cf687eacc9045b1ac840c08f6cdbc018e140725c1785cffdcb4c54632b7ea",
46
+ "edits": [
47
+ {
48
+ "before": "'options' | 'resolveAuth' | 'providerName' | 'discoverModels' | 'connect' | 'admit'",
49
+ "after": "'options' | 'resolveAuth' | 'providerName' | 'discoverModels' | 'connect' | 'admit' | 'createTransport'"
50
+ },
51
+ {
52
+ "before": "//# sourceMappingURL=host.d.ts.map",
53
+ "after": "/** Runtime capability of the loaded function, independent of the package files currently on disk. */\nexport declare namespace registerDeepSeekProvider {\n const transportSeam: 'deepseek-messages-create-transport-v1';\n}\n//# sourceMappingURL=host.d.ts.map"
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "runtimeCapability": {
59
+ "export": "registerDeepSeekProvider",
60
+ "property": "transportSeam",
61
+ "value": "deepseek-messages-create-transport-v1",
62
+ "writable": false,
63
+ "configurable": false
64
+ }
65
+ }
@@ -0,0 +1,61 @@
1
+ --- a/lib/index.js
2
+ +++ b/lib/index.js
3
+ @@ -2181,6 +2181,8 @@
4
+ }
5
+ async *request(options, connection, signal, activity) {
6
+ signal.throwIfAborted();
7
+ + const transport = this.dependencies.createTransport === void 0 ? { send: (url, init) => fetch(url, init) } : this.dependencies.createTransport(options);
8
+ + if (transport === null || typeof transport !== "object" || typeof transport.send !== "function") throw new TypeError("DeepSeek createTransport must return an object with send(url, init)");
9
+ const { messages, versions } = await prepareImages(options.messages, connection, options.model, this.dependencies.resolveAttachments?.(), this.imageAccess, signal);
10
+ const auth = await this.dependencies.resolveAuth(connection);
11
+ try {
12
+ @@ -2228,7 +2230,7 @@
13
+ });
14
+ signal.throwIfAborted();
15
+ const betas = [...fileIds !== void 0 && fileIds.size > 0 ? [MESSAGES_FILES_BETA] : [], ...body.messages.some((message) => message.content.some((block) => block.type === "tool_addition" || block.type === "tool_removal")) ? [MESSAGES_TOOL_CHANGES_BETA] : []];
16
+ - const response = await fetch(`${messagesApiRoot(connection.baseURL)}/messages`, {
17
+ + const response = await transport.send(`${messagesApiRoot(connection.baseURL)}/messages`, {
18
+ method: "POST",
19
+ signal,
20
+ body: extensions.payload,
21
+ @@ -2747,6 +2749,7 @@
22
+ registeredPolicy = policy;
23
+ });
24
+ }
25
+ +Object.defineProperty(registerDeepSeekProvider, "transportSeam", { value: "deepseek-messages-create-transport-v1", enumerable: true });
26
+ //#endregion
27
+ //#region lib/types/listing-config.js
28
+ /** Default deadline of one model-listing request and of a first-use wait. */
29
+ --- a/lib/types/types.d.ts
30
+ +++ b/lib/types/types.d.ts
31
+ @@ -1,5 +1,5 @@
32
+ /** Model catalog and request-local dependencies for DeepSeek Messages. */
33
+ -import type { LlmModelInfo, ModelModality, SystemPromptUpdate, ToolUpdate, ResolvedRetryPolicy, ImageAttachmentAccess } from '@deepseek-ai/dsh-llm';
34
+ +import type { GenerateOptions, LlmModelInfo, ModelModality, SystemPromptUpdate, ToolUpdate, ResolvedRetryPolicy, ImageAttachmentAccess } from '@deepseek-ai/dsh-llm';
35
+ import type { AttachmentStore, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
36
+ import type { AnonymousUserId } from '@deepseek-ai/dsh-anonymous-user-id';
37
+ import type { DeepSeekLlmApiExtensionRequest, PreparedDeepSeekLlmApiExtensions } from '@deepseek-ai/dsh-deepseek-llm-api-extensions';
38
+ @@ -87,6 +87,10 @@
39
+ }
40
+ /** Constructor options for {@link DeepSeekAdapter}: the operation-local resolution hooks the plugin owns. */
41
+ export interface DeepSeekAdapterOptions<Connection extends DeepSeekConnectionOptions = DeepSeekConnectionOptions> {
42
+ + /** Create one stream-local Messages sender before image preparation or authentication. A supplied callback must return a valid sender; errors never fall back to fetch. */
43
+ + createTransport?: (options: GenerateOptions<string>) => {
44
+ + send(url: string, init: RequestInit): Promise<Response>;
45
+ + };
46
+ /** Report unusable native Messages replay metadata without exposing content or signatures. */
47
+ onReplayDegrade?: (detail: {
48
+ provider: string;
49
+ --- a/lib/types/host.d.ts
50
+ +++ b/lib/types/host.d.ts
51
+ @@ -17,5 +17,9 @@
52
+ * @param provider - exact route owned by this plugin.
53
+ * @param dependencies - provider-owned discovery, credential, and configuration callbacks.
54
+ */
55
+ -export declare function registerDeepSeekProvider<C extends DeepSeekConnectionOptions>(ctx: Context, provider: string, dependencies: Pick<DeepSeekAdapterOptions<C>, 'options' | 'resolveAuth' | 'providerName' | 'discoverModels' | 'connect' | 'admit'>): void;
56
+ +export declare function registerDeepSeekProvider<C extends DeepSeekConnectionOptions>(ctx: Context, provider: string, dependencies: Pick<DeepSeekAdapterOptions<C>, 'options' | 'resolveAuth' | 'providerName' | 'discoverModels' | 'connect' | 'admit' | 'createTransport'>): void;
57
+ +/** Runtime capability of the loaded function, independent of the package files currently on disk. */
58
+ +export declare namespace registerDeepSeekProvider {
59
+ + const transportSeam: 'deepseek-messages-create-transport-v1';
60
+ +}
61
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1,110 @@
1
+ # Native per-session composition. Only this main preset owns the Arcfold
2
+ # preparation/tool hooks; Learn mounts an empty preset plus its existing setup.
3
+ # This file does not change the host's approval or permission configuration.
4
+ - insert:
5
+ - id: preset-arcfold-tree-reader
6
+ name: '@deepseek-ai/dsh-agent-preset'
7
+ config:
8
+ id: arcfold-tree-reader
9
+ name: Arcfold tree reader
10
+ description: 新版内部只读角色;输入、提示词和结果由持久任务拥有。
11
+ order: 110
12
+ plugins: []
13
+ - id: preset-arcfold-tree-writer
14
+ name: '@deepseek-ai/dsh-agent-preset'
15
+ config:
16
+ id: arcfold-tree-writer
17
+ name: Arcfold script writer
18
+ description: 专用脚本作者;六个受限工具由当前任务绑定,不取得普通文件或命令权限。
19
+ order: 111
20
+ plugins: []
21
+ - id: preset-arcfold-main
22
+ name: '@deepseek-ai/dsh-agent-preset'
23
+ config:
24
+ id: arcfold-main
25
+ name: Arcfold
26
+ description: 当前委托、原生工具、已完成学习与长期目标;工具仍受宿主审批约束。
27
+ order: 1
28
+ plugins:
29
+ - id: persona
30
+ name: '@deepseek-ai/dsh-persona'
31
+ config:
32
+ prefix: You are a coding agent powered by the {{model}} model.
33
+ - id: agent-instructions
34
+ name: '@deepseek-ai/dsh-agent-instructions'
35
+ config:
36
+ maxBytes: 65536
37
+ - id: time-context
38
+ name: '@deepseek-ai/dsh-time-context'
39
+ - id: arcfold-agent
40
+ name: '@arcfold/dsh/agent'
41
+ - id: tool-bash
42
+ name: '@deepseek-ai/dsh-tool-bash'
43
+ disabled: !!js process.platform === 'win32'
44
+ - id: tool-pwsh
45
+ name: '@deepseek-ai/dsh-tool-pwsh'
46
+ disabled: !!js process.platform !== 'win32'
47
+ - id: tool-fs
48
+ name: '@deepseek-ai/dsh-tool-fs'
49
+ config:
50
+ read: true
51
+ readImage: false
52
+ write: true
53
+ edit: true
54
+ applyPatch: false
55
+ - id: tool-fs-search
56
+ name: '@deepseek-ai/dsh-tool-fs-search'
57
+ config:
58
+ sampleOverCapGlobResults: false
59
+ - id: tool-jobs
60
+ name: '@deepseek-ai/dsh-tool-jobs'
61
+ config:
62
+ completionDelivery: quiet
63
+ - id: skill-filesystem
64
+ name: '@deepseek-ai/dsh-skill-filesystem'
65
+ - id: tool-skill
66
+ name: '@deepseek-ai/dsh-tool-skill'
67
+ - id: tool-ask-user
68
+ name: '@deepseek-ai/dsh-tool-ask-user'
69
+ - id: tool-todo
70
+ name: '@deepseek-ai/dsh-tool-todo'
71
+ config:
72
+ allowParallelInProgress: true
73
+ - id: tool-web
74
+ name: '@deepseek-ai/dsh-tool-web'
75
+ config:
76
+ fetch: true
77
+ search: false
78
+ - id: present
79
+ name: '@deepseek-ai/dsh-tool-present'
80
+
81
+ - id: preset-arcfold-learning
82
+ name: '@deepseek-ai/dsh-agent-preset'
83
+ config:
84
+ id: arcfold-learning
85
+ name: Arcfold learning
86
+ description: 内部冻结材料学习;不用于普通对话、不取得工具或用户控制权限。
87
+ order: 100
88
+ plugins: []
89
+
90
+ - id: preset-arcfold-preparation
91
+ name: '@deepseek-ai/dsh-agent-preset'
92
+ config:
93
+ id: arcfold-preparation
94
+ name: Arcfold preparation
95
+ description: 已授权范围内的一次机会准备,只写新稿并全文回读。
96
+ order: 101
97
+ plugins:
98
+ - id: tool-executor-native
99
+ name: '@deepseek-ai/dsh-tool-executor-native'
100
+ - id: tool-fs
101
+ name: '@deepseek-ai/dsh-tool-fs'
102
+ config:
103
+ read: true
104
+ readImage: false
105
+ write: true
106
+ edit: false
107
+ applyPatch: false
108
+ readLimit: 262144
109
+ readMaxLineLength: 262144
110
+ readMaxBytes: 262144
@@ -0,0 +1,19 @@
1
+ # Runtime supply preparation
2
+
3
+ These are installer inputs, not a completed host lock. `host/package.json` names only the official complete DSH CLI and the fixed shared Cordis version. The maintenance command must create a **real** host lock by installing these public dependencies, then initialize a new official Web profile and add the already-built core/UI archives to obtain its real profile lock.
4
+
5
+ Run only through the coordinated engineering task:
6
+
7
+ ```
8
+ node scripts/prepare-runtime-locks.mjs --release-dir <accepted-release> --output <new-output>
9
+ ```
10
+
11
+ The output keeps the actual installation, commands, failures and generated `runtime/supply.json` companion. It is outside the core archive: the profile lock includes the core archive integrity, so embedding that lock back into the same archive would be circular. No development lock or cache seed is copied as a host/profile lock.
12
+
13
+ The optional `--offline-store <json>` describes `{storeDir,pnpmArchive,cacheDir?}`. Supply preparation needs the registry metadata cache as well as package contents for a new offline resolution. The installer copies these inputs before use and forbids links back into the immutable resources. Without them, the pinned pnpm archive and public registry packages are obtained from their declared public locations. A private research installation is never an installation source.
14
+
15
+ The generated `packages.json` records every concrete host/profile package consumer and each declared dependency, optional dependency and peer resolved by the official DSH resolver. Comparison preserves package contents, scope, duplicate consumers and shared-target groups; it permits only a change in physical hoist location. All declared Cordis consumers must use the one host instance. The UI React peer uses the fixed official browser shell/loader supply instead of pretending it is a server dependency. Its actual frontend assets and UI factory are bound. No host or browser is started by supply preparation.
16
+
17
+ The new profile's workspace policy is copied from `runtime/profile/pnpm-workspace.yaml`: official hoisted layout, peer auto-install disabled, lifecycle scripts disabled. The fresh default profile is also checked for those official layout/peer settings before applying the explicit release policy. A real `pnpm add` produces the profile lock; no cache lock is read as an installation lock.
18
+
19
+ Supported preparation target is currently macOS arm64 with Node 24.15.0 and pnpm 11.28.5. Other targets require their own verified supply, not a platform flag override. No lifecycle scripts, app boot, model calls, credentials or ledgers are involved. Generated version-profile assets and bootstrap home are separate from the durable native home supplied at runtime.
@@ -0,0 +1,15 @@
1
+ {
2
+ "schema": "arcfold-runtime-bootstrap-v1",
3
+ "platform": "darwin",
4
+ "arch": "arm64",
5
+ "node": "24.15.0",
6
+ "dsh": "0.2.2-rc.1",
7
+ "cordis": "4.1.0",
8
+ "pnpm": {
9
+ "version": "11.28.5",
10
+ "url": "https://registry.npmjs.org/pnpm/-/pnpm-11.28.5.tgz",
11
+ "sha256": "1ef4e447a68713656064f3f174c0f44719960a043a3fe2299169d08cf1dbf8ee",
12
+ "integrity": "sha512-SEVj0wtMKtJ8tIqpT/KzAtvOvI/2vyiBbCWJiG4UbOf3bzVPO8GkOOb16XaMMCqgpvet2CMpA81M+BQmy8FNng==",
13
+ "bytes": 5736887
14
+ }
15
+ }
Binary file
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "arcfold-official-host",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "packageManager": "pnpm@11.28.5",
7
+ "dependencies": {
8
+ "@deepseek-ai/dsh": "0.2.2-rc.1",
9
+ "@deepseek-ai/cordis": "4.1.0"
10
+ }
11
+ }
@@ -0,0 +1,9 @@
1
+ packages:
2
+ - .
3
+ nodeLinker: hoisted
4
+ autoInstallPeers: true
5
+ ignoreScripts: true
6
+ ignorePnpmfile: true
7
+ packageImportMethod: copy
8
+ overrides:
9
+ '@deepseek-ai/cordis': 4.1.0
@@ -0,0 +1,94 @@
1
+ {
2
+ "schema": "arcfold-initial-policy-v1",
3
+ "version": "2026-11-08-current-model-options",
4
+ "reviewedAt": "2026-11-08",
5
+ "initialMain": {
6
+ "provider": "deepseek-official",
7
+ "model": "deepseek-v4-pro",
8
+ "reasoningEffort": "high"
9
+ },
10
+ "requestMaxTokens": 128000,
11
+ "sources": [
12
+ "https://api-docs.deepseek.com/zh-cn/quick_start/pricing/",
13
+ "https://api-docs.deepseek.com/api/list-models/",
14
+ "https://developers.openai.com/api/docs/models/gpt-6-astra",
15
+ "https://developers.openai.com/api/docs/models/gpt-6.1-sol"
16
+ ],
17
+ "boundaries": {
18
+ "deepseekPrices": "Peak prices are a conservative local CNY estimate, not exact off-peak billing.",
19
+ "openai": "Token accounting only; context bound preserves pinned pi-ai 1.5.0 catalog 272000, not official advertised 1050000.",
20
+ "learning": "Initial copy only. Future main choices do not change independent learning defaults."
21
+ },
22
+ "routes": {
23
+ "deepseek-official": {
24
+ "kind": "deepseek",
25
+ "endpoint": "https://api.deepseek.com/anthropic/v1/messages",
26
+ "modelPolicies": {
27
+ "deepseek-v4-pro": {
28
+ "contextWindow": 1048576,
29
+ "maxOutputTokens": 393216,
30
+ "requestMaxTokens": 128000,
31
+ "reasoningEfforts": [
32
+ "off",
33
+ "low",
34
+ "high",
35
+ "max"
36
+ ],
37
+ "prices": {
38
+ "input": 9,
39
+ "output": 27,
40
+ "cachedInput": 0.3
41
+ },
42
+ "priceVersion": "DeepSeek-V4-Pro-0813/2026-08-17-Asia-Shanghai-peak-conservative-estimate"
43
+ },
44
+ "deepseek-flash": {
45
+ "contextWindow": 1048576,
46
+ "maxOutputTokens": 393216,
47
+ "requestMaxTokens": 128000,
48
+ "reasoningEfforts": [
49
+ "off",
50
+ "low",
51
+ "high",
52
+ "max"
53
+ ],
54
+ "prices": {
55
+ "input": 2,
56
+ "output": 8,
57
+ "cachedInput": 0.04
58
+ },
59
+ "priceVersion": "DeepSeek-V4.1-Flash-1017/2026-11-08-verified/peak-conservative-estimate"
60
+ }
61
+ }
62
+ },
63
+ "openai": {
64
+ "kind": "openai",
65
+ "endpoint": "https://api.openai.com/v1/responses",
66
+ "modelPolicies": {
67
+ "gpt-6-astra": {
68
+ "contextWindow": 272000,
69
+ "maxOutputTokens": 128000,
70
+ "requestMaxTokens": 128000,
71
+ "reasoningEfforts": [
72
+ "low",
73
+ "medium",
74
+ "high",
75
+ "xhigh",
76
+ "max"
77
+ ]
78
+ },
79
+ "gpt-6.1-sol": {
80
+ "contextWindow": 272000,
81
+ "maxOutputTokens": 128000,
82
+ "requestMaxTokens": 128000,
83
+ "reasoningEfforts": [
84
+ "low",
85
+ "medium",
86
+ "high",
87
+ "xhigh",
88
+ "max"
89
+ ]
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }