@astrale-domains/issues 0.1.3 → 0.1.4

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 (185) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +13 -19
  3. package/dist/schema/.runtime/states/issue/index.d.ts +4 -7
  4. package/dist/schema/.runtime/states/issue/index.js +2 -2
  5. package/dist/schema/index.d.ts +4 -4
  6. package/dist/schema/index.js +4 -4
  7. package/dist/schema/{comment/relationships.d.ts → modules/comment/classes/comment-authored-by.d.ts} +0 -16
  8. package/dist/schema/modules/comment/classes/comment-authored-by.js +9 -0
  9. package/dist/schema/{comment/class.d.ts → modules/comment/classes/comment.d.ts} +1 -1
  10. package/dist/schema/{comment/class.js → modules/comment/classes/comment.js} +5 -4
  11. package/dist/schema/modules/comment/classes/index.d.ts +3 -0
  12. package/dist/schema/modules/comment/classes/index.js +3 -0
  13. package/dist/schema/modules/comment/classes/issue-has-comment.d.ts +16 -0
  14. package/dist/schema/modules/comment/classes/issue-has-comment.js +10 -0
  15. package/dist/schema/modules/comment/functions/delete-comment.d.ts +7 -0
  16. package/dist/schema/modules/comment/functions/delete-comment.js +11 -0
  17. package/dist/schema/modules/comment/functions/edit-comment.d.ts +9 -0
  18. package/dist/schema/modules/comment/functions/edit-comment.js +11 -0
  19. package/dist/schema/modules/comment/functions/index.d.ts +2 -0
  20. package/dist/schema/modules/comment/functions/index.js +2 -0
  21. package/dist/schema/modules/comment/index.d.ts +4 -0
  22. package/dist/schema/modules/comment/index.js +4 -0
  23. package/dist/schema/{comment/contribute-to-comment-policy.js → modules/comment/policies/contribute-to-comment.js} +3 -3
  24. package/dist/schema/{comment/edit-own-comment-policy.js → modules/comment/policies/edit-own-comment.js} +1 -1
  25. package/dist/schema/modules/comment/policies/index.d.ts +4 -0
  26. package/dist/schema/modules/comment/policies/index.js +4 -0
  27. package/dist/schema/{comment/traverse-comment-relationship-policy.d.ts → modules/comment/policies/traverse-comment-relationship.d.ts} +0 -1
  28. package/dist/schema/{comment/traverse-comment-relationship-policy.js → modules/comment/policies/traverse-comment-relationship.js} +4 -4
  29. package/dist/schema/modules/comment/policies/traverse-issue-comment.d.ts +1 -0
  30. package/dist/schema/modules/comment/policies/traverse-issue-comment.js +14 -0
  31. package/dist/schema/modules/comment/types/comment.d.ts +5 -0
  32. package/dist/schema/modules/comment/types/comment.js +6 -0
  33. package/dist/schema/modules/comment/types/index.d.ts +1 -0
  34. package/dist/schema/modules/comment/types/index.js +1 -0
  35. package/dist/schema/modules/issue/classes/index.d.ts +5 -0
  36. package/dist/schema/modules/issue/classes/index.js +5 -0
  37. package/dist/schema/modules/issue/classes/issue-assigned-to.d.ts +16 -0
  38. package/dist/schema/modules/issue/classes/issue-assigned-to.js +9 -0
  39. package/dist/schema/modules/issue/classes/issue-reported-by.d.ts +16 -0
  40. package/dist/schema/modules/issue/classes/issue-reported-by.js +9 -0
  41. package/dist/schema/modules/issue/classes/issue-subtask-of.d.ts +19 -0
  42. package/dist/schema/modules/issue/classes/issue-subtask-of.js +10 -0
  43. package/dist/schema/{issue/class.d.ts → modules/issue/classes/issue.d.ts} +28 -3
  44. package/dist/schema/modules/issue/classes/issue.js +35 -0
  45. package/dist/schema/modules/issue/classes/project-contains-issue.d.ts +16 -0
  46. package/dist/schema/modules/issue/classes/project-contains-issue.js +10 -0
  47. package/dist/schema/modules/issue/functions/add-issue-comment.d.ts +9 -0
  48. package/dist/schema/modules/issue/functions/add-issue-comment.js +11 -0
  49. package/dist/schema/modules/issue/functions/archive-issue.d.ts +7 -0
  50. package/dist/schema/modules/issue/functions/archive-issue.js +11 -0
  51. package/dist/schema/modules/issue/functions/assign-issue.d.ts +9 -0
  52. package/dist/schema/modules/issue/functions/assign-issue.js +11 -0
  53. package/dist/schema/modules/issue/functions/index.d.ts +7 -0
  54. package/dist/schema/modules/issue/functions/index.js +7 -0
  55. package/dist/schema/modules/issue/functions/set-issue-parent.d.ts +9 -0
  56. package/dist/schema/modules/issue/functions/set-issue-parent.js +11 -0
  57. package/dist/schema/modules/issue/functions/set-issue-tags.d.ts +9 -0
  58. package/dist/schema/modules/issue/functions/set-issue-tags.js +11 -0
  59. package/dist/schema/modules/issue/functions/transition-issue.d.ts +22 -0
  60. package/dist/schema/modules/issue/functions/transition-issue.js +20 -0
  61. package/dist/schema/modules/issue/functions/update-issue.d.ts +16 -0
  62. package/dist/schema/modules/issue/functions/update-issue.js +15 -0
  63. package/dist/schema/modules/issue/index.d.ts +4 -0
  64. package/dist/schema/modules/issue/index.js +4 -0
  65. package/dist/schema/{issue/contribute-to-issue-policy.js → modules/issue/policies/contribute-to-issue.js} +2 -2
  66. package/dist/schema/modules/issue/policies/index.d.ts +5 -0
  67. package/dist/schema/modules/issue/policies/index.js +5 -0
  68. package/dist/schema/modules/issue/policies/traverse-issue-assignee.d.ts +1 -0
  69. package/dist/schema/modules/issue/policies/traverse-issue-assignee.js +14 -0
  70. package/dist/schema/modules/issue/policies/traverse-issue-parent.d.ts +1 -0
  71. package/dist/schema/modules/issue/policies/traverse-issue-parent.js +14 -0
  72. package/dist/schema/modules/issue/policies/traverse-issue-reporter.d.ts +1 -0
  73. package/dist/schema/modules/issue/policies/traverse-issue-reporter.js +14 -0
  74. package/dist/schema/modules/issue/policies/traverse-project-issue.d.ts +1 -0
  75. package/dist/schema/modules/issue/policies/traverse-project-issue.js +7 -0
  76. package/dist/schema/modules/issue/types/index.d.ts +1 -0
  77. package/dist/schema/modules/issue/types/index.js +1 -0
  78. package/dist/schema/modules/issue/types/issue.d.ts +10 -0
  79. package/dist/schema/modules/issue/types/issue.js +12 -0
  80. package/dist/schema/modules/project/classes/index.d.ts +3 -0
  81. package/dist/schema/modules/project/classes/index.js +3 -0
  82. package/dist/schema/{project/relationships.d.ts → modules/project/classes/project-has-member.d.ts} +0 -16
  83. package/dist/schema/modules/project/classes/project-has-member.js +9 -0
  84. package/dist/schema/modules/project/classes/project-owned-by.d.ts +16 -0
  85. package/dist/schema/modules/project/classes/project-owned-by.js +9 -0
  86. package/dist/schema/{project/class.d.ts → modules/project/classes/project.d.ts} +60 -11
  87. package/dist/schema/modules/project/classes/project.js +35 -0
  88. package/dist/schema/modules/project/functions/add-project-member.d.ts +10 -0
  89. package/dist/schema/modules/project/functions/add-project-member.js +12 -0
  90. package/dist/schema/modules/project/functions/archive-project.d.ts +7 -0
  91. package/dist/schema/modules/project/functions/archive-project.js +11 -0
  92. package/dist/schema/modules/project/functions/create-project-issue.d.ts +16 -0
  93. package/dist/schema/modules/project/functions/create-project-issue.js +15 -0
  94. package/dist/schema/modules/project/functions/create-project-tag.d.ts +12 -0
  95. package/dist/schema/modules/project/functions/create-project-tag.js +14 -0
  96. package/dist/schema/modules/project/functions/create-project.d.ts +14 -0
  97. package/dist/schema/modules/project/functions/create-project.js +14 -0
  98. package/dist/schema/modules/project/functions/index.d.ts +8 -0
  99. package/dist/schema/modules/project/functions/index.js +8 -0
  100. package/dist/schema/modules/project/functions/list-projects.d.ts +25 -0
  101. package/dist/schema/modules/project/functions/list-projects.js +16 -0
  102. package/dist/schema/modules/project/functions/remove-project-member.d.ts +10 -0
  103. package/dist/schema/modules/project/functions/remove-project-member.js +12 -0
  104. package/dist/schema/modules/project/functions/update-project.d.ts +13 -0
  105. package/dist/schema/modules/project/functions/update-project.js +14 -0
  106. package/dist/schema/modules/project/index.d.ts +4 -0
  107. package/dist/schema/modules/project/index.js +4 -0
  108. package/dist/schema/{project/contribute-to-project-policy.js → modules/project/policies/contribute-to-project.js} +2 -1
  109. package/dist/schema/modules/project/policies/index.d.ts +4 -0
  110. package/dist/schema/modules/project/policies/index.js +4 -0
  111. package/dist/schema/{project/manage-project-policy.js → modules/project/policies/manage-project.js} +1 -1
  112. package/dist/schema/modules/project/policies/traverse-project-member.d.ts +1 -0
  113. package/dist/schema/modules/project/policies/traverse-project-member.js +7 -0
  114. package/dist/schema/modules/project/policies/traverse-project-owner.d.ts +1 -0
  115. package/dist/schema/modules/project/policies/traverse-project-owner.js +7 -0
  116. package/dist/schema/modules/project/types/index.d.ts +2 -0
  117. package/dist/schema/modules/project/types/index.js +2 -0
  118. package/dist/schema/modules/project/types/membership-change.d.ts +6 -0
  119. package/dist/schema/modules/project/types/membership-change.js +7 -0
  120. package/dist/schema/modules/project/types/project.d.ts +8 -0
  121. package/dist/schema/modules/project/types/project.js +9 -0
  122. package/dist/schema/modules/tag/classes/index.d.ts +3 -0
  123. package/dist/schema/modules/tag/classes/index.js +3 -0
  124. package/dist/schema/modules/tag/classes/issue-tagged-with.d.ts +16 -0
  125. package/dist/schema/modules/tag/classes/issue-tagged-with.js +10 -0
  126. package/dist/schema/{tag/relationships.d.ts → modules/tag/classes/project-contains-tag.d.ts} +0 -16
  127. package/dist/schema/modules/tag/classes/project-contains-tag.js +10 -0
  128. package/dist/schema/{tag/class.d.ts → modules/tag/classes/tag.d.ts} +1 -1
  129. package/dist/schema/{tag/class.js → modules/tag/classes/tag.js} +3 -2
  130. package/dist/schema/modules/tag/functions/delete-tag.d.ts +7 -0
  131. package/dist/schema/modules/tag/functions/delete-tag.js +11 -0
  132. package/dist/schema/modules/tag/functions/edit-tag.d.ts +12 -0
  133. package/dist/schema/modules/tag/functions/edit-tag.js +14 -0
  134. package/dist/schema/modules/tag/functions/index.d.ts +2 -0
  135. package/dist/schema/modules/tag/functions/index.js +2 -0
  136. package/dist/schema/modules/tag/index.d.ts +4 -0
  137. package/dist/schema/modules/tag/index.js +4 -0
  138. package/dist/schema/{tag/contribute-to-tag-policy.js → modules/tag/policies/contribute-to-tag.js} +2 -2
  139. package/dist/schema/modules/tag/policies/index.d.ts +4 -0
  140. package/dist/schema/modules/tag/policies/index.js +4 -0
  141. package/dist/schema/{tag/manage-tag-policy.js → modules/tag/policies/manage-tag.js} +2 -2
  142. package/dist/schema/modules/tag/policies/traverse-issue-tag.d.ts +1 -0
  143. package/dist/schema/modules/tag/policies/traverse-issue-tag.js +14 -0
  144. package/dist/schema/modules/tag/policies/traverse-project-tag.d.ts +1 -0
  145. package/dist/schema/modules/tag/policies/traverse-project-tag.js +7 -0
  146. package/dist/schema/modules/tag/types/index.d.ts +1 -0
  147. package/dist/schema/modules/tag/types/index.js +1 -0
  148. package/dist/schema/modules/tag/types/tag.d.ts +7 -0
  149. package/dist/schema/modules/tag/types/tag.js +8 -0
  150. package/dist/schema/schema.d.ts +732 -650
  151. package/dist/schema/schema.js +47 -42
  152. package/dist/schema/types/index.js +1 -0
  153. package/dist/schema/types/node-id.js +2 -0
  154. package/package.json +24 -26
  155. package/dist/schema/comment/index.d.ts +0 -5
  156. package/dist/schema/comment/index.js +0 -5
  157. package/dist/schema/comment/methods.js +0 -18
  158. package/dist/schema/comment/relationships.js +0 -16
  159. package/dist/schema/issue/class.js +0 -29
  160. package/dist/schema/issue/index.d.ts +0 -4
  161. package/dist/schema/issue/index.js +0 -4
  162. package/dist/schema/issue/methods.js +0 -66
  163. package/dist/schema/issue/relationships.d.ts +0 -67
  164. package/dist/schema/issue/relationships.js +0 -29
  165. package/dist/schema/issue/traverse-issue-relationship-policy.d.ts +0 -5
  166. package/dist/schema/issue/traverse-issue-relationship-policy.js +0 -55
  167. package/dist/schema/project/class.js +0 -27
  168. package/dist/schema/project/index.d.ts +0 -5
  169. package/dist/schema/project/index.js +0 -5
  170. package/dist/schema/project/methods.js +0 -68
  171. package/dist/schema/project/relationships.js +0 -15
  172. package/dist/schema/project/traverse-project-relationship-policy.d.ts +0 -4
  173. package/dist/schema/project/traverse-project-relationship-policy.js +0 -20
  174. package/dist/schema/tag/index.d.ts +0 -4
  175. package/dist/schema/tag/index.js +0 -4
  176. package/dist/schema/tag/methods.js +0 -21
  177. package/dist/schema/tag/relationships.js +0 -16
  178. package/dist/schema/value/index.js +0 -34
  179. /package/dist/schema/{comment/contribute-to-comment-policy.d.ts → modules/comment/policies/contribute-to-comment.d.ts} +0 -0
  180. /package/dist/schema/{comment/edit-own-comment-policy.d.ts → modules/comment/policies/edit-own-comment.d.ts} +0 -0
  181. /package/dist/schema/{issue/contribute-to-issue-policy.d.ts → modules/issue/policies/contribute-to-issue.d.ts} +0 -0
  182. /package/dist/schema/{project/contribute-to-project-policy.d.ts → modules/project/policies/contribute-to-project.d.ts} +0 -0
  183. /package/dist/schema/{project/manage-project-policy.d.ts → modules/project/policies/manage-project.d.ts} +0 -0
  184. /package/dist/schema/{tag/contribute-to-tag-policy.d.ts → modules/tag/policies/contribute-to-tag.d.ts} +0 -0
  185. /package/dist/schema/{tag/manage-tag-policy.d.ts → modules/tag/policies/manage-tag.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.4](https://github.com/astrale-os/domains/compare/issues-v0.1.3...issues-v0.1.4) (2026-08-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * **domains:** remove Property visibility annotations from V1 schemas ([#118](https://github.com/astrale-os/domains/issues/118)) ([215e5e0](https://github.com/astrale-os/domains/commit/215e5e0ca3b849cb56fcccc685d4e3fc51cc41f5))
9
+ * **issues:** restore native reporting continuity ([#119](https://github.com/astrale-os/domains/issues/119)) ([4c0738d](https://github.com/astrale-os/domains/commit/4c0738d05fb5b1281b1d480376960fd494b98840))
10
+ * **states:** adopt intrinsic property transitions ([#108](https://github.com/astrale-os/domains/issues/108)) ([0d137c2](https://github.com/astrale-os/domains/commit/0d137c2832e8f9b732b337086ccb17ad0c49bb4e))
11
+
3
12
  ## [0.1.3](https://github.com/astrale-os/domains/compare/issues-v0.1.2...issues-v0.1.3) (2026-08-27)
4
13
 
5
14
 
package/README.md CHANGED
@@ -22,10 +22,11 @@ Tag
22
22
  name; Project-local slug; optional color; belongs to one Project
23
23
  ```
24
24
 
25
- The public mutation surface is receiver-owned:
25
+ The public callable surface keeps observation Project-owned and mutations receiver-owned:
26
26
 
27
27
  ```text
28
28
  Project.create
29
+ Project.list
29
30
  Project.update | addMember | removeMember | createIssue | createTag | archive
30
31
  Issue.update | assign | setTags | setParent | addComment | archive
31
32
  Comment.edit | delete
@@ -37,20 +38,23 @@ execution ceiling after its containment and Node removals. Larger Tags must firs
37
38
  enough Issues through `Issue.setTags`; the Workflow rejects them explicitly instead of submitting an
38
39
  oversized Mutation with a backend-dependent failure.
39
40
 
40
- `Project.create` requires authentication. Receiver Methods use Schema-owned Policies: Project owners
41
- administer metadata, membership, Tags, and archival; owners and members contribute to Issues; only a
42
- Comment author edits or deletes it. Reads are visible only through a Project the caller owns or has
43
- joined.
41
+ `Project.create` and `Project.list` require authentication. `Project.list` returns only Projects the
42
+ caller owns or has joined, with their visible Issues and Comment threads nested for one CLI/agent
43
+ observation. Receiver Methods use Schema-owned Policies: Project owners administer metadata,
44
+ membership, Tags, and archival; owners and members contribute to Issues; only a Comment author edits
45
+ or deletes it. Reads are visible only through a Project the caller owns or has joined.
44
46
 
45
47
  Ownership, membership, reporting, assignment, and authorship remain graph-native Policy facts. The
46
48
  owning Project, Issue, or Comment also stores the corresponding Identity IDs privately, updated in
47
- the same atomic Mutation as each edge. Recipes and Workflows can therefore validate current collaboration state
48
- without requesting authority over every possible concrete Identity subtype from another Domain.
49
+ the same atomic Mutation as each edge. Recipes and Workflows can therefore validate current
50
+ collaboration state without requesting authority over every possible concrete Identity subtype from
51
+ another Domain.
49
52
  Those private execution fields are not a second public model and never replace the Policy edges.
50
53
 
51
54
  There is no Domain `Command`, receipt, universal idempotency layer, activity log, or undo system.
52
- `Project.create` is one Action; the sixteen multi-step receiver operations are explicit Workflows
53
- whose Query and Mutation effects use stable steps. Set-style changes converge naturally and stale
55
+ `Project.create` and `Project.list` are Actions; the seventeen multi-step receiver operations are
56
+ explicit Workflows whose Query and Mutation effects use stable steps. Set-style changes converge
57
+ naturally and stale
54
58
  concurrent writes reject through atomic Mutation preconditions. Creation retries have no Domain
55
59
  replay guarantee; generic invocation idempotency belongs to the platform when it exists.
56
60
 
@@ -63,16 +67,6 @@ shortcuts whenever the user is not typing. The selected Issue description and it
63
67
  inbox as one continuous Markdown conversation with strict Mermaid diagrams. Project, Issue, and Tag
64
68
  creation and Project membership administration intentionally remain API-first.
65
69
 
66
- ## Breaking migration
67
-
68
- `Tracker` to `Project`, the status revision (`in_progress` to `accepted`, `canceled` to `closed`, and
69
- the new `deferred` outcome), receiver Methods, and Command removal are one
70
- deliberate breaking revision. A reinstall does not migrate installed graph keys. Use the private
71
- [legacy snapshot/import workflow](https://github.com/astrale-os/domains/tree/main/issues/scripts/legacy-issues-import)
72
- before production cutover. It retains excluded source data for audit, deprovisions the exact
73
- digest-confirmed legacy graph before uninstall, and replays owner-authored legacy aggregates through
74
- the supported public Project receiver API while writing step-level old-to-new Node ID checkpoints.
75
-
76
70
  ## Development
77
71
 
78
72
  Dependency changes must refresh both `issues/pnpm-lock.yaml` and the workspace-root `pnpm-lock.yaml`;
@@ -1,5 +1,5 @@
1
- import { type EventOf, type StateOf, type TransitionDecision } from '@astrale-os/sdk/state';
2
- export declare const issueLifecycle: import("@astrale-os/sdk/state").StateMachine<{
1
+ import { type EventOf, type StateOf } from '@astrale-os/sdk/state';
2
+ export declare const issueStatus: import("@astrale-os/sdk/state").StateMachine<{
3
3
  readonly open: {
4
4
  readonly accept: "accepted";
5
5
  readonly defer: "deferred";
@@ -23,8 +23,5 @@ export declare const issueLifecycle: import("@astrale-os/sdk/state").StateMachin
23
23
  readonly reopen: "open";
24
24
  };
25
25
  }, "open">;
26
- export type IssueStatus = StateOf<typeof issueLifecycle>;
27
- export type IssueEvent = EventOf<typeof issueLifecycle>;
28
- export type AllowedIssueTransition = Extract<TransitionDecision<typeof issueLifecycle, IssueStatus, IssueEvent>, {
29
- readonly kind: 'allowed';
30
- }>;
26
+ export type IssueStatus = StateOf<typeof issueStatus>;
27
+ export type IssueEvent = EventOf<typeof issueStatus>;
@@ -1,5 +1,5 @@
1
- import { stateMachine, } from '@astrale-os/sdk/state';
2
- export const issueLifecycle = stateMachine({
1
+ import { stateMachine } from '@astrale-os/sdk/state';
2
+ export const issueStatus = stateMachine({
3
3
  initial: 'open',
4
4
  transitions: {
5
5
  open: { accept: 'accepted', defer: 'deferred', close: 'closed' },
@@ -1,6 +1,6 @@
1
1
  export { schema } from './schema.js';
2
2
  export type { IssuesDomain, IssuesSchema } from './schema.js';
3
- export { Comment, comment_authored_by, issue_has_comment } from './comment/index.js';
4
- export { Issue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './issue/index.js';
5
- export { Project, project_has_member, project_owned_by } from './project/index.js';
6
- export { Tag, issue_tagged_with, project_contains_tag } from './tag/index.js';
3
+ export { Project, project_has_member, project_owned_by } from './modules/project/index.js';
4
+ export { Issue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
5
+ export { Comment, comment_authored_by, issue_has_comment } from './modules/comment/index.js';
6
+ export { Tag, issue_tagged_with, project_contains_tag } from './modules/tag/index.js';
@@ -1,5 +1,5 @@
1
1
  export { schema } from './schema.js';
2
- export { Comment, comment_authored_by, issue_has_comment } from './comment/index.js';
3
- export { Issue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './issue/index.js';
4
- export { Project, project_has_member, project_owned_by } from './project/index.js';
5
- export { Tag, issue_tagged_with, project_contains_tag } from './tag/index.js';
2
+ export { Project, project_has_member, project_owned_by } from './modules/project/index.js';
3
+ export { Issue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
4
+ export { Comment, comment_authored_by, issue_has_comment } from './modules/comment/index.js';
5
+ export { Tag, issue_tagged_with, project_contains_tag } from './modules/tag/index.js';
@@ -1,19 +1,3 @@
1
- export declare const issue_has_comment: 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: "issue";
8
- readonly outgoing: "0..*";
9
- };
10
- readonly target: {
11
- readonly as: "comment";
12
- readonly incoming: "1";
13
- };
14
- readonly constraints: Record<never, never>;
15
- readonly effectiveProperties: never;
16
- }>;
17
1
  export declare const comment_authored_by: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
18
2
  readonly depth: 0;
19
3
  readonly abstract: false;
@@ -0,0 +1,9 @@
1
+ import { K, edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseCommentRelationship } from '../policies/traverse-comment-relationship.js';
3
+ import { Comment } from './comment.js';
4
+ export const comment_authored_by = edgeClass.directed({
5
+ description: 'The immutable author of one Comment.',
6
+ source: { as: 'author', accepts: [K.classes.Identity], outgoing: '0..*' },
7
+ target: { as: 'comment', accepts: [() => Comment], incoming: '1' },
8
+ policies: { traverse: () => TraverseCommentRelationship },
9
+ });
@@ -63,4 +63,4 @@ export declare const Comment: import("@astrale-os/sdk/schema").NodeClass<{
63
63
  };
64
64
  }, "authorized", false, "default">>, "edit", "self">;
65
65
  readonly effectiveStaticMethods: never;
66
- }>;
66
+ }> & import("@astrale-os/sdk/schema").StateClass<Readonly<Omit<Readonly<Record<never, never>>, never> & {}>>;
@@ -1,15 +1,16 @@
1
1
  import { K, nodeClass, property } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
- import { nodeIdValue } from '../value/index.js';
4
- import { ContributeToComment } from './contribute-to-comment-policy.js';
5
- import { deleteCommentMethod, editCommentMethod } from './methods.js';
3
+ import { nodeIdValue } from '../../../types/index.js';
4
+ import { deleteCommentMethod } from '../functions/delete-comment.js';
5
+ import { editCommentMethod } from '../functions/edit-comment.js';
6
+ import { ContributeToComment } from '../policies/contribute-to-comment.js';
6
7
  export const Comment = nodeClass({
7
8
  description: 'One authored discussion entry attached to an Issue.',
8
9
  icon: 'message-square',
9
10
  extends: [K.classes.Timestamped],
10
11
  properties: {
11
12
  body: z.string().min(1).max(50_000),
12
- authorId: property(nodeIdValue, { visibility: 'private' }),
13
+ authorId: property(nodeIdValue, {}),
13
14
  },
14
15
  methods: { edit: editCommentMethod, delete: deleteCommentMethod },
15
16
  policies: { read: () => ContributeToComment },
@@ -0,0 +1,3 @@
1
+ export { comment_authored_by } from './comment-authored-by.js';
2
+ export { Comment } from './comment.js';
3
+ export { issue_has_comment } from './issue-has-comment.js';
@@ -0,0 +1,3 @@
1
+ export { comment_authored_by } from './comment-authored-by.js';
2
+ export { Comment } from './comment.js';
3
+ export { issue_has_comment } from './issue-has-comment.js';
@@ -0,0 +1,16 @@
1
+ export declare const issue_has_comment: 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: "issue";
8
+ readonly outgoing: "0..*";
9
+ };
10
+ readonly target: {
11
+ readonly as: "comment";
12
+ readonly incoming: "1";
13
+ };
14
+ readonly constraints: Record<never, never>;
15
+ readonly effectiveProperties: never;
16
+ }>;
@@ -0,0 +1,10 @@
1
+ import { edgeClass } from '@astrale-os/sdk/schema';
2
+ import { Issue } from '../../issue/index.js';
3
+ import { TraverseIssueComment } from '../policies/traverse-issue-comment.js';
4
+ import { Comment } from './comment.js';
5
+ export const issue_has_comment = edgeClass.directed({
6
+ description: 'One Issue contains one Comment.',
7
+ source: { as: 'issue', accepts: [() => Issue], outgoing: '0..*' },
8
+ target: { as: 'comment', accepts: [() => Comment], incoming: '1' },
9
+ policies: { traverse: () => TraverseIssueComment },
10
+ });
@@ -0,0 +1,7 @@
1
+ export declare const deleteCommentMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
2
+ readonly mode: 'value';
3
+ readonly value: {
4
+ commentId: string;
5
+ deleted: true;
6
+ };
7
+ }, "authorized", false, "default">>;
@@ -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 { EditOwnComment } from '../policies/edit-own-comment.js';
5
+ export const deleteCommentMethod = method({
6
+ description: 'Delete this Comment as its author.',
7
+ auth: 'authorized',
8
+ policy: ({ check, self }) => check(EditOwnComment, self),
9
+ input: z.strictObject({}),
10
+ output: z.strictObject({ commentId: nodeIdValue, deleted: z.literal(true) }),
11
+ });
@@ -0,0 +1,9 @@
1
+ export declare const editCommentMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ body: string;
3
+ }, {
4
+ readonly mode: 'value';
5
+ readonly value: {
6
+ id: string;
7
+ body: string;
8
+ };
9
+ }, "authorized", false, "default">>;
@@ -0,0 +1,11 @@
1
+ import { method } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { EditOwnComment } from '../policies/edit-own-comment.js';
4
+ import { commentValue } from '../types/comment.js';
5
+ export const editCommentMethod = method({
6
+ description: 'Edit this Comment as its author.',
7
+ auth: 'authorized',
8
+ policy: ({ check, self }) => check(EditOwnComment, self),
9
+ input: z.strictObject({ body: z.string().min(1).max(50_000) }),
10
+ output: commentValue,
11
+ });
@@ -0,0 +1,2 @@
1
+ export { deleteCommentMethod } from './delete-comment.js';
2
+ export { editCommentMethod } from './edit-comment.js';
@@ -0,0 +1,2 @@
1
+ export { deleteCommentMethod } from './delete-comment.js';
2
+ export { editCommentMethod } from './edit-comment.js';
@@ -0,0 +1,4 @@
1
+ export { commentValue } from './types/index.js';
2
+ export { comment_authored_by, Comment, issue_has_comment } from './classes/index.js';
3
+ export { deleteCommentMethod, editCommentMethod } from './functions/index.js';
4
+ export { ContributeToComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './policies/index.js';
@@ -0,0 +1,4 @@
1
+ export { commentValue } from './types/index.js';
2
+ export { comment_authored_by, Comment, issue_has_comment } from './classes/index.js';
3
+ export { deleteCommentMethod, editCommentMethod } from './functions/index.js';
4
+ export { ContributeToComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './policies/index.js';
@@ -1,7 +1,7 @@
1
1
  import { policy } from '@astrale-os/sdk/schema';
2
- import { Issue, project_contains_issue } from '../issue/index.js';
3
- import { Project, project_has_member, project_owned_by } from '../project/index.js';
4
- import { issue_has_comment } from './relationships.js';
2
+ import { Issue, project_contains_issue } from '../../issue/index.js';
3
+ import { Project, project_has_member, project_owned_by } from '../../project/index.js';
4
+ import { issue_has_comment } from '../classes/issue-has-comment.js';
5
5
  export const ContributeToComment = policy({
6
6
  description: 'The caller owns or belongs to the Project containing this Comment.',
7
7
  match: ({ allOf, anyOf, edge, exists, object, subject }) => exists(({ node }) => {
@@ -1,5 +1,5 @@
1
1
  import { policy } from '@astrale-os/sdk/schema';
2
- import { comment_authored_by } from './relationships.js';
2
+ import { comment_authored_by } from '../classes/comment-authored-by.js';
3
3
  export const EditOwnComment = policy({
4
4
  description: 'The caller is the immutable author of this Comment.',
5
5
  match: ({ edge, object, subject }) => edge({ source: subject, class: () => comment_authored_by, target: object }),
@@ -0,0 +1,4 @@
1
+ export { ContributeToComment } from './contribute-to-comment.js';
2
+ export { EditOwnComment } from './edit-own-comment.js';
3
+ export { TraverseCommentRelationship } from './traverse-comment-relationship.js';
4
+ export { TraverseIssueComment } from './traverse-issue-comment.js';
@@ -0,0 +1,4 @@
1
+ export { ContributeToComment } from './contribute-to-comment.js';
2
+ export { EditOwnComment } from './edit-own-comment.js';
3
+ export { TraverseCommentRelationship } from './traverse-comment-relationship.js';
4
+ export { TraverseIssueComment } from './traverse-issue-comment.js';
@@ -1,2 +1 @@
1
- /** Comment relationships disclose only inside the containing Project. */
2
1
  export declare const TraverseCommentRelationship: import("@astrale-os/sdk/schema").Policy;
@@ -1,8 +1,8 @@
1
1
  import { policy } from '@astrale-os/sdk/schema';
2
- import { Issue, project_contains_issue } from '../issue/index.js';
3
- import { Project, project_has_member, project_owned_by } from '../project/index.js';
4
- import { comment_authored_by, issue_has_comment } from './relationships.js';
5
- /** Comment relationships disclose only inside the containing Project. */
2
+ import { Issue, project_contains_issue } from '../../issue/index.js';
3
+ import { Project, project_has_member, project_owned_by } from '../../project/index.js';
4
+ import { comment_authored_by } from '../classes/comment-authored-by.js';
5
+ import { issue_has_comment } from '../classes/issue-has-comment.js';
6
6
  export const TraverseCommentRelationship = policy({
7
7
  description: 'The caller owns or belongs to the Project containing the source Comment.',
8
8
  match: ({ allOf, anyOf, edge, exists, source, subject, target }) => anyOf(exists(({ node }) => {
@@ -0,0 +1 @@
1
+ export declare const TraverseIssueComment: import("@astrale-os/sdk/schema").Policy;
@@ -0,0 +1,14 @@
1
+ import { policy } from '@astrale-os/sdk/schema';
2
+ import { project_contains_issue } from '../../issue/index.js';
3
+ import { Project, project_has_member, project_owned_by } from '../../project/index.js';
4
+ import { issue_has_comment } from '../classes/issue-has-comment.js';
5
+ export const TraverseIssueComment = policy({
6
+ description: 'Issue Comment containment is visible only inside the containing Project.',
7
+ match: ({ allOf, anyOf, edge, exists, source, subject, target }) => anyOf(exists(({ node }) => {
8
+ const project = node(() => Project);
9
+ return allOf(edge({ source, class: () => issue_has_comment, target }), edge({ source: project, class: () => project_contains_issue, target: source }), edge({ source: subject, class: () => project_owned_by, target: project }));
10
+ }), exists(({ node }) => {
11
+ const project = node(() => Project);
12
+ return allOf(edge({ source, class: () => issue_has_comment, target }), edge({ source: project, class: () => project_contains_issue, target: source }), edge({ source: subject, class: () => project_has_member, target: project }));
13
+ })),
14
+ });
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const commentValue: z.ZodObject<{
3
+ id: z.ZodString;
4
+ body: z.ZodString;
5
+ }, z.core.$strict>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ import { nodeIdValue } from '../../../types/index.js';
3
+ export const commentValue = z.strictObject({
4
+ id: nodeIdValue,
5
+ body: z.string().min(1).max(50_000),
6
+ });
@@ -0,0 +1 @@
1
+ export { commentValue } from './comment.js';
@@ -0,0 +1 @@
1
+ export { commentValue } from './comment.js';
@@ -0,0 +1,5 @@
1
+ export { issue_assigned_to } from './issue-assigned-to.js';
2
+ export { issue_reported_by } from './issue-reported-by.js';
3
+ export { issue_subtask_of } from './issue-subtask-of.js';
4
+ export { Issue } from './issue.js';
5
+ export { project_contains_issue } from './project-contains-issue.js';
@@ -0,0 +1,5 @@
1
+ export { issue_assigned_to } from './issue-assigned-to.js';
2
+ export { issue_reported_by } from './issue-reported-by.js';
3
+ export { issue_subtask_of } from './issue-subtask-of.js';
4
+ export { Issue } from './issue.js';
5
+ export { project_contains_issue } from './project-contains-issue.js';
@@ -0,0 +1,16 @@
1
+ export declare const issue_assigned_to: 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: "assignee";
8
+ readonly outgoing: "0..*";
9
+ };
10
+ readonly target: {
11
+ readonly as: "issue";
12
+ readonly incoming: "0..1";
13
+ };
14
+ readonly constraints: Record<never, never>;
15
+ readonly effectiveProperties: never;
16
+ }>;
@@ -0,0 +1,9 @@
1
+ import { K, edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseIssueAssignee } from '../policies/traverse-issue-assignee.js';
3
+ import { Issue } from './issue.js';
4
+ export const issue_assigned_to = edgeClass.directed({
5
+ description: 'The optional current assignee of one Issue.',
6
+ source: { as: 'assignee', accepts: [K.classes.Identity], outgoing: '0..*' },
7
+ target: { as: 'issue', accepts: [() => Issue], incoming: '0..1' },
8
+ policies: { traverse: () => TraverseIssueAssignee },
9
+ });
@@ -0,0 +1,16 @@
1
+ export declare const issue_reported_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: "reporter";
8
+ readonly outgoing: "0..*";
9
+ };
10
+ readonly target: {
11
+ readonly as: "issue";
12
+ readonly incoming: "1";
13
+ };
14
+ readonly constraints: Record<never, never>;
15
+ readonly effectiveProperties: never;
16
+ }>;
@@ -0,0 +1,9 @@
1
+ import { K, edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseIssueReporter } from '../policies/traverse-issue-reporter.js';
3
+ import { Issue } from './issue.js';
4
+ export const issue_reported_by = edgeClass.directed({
5
+ description: 'The immutable reporter of one Issue.',
6
+ source: { as: 'reporter', accepts: [K.classes.Identity], outgoing: '0..*' },
7
+ target: { as: 'issue', accepts: [() => Issue], incoming: '1' },
8
+ policies: { traverse: () => TraverseIssueReporter },
9
+ });
@@ -0,0 +1,19 @@
1
+ export declare const issue_subtask_of: 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: "child";
8
+ readonly outgoing: "0..1";
9
+ };
10
+ readonly target: {
11
+ readonly as: "parent";
12
+ readonly incoming: "0..*";
13
+ };
14
+ readonly constraints: {
15
+ readonly noSelf: true;
16
+ readonly acyclic: true;
17
+ };
18
+ readonly effectiveProperties: never;
19
+ }>;
@@ -0,0 +1,10 @@
1
+ import { edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseIssueParent } from '../policies/traverse-issue-parent.js';
3
+ import { Issue } from './issue.js';
4
+ export const issue_subtask_of = edgeClass.directed({
5
+ description: 'One Issue is an acyclic subtask of at most one Issue in the same Project.',
6
+ source: { as: 'child', accepts: [() => Issue], outgoing: '0..1' },
7
+ target: { as: 'parent', accepts: [() => Issue], incoming: '0..*' },
8
+ constraints: { noSelf: true, acyclic: true },
9
+ policies: { traverse: () => TraverseIssueParent },
10
+ });
@@ -54,7 +54,7 @@ export declare const Issue: import("@astrale-os/sdk/schema").NodeClass<{
54
54
  readonly reference: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reference", "self">;
55
55
  readonly reporterId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reporterId", "self">;
56
56
  readonly assigneeId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string | undefined, string | undefined, false, "assigneeId", "self">;
57
- readonly status: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", false, "status", "self">;
57
+ readonly status: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", true, "status", "self">;
58
58
  readonly priority: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "priority", "self">;
59
59
  readonly archived: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<boolean, boolean, true, "archived", "self">;
60
60
  };
@@ -141,7 +141,7 @@ export declare const Issue: import("@astrale-os/sdk/schema").NodeClass<{
141
141
  };
142
142
  }, "authorized", false, "default">>;
143
143
  };
144
- readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<boolean, boolean, true, "archived", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string | undefined, string | undefined, false, "assigneeId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "priority", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reference", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reporterId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", false, "status", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
144
+ readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<boolean, boolean, true, "archived", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string | undefined, string | undefined, false, "assigneeId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "priority", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reference", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reporterId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", true, "status", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
145
145
  readonly name: "description";
146
146
  readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
147
147
  }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
@@ -230,4 +230,29 @@ export declare const Issue: import("@astrale-os/sdk/schema").NodeClass<{
230
230
  };
231
231
  }, "authorized", false, "default">>, "addComment", "self">;
232
232
  readonly effectiveStaticMethods: never;
233
- }>;
233
+ }> & import("@astrale-os/sdk/schema").StateClass<Readonly<Omit<Readonly<Record<never, never>>, "status"> & {
234
+ readonly status: import("@astrale-os/sdk/state").StateMachine<{
235
+ readonly open: {
236
+ readonly accept: "accepted";
237
+ readonly defer: "deferred";
238
+ readonly close: "closed";
239
+ };
240
+ readonly accepted: {
241
+ readonly resolve: "resolved";
242
+ readonly defer: "deferred";
243
+ readonly close: "closed";
244
+ };
245
+ readonly deferred: {
246
+ readonly reopen: "open";
247
+ readonly accept: "accepted";
248
+ readonly close: "closed";
249
+ };
250
+ readonly resolved: {
251
+ readonly reopen: "open";
252
+ readonly close: "closed";
253
+ };
254
+ readonly closed: {
255
+ readonly reopen: "open";
256
+ };
257
+ }, "open">;
258
+ }>>;
@@ -0,0 +1,35 @@
1
+ import { K, nodeClass, property, stateProperty } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { nodeIdValue } from '../../../types/index.js';
4
+ import { issueStatus } from '../../../.runtime/states/issue/index.js';
5
+ import { addIssueCommentMethod } from '../functions/add-issue-comment.js';
6
+ import { archiveIssueMethod } from '../functions/archive-issue.js';
7
+ import { assignIssueMethod } from '../functions/assign-issue.js';
8
+ import { setIssueParentMethod } from '../functions/set-issue-parent.js';
9
+ import { setIssueTagsMethod } from '../functions/set-issue-tags.js';
10
+ import { transitionIssueMethod } from '../functions/transition-issue.js';
11
+ import { updateIssueMethod } from '../functions/update-issue.js';
12
+ import { ContributeToIssue } from '../policies/contribute-to-issue.js';
13
+ export const Issue = nodeClass({
14
+ description: 'One immutable-reference work item contained by exactly one Project.',
15
+ icon: 'circle-dot',
16
+ extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
17
+ properties: {
18
+ reference: z.string().min(1).max(32),
19
+ reporterId: property(nodeIdValue, {}),
20
+ assigneeId: property(nodeIdValue.optional(), {}),
21
+ status: stateProperty(issueStatus),
22
+ priority: z.number().int().min(0).max(4),
23
+ archived: z.boolean(),
24
+ },
25
+ methods: {
26
+ update: updateIssueMethod,
27
+ transition: transitionIssueMethod,
28
+ assign: assignIssueMethod,
29
+ setTags: setIssueTagsMethod,
30
+ setParent: setIssueParentMethod,
31
+ addComment: addIssueCommentMethod,
32
+ archive: archiveIssueMethod,
33
+ },
34
+ policies: { read: () => ContributeToIssue },
35
+ });
@@ -0,0 +1,16 @@
1
+ export declare const project_contains_issue: 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: "project";
8
+ readonly outgoing: "0..*";
9
+ };
10
+ readonly target: {
11
+ readonly as: "issue";
12
+ readonly incoming: "1";
13
+ };
14
+ readonly constraints: Record<never, never>;
15
+ readonly effectiveProperties: never;
16
+ }>;
@@ -0,0 +1,10 @@
1
+ import { edgeClass } from '@astrale-os/sdk/schema';
2
+ import { Project } from '../../project/index.js';
3
+ import { TraverseProjectIssue } from '../policies/traverse-project-issue.js';
4
+ import { Issue } from './issue.js';
5
+ export const project_contains_issue = edgeClass.directed({
6
+ description: 'One Project contains and numbers one Issue.',
7
+ source: { as: 'project', accepts: [() => Project], outgoing: '0..*' },
8
+ target: { as: 'issue', accepts: [() => Issue], incoming: '1' },
9
+ policies: { traverse: () => TraverseProjectIssue },
10
+ });