@mind-harness/mh-workspace 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @mind-harness/mh-workspace
2
2
 
3
- Lists your Memory Projects and gives each one a workspace; a Session started there begins with the Project's README and AGENTS.md.
3
+ Lists your Mind Harness Projects and gives each one a workspace; a Session started there begins with the Project's README and AGENTS.md.
4
4
 
5
5
  This plugin is part of Mind Harness for DeepSeek Harness (dsh). Install [`@mind-harness/mh-bundle`](https://www.npmjs.com/package/@mind-harness/mh-bundle) rather than this package: the bundle installs it with the other plugins and adds the rows that load it. Configuration, versions and license are described there.
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ import { defineDomain } from "@deepseek-ai/dsh-storage-domain";
9
9
  //#region lib/types/config.js
10
10
  const DEFAULT_HOME = "https://mindharness.com/";
11
11
  const workspaceConfig = z.object({
12
- memory: z.object({ home: z.string().default(DEFAULT_HOME).volatile().description("Memory home page address. A new value is read on the next request, without restarting.") }).default({ home: DEFAULT_HOME }).description("The Memory this Harness lists Projects from."),
12
+ memory: z.object({ home: z.string().default(DEFAULT_HOME).volatile().description("Mind Harness home page address. A new value is read on the next request, without restarting.") }).default({ home: DEFAULT_HOME }).description("The Mind Harness home this installation lists Projects from."),
13
13
  projectsDir: z.string().description("Where each Project gets its workspace directory. Defaults to mh/projects under the dsh home.")
14
14
  });
15
15
  function projectsDirOf(config) {
@@ -194,7 +194,7 @@ function workingCopySentence(project) {
194
194
  return `The working directory is a local working copy for the Project ${project}, not the Project itself: it starts empty and does not mirror the Project. Read the Project by opening its pages and change it through the actions they declare. Keep files on their way in or out here, such as downloads and files to upload; a file edited here is not in the Project until you upload it.`;
195
195
  }
196
196
  function signInSentence(home, gap) {
197
- return `Memory at ${home} cannot show this Project to the browser (${gap}). Its README and AGENTS.md were not opened. Tell the person to sign in to Memory in their browser, then continue; Memory pages read before that show only what is public.`;
197
+ return `Mind Harness at ${home} cannot show this Project to the browser (${gap}). Its README and AGENTS.md were not opened. Tell the person to sign in to Mind Harness in their browser, then continue; Mind Harness pages read before that show only what is public.`;
198
198
  }
199
199
  const UNREAD_SENTENCE = "The Project page could not be read, so its README and AGENTS.md were not opened; open the Project page to read them.";
200
200
  //#endregion
@@ -313,7 +313,7 @@ let MhWorkspaceService = (() => {
313
313
  "mhBrowser",
314
314
  "workspaceRegistry",
315
315
  "storageDomain",
316
- "sessionProjections",
316
+ "agents",
317
317
  "systemPrompt"
318
318
  ];
319
319
  home = __runInitializers(this, _instanceExtraInitializers);
@@ -443,12 +443,7 @@ let MhWorkspaceService = (() => {
443
443
  /** The first step of the Session's first turn. Later turns do not place pages. */
444
444
  isFirstStep(payload) {
445
445
  if (payload.step !== 1 || payload.messages.length === 0) return false;
446
- const boundary = this.turns().stateOf(payload.agent.session, "turnBoundary");
447
- if (boundary === void 0) {
448
- this.ctx.logger.warn("mh-workspace: turnBoundary projection is not registered; cwd pages not placed");
449
- return false;
450
- }
451
- return boundary.lastTurn === 1;
446
+ return this.agents().turnBoundaryOf(payload.agent.session).lastTurn === 1;
452
447
  }
453
448
  /**
454
449
  * The Project this Session's cwd is a working copy of. Only the first step
@@ -538,8 +533,8 @@ let MhWorkspaceService = (() => {
538
533
  return [];
539
534
  }
540
535
  }
541
- turns() {
542
- return this.ctx.sessionProjections;
536
+ agents() {
537
+ return this.ctx.agents;
543
538
  }
544
539
  browser() {
545
540
  return this.ctx.mhBrowser;
@@ -817,7 +812,7 @@ const inject = [
817
812
  "mhBrowser",
818
813
  "workspaceRegistry",
819
814
  "storageDomain",
820
- "sessionProjections",
815
+ "agents",
821
816
  "systemPrompt"
822
817
  ];
823
818
  const Config = workspaceConfig;
@@ -64,7 +64,7 @@ const $remote = createTypertRemoteInfo({
64
64
  create: _mind_harness_mh_workspace_mhWorkspace_ensureWorkspace_result$schema,
65
65
  jsonSchema: {"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":true},
66
66
  },
67
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":178,"column":9},
67
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":168,"column":9},
68
68
  },
69
69
  'mhWorkspace/openPersonWindow': {
70
70
  service: 'mhWorkspace',
@@ -95,7 +95,7 @@ const $remote = createTypertRemoteInfo({
95
95
  create: _mind_harness_mh_workspace_mhWorkspace_openPersonWindow_result$schema,
96
96
  jsonSchemaError: 'typert tool schema: unsupported void value',
97
97
  },
98
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":187,"column":9},
98
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":177,"column":9},
99
99
  },
100
100
  'mhWorkspace/startBrowser': {
101
101
  service: 'mhWorkspace',
@@ -110,7 +110,7 @@ const $remote = createTypertRemoteInfo({
110
110
  create: _mind_harness_mh_workspace_mhWorkspace_startBrowser_result$schema,
111
111
  jsonSchemaError: 'typert tool schema: unsupported void value',
112
112
  },
113
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":211,"column":9},
113
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":201,"column":9},
114
114
  },
115
115
  'mhWorkspace/syncProjects': {
116
116
  service: 'mhWorkspace',
@@ -125,7 +125,7 @@ const $remote = createTypertRemoteInfo({
125
125
  create: _mind_harness_mh_workspace_mhWorkspace_syncProjects_result$schema,
126
126
  jsonSchema: {"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"removed":{"type":"boolean","const":true,"description":"The person removed this Project's Workspace. It is not in the sidebar."}},"required":["url","name","projectId"],"additionalProperties":true}},"signedIn":{"type":"boolean","description":"The Memory home names a viewer. Signed out, the list holds only what is public."},"selfLogin":{"type":"boolean"}},"required":["projects","signedIn","selfLogin"],"additionalProperties":true},
127
127
  },
128
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":164,"column":9},
128
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":154,"column":9},
129
129
  },
130
130
  },
131
131
  }, z)
@@ -64,7 +64,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
64
64
  create: _mind_harness_mh_workspace_mhWorkspace_ensureWorkspace_result$schema,
65
65
  jsonSchema: {"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":true},
66
66
  },
67
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":178,"column":9},
67
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":168,"column":9},
68
68
  },
69
69
  'mhWorkspace/openPersonWindow': {
70
70
  service: 'mhWorkspace',
@@ -95,7 +95,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
95
95
  create: _mind_harness_mh_workspace_mhWorkspace_openPersonWindow_result$schema,
96
96
  jsonSchemaError: 'typert tool schema: unsupported void value',
97
97
  },
98
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":187,"column":9},
98
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":177,"column":9},
99
99
  },
100
100
  'mhWorkspace/startBrowser': {
101
101
  service: 'mhWorkspace',
@@ -110,7 +110,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
110
110
  create: _mind_harness_mh_workspace_mhWorkspace_startBrowser_result$schema,
111
111
  jsonSchemaError: 'typert tool schema: unsupported void value',
112
112
  },
113
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":211,"column":9},
113
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":201,"column":9},
114
114
  },
115
115
  'mhWorkspace/syncProjects': {
116
116
  service: 'mhWorkspace',
@@ -125,7 +125,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
125
125
  create: _mind_harness_mh_workspace_mhWorkspace_syncProjects_result$schema,
126
126
  jsonSchema: {"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"workspaceId":{"type":"string"},"removed":{"type":"boolean","const":true,"description":"The person removed this Project's Workspace. It is not in the sidebar."}},"required":["url","name","projectId"],"additionalProperties":true}},"signedIn":{"type":"boolean","description":"The Memory home names a viewer. Signed out, the list holds only what is public."},"selfLogin":{"type":"boolean"}},"required":["projects","signedIn","selfLogin"],"additionalProperties":true},
127
127
  },
128
- sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":164,"column":9},
128
+ sourceLocation: {"file":"packages/mh-workspace/src/service.ts","line":154,"column":9},
129
129
  },
130
130
  },
131
131
  }, z)
@@ -83,7 +83,7 @@ export declare class MhWorkspaceService extends TypertRemoteService {
83
83
  /** Why the browser cannot read the person's Projects now; undefined when it can. */
84
84
  private signInGap;
85
85
  private openQuietly;
86
- private turns;
86
+ private agents;
87
87
  private browser;
88
88
  private mount;
89
89
  private projects;
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Mind Harness projects",
4
- "description": "Lists your Memory Projects and gives each one a workspace; a Session started there begins with the Project page and what its README cites."
4
+ "description": "Lists your Mind Harness Projects and gives each one a workspace; a Session started there begins with the Project page and what its README cites."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Mind Harness Project",
4
- "description": "列出你的 Memory Project 并为每个 Project 建工作区;在这里新建的 Session 先带上 Project 页及其 README 引用的页面。"
4
+ "description": "列出你的 Mind Harness Project 并为每个 Project 建工作区;在这里新建的 Session 先带上 Project 页及其 README 引用的页面。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mind-harness/mh-workspace",
3
- "version": "0.1.5",
4
- "description": "Lists your Memory Projects and gives each one a workspace; a Session started there begins with the Project's README and AGENTS.md.",
3
+ "version": "0.2.0",
4
+ "description": "Lists your Mind Harness Projects and gives each one a workspace; a Session started there begins with the Project's README and AGENTS.md.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "files": [
7
7
  "lib/index.js",
@@ -42,28 +42,31 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@mind-harness/mh-browser": "0.1.5",
45
+ "@mind-harness/mh-browser": "0.2.0",
46
46
  "zod": "^4.6.6"
47
47
  },
48
48
  "devDependencies": {
49
- "@deepseek-ai/cordis": "~4.0.5",
50
- "@deepseek-ai/dsh-agent": "^0.2.1-rc.3",
51
- "@deepseek-ai/dsh-home-paths": "^0.2.1-rc.3",
52
- "@deepseek-ai/dsh-llm": "^0.2.1-rc.3",
53
- "@deepseek-ai/dsh-storage-domain": "^0.2.1-rc.3",
54
- "@deepseek-ai/dsh-typert-generator": "^0.2.1-rc.3",
55
- "@deepseek-ai/dsh-typert-protocol": "^0.2.1-rc.3",
56
- "@deepseek-ai/schemastery": "~3.18.5"
49
+ "@deepseek-ai/cordis": "~4.1.0",
50
+ "@deepseek-ai/dsh-agent": "^0.2.2-rc.1",
51
+ "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
52
+ "@deepseek-ai/dsh-llm": "^0.2.2-rc.1",
53
+ "@deepseek-ai/dsh-storage-domain": "^0.2.2-rc.1",
54
+ "@deepseek-ai/dsh-typert-generator": "^0.2.2-rc.1",
55
+ "@deepseek-ai/dsh-typert-protocol": "^0.2.2-rc.1",
56
+ "@deepseek-ai/schemastery": "~3.19.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@deepseek-ai/cordis": "~4.0.5",
60
- "@deepseek-ai/dsh-home-paths": ">=0.2.1-rc.3 <0.3.0",
61
- "@deepseek-ai/dsh-llm": ">=0.2.1-rc.3 <0.3.0",
62
- "@deepseek-ai/dsh-storage-domain": ">=0.2.1-rc.3 <0.3.0",
63
- "@deepseek-ai/dsh-typert-protocol": ">=0.2.1-rc.3 <0.3.0",
64
- "@deepseek-ai/schemastery": "~3.18.5"
59
+ "@deepseek-ai/cordis": "^4.1.0",
60
+ "@deepseek-ai/dsh-home-paths": ">=0.2.2-rc.1 <0.2.3-0",
61
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.1 <0.2.3-0",
62
+ "@deepseek-ai/dsh-storage-domain": ">=0.2.2-rc.1 <0.2.3-0",
63
+ "@deepseek-ai/dsh-typert-protocol": ">=0.2.2-rc.1 <0.2.3-0",
64
+ "@deepseek-ai/schemastery": "^3.19.0"
65
65
  },
66
66
  "icon": "./icon.svg",
67
+ "engines": {
68
+ "dsh": ">=0.2.2-rc.1 <0.2.3-0"
69
+ },
67
70
  "scripts": {
68
71
  "generate": "node --experimental-strip-types ../../scripts/mh/typert-protocol-src.ts && node --experimental-strip-types scripts/generate-typert.ts"
69
72
  }