@astrale-domains/issues 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/dist/schema/modules/comment/classes/comment.js +2 -2
- package/dist/schema/modules/comment/index.d.ts +1 -1
- package/dist/schema/modules/comment/index.js +1 -1
- package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.js +19 -0
- package/dist/schema/modules/comment/policies/index.d.ts +1 -1
- package/dist/schema/modules/comment/policies/index.js +1 -1
- package/dist/schema/modules/comment/policies/traverse-issue-comment.js +3 -3
- package/dist/schema/modules/issue/classes/issue.d.ts +15 -0
- package/dist/schema/modules/issue/classes/issue.js +4 -2
- package/dist/schema/modules/issue/functions/archive-issue.js +2 -2
- package/dist/schema/modules/issue/functions/edit-issue.d.ts +15 -0
- package/dist/schema/modules/issue/functions/edit-issue.js +14 -0
- package/dist/schema/modules/issue/functions/index.d.ts +1 -0
- package/dist/schema/modules/issue/functions/index.js +1 -0
- package/dist/schema/modules/issue/index.d.ts +2 -2
- package/dist/schema/modules/issue/index.js +2 -2
- package/dist/schema/modules/issue/policies/contribute-to-issue-or-reported-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/contribute-to-issue-or-reported-issue.js +16 -0
- package/dist/schema/modules/issue/policies/index.d.ts +2 -0
- package/dist/schema/modules/issue/policies/index.js +2 -0
- package/dist/schema/modules/issue/policies/reported-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/reported-issue.js +6 -0
- package/dist/schema/modules/issue/policies/traverse-issue-reporter.js +3 -2
- package/dist/schema/schema.d.ts +18 -1
- package/dist/schema/schema.js +5 -3
- package/package.json +5 -5
- package/dist/schema/modules/comment/policies/contribute-to-comment.d.ts +0 -1
- package/dist/schema/modules/comment/policies/contribute-to-comment.js +0 -12
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ The public callable surface keeps observation Project-owned and mutations receiv
|
|
|
31
31
|
Project.create
|
|
32
32
|
Project.list
|
|
33
33
|
Project.update | addMember | removeMember | createIssue | receiveReport | createTag | archive
|
|
34
|
-
Issue.update | transition | assign | setTags | setParent | addComment | archive
|
|
34
|
+
Issue.update | edit | transition | assign | setTags | setParent | addComment | archive
|
|
35
35
|
Comment.edit | delete
|
|
36
36
|
Tag.edit | delete
|
|
37
37
|
```
|
|
@@ -43,9 +43,13 @@ oversized Mutation with a backend-dependent failure.
|
|
|
43
43
|
|
|
44
44
|
`Project.create` and `Project.list` require authentication. `Project.list` returns only Projects the
|
|
45
45
|
caller owns or has joined, with their visible Issues and Comment threads nested for one CLI/agent
|
|
46
|
-
observation.
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
observation. A reporter observes its own Issues through the graph, under its own authority: from
|
|
47
|
+
its Identity through `issue_reported_by`, then each Issue's Comments. Receiver Methods use
|
|
48
|
+
Schema-owned Policies: Project owners administer metadata, membership, Tags, and archival; owners and
|
|
49
|
+
members contribute to Issues; an Issue's reporter edits its title and description through
|
|
50
|
+
`Issue.edit` and archives it; only a Comment author edits or deletes it. Priority, status,
|
|
51
|
+
assignment, Tags, parent, and Comments remain collaborator operations. Issues and their Comments are
|
|
52
|
+
visible through a Project the caller owns or has joined, and to the Issue's reporter.
|
|
49
53
|
|
|
50
54
|
Ownership, membership, reporting, assignment, and authorship remain graph-native Policy facts. The
|
|
51
55
|
owning Project, Issue, or Comment also stores the corresponding Identity IDs privately, updated in
|
|
@@ -68,7 +72,8 @@ unknown outcomes propagate, so the sender must retain the original payload and k
|
|
|
68
72
|
The inline Workflow runner is not the source of durability: the graph receipt and atomic preconditions are.
|
|
69
73
|
|
|
70
74
|
Context describes current client observations, separate from mutable Issue text. Missing versions and
|
|
71
|
-
instance coordinates remain unknown. Creating a report
|
|
75
|
+
instance coordinates remain unknown. Creating a report makes the sender the Issue's reporter, with
|
|
76
|
+
the reporter access above; it grants no Project membership and no access to other Issues or Tags.
|
|
72
77
|
The generic domain has no Admin dependency. Receiving a report performs no automatic triage,
|
|
73
78
|
duplicate matching, or background processing.
|
|
74
79
|
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
import { nodeIdValue } from '../../../types/index.js';
|
|
5
5
|
import { deleteCommentMethod } from '../functions/delete-comment.js';
|
|
6
6
|
import { editCommentMethod } from '../functions/edit-comment.js';
|
|
7
|
-
import {
|
|
7
|
+
import { ContributeToCommentOrReportedIssueOfComment } from '../policies/contribute-to-comment-or-reported-issue-of-comment.js';
|
|
8
8
|
export const Comment = nodeClass({
|
|
9
9
|
description: 'One authored discussion entry attached to an Issue.',
|
|
10
10
|
icon: classIcon.lucide(MessageSquare),
|
|
@@ -14,5 +14,5 @@ export const Comment = nodeClass({
|
|
|
14
14
|
authorId: property(nodeIdValue, {}),
|
|
15
15
|
},
|
|
16
16
|
methods: { edit: editCommentMethod, delete: deleteCommentMethod },
|
|
17
|
-
policies: { read: () =>
|
|
17
|
+
policies: { read: () => ContributeToCommentOrReportedIssueOfComment },
|
|
18
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { commentValue } from './types/index.js';
|
|
2
2
|
export { comment_authored_by, Comment, issue_has_comment } from './classes/index.js';
|
|
3
3
|
export { deleteCommentMethod, editCommentMethod } from './functions/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { ContributeToCommentOrReportedIssueOfComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './policies/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { commentValue } from './types/index.js';
|
|
2
2
|
export { comment_authored_by, Comment, issue_has_comment } from './classes/index.js';
|
|
3
3
|
export { deleteCommentMethod, editCommentMethod } from './functions/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { ContributeToCommentOrReportedIssueOfComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './policies/index.js';
|
package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ContributeToCommentOrReportedIssueOfComment: import("@astrale-os/sdk/schema").Policy;
|
package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Issue, issue_reported_by, 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 ContributeToCommentOrReportedIssueOfComment = policy({
|
|
6
|
+
description: 'The caller owns or belongs to the Project containing this Comment, or reported its Issue.',
|
|
7
|
+
match: ({ allOf, anyOf, edge, exists, object, subject }) => anyOf(exists(({ node }) => {
|
|
8
|
+
const project = node(() => Project);
|
|
9
|
+
const issue = node(() => Issue);
|
|
10
|
+
return allOf(edge({ source: subject, class: () => project_owned_by, target: project }), edge({ source: project, class: () => project_contains_issue, target: issue }), edge({ source: issue, class: () => issue_has_comment, target: object }));
|
|
11
|
+
}), exists(({ node }) => {
|
|
12
|
+
const project = node(() => Project);
|
|
13
|
+
const issue = node(() => Issue);
|
|
14
|
+
return allOf(edge({ source: subject, class: () => project_has_member, target: project }), edge({ source: project, class: () => project_contains_issue, target: issue }), edge({ source: issue, class: () => issue_has_comment, target: object }));
|
|
15
|
+
}), exists(({ node }) => {
|
|
16
|
+
const issue = node(() => Issue);
|
|
17
|
+
return allOf(edge({ source: subject, class: () => issue_reported_by, target: issue }), edge({ source: issue, class: () => issue_has_comment, target: object }));
|
|
18
|
+
})),
|
|
19
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ContributeToCommentOrReportedIssueOfComment } from './contribute-to-comment-or-reported-issue-of-comment.js';
|
|
2
2
|
export { EditOwnComment } from './edit-own-comment.js';
|
|
3
3
|
export { TraverseCommentRelationship } from './traverse-comment-relationship.js';
|
|
4
4
|
export { TraverseIssueComment } from './traverse-issue-comment.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ContributeToCommentOrReportedIssueOfComment } from './contribute-to-comment-or-reported-issue-of-comment.js';
|
|
2
2
|
export { EditOwnComment } from './edit-own-comment.js';
|
|
3
3
|
export { TraverseCommentRelationship } from './traverse-comment-relationship.js';
|
|
4
4
|
export { TraverseIssueComment } from './traverse-issue-comment.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { project_contains_issue } from '../../issue/index.js';
|
|
2
|
+
import { issue_reported_by, project_contains_issue } from '../../issue/index.js';
|
|
3
3
|
import { Project, project_has_member, project_owned_by } from '../../project/index.js';
|
|
4
4
|
export const TraverseIssueComment = policy({
|
|
5
|
-
description: 'Issue Comment containment is visible
|
|
5
|
+
description: 'Issue Comment containment is visible inside the containing Project and to the Issue reporter.',
|
|
6
6
|
match: ({ allOf, anyOf, edge, exists, source, subject }) => anyOf(exists(({ node }) => {
|
|
7
7
|
const project = node(() => Project);
|
|
8
8
|
return allOf(edge({ source: project, class: () => project_contains_issue, target: source }), edge({ source: subject, class: () => project_owned_by, target: project }));
|
|
9
9
|
}), exists(({ node }) => {
|
|
10
10
|
const project = node(() => Project);
|
|
11
11
|
return allOf(edge({ source: project, class: () => project_contains_issue, target: source }), edge({ source: subject, class: () => project_has_member, target: project }));
|
|
12
|
-
})),
|
|
12
|
+
}), edge({ source: subject, class: () => issue_reported_by, target: source })),
|
|
13
13
|
});
|
|
@@ -93,6 +93,21 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
|
|
|
93
93
|
archived: boolean;
|
|
94
94
|
};
|
|
95
95
|
}, "authorized", false, false, undefined>>;
|
|
96
|
+
edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
97
|
+
title?: string | undefined;
|
|
98
|
+
description?: string | undefined;
|
|
99
|
+
}, {
|
|
100
|
+
readonly mode: 'value';
|
|
101
|
+
readonly value: {
|
|
102
|
+
id: string;
|
|
103
|
+
reference: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
107
|
+
priority: number;
|
|
108
|
+
archived: boolean;
|
|
109
|
+
};
|
|
110
|
+
}, "authorized", false, false, undefined>>;
|
|
96
111
|
transition: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
97
112
|
event: "accept" | "close" | "defer" | "reopen" | "resolve";
|
|
98
113
|
}, {
|
|
@@ -5,11 +5,12 @@ import { nodeIdValue } from '../../../types/index.js';
|
|
|
5
5
|
import { addIssueCommentMethod } from '../functions/add-issue-comment.js';
|
|
6
6
|
import { archiveIssueMethod } from '../functions/archive-issue.js';
|
|
7
7
|
import { assignIssueMethod } from '../functions/assign-issue.js';
|
|
8
|
+
import { editIssueMethod } from '../functions/edit-issue.js';
|
|
8
9
|
import { setIssueParentMethod } from '../functions/set-issue-parent.js';
|
|
9
10
|
import { setIssueTagsMethod } from '../functions/set-issue-tags.js';
|
|
10
11
|
import { transitionIssueMethod } from '../functions/transition-issue.js';
|
|
11
12
|
import { updateIssueMethod } from '../functions/update-issue.js';
|
|
12
|
-
import {
|
|
13
|
+
import { ContributeToIssueOrReportedIssue } from '../policies/contribute-to-issue-or-reported-issue.js';
|
|
13
14
|
import { issueStatus } from '../states/index.js';
|
|
14
15
|
import { reportContentValue } from '../types/report.js';
|
|
15
16
|
export const Issue = nodeClass({
|
|
@@ -28,6 +29,7 @@ export const Issue = nodeClass({
|
|
|
28
29
|
},
|
|
29
30
|
methods: {
|
|
30
31
|
update: updateIssueMethod,
|
|
32
|
+
edit: editIssueMethod,
|
|
31
33
|
transition: transitionIssueMethod,
|
|
32
34
|
assign: assignIssueMethod,
|
|
33
35
|
setTags: setIssueTagsMethod,
|
|
@@ -35,5 +37,5 @@ export const Issue = nodeClass({
|
|
|
35
37
|
addComment: addIssueCommentMethod,
|
|
36
38
|
archive: archiveIssueMethod,
|
|
37
39
|
},
|
|
38
|
-
policies: { read: () =>
|
|
40
|
+
policies: { read: () => ContributeToIssueOrReportedIssue },
|
|
39
41
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { method } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ContributeToIssueOrReportedIssue } from '../policies/contribute-to-issue-or-reported-issue.js';
|
|
5
5
|
export const archiveIssueMethod = method({
|
|
6
6
|
description: 'Archive this Issue without deleting its discussion or relationships.',
|
|
7
7
|
auth: 'authorized',
|
|
8
|
-
policy: ({ check, self }) => check(
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssueOrReportedIssue, self),
|
|
9
9
|
input: z.strictObject({}),
|
|
10
10
|
output: z.strictObject({ issueId: nodeIdValue, archived: z.literal(true) }),
|
|
11
11
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const editIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
title?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
}, {
|
|
5
|
+
readonly mode: 'value';
|
|
6
|
+
readonly value: {
|
|
7
|
+
id: string;
|
|
8
|
+
reference: string;
|
|
9
|
+
title: string;
|
|
10
|
+
description: string;
|
|
11
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
12
|
+
priority: number;
|
|
13
|
+
archived: boolean;
|
|
14
|
+
};
|
|
15
|
+
}, "authorized", false, false, undefined>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ReportedIssue } from '../policies/reported-issue.js';
|
|
4
|
+
import { issueValue } from '../types/issue.js';
|
|
5
|
+
export const editIssueMethod = method({
|
|
6
|
+
description: 'Edit the title and description of this Issue as its reporter.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ReportedIssue, self),
|
|
9
|
+
input: z.strictObject({
|
|
10
|
+
title: z.string().min(1).max(200).optional(),
|
|
11
|
+
description: z.string().max(50_000).optional(),
|
|
12
|
+
}),
|
|
13
|
+
output: issueValue,
|
|
14
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { addIssueCommentMethod } from './add-issue-comment.js';
|
|
2
2
|
export { archiveIssueMethod } from './archive-issue.js';
|
|
3
3
|
export { assignIssueMethod } from './assign-issue.js';
|
|
4
|
+
export { editIssueMethod } from './edit-issue.js';
|
|
4
5
|
export { setIssueParentMethod } from './set-issue-parent.js';
|
|
5
6
|
export { setIssueTagsMethod } from './set-issue-tags.js';
|
|
6
7
|
export { transitionIssueMethod } from './transition-issue.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { addIssueCommentMethod } from './add-issue-comment.js';
|
|
2
2
|
export { archiveIssueMethod } from './archive-issue.js';
|
|
3
3
|
export { assignIssueMethod } from './assign-issue.js';
|
|
4
|
+
export { editIssueMethod } from './edit-issue.js';
|
|
4
5
|
export { setIssueParentMethod } from './set-issue-parent.js';
|
|
5
6
|
export { setIssueTagsMethod } from './set-issue-tags.js';
|
|
6
7
|
export { transitionIssueMethod } from './transition-issue.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
|
|
2
2
|
export { issueStatus, type IssueEvent, type IssueStatus } from './states/index.js';
|
|
3
3
|
export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
|
|
4
|
-
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
5
|
-
export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
4
|
+
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
5
|
+
export { ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './types/index.js';
|
|
2
2
|
export { issueStatus } from './states/index.js';
|
|
3
3
|
export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
|
|
4
|
-
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
5
|
-
export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
4
|
+
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
5
|
+
export { ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ContributeToIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Project, project_has_member, project_owned_by } from '../../project/index.js';
|
|
3
|
+
import { issue_reported_by } from '../classes/issue-reported-by.js';
|
|
4
|
+
import { project_contains_issue } from '../classes/project-contains-issue.js';
|
|
5
|
+
// Flat rather than `policy.anyOf(ContributeToIssue, ReportedIssue)`: composition adds one level to
|
|
6
|
+
// the depth-4 collaborator walk, above the Pattern depth budget.
|
|
7
|
+
export const ContributeToIssueOrReportedIssue = policy({
|
|
8
|
+
description: 'The caller owns or belongs to the Project containing this Issue, or is its immutable reporter.',
|
|
9
|
+
match: ({ allOf, anyOf, edge, exists, object, subject }) => anyOf(exists(({ node }) => {
|
|
10
|
+
const project = node(() => Project);
|
|
11
|
+
return allOf(edge({ source: subject, class: () => project_owned_by, target: project }), edge({ source: project, class: () => project_contains_issue, target: object }));
|
|
12
|
+
}), exists(({ node }) => {
|
|
13
|
+
const project = node(() => Project);
|
|
14
|
+
return allOf(edge({ source: subject, class: () => project_has_member, target: project }), edge({ source: project, class: () => project_contains_issue, target: object }));
|
|
15
|
+
}), edge({ source: subject, class: () => issue_reported_by, target: object })),
|
|
16
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { ContributeToIssue } from './contribute-to-issue.js';
|
|
2
|
+
export { ContributeToIssueOrReportedIssue } from './contribute-to-issue-or-reported-issue.js';
|
|
3
|
+
export { ReportedIssue } from './reported-issue.js';
|
|
2
4
|
export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
|
|
3
5
|
export { TraverseIssueParent } from './traverse-issue-parent.js';
|
|
4
6
|
export { TraverseIssueReporter } from './traverse-issue-reporter.js';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { ContributeToIssue } from './contribute-to-issue.js';
|
|
2
|
+
export { ContributeToIssueOrReportedIssue } from './contribute-to-issue-or-reported-issue.js';
|
|
3
|
+
export { ReportedIssue } from './reported-issue.js';
|
|
2
4
|
export { TraverseIssueAssignee } from './traverse-issue-assignee.js';
|
|
3
5
|
export { TraverseIssueParent } from './traverse-issue-parent.js';
|
|
4
6
|
export { TraverseIssueReporter } from './traverse-issue-reporter.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { issue_reported_by } from '../classes/issue-reported-by.js';
|
|
3
|
+
export const ReportedIssue = policy({
|
|
4
|
+
description: 'The caller is the immutable reporter of this Issue.',
|
|
5
|
+
match: ({ edge, object, subject }) => edge({ source: subject, class: () => issue_reported_by, target: object }),
|
|
6
|
+
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { Project, project_has_member, project_owned_by } from '../../project/index.js';
|
|
3
|
+
import { issue_reported_by } from '../classes/issue-reported-by.js';
|
|
3
4
|
import { project_contains_issue } from '../classes/project-contains-issue.js';
|
|
4
5
|
export const TraverseIssueReporter = policy({
|
|
5
|
-
description: 'Issue reporter relationships are visible
|
|
6
|
+
description: 'Issue reporter relationships are visible inside the containing Project and to the reporter.',
|
|
6
7
|
match: ({ allOf, anyOf, edge, exists, subject, target }) => anyOf(exists(({ node }) => {
|
|
7
8
|
const project = node(() => Project);
|
|
8
9
|
return allOf(edge({ source: project, class: () => project_contains_issue, target }), edge({ source: subject, class: () => project_owned_by, target: project }));
|
|
9
10
|
}), exists(({ node }) => {
|
|
10
11
|
const project = node(() => Project);
|
|
11
12
|
return allOf(edge({ source: project, class: () => project_contains_issue, target }), edge({ source: subject, class: () => project_has_member, target: project }));
|
|
12
|
-
})),
|
|
13
|
+
}), edge({ source: subject, class: () => issue_reported_by, target })),
|
|
13
14
|
});
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -263,6 +263,21 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
263
263
|
archived: boolean;
|
|
264
264
|
};
|
|
265
265
|
}, "authorized", false, false, undefined>>;
|
|
266
|
+
edit: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
267
|
+
title?: string | undefined;
|
|
268
|
+
description?: string | undefined;
|
|
269
|
+
}, {
|
|
270
|
+
readonly mode: 'value';
|
|
271
|
+
readonly value: {
|
|
272
|
+
id: string;
|
|
273
|
+
reference: string;
|
|
274
|
+
title: string;
|
|
275
|
+
description: string;
|
|
276
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
277
|
+
priority: number;
|
|
278
|
+
archived: boolean;
|
|
279
|
+
};
|
|
280
|
+
}, "authorized", false, false, undefined>>;
|
|
266
281
|
transition: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
267
282
|
event: "accept" | "close" | "defer" | "reopen" | "resolve";
|
|
268
283
|
}, {
|
|
@@ -566,9 +581,11 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
566
581
|
readonly ManageProject: import("@astrale-os/sdk/schema").Policy;
|
|
567
582
|
readonly ContributeToProject: import("@astrale-os/sdk/schema").Policy;
|
|
568
583
|
readonly ContributeToIssue: import("@astrale-os/sdk/schema").Policy;
|
|
584
|
+
readonly ReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
585
|
+
readonly ContributeToIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
569
586
|
readonly ContributeToTag: import("@astrale-os/sdk/schema").Policy;
|
|
570
587
|
readonly ManageTag: import("@astrale-os/sdk/schema").Policy;
|
|
571
|
-
readonly
|
|
588
|
+
readonly ContributeToCommentOrReportedIssueOfComment: import("@astrale-os/sdk/schema").Policy;
|
|
572
589
|
readonly EditOwnComment: import("@astrale-os/sdk/schema").Policy;
|
|
573
590
|
readonly TraverseProjectOwner: import("@astrale-os/sdk/schema").Policy;
|
|
574
591
|
readonly TraverseProjectMember: import("@astrale-os/sdk/schema").Policy;
|
package/dist/schema/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { Comment, comment_authored_by, issue_has_comment,
|
|
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';
|
|
2
|
+
import { Comment, comment_authored_by, issue_has_comment, ContributeToCommentOrReportedIssueOfComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './modules/comment/index.js';
|
|
3
|
+
import { Issue, ContributeToIssue, ContributeToIssueOrReportedIssue, ReportedIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
|
|
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';
|
|
@@ -24,9 +24,11 @@ const policies = {
|
|
|
24
24
|
ManageProject,
|
|
25
25
|
ContributeToProject,
|
|
26
26
|
ContributeToIssue,
|
|
27
|
+
ReportedIssue,
|
|
28
|
+
ContributeToIssueOrReportedIssue,
|
|
27
29
|
ContributeToTag,
|
|
28
30
|
ManageTag,
|
|
29
|
-
|
|
31
|
+
ContributeToCommentOrReportedIssueOfComment,
|
|
30
32
|
EditOwnComment,
|
|
31
33
|
TraverseProjectOwner,
|
|
32
34
|
TraverseProjectMember,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/issues",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@astrale-os/sdk": "0.6.0-beta.
|
|
31
|
+
"@astrale-os/sdk": "0.6.0-beta.28",
|
|
32
32
|
"zod": "4.4.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@astrale-os/adapter-cloudflare": "0.5.0-beta.
|
|
35
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.183",
|
|
36
36
|
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
37
|
-
"@astrale-os/shell": "0.7.0-beta.
|
|
38
|
-
"@astrale-os/shell-react": "0.6.0-beta.
|
|
37
|
+
"@astrale-os/shell": "0.7.0-beta.2",
|
|
38
|
+
"@astrale-os/shell-react": "0.6.0-beta.3",
|
|
39
39
|
"@astrale-os/ui": "1.0.0-beta.32",
|
|
40
40
|
"@tailwindcss/vite": "^4.3.3",
|
|
41
41
|
"@tanstack/react-router": "1.170.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToComment: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,12 +0,0 @@
|
|
|
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 '../classes/issue-has-comment.js';
|
|
5
|
-
export const ContributeToComment = policy({
|
|
6
|
-
description: 'The caller owns or belongs to the Project containing this Comment.',
|
|
7
|
-
match: ({ allOf, anyOf, edge, exists, object, subject }) => exists(({ node }) => {
|
|
8
|
-
const project = node(() => Project);
|
|
9
|
-
const issue = node(() => Issue);
|
|
10
|
-
return allOf(anyOf(edge({ source: subject, class: () => project_owned_by, target: project }), edge({ source: subject, class: () => project_has_member, target: project })), edge({ source: project, class: () => project_contains_issue, target: issue }), edge({ source: issue, class: () => issue_has_comment, target: object }));
|
|
11
|
-
}),
|
|
12
|
-
});
|