@chatcode/chatcode-cli 3.0.2 → 3.0.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +10 -10
- package/README.md +26 -1
- package/README.zh.md +26 -1
- package/lib/bin.js +70 -75
- package/lib/{command-errors-CIYn1nnW.js → command-errors-BkCHTQHj.js} +12 -12
- package/lib/{command-trees-8o99Bws7.js → command-trees-5HFyC5sI.js} +2 -2
- package/lib/{component-identity-CnmIKHEF.js → component-identity-De91VHwW.js} +3 -3
- package/lib/{dist-DxjlHHph.js → dist-CsDWUvQ4.js} +238 -232
- package/lib/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
- package/lib/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
- package/lib/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
- package/lib/dsh-ecosystem-spec/registry/README.md +14 -0
- package/lib/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
- package/lib/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
- package/lib/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
- package/lib/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
- package/lib/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
- package/lib/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
- package/lib/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
- package/lib/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
- package/lib/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
- package/lib/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
- package/lib/dsh-ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
- package/lib/{dump-config-BSTrhTT_.js → dump-config-BcH-VYuv.js} +5 -5
- package/lib/dump-config-CyopmD85.js +2 -0
- package/lib/{dump-config-schema-Cz4A13GB.js → dump-config-schema-DM0fb6Ns.js} +2 -2
- package/lib/{extension-events-DciGPKJa.js → extension-events-CdYCRP0o.js} +26 -26
- package/lib/{frames-7PAg0Q9b.js → frames-DOX-Jgk8.js} +4 -4
- package/lib/headless-compat.js +2 -2
- package/lib/{home-migration-DLaSvmfn.js → home-migration-BjDmRwBB.js} +23 -4
- package/lib/{host-access-CmD27uhQ.js → host-access-Bk4xps5E.js} +1 -1
- package/lib/{keymap-CFChEJ2W.js → keymap-CJ1kvLR2.js} +17 -16
- package/lib/{plugin-jvd9PCVt.js → plugin-XR7ncbnW.js} +3767 -2331
- package/lib/{plugin-DYHtreEd.js → plugin-eJjD6r12.js} +1 -1
- package/lib/{profile-boot-Blq7uqhx.js → profile-boot-BNQry1NM.js} +109 -14
- package/lib/profile-boot.js +2 -2
- package/lib/{scenes-ai_8sHDs.js → scenes-CAmWncZD.js} +3 -3
- package/lib/{settings-sections-QQ1-2lhL.js → settings-sections-CakcvBv9.js} +7 -3
- package/lib/startup-diagnostics-C_hRCp-q.js +91 -0
- package/lib/statusBarSettings-BPPS_Usm.js +382 -0
- package/lib/{supports-color-CcW-FGjr.js → supports-color-DyChQwlI.js} +2 -2
- package/lib/{themes-DTzG_9I_.js → themes-OjcUpZzw.js} +13 -13
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +4 -4
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +4 -4
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +44 -29
- package/lib/types/args.d.ts +2 -0
- package/lib/types/home-migration.d.ts +8 -0
- package/lib/types/permission-bypass.d.ts +16 -0
- package/lib/types/profile-boot.d.ts +12 -0
- package/lib/types/startup-diagnostics.d.ts +13 -0
- package/lib/types/tui-compat.d.ts +6 -0
- package/lib/types/web-browser.d.ts +6 -0
- package/lib/types/web-instance.d.ts +42 -0
- package/lib/web-browser-Vcgfdsv_.js +46 -0
- package/lib/web-instance-B0jec7cq.js +2 -0
- package/lib/web-instance-DbP7IHPv.js +280 -0
- package/lib/{workspaces-CznCgVHv.js → workspaces-XY7UdfXp.js} +2 -2
- package/package.json +40 -32
- package/runtime/manifest.json +4 -6
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +34 -4
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.js +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-stream.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +39 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +10 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +8 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/index.js +28 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.host.js +39 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/typert.remote-client.js +32 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-settings-controller/lib/types/index.js +19 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/feed.js +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +67 -19
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/index.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/types/profile-context.d.ts +11 -1
- package/runtime/node_modules/@deepseek-ai/dsh-app-boot/lib/worker/profile-resolution-bootstrap.js +22 -3
- package/runtime/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +9 -3
- package/runtime/node_modules/@deepseek-ai/dsh-base/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +3 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +60 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/directory.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/types/client/locales.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/CodeBlock.module.css +3 -5
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/markdown/MarkdownText.module.css +23 -27
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/types/client/contract/slots.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +8 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/types/client/settings-document-store.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +33 -12
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +8 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +84 -8
- package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/types/region.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/types/summarizer.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +35 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.d.ts +28 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +36 -0
- package/runtime/node_modules/@deepseek-ai/dsh-computer-use/package.json +42 -0
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/index.js +102 -14
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/lib/types/index.d.ts +34 -4
- package/runtime/node_modules/@deepseek-ai/dsh-config-editor/package.json +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/index.js +21 -8
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.d.ts +4 -6
- package/runtime/node_modules/@deepseek-ai/dsh-native-command/lib/types/path-opener.js +18 -7
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/client.js +3 -8
- package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/types/client/HeaderAction.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/index.js +5 -4
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.d.ts +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-skill/lib/types/index.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-skill-filesystem/lib/index.js +7 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage/lib/types/backend.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +60 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-json/lib/index.js +25 -0
- package/runtime/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +5472 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/command-args.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/cicd.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti/tianti.d.ts +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/commands/tianti-deliver/tianti-deliver.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +27 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/memory-config.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/runtime.d.ts +105 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/aliases.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/auth.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/client.d.ts +206 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/index.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/log.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/types.d.ts +136 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/codebase.d.ts +19 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/dynamicWorkflow.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/engine.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executor.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/executors.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/index.d.ts +23 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/memorySuggestions.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/openspec.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/recommend.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/render.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/requirementContext.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/scenarioUpgrade.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/state.d.ts +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/store.d.ts +33 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/templates.d.ts +8 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/types.d.ts +385 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/wanmaDevelopmentWorkflow/writeReviewSync.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/index.d.ts +29 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/store.d.ts +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/writeReview/types.d.ts +49 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +55 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +57 -13
- package/runtime/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-D5kpKf--.css +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js +133 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dz_cDcce.js.map +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-apple-touch-icon.png +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-icon-32.png +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/chatcode-mask-icon.svg +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon-dark.svg +1 -3
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.ico +0 -0
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/favicon.svg +1 -3
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +8 -4
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/preview.html +8 -4
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +110 -33
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/entity.js +23 -17
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +95 -21
- package/lib/dump-config-DBW7YLx-.js +0 -2
- package/lib/tuiDisplayPrefs-BCHRRcfe.js +0 -162
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-DUvMhLle.css +0 -1
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js +0 -127
- package/runtime/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Q6zc2uHV.js.map +0 -1
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/README.md +0 -9
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/bin/system.node +0 -0
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/package.json +0 -31
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-arm64/prebuilds.json +0 -6
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-x64/README.md +0 -9
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-x64/package.json +0 -31
- package/runtime/node_modules/@deepseek-ai/node-addon-system-darwin-x64/prebuilds.json +0 -6
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-arm64/README.md +0 -11
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-arm64/package.json +0 -31
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-arm64/prebuilds.json +0 -24
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-x64/README.md +0 -11
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-x64/package.json +0 -31
- package/runtime/node_modules/@deepseek-ai/node-addon-system-linux-x64/prebuilds.json +0 -24
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exclusive named registration for the computer-use capability.
|
|
3
|
+
* @module @deepseek-ai/dsh-computer-use
|
|
4
|
+
*/
|
|
5
|
+
import { Context, Service } from '@deepseek-ai/cordis';
|
|
6
|
+
import type { ComputerUseProviderName } from './brand.ts';
|
|
7
|
+
declare module '@deepseek-ai/cordis' {
|
|
8
|
+
interface Context {
|
|
9
|
+
computerUse: ComputerUseRegistry;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Owns one optional provider registration in the shared computer-use service. */
|
|
13
|
+
export declare class ComputerUseRegistry extends Service {
|
|
14
|
+
private registration;
|
|
15
|
+
constructor(ctx: Context);
|
|
16
|
+
/** Name of the registered provider, including while its resources are closing. */
|
|
17
|
+
get providerName(): ComputerUseProviderName | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Reserve the sole provider slot until the contribution is disposed.
|
|
20
|
+
* A second registration fails even when it repeats the current name. Providers
|
|
21
|
+
* must stop their tools and await owned work before releasing this registration.
|
|
22
|
+
* @param name - provider-owned name used in registration diagnostics.
|
|
23
|
+
* @returns the effect disposer for this exact registration.
|
|
24
|
+
*/
|
|
25
|
+
register(name: ComputerUseProviderName): () => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export default ComputerUseRegistry;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exclusive named registration for the computer-use capability.
|
|
3
|
+
* @module @deepseek-ai/dsh-computer-use
|
|
4
|
+
*/
|
|
5
|
+
import { Service } from '@deepseek-ai/cordis';
|
|
6
|
+
/** Owns one optional provider registration in the shared computer-use service. */
|
|
7
|
+
export class ComputerUseRegistry extends Service {
|
|
8
|
+
registration;
|
|
9
|
+
constructor(ctx) {
|
|
10
|
+
super(ctx, 'computerUse');
|
|
11
|
+
}
|
|
12
|
+
/** Name of the registered provider, including while its resources are closing. */
|
|
13
|
+
get providerName() {
|
|
14
|
+
return this.registration;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Reserve the sole provider slot until the contribution is disposed.
|
|
18
|
+
* A second registration fails even when it repeats the current name. Providers
|
|
19
|
+
* must stop their tools and await owned work before releasing this registration.
|
|
20
|
+
* @param name - provider-owned name used in registration diagnostics.
|
|
21
|
+
* @returns the effect disposer for this exact registration.
|
|
22
|
+
*/
|
|
23
|
+
register(name) {
|
|
24
|
+
if (this.registration !== undefined) {
|
|
25
|
+
throw new Error(`computer use provider "${this.registration}" is already registered`);
|
|
26
|
+
}
|
|
27
|
+
return this.ctx.effect(() => {
|
|
28
|
+
this.registration = name;
|
|
29
|
+
return () => {
|
|
30
|
+
this.registration = undefined;
|
|
31
|
+
};
|
|
32
|
+
}, 'computerUse.register()');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export default ComputerUseRegistry;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-computer-use",
|
|
3
|
+
"description": "Exclusive named computer-use provider registration",
|
|
4
|
+
"version": "0.1.7-rc.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/computer-use/computer-use"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./src/*": "./src/*",
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./brand": {
|
|
24
|
+
"types": "./lib/types/brand.d.ts",
|
|
25
|
+
"default": "./lib/types/brand.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/index.js",
|
|
30
|
+
"lib/types/**/*.js",
|
|
31
|
+
"lib/types/**/*.d.ts"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@deepseek-ai/cordis": "workspace:~",
|
|
36
|
+
"@deepseek-ai/dsh-brand": "workspace:*"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@deepseek-ai/cordis": "workspace:~",
|
|
40
|
+
"@deepseek-ai/dsh-brand": "workspace:*"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -2,28 +2,77 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
import { Service, resolveConfig } from "@deepseek-ai/cordis";
|
|
5
|
+
import z from "@deepseek-ai/schemastery";
|
|
5
6
|
import { entryListSchema } from "@deepseek-ai/cordis-plugin-include";
|
|
6
7
|
import yaml from "js-yaml";
|
|
7
|
-
import { composeEntries, loadProfileDirectory, readProfilePatches, reconcileProfilePatches } from "@deepseek-ai/dsh-app-boot";
|
|
8
|
+
import { composeEntries, loadOptionalPatches, loadProfileDirectory, readProfilePatches, reconcileProfilePatches } from "@deepseek-ai/dsh-app-boot";
|
|
8
9
|
import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
|
|
9
10
|
import { Scalar, isMap, isSeq, parseDocument, visit } from "yaml";
|
|
10
11
|
//#region lib/types/index.js
|
|
11
|
-
/** Profile
|
|
12
|
+
/** Profile and shared home configuration edits, serialized with Loader hot reload. */
|
|
12
13
|
function flatten(rows) {
|
|
13
14
|
return rows.flatMap((row) => [row, ...row.group && Array.isArray(row.config) ? flatten(row.config) : []]);
|
|
14
15
|
}
|
|
15
16
|
/** Persist complete raw configs and apply them through the normal Loader path. */
|
|
16
17
|
var ConfigEditor = class extends Service {
|
|
17
18
|
ownerContext;
|
|
19
|
+
config;
|
|
18
20
|
static inject = ["loader", "profileContext"];
|
|
19
|
-
|
|
21
|
+
/** Entry ids whose configuration is shared by all profiles in the same home. */
|
|
22
|
+
static Config = z.object({ sharedEntries: z.array(String).default([]) });
|
|
23
|
+
homeFields = /* @__PURE__ */ new Map();
|
|
24
|
+
constructor(ownerContext, config) {
|
|
20
25
|
super(ownerContext, "configEditor");
|
|
21
26
|
this.ownerContext = ownerContext;
|
|
27
|
+
this.config = config;
|
|
22
28
|
}
|
|
23
29
|
/** The profile patch edited by this service. */
|
|
24
30
|
get documentPath() {
|
|
25
31
|
return this.ownerContext.profileContext.patchPath;
|
|
26
32
|
}
|
|
33
|
+
shared(entry) {
|
|
34
|
+
return this.config.sharedEntries.includes(entry.options.id) || entry.fiber !== void 0 && this.homeFields.has(entry.fiber);
|
|
35
|
+
}
|
|
36
|
+
pathFor(entry) {
|
|
37
|
+
return this.shared(entry) ? join(this.ownerContext.profileContext.home, "cordis.patch.yml") : this.documentPath;
|
|
38
|
+
}
|
|
39
|
+
/** Materialize the document that owns a namespace, or the profile patch when no namespace is given.
|
|
40
|
+
* @param namespace Registered entry id; omitted selects the profile patch.
|
|
41
|
+
* @returns Existing owning document path; missing documents are initialized under the writer lock.
|
|
42
|
+
* @throws Error when the namespace is unavailable or file preparation fails.
|
|
43
|
+
*/
|
|
44
|
+
async prepareDocument(namespace) {
|
|
45
|
+
const entry = namespace === void 0 ? void 0 : this.entries().find((candidate) => candidate.options.id === namespace);
|
|
46
|
+
if (namespace !== void 0 && entry === void 0) throw new Error(`Configuration namespace "${namespace}" is not available`);
|
|
47
|
+
const path = entry === void 0 ? this.documentPath : this.pathFor(entry);
|
|
48
|
+
await withFileLock(entry !== void 0 && this.shared(entry) ? path : join(this.ownerContext.profileContext.dir, "package.json"), async () => {
|
|
49
|
+
try {
|
|
50
|
+
await readFile(path, "utf8");
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (error.code !== "ENOENT") throw error;
|
|
53
|
+
await writeFileAtomic(path, "[]\n", { mode: 384 });
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return path;
|
|
57
|
+
}
|
|
58
|
+
/** Persist selected top-level fields in the home patch shared by profiles.
|
|
59
|
+
* @param fields Plugin-owned fields to save at user scope.
|
|
60
|
+
* @param owner Activation whose Loader entry owns these fields.
|
|
61
|
+
* @returns Disposer restoring profile-scoped editing for this activation.
|
|
62
|
+
*/
|
|
63
|
+
configureHome(fields, owner) {
|
|
64
|
+
if (this.homeFields.has(owner)) throw new Error("Home fields are already configured for this plugin instance");
|
|
65
|
+
this.homeFields.set(owner, [...fields]);
|
|
66
|
+
return () => {
|
|
67
|
+
this.homeFields.delete(owner);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
homePath() {
|
|
71
|
+
return join(this.ownerContext.profileContext.home, "cordis.patch.yml");
|
|
72
|
+
}
|
|
73
|
+
userPatches(entry, loaded) {
|
|
74
|
+
return this.shared(entry) ? loadOptionalPatches("dsh", this.homePath()) ?? [] : loaded.patches;
|
|
75
|
+
}
|
|
27
76
|
/** Addressable profile rows; nested Includes have independent configuration ownership.
|
|
28
77
|
* @returns Active entries with unique profile patch ids.
|
|
29
78
|
*/
|
|
@@ -33,7 +82,7 @@ var ConfigEditor = class extends Service {
|
|
|
33
82
|
for (const entry of candidates) counts.set(entry.options.id, (counts.get(entry.options.id) ?? 0) + 1);
|
|
34
83
|
return candidates.filter((entry) => counts.get(entry.options.id) === 1);
|
|
35
84
|
}
|
|
36
|
-
/** Read inherited and explicit
|
|
85
|
+
/** Read inherited and explicit values from each entry's selected write layer.
|
|
37
86
|
* @returns Detached layer values alongside their Loader entries.
|
|
38
87
|
*/
|
|
39
88
|
configuration() {
|
|
@@ -42,17 +91,26 @@ var ConfigEditor = class extends Service {
|
|
|
42
91
|
return this.entries().map((entry) => ({
|
|
43
92
|
entry,
|
|
44
93
|
inherited: this.inherited(entry, loaded),
|
|
45
|
-
override: structuredClone(loaded.
|
|
94
|
+
override: structuredClone(this.userPatches(entry, loaded).findLast((row) => row.id === entry.options.id && row.config !== void 0)?.config ?? {})
|
|
46
95
|
}));
|
|
47
96
|
}
|
|
48
97
|
inherited(entry, loaded) {
|
|
49
|
-
const
|
|
98
|
+
const fields = entry.fiber === void 0 ? void 0 : this.homeFields.get(entry.fiber);
|
|
99
|
+
const patches = this.userPatches(entry, loaded).map((patch) => {
|
|
50
100
|
if (patch.id !== entry.options.id || patch.insert !== void 0) return patch;
|
|
101
|
+
if (fields !== void 0) {
|
|
102
|
+
const config = { ...patch.config };
|
|
103
|
+
for (const field of fields) Reflect.deleteProperty(config, field);
|
|
104
|
+
return {
|
|
105
|
+
...patch,
|
|
106
|
+
config
|
|
107
|
+
};
|
|
108
|
+
}
|
|
51
109
|
const rest = { ...patch };
|
|
52
110
|
Reflect.deleteProperty(rest, "config");
|
|
53
111
|
return rest;
|
|
54
112
|
});
|
|
55
|
-
const row = flatten(composeEntries([...loaded.layers.map((layer) => layer.patches), patches])).find((row) => row.id === entry.options.id);
|
|
113
|
+
const row = flatten(composeEntries(this.shared(entry) ? [readProfilePatches("dsh", this.ownerContext.profileContext, loaded, patches)] : [...loaded.layers.map((layer) => layer.patches), patches])).find((row) => row.id === entry.options.id);
|
|
56
114
|
return structuredClone(row?.config ?? {});
|
|
57
115
|
}
|
|
58
116
|
/** Validate, persist, and reconcile a plugin's next config; ordinary fields keep normal lifecycle rules.
|
|
@@ -62,15 +120,23 @@ var ConfigEditor = class extends Service {
|
|
|
62
120
|
*/
|
|
63
121
|
async edit(entry, change) {
|
|
64
122
|
const run = async () => {
|
|
65
|
-
const
|
|
66
|
-
|
|
123
|
+
const fields = entry.fiber === void 0 ? void 0 : this.homeFields.get(entry.fiber);
|
|
124
|
+
const shared = this.shared(entry);
|
|
125
|
+
const path = this.pathFor(entry);
|
|
126
|
+
const lockPath = shared ? this.homePath() : join(this.ownerContext.profileContext.dir, "package.json");
|
|
127
|
+
const persist = () => withFileLock(lockPath, async () => {
|
|
67
128
|
if (!this.entries().includes(entry) || entry.fiber === void 0) throw new Error("Configuration entry is no longer available");
|
|
68
129
|
const beforePatches = readProfilePatches("dsh", this.ownerContext.profileContext);
|
|
69
130
|
await reconcileProfilePatches(this.ownerContext.root, beforePatches, "dsh");
|
|
70
131
|
if (!this.entries().includes(entry)) throw new Error("Configuration entry changed during reload");
|
|
71
132
|
const current = structuredClone(entry.options.config ?? {});
|
|
72
|
-
const
|
|
133
|
+
const profileContext = this.ownerContext.profileContext;
|
|
134
|
+
const inherited = this.inherited(entry, loadProfileDirectory("dsh", profileContext.dir, profileContext.installAnchor));
|
|
73
135
|
const next = change(current, inherited);
|
|
136
|
+
if (fields !== void 0 && Object.keys({
|
|
137
|
+
...current,
|
|
138
|
+
...next
|
|
139
|
+
}).some((key) => !fields.includes(key) && !isDeepStrictEqual(current[key], next[key]))) throw new Error("Home-scoped edits may only change the registered fields");
|
|
74
140
|
const fiber = entry.fiber;
|
|
75
141
|
if (fiber.state !== 2) throw new Error("Configuration plugin is no longer active");
|
|
76
142
|
const resolved = fiber.ctx.waterfall(fiber, "internal/config", next, () => next);
|
|
@@ -90,7 +156,25 @@ var ConfigEditor = class extends Service {
|
|
|
90
156
|
if (!isSeq(document.contents)) throw new Error("Profile patch must be a YAML sequence");
|
|
91
157
|
document.contents.flow = false;
|
|
92
158
|
const index = document.contents.items.findLastIndex((item, index) => isMap(item) && document.getIn([index, "id"]) === entry.options.id && !item.has("insert") && (!item.has("name") || document.getIn([index, "name"]) === entry.options.name));
|
|
93
|
-
if (
|
|
159
|
+
if (fields !== void 0) {
|
|
160
|
+
if (index < 0) document.add(document.createNode({
|
|
161
|
+
id: entry.options.id,
|
|
162
|
+
config: {}
|
|
163
|
+
}));
|
|
164
|
+
const target = index < 0 ? document.contents.items.length - 1 : index;
|
|
165
|
+
document.setIn([target, "mergeConfig"], true);
|
|
166
|
+
if (!isMap(document.getIn([target, "config"], true))) document.setIn([target, "config"], document.createNode({}));
|
|
167
|
+
for (const field of fields) if (Object.hasOwn(next, field)) document.setIn([
|
|
168
|
+
target,
|
|
169
|
+
"config",
|
|
170
|
+
field
|
|
171
|
+
], document.createNode(next[field]));
|
|
172
|
+
else document.deleteIn([
|
|
173
|
+
target,
|
|
174
|
+
"config",
|
|
175
|
+
field
|
|
176
|
+
]);
|
|
177
|
+
} else if (!shared && isDeepStrictEqual(next, inherited)) for (let index = document.contents.items.length - 1; index >= 0; index--) {
|
|
94
178
|
const row = document.contents.items[index];
|
|
95
179
|
if (!isMap(row) || document.getIn([index, "id"]) !== entry.options.id || row.has("insert")) continue;
|
|
96
180
|
row.delete("config");
|
|
@@ -109,9 +193,11 @@ var ConfigEditor = class extends Service {
|
|
|
109
193
|
return expression;
|
|
110
194
|
} });
|
|
111
195
|
const profile = this.ownerContext.profileContext;
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
196
|
+
const loaded = loadProfileDirectory("dsh", profile.dir, profile.installAnchor);
|
|
197
|
+
const candidate = yaml.load(String(document), { schema: entryListSchema });
|
|
198
|
+
const patches = shared ? readProfilePatches("dsh", profile, loaded, candidate) : readProfilePatches("dsh", profile, {
|
|
199
|
+
...loaded,
|
|
200
|
+
patches: candidate
|
|
115
201
|
});
|
|
116
202
|
if (!isDeepStrictEqual(flatten(composeEntries([patches])).find((row) => row.id === entry.options.id)?.config ?? {}, next)) throw new Error(`Configuration for "${entry.options.id}" is overridden by a home patch or command-line overlay`);
|
|
117
203
|
await writeFileAtomic(path, String(document), { mode: 384 });
|
|
@@ -123,6 +209,8 @@ var ConfigEditor = class extends Service {
|
|
|
123
209
|
throw error;
|
|
124
210
|
}
|
|
125
211
|
});
|
|
212
|
+
if (this.shared(entry)) await withFileLock(join(this.ownerContext.profileContext.dir, "package.json"), persist);
|
|
213
|
+
else await persist();
|
|
126
214
|
};
|
|
127
215
|
const hmr = this.ownerContext.get("hmr");
|
|
128
216
|
await (hmr === void 0 ? run() : hmr.runExclusive(run));
|
|
@@ -1,23 +1,53 @@
|
|
|
1
|
-
import { Context, Service } from '@deepseek-ai/cordis';
|
|
1
|
+
import { Context, Service, type Fiber } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
2
3
|
import type { Entry } from '@deepseek-ai/cordis-plugin-loader';
|
|
3
4
|
declare module '@deepseek-ai/cordis' {
|
|
4
5
|
interface Context {
|
|
5
|
-
/** Persistent edits
|
|
6
|
+
/** Persistent plugin edits in profile patches or registered shared home fields. */
|
|
6
7
|
configEditor: ConfigEditor;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
10
|
+
/** Entries whose complete configuration is persisted in the shared home patch. */
|
|
11
|
+
export interface ConfigEditorConfig {
|
|
12
|
+
/** Entry ids whose complete configuration is shared across profiles. */
|
|
13
|
+
sharedEntries: string[];
|
|
14
|
+
}
|
|
9
15
|
/** Persist complete raw configs and apply them through the normal Loader path. */
|
|
10
16
|
export declare class ConfigEditor extends Service {
|
|
11
17
|
private readonly ownerContext;
|
|
18
|
+
private readonly config;
|
|
12
19
|
static inject: string[];
|
|
13
|
-
|
|
20
|
+
/** Entry ids whose configuration is shared by all profiles in the same home. */
|
|
21
|
+
static Config: z<Schemastery.ObjectS<NoInfer<{
|
|
22
|
+
sharedEntries: z<string[], string[], "defined">;
|
|
23
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
24
|
+
sharedEntries: z<string[], string[], "defined">;
|
|
25
|
+
}>>, "plain">;
|
|
26
|
+
private readonly homeFields;
|
|
27
|
+
constructor(ownerContext: Context, config: ConfigEditorConfig);
|
|
14
28
|
/** The profile patch edited by this service. */
|
|
15
29
|
get documentPath(): string;
|
|
30
|
+
private shared;
|
|
31
|
+
private pathFor;
|
|
32
|
+
/** Materialize the document that owns a namespace, or the profile patch when no namespace is given.
|
|
33
|
+
* @param namespace Registered entry id; omitted selects the profile patch.
|
|
34
|
+
* @returns Existing owning document path; missing documents are initialized under the writer lock.
|
|
35
|
+
* @throws Error when the namespace is unavailable or file preparation fails.
|
|
36
|
+
*/
|
|
37
|
+
prepareDocument(namespace?: string): Promise<string>;
|
|
38
|
+
/** Persist selected top-level fields in the home patch shared by profiles.
|
|
39
|
+
* @param fields Plugin-owned fields to save at user scope.
|
|
40
|
+
* @param owner Activation whose Loader entry owns these fields.
|
|
41
|
+
* @returns Disposer restoring profile-scoped editing for this activation.
|
|
42
|
+
*/
|
|
43
|
+
configureHome(fields: readonly string[], owner: Fiber): () => void;
|
|
44
|
+
private homePath;
|
|
45
|
+
private userPatches;
|
|
16
46
|
/** Addressable profile rows; nested Includes have independent configuration ownership.
|
|
17
47
|
* @returns Active entries with unique profile patch ids.
|
|
18
48
|
*/
|
|
19
49
|
entries(): Entry[];
|
|
20
|
-
/** Read inherited and explicit
|
|
50
|
+
/** Read inherited and explicit values from each entry's selected write layer.
|
|
21
51
|
* @returns Detached layer values alongside their Loader entries.
|
|
22
52
|
*/
|
|
23
53
|
configuration(): Array<{
|
|
@@ -61,8 +61,9 @@ function splice(html, at, markup) {
|
|
|
61
61
|
* applies the table asynchronously installs it ahead of the entry module and
|
|
62
62
|
* settles it after the last row; the served form below creates and resolves
|
|
63
63
|
* it in one statement, because every row is already in the document text.
|
|
64
|
+
* This classic script precedes browser polyfills, so it uses the base Promise API.
|
|
64
65
|
*/
|
|
65
|
-
const READY_MARKUP = "<script>(globalThis.__DSH_BOOT_READY__ ??= Promise.
|
|
66
|
+
const READY_MARKUP = "<script>(globalThis.__DSH_BOOT_READY__ ??= { promise: Promise.resolve(), resolve() {}, reject() {} }).resolve()<\/script>";
|
|
66
67
|
/**
|
|
67
68
|
* Render rows into an index.html body: head rows immediately after the
|
|
68
69
|
* opening head tag, body rows immediately after the opening body tag, each
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
1
|
+
import { execFile, spawn } from "node:child_process";
|
|
2
2
|
import { homedir, release, tmpdir } from "node:os";
|
|
3
3
|
import { dirname, extname, isAbsolute, join, relative, sep } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
@@ -44,10 +44,8 @@ const runNativeCommand = (command, args, signal) => new Promise((resolve, reject
|
|
|
44
44
|
* The default intent prefers the default browser for documents it renders when
|
|
45
45
|
* the platform can name one, then falls back to the default application. WSL
|
|
46
46
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
47
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
48
|
-
*
|
|
49
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
50
|
-
* the association itself reads a narrower record and reports none.
|
|
47
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
48
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
51
49
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
52
50
|
*/
|
|
53
51
|
/** Documents a browser renders, as opposed to ones an editor merely edits. */
|
|
@@ -176,7 +174,22 @@ async function openNativePathWithIntent(path, signal, intent, internals = {}) {
|
|
|
176
174
|
return;
|
|
177
175
|
}
|
|
178
176
|
if (platform === "win32") {
|
|
179
|
-
|
|
177
|
+
if (intent === "text-editor" && internals.run === void 0) {
|
|
178
|
+
signal.throwIfAborted();
|
|
179
|
+
await new Promise((resolve, reject) => {
|
|
180
|
+
const editor = spawn("notepad.exe", [path], {
|
|
181
|
+
detached: true,
|
|
182
|
+
stdio: "ignore",
|
|
183
|
+
windowsHide: false
|
|
184
|
+
});
|
|
185
|
+
editor.once("error", reject);
|
|
186
|
+
editor.once("spawn", () => {
|
|
187
|
+
editor.unref();
|
|
188
|
+
resolve();
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
} else if (intent === "text-editor") await run("notepad.exe", [path], signal);
|
|
192
|
+
else await openWindowsPath(path, signal, run);
|
|
180
193
|
return;
|
|
181
194
|
}
|
|
182
195
|
if (platform === "linux") {
|
|
@@ -228,8 +241,8 @@ function openNativeAssociatedPath(path, signal, internals = {}) {
|
|
|
228
241
|
return openNativePathWithIntent(path, signal, "association", internals);
|
|
229
242
|
}
|
|
230
243
|
/**
|
|
231
|
-
* Open a text document for editing
|
|
232
|
-
*
|
|
244
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
245
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
233
246
|
* @param path - absolute or host-resolvable text-document path.
|
|
234
247
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
235
248
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
9
|
-
*
|
|
10
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
-
* the association itself reads a narrower record and reports none.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
9
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
12
10
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
13
11
|
*/
|
|
14
12
|
import { type NativeCommandRunner } from './runner.ts';
|
|
@@ -52,8 +50,8 @@ export declare function openNativePath(path: string, signal: AbortSignal, intern
|
|
|
52
50
|
*/
|
|
53
51
|
export declare function openNativeAssociatedPath(path: string, signal: AbortSignal, internals?: PathOpenerInternals): Promise<void>;
|
|
54
52
|
/**
|
|
55
|
-
* Open a text document for editing
|
|
56
|
-
*
|
|
53
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
54
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
57
55
|
* @param path - absolute or host-resolvable text-document path.
|
|
58
56
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
59
57
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
* The default intent prefers the default browser for documents it renders when
|
|
6
6
|
* the platform can name one, then falls back to the default application. WSL
|
|
7
7
|
* translates every path for the Windows desktop instead of assuming a Linux
|
|
8
|
-
* GUI. The text-editor intent never consults the browser. Windows
|
|
9
|
-
*
|
|
10
|
-
* a double-click uses, selects the application, while a process that resolves
|
|
11
|
-
* the association itself reads a narrower record and reports none.
|
|
8
|
+
* GUI. The text-editor intent never consults the browser. Windows launches
|
|
9
|
+
* Notepad for text editing and delegates other intents to Explorer.
|
|
12
10
|
* @module @deepseek-ai/dsh-native-command/path-opener
|
|
13
11
|
*/
|
|
14
12
|
import { release as osRelease } from 'node:os';
|
|
15
13
|
import { dirname, extname } from 'node:path';
|
|
16
14
|
import { pathToFileURL } from 'node:url';
|
|
15
|
+
import { spawn } from 'node:child_process';
|
|
17
16
|
import { runNativeCommand } from "./runner.js";
|
|
18
17
|
/** Documents a browser renders, as opposed to ones an editor merely edits. */
|
|
19
18
|
const BROWSER_DOCUMENTS = new Set(['.html', '.htm', '.xhtml', '.svg']);
|
|
@@ -154,7 +153,19 @@ async function openNativePathWithIntent(path, signal, intent, internals = {}) {
|
|
|
154
153
|
return;
|
|
155
154
|
}
|
|
156
155
|
if (platform === 'win32') {
|
|
157
|
-
|
|
156
|
+
if (intent === 'text-editor' && internals.run === undefined) {
|
|
157
|
+
signal.throwIfAborted();
|
|
158
|
+
await new Promise((resolve, reject) => {
|
|
159
|
+
// The editor outlives the RPC. Do not wait for exit or kill an open document on disconnect.
|
|
160
|
+
const editor = spawn('notepad.exe', [path], { detached: true, stdio: 'ignore', windowsHide: false });
|
|
161
|
+
editor.once('error', reject);
|
|
162
|
+
editor.once('spawn', () => { editor.unref(); resolve(); });
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
else if (intent === 'text-editor')
|
|
166
|
+
await run('notepad.exe', [path], signal);
|
|
167
|
+
else
|
|
168
|
+
await openWindowsPath(path, signal, run);
|
|
158
169
|
return;
|
|
159
170
|
}
|
|
160
171
|
if (platform === 'linux') {
|
|
@@ -208,8 +219,8 @@ export function openNativeAssociatedPath(path, signal, internals = {}) {
|
|
|
208
219
|
return openNativePathWithIntent(path, signal, 'association', internals);
|
|
209
220
|
}
|
|
210
221
|
/**
|
|
211
|
-
* Open a text document for editing
|
|
212
|
-
*
|
|
222
|
+
* Open a text document for editing. macOS uses the text editor; Windows launches
|
|
223
|
+
* Notepad independently of file associations and RPC lifetime.
|
|
213
224
|
* @param path - absolute or host-resolvable text-document path.
|
|
214
225
|
* @param signal - caller/connection lifetime; abort terminates the native command.
|
|
215
226
|
* @param internals - Platform and runner hooks for deterministic tests.
|
|
@@ -183,13 +183,12 @@ window.__ModuleLoader__.load({
|
|
|
183
183
|
//#endregion
|
|
184
184
|
//#region lib/types/client/HeaderAction.js
|
|
185
185
|
/**
|
|
186
|
-
* Render the Session Header
|
|
186
|
+
* Render the Session Header download menu.
|
|
187
187
|
* @param props - Session runtime, download controller, and localized copy.
|
|
188
188
|
* @returns the persistent Header action and Session-scoped dialog.
|
|
189
189
|
*/
|
|
190
190
|
function SessionLogDownloadHeaderAction(props) {
|
|
191
|
-
const { sessionId, useSessionLogDownload,
|
|
192
|
-
const feedbackAvailable = useFeedbackAvailable((value) => value);
|
|
191
|
+
const { sessionId, useSessionLogDownload, request, openFeedback, t } = props;
|
|
193
192
|
const busy = useSessionLogDownload((state) => state.bySession[String(sessionId)])?.status === "downloading";
|
|
194
193
|
const [open, setOpen] = (0, react.useState)(false);
|
|
195
194
|
return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
@@ -204,11 +203,7 @@ window.__ModuleLoader__.load({
|
|
|
204
203
|
label: t("menu.download"),
|
|
205
204
|
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDownloadOutlineRegular, {}),
|
|
206
205
|
disabled: busy
|
|
207
|
-
},
|
|
208
|
-
id: "feedback",
|
|
209
|
-
label: t("menu.feedback"),
|
|
210
|
-
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPaperPlaneOutlineRegular, {})
|
|
211
|
-
}] : []],
|
|
206
|
+
}],
|
|
212
207
|
onSelect: (id) => {
|
|
213
208
|
setOpen(false);
|
|
214
209
|
if (id === "feedback") openFeedback(sessionId);
|
package/runtime/node_modules/@deepseek-ai/dsh-session-log-export/lib/types/client/HeaderAction.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface SessionLogDownloadHeaderInjected extends SessionLogDownloadDial
|
|
|
18
18
|
/** Session download props plus the optional feedback action. */
|
|
19
19
|
export type SessionLogDownloadHeaderProps = SessionLogDownloadDialogProps & InjectFace<SessionLogDownloadHeaderInjected>;
|
|
20
20
|
/**
|
|
21
|
-
* Render the Session Header
|
|
21
|
+
* Render the Session Header download menu.
|
|
22
22
|
* @param props - Session runtime, download controller, and localized copy.
|
|
23
23
|
* @returns the persistent Header action and Session-scoped dialog.
|
|
24
24
|
*/
|
|
@@ -402,11 +402,12 @@ var SettingsForms = class extends Service {
|
|
|
402
402
|
get documentPath() {
|
|
403
403
|
return this.ownerContext.configEditor.documentPath;
|
|
404
404
|
}
|
|
405
|
-
/** Locate the
|
|
406
|
-
* @
|
|
405
|
+
/** Locate and materialize the owning patch for native editing.
|
|
406
|
+
* @param namespace Optional namespace; shared entries resolve to the home-level document.
|
|
407
|
+
* @returns The existing owning patch path.
|
|
407
408
|
*/
|
|
408
|
-
prepareDocument() {
|
|
409
|
-
return
|
|
409
|
+
prepareDocument(namespace) {
|
|
410
|
+
return this.ownerContext.configEditor.prepareDocument(namespace);
|
|
410
411
|
}
|
|
411
412
|
/** Read active plugin schemas and their live values.
|
|
412
413
|
* @param options Redaction required for remote callers.
|
|
@@ -85,10 +85,11 @@ export declare class SettingsForms extends Service {
|
|
|
85
85
|
get writable(): boolean;
|
|
86
86
|
/** Current profile patch shown by the native configuration editor. */
|
|
87
87
|
get documentPath(): string;
|
|
88
|
-
/** Locate the
|
|
89
|
-
* @
|
|
88
|
+
/** Locate and materialize the owning patch for native editing.
|
|
89
|
+
* @param namespace Optional namespace; shared entries resolve to the home-level document.
|
|
90
|
+
* @returns The existing owning patch path.
|
|
90
91
|
*/
|
|
91
|
-
prepareDocument(): Promise<string>;
|
|
92
|
+
prepareDocument(namespace?: string): Promise<string>;
|
|
92
93
|
/** Read active plugin schemas and their live values.
|
|
93
94
|
* @param options Redaction required for remote callers.
|
|
94
95
|
* @returns Forms keyed by unique profile entry ids.
|
|
@@ -261,10 +261,11 @@ export class SettingsForms extends Service {
|
|
|
261
261
|
get writable() { return true; }
|
|
262
262
|
/** Current profile patch shown by the native configuration editor. */
|
|
263
263
|
get documentPath() { return this.ownerContext.configEditor.documentPath; }
|
|
264
|
-
/** Locate the
|
|
265
|
-
* @
|
|
264
|
+
/** Locate and materialize the owning patch for native editing.
|
|
265
|
+
* @param namespace Optional namespace; shared entries resolve to the home-level document.
|
|
266
|
+
* @returns The existing owning patch path.
|
|
266
267
|
*/
|
|
267
|
-
prepareDocument() { return
|
|
268
|
+
prepareDocument(namespace) { return this.ownerContext.configEditor.prepareDocument(namespace); }
|
|
268
269
|
/** Read active plugin schemas and their live values.
|
|
269
270
|
* @param options Redaction required for remote callers.
|
|
270
271
|
* @returns Forms keyed by unique profile entry ids.
|
|
@@ -21,7 +21,7 @@ export declare const BUNDLED_SKILL_RANK = 600;
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function isSkillName(name: string): boolean;
|
|
23
23
|
/** Origin bucket for a skill contribution. The value is prompt-visible metadata, not precedence by itself. */
|
|
24
|
-
export type SkillSource = 'project-dsh' | 'project-agents' | 'runtime' | 'user-dsh' | 'user-agents' | 'custom' | 'bundled' | (string & {});
|
|
24
|
+
export type SkillSource = 'project-chatcode' | 'project-dsh' | 'project-agents' | 'runtime' | 'user-dsh' | 'user-agents' | 'custom' | 'bundled' | (string & {});
|
|
25
25
|
/** Optional provider-specific base used by loaded skill bodies to resolve relative resources. */
|
|
26
26
|
export type SkillResourceBase = {
|
|
27
27
|
readonly kind: 'directory';
|
|
@@ -18,7 +18,8 @@ import { BUNDLED_SKILL_RANK, isSkillName } from "@deepseek-ai/dsh-skill";
|
|
|
18
18
|
*
|
|
19
19
|
* @module @deepseek-ai/dsh-skill-filesystem
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const PROJECT_CHATCODE_RANK = 100;
|
|
22
|
+
const PROJECT_DSH_RANK = 150;
|
|
22
23
|
const PROJECT_AGENTS_RANK = 200;
|
|
23
24
|
const CUSTOM_RANK = 300;
|
|
24
25
|
const USER_DSH_RANK = 400;
|
|
@@ -156,6 +157,11 @@ var FileSystemSkillProvider = class {
|
|
|
156
157
|
if (this.includeDefaultRoots && cwd !== void 0) {
|
|
157
158
|
const projectRoot = await findProjectRoot(resolve(cwd), optionalFileSystem(this.ctx));
|
|
158
159
|
roots.push({
|
|
160
|
+
path: join(projectRoot, ".chatcode-cli/skills"),
|
|
161
|
+
source: "project-chatcode",
|
|
162
|
+
rank: PROJECT_CHATCODE_RANK,
|
|
163
|
+
projectRoot
|
|
164
|
+
}, {
|
|
159
165
|
path: join(projectRoot, ".dsh/skills"),
|
|
160
166
|
source: "project-dsh",
|
|
161
167
|
rank: PROJECT_DSH_RANK,
|