@astrale-domains/issues 0.4.4 → 0.4.6

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
@@ -14,7 +14,7 @@ Project
14
14
  contains Issues and Tags
15
15
 
16
16
  Issue
17
- immutable reference; title; optional description
17
+ immutable reference; title (100 characters); optional Markdown description (50,000 characters)
18
18
  status: open | accepted | resolved | deferred | closed
19
19
  priority: 0..4; optional assignee; optional acyclic parent; Tags
20
20
 
@@ -38,8 +38,9 @@ Tag.edit | delete
38
38
 
39
39
  `Tag.delete` remains one atomic Mutation through 2,046 linked Issues, the current supported Kernel
40
40
  execution ceiling after its containment and Node removals. Larger Tags must first be removed from
41
- enough Issues through `Issue.setTags`; the Workflow rejects them explicitly instead of submitting an
42
- oversized Mutation with a backend-dependent failure.
41
+ enough Issues through `Issue.setTags`; the Action rejects them explicitly
42
+ (`TAG_TOO_LARGE_TO_DELETE`) instead of submitting an oversized Mutation with a backend-dependent
43
+ failure.
43
44
 
44
45
  `Project.create` and `Project.list` require authentication. `Project.list` returns only Projects the
45
46
  caller owns or has joined, with their visible Issues and Comment threads nested for one CLI/agent
@@ -51,9 +52,16 @@ members contribute to Issues; an Issue's reporter edits its title and descriptio
51
52
  assignment, Tags, parent, and Comments remain collaborator operations. Issues and their Comments are
52
53
  visible through a Project the caller owns or has joined, and to the Issue's reporter.
53
54
 
55
+ An Issue's title is its Kernel `Named` name, which holds 100 characters. Its description is the
56
+ Issues-owned `body`, because Kernel `Descriptable` holds only 1,000 characters. An Issue described
57
+ before `body` existed keeps that description in `Descriptable` until its next revision moves it to
58
+ `body`; readers take `body` first, then the `Descriptable` description. Titles and descriptions are
59
+ stored without surrounding whitespace. Every callable refuses a longer title or description before
60
+ it runs, and refuses a blank title or a revision that names no field with a declared error.
61
+
54
62
  Ownership, membership, reporting, assignment, and authorship remain graph-native Policy facts. The
55
63
  owning Project, Issue, or Comment also stores the corresponding Identity IDs privately, updated in
56
- the same atomic Mutation as each edge. Recipes and Workflows can therefore validate current
64
+ the same atomic Mutation as each edge. Recipes and Actions can therefore validate current
57
65
  collaboration state without requesting authority over every possible concrete Identity subtype from
58
66
  another Domain.
59
67
  Those private execution fields are not a second public model and never replace the Policy edges.
@@ -64,12 +72,12 @@ supplies a verified `reporterId`, an opaque `requestId`, `title`, `body`, and op
64
72
  must not receive this privileged owner capability or Project membership.
65
73
 
66
74
  One atomic mutation allocates the number, creates the Issue and reporter/containment edges, retains
67
- the original report. A query precondition fences the exact
68
- Project/reporter/request triple. A retry with identical content returns the original `{ id, reference }`,
75
+ the original report exactly as received, and describes the Issue with its trimmed body. A query
76
+ precondition fences the exact Project/reporter/request triple. A retry with identical content returns the original `{ id, reference }`,
69
77
  even after triage edits or archival; changed content under the same key is rejected. Independent
70
78
  request IDs remain independent reports. Known counter/key contention is retried up to eight attempts;
71
79
  unknown outcomes propagate, so the sender must retain the original payload and key until confirmation.
72
- The inline Workflow runner is not the source of durability: the graph receipt and atomic preconditions are.
80
+ Durability comes from the graph receipt and atomic preconditions.
73
81
 
74
82
  Context describes current client observations, separate from mutable Issue text. Missing versions and
75
83
  instance coordinates remain unknown. Creating a report makes the sender the Issue's reporter, with
@@ -5,6 +5,10 @@ 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
+ body: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {
9
+ readonly required: false;
10
+ readonly description: "The Issue description, as Markdown.";
11
+ }>;
8
12
  reporterId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodString, {}>;
9
13
  assigneeId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodString>, {}>;
10
14
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
@@ -12,13 +12,20 @@ import { transitionIssueMethod } from '../functions/transition-issue.js';
12
12
  import { updateIssueMethod } from '../functions/update-issue.js';
13
13
  import { ContributeToIssueOrReportedIssue } from '../policies/contribute-to-issue-or-reported-issue.js';
14
14
  import { issueStatus } from '../states/index.js';
15
+ import { issueDescriptionValue } from '../types/issue.js';
15
16
  import { reportContentValue } from '../types/report.js';
16
17
  export const Issue = nodeClass({
17
18
  description: 'One immutable-reference work item contained by exactly one Project.',
18
19
  icon: classIcon.lucide(CircleDot),
20
+ // Kernel `Descriptable` holds 1,000 characters: an Issue keeps it only for the descriptions it
21
+ // stored before `body`, which the next revision of each Issue moves to `body`.
19
22
  extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
20
23
  properties: {
21
24
  reference: z.string().min(1).max(32),
25
+ body: property(issueDescriptionValue.min(1), {
26
+ required: false,
27
+ description: 'The Issue description, as Markdown.',
28
+ }),
22
29
  reporterId: property(nodeIdValue, {}),
23
30
  assigneeId: property(nodeIdValue.optional(), {}),
24
31
  status: stateProperty(issueStatus),
@@ -1,14 +1,14 @@
1
1
  import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
3
  import { ReportedIssue } from '../policies/reported-issue.js';
4
- import { issueValue } from '../types/issue.js';
4
+ import { issueDescriptionValue, issueTitleValue, issueValue } from '../types/issue.js';
5
5
  export const editIssueMethod = method({
6
6
  description: 'Edit the title and description of this Issue as its reporter.',
7
7
  auth: 'authorized',
8
8
  policy: ({ check, self }) => check(ReportedIssue, self),
9
9
  input: z.strictObject({
10
- title: z.string().min(1).max(200).optional(),
11
- description: z.string().max(50_000).optional(),
10
+ title: issueTitleValue.optional(),
11
+ description: issueDescriptionValue.optional(),
12
12
  }),
13
13
  output: issueValue,
14
14
  });
@@ -1,14 +1,14 @@
1
1
  import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
3
  import { ContributeToIssue } from '../policies/contribute-to-issue.js';
4
- import { issueValue } from '../types/issue.js';
4
+ import { issueDescriptionValue, issueTitleValue, issueValue } from '../types/issue.js';
5
5
  export const updateIssueMethod = method({
6
6
  description: 'Update mutable Issue fields.',
7
7
  auth: 'authorized',
8
8
  policy: ({ check, self }) => check(ContributeToIssue, self),
9
9
  input: z.strictObject({
10
- title: z.string().min(1).max(200).optional(),
11
- description: z.string().max(50_000).optional(),
10
+ title: issueTitleValue.optional(),
11
+ description: issueDescriptionValue.optional(),
12
12
  priority: z.number().int().min(0).max(4).optional(),
13
13
  }),
14
14
  output: issueValue,
@@ -1,4 +1,4 @@
1
- export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
1
+ export { issueDescriptionValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
2
2
  export { issueStatus, type IssueEvent, type IssueStatus } from './states/index.js';
3
3
  export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
4
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
@@ -1,4 +1,4 @@
1
- export { issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './types/index.js';
1
+ export { issueDescriptionValue, issueTitleValue, 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
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
@@ -1,2 +1,2 @@
1
- export { issueValue } from './issue.js';
1
+ export { issueDescriptionValue, issueTitleValue, issueValue } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './report.js';
@@ -1,2 +1,2 @@
1
- export { issueValue } from './issue.js';
1
+ export { issueDescriptionValue, issueTitleValue, issueValue } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './report.js';
@@ -1,4 +1,8 @@
1
1
  import { z } from 'zod';
2
+ /** An Issue title. The Issue stores it as its Kernel `Named` name, which holds 100 characters. */
3
+ export declare const issueTitleValue: z.ZodString;
4
+ /** An Issue description, as Markdown; empty when the Issue has none. */
5
+ export declare const issueDescriptionValue: z.ZodString;
2
6
  export declare const issueValue: z.ZodObject<{
3
7
  id: z.ZodString;
4
8
  reference: z.ZodString;
@@ -1,11 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import { nodeIdValue } from '../../../types/index.js';
3
3
  import { issueStatus } from '../states/index.js';
4
+ /** An Issue title. The Issue stores it as its Kernel `Named` name, which holds 100 characters. */
5
+ export const issueTitleValue = z.string().min(1).max(100);
6
+ /** An Issue description, as Markdown; empty when the Issue has none. */
7
+ export const issueDescriptionValue = z.string().max(50_000);
4
8
  export const issueValue = z.strictObject({
5
9
  id: nodeIdValue,
6
10
  reference: z.string().min(1).max(32),
7
- title: z.string().min(1).max(200),
8
- description: z.string().max(50_000),
11
+ title: issueTitleValue,
12
+ description: issueDescriptionValue,
9
13
  status: issueStatus.stateSchema,
10
14
  priority: z.number().int().min(0).max(4),
11
15
  archived: z.boolean(),
@@ -33,6 +33,7 @@ export declare const reportContextValue: z.ZodObject<{
33
33
  url: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$strict>>;
35
35
  }, z.core.$strict>;
36
+ /** One report exactly as received, retained on its Issue; earlier reports admitted 200-character titles. */
36
37
  export declare const reportContentValue: z.ZodObject<{
37
38
  title: z.ZodString;
38
39
  body: z.ZodString;
@@ -71,7 +72,6 @@ export declare const reportContentValue: z.ZodObject<{
71
72
  }, z.core.$strict>>;
72
73
  }, z.core.$strict>;
73
74
  export declare const receiveReportInput: z.ZodObject<{
74
- title: z.ZodString;
75
75
  body: z.ZodString;
76
76
  context: z.ZodOptional<z.ZodObject<{
77
77
  observedAt: z.ZodString;
@@ -106,6 +106,7 @@ export declare const receiveReportInput: z.ZodObject<{
106
106
  url: z.ZodOptional<z.ZodString>;
107
107
  }, z.core.$strict>>;
108
108
  }, z.core.$strict>>;
109
+ title: z.ZodString;
109
110
  requestId: z.ZodString;
110
111
  reporterId: z.ZodString;
111
112
  }, z.core.$strict>;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { nodeIdValue } from '../../../types/index.js';
3
+ import { issueTitleValue } from './issue.js';
3
4
  const coordinate = z.string().min(1).max(2_048);
4
5
  const version = z.string().max(128);
5
6
  /** Observations at submission time; never evidence of a historical deployed build. */
@@ -31,12 +32,14 @@ export const reportContextValue = z.strictObject({
31
32
  })
32
33
  .optional(),
33
34
  });
35
+ /** One report exactly as received, retained on its Issue; earlier reports admitted 200-character titles. */
34
36
  export const reportContentValue = z.strictObject({
35
37
  title: z.string().min(1).max(200),
36
38
  body: z.string().min(1).max(50_000),
37
39
  context: reportContextValue.optional(),
38
40
  });
39
41
  export const receiveReportInput = reportContentValue.extend({
42
+ title: issueTitleValue,
40
43
  requestId: z.string().min(1).max(128),
41
44
  reporterId: nodeIdValue,
42
45
  });
@@ -100,7 +100,6 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
100
100
  };
101
101
  }, "authorized", false, false, undefined>>;
102
102
  receiveReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
103
- title: string;
104
103
  body: string;
105
104
  context?: {
106
105
  observedAt: string;
@@ -131,6 +130,7 @@ export declare const Project: import("@astrale-os/sdk/schema").AuthoredNodeClass
131
130
  url?: string | undefined;
132
131
  } | undefined;
133
132
  } | undefined;
133
+ title: string;
134
134
  requestId: string;
135
135
  reporterId: string;
136
136
  }, {
@@ -1,14 +1,14 @@
1
1
  import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
- import { issueValue } from '../../issue/index.js';
3
+ import { issueDescriptionValue, issueTitleValue, issueValue } from '../../issue/index.js';
4
4
  import { ContributeToProject } from '../policies/contribute-to-project.js';
5
5
  export const createProjectIssueMethod = method({
6
6
  description: 'Create one atomically numbered Issue in this Project.',
7
7
  auth: 'authorized',
8
8
  policy: ({ check, self }) => check(ContributeToProject, self),
9
9
  input: z.strictObject({
10
- title: z.string().min(1).max(200),
11
- description: z.string().max(50_000).optional(),
10
+ title: issueTitleValue,
11
+ description: issueDescriptionValue.optional(),
12
12
  priority: z.number().int().min(0).max(4).optional(),
13
13
  }),
14
14
  output: issueValue,
@@ -7,8 +7,8 @@ export const createProjectMethod = method({
7
7
  auth: 'authenticated',
8
8
  input: z.strictObject({
9
9
  key: z.string().min(1).max(40),
10
- name: z.string().min(1).max(120),
11
- description: z.string().max(5_000).optional(),
10
+ name: z.string().min(1).max(100),
11
+ description: z.string().max(1_000).optional(),
12
12
  }),
13
13
  output: projectValue,
14
14
  });
@@ -1,5 +1,4 @@
1
1
  export declare const receiveProjectReportMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
2
- title: string;
3
2
  body: string;
4
3
  context?: {
5
4
  observedAt: string;
@@ -30,6 +29,7 @@ export declare const receiveProjectReportMethod: import("@astrale-os/sdk/schema"
30
29
  url?: string | undefined;
31
30
  } | undefined;
32
31
  } | undefined;
32
+ title: string;
33
33
  requestId: string;
34
34
  reporterId: string;
35
35
  }, {
@@ -7,8 +7,8 @@ export const updateProjectMethod = method({
7
7
  auth: 'authorized',
8
8
  policy: ({ check, self }) => check(ManageProject, self),
9
9
  input: z.strictObject({
10
- name: z.string().min(1).max(120).optional(),
11
- description: z.string().max(5_000).optional(),
10
+ name: z.string().min(1).max(100).optional(),
11
+ description: z.string().max(1_000).optional(),
12
12
  }),
13
13
  output: projectValue,
14
14
  });
@@ -3,7 +3,7 @@ import { nodeIdValue } from '../../../types/index.js';
3
3
  export const projectValue = z.strictObject({
4
4
  id: nodeIdValue,
5
5
  key: z.string().min(2).max(10),
6
- name: z.string().min(1).max(120),
7
- description: z.string().max(5_000),
6
+ name: z.string().min(1).max(100),
7
+ description: z.string().max(1_000),
8
8
  archived: z.boolean(),
9
9
  });
@@ -105,7 +105,6 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
105
105
  };
106
106
  }, "authorized", false, false, undefined>>;
107
107
  receiveReport: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
108
- title: string;
109
108
  body: string;
110
109
  context?: {
111
110
  observedAt: string;
@@ -136,6 +135,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
136
135
  url?: string | undefined;
137
136
  } | undefined;
138
137
  } | undefined;
138
+ title: string;
139
139
  requestId: string;
140
140
  reporterId: string;
141
141
  }, {
@@ -176,6 +176,10 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
176
176
  readonly extends: readonly [import("@astrale-os/sdk/schema").KernelClass<"Named">, import("@astrale-os/sdk/schema").KernelClass<"Descriptable">, import("@astrale-os/sdk/schema").KernelClass<"Timestamped">];
177
177
  readonly properties: {
178
178
  reference: import("zod").ZodString;
179
+ body: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {
180
+ readonly required: false;
181
+ readonly description: "The Issue description, as Markdown.";
182
+ }>;
179
183
  reporterId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodString, {}>;
180
184
  assigneeId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodString>, {}>;
181
185
  status: import("@astrale-os/sdk/schema").StateProperty<import("@astrale-os/sdk/schema").StateMachine<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
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.28",
31
+ "@astrale-os/sdk": "0.6.0-beta.31",
32
32
  "zod": "4.4.3"
33
33
  },
34
34
  "devDependencies": {
35
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.183",
35
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.186",
36
36
  "@astrale-os/ox": ">=0.1.4 <1.0.0",
37
- "@astrale-os/shell": "0.7.0-beta.2",
38
- "@astrale-os/shell-react": "0.6.0-beta.3",
37
+ "@astrale-os/shell": "0.7.0-beta.5",
38
+ "@astrale-os/shell-react": "0.6.0-beta.4",
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",