@prettier-ai/dsh-workspace 0.1.2-alpha.1 → 0.1.2-alpha.2

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/lib/index.js CHANGED
@@ -3,7 +3,7 @@ import { realpath, stat } from "node:fs/promises";
3
3
  import { basename } from "node:path";
4
4
  import { Service } from "@prettier-ai/cordis";
5
5
  import { z } from "zod";
6
- import { SessionId } from "@prettier-ai/dsh-session";
6
+ import { brandString } from "@prettier-ai/dsh-brand";
7
7
  import { defineDomain, domainTable } from "@prettier-ai/dsh-storage-domain";
8
8
  //#region lib/types/paths.js
9
9
  /**
@@ -184,7 +184,7 @@ const workspaceId = z.string().transform((value) => value);
184
184
  const workspaceRecord = z.object({
185
185
  path: z.string(),
186
186
  title: z.string(),
187
- sessionIds: z.array(z.string().transform(SessionId)),
187
+ sessionIds: z.array(z.string().transform((value) => brandString(value))),
188
188
  createdAt: z.string(),
189
189
  updatedAt: z.string()
190
190
  });
@@ -212,7 +212,7 @@ const workspacePendingMutation = z.discriminatedUnion("operation", [z.object({
212
212
  const workspaceDomainState = z.object({
213
213
  initialized: z.boolean(),
214
214
  workspaceIds: z.array(workspaceId),
215
- archivedSessionIds: z.array(z.string().transform(SessionId)).default([]),
215
+ archivedSessionIds: z.array(z.string().transform((value) => brandString(value))).default([]),
216
216
  pendingMutation: workspacePendingMutation.optional()
217
217
  });
218
218
  /**
package/lib/invariant.js CHANGED
@@ -3,7 +3,7 @@ import "node:fs/promises";
3
3
  import "node:path";
4
4
  import { Service } from "@prettier-ai/cordis";
5
5
  import { z } from "zod";
6
- import { SessionId } from "@prettier-ai/dsh-session";
6
+ import { brandString } from "@prettier-ai/dsh-brand";
7
7
  import { defineDomain, domainTable } from "@prettier-ai/dsh-storage-domain";
8
8
  //#endregion
9
9
  //#region src/spec.ts
@@ -23,7 +23,7 @@ const workspaceId = z.string().transform((value) => value);
23
23
  const workspaceRecord = z.object({
24
24
  path: z.string(),
25
25
  title: z.string(),
26
- sessionIds: z.array(z.string().transform(SessionId)),
26
+ sessionIds: z.array(z.string().transform((value) => brandString(value))),
27
27
  createdAt: z.string(),
28
28
  updatedAt: z.string()
29
29
  });
@@ -46,7 +46,7 @@ defineDomain({
46
46
  schema: z.object({
47
47
  initialized: z.boolean(),
48
48
  workspaceIds: z.array(workspaceId),
49
- archivedSessionIds: z.array(z.string().transform(SessionId)).default([]),
49
+ archivedSessionIds: z.array(z.string().transform((value) => brandString(value))).default([]),
50
50
  pendingMutation: workspacePendingMutation.optional()
51
51
  }),
52
52
  initial: {
@@ -5,7 +5,7 @@
5
5
  * @module @prettier-ai/dsh-workspace/src/spec
6
6
  */
7
7
  import { z } from 'zod';
8
- import { SessionId } from '@prettier-ai/dsh-session';
8
+ import type { SessionId } from '@prettier-ai/dsh-session';
9
9
  import type { WorkspaceId } from './types.ts';
10
10
  /**
11
11
  * Durable shape of one workspace record. `path` is the `fs.realpath` canon
package/lib/types/spec.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @module @prettier-ai/dsh-workspace/src/spec
6
6
  */
7
7
  import { z } from 'zod';
8
- import { SessionId } from '@prettier-ai/dsh-session';
8
+ import { brandString } from '@prettier-ai/dsh-brand';
9
9
  import { defineDomain, domainTable } from '@prettier-ai/dsh-storage-domain';
10
10
  /** Workspace id schema at the durable boundary; branding has no runtime representation. */
11
11
  const workspaceId = z.string().transform(value => value);
@@ -17,7 +17,7 @@ const workspaceId = z.string().transform(value => value);
17
17
  export const workspaceRecord = z.object({
18
18
  path: z.string(),
19
19
  title: z.string(),
20
- sessionIds: z.array(z.string().transform(SessionId)),
20
+ sessionIds: z.array(z.string().transform(value => brandString(value))),
21
21
  createdAt: z.string(),
22
22
  updatedAt: z.string(),
23
23
  });
@@ -42,7 +42,7 @@ const workspacePendingMutation = z.discriminatedUnion('operation', [
42
42
  export const workspaceDomainState = z.object({
43
43
  initialized: z.boolean(),
44
44
  workspaceIds: z.array(workspaceId),
45
- archivedSessionIds: z.array(z.string().transform(SessionId)).default([]),
45
+ archivedSessionIds: z.array(z.string().transform(value => brandString(value))).default([]),
46
46
  pendingMutation: workspacePendingMutation.optional(),
47
47
  });
48
48
  /**
@@ -11,6 +11,14 @@ import type { SessionId } from '@prettier-ai/dsh-session/types';
11
11
  * normalization rewrites paths, and a reference anchor must stay stable.
12
12
  */
13
13
  export type WorkspaceId = Branded<'WorkspaceId'>;
14
+ declare module '@prettier-ai/dsh-typert-protocol' {
15
+ interface RemoteErrorDetailsMap {
16
+ /** No registration carries that Workspace identity. */
17
+ 'workspace/not-found': {
18
+ readonly workspaceId: WorkspaceId;
19
+ };
20
+ }
21
+ }
14
22
  /**
15
23
  * One workspace: a stable id over an existing directory, a display title, and
16
24
  * an ordered candidate account of sessions. Membership requires both an id in
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prettier-ai/dsh-workspace",
3
3
  "description": "Workspace entity registry (ctx.workspaceRegistry): durable workspace records with validated session attachment over the domain data form for the DeepSeek Harness",
4
- "version": "0.1.2-alpha.1",
4
+ "version": "0.1.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -37,24 +37,25 @@
37
37
  ],
38
38
  "license": "MIT",
39
39
  "peerDependencies": {
40
- "@prettier-ai/dsh-brand": "^0.1.2-alpha.1",
41
- "@prettier-ai/dsh-invariants": "^0.1.2-alpha.1",
42
- "@prettier-ai/dsh-storage-domain": "^0.1.2-alpha.1",
43
- "@prettier-ai/dsh-session": "^0.1.2-alpha.1",
44
- "@prettier-ai/dsh-session-persistence": "^0.1.2-alpha.1",
45
- "@prettier-ai/dsh-storage": "^0.1.2-alpha.1",
46
- "@prettier-ai/cordis": "^4.0.1"
40
+ "@prettier-ai/dsh-invariants": "^0.1.2-alpha.2",
41
+ "@prettier-ai/cordis": "^4.0.2",
42
+ "@prettier-ai/dsh-session-persistence": "^0.1.2-alpha.2",
43
+ "@prettier-ai/dsh-storage": "^0.1.2-alpha.2",
44
+ "@prettier-ai/dsh-session": "^0.1.2-alpha.2",
45
+ "@prettier-ai/dsh-storage-domain": "^0.1.2-alpha.2",
46
+ "@prettier-ai/dsh-typert-protocol": "^0.1.2-alpha.2"
47
47
  },
48
48
  "dependencies": {
49
- "zod": "^4.4.3"
49
+ "zod": "^4.4.3",
50
+ "@prettier-ai/dsh-brand": "^0.1.2-alpha.2"
50
51
  },
51
52
  "devDependencies": {
52
- "@prettier-ai/dsh-storage-domain": "^0.1.2-alpha.1",
53
- "@prettier-ai/dsh-brand": "^0.1.2-alpha.1",
54
- "@prettier-ai/dsh-invariants": "^0.1.2-alpha.1",
55
- "@prettier-ai/dsh-session": "^0.1.2-alpha.1",
56
- "@prettier-ai/dsh-storage": "^0.1.2-alpha.1",
57
- "@prettier-ai/dsh-session-persistence": "^0.1.2-alpha.1",
58
- "@prettier-ai/cordis": "^4.0.1"
53
+ "@prettier-ai/dsh-invariants": "^0.1.2-alpha.2",
54
+ "@prettier-ai/dsh-session": "^0.1.2-alpha.2",
55
+ "@prettier-ai/dsh-session-persistence": "^0.1.2-alpha.2",
56
+ "@prettier-ai/dsh-storage": "^0.1.2-alpha.2",
57
+ "@prettier-ai/cordis": "^4.0.2",
58
+ "@prettier-ai/dsh-storage-domain": "^0.1.2-alpha.2",
59
+ "@prettier-ai/dsh-typert-protocol": "^0.1.2-alpha.2"
59
60
  }
60
61
  }