@astrale-domains/issues 0.5.5 → 0.6.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
@@ -25,11 +25,11 @@ Tag
25
25
  name; Project-local slug; optional color; belongs to one Project
26
26
  ```
27
27
 
28
- The public callable surface keeps observation Project-owned and mutations receiver-owned:
28
+ The public callable surface keeps mutations receiver-owned; callers observe Projects, Issues and
29
+ Comments by reading the graph under their own authority:
29
30
 
30
31
  ```text
31
32
  Project.create
32
- Project.list
33
33
  Project.update | addMember | removeMember | createIssue | receiveReport | createTag | archive
34
34
  Issue.update | edit | transition | assign | setTags | setParent | addComment | archive
35
35
  Comment.edit | delete
@@ -42,13 +42,13 @@ enough Issues through `Issue.setTags`; the Action rejects them explicitly
42
42
  (`TAG_TOO_LARGE_TO_DELETE`) instead of submitting an oversized Mutation with a backend-dependent
43
43
  failure.
44
44
 
45
- `Project.create` and `Project.list` require authentication. `Project.list` returns only Projects the
46
- caller owns or has joined, with their visible Issues and Comment threads nested for one CLI/agent
47
- observation. A reporter observes its own Issues through the graph, under its own authority: from
48
- its Identity through `issue_reported_by`, then each Issue's Comments. Receiver Methods use
49
- Schema-owned Policies: Project owners administer metadata, membership, Tags, and archival; owners and
50
- members contribute to Issues; an Issue's reporter edits its title and description through
51
- `Issue.edit` and archives it; only a Comment author edits or deletes it. Priority, status,
45
+ `Project.create` requires authentication. A Project's owner and members observe the Project, its
46
+ Issues and their Comments through the graph, under their own authority. A reporter observes its own
47
+ Issues the same way: from its Identity through `issue_reported_by`, then each Issue's Comments.
48
+ Receiver Methods use Schema-owned Policies: Project owners administer metadata, membership, Tags,
49
+ and archival; owners and members contribute to Issues; an Issue's reporter edits its title and
50
+ description through `Issue.edit` and archives it; only a Comment author edits or deletes it.
51
+ Priority, status,
52
52
  assignment, Tags, parent, and Comments remain collaborator operations. Issues and their Comments are
53
53
  visible through a Project the caller owns or has joined, and to the Issue's reporter. Deleting an
54
54
  Identity, such as by uninstalling the Domain that owns it, removes only its `issue_reported_by`,
@@ -94,8 +94,9 @@ Other creation methods retain their existing retry semantics. Set-style changes
94
94
  stale concurrent edits reject through atomic mutation preconditions.
95
95
 
96
96
  The mounted View defaults to a focused open-Issue Inbox with queue progress and keyboard or button
97
- navigation. Accepted work has a dedicated discussion view, while Browse searches and filters the
98
- complete visible corpus with bounded pagination. The roomy metadata drawer exposes Close, Defer,
97
+ navigation. Accepted work has a dedicated discussion view, while Browse filters the visible Issues
98
+ on the server and reads them a page at a time. A search keeps the Issues read so far that mention
99
+ it and says when more may match. The roomy metadata drawer exposes Close, Defer,
99
100
  Resolved, and Accept triage actions plus priority, assignment, Tags, and parent controls without
100
101
  blurring the main view. The four outcomes display and honor the `C`, `D`, `R`, and `A` keyboard
101
102
  shortcuts whenever the user is not typing. The selected Issue description and its Comment thread remain below the
@@ -10,7 +10,7 @@ export declare const project_contains_issue: import("@astrale-os/sdk/schema").Di
10
10
  readonly abstract: false;
11
11
  readonly depth: 1;
12
12
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
13
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
13
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
14
14
  })[];
15
15
  readonly outgoing: "0..*";
16
16
  };
@@ -2,10 +2,11 @@ import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
3
  import { nodeIdValue } from '../../../types/index.js';
4
4
  import { ContributeToIssue } from '../policies/contribute-to-issue.js';
5
+ import { MAX_ISSUE_TAGS } from '../types/index.js';
5
6
  export const setIssueTagsMethod = method({
6
7
  description: 'Replace this Issue Tag set with an exact Project-local set.',
7
8
  auth: 'authorized',
8
9
  policy: ({ check, self }) => check(ContributeToIssue, self),
9
- input: z.strictObject({ tagIds: z.array(nodeIdValue).max(128) }),
10
+ input: z.strictObject({ tagIds: z.array(nodeIdValue).max(MAX_ISSUE_TAGS) }),
10
11
  output: z.strictObject({ issueId: nodeIdValue, tagIds: z.array(nodeIdValue) }),
11
12
  });
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue } from './issue.js';
1
+ export { issueDescriptionValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './report.js';
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue } from './issue.js';
1
+ export { issueDescriptionValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './report.js';
@@ -1,6 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  /** An Issue title. The Issue stores it as its Kernel `Named` name, which holds 100 characters. */
3
3
  export declare const issueTitleValue: z.ZodString;
4
+ /** The Tags one Issue holds at most: `Issue.setTags` is the only call that tags an Issue. */
5
+ export declare const MAX_ISSUE_TAGS = 128;
4
6
  /** An Issue description, as Markdown; empty when the Issue has none. */
5
7
  export declare const issueDescriptionValue: z.ZodString;
6
8
  export declare const issueValue: z.ZodObject<{
@@ -3,6 +3,8 @@ import { nodeIdValue } from '../../../types/index.js';
3
3
  import { issueStatus } from '../states/index.js';
4
4
  /** An Issue title. The Issue stores it as its Kernel `Named` name, which holds 100 characters. */
5
5
  export const issueTitleValue = z.string().min(1).max(100);
6
+ /** The Tags one Issue holds at most: `Issue.setTags` is the only call that tags an Issue. */
7
+ export const MAX_ISSUE_TAGS = 128;
6
8
  /** An Issue description, as Markdown; empty when the Issue has none. */
7
9
  export const issueDescriptionValue = z.string().max(50_000);
8
10
  export const issueValue = z.strictObject({
@@ -17,7 +17,7 @@ export declare const project_has_member: import("@astrale-os/sdk/schema").Direct
17
17
  readonly abstract: false;
18
18
  readonly depth: 1;
19
19
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
20
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
20
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
21
21
  })[];
22
22
  readonly incoming: "0..*";
23
23
  };
@@ -17,7 +17,7 @@ export declare const project_owned_by: import("@astrale-os/sdk/schema").Directed
17
17
  readonly abstract: false;
18
18
  readonly depth: 1;
19
19
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
20
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
20
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
21
21
  })[];
22
22
  readonly incoming: "0..1";
23
23
  };
@@ -25,31 +25,6 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
25
25
  archived: boolean;
26
26
  };
27
27
  }, "authenticated", true, false, undefined, undefined>>;
28
- list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
29
- readonly mode: 'value';
30
- readonly value: {
31
- projects: {
32
- id: string;
33
- key: string;
34
- name: string;
35
- description: string;
36
- archived: boolean;
37
- issues: {
38
- id: string;
39
- reference: string;
40
- title: string;
41
- description: string;
42
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
43
- priority: number;
44
- archived: boolean;
45
- comments: {
46
- id: string;
47
- body: string;
48
- }[];
49
- }[];
50
- }[];
51
- };
52
- }, "authenticated", true, false, undefined, undefined>>;
53
28
  update: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
54
29
  name?: string | undefined;
55
30
  description?: string | undefined;
@@ -7,7 +7,6 @@ import { archiveProjectMethod } from '../functions/archive-project.js';
7
7
  import { createProjectIssueMethod } from '../functions/create-project-issue.js';
8
8
  import { createProjectTagMethod } from '../functions/create-project-tag.js';
9
9
  import { createProjectMethod } from '../functions/create-project.js';
10
- import { listProjectsMethod } from '../functions/list-projects.js';
11
10
  import { receiveProjectReportMethod } from '../functions/receive-project-report.js';
12
11
  import { removeProjectMemberMethod } from '../functions/remove-project-member.js';
13
12
  import { updateProjectMethod } from '../functions/update-project.js';
@@ -25,7 +24,6 @@ export const Project = nodeClass({
25
24
  },
26
25
  methods: {
27
26
  create: createProjectMethod,
28
- list: listProjectsMethod,
29
27
  update: updateProjectMethod,
30
28
  addMember: addProjectMemberMethod,
31
29
  removeMember: removeProjectMemberMethod,
@@ -3,7 +3,6 @@ export { archiveProjectMethod } from './archive-project.js';
3
3
  export { createProjectIssueMethod } from './create-project-issue.js';
4
4
  export { createProjectTagMethod } from './create-project-tag.js';
5
5
  export { createProjectMethod } from './create-project.js';
6
- export { listProjectsMethod } from './list-projects.js';
7
6
  export { removeProjectMemberMethod } from './remove-project-member.js';
8
7
  export { updateProjectMethod } from './update-project.js';
9
8
  export { receiveProjectReportMethod } from './receive-project-report.js';
@@ -3,7 +3,6 @@ export { archiveProjectMethod } from './archive-project.js';
3
3
  export { createProjectIssueMethod } from './create-project-issue.js';
4
4
  export { createProjectTagMethod } from './create-project-tag.js';
5
5
  export { createProjectMethod } from './create-project.js';
6
- export { listProjectsMethod } from './list-projects.js';
7
6
  export { removeProjectMemberMethod } from './remove-project-member.js';
8
7
  export { updateProjectMethod } from './update-project.js';
9
8
  export { receiveProjectReportMethod } from './receive-project-report.js';
@@ -1,4 +1,4 @@
1
1
  export { membershipChangeValue, projectValue } from './types/index.js';
2
2
  export { project_has_member, project_owned_by, Project } from './classes/index.js';
3
- export { addProjectMemberMethod, archiveProjectMethod, createProjectIssueMethod, createProjectTagMethod, createProjectMethod, listProjectsMethod, removeProjectMemberMethod, updateProjectMethod, } from './functions/index.js';
3
+ export { addProjectMemberMethod, archiveProjectMethod, createProjectIssueMethod, createProjectTagMethod, createProjectMethod, removeProjectMemberMethod, updateProjectMethod, } from './functions/index.js';
4
4
  export { ContributeToProject, ManageProject, TraverseProjectMember, TraverseProjectOwner, } from './policies/index.js';
@@ -1,4 +1,4 @@
1
1
  export { membershipChangeValue, projectValue } from './types/index.js';
2
2
  export { project_has_member, project_owned_by, Project } from './classes/index.js';
3
- export { addProjectMemberMethod, archiveProjectMethod, createProjectIssueMethod, createProjectTagMethod, createProjectMethod, listProjectsMethod, removeProjectMemberMethod, updateProjectMethod, } from './functions/index.js';
3
+ export { addProjectMemberMethod, archiveProjectMethod, createProjectIssueMethod, createProjectTagMethod, createProjectMethod, removeProjectMemberMethod, updateProjectMethod, } from './functions/index.js';
4
4
  export { ContributeToProject, ManageProject, TraverseProjectMember, TraverseProjectOwner, } from './policies/index.js';
@@ -10,7 +10,7 @@ export declare const project_contains_tag: import("@astrale-os/sdk/schema").Dire
10
10
  readonly abstract: false;
11
11
  readonly depth: 1;
12
12
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
13
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
13
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
14
14
  })[];
15
15
  readonly outgoing: "0..*";
16
16
  };
@@ -30,31 +30,6 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
30
30
  archived: boolean;
31
31
  };
32
32
  }, "authenticated", true, false, undefined, undefined>>;
33
- list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
34
- readonly mode: 'value';
35
- readonly value: {
36
- projects: {
37
- id: string;
38
- key: string;
39
- name: string;
40
- description: string;
41
- archived: boolean;
42
- issues: {
43
- id: string;
44
- reference: string;
45
- title: string;
46
- description: string;
47
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
48
- priority: number;
49
- archived: boolean;
50
- comments: {
51
- id: string;
52
- body: string;
53
- }[];
54
- }[];
55
- }[];
56
- };
57
- }, "authenticated", true, false, undefined, undefined>>;
58
33
  update: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
59
34
  name?: string | undefined;
60
35
  description?: string | undefined;
@@ -440,7 +415,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
440
415
  readonly abstract: false;
441
416
  readonly depth: 1;
442
417
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
443
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
418
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
444
419
  })[];
445
420
  readonly incoming: "0..1";
446
421
  };
@@ -466,7 +441,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
466
441
  readonly abstract: false;
467
442
  readonly depth: 1;
468
443
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
469
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
444
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
470
445
  })[];
471
446
  readonly incoming: "0..*";
472
447
  };
@@ -485,7 +460,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
485
460
  readonly abstract: false;
486
461
  readonly depth: 1;
487
462
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
488
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
463
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
489
464
  })[];
490
465
  readonly outgoing: "0..*";
491
466
  };
@@ -656,7 +631,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
656
631
  readonly abstract: false;
657
632
  readonly depth: 1;
658
633
  readonly properties: "archived" | "createdAt" | "description" | "key" | "memberIds" | "name" | "nextIssueNumber" | "ownerId" | "updatedAt";
659
- readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "list" | "receiveReport" | "removeMember" | "update";
634
+ readonly methods: "addMember" | "archive" | "create" | "createIssue" | "createTag" | "receiveReport" | "removeMember" | "update";
660
635
  })[];
661
636
  readonly outgoing: "0..*";
662
637
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.5.5",
3
+ "version": "0.6.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",
@@ -28,11 +28,11 @@
28
28
  "registry": "https://registry.npmjs.org/"
29
29
  },
30
30
  "dependencies": {
31
- "@astrale-os/sdk": "0.6.0-beta.45",
31
+ "@astrale-os/sdk": "0.6.0-beta.50",
32
32
  "zod": "4.4.3"
33
33
  },
34
34
  "devDependencies": {
35
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.200",
35
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.205",
36
36
  "@astrale-os/ox": ">=0.1.4 <1.0.0",
37
37
  "@astrale-os/shell": "0.7.0-beta.9",
38
38
  "@astrale-os/shell-react": "0.6.0-beta.10",
@@ -1,25 +0,0 @@
1
- export declare const listProjectsMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
2
- readonly mode: 'value';
3
- readonly value: {
4
- projects: {
5
- id: string;
6
- key: string;
7
- name: string;
8
- description: string;
9
- archived: boolean;
10
- issues: {
11
- id: string;
12
- reference: string;
13
- title: string;
14
- description: string;
15
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
16
- priority: number;
17
- archived: boolean;
18
- comments: {
19
- id: string;
20
- body: string;
21
- }[];
22
- }[];
23
- }[];
24
- };
25
- }, "authenticated", true, false, undefined, undefined>>;
@@ -1,16 +0,0 @@
1
- import { method } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- import { commentValue } from '../../comment/index.js';
4
- import { issueValue } from '../../issue/index.js';
5
- import { projectValue } from '../types/project.js';
6
- export const listProjectsMethod = method({
7
- description: 'List the caller-visible Projects with their Issues.',
8
- static: true,
9
- auth: 'authenticated',
10
- input: z.strictObject({}),
11
- output: z.strictObject({
12
- projects: z.array(projectValue.extend({
13
- issues: z.array(issueValue.extend({ comments: z.array(commentValue) })),
14
- })),
15
- }),
16
- });