@astrale-domains/issues 0.6.5 → 0.7.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.
Files changed (41) hide show
  1. package/README.md +60 -12
  2. package/dist/schema/modules/comment/classes/issue-has-comment.d.ts +1 -1
  3. package/dist/schema/modules/issue/classes/index.d.ts +1 -0
  4. package/dist/schema/modules/issue/classes/index.js +1 -0
  5. package/dist/schema/modules/issue/classes/issue-assigned-to.d.ts +1 -1
  6. package/dist/schema/modules/issue/classes/issue-reported-by.d.ts +1 -1
  7. package/dist/schema/modules/issue/classes/issue-subtask-of.d.ts +2 -2
  8. package/dist/schema/modules/issue/classes/issue-tracked-by.d.ts +33 -0
  9. package/dist/schema/modules/issue/classes/issue-tracked-by.js +10 -0
  10. package/dist/schema/modules/issue/classes/issue.d.ts +32 -13
  11. package/dist/schema/modules/issue/classes/issue.js +6 -0
  12. package/dist/schema/modules/issue/classes/project-contains-issue.d.ts +1 -1
  13. package/dist/schema/modules/issue/functions/delete-issue.d.ts +7 -0
  14. package/dist/schema/modules/issue/functions/delete-issue.js +11 -0
  15. package/dist/schema/modules/issue/functions/edit-issue.d.ts +1 -1
  16. package/dist/schema/modules/issue/functions/index.d.ts +3 -0
  17. package/dist/schema/modules/issue/functions/index.js +3 -0
  18. package/dist/schema/modules/issue/functions/track-issue.d.ts +10 -0
  19. package/dist/schema/modules/issue/functions/track-issue.js +19 -0
  20. package/dist/schema/modules/issue/functions/transition-issue.d.ts +4 -4
  21. package/dist/schema/modules/issue/functions/transition-issue.js +1 -1
  22. package/dist/schema/modules/issue/functions/untrack-issue.d.ts +9 -0
  23. package/dist/schema/modules/issue/functions/untrack-issue.js +12 -0
  24. package/dist/schema/modules/issue/functions/update-issue.d.ts +1 -1
  25. package/dist/schema/modules/issue/index.d.ts +3 -3
  26. package/dist/schema/modules/issue/index.js +3 -3
  27. package/dist/schema/modules/issue/policies/index.d.ts +2 -0
  28. package/dist/schema/modules/issue/policies/index.js +2 -0
  29. package/dist/schema/modules/issue/policies/manage-issue.d.ts +1 -0
  30. package/dist/schema/modules/issue/policies/manage-issue.js +10 -0
  31. package/dist/schema/modules/issue/policies/traverse-issue-tracking.d.ts +2 -0
  32. package/dist/schema/modules/issue/policies/traverse-issue-tracking.js +20 -0
  33. package/dist/schema/modules/issue/states/issue-status.d.ts +0 -7
  34. package/dist/schema/modules/issue/states/issue-status.js +2 -3
  35. package/dist/schema/modules/issue/types/issue.d.ts +1 -1
  36. package/dist/schema/modules/project/classes/project.d.ts +1 -1
  37. package/dist/schema/modules/project/functions/create-project-issue.d.ts +1 -1
  38. package/dist/schema/modules/tag/classes/issue-tagged-with.d.ts +1 -1
  39. package/dist/schema/schema.d.ts +76 -21
  40. package/dist/schema/schema.js +14 -2
  41. package/package.json +7 -4
package/README.md CHANGED
@@ -15,8 +15,9 @@ Project
15
15
 
16
16
  Issue
17
17
  immutable reference; title (100 characters); optional Markdown description (50,000 characters)
18
- status: open | accepted | resolved | deferred | closed
18
+ status: open | accepted | resolved | closed
19
19
  priority: 0..4; optional assignee; optional acyclic parent; Tags
20
+ tracked by at most one other Issue, in any Project
20
21
 
21
22
  Comment
22
23
  body; immutable author; belongs to one Issue
@@ -31,7 +32,8 @@ Comments by reading the graph under their own authority:
31
32
  ```text
32
33
  Project.create
33
34
  Project.update | addMember | removeMember | createIssue | receiveReport | createTag | archive
34
- Issue.update | edit | transition | assign | setTags | setParent | addComment | archive
35
+ Issue.update | edit | transition | assign | setTags | setParent | track | untrack | addComment
36
+ | archive | delete
35
37
  Comment.edit | delete
36
38
  Tag.edit | delete
37
39
  ```
@@ -42,11 +44,30 @@ enough Issues through `Issue.setTags`; the Action rejects them explicitly
42
44
  (`TAG_TOO_LARGE_TO_DELETE`) instead of submitting an oversized Mutation with a backend-dependent
43
45
  failure.
44
46
 
47
+ `Issue.delete` deletes an Issue for good, archived or not, in one atomic Mutation: its Comments,
48
+ and every Edge that holds the Issue or one of its Comments. Its sub-Issues stay, without a parent.
49
+ Its reference is never given again, since a Project's `nextIssueNumber` only grows. The Mutation
50
+ holds at most 2,048 writes: three per Comment, one per sub-Issue, Tag and person, and two for the
51
+ Issue in its Project. A larger Issue is refused (`ISSUE_TOO_LARGE_TO_DELETE`) until some Comments
52
+ are deleted or sub-Issues detached, and an archived Project refuses it (`PROJECT_ARCHIVED`). The
53
+ Edges are read from the graph, not from `reporterId`, `assigneeId` or `authorId`, so an Issue whose
54
+ reporter, assignee or Comment author was deleted is still deleted whole.
55
+
56
+ An Issue tracks Issues of any Project, such as a Product Issue tracking the reports it answers.
57
+ `Issue.track` accepts an open tracked Issue; from then on, each status event of the tracking Issue
58
+ is applied to every Issue it tracks for which it is legal, in the same Mutation. A tracked Issue
59
+ takes no transition of its own (`ISSUE_TRACKED`) until it is untracked, by either side, and keeps
60
+ its status when it is. Tracking is one level deep: an Issue that tracks others is tracked by none,
61
+ and tracking one that tracks others moves them to the new tracker. One Issue tracks at most 512
62
+ (`TOO_MANY_TRACKED_ISSUES`). Tracking needs a collaborator of both Projects; a tracking link is
63
+ visible to the collaborators of either Project, never to a reporter alone. Deleting either Issue
64
+ removes the link.
65
+
45
66
  `Project.create` requires authentication. A Project's owner and members observe the Project, its
46
67
  Issues and their Comments through the graph, under their own authority. A reporter observes its own
47
68
  Issues the same way: from its Identity through `issue_reported_by`, then each Issue's Comments.
48
69
  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
70
+ and archival, and alone delete Issues; owners and members contribute to Issues; an Issue's reporter edits its title and
50
71
  description through `Issue.edit` and archives it; only a Comment author edits or deletes it.
51
72
  Priority, status,
52
73
  assignment, Tags, parent, and Comments remain collaborator operations. Issues and their Comments are
@@ -93,15 +114,42 @@ duplicate matching, or background processing.
93
114
  Other creation methods retain their existing retry semantics. Set-style changes converge naturally;
94
115
  stale concurrent edits reject through atomic mutation preconditions.
95
116
 
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 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,
100
- Resolved, and Accept triage actions plus priority, assignment, Tags, and parent controls without
101
- blurring the main view. The four outcomes display and honor the `C`, `D`, `R`, and `A` keyboard
102
- shortcuts whenever the user is not typing. The selected Issue description and its Comment thread remain below the
103
- inbox as one continuous Markdown conversation with strict Mermaid diagrams. Project, Issue, and Tag
104
- creation and Project membership administration intentionally remain API-first.
117
+ ## View
118
+
119
+ The mounted View is one full-width application under a top bar: Inbox, Issues and Projects, a
120
+ Project switcher that every screen keeps in its URL, a command palette (`⌘K`), New issue (`N`) and search (`/`).
121
+ Every screen, filter and Issue has its own URL. People appear as "You" for the caller and as a
122
+ short Identity id for anyone else, because the Kernel gives Identities no name the Domain may read.
123
+
124
+ - **Inbox** triages one open Issue at a time, highest priority first: Accept and Close (`A`,
125
+ `C`) move to the next Issue at once, and a refused triage puts the Issue back. The
126
+ Issue in focus shows its description, report environment and Comments, and takes a reply,
127
+ priority, assignee and Tags without leaving the queue.
128
+ - **Issues** lists the Issues of one status, Accepted by default, with each status's count.
129
+ Priority, assignee, Tags and order filters run on the server and read a page at a time; with
130
+ several Tags, an Issue has every one. The search box matches the Issues read so far and offers
131
+ to read further. Rows are selected with
132
+ the mouse or `x` and changed together: status, assignee and priority. A tracked Issue keeps its
133
+ status, and the change says so.
134
+ - **An Issue's page** shows its title, description and Comments as one Markdown timeline, with
135
+ Write and Preview tabs, editing and deleting under the Schema's Policies. A side column holds
136
+ status, assignee, priority, Tags, parent, sub-Issues with their progress, tracking, details,
137
+ report environment, archival and, for the Project owner, deletion. A tracked Issue names the
138
+ Issue it follows in place of its status control; an Issue of a Project the reader is not part of
139
+ shows as hidden.
140
+ - **New issue** creates an Issue in a Project, or a sub-Issue in its parent's Project, with its
141
+ priority, assignee and Tags.
142
+ - **Projects** lists the caller's Projects with their counts and creates a Project. A Project's
143
+ page lets its owner change its name and description, add and remove members by Identity id,
144
+ create, edit and delete Tags, and archive it.
145
+
146
+ Descriptions and Comments render Markdown as GitHub does: GFM, Mermaid diagrams, and the HTML that
147
+ GitHub's sanitization keeps (`details`, `kbd`, sized images, `sub` and `sup`, tables); scripts,
148
+ styles, event handlers, frames and forms are dropped.
149
+
150
+ Each change shows at once and is reconciled with the graph; a refused change comes back with its
151
+ reason. The View offers an action only where the Schema's Policies allow it; the Kernel still
152
+ decides every call.
105
153
 
106
154
  ## Development
107
155
 
@@ -10,7 +10,7 @@ export declare const issue_has_comment: import("@astrale-os/sdk/schema").Directe
10
10
  readonly abstract: false;
11
11
  readonly depth: 1;
12
12
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
13
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
13
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
14
14
  })[];
15
15
  readonly outgoing: "0..*";
16
16
  };
@@ -1,5 +1,6 @@
1
1
  export { issue_assigned_to } from './issue-assigned-to.js';
2
2
  export { issue_reported_by } from './issue-reported-by.js';
3
3
  export { issue_subtask_of } from './issue-subtask-of.js';
4
+ export { issue_tracked_by } from './issue-tracked-by.js';
4
5
  export { Issue } from './issue.js';
5
6
  export { project_contains_issue } from './project-contains-issue.js';
@@ -1,5 +1,6 @@
1
1
  export { issue_assigned_to } from './issue-assigned-to.js';
2
2
  export { issue_reported_by } from './issue-reported-by.js';
3
3
  export { issue_subtask_of } from './issue-subtask-of.js';
4
+ export { issue_tracked_by } from './issue-tracked-by.js';
4
5
  export { Issue } from './issue.js';
5
6
  export { project_contains_issue } from './project-contains-issue.js';
@@ -17,7 +17,7 @@ export declare const issue_assigned_to: import("@astrale-os/sdk/schema").Directe
17
17
  readonly abstract: false;
18
18
  readonly depth: 1;
19
19
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
20
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
20
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
21
21
  })[];
22
22
  readonly incoming: "0..1";
23
23
  };
@@ -17,7 +17,7 @@ export declare const issue_reported_by: import("@astrale-os/sdk/schema").Directe
17
17
  readonly abstract: false;
18
18
  readonly depth: 1;
19
19
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
20
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
20
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
21
21
  })[];
22
22
  readonly incoming: "0..1";
23
23
  };
@@ -10,7 +10,7 @@ export declare const issue_subtask_of: import("@astrale-os/sdk/schema").Directed
10
10
  readonly abstract: false;
11
11
  readonly depth: 1;
12
12
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
13
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
13
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
14
14
  })[];
15
15
  readonly outgoing: "0..1";
16
16
  };
@@ -21,7 +21,7 @@ export declare const issue_subtask_of: import("@astrale-os/sdk/schema").Directed
21
21
  readonly abstract: false;
22
22
  readonly depth: 1;
23
23
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
24
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
24
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
25
25
  })[];
26
26
  readonly incoming: "0..*";
27
27
  };
@@ -0,0 +1,33 @@
1
+ export declare const issue_tracked_by: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
2
+ readonly depth: 0;
3
+ readonly abstract: false;
4
+ readonly extends: readonly [];
5
+ readonly properties: never;
6
+ readonly source: {
7
+ readonly as: "tracked";
8
+ readonly accepts: readonly (() => {
9
+ readonly kind: 'node';
10
+ readonly abstract: false;
11
+ readonly depth: 1;
12
+ readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
13
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
14
+ })[];
15
+ readonly outgoing: "0..1";
16
+ };
17
+ readonly target: {
18
+ readonly as: "tracking";
19
+ readonly accepts: readonly (() => {
20
+ readonly kind: 'node';
21
+ readonly abstract: false;
22
+ readonly depth: 1;
23
+ readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
24
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
25
+ })[];
26
+ readonly incoming: "0..*";
27
+ };
28
+ readonly constraints: {
29
+ readonly noSelf: true;
30
+ readonly acyclic: true;
31
+ };
32
+ readonly effectiveProperties: never;
33
+ }>;
@@ -0,0 +1,10 @@
1
+ import { edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseIssueTracking } from '../policies/traverse-issue-tracking.js';
3
+ import { Issue } from './issue.js';
4
+ export const issue_tracked_by = edgeClass.directed({
5
+ description: 'One Issue is tracked by at most one other Issue, in any Project, and follows its status events; an Issue that tracks others is tracked by none.',
6
+ source: { as: 'tracked', accepts: [() => Issue], outgoing: '0..1' },
7
+ target: { as: 'tracking', accepts: [() => Issue], incoming: '0..*' },
8
+ constraints: { noSelf: true, acyclic: true },
9
+ policies: { read: () => TraverseIssueTracking, traverse: () => TraverseIssueTracking },
10
+ });
@@ -14,17 +14,10 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
14
14
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
15
15
  readonly open: {
16
16
  readonly accept: "accepted";
17
- readonly defer: "deferred";
18
17
  readonly close: "closed";
19
18
  };
20
19
  readonly accepted: {
21
20
  readonly resolve: "resolved";
22
- readonly defer: "deferred";
23
- readonly close: "closed";
24
- };
25
- readonly deferred: {
26
- readonly reopen: "open";
27
- readonly accept: "accepted";
28
21
  readonly close: "closed";
29
22
  };
30
23
  readonly resolved: {
@@ -92,7 +85,7 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
92
85
  reference: string;
93
86
  title: string;
94
87
  description: string;
95
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
88
+ status: "accepted" | "closed" | "open" | "resolved";
96
89
  priority: number;
97
90
  archived: boolean;
98
91
  };
@@ -107,13 +100,13 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
107
100
  reference: string;
108
101
  title: string;
109
102
  description: string;
110
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
103
+ status: "accepted" | "closed" | "open" | "resolved";
111
104
  priority: number;
112
105
  archived: boolean;
113
106
  };
114
107
  }, "authorized", false, false, undefined, undefined>>;
115
108
  transition: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
116
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
109
+ event: "accept" | "close" | "reopen" | "resolve";
117
110
  }, {
118
111
  readonly mode: 'value';
119
112
  readonly value: {
@@ -123,15 +116,15 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
123
116
  reference: string;
124
117
  title: string;
125
118
  description: string;
126
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
119
+ status: "accepted" | "closed" | "open" | "resolved";
127
120
  priority: number;
128
121
  archived: boolean;
129
122
  };
130
123
  } | {
131
124
  kind: "rejected";
132
125
  code: "STATE_TRANSITION_ILLEGAL";
133
- from: "accepted" | "closed" | "deferred" | "open" | "resolved";
134
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
126
+ from: "accepted" | "closed" | "open" | "resolved";
127
+ event: "accept" | "close" | "reopen" | "resolve";
135
128
  };
136
129
  }, "authorized", false, false, undefined, undefined>>;
137
130
  assign: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -161,6 +154,25 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
161
154
  parentId?: string | undefined;
162
155
  };
163
156
  }, "authorized", false, false, undefined, undefined>>;
157
+ track: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
158
+ issue: string;
159
+ }, {
160
+ readonly mode: 'value';
161
+ readonly value: {
162
+ trackingId: string;
163
+ trackedIds: string[];
164
+ status: "accepted" | "closed" | "open" | "resolved";
165
+ };
166
+ }, "authorized", false, false, undefined, undefined>>;
167
+ untrack: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
168
+ issue: string;
169
+ }, {
170
+ readonly mode: 'value';
171
+ readonly value: {
172
+ trackingId: string;
173
+ issueId: string;
174
+ };
175
+ }, "authorized", false, false, undefined, undefined>>;
164
176
  addComment: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
165
177
  body: string;
166
178
  }, {
@@ -177,6 +189,13 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
177
189
  archived: true;
178
190
  };
179
191
  }, "authorized", false, false, undefined, undefined>>;
192
+ delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
193
+ readonly mode: 'value';
194
+ readonly value: {
195
+ issueId: string;
196
+ deleted: true;
197
+ };
198
+ }, "authorized", false, false, undefined, undefined>>;
180
199
  };
181
200
  readonly policies: {
182
201
  read: () => import("@astrale-os/sdk/schema").Policy;
@@ -5,10 +5,13 @@ import { nodeIdValue } from '../../../types/index.js';
5
5
  import { addIssueCommentMethod } from '../functions/add-issue-comment.js';
6
6
  import { archiveIssueMethod } from '../functions/archive-issue.js';
7
7
  import { assignIssueMethod } from '../functions/assign-issue.js';
8
+ import { deleteIssueMethod } from '../functions/delete-issue.js';
8
9
  import { editIssueMethod } from '../functions/edit-issue.js';
9
10
  import { setIssueParentMethod } from '../functions/set-issue-parent.js';
10
11
  import { setIssueTagsMethod } from '../functions/set-issue-tags.js';
12
+ import { trackIssueMethod } from '../functions/track-issue.js';
11
13
  import { transitionIssueMethod } from '../functions/transition-issue.js';
14
+ import { untrackIssueMethod } from '../functions/untrack-issue.js';
12
15
  import { updateIssueMethod } from '../functions/update-issue.js';
13
16
  import { ContributeToIssueOrReportedIssue } from '../policies/contribute-to-issue-or-reported-issue.js';
14
17
  import { issueStatus } from '../states/index.js';
@@ -41,8 +44,11 @@ export const Issue = nodeClass({
41
44
  assign: assignIssueMethod,
42
45
  setTags: setIssueTagsMethod,
43
46
  setParent: setIssueParentMethod,
47
+ track: trackIssueMethod,
48
+ untrack: untrackIssueMethod,
44
49
  addComment: addIssueCommentMethod,
45
50
  archive: archiveIssueMethod,
51
+ delete: deleteIssueMethod,
46
52
  },
47
53
  policies: {
48
54
  read: () => ContributeToIssueOrReportedIssue,
@@ -21,7 +21,7 @@ export declare const project_contains_issue: import("@astrale-os/sdk/schema").Di
21
21
  readonly abstract: false;
22
22
  readonly depth: 1;
23
23
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
24
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
24
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
25
25
  })[];
26
26
  readonly incoming: "1";
27
27
  };
@@ -0,0 +1,7 @@
1
+ export declare const deleteIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
2
+ readonly mode: 'value';
3
+ readonly value: {
4
+ issueId: string;
5
+ deleted: true;
6
+ };
7
+ }, "authorized", false, false, undefined, undefined>>;
@@ -0,0 +1,11 @@
1
+ import { method } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { nodeIdValue } from '../../../types/index.js';
4
+ import { ManageIssue } from '../policies/manage-issue.js';
5
+ export const deleteIssueMethod = method({
6
+ description: 'Delete this Issue and its Comments for good; its sub-Issues stay, without a parent. Its reference is never given again. Refused when that takes more than 2,048 writes.',
7
+ auth: 'authorized',
8
+ policy: ({ check, self }) => check(ManageIssue, self),
9
+ input: z.strictObject({}),
10
+ output: z.strictObject({ issueId: nodeIdValue, deleted: z.literal(true) }),
11
+ });
@@ -8,7 +8,7 @@ export declare const editIssueMethod: import("@astrale-os/sdk/schema").Method<im
8
8
  reference: string;
9
9
  title: string;
10
10
  description: string;
11
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
11
+ status: "accepted" | "closed" | "open" | "resolved";
12
12
  priority: number;
13
13
  archived: boolean;
14
14
  };
@@ -1,8 +1,11 @@
1
1
  export { addIssueCommentMethod } from './add-issue-comment.js';
2
2
  export { archiveIssueMethod } from './archive-issue.js';
3
3
  export { assignIssueMethod } from './assign-issue.js';
4
+ export { deleteIssueMethod } from './delete-issue.js';
4
5
  export { editIssueMethod } from './edit-issue.js';
5
6
  export { setIssueParentMethod } from './set-issue-parent.js';
6
7
  export { setIssueTagsMethod } from './set-issue-tags.js';
8
+ export { trackIssueMethod } from './track-issue.js';
7
9
  export { transitionIssueMethod } from './transition-issue.js';
10
+ export { untrackIssueMethod } from './untrack-issue.js';
8
11
  export { updateIssueMethod } from './update-issue.js';
@@ -1,8 +1,11 @@
1
1
  export { addIssueCommentMethod } from './add-issue-comment.js';
2
2
  export { archiveIssueMethod } from './archive-issue.js';
3
3
  export { assignIssueMethod } from './assign-issue.js';
4
+ export { deleteIssueMethod } from './delete-issue.js';
4
5
  export { editIssueMethod } from './edit-issue.js';
5
6
  export { setIssueParentMethod } from './set-issue-parent.js';
6
7
  export { setIssueTagsMethod } from './set-issue-tags.js';
8
+ export { trackIssueMethod } from './track-issue.js';
7
9
  export { transitionIssueMethod } from './transition-issue.js';
10
+ export { untrackIssueMethod } from './untrack-issue.js';
8
11
  export { updateIssueMethod } from './update-issue.js';
@@ -0,0 +1,10 @@
1
+ export declare const trackIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ issue: string;
3
+ }, {
4
+ readonly mode: 'value';
5
+ readonly value: {
6
+ trackingId: string;
7
+ trackedIds: string[];
8
+ status: "accepted" | "closed" | "open" | "resolved";
9
+ };
10
+ }, "authorized", false, false, undefined, undefined>>;
@@ -0,0 +1,19 @@
1
+ import { method, path } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { nodeIdValue } from '../../../types/index.js';
4
+ import { Issue } from '../classes/issue.js';
5
+ import { ContributeToIssue } from '../policies/contribute-to-issue.js';
6
+ import { issueStatus } from '../states/index.js';
7
+ export const trackIssueMethod = method({
8
+ description: 'Track another Issue, in any Project: an open one is accepted, then takes each status event of this Issue that is legal for it until untracked. The Issues it tracked move here with it.',
9
+ auth: 'authorized',
10
+ policy: ({ allOf, check, input, self }) => allOf(check(ContributeToIssue, self), check(ContributeToIssue, input.issue)),
11
+ input: z.strictObject({ issue: path(() => Issue) }),
12
+ output: z.strictObject({
13
+ trackingId: nodeIdValue,
14
+ /** The Issue tracked, then the Issues it tracked, which moved with it. */
15
+ trackedIds: z.array(nodeIdValue).min(1),
16
+ /** The status of the Issue tracked: accepted when it was open. */
17
+ status: issueStatus.stateSchema,
18
+ }),
19
+ });
@@ -1,5 +1,5 @@
1
1
  export declare const transitionIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
2
+ event: "accept" | "close" | "reopen" | "resolve";
3
3
  }, {
4
4
  readonly mode: 'value';
5
5
  readonly value: {
@@ -9,14 +9,14 @@ export declare const transitionIssueMethod: import("@astrale-os/sdk/schema").Met
9
9
  reference: string;
10
10
  title: string;
11
11
  description: string;
12
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
12
+ status: "accepted" | "closed" | "open" | "resolved";
13
13
  priority: number;
14
14
  archived: boolean;
15
15
  };
16
16
  } | {
17
17
  kind: "rejected";
18
18
  code: "STATE_TRANSITION_ILLEGAL";
19
- from: "accepted" | "closed" | "deferred" | "open" | "resolved";
20
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
19
+ from: "accepted" | "closed" | "open" | "resolved";
20
+ event: "accept" | "close" | "reopen" | "resolve";
21
21
  };
22
22
  }, "authorized", false, false, undefined, undefined>>;
@@ -4,7 +4,7 @@ import { ContributeToIssue } from '../policies/contribute-to-issue.js';
4
4
  import { issueStatus } from '../states/index.js';
5
5
  import { issueValue } from '../types/issue.js';
6
6
  export const transitionIssueMethod = method({
7
- description: 'Apply one legal Issue status event.',
7
+ description: 'Apply one legal Issue status event; each Issue it tracks takes the same event where it is legal. A tracked Issue moves only with the Issue that tracks it.',
8
8
  auth: 'authorized',
9
9
  policy: ({ check, self }) => check(ContributeToIssue, self),
10
10
  input: z.strictObject({ event: issueStatus.eventSchema }),
@@ -0,0 +1,9 @@
1
+ export declare const untrackIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ issue: string;
3
+ }, {
4
+ readonly mode: 'value';
5
+ readonly value: {
6
+ trackingId: string;
7
+ issueId: string;
8
+ };
9
+ }, "authorized", false, false, undefined, undefined>>;
@@ -0,0 +1,12 @@
1
+ import { method, path } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { nodeIdValue } from '../../../types/index.js';
4
+ import { Issue } from '../classes/issue.js';
5
+ import { ContributeToIssue } from '../policies/contribute-to-issue.js';
6
+ export const untrackIssueMethod = method({
7
+ description: 'Stop tracking an Issue: it keeps its status and takes its own transitions again. Either side may untrack, even when archived.',
8
+ auth: 'authorized',
9
+ policy: ({ anyOf, check, input, self }) => anyOf(check(ContributeToIssue, self), check(ContributeToIssue, input.issue)),
10
+ input: z.strictObject({ issue: path(() => Issue) }),
11
+ output: z.strictObject({ trackingId: nodeIdValue, issueId: nodeIdValue }),
12
+ });
@@ -9,7 +9,7 @@ export declare const updateIssueMethod: import("@astrale-os/sdk/schema").Method<
9
9
  reference: string;
10
10
  title: string;
11
11
  description: string;
12
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
12
+ status: "accepted" | "closed" | "open" | "resolved";
13
13
  priority: number;
14
14
  archived: boolean;
15
15
  };
@@ -1,5 +1,5 @@
1
1
  export { issueDescriptionValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
2
2
  export { issueStatus, type IssueEvent, type IssueStatus } from './states/index.js';
3
- export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
4
- export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
5
- export { ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
3
+ export { issue_assigned_to, issue_reported_by, issue_subtask_of, issue_tracked_by, Issue, project_contains_issue, } from './classes/index.js';
4
+ export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, deleteIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, trackIssueMethod, transitionIssueMethod, untrackIssueMethod, updateIssueMethod, } from './functions/index.js';
5
+ export { ContributeToIssue, ContributeToIssueOrReportedIssue, ManageIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseIssueTracking, TraverseProjectIssue, } from './policies/index.js';
@@ -1,5 +1,5 @@
1
1
  export { issueDescriptionValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './types/index.js';
2
2
  export { issueStatus } from './states/index.js';
3
- export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
4
- export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
5
- export { ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
3
+ export { issue_assigned_to, issue_reported_by, issue_subtask_of, issue_tracked_by, Issue, project_contains_issue, } from './classes/index.js';
4
+ export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, deleteIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, trackIssueMethod, transitionIssueMethod, untrackIssueMethod, updateIssueMethod, } from './functions/index.js';
5
+ export { ContributeToIssue, ContributeToIssueOrReportedIssue, ManageIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseIssueTracking, TraverseProjectIssue, } from './policies/index.js';
@@ -1,7 +1,9 @@
1
1
  export { ContributeToIssue } from './contribute-to-issue.js';
2
2
  export { ContributeToIssueOrReportedIssue } from './contribute-to-issue-or-reported-issue.js';
3
+ export { ManageIssue } from './manage-issue.js';
3
4
  export { ReportedIssue } from './reported-issue.js';
4
5
  export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
5
6
  export { TraverseIssueParent } from './traverse-issue-parent.js';
6
7
  export { TraverseIssueReporter } from './traverse-issue-reporter.js';
8
+ export { TraverseIssueTracking } from './traverse-issue-tracking.js';
7
9
  export { TraverseProjectIssue } from './traverse-project-issue.js';
@@ -1,7 +1,9 @@
1
1
  export { ContributeToIssue } from './contribute-to-issue.js';
2
2
  export { ContributeToIssueOrReportedIssue } from './contribute-to-issue-or-reported-issue.js';
3
+ export { ManageIssue } from './manage-issue.js';
3
4
  export { ReportedIssue } from './reported-issue.js';
4
5
  export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
5
6
  export { TraverseIssueParent } from './traverse-issue-parent.js';
6
7
  export { TraverseIssueReporter } from './traverse-issue-reporter.js';
8
+ export { TraverseIssueTracking } from './traverse-issue-tracking.js';
7
9
  export { TraverseProjectIssue } from './traverse-project-issue.js';
@@ -0,0 +1 @@
1
+ export declare const ManageIssue: import("@astrale-os/sdk/schema").Policy;
@@ -0,0 +1,10 @@
1
+ import { policy } from '@astrale-os/sdk/schema';
2
+ import { Project, project_owned_by } from '../../project/index.js';
3
+ import { project_contains_issue } from '../classes/project-contains-issue.js';
4
+ export const ManageIssue = policy({
5
+ description: 'The caller owns the Project containing this Issue.',
6
+ match: ({ allOf, edge, exists, object, subject }) => exists(({ node }) => {
7
+ const project = node(() => Project);
8
+ return allOf(edge({ source: subject, class: () => project_owned_by, target: project }), edge({ source: project, class: () => project_contains_issue, target: object }));
9
+ }),
10
+ });
@@ -0,0 +1,2 @@
1
+ /** Flat rather than composed, as `ContributeToIssueOrReportedIssue`, to stay in the depth budget. */
2
+ export declare const TraverseIssueTracking: import("@astrale-os/sdk/schema").Policy;
@@ -0,0 +1,20 @@
1
+ import { policy } from '@astrale-os/sdk/schema';
2
+ import { Project, project_has_member, project_owned_by } from '../../project/index.js';
3
+ import { project_contains_issue } from '../classes/project-contains-issue.js';
4
+ /** Flat rather than composed, as `ContributeToIssueOrReportedIssue`, to stay in the depth budget. */
5
+ export const TraverseIssueTracking = policy({
6
+ description: 'A tracking relationship is visible to the owner and members of the Project of either Issue; never to a reporter alone.',
7
+ match: ({ anyOf, allOf, edge, exists, source, subject, target }) => {
8
+ const contributors = (issue) => [
9
+ exists(({ node }) => {
10
+ const project = node(() => Project);
11
+ return allOf(edge({ source: project, class: () => project_contains_issue, target: issue }), edge({ source: subject, class: () => project_owned_by, target: project }));
12
+ }),
13
+ exists(({ node }) => {
14
+ const project = node(() => Project);
15
+ return allOf(edge({ source: project, class: () => project_contains_issue, target: issue }), edge({ source: subject, class: () => project_has_member, target: project }));
16
+ }),
17
+ ];
18
+ return anyOf(...contributors(source), ...contributors(target));
19
+ },
20
+ });
@@ -2,17 +2,10 @@ import { type EventOf, type StateOf } from '@astrale-os/sdk/state';
2
2
  export declare const issueStatus: import("@astrale-os/sdk/schema").StateMachine<{
3
3
  readonly open: {
4
4
  readonly accept: "accepted";
5
- readonly defer: "deferred";
6
5
  readonly close: "closed";
7
6
  };
8
7
  readonly accepted: {
9
8
  readonly resolve: "resolved";
10
- readonly defer: "deferred";
11
- readonly close: "closed";
12
- };
13
- readonly deferred: {
14
- readonly reopen: "open";
15
- readonly accept: "accepted";
16
9
  readonly close: "closed";
17
10
  };
18
11
  readonly resolved: {
@@ -2,9 +2,8 @@ import { stateMachine } from '@astrale-os/sdk/state';
2
2
  export const issueStatus = stateMachine({
3
3
  initial: 'open',
4
4
  transitions: {
5
- open: { accept: 'accepted', defer: 'deferred', close: 'closed' },
6
- accepted: { resolve: 'resolved', defer: 'deferred', close: 'closed' },
7
- deferred: { reopen: 'open', accept: 'accepted', close: 'closed' },
5
+ open: { accept: 'accepted', close: 'closed' },
6
+ accepted: { resolve: 'resolved', close: 'closed' },
8
7
  resolved: { reopen: 'open', close: 'closed' },
9
8
  closed: { reopen: 'open' },
10
9
  },
@@ -10,7 +10,7 @@ export declare const issueValue: z.ZodObject<{
10
10
  reference: z.ZodString;
11
11
  title: z.ZodString;
12
12
  description: z.ZodString;
13
- status: z.ZodType<"accepted" | "closed" | "deferred" | "open" | "resolved", "accepted" | "closed" | "deferred" | "open" | "resolved", z.core.$ZodTypeInternals<"accepted" | "closed" | "deferred" | "open" | "resolved", "accepted" | "closed" | "deferred" | "open" | "resolved">>;
13
+ status: z.ZodType<"accepted" | "closed" | "open" | "resolved", "accepted" | "closed" | "open" | "resolved", z.core.$ZodTypeInternals<"accepted" | "closed" | "open" | "resolved", "accepted" | "closed" | "open" | "resolved">>;
14
14
  priority: z.ZodNumber;
15
15
  archived: z.ZodBoolean;
16
16
  }, z.core.$strict>;
@@ -69,7 +69,7 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
69
69
  reference: string;
70
70
  title: string;
71
71
  description: string;
72
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
72
+ status: "accepted" | "closed" | "open" | "resolved";
73
73
  priority: number;
74
74
  archived: boolean;
75
75
  };
@@ -9,7 +9,7 @@ export declare const createProjectIssueMethod: import("@astrale-os/sdk/schema").
9
9
  reference: string;
10
10
  title: string;
11
11
  description: string;
12
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
12
+ status: "accepted" | "closed" | "open" | "resolved";
13
13
  priority: number;
14
14
  archived: boolean;
15
15
  };
@@ -10,7 +10,7 @@ export declare const issue_tagged_with: import("@astrale-os/sdk/schema").Directe
10
10
  readonly abstract: false;
11
11
  readonly depth: 1;
12
12
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
13
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
13
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
14
14
  })[];
15
15
  readonly outgoing: "0..*";
16
16
  };
@@ -2,6 +2,7 @@ import type { schema as language } from '@astrale-os/sdk/schema';
2
2
  import { KernelSchema } from '@astrale-os/sdk/schema';
3
3
  export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"issues.astrale.ai", readonly ["kernel.astrale.ai", KernelSchema] | readonly ["issues.astrale.ai", {
4
4
  readonly name: "Issues";
5
+ readonly icon: import("@astrale-os/sdk/schema").DomainIcon;
5
6
  readonly entrypoint: "application";
6
7
  readonly classes: {
7
8
  readonly Project: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
@@ -74,7 +75,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
74
75
  reference: string;
75
76
  title: string;
76
77
  description: string;
77
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
78
+ status: "accepted" | "closed" | "open" | "resolved";
78
79
  priority: number;
79
80
  archived: boolean;
80
81
  };
@@ -160,17 +161,10 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
160
161
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
161
162
  readonly open: {
162
163
  readonly accept: "accepted";
163
- readonly defer: "deferred";
164
164
  readonly close: "closed";
165
165
  };
166
166
  readonly accepted: {
167
167
  readonly resolve: "resolved";
168
- readonly defer: "deferred";
169
- readonly close: "closed";
170
- };
171
- readonly deferred: {
172
- readonly reopen: "open";
173
- readonly accept: "accepted";
174
168
  readonly close: "closed";
175
169
  };
176
170
  readonly resolved: {
@@ -238,7 +232,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
238
232
  reference: string;
239
233
  title: string;
240
234
  description: string;
241
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
235
+ status: "accepted" | "closed" | "open" | "resolved";
242
236
  priority: number;
243
237
  archived: boolean;
244
238
  };
@@ -253,13 +247,13 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
253
247
  reference: string;
254
248
  title: string;
255
249
  description: string;
256
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
250
+ status: "accepted" | "closed" | "open" | "resolved";
257
251
  priority: number;
258
252
  archived: boolean;
259
253
  };
260
254
  }, "authorized", false, false, undefined, undefined>>;
261
255
  transition: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
262
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
256
+ event: "accept" | "close" | "reopen" | "resolve";
263
257
  }, {
264
258
  readonly mode: 'value';
265
259
  readonly value: {
@@ -269,15 +263,15 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
269
263
  reference: string;
270
264
  title: string;
271
265
  description: string;
272
- status: "accepted" | "closed" | "deferred" | "open" | "resolved";
266
+ status: "accepted" | "closed" | "open" | "resolved";
273
267
  priority: number;
274
268
  archived: boolean;
275
269
  };
276
270
  } | {
277
271
  kind: "rejected";
278
272
  code: "STATE_TRANSITION_ILLEGAL";
279
- from: "accepted" | "closed" | "deferred" | "open" | "resolved";
280
- event: "accept" | "close" | "defer" | "reopen" | "resolve";
273
+ from: "accepted" | "closed" | "open" | "resolved";
274
+ event: "accept" | "close" | "reopen" | "resolve";
281
275
  };
282
276
  }, "authorized", false, false, undefined, undefined>>;
283
277
  assign: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -307,6 +301,25 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
307
301
  parentId?: string | undefined;
308
302
  };
309
303
  }, "authorized", false, false, undefined, undefined>>;
304
+ track: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
305
+ issue: string;
306
+ }, {
307
+ readonly mode: 'value';
308
+ readonly value: {
309
+ trackingId: string;
310
+ trackedIds: string[];
311
+ status: "accepted" | "closed" | "open" | "resolved";
312
+ };
313
+ }, "authorized", false, false, undefined, undefined>>;
314
+ untrack: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
315
+ issue: string;
316
+ }, {
317
+ readonly mode: 'value';
318
+ readonly value: {
319
+ trackingId: string;
320
+ issueId: string;
321
+ };
322
+ }, "authorized", false, false, undefined, undefined>>;
310
323
  addComment: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
311
324
  body: string;
312
325
  }, {
@@ -323,6 +336,13 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
323
336
  archived: true;
324
337
  };
325
338
  }, "authorized", false, false, undefined, undefined>>;
339
+ delete: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
340
+ readonly mode: 'value';
341
+ readonly value: {
342
+ issueId: string;
343
+ deleted: true;
344
+ };
345
+ }, "authorized", false, false, undefined, undefined>>;
326
346
  };
327
347
  readonly policies: {
328
348
  read: () => import("@astrale-os/sdk/schema").Policy;
@@ -471,7 +491,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
471
491
  readonly abstract: false;
472
492
  readonly depth: 1;
473
493
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
474
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
494
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
475
495
  })[];
476
496
  readonly incoming: "1";
477
497
  };
@@ -497,7 +517,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
497
517
  readonly abstract: false;
498
518
  readonly depth: 1;
499
519
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
500
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
520
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
501
521
  })[];
502
522
  readonly incoming: "0..1";
503
523
  };
@@ -523,7 +543,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
523
543
  readonly abstract: false;
524
544
  readonly depth: 1;
525
545
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
526
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
546
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
527
547
  })[];
528
548
  readonly incoming: "0..1";
529
549
  };
@@ -542,7 +562,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
542
562
  readonly abstract: false;
543
563
  readonly depth: 1;
544
564
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
545
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
565
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
546
566
  })[];
547
567
  readonly outgoing: "0..1";
548
568
  };
@@ -553,7 +573,40 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
553
573
  readonly abstract: false;
554
574
  readonly depth: 1;
555
575
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
556
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
576
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
577
+ })[];
578
+ readonly incoming: "0..*";
579
+ };
580
+ readonly constraints: {
581
+ readonly noSelf: true;
582
+ readonly acyclic: true;
583
+ };
584
+ readonly effectiveProperties: never;
585
+ }>;
586
+ readonly issue_tracked_by: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
587
+ readonly depth: 0;
588
+ readonly abstract: false;
589
+ readonly extends: readonly [];
590
+ readonly properties: never;
591
+ readonly source: {
592
+ readonly as: "tracked";
593
+ readonly accepts: readonly (() => {
594
+ readonly kind: 'node';
595
+ readonly abstract: false;
596
+ readonly depth: 1;
597
+ readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
598
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
599
+ })[];
600
+ readonly outgoing: "0..1";
601
+ };
602
+ readonly target: {
603
+ readonly as: "tracking";
604
+ readonly accepts: readonly (() => {
605
+ readonly kind: 'node';
606
+ readonly abstract: false;
607
+ readonly depth: 1;
608
+ readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
609
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
557
610
  })[];
558
611
  readonly incoming: "0..*";
559
612
  };
@@ -575,7 +628,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
575
628
  readonly abstract: false;
576
629
  readonly depth: 1;
577
630
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
578
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
631
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
579
632
  })[];
580
633
  readonly outgoing: "0..*";
581
634
  };
@@ -661,7 +714,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
661
714
  readonly abstract: false;
662
715
  readonly depth: 1;
663
716
  readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
664
- readonly methods: "addComment" | "archive" | "assign" | "edit" | "setParent" | "setTags" | "transition" | "update";
717
+ readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
665
718
  })[];
666
719
  readonly outgoing: "0..*";
667
720
  };
@@ -686,6 +739,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
686
739
  readonly ContributeToIssue: import("@astrale-os/sdk/schema").Policy;
687
740
  readonly ReportedIssue: import("@astrale-os/sdk/schema").Policy;
688
741
  readonly ContributeToIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
742
+ readonly ManageIssue: import("@astrale-os/sdk/schema").Policy;
689
743
  readonly ContributeToTag: import("@astrale-os/sdk/schema").Policy;
690
744
  readonly ManageTag: import("@astrale-os/sdk/schema").Policy;
691
745
  readonly ContributeToCommentOrReportedIssueOfComment: import("@astrale-os/sdk/schema").Policy;
@@ -697,6 +751,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
697
751
  readonly TraverseIssueReporter: import("@astrale-os/sdk/schema").Policy;
698
752
  readonly TraverseIssueAssignee: import("@astrale-os/sdk/schema").Policy;
699
753
  readonly TraverseIssueParent: import("@astrale-os/sdk/schema").Policy;
754
+ readonly TraverseIssueTracking: import("@astrale-os/sdk/schema").Policy;
700
755
  readonly TraverseIssueComment: import("@astrale-os/sdk/schema").Policy;
701
756
  readonly TraverseIssueTag: import("@astrale-os/sdk/schema").Policy;
702
757
  readonly TraverseCommentRelationship: import("@astrale-os/sdk/schema").Policy;
@@ -1,6 +1,6 @@
1
- import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
1
+ import { KernelSchema, defineSchema, domainIcon, view } from '@astrale-os/sdk/schema';
2
2
  import { Comment, comment_authored_by, issue_has_comment, ContributeToCommentOrReportedIssueOfComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './modules/comment/index.js';
3
- import { Issue, ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
3
+ import { Issue, ContributeToIssue, ContributeToIssueOrReportedIssue, ManageIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseIssueTracking, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, issue_tracked_by, project_contains_issue, } from './modules/issue/index.js';
4
4
  import { Project, ContributeToProject, ManageProject, TraverseProjectMember, TraverseProjectOwner, project_has_member, project_owned_by, } from './modules/project/index.js';
5
5
  import { Tag, ContributeToTag, ManageTag, TraverseIssueTag, TraverseProjectTag, issue_tagged_with, project_contains_tag, } from './modules/tag/index.js';
6
6
  const origin = 'issues.astrale.ai';
@@ -15,6 +15,7 @@ const classes = {
15
15
  issue_reported_by,
16
16
  issue_assigned_to,
17
17
  issue_subtask_of,
18
+ issue_tracked_by,
18
19
  issue_has_comment,
19
20
  comment_authored_by,
20
21
  project_contains_tag,
@@ -26,6 +27,7 @@ const policies = {
26
27
  ContributeToIssue,
27
28
  ReportedIssue,
28
29
  ContributeToIssueOrReportedIssue,
30
+ ManageIssue,
29
31
  ContributeToTag,
30
32
  ManageTag,
31
33
  ContributeToCommentOrReportedIssueOfComment,
@@ -37,6 +39,7 @@ const policies = {
37
39
  TraverseIssueReporter,
38
40
  TraverseIssueAssignee,
39
41
  TraverseIssueParent,
42
+ TraverseIssueTracking,
40
43
  TraverseIssueComment,
41
44
  TraverseIssueTag,
42
45
  TraverseCommentRelationship,
@@ -44,6 +47,15 @@ const policies = {
44
47
  const views = { application: view({}) };
45
48
  export const schema = defineSchema(origin, {
46
49
  name: 'Issues',
50
+ /**
51
+ * The application icon ("Cascade"), drawn per size: small 24, medium 64 and large 512 viewBox.
52
+ * Shell clips its corners, so each square fills edge to edge.
53
+ */
54
+ icon: domainIcon({
55
+ small: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs></defs><g data-layer="background"><rect width="24" height="24" fill="#2A2D33"/></g><g data-layer="foreground"><rect x="4" y="4" width="10" height="4" rx="2" fill="#FFFFFF"/><rect x="7" y="10" width="10" height="4" rx="2" fill="#FFFFFF"/><rect x="10" y="16" width="10" height="4" rx="2" fill="#FFFFFF"/></g></svg>`,
56
+ medium: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><defs><linearGradient id="is4M-bg" x1="0" y1="0" x2="0" y2="64" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4B4F58"/><stop offset="1" stop-color="#1B1D22"/></linearGradient><radialGradient id="is4M-gl" cx="32" cy="-11.52" r="60.8" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FFFFFF" stop-opacity="0.12"/><stop offset="1" stop-color="#FFFFFF" stop-opacity="0"/></radialGradient><linearGradient id="is4M-sy" x1="0" y1="15.75" x2="0" y2="47.75" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FFFFFF"/><stop offset="1" stop-color="#E2E5EA"/></linearGradient><filter id="is4M-sh" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="1.5"/></filter></defs><g data-layer="background"><rect width="64" height="64" fill="url(#is4M-bg)"/><rect width="64" height="64" fill="url(#is4M-gl)"/></g><g data-layer="foreground"><g filter="url(#is4M-sh)" opacity="0.5" transform="translate(0 1.75)" fill="#000000"><rect x="11" y="15.75" width="26" height="8" rx="4"/><rect x="19" y="27.75" width="26" height="8" rx="4"/><rect x="27" y="39.75" width="26" height="8" rx="4"/></g><rect x="11" y="15.75" width="26" height="8" rx="4" fill="url(#is4M-sy)"/><rect x="19" y="27.75" width="26" height="8" rx="4" fill="url(#is4M-sy)"/><rect x="27" y="39.75" width="26" height="8" rx="4" fill="url(#is4M-sy)"/></g></svg>`,
57
+ large: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="is4L-bg" x1="0" y1="0" x2="0" y2="512" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4B4F58"/><stop offset="1" stop-color="#1B1D22"/></linearGradient><radialGradient id="is4L-gl" cx="256" cy="-92.16" r="486.4" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FFFFFF" stop-opacity="0.12"/><stop offset="1" stop-color="#FFFFFF" stop-opacity="0"/></radialGradient><linearGradient id="is4L-sy" x1="0" y1="126" x2="0" y2="382" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FFFFFF"/><stop offset="1" stop-color="#E2E5EA"/></linearGradient><filter id="is4L-sh" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="11"/></filter></defs><g data-layer="background"><rect width="512" height="512" fill="url(#is4L-bg)"/><rect width="512" height="512" fill="url(#is4L-gl)"/></g><g data-layer="foreground"><g filter="url(#is4L-sh)" opacity="0.5" transform="translate(0 12)" fill="#000000"><rect x="88" y="126" width="208" height="64" rx="32"/><rect x="152" y="222" width="208" height="64" rx="32"/><rect x="216" y="318" width="208" height="64" rx="32"/></g><rect x="88" y="126" width="208" height="64" rx="32" fill="url(#is4L-sy)"/><rect x="152" y="222" width="208" height="64" rx="32" fill="url(#is4L-sy)"/><rect x="216" y="318" width="208" height="64" rx="32" fill="url(#is4L-sy)"/></g></svg>`,
58
+ }),
47
59
  entrypoint: 'application',
48
60
  dependencies: { kernel: KernelSchema },
49
61
  classes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",
@@ -31,12 +31,13 @@
31
31
  "zod": "4.6.7"
32
32
  },
33
33
  "devDependencies": {
34
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.212",
34
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.217",
35
35
  "@astrale-os/ox": ">=0.1.4 <1.0.0",
36
- "@astrale-os/sdk": "0.6.0-beta.57",
36
+ "@astrale-os/sdk": "0.6.0-beta.62",
37
37
  "@astrale-os/shell": "0.7.0-beta.12",
38
38
  "@astrale-os/shell-react": "0.6.0-beta.11",
39
39
  "@astrale-os/ui": "1.0.0-beta.43",
40
+ "@fontsource-variable/geist": "5.3.0",
40
41
  "@tailwindcss/vite": "^4.3.3",
41
42
  "@tanstack/react-router": "1.170.18",
42
43
  "@tanstack/router-plugin": "1.168.23",
@@ -55,6 +56,8 @@
55
56
  "react": "^19.2.8",
56
57
  "react-dom": "^19.2.8",
57
58
  "react-markdown": "^10.1.0",
59
+ "rehype-raw": "^7.0.0",
60
+ "rehype-sanitize": "^6.0.0",
58
61
  "remark-gfm": "^4.0.1",
59
62
  "tailwindcss": "^4.3.3",
60
63
  "type-fest": "^5.8.0",
@@ -63,7 +66,7 @@
63
66
  "vitest": "^5.0.5"
64
67
  },
65
68
  "peerDependencies": {
66
- "@astrale-os/sdk": ">=0.6.0-beta.55 <1.0.0"
69
+ "@astrale-os/sdk": ">=0.6.0-beta.62 <1.0.0"
67
70
  },
68
71
  "engines": {
69
72
  "node": ">=24"