@astrale-domains/issues 0.7.5 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ Issue
18
18
  status: open | accepted | resolved | closed
19
19
  priority: no priority, low, medium, high, urgent (0..4); optional assignee; optional acyclic parent; Tags
20
20
  tracked by at most one other Issue, in any Project
21
- about at most 32 Nodes, of any Domain
21
+ about at most 32 Nodes, of any Domain, each named on its link (200 characters)
22
22
 
23
23
  Comment
24
24
  body; immutable author; belongs to one Issue
@@ -127,11 +127,15 @@ Other creation methods retain their existing retry semantics. Set-style changes
127
127
  stale concurrent edits reject through atomic mutation preconditions.
128
128
 
129
129
  An Issue is about Nodes of any Domain, such as a Product or an Area, through `issue_is_about`; the
130
- Issues Schema names no other Domain. `Issue.setTopics` replaces the whole set under the same Policy
131
- as its Tags, and reads each Node under the caller's authority: a Node the caller may not read is
132
- refused exactly as one that does not exist (`INVALID_ISSUE_TOPIC`). The links are visible inside
133
- the Issue's Project; a reader who may not read the Node sees the link alone, as hidden. Deleting
134
- the Node, or uninstalling its Domain destructively, removes the links with it.
130
+ Issues Schema names no other Domain. Each link carries the name the Issue shows for its Node, and
131
+ the Issues never read the Node itself. `Issue.setTopics` replaces the whole set, each Node with its
132
+ name, under the same Policy as its Tags. It looks each newly linked Node up under the caller's
133
+ authority, which must traverse it but need not read it: a Node the caller may not traverse is
134
+ refused exactly as one that does not exist (`INVALID_ISSUE_TOPIC`); a Node named twice
135
+ (`DUPLICATE_ISSUE_TOPIC`) and a name blank once trimmed or past 200 characters
136
+ (`INVALID_ISSUE_TOPIC_NAME`) are refused too. The links are visible inside the Issue's Project, each
137
+ by its name and the Node's Class, whatever the reader may read of the Node. Deleting the Node, or
138
+ uninstalling its Domain destructively, removes the links with it.
135
139
 
136
140
  ## View
137
141
 
@@ -1,12 +1,17 @@
1
1
  /**
2
2
  * Its target end accepts any Node, so it derives `detach`: deleting the Node, or uninstalling its
3
3
  * Domain with its data, removes the Edge and leaves the Issue as it was.
4
+ *
5
+ * The Edge carries the name the Issue shows for its Node: whoever reads the Edge reads that name,
6
+ * and the Issue never reads the Node itself, which its readers may not be allowed to read.
4
7
  */
5
8
  export declare const issue_is_about: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
6
9
  readonly depth: 0;
7
10
  readonly abstract: false;
8
11
  readonly extends: readonly [];
9
- readonly properties: never;
12
+ readonly properties: {
13
+ readonly name: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "name", "self", undefined>;
14
+ };
10
15
  readonly source: {
11
16
  readonly as: "issue";
12
17
  readonly accepts: readonly (() => {
@@ -26,5 +31,5 @@ export declare const issue_is_about: import("@astrale-os/sdk/schema").DirectedEd
26
31
  readonly incoming: "0..*";
27
32
  };
28
33
  readonly constraints: Record<never, never>;
29
- readonly effectiveProperties: never;
34
+ readonly effectiveProperties: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "name", "self", undefined>;
30
35
  }>;
@@ -1,14 +1,21 @@
1
1
  import { K, edgeClass } from '@astrale-os/sdk/schema';
2
2
  import { ownsOrBelongsToProjectOfIssueWithTopic } from '../policies/owns-or-belongs-to-project-of-issue-with-topic.js';
3
+ import { issueTopicNameValue } from '../types/issue.js';
3
4
  import { Issue } from './issue.js';
4
5
  /**
5
6
  * Its target end accepts any Node, so it derives `detach`: deleting the Node, or uninstalling its
6
7
  * Domain with its data, removes the Edge and leaves the Issue as it was.
8
+ *
9
+ * The Edge carries the name the Issue shows for its Node: whoever reads the Edge reads that name,
10
+ * and the Issue never reads the Node itself, which its readers may not be allowed to read.
7
11
  */
8
12
  export const issue_is_about = edgeClass.directed({
9
13
  description: 'One Issue is about one Node of any Domain: a Product, an Area, another Issue…',
10
14
  source: { as: 'issue', accepts: [() => Issue], outgoing: '0..*' },
11
15
  target: { as: 'topic', accepts: [K.classes.Node], incoming: '0..*' },
16
+ properties: {
17
+ name: issueTopicNameValue,
18
+ },
12
19
  policies: {
13
20
  read: () => ownsOrBelongsToProjectOfIssueWithTopic,
14
21
  traverse: () => ownsOrBelongsToProjectOfIssueWithTopic,
@@ -148,12 +148,18 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
148
148
  };
149
149
  }, "authorized", false, false, undefined, undefined>>;
150
150
  setTopics: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
151
- topicIds: string[];
151
+ topics: {
152
+ id: string;
153
+ name: string;
154
+ }[];
152
155
  }, {
153
156
  readonly mode: 'value';
154
157
  readonly value: {
155
158
  issueId: string;
156
- topicIds: string[];
159
+ topics: {
160
+ id: string;
161
+ name: string;
162
+ }[];
157
163
  };
158
164
  }, "authorized", false, false, undefined, undefined>>;
159
165
  setParent: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -1,9 +1,15 @@
1
1
  export declare const setIssueTopicsMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
- topicIds: string[];
2
+ topics: {
3
+ id: string;
4
+ name: string;
5
+ }[];
3
6
  }, {
4
7
  readonly mode: 'value';
5
8
  readonly value: {
6
9
  issueId: string;
7
- topicIds: string[];
10
+ topics: {
11
+ id: string;
12
+ name: string;
13
+ }[];
8
14
  };
9
15
  }, "authorized", false, false, undefined, undefined>>;
@@ -2,11 +2,11 @@ import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
3
  import { nodeIdValue } from '../../../types/index.js';
4
4
  import { ownsOrBelongsToProjectOfIssue } from '../policies/owns-or-belongs-to-project-of-issue.js';
5
- import { MAX_ISSUE_TOPICS } from '../types/index.js';
5
+ import { issueTopicValue, MAX_ISSUE_TOPICS } from '../types/index.js';
6
6
  export const setIssueTopicsMethod = method({
7
- description: 'Replace the set of Nodes this Issue is about with an exact set the caller may read.',
7
+ description: 'Replace the Nodes this Issue is about, and the name it shows for each, with Nodes the caller may traverse.',
8
8
  auth: 'authorized',
9
9
  policy: ({ check, self }) => check(ownsOrBelongsToProjectOfIssue, self),
10
- input: z.strictObject({ topicIds: z.array(nodeIdValue).max(MAX_ISSUE_TOPICS) }),
11
- output: z.strictObject({ issueId: nodeIdValue, topicIds: z.array(nodeIdValue) }),
10
+ input: z.strictObject({ topics: z.array(issueTopicValue).max(MAX_ISSUE_TOPICS) }),
11
+ output: z.strictObject({ issueId: nodeIdValue, topics: z.array(issueTopicValue) }),
12
12
  });
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS, MAX_ISSUE_TOPICS, } from './issue.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueTopicNameValue, issueTopicValue, issueValue, MAX_ISSUE_TAGS, MAX_ISSUE_TOPICS, } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './report.js';
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS, MAX_ISSUE_TOPICS, } from './issue.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueTopicNameValue, issueTopicValue, issueValue, MAX_ISSUE_TAGS, MAX_ISSUE_TOPICS, } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './report.js';
@@ -5,6 +5,17 @@ export declare const issueTitleValue: z.ZodString;
5
5
  export declare const MAX_ISSUE_TAGS = 128;
6
6
  /** The Nodes one Issue is about at most: `Issue.setTopics` is the only call that sets them. */
7
7
  export declare const MAX_ISSUE_TOPICS = 32;
8
+ /**
9
+ * The name an Issue shows for one Node it is about, kept on the link so that every reader of the
10
+ * Issue reads it, whether or not they may read the Node. The bound is the one the Shell sets on a
11
+ * selected Node's name (`NODE_NAME_MAXIMUM_LENGTH` of `@astrale-os/shell`), so any such name fits.
12
+ */
13
+ export declare const issueTopicNameValue: z.ZodString;
14
+ /** One Node an Issue is about, with the name the Issue shows for it. */
15
+ export declare const issueTopicValue: z.ZodObject<{
16
+ id: z.ZodString;
17
+ name: z.ZodString;
18
+ }, z.core.$strict>;
8
19
  /** How urgent an Issue is: 0 is no priority, then 1 low, 2 medium, 3 high and 4 urgent. */
9
20
  export declare const issuePriorityValue: z.ZodNumber;
10
21
  /** An Issue description, as Markdown; empty when the Issue has none. */
@@ -7,6 +7,14 @@ export const issueTitleValue = z.string().min(1).max(100);
7
7
  export const MAX_ISSUE_TAGS = 128;
8
8
  /** The Nodes one Issue is about at most: `Issue.setTopics` is the only call that sets them. */
9
9
  export const MAX_ISSUE_TOPICS = 32;
10
+ /**
11
+ * The name an Issue shows for one Node it is about, kept on the link so that every reader of the
12
+ * Issue reads it, whether or not they may read the Node. The bound is the one the Shell sets on a
13
+ * selected Node's name (`NODE_NAME_MAXIMUM_LENGTH` of `@astrale-os/shell`), so any such name fits.
14
+ */
15
+ export const issueTopicNameValue = z.string().min(1).max(200);
16
+ /** One Node an Issue is about, with the name the Issue shows for it. */
17
+ export const issueTopicValue = z.strictObject({ id: nodeIdValue, name: issueTopicNameValue });
10
18
  /** How urgent an Issue is: 0 is no priority, then 1 low, 2 medium, 3 high and 4 urgent. */
11
19
  export const issuePriorityValue = z.number().int().min(0).max(4);
12
20
  /** An Issue description, as Markdown; empty when the Issue has none. */
@@ -302,12 +302,18 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
302
302
  };
303
303
  }, "authorized", false, false, undefined, undefined>>;
304
304
  setTopics: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
305
- topicIds: string[];
305
+ topics: {
306
+ id: string;
307
+ name: string;
308
+ }[];
306
309
  }, {
307
310
  readonly mode: 'value';
308
311
  readonly value: {
309
312
  issueId: string;
310
- topicIds: string[];
313
+ topics: {
314
+ id: string;
315
+ name: string;
316
+ }[];
311
317
  };
312
318
  }, "authorized", false, false, undefined, undefined>>;
313
319
  setParent: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -754,7 +760,9 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
754
760
  readonly depth: 0;
755
761
  readonly abstract: false;
756
762
  readonly extends: readonly [];
757
- readonly properties: never;
763
+ readonly properties: {
764
+ readonly name: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "name", "self", undefined>;
765
+ };
758
766
  readonly source: {
759
767
  readonly as: "issue";
760
768
  readonly accepts: readonly (() => {
@@ -774,7 +782,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
774
782
  readonly incoming: "0..*";
775
783
  };
776
784
  readonly constraints: Record<never, never>;
777
- readonly effectiveProperties: never;
785
+ readonly effectiveProperties: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "name", "self", undefined>;
778
786
  }>;
779
787
  };
780
788
  readonly policies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.7.5",
3
+ "version": "0.8.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",
@@ -35,8 +35,8 @@
35
35
  "@astrale-os/adapter-cloudflare": "0.5.0-beta.217",
36
36
  "@astrale-os/ox": ">=0.1.4 <1.0.0",
37
37
  "@astrale-os/sdk": "0.6.0-beta.62",
38
- "@astrale-os/shell": "0.7.0-beta.12",
39
- "@astrale-os/shell-react": "0.6.0-beta.11",
38
+ "@astrale-os/shell": "0.7.0-beta.21",
39
+ "@astrale-os/shell-react": "0.6.0-beta.19",
40
40
  "@astrale-os/ui": "1.0.0-beta.43",
41
41
  "@fontsource-variable/geist": "5.3.0",
42
42
  "@tailwindcss/vite": "^4.3.3",