@astrale-domains/issues 0.3.3 → 0.3.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 (34) hide show
  1. package/README.md +38 -7
  2. package/dist/schema/index.d.ts +2 -1
  3. package/dist/schema/index.js +2 -1
  4. package/dist/schema/modules/comment/classes/comment.d.ts +1 -1
  5. package/dist/schema/modules/issue/classes/index.d.ts +1 -0
  6. package/dist/schema/modules/issue/classes/index.js +1 -0
  7. package/dist/schema/modules/issue/classes/issue-duplicate-candidate.d.ts +18 -0
  8. package/dist/schema/modules/issue/classes/issue-duplicate-candidate.js +10 -0
  9. package/dist/schema/modules/issue/classes/issue.d.ts +41 -2
  10. package/dist/schema/modules/issue/classes/issue.js +4 -0
  11. package/dist/schema/modules/issue/index.d.ts +3 -3
  12. package/dist/schema/modules/issue/index.js +3 -3
  13. package/dist/schema/modules/issue/policies/index.d.ts +1 -0
  14. package/dist/schema/modules/issue/policies/index.js +1 -0
  15. package/dist/schema/modules/issue/policies/traverse-duplicate-candidate.d.ts +1 -0
  16. package/dist/schema/modules/issue/policies/traverse-duplicate-candidate.js +10 -0
  17. package/dist/schema/modules/issue/types/index.d.ts +1 -0
  18. package/dist/schema/modules/issue/types/index.js +1 -0
  19. package/dist/schema/modules/issue/types/report.d.ts +207 -0
  20. package/dist/schema/modules/issue/types/report.js +56 -0
  21. package/dist/schema/modules/project/classes/project.d.ts +103 -3
  22. package/dist/schema/modules/project/classes/project.js +6 -0
  23. package/dist/schema/modules/project/functions/complete-project-report.d.ts +10 -0
  24. package/dist/schema/modules/project/functions/complete-project-report.js +11 -0
  25. package/dist/schema/modules/project/functions/index.d.ts +3 -0
  26. package/dist/schema/modules/project/functions/index.js +3 -0
  27. package/dist/schema/modules/project/functions/list-project-reports.d.ts +49 -0
  28. package/dist/schema/modules/project/functions/list-project-reports.js +14 -0
  29. package/dist/schema/modules/project/functions/receive-project-report.d.ts +41 -0
  30. package/dist/schema/modules/project/functions/receive-project-report.js +10 -0
  31. package/dist/schema/modules/tag/classes/tag.d.ts +2 -2
  32. package/dist/schema/schema.d.ts +166 -8
  33. package/dist/schema/schema.js +3 -1
  34. package/package.json +8 -8
package/README.md CHANGED
@@ -30,7 +30,7 @@ The public callable surface keeps observation Project-owned and mutations receiv
30
30
  ```text
31
31
  Project.create
32
32
  Project.list
33
- Project.update | addMember | removeMember | createIssue | createTag | archive
33
+ Project.update | addMember | removeMember | createIssue | receiveReport | listReports | completeReport | createTag | archive
34
34
  Issue.update | transition | assign | setTags | setParent | addComment | archive
35
35
  Comment.edit | delete
36
36
  Tag.edit | delete
@@ -54,12 +54,43 @@ collaboration state without requesting authority over every possible concrete Id
54
54
  another Domain.
55
55
  Those private execution fields are not a second public model and never replace the Policy edges.
56
56
 
57
- There is no Domain `Command`, receipt, universal idempotency layer, activity log, or undo system.
58
- `Project.create` and `Project.list` are Actions; the seventeen multi-step receiver operations are
59
- explicit Workflows whose Query and Mutation effects use stable steps. Set-style changes converge
60
- naturally and stale
61
- concurrent writes reject through atomic Mutation preconditions. Creation retries have no Domain
62
- replay guarantee; generic invocation idempotency belongs to the platform when it exists.
57
+ `Project.receiveReport` is the owner-only intake for trusted integrations such as Admin. Its owner
58
+ supplies a verified `reporterId`, an opaque `requestId`, `title`, `body`, and optional structured
59
+ `context`. The public Admin facade must derive the reporter from authentication; ordinary senders
60
+ must not receive this privileged owner capability or Project membership.
61
+
62
+ One atomic mutation allocates the number, creates the Issue and reporter/containment edges, retains
63
+ the original report, and sets `reportPending`. A query precondition fences the exact
64
+ Project/reporter/request triple. A retry with identical content returns the original `{ id, reference }`,
65
+ even after triage edits or archival; changed content under the same key is rejected. Independent
66
+ request IDs remain independent reports. Known counter/key contention is retried up to eight attempts;
67
+ unknown outcomes propagate, so the sender must retain the original payload and key until confirmation.
68
+ The inline Workflow runner is not the source of durability: the graph receipt and atomic preconditions are.
69
+
70
+ Context describes current client observations, separate from mutable Issue text. Missing versions and
71
+ instance coordinates remain unknown. Creating a report does not grant access to this or other Issues.
72
+ The generic domain has no Admin dependency. Admin setup, instance resolution, and scheduling remain
73
+ integration-owned.
74
+
75
+ The Project owner processes reports through two methods:
76
+
77
+ - `Project.listReports({ pending?, cursor? })` returns up to 32 original reports, their reporters,
78
+ receipt times, and an opaque continuation cursor. Continue with the same pending filter. Omitting
79
+ the filter also includes completed originals. This method does not drain the collection.
80
+ - `Project.completeReport({ issueId, duplicateCandidateId? })` acknowledges processing, optionally
81
+ adding one same-Project `issue_duplicate_candidate` edge in the same transaction. It preserves
82
+ all existing candidate edges, original evidence, and human edits. The edge is a triage suggestion,
83
+ not a merge. Traversal requires participation in the Project containing both endpoints.
84
+
85
+ Completion guards the observed candidate set and pending state. Known concurrent changes reject
86
+ without partial writes; the scheduler should reread and retry. Replaying a completed report returns
87
+ `changed: false`, without applying a new candidate. Only acknowledge after integration-owned effects
88
+ are durably recorded; those effects must also be idempotent because a worker can stop between them
89
+ and acknowledgement. A failed report remains pending. An integration must resume pagination rather
90
+ than repeatedly processing only the first page, so a persistent failure cannot starve later reports.
91
+
92
+ Other creation methods retain their existing retry semantics. Set-style changes converge naturally;
93
+ stale concurrent edits reject through atomic mutation preconditions.
63
94
 
64
95
  The mounted View defaults to a focused open-Issue Inbox with queue progress and keyboard or button
65
96
  navigation. Accepted work has a dedicated discussion view, while Browse searches and filters the
@@ -1,6 +1,7 @@
1
1
  export { schema } from './schema.js';
2
2
  export type { IssuesDomain, IssuesSchema } from './schema.js';
3
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';
4
+ export { Issue, issue_assigned_to, issue_duplicate_candidate, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
5
5
  export { Comment, comment_authored_by, issue_has_comment } from './modules/comment/index.js';
6
6
  export { Tag, issue_tagged_with, project_contains_tag } from './modules/tag/index.js';
7
+ export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, type ReportContent, } from './modules/issue/index.js';
@@ -1,5 +1,6 @@
1
1
  export { schema } from './schema.js';
2
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';
3
+ export { Issue, issue_assigned_to, issue_duplicate_candidate, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
4
4
  export { Comment, comment_authored_by, issue_has_comment } from './modules/comment/index.js';
5
5
  export { Tag, issue_tagged_with, project_contains_tag } from './modules/tag/index.js';
6
+ export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, } from './modules/issue/index.js';
@@ -5,7 +5,7 @@ export declare const Comment: import("@astrale-os/sdk/schema").AuthoredNodeClass
5
5
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
6
6
  readonly properties: {
7
7
  body: z.ZodString;
8
- authorId: import("@astrale-os/sdk/schema").Property<z.ZodString, {}, never>;
8
+ authorId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {}>;
9
9
  };
10
10
  readonly methods: {
11
11
  edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -3,3 +3,4 @@ export { issue_reported_by } from './issue-reported-by.js';
3
3
  export { issue_subtask_of } from './issue-subtask-of.js';
4
4
  export { Issue } from './issue.js';
5
5
  export { project_contains_issue } from './project-contains-issue.js';
6
+ export { issue_duplicate_candidate } from './issue-duplicate-candidate.js';
@@ -3,3 +3,4 @@ export { issue_reported_by } from './issue-reported-by.js';
3
3
  export { issue_subtask_of } from './issue-subtask-of.js';
4
4
  export { Issue } from './issue.js';
5
5
  export { project_contains_issue } from './project-contains-issue.js';
6
+ export { issue_duplicate_candidate } from './issue-duplicate-candidate.js';
@@ -0,0 +1,18 @@
1
+ export declare const issue_duplicate_candidate: 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: "report";
8
+ readonly outgoing: "0..*";
9
+ };
10
+ readonly target: {
11
+ readonly as: "candidate";
12
+ readonly incoming: "0..*";
13
+ };
14
+ readonly constraints: {
15
+ readonly noSelf: true;
16
+ };
17
+ readonly effectiveProperties: never;
18
+ }>;
@@ -0,0 +1,10 @@
1
+ import { edgeClass } from '@astrale-os/sdk/schema';
2
+ import { TraverseDuplicateCandidate } from '../policies/traverse-duplicate-candidate.js';
3
+ import { Issue } from './issue.js';
4
+ export const issue_duplicate_candidate = edgeClass.directed({
5
+ description: 'A retained report may describe the same problem as another Issue; a suggestion for triage, not a merge or canonical identity.',
6
+ source: { as: 'report', accepts: [() => Issue], outgoing: '0..*' },
7
+ target: { as: 'candidate', accepts: [() => Issue], incoming: '0..*' },
8
+ constraints: { noSelf: true },
9
+ policies: { traverse: () => TraverseDuplicateCandidate },
10
+ });
@@ -5,8 +5,8 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
5
5
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
6
6
  readonly properties: {
7
7
  reference: z.ZodString;
8
- reporterId: import("@astrale-os/sdk/schema").Property<z.ZodString, {}, never>;
9
- assigneeId: import("@astrale-os/sdk/schema").Property<z.ZodOptional<z.ZodString>, {}, never>;
8
+ reporterId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {}>;
9
+ assigneeId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodString>, {}>;
10
10
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
11
11
  readonly open: {
12
12
  readonly accept: "accepted";
@@ -36,6 +36,45 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
36
36
  }>;
37
37
  priority: z.ZodNumber;
38
38
  archived: z.ZodBoolean;
39
+ reportRequestId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodString>, {}>;
40
+ report: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodObject<{
41
+ title: z.ZodString;
42
+ body: z.ZodString;
43
+ context: z.ZodOptional<z.ZodObject<{
44
+ observedAt: z.ZodString;
45
+ cli: z.ZodObject<{
46
+ version: z.ZodString;
47
+ platform: z.ZodString;
48
+ arch: z.ZodString;
49
+ }, z.core.$strict>;
50
+ runtime: z.ZodObject<{
51
+ node: z.ZodString;
52
+ bun: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strict>;
54
+ project: z.ZodOptional<z.ZodObject<{
55
+ name: z.ZodString;
56
+ version: z.ZodOptional<z.ZodString>;
57
+ packages: z.ZodArray<z.ZodObject<{
58
+ name: z.ZodString;
59
+ declared: z.ZodOptional<z.ZodString>;
60
+ version: z.ZodOptional<z.ZodString>;
61
+ source: z.ZodEnum<{
62
+ installed: "installed";
63
+ local: "local";
64
+ unresolved: "unresolved";
65
+ }>;
66
+ commit: z.ZodOptional<z.ZodString>;
67
+ dirty: z.ZodOptional<z.ZodBoolean>;
68
+ }, z.core.$strict>>;
69
+ }, z.core.$strict>>;
70
+ instance: z.ZodOptional<z.ZodObject<{
71
+ name: z.ZodString;
72
+ issuer: z.ZodOptional<z.ZodString>;
73
+ url: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strict>>;
75
+ }, z.core.$strict>>;
76
+ }, z.core.$strict>>, {}>;
77
+ reportPending: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodBoolean>, {}>;
39
78
  };
40
79
  readonly methods: {
41
80
  update: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -11,6 +11,7 @@ import { transitionIssueMethod } from '../functions/transition-issue.js';
11
11
  import { updateIssueMethod } from '../functions/update-issue.js';
12
12
  import { ContributeToIssue } from '../policies/contribute-to-issue.js';
13
13
  import { issueStatus } from '../states/index.js';
14
+ import { reportContentValue } from '../types/report.js';
14
15
  export const Issue = nodeClass({
15
16
  description: 'One immutable-reference work item contained by exactly one Project.',
16
17
  icon: classIcon.lucide(CircleDot),
@@ -22,6 +23,9 @@ export const Issue = nodeClass({
22
23
  status: stateProperty(issueStatus),
23
24
  priority: z.number().int().min(0).max(4),
24
25
  archived: z.boolean(),
26
+ reportRequestId: property(z.string().min(1).max(128).optional(), {}),
27
+ report: property(reportContentValue.optional(), {}),
28
+ reportPending: property(z.boolean().optional(), {}),
25
29
  },
26
30
  methods: {
27
31
  update: updateIssueMethod,
@@ -1,5 +1,5 @@
1
- export { issueValue } from './types/index.js';
1
+ export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, 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';
3
+ export { issue_assigned_to, issue_duplicate_candidate, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
4
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
5
- export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
5
+ export { ContributeToIssue, TraverseDuplicateCandidate, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
@@ -1,5 +1,5 @@
1
- export { issueValue } from './types/index.js';
1
+ export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, } 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';
3
+ export { issue_assigned_to, issue_duplicate_candidate, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
4
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
5
- export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
5
+ export { ContributeToIssue, TraverseDuplicateCandidate, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
@@ -3,3 +3,4 @@ export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
3
3
  export { TraverseIssueParent } from './traverse-issue-parent.js';
4
4
  export { TraverseIssueReporter } from './traverse-issue-reporter.js';
5
5
  export { TraverseProjectIssue } from './traverse-project-issue.js';
6
+ export { TraverseDuplicateCandidate } from './traverse-duplicate-candidate.js';
@@ -3,3 +3,4 @@ export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
3
3
  export { TraverseIssueParent } from './traverse-issue-parent.js';
4
4
  export { TraverseIssueReporter } from './traverse-issue-reporter.js';
5
5
  export { TraverseProjectIssue } from './traverse-project-issue.js';
6
+ export { TraverseDuplicateCandidate } from './traverse-duplicate-candidate.js';
@@ -0,0 +1 @@
1
+ export declare const TraverseDuplicateCandidate: import("@astrale-os/sdk/schema").Policy;
@@ -0,0 +1,10 @@
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
+ export const TraverseDuplicateCandidate = policy({
5
+ description: 'The caller participates in the Project containing both candidate duplicate Issues.',
6
+ match: ({ allOf, anyOf, edge, exists, source, target, subject }) => exists(({ node }) => {
7
+ const project = node(() => Project);
8
+ return allOf(edge({ source: project, class: () => project_contains_issue, target: source }), edge({ source: project, class: () => project_contains_issue, target }), anyOf(edge({ source: subject, class: () => project_owned_by, target: project }), edge({ source: subject, class: () => project_has_member, target: project })));
9
+ }),
10
+ });
@@ -1 +1,2 @@
1
1
  export { issueValue } from './issue.js';
2
+ export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, type ReportContent, } from './report.js';
@@ -1 +1,2 @@
1
1
  export { issueValue } from './issue.js';
2
+ export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, reportRecordValue, reportPageValue, } from './report.js';
@@ -0,0 +1,207 @@
1
+ import { z } from 'zod';
2
+ /** Observations at submission time; never evidence of a historical deployed build. */
3
+ export declare const reportContextValue: z.ZodObject<{
4
+ observedAt: z.ZodString;
5
+ cli: z.ZodObject<{
6
+ version: z.ZodString;
7
+ platform: z.ZodString;
8
+ arch: z.ZodString;
9
+ }, z.core.$strict>;
10
+ runtime: z.ZodObject<{
11
+ node: z.ZodString;
12
+ bun: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strict>;
14
+ project: z.ZodOptional<z.ZodObject<{
15
+ name: z.ZodString;
16
+ version: z.ZodOptional<z.ZodString>;
17
+ packages: z.ZodArray<z.ZodObject<{
18
+ name: z.ZodString;
19
+ declared: z.ZodOptional<z.ZodString>;
20
+ version: z.ZodOptional<z.ZodString>;
21
+ source: z.ZodEnum<{
22
+ installed: "installed";
23
+ local: "local";
24
+ unresolved: "unresolved";
25
+ }>;
26
+ commit: z.ZodOptional<z.ZodString>;
27
+ dirty: z.ZodOptional<z.ZodBoolean>;
28
+ }, z.core.$strict>>;
29
+ }, z.core.$strict>>;
30
+ instance: z.ZodOptional<z.ZodObject<{
31
+ name: z.ZodString;
32
+ issuer: z.ZodOptional<z.ZodString>;
33
+ url: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strict>>;
35
+ }, z.core.$strict>;
36
+ export declare const reportContentValue: z.ZodObject<{
37
+ title: z.ZodString;
38
+ body: z.ZodString;
39
+ context: z.ZodOptional<z.ZodObject<{
40
+ observedAt: z.ZodString;
41
+ cli: z.ZodObject<{
42
+ version: z.ZodString;
43
+ platform: z.ZodString;
44
+ arch: z.ZodString;
45
+ }, z.core.$strict>;
46
+ runtime: z.ZodObject<{
47
+ node: z.ZodString;
48
+ bun: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ project: z.ZodOptional<z.ZodObject<{
51
+ name: z.ZodString;
52
+ version: z.ZodOptional<z.ZodString>;
53
+ packages: z.ZodArray<z.ZodObject<{
54
+ name: z.ZodString;
55
+ declared: z.ZodOptional<z.ZodString>;
56
+ version: z.ZodOptional<z.ZodString>;
57
+ source: z.ZodEnum<{
58
+ installed: "installed";
59
+ local: "local";
60
+ unresolved: "unresolved";
61
+ }>;
62
+ commit: z.ZodOptional<z.ZodString>;
63
+ dirty: z.ZodOptional<z.ZodBoolean>;
64
+ }, z.core.$strict>>;
65
+ }, z.core.$strict>>;
66
+ instance: z.ZodOptional<z.ZodObject<{
67
+ name: z.ZodString;
68
+ issuer: z.ZodOptional<z.ZodString>;
69
+ url: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>>;
71
+ }, z.core.$strict>>;
72
+ }, z.core.$strict>;
73
+ export declare const receiveReportInput: z.ZodObject<{
74
+ title: z.ZodString;
75
+ body: z.ZodString;
76
+ context: z.ZodOptional<z.ZodObject<{
77
+ observedAt: z.ZodString;
78
+ cli: z.ZodObject<{
79
+ version: z.ZodString;
80
+ platform: z.ZodString;
81
+ arch: z.ZodString;
82
+ }, z.core.$strict>;
83
+ runtime: z.ZodObject<{
84
+ node: z.ZodString;
85
+ bun: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strict>;
87
+ project: z.ZodOptional<z.ZodObject<{
88
+ name: z.ZodString;
89
+ version: z.ZodOptional<z.ZodString>;
90
+ packages: z.ZodArray<z.ZodObject<{
91
+ name: z.ZodString;
92
+ declared: z.ZodOptional<z.ZodString>;
93
+ version: z.ZodOptional<z.ZodString>;
94
+ source: z.ZodEnum<{
95
+ installed: "installed";
96
+ local: "local";
97
+ unresolved: "unresolved";
98
+ }>;
99
+ commit: z.ZodOptional<z.ZodString>;
100
+ dirty: z.ZodOptional<z.ZodBoolean>;
101
+ }, z.core.$strict>>;
102
+ }, z.core.$strict>>;
103
+ instance: z.ZodOptional<z.ZodObject<{
104
+ name: z.ZodString;
105
+ issuer: z.ZodOptional<z.ZodString>;
106
+ url: z.ZodOptional<z.ZodString>;
107
+ }, z.core.$strict>>;
108
+ }, z.core.$strict>>;
109
+ requestId: z.ZodString;
110
+ reporterId: z.ZodString;
111
+ }, z.core.$strict>;
112
+ export declare const reportReceiptValue: z.ZodObject<{
113
+ id: z.ZodString;
114
+ reference: z.ZodString;
115
+ }, z.core.$strict>;
116
+ export type ReportContent = z.infer<typeof reportContentValue>;
117
+ export declare const reportRecordValue: z.ZodObject<{
118
+ id: z.ZodString;
119
+ reference: z.ZodString;
120
+ reporterId: z.ZodString;
121
+ content: z.ZodObject<{
122
+ title: z.ZodString;
123
+ body: z.ZodString;
124
+ context: z.ZodOptional<z.ZodObject<{
125
+ observedAt: z.ZodString;
126
+ cli: z.ZodObject<{
127
+ version: z.ZodString;
128
+ platform: z.ZodString;
129
+ arch: z.ZodString;
130
+ }, z.core.$strict>;
131
+ runtime: z.ZodObject<{
132
+ node: z.ZodString;
133
+ bun: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strict>;
135
+ project: z.ZodOptional<z.ZodObject<{
136
+ name: z.ZodString;
137
+ version: z.ZodOptional<z.ZodString>;
138
+ packages: z.ZodArray<z.ZodObject<{
139
+ name: z.ZodString;
140
+ declared: z.ZodOptional<z.ZodString>;
141
+ version: z.ZodOptional<z.ZodString>;
142
+ source: z.ZodEnum<{
143
+ installed: "installed";
144
+ local: "local";
145
+ unresolved: "unresolved";
146
+ }>;
147
+ commit: z.ZodOptional<z.ZodString>;
148
+ dirty: z.ZodOptional<z.ZodBoolean>;
149
+ }, z.core.$strict>>;
150
+ }, z.core.$strict>>;
151
+ instance: z.ZodOptional<z.ZodObject<{
152
+ name: z.ZodString;
153
+ issuer: z.ZodOptional<z.ZodString>;
154
+ url: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>>;
156
+ }, z.core.$strict>>;
157
+ }, z.core.$strict>;
158
+ pending: z.ZodBoolean;
159
+ receivedAt: z.ZodString;
160
+ }, z.core.$strict>;
161
+ export declare const reportPageValue: z.ZodObject<{
162
+ reports: z.ZodArray<z.ZodObject<{
163
+ id: z.ZodString;
164
+ reference: z.ZodString;
165
+ reporterId: z.ZodString;
166
+ content: z.ZodObject<{
167
+ title: z.ZodString;
168
+ body: z.ZodString;
169
+ context: z.ZodOptional<z.ZodObject<{
170
+ observedAt: z.ZodString;
171
+ cli: z.ZodObject<{
172
+ version: z.ZodString;
173
+ platform: z.ZodString;
174
+ arch: z.ZodString;
175
+ }, z.core.$strict>;
176
+ runtime: z.ZodObject<{
177
+ node: z.ZodString;
178
+ bun: z.ZodOptional<z.ZodString>;
179
+ }, z.core.$strict>;
180
+ project: z.ZodOptional<z.ZodObject<{
181
+ name: z.ZodString;
182
+ version: z.ZodOptional<z.ZodString>;
183
+ packages: z.ZodArray<z.ZodObject<{
184
+ name: z.ZodString;
185
+ declared: z.ZodOptional<z.ZodString>;
186
+ version: z.ZodOptional<z.ZodString>;
187
+ source: z.ZodEnum<{
188
+ installed: "installed";
189
+ local: "local";
190
+ unresolved: "unresolved";
191
+ }>;
192
+ commit: z.ZodOptional<z.ZodString>;
193
+ dirty: z.ZodOptional<z.ZodBoolean>;
194
+ }, z.core.$strict>>;
195
+ }, z.core.$strict>>;
196
+ instance: z.ZodOptional<z.ZodObject<{
197
+ name: z.ZodString;
198
+ issuer: z.ZodOptional<z.ZodString>;
199
+ url: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strict>>;
201
+ }, z.core.$strict>>;
202
+ }, z.core.$strict>;
203
+ pending: z.ZodBoolean;
204
+ receivedAt: z.ZodString;
205
+ }, z.core.$strict>>;
206
+ cursor: z.ZodOptional<z.ZodString>;
207
+ }, z.core.$strict>;
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { nodeIdValue } from '../../../types/index.js';
3
+ const coordinate = z.string().min(1).max(2_048);
4
+ const version = z.string().max(128);
5
+ /** Observations at submission time; never evidence of a historical deployed build. */
6
+ export const reportContextValue = z.strictObject({
7
+ observedAt: z.string().min(1).max(64),
8
+ cli: z.strictObject({ version, platform: z.string().max(64), arch: z.string().max(64) }),
9
+ runtime: z.strictObject({ node: version, bun: version.optional() }),
10
+ project: z
11
+ .strictObject({
12
+ name: z.string().max(200),
13
+ version: version.optional(),
14
+ packages: z
15
+ .array(z.strictObject({
16
+ name: z.string().min(1).max(200),
17
+ declared: z.string().max(128).optional(),
18
+ version: version.optional(),
19
+ source: z.enum(['installed', 'local', 'unresolved']),
20
+ commit: z.string().min(40).max(64).optional(),
21
+ dirty: z.boolean().optional(),
22
+ }))
23
+ .max(64),
24
+ })
25
+ .optional(),
26
+ instance: z
27
+ .strictObject({
28
+ name: z.string().max(200),
29
+ issuer: coordinate.optional(),
30
+ url: coordinate.optional(),
31
+ })
32
+ .optional(),
33
+ });
34
+ export const reportContentValue = z.strictObject({
35
+ title: z.string().min(1).max(200),
36
+ body: z.string().min(1).max(50_000),
37
+ context: reportContextValue.optional(),
38
+ });
39
+ export const receiveReportInput = reportContentValue.extend({
40
+ requestId: z.string().min(1).max(128),
41
+ reporterId: nodeIdValue,
42
+ });
43
+ export const reportReceiptValue = z.strictObject({
44
+ id: nodeIdValue,
45
+ reference: z.string().min(1).max(32),
46
+ });
47
+ export const reportRecordValue = reportReceiptValue.extend({
48
+ reporterId: nodeIdValue,
49
+ content: reportContentValue,
50
+ pending: z.boolean(),
51
+ receivedAt: z.string().min(1).max(64),
52
+ });
53
+ export const reportPageValue = z.strictObject({
54
+ reports: z.array(reportRecordValue).max(32),
55
+ cursor: z.string().optional(),
56
+ });
@@ -5,9 +5,9 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
5
5
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
6
6
  readonly properties: {
7
7
  key: z.ZodString;
8
- ownerId: import("@astrale-os/sdk/schema").Property<z.ZodString, {}, never>;
9
- memberIds: import("@astrale-os/sdk/schema").Property<z.ZodArray<z.ZodString>, {}, never>;
10
- nextIssueNumber: import("@astrale-os/sdk/schema").Property<z.ZodNumber, {}, never>;
8
+ ownerId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {}>;
9
+ memberIds: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodArray<z.ZodString>, {}>;
10
+ nextIssueNumber: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodNumber, {}>;
11
11
  archived: z.ZodBoolean;
12
12
  };
13
13
  readonly methods: {
@@ -99,6 +99,106 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
99
99
  archived: boolean;
100
100
  };
101
101
  }, "authorized", false, false>>;
102
+ receiveReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
103
+ title: string;
104
+ body: string;
105
+ context?: {
106
+ observedAt: string;
107
+ cli: {
108
+ version: string;
109
+ platform: string;
110
+ arch: string;
111
+ };
112
+ runtime: {
113
+ node: string;
114
+ bun?: string | undefined;
115
+ };
116
+ project?: {
117
+ name: string;
118
+ version?: string | undefined;
119
+ packages: {
120
+ name: string;
121
+ declared?: string | undefined;
122
+ version?: string | undefined;
123
+ source: "installed" | "local" | "unresolved";
124
+ commit?: string | undefined;
125
+ dirty?: boolean | undefined;
126
+ }[];
127
+ } | undefined;
128
+ instance?: {
129
+ name: string;
130
+ issuer?: string | undefined;
131
+ url?: string | undefined;
132
+ } | undefined;
133
+ } | undefined;
134
+ requestId: string;
135
+ reporterId: string;
136
+ }, {
137
+ readonly mode: 'value';
138
+ readonly value: {
139
+ id: string;
140
+ reference: string;
141
+ };
142
+ }, "authorized", false, false>>;
143
+ listReports: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
144
+ pending?: boolean | undefined;
145
+ cursor?: string | undefined;
146
+ }, {
147
+ readonly mode: 'value';
148
+ readonly value: {
149
+ reports: {
150
+ id: string;
151
+ reference: string;
152
+ reporterId: string;
153
+ content: {
154
+ title: string;
155
+ body: string;
156
+ context?: {
157
+ observedAt: string;
158
+ cli: {
159
+ version: string;
160
+ platform: string;
161
+ arch: string;
162
+ };
163
+ runtime: {
164
+ node: string;
165
+ bun?: string | undefined;
166
+ };
167
+ project?: {
168
+ name: string;
169
+ version?: string | undefined;
170
+ packages: {
171
+ name: string;
172
+ declared?: string | undefined;
173
+ version?: string | undefined;
174
+ source: "installed" | "local" | "unresolved";
175
+ commit?: string | undefined;
176
+ dirty?: boolean | undefined;
177
+ }[];
178
+ } | undefined;
179
+ instance?: {
180
+ name: string;
181
+ issuer?: string | undefined;
182
+ url?: string | undefined;
183
+ } | undefined;
184
+ } | undefined;
185
+ };
186
+ pending: boolean;
187
+ receivedAt: string;
188
+ }[];
189
+ cursor?: string | undefined;
190
+ };
191
+ }, "authorized", false, false>>;
192
+ completeReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
193
+ issueId: string;
194
+ duplicateCandidateId?: string | undefined;
195
+ }, {
196
+ readonly mode: 'value';
197
+ readonly value: {
198
+ issueId: string;
199
+ changed: boolean;
200
+ };
201
+ }, "authorized", false, false>>;
102
202
  createTag: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
103
203
  name: string;
104
204
  color?: string | undefined;
@@ -4,10 +4,13 @@ import { z } from 'zod';
4
4
  import { nodeIdValue } from '../../../types/index.js';
5
5
  import { addProjectMemberMethod } from '../functions/add-project-member.js';
6
6
  import { archiveProjectMethod } from '../functions/archive-project.js';
7
+ import { completeProjectReportMethod } from '../functions/complete-project-report.js';
7
8
  import { createProjectIssueMethod } from '../functions/create-project-issue.js';
8
9
  import { createProjectTagMethod } from '../functions/create-project-tag.js';
9
10
  import { createProjectMethod } from '../functions/create-project.js';
11
+ import { listProjectReportsMethod } from '../functions/list-project-reports.js';
10
12
  import { listProjectsMethod } from '../functions/list-projects.js';
13
+ import { receiveProjectReportMethod } from '../functions/receive-project-report.js';
11
14
  import { removeProjectMemberMethod } from '../functions/remove-project-member.js';
12
15
  import { updateProjectMethod } from '../functions/update-project.js';
13
16
  import { ContributeToProject } from '../policies/contribute-to-project.js';
@@ -29,6 +32,9 @@ export const Project = nodeClass({
29
32
  addMember: addProjectMemberMethod,
30
33
  removeMember: removeProjectMemberMethod,
31
34
  createIssue: createProjectIssueMethod,
35
+ receiveReport: receiveProjectReportMethod,
36
+ listReports: listProjectReportsMethod,
37
+ completeReport: completeProjectReportMethod,
32
38
  createTag: createProjectTagMethod,
33
39
  archive: archiveProjectMethod,
34
40
  },
@@ -0,0 +1,10 @@
1
+ export declare const completeProjectReportMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ issueId: string;
3
+ duplicateCandidateId?: string | undefined;
4
+ }, {
5
+ readonly mode: 'value';
6
+ readonly value: {
7
+ issueId: string;
8
+ changed: boolean;
9
+ };
10
+ }, "authorized", false, false>>;
@@ -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 { ManageProject } from '../policies/manage-project.js';
5
+ export const completeProjectReportMethod = method({
6
+ description: 'Confirm report processing once, optionally adding one duplicate candidate without editing original evidence or human triage.',
7
+ auth: 'authorized',
8
+ policy: ({ check, self }) => check(ManageProject, self),
9
+ input: z.strictObject({ issueId: nodeIdValue, duplicateCandidateId: nodeIdValue.optional() }),
10
+ output: z.strictObject({ issueId: nodeIdValue, changed: z.boolean() }),
11
+ });
@@ -6,3 +6,6 @@ export { createProjectMethod } from './create-project.js';
6
6
  export { listProjectsMethod } from './list-projects.js';
7
7
  export { removeProjectMemberMethod } from './remove-project-member.js';
8
8
  export { updateProjectMethod } from './update-project.js';
9
+ export { receiveProjectReportMethod } from './receive-project-report.js';
10
+ export { listProjectReportsMethod } from './list-project-reports.js';
11
+ export { completeProjectReportMethod } from './complete-project-report.js';
@@ -6,3 +6,6 @@ export { createProjectMethod } from './create-project.js';
6
6
  export { listProjectsMethod } from './list-projects.js';
7
7
  export { removeProjectMemberMethod } from './remove-project-member.js';
8
8
  export { updateProjectMethod } from './update-project.js';
9
+ export { receiveProjectReportMethod } from './receive-project-report.js';
10
+ export { listProjectReportsMethod } from './list-project-reports.js';
11
+ export { completeProjectReportMethod } from './complete-project-report.js';
@@ -0,0 +1,49 @@
1
+ export declare const listProjectReportsMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ pending?: boolean | undefined;
3
+ cursor?: string | undefined;
4
+ }, {
5
+ readonly mode: 'value';
6
+ readonly value: {
7
+ reports: {
8
+ id: string;
9
+ reference: string;
10
+ reporterId: string;
11
+ content: {
12
+ title: string;
13
+ body: string;
14
+ context?: {
15
+ observedAt: string;
16
+ cli: {
17
+ version: string;
18
+ platform: string;
19
+ arch: string;
20
+ };
21
+ runtime: {
22
+ node: string;
23
+ bun?: string | undefined;
24
+ };
25
+ project?: {
26
+ name: string;
27
+ version?: string | undefined;
28
+ packages: {
29
+ name: string;
30
+ declared?: string | undefined;
31
+ version?: string | undefined;
32
+ source: "installed" | "local" | "unresolved";
33
+ commit?: string | undefined;
34
+ dirty?: boolean | undefined;
35
+ }[];
36
+ } | undefined;
37
+ instance?: {
38
+ name: string;
39
+ issuer?: string | undefined;
40
+ url?: string | undefined;
41
+ } | undefined;
42
+ } | undefined;
43
+ };
44
+ pending: boolean;
45
+ receivedAt: string;
46
+ }[];
47
+ cursor?: string | undefined;
48
+ };
49
+ }, "authorized", false, false>>;
@@ -0,0 +1,14 @@
1
+ import { method } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { reportPageValue } from '../../issue/index.js';
4
+ import { ManageProject } from '../policies/manage-project.js';
5
+ export const listProjectReportsMethod = method({
6
+ description: 'Read one bounded page of original reports for this Project owner; resume the returned cursor with the same pending filter.',
7
+ auth: 'authorized',
8
+ policy: ({ check, self }) => check(ManageProject, self),
9
+ input: z.strictObject({
10
+ pending: z.boolean().optional(),
11
+ cursor: z.string().max(16_384).optional(),
12
+ }),
13
+ output: reportPageValue,
14
+ });
@@ -0,0 +1,41 @@
1
+ export declare const receiveProjectReportMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
+ title: string;
3
+ body: string;
4
+ context?: {
5
+ observedAt: string;
6
+ cli: {
7
+ version: string;
8
+ platform: string;
9
+ arch: string;
10
+ };
11
+ runtime: {
12
+ node: string;
13
+ bun?: string | undefined;
14
+ };
15
+ project?: {
16
+ name: string;
17
+ version?: string | undefined;
18
+ packages: {
19
+ name: string;
20
+ declared?: string | undefined;
21
+ version?: string | undefined;
22
+ source: "installed" | "local" | "unresolved";
23
+ commit?: string | undefined;
24
+ dirty?: boolean | undefined;
25
+ }[];
26
+ } | undefined;
27
+ instance?: {
28
+ name: string;
29
+ issuer?: string | undefined;
30
+ url?: string | undefined;
31
+ } | undefined;
32
+ } | undefined;
33
+ requestId: string;
34
+ reporterId: string;
35
+ }, {
36
+ readonly mode: 'value';
37
+ readonly value: {
38
+ id: string;
39
+ reference: string;
40
+ };
41
+ }, "authorized", false, false>>;
@@ -0,0 +1,10 @@
1
+ import { method } from '@astrale-os/sdk/schema';
2
+ import { receiveReportInput, reportReceiptValue } from '../../issue/index.js';
3
+ import { ManageProject } from '../policies/manage-project.js';
4
+ export const receiveProjectReportMethod = method({
5
+ description: 'Receive an idempotent report from a trusted Project owner integration, attributing its verified reporter without granting Project membership.',
6
+ auth: 'authorized',
7
+ policy: ({ check, self }) => check(ManageProject, self),
8
+ input: receiveReportInput,
9
+ output: reportReceiptValue,
10
+ });
@@ -5,9 +5,9 @@ export declare const Tag: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
5
5
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
6
6
  readonly properties: {
7
7
  slug: z.ZodString;
8
- color: import("@astrale-os/sdk/schema").Property<z.ZodString, {
8
+ color: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
9
9
  readonly required: false;
10
- }, never>;
10
+ }>;
11
11
  };
12
12
  readonly methods: {
13
13
  edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -8,9 +8,9 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
8
8
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
9
9
  readonly properties: {
10
10
  key: import("zod").ZodString;
11
- ownerId: import("@astrale-os/sdk/schema").Property<import("zod").ZodString, {}, never>;
12
- memberIds: import("@astrale-os/sdk/schema").Property<import("zod").ZodArray<import("zod").ZodString>, {}, never>;
13
- nextIssueNumber: import("@astrale-os/sdk/schema").Property<import("zod").ZodNumber, {}, never>;
11
+ ownerId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {}>;
12
+ memberIds: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodArray<import("zod").ZodString>, {}>;
13
+ nextIssueNumber: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodNumber, {}>;
14
14
  archived: import("zod").ZodBoolean;
15
15
  };
16
16
  readonly methods: {
@@ -102,6 +102,106 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
102
102
  archived: boolean;
103
103
  };
104
104
  }, "authorized", false, false>>;
105
+ receiveReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
106
+ title: string;
107
+ body: string;
108
+ context?: {
109
+ observedAt: string;
110
+ cli: {
111
+ version: string;
112
+ platform: string;
113
+ arch: string;
114
+ };
115
+ runtime: {
116
+ node: string;
117
+ bun?: string | undefined;
118
+ };
119
+ project?: {
120
+ name: string;
121
+ version?: string | undefined;
122
+ packages: {
123
+ name: string;
124
+ declared?: string | undefined;
125
+ version?: string | undefined;
126
+ source: "installed" | "local" | "unresolved";
127
+ commit?: string | undefined;
128
+ dirty?: boolean | undefined;
129
+ }[];
130
+ } | undefined;
131
+ instance?: {
132
+ name: string;
133
+ issuer?: string | undefined;
134
+ url?: string | undefined;
135
+ } | undefined;
136
+ } | undefined;
137
+ requestId: string;
138
+ reporterId: string;
139
+ }, {
140
+ readonly mode: 'value';
141
+ readonly value: {
142
+ id: string;
143
+ reference: string;
144
+ };
145
+ }, "authorized", false, false>>;
146
+ listReports: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
147
+ pending?: boolean | undefined;
148
+ cursor?: string | undefined;
149
+ }, {
150
+ readonly mode: 'value';
151
+ readonly value: {
152
+ reports: {
153
+ id: string;
154
+ reference: string;
155
+ reporterId: string;
156
+ content: {
157
+ title: string;
158
+ body: string;
159
+ context?: {
160
+ observedAt: string;
161
+ cli: {
162
+ version: string;
163
+ platform: string;
164
+ arch: string;
165
+ };
166
+ runtime: {
167
+ node: string;
168
+ bun?: string | undefined;
169
+ };
170
+ project?: {
171
+ name: string;
172
+ version?: string | undefined;
173
+ packages: {
174
+ name: string;
175
+ declared?: string | undefined;
176
+ version?: string | undefined;
177
+ source: "installed" | "local" | "unresolved";
178
+ commit?: string | undefined;
179
+ dirty?: boolean | undefined;
180
+ }[];
181
+ } | undefined;
182
+ instance?: {
183
+ name: string;
184
+ issuer?: string | undefined;
185
+ url?: string | undefined;
186
+ } | undefined;
187
+ } | undefined;
188
+ };
189
+ pending: boolean;
190
+ receivedAt: string;
191
+ }[];
192
+ cursor?: string | undefined;
193
+ };
194
+ }, "authorized", false, false>>;
195
+ completeReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
196
+ issueId: string;
197
+ duplicateCandidateId?: string | undefined;
198
+ }, {
199
+ readonly mode: 'value';
200
+ readonly value: {
201
+ issueId: string;
202
+ changed: boolean;
203
+ };
204
+ }, "authorized", false, false>>;
105
205
  createTag: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
106
206
  name: string;
107
207
  color?: string | undefined;
@@ -132,8 +232,8 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
132
232
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
133
233
  readonly properties: {
134
234
  reference: import("zod").ZodString;
135
- reporterId: import("@astrale-os/sdk/schema").Property<import("zod").ZodString, {}, never>;
136
- assigneeId: import("@astrale-os/sdk/schema").Property<import("zod").ZodOptional<import("zod").ZodString>, {}, never>;
235
+ reporterId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {}>;
236
+ assigneeId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodString>, {}>;
137
237
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
138
238
  readonly open: {
139
239
  readonly accept: "accepted";
@@ -163,6 +263,45 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
163
263
  }>;
164
264
  priority: import("zod").ZodNumber;
165
265
  archived: import("zod").ZodBoolean;
266
+ reportRequestId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodString>, {}>;
267
+ report: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodObject<{
268
+ title: import("zod").ZodString;
269
+ body: import("zod").ZodString;
270
+ context: import("zod").ZodOptional<import("zod").ZodObject<{
271
+ observedAt: import("zod").ZodString;
272
+ cli: import("zod").ZodObject<{
273
+ version: import("zod").ZodString;
274
+ platform: import("zod").ZodString;
275
+ arch: import("zod").ZodString;
276
+ }, import("zod/v4/core").$strict>;
277
+ runtime: import("zod").ZodObject<{
278
+ node: import("zod").ZodString;
279
+ bun: import("zod").ZodOptional<import("zod").ZodString>;
280
+ }, import("zod/v4/core").$strict>;
281
+ project: import("zod").ZodOptional<import("zod").ZodObject<{
282
+ name: import("zod").ZodString;
283
+ version: import("zod").ZodOptional<import("zod").ZodString>;
284
+ packages: import("zod").ZodArray<import("zod").ZodObject<{
285
+ name: import("zod").ZodString;
286
+ declared: import("zod").ZodOptional<import("zod").ZodString>;
287
+ version: import("zod").ZodOptional<import("zod").ZodString>;
288
+ source: import("zod").ZodEnum<{
289
+ installed: "installed";
290
+ local: "local";
291
+ unresolved: "unresolved";
292
+ }>;
293
+ commit: import("zod").ZodOptional<import("zod").ZodString>;
294
+ dirty: import("zod").ZodOptional<import("zod").ZodBoolean>;
295
+ }, import("zod/v4/core").$strict>>;
296
+ }, import("zod/v4/core").$strict>>;
297
+ instance: import("zod").ZodOptional<import("zod").ZodObject<{
298
+ name: import("zod").ZodString;
299
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
300
+ url: import("zod").ZodOptional<import("zod").ZodString>;
301
+ }, import("zod/v4/core").$strict>>;
302
+ }, import("zod/v4/core").$strict>>;
303
+ }, import("zod/v4/core").$strict>>, {}>;
304
+ reportPending: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodBoolean>, {}>;
166
305
  };
167
306
  readonly methods: {
168
307
  update: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -257,7 +396,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
257
396
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
258
397
  readonly properties: {
259
398
  body: import("zod").ZodString;
260
- authorId: import("@astrale-os/sdk/schema").Property<import("zod").ZodString, {}, never>;
399
+ authorId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {}>;
261
400
  };
262
401
  readonly methods: {
263
402
  edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -287,9 +426,9 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
287
426
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
288
427
  readonly properties: {
289
428
  slug: import("zod").ZodString;
290
- color: import("@astrale-os/sdk/schema").Property<import("zod").ZodString, {
429
+ color: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
291
430
  readonly required: false;
292
- }, never>;
431
+ }>;
293
432
  };
294
433
  readonly methods: {
295
434
  edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -415,6 +554,24 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
415
554
  };
416
555
  readonly effectiveProperties: never;
417
556
  }>;
557
+ readonly issue_duplicate_candidate: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
558
+ readonly depth: 0;
559
+ readonly abstract: false;
560
+ readonly extends: readonly [];
561
+ readonly properties: never;
562
+ readonly source: {
563
+ readonly as: "report";
564
+ readonly outgoing: "0..*";
565
+ };
566
+ readonly target: {
567
+ readonly as: "candidate";
568
+ readonly incoming: "0..*";
569
+ };
570
+ readonly constraints: {
571
+ readonly noSelf: true;
572
+ };
573
+ readonly effectiveProperties: never;
574
+ }>;
418
575
  readonly issue_has_comment: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
419
576
  readonly depth: 0;
420
577
  readonly abstract: false;
@@ -483,6 +640,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
483
640
  readonly policies: {
484
641
  readonly ManageProject: import("@astrale-os/sdk/schema").Policy;
485
642
  readonly ContributeToProject: import("@astrale-os/sdk/schema").Policy;
643
+ readonly TraverseDuplicateCandidate: import("@astrale-os/sdk/schema").Policy;
486
644
  readonly ContributeToIssue: import("@astrale-os/sdk/schema").Policy;
487
645
  readonly ContributeToTag: import("@astrale-os/sdk/schema").Policy;
488
646
  readonly ManageTag: import("@astrale-os/sdk/schema").Policy;
@@ -1,6 +1,6 @@
1
1
  import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
2
2
  import { Comment, comment_authored_by, issue_has_comment, ContributeToComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './modules/comment/index.js';
3
- import { Issue, ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
3
+ import { Issue, issue_duplicate_candidate, TraverseDuplicateCandidate, ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, 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_duplicate_candidate,
18
19
  issue_has_comment,
19
20
  comment_authored_by,
20
21
  project_contains_tag,
@@ -23,6 +24,7 @@ const classes = {
23
24
  const policies = {
24
25
  ManageProject,
25
26
  ContributeToProject,
27
+ TraverseDuplicateCandidate,
26
28
  ContributeToIssue,
27
29
  ContributeToTag,
28
30
  ManageTag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",
@@ -28,15 +28,15 @@
28
28
  "registry": "https://registry.npmjs.org/"
29
29
  },
30
30
  "dependencies": {
31
- "@astrale-os/sdk": "0.5.0-beta.131",
31
+ "@astrale-os/sdk": "0.6.0-beta.0",
32
32
  "zod": "4.4.3"
33
33
  },
34
34
  "devDependencies": {
35
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.134",
35
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.155",
36
36
  "@astrale-os/ox": ">=0.1.4 <1.0.0",
37
- "@astrale-os/shell": "0.5.0-beta.18",
38
- "@astrale-os/shell-react": "0.4.0-beta.17",
39
- "@astrale-os/ui": "0.3.0-beta.25",
37
+ "@astrale-os/shell": "0.6.0-beta.3",
38
+ "@astrale-os/shell-react": "0.5.0-beta.3",
39
+ "@astrale-os/ui": "0.3.0-beta.31",
40
40
  "@tailwindcss/vite": "^4.3.3",
41
41
  "@tanstack/react-router": "1.170.18",
42
42
  "@tanstack/router-plugin": "1.168.23",
@@ -46,7 +46,7 @@
46
46
  "@types/react": "^19.2.18",
47
47
  "@types/react-dom": "^19.2.4",
48
48
  "@vitejs/plugin-react": "^6.1.0",
49
- "bun": "1.4.0",
49
+ "bun": "1.4.2",
50
50
  "jsdom": "30.0.1",
51
51
  "mermaid": "^11.17.0",
52
52
  "oxlint": ">=1.79.0 <2.0.0",
@@ -58,7 +58,7 @@
58
58
  "type-fest": "^5.8.0",
59
59
  "typescript": "7.0.2",
60
60
  "vite": "^8.2.2",
61
- "vitest": "^4.1.11"
61
+ "vitest": "^5.0.1"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=22.13"