dsh-openwrite 0.2.11 → 0.2.14

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.
@@ -688,7 +688,7 @@ function sleep(ms) {
688
688
  /** Cordis plugin name. */
689
689
  const name = "dsh-dog";
690
690
  /** Required Harness services. */
691
- const inject = ["tools", "subagents"];
691
+ const inject = [];
692
692
  /** Loader-validated DoG deployment configuration. */
693
693
  const Config = z.object({
694
694
  storageDirectory: z.string().default("dog"),
@@ -705,35 +705,46 @@ const Config = z.object({
705
705
  subagentProvider: z.string().default("spawn"),
706
706
  subagentMaxDepth: z.natural().default(3)
707
707
  });
708
+ Object.assign(Config.dict.maxConcurrentVerifications.meta, { volatile: true });
709
+ function concurrencyValue(value) {
710
+ const reference = value;
711
+ return typeof reference?.get === "function" ? reference.get() : value;
712
+ }
708
713
  /** Register all DoG tools as Cordis-owned effects so fiber disposal removes them. */
709
714
  async function apply(ctx, config) {
710
715
  const schema = await loadSchemaSet();
711
716
  let resolved = config;
712
717
  let settingsCurrent;
713
- ctx.inject(["settings"], (settingsCtx) => settingsCtx.settings.installSection(ctx, "dog", z.object({
714
- storageDirectory: z.string().default("dog"),
715
- workspaceRoot: z.string().default("dog/workspace"),
716
- scriptsDirectory: z.string().default(fileURLToPath(new URL("../../../scripts/dog/", import.meta.url))),
717
- maxGraphNodes: z.natural().min(1).default(256),
718
- maxExpressionNodes: z.natural().min(1).default(512),
719
- maxExpressionDepth: z.natural().min(1).default(64),
720
- maxSandboxBytes: z.natural().min(1).default(67108864),
721
- allowPartialRoot: z.boolean().default(false),
722
- maxConcurrentVerifications: z.natural().min(1).default(1),
723
- revalidateThreshold: z.number().default(.3),
724
- gmDigestAlgo: z.string().default("sha256"),
725
- subagentProvider: z.string().default("spawn"),
726
- subagentMaxDepth: z.natural().default(3)
727
- }), config, {
728
- setSource: (current) => {
729
- settingsCurrent = current;
730
- resolved = {
731
- ...config,
732
- ...current()
733
- };
734
- },
735
- onChange: () => void 0
736
- }));
718
+ ctx.inject(["settings"], (settingsCtx) => {
719
+ if (typeof settingsCtx.settings.installSection !== "function") {
720
+ settingsCurrent = () => config;
721
+ return;
722
+ }
723
+ return settingsCtx.settings.installSection(ctx, "dog", z.object({
724
+ storageDirectory: z.string().default("dog"),
725
+ workspaceRoot: z.string().default("dog/workspace"),
726
+ scriptsDirectory: z.string().default(fileURLToPath(new URL("../../../scripts/dog/", import.meta.url))),
727
+ maxGraphNodes: z.natural().min(1).default(256),
728
+ maxExpressionNodes: z.natural().min(1).default(512),
729
+ maxExpressionDepth: z.natural().min(1).default(64),
730
+ maxSandboxBytes: z.natural().min(1).default(67108864),
731
+ allowPartialRoot: z.boolean().default(false),
732
+ maxConcurrentVerifications: z.natural().min(1).default(1),
733
+ revalidateThreshold: z.number().default(.3),
734
+ gmDigestAlgo: z.string().default("sha256"),
735
+ subagentProvider: z.string().default("spawn"),
736
+ subagentMaxDepth: z.natural().default(3)
737
+ }), config, {
738
+ setSource: (current) => {
739
+ settingsCurrent = current;
740
+ resolved = {
741
+ ...config,
742
+ ...current()
743
+ };
744
+ },
745
+ onChange: () => void 0
746
+ });
747
+ });
737
748
  const repository = new DogRepository(dshHomePath(config.storageDirectory), schema);
738
749
  repository.markOrphanedRunningRuns((/* @__PURE__ */ new Date()).toISOString()).catch(() => void 0);
739
750
  const scriptsDir = isAbsolute(config.scriptsDirectory) ? config.scriptsDirectory : dshHomePath(config.scriptsDirectory);
@@ -766,6 +777,7 @@ async function apply(ctx, config) {
766
777
  dogEngine = new DogEngine({
767
778
  config: {
768
779
  ...effective,
780
+ maxConcurrentVerifications: concurrencyValue(effective.maxConcurrentVerifications),
769
781
  workspaceRoot: isAbsolute(effective.workspaceRoot) ? effective.workspaceRoot : dshHomePath(effective.workspaceRoot),
770
782
  scriptsDirectory: isAbsolute(effective.scriptsDirectory) ? effective.scriptsDirectory : dshHomePath(effective.scriptsDirectory)
771
783
  },
@@ -786,7 +798,7 @@ async function apply(ctx, config) {
786
798
  },
787
799
  liveConfig: () => {
788
800
  const live = settingsCurrent?.();
789
- return live === void 0 ? {} : { maxConcurrentVerifications: live.maxConcurrentVerifications };
801
+ return live === void 0 ? {} : { maxConcurrentVerifications: concurrencyValue(live.maxConcurrentVerifications) };
790
802
  },
791
803
  resolveLivingAgent: (sessionId) => {
792
804
  return ctx.get("agents")?.get(sessionId);
@@ -884,7 +896,7 @@ async function apply(ctx, config) {
884
896
  if (event.data.reason?.kind !== "interrupted") return;
885
897
  captureInterruptedTurn(repository, session, event).catch(() => void 0);
886
898
  });
887
- ctx.inject(["connection"], (connectionCtx) => {
899
+ ctx.inject(["connection", "webServer"], (connectionCtx) => {
888
900
  connectionCtx.effect(() => connectionCtx.connection.rpc.handle(DOG_DEBUG_RPC_CHANNEL, debugHandler), "dog: trusted debugger RPC");
889
901
  });
890
902
  }
@@ -40,7 +40,8 @@
40
40
  "@deepseek-ai/dsh-client-connection",
41
41
  "@deepseek-ai/dsh-api-session-controller",
42
42
  "@deepseek-ai/dsh-client-ui-layout",
43
- "@deepseek-ai/dsh-client-ui-session"
43
+ "@deepseek-ai/dsh-client-ui-session",
44
+ "@deepseek-ai/dsh-client-ui-workspace"
44
45
  ],
45
46
  "platform": "web"
46
47
  },
@@ -62,7 +63,8 @@
62
63
  "@deepseek-ai/dsh-host-webserver": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.2.0-rc.2",
63
64
  "@deepseek-ai/dsh-tools": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.2.0-rc.2",
64
65
  "@deepseek-ai/schemastery": "3.18.2",
65
- "react": "^18.3.1"
66
+ "react": "^18.3.1",
67
+ "@deepseek-ai/dsh-client-ui-workspace": "0.1.2-rc.1 || 0.1.5-alpha.1 || 0.2.0-rc.2"
66
68
  },
67
69
  "devDependencies": {
68
70
  "@deepseek-ai/cordis": "4.0.2",
@@ -94,7 +96,8 @@
94
96
  "typescript": "^5.9.3",
95
97
  "vitest": "^4.1.1",
96
98
  "@deepseek-ai/dsh-client-ui-session": "0.1.2-rc.1",
97
- "react": "^18.3.1"
99
+ "react": "^18.3.1",
100
+ "@deepseek-ai/dsh-client-ui-workspace": "0.1.2-rc.1"
98
101
  },
99
102
  "license": "BSD-3-Clause",
100
103
  "dependencies": {