@xnetjs/data 0.0.2 → 0.0.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.
Files changed (137) hide show
  1. package/README.md +112 -0
  2. package/dist/account-BZHETMC4.js +12 -0
  3. package/dist/auth/index.d.ts +413 -0
  4. package/dist/auth/index.js +102 -0
  5. package/dist/budget-WR2Q4YH3.js +12 -0
  6. package/dist/canvas-HFMMVQLD.js +10 -0
  7. package/dist/channel-DXDYJ3ZH.js +12 -0
  8. package/dist/chat-message-QUUQGXEW.js +10 -0
  9. package/dist/chunk-2DSDH2ZH.js +52 -0
  10. package/dist/chunk-337E3ZOB.js +54 -0
  11. package/dist/chunk-37267RSF.js +41 -0
  12. package/dist/chunk-3JKW6TDE.js +66 -0
  13. package/dist/chunk-3RB2FMMO.js +148 -0
  14. package/dist/{chunk-BQBPA5HS.js → chunk-4U4KBCDN.js} +16 -2
  15. package/dist/chunk-4UQTURCD.js +722 -0
  16. package/dist/chunk-54Y7QRZN.js +109 -0
  17. package/dist/chunk-5FHJE7RC.js +46 -0
  18. package/dist/chunk-64AM6JPM.js +40 -0
  19. package/dist/chunk-6CN53PON.js +143 -0
  20. package/dist/chunk-6GB7PBCR.js +40 -0
  21. package/dist/chunk-6OPZJ7MG.js +78 -0
  22. package/dist/{chunk-IDMBCRUC.js → chunk-77UDLVQY.js} +1 -1
  23. package/dist/chunk-7GMJOAPF.js +52 -0
  24. package/dist/chunk-7PDRDSFH.js +69 -0
  25. package/dist/chunk-C5IRSEEZ.js +69 -0
  26. package/dist/chunk-CHZUSBSB.js +45 -0
  27. package/dist/chunk-DOZJXPQ6.js +232 -0
  28. package/dist/chunk-DTPSTMUD.js +105 -0
  29. package/dist/chunk-E6S557NC.js +402 -0
  30. package/dist/chunk-EIQX7INF.js +45 -0
  31. package/dist/chunk-ENTHVNOC.js +57 -0
  32. package/dist/chunk-EZA5UT4Y.js +5543 -0
  33. package/dist/chunk-GR3NDMBY.js +76 -0
  34. package/dist/chunk-GWYVY2K4.js +63 -0
  35. package/dist/chunk-IJ675GJR.js +42 -0
  36. package/dist/chunk-IP4BEVVD.js +57 -0
  37. package/dist/chunk-J4IVJA5M.js +102 -0
  38. package/dist/chunk-J6EDPPH4.js +84 -0
  39. package/dist/{chunk-SZC345Z2.js → chunk-JESSJ5CZ.js} +1015 -1110
  40. package/dist/chunk-JO6Y4E5V.js +73 -0
  41. package/dist/chunk-KPVBKKZS.js +47 -0
  42. package/dist/chunk-KTJLFJEQ.js +43 -0
  43. package/dist/chunk-L66WXPTW.js +32 -0
  44. package/dist/chunk-LGD72FVD.js +48 -0
  45. package/dist/chunk-O64EK5FK.js +887 -0
  46. package/dist/chunk-PMUQACPY.js +33 -0
  47. package/dist/chunk-PSUJEKVV.js +1722 -0
  48. package/dist/chunk-QVZXXJSP.js +6122 -0
  49. package/dist/chunk-QWFTRZQT.js +142 -0
  50. package/dist/chunk-RSSZXCLL.js +51 -0
  51. package/dist/chunk-S4B5OPZU.js +415 -0
  52. package/dist/{chunk-VYR5GPJP.js → chunk-SPFKSTPT.js} +9 -3
  53. package/dist/chunk-U6CBYDVZ.js +50 -0
  54. package/dist/chunk-UDUPQKRB.js +49 -0
  55. package/dist/chunk-V6HZ3LF3.js +380 -0
  56. package/dist/chunk-WMSCEBFH.js +64 -0
  57. package/dist/chunk-WUR3WWQM.js +65 -0
  58. package/dist/chunk-XHEA5UER.js +75 -0
  59. package/dist/chunk-XTUGZSYQ.js +75 -0
  60. package/dist/chunk-XWA3CJQ6.js +45 -0
  61. package/dist/chunk-YEQ6LLUY.js +49 -0
  62. package/dist/chunk-YWN27MLD.js +47 -0
  63. package/dist/chunk-YXZGYLKV.js +65 -0
  64. package/dist/chunk-ZICIXDEE.js +54 -0
  65. package/dist/chunk-ZMCO3O2Z.js +70 -0
  66. package/dist/clone-DpbVKLUu.d.ts +2205 -0
  67. package/dist/comment-Y2Y3QYYI.js +10 -0
  68. package/dist/crm-AAJXYIJY.js +68 -0
  69. package/dist/dashboard-3DC6B4BJ.js +10 -0
  70. package/dist/database/index.d.ts +882 -0
  71. package/dist/database/index.js +523 -0
  72. package/dist/database-DRGL5UYS.js +10 -0
  73. package/dist/database-field-F47FY3XX.js +10 -0
  74. package/dist/database-row-77OXW2NF.js +10 -0
  75. package/dist/database-select-option-6S3TTA7A.js +10 -0
  76. package/dist/database-view-YW7DQG5X.js +10 -0
  77. package/dist/experiment-TJOAL3OH.js +10 -0
  78. package/dist/external-item-D654PKLI.js +14 -0
  79. package/dist/external-reference-K5SUJIQN.js +8 -0
  80. package/dist/feed-L23XTNDI.js +12 -0
  81. package/dist/feed-item-GSO242J6.js +12 -0
  82. package/dist/folder-ONKSWHUT.js +21 -0
  83. package/dist/game-BF7DP5JU.js +50 -0
  84. package/dist/grant-NNKMWXPX.js +8 -0
  85. package/dist/grant-expiration-cleaner-DBiNTWbD.d.ts +249 -0
  86. package/dist/import-batch-JMESZ4VI.js +12 -0
  87. package/dist/inbox-state-AN6FPCIY.js +12 -0
  88. package/dist/index.d.ts +224 -4548
  89. package/dist/index.js +2206 -4754
  90. package/dist/map-AUV65YS3.js +10 -0
  91. package/dist/media-asset-4I5YPR4R.js +8 -0
  92. package/dist/memory-NV6EVJBE.js +12 -0
  93. package/dist/metric-X7W55DLC.js +10 -0
  94. package/dist/milestone-JJGOGK4R.js +12 -0
  95. package/dist/moderation-QSUVBCNS.js +30 -0
  96. package/dist/observation-UZSXXGBC.js +10 -0
  97. package/dist/page-NI7XODS6.js +10 -0
  98. package/dist/posting-FZOYVGH2.js +12 -0
  99. package/dist/profile-42A43GES.js +8 -0
  100. package/dist/project-G2CTLDXY.js +10 -0
  101. package/dist/query-ast-CWo6_30h.d.ts +226 -0
  102. package/dist/reaction-VAQBVDUD.js +10 -0
  103. package/dist/registry-CQoN_p8U.d.ts +99 -0
  104. package/dist/saved-view-AOQHGHNM.js +10 -0
  105. package/dist/schema/index.d.ts +6182 -0
  106. package/dist/schema/index.js +631 -0
  107. package/dist/schema-extension-5BUXRDPB.js +18 -0
  108. package/dist/space-PZ737CIS.js +42 -0
  109. package/dist/space-membership-N35NRX6F.js +14 -0
  110. package/dist/store/index.d.ts +391 -0
  111. package/dist/store/index.js +135 -0
  112. package/dist/store-CvgiydME.d.ts +338 -0
  113. package/dist/sync/awareness.d.ts +69 -0
  114. package/dist/sync/awareness.js +20 -0
  115. package/dist/system-Q5I6STDC.js +38 -0
  116. package/dist/tag-C677GKQW.js +16 -0
  117. package/dist/task-WQLMPN5U.js +16 -0
  118. package/dist/task-view-T5S32V4L.js +10 -0
  119. package/dist/transaction-U3ITRGJP.js +12 -0
  120. package/dist/transcription-F3T23LLO.js +12 -0
  121. package/dist/types-Def-5Nka.d.ts +1525 -0
  122. package/dist/updates.d.ts +44 -0
  123. package/dist/updates.js +16 -0
  124. package/dist/user-widget-4SJJFPG5.js +8 -0
  125. package/dist/view-types-DSde-uT_.d.ts +316 -0
  126. package/package.json +32 -9
  127. package/dist/canvas-HSIKIQFK.js +0 -7
  128. package/dist/chunk-2L5ZUGG5.js +0 -53
  129. package/dist/chunk-4MTS5KAQ.js +0 -22
  130. package/dist/chunk-GZHARFKC.js +0 -25
  131. package/dist/chunk-WKIKJTI2.js +0 -45
  132. package/dist/comment-277JD7DV.js +0 -7
  133. package/dist/database-W3KEHLI3.js +0 -7
  134. package/dist/database-row-3O2QSNZN.js +0 -7
  135. package/dist/grant-QVZ454YC.js +0 -7
  136. package/dist/page-O4WTOIEO.js +0 -7
  137. package/dist/task-SEKAYJH7.js +0 -7
@@ -0,0 +1,12 @@
1
+ import {
2
+ CHANNEL_KINDS,
3
+ ChannelSchema
4
+ } from "./chunk-ZMCO3O2Z.js";
5
+ import "./chunk-6OPZJ7MG.js";
6
+ import "./chunk-ZICIXDEE.js";
7
+ import "./chunk-O64EK5FK.js";
8
+ import "./chunk-JESSJ5CZ.js";
9
+ export {
10
+ CHANNEL_KINDS,
11
+ ChannelSchema
12
+ };
@@ -0,0 +1,10 @@
1
+ import {
2
+ ChatMessageSchema
3
+ } from "./chunk-RSSZXCLL.js";
4
+ import "./chunk-6OPZJ7MG.js";
5
+ import "./chunk-ZICIXDEE.js";
6
+ import "./chunk-O64EK5FK.js";
7
+ import "./chunk-JESSJ5CZ.js";
8
+ export {
9
+ ChatMessageSchema
10
+ };
@@ -0,0 +1,52 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
4
+ import {
5
+ defineSchema,
6
+ json,
7
+ relation,
8
+ select,
9
+ text
10
+ } from "./chunk-O64EK5FK.js";
11
+
12
+ // src/schema/schemas/dashboard.ts
13
+ var DashboardSchema = defineSchema({
14
+ name: "Dashboard",
15
+ namespace: "xnet://xnet.fyi/",
16
+ properties: {
17
+ /** Dashboard title */
18
+ title: text({ required: true, maxLength: 500 }),
19
+ /** Emoji or icon URL */
20
+ icon: text({}),
21
+ /** Dashboard variable scope (time range, custom vars) — whole-value LWW */
22
+ variables: json({}),
23
+ /** Widget instances placed on this dashboard — whole-list LWW */
24
+ widgets: json({}),
25
+ /** Per-breakpoint {x, y, w, h} layout maps — whole-value LWW */
26
+ layouts: json({}),
27
+ /** Canonical home; empty = Unfiled (exploration 0169) */
28
+ folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
29
+ /** Order among folder siblings — fractional index */
30
+ sortKey: text({ maxLength: 500 }),
31
+ /** Workspace-wide labels, referenced by id (exploration 0169) */
32
+ tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
33
+ /** Canonical SECURITY home; empty = personal/private (exploration 0179) */
34
+ space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
35
+ /** Per-node visibility; `inherit` defers to the Space (exploration 0179) */
36
+ visibility: select({
37
+ options: [
38
+ { id: "inherit", name: "Inherit", color: "gray" },
39
+ { id: "private", name: "Private", color: "gray" },
40
+ { id: "unlisted", name: "Unlisted", color: "yellow" },
41
+ { id: "public", name: "Public", color: "green" }
42
+ ],
43
+ default: "inherit"
44
+ })
45
+ },
46
+ // Inherits access from its home Space (exploration 0181/0192).
47
+ authorization: spaceCascadeAuthorization()
48
+ });
49
+
50
+ export {
51
+ DashboardSchema
52
+ };
@@ -0,0 +1,54 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
4
+ import {
5
+ defineSchema,
6
+ money,
7
+ relation,
8
+ select,
9
+ text
10
+ } from "./chunk-O64EK5FK.js";
11
+
12
+ // src/schema/schemas/budget.ts
13
+ var BUDGET_SCHEMA_IRI = "xnet://xnet.fyi/Budget@1.0.0";
14
+ var BudgetSchema = defineSchema({
15
+ name: "Budget",
16
+ namespace: "xnet://xnet.fyi/",
17
+ properties: {
18
+ /** Optional label; defaults to the account name in the UI. */
19
+ name: text({ maxLength: 200 }),
20
+ /** The account this budget caps (usually an expense account). */
21
+ account: relation({ target: "xnet://xnet.fyi/Account@1.0.0", required: true }),
22
+ /** Cap per period, as signed-positive minor units + currency. */
23
+ limit: money({ required: true }),
24
+ /** Recurrence of the cap. */
25
+ period: select({
26
+ options: [
27
+ { id: "weekly", name: "Weekly" },
28
+ { id: "monthly", name: "Monthly" },
29
+ { id: "yearly", name: "Yearly" }
30
+ ],
31
+ default: "monthly"
32
+ }),
33
+ /** Optional folder home for uniform filing; empty = Unfiled (0190). */
34
+ folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
35
+ /** Canonical SECURITY home; empty = personal/private book (0179/0181). */
36
+ space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
37
+ /** Per-node visibility; defaults to `private` (financial data, 0187). */
38
+ visibility: select({
39
+ options: [
40
+ { id: "inherit", name: "Inherit", color: "gray" },
41
+ { id: "private", name: "Private", color: "gray" },
42
+ { id: "unlisted", name: "Unlisted", color: "yellow" },
43
+ { id: "public", name: "Public", color: "green" }
44
+ ],
45
+ default: "private"
46
+ })
47
+ },
48
+ authorization: spaceCascadeAuthorization()
49
+ });
50
+
51
+ export {
52
+ BUDGET_SCHEMA_IRI,
53
+ BudgetSchema
54
+ };
@@ -0,0 +1,41 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
4
+ import {
5
+ defineSchema,
6
+ relation,
7
+ text
8
+ } from "./chunk-O64EK5FK.js";
9
+
10
+ // src/schema/schemas/database-select-option.ts
11
+ var DatabaseSelectOptionSchema = defineSchema({
12
+ name: "DatabaseSelectOption",
13
+ namespace: "xnet://xnet.fyi/",
14
+ properties: {
15
+ /** Parent field (must be a select/multiSelect field) */
16
+ field: relation({
17
+ target: "xnet://xnet.fyi/DatabaseField@1.0.0",
18
+ required: true
19
+ }),
20
+ /**
21
+ * Parent database (denormalized from the field) so all options for a
22
+ * database load in a single indexed query.
23
+ */
24
+ database: relation({
25
+ target: "xnet://xnet.fyi/Database@2.0.0",
26
+ required: true
27
+ }),
28
+ /** Display name (the tag text) */
29
+ name: text({ required: true, maxLength: 100 }),
30
+ /** Display color (SelectColor union; enforced in field-operations) */
31
+ color: text({ maxLength: 20 }),
32
+ /** Fractional index for option ordering in pickers */
33
+ sortKey: text({ required: true })
34
+ },
35
+ // Inherits access from its home Space (exploration 0181/0192).
36
+ authorization: spaceCascadeAuthorization("database")
37
+ });
38
+
39
+ export {
40
+ DatabaseSelectOptionSchema
41
+ };
@@ -0,0 +1,66 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
4
+ import {
5
+ checkbox,
6
+ defineSchema,
7
+ relation,
8
+ select,
9
+ text
10
+ } from "./chunk-O64EK5FK.js";
11
+
12
+ // src/schema/schemas/account.ts
13
+ var ACCOUNT_SCHEMA_IRI = "xnet://xnet.fyi/Account@1.0.0";
14
+ var AccountSchema = defineSchema({
15
+ name: "Account",
16
+ namespace: "xnet://xnet.fyi/",
17
+ properties: {
18
+ /** Display name, e.g. "Checking" or "Groceries". */
19
+ name: text({ required: true, maxLength: 200 }),
20
+ /** The double-entry class — drives debit/credit sign and reporting bucket. */
21
+ class: select({
22
+ options: [
23
+ { id: "asset", name: "Asset", color: "green" },
24
+ { id: "liability", name: "Liability", color: "red" },
25
+ { id: "equity", name: "Equity", color: "purple" },
26
+ { id: "income", name: "Income", color: "blue" },
27
+ { id: "expense", name: "Expense", color: "orange" }
28
+ ],
29
+ default: "expense"
30
+ }),
31
+ /** Hierarchical code for ordering / roll-up, e.g. "1000", "1010". */
32
+ code: text({ maxLength: 40 }),
33
+ /** ISO-4217 reporting currency for this account (app default: USD). */
34
+ currency: text({ maxLength: 3 }),
35
+ /** Roll-up group header (no postings of its own) vs a postable leaf. */
36
+ isGroup: checkbox({ default: false }),
37
+ /** Chart-of-accounts tree parent. */
38
+ parent: relation({ target: ACCOUNT_SCHEMA_IRI }),
39
+ /** Order among siblings — fractional index (exploration 0169 pattern). */
40
+ sortKey: text({ maxLength: 500 }),
41
+ /** Optional folder home for uniform filing; empty = Unfiled (0190). */
42
+ folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
43
+ /** Canonical SECURITY home; empty = personal/private book (0179/0181). */
44
+ space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
45
+ /**
46
+ * Per-node visibility. Defaults to `private` — financial data is the most
47
+ * sensitive in the app and must never leak to public surfaces (0187).
48
+ */
49
+ visibility: select({
50
+ options: [
51
+ { id: "inherit", name: "Inherit", color: "gray" },
52
+ { id: "private", name: "Private", color: "gray" },
53
+ { id: "unlisted", name: "Unlisted", color: "yellow" },
54
+ { id: "public", name: "Public", color: "green" }
55
+ ],
56
+ default: "private"
57
+ })
58
+ },
59
+ // Inherits access from its home Space (exploration 0181).
60
+ authorization: spaceCascadeAuthorization()
61
+ });
62
+
63
+ export {
64
+ ACCOUNT_SCHEMA_IRI,
65
+ AccountSchema
66
+ };
@@ -0,0 +1,148 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
4
+ import {
5
+ checkbox,
6
+ date,
7
+ defineSchema,
8
+ person,
9
+ relation,
10
+ select,
11
+ text
12
+ } from "./chunk-O64EK5FK.js";
13
+
14
+ // src/schema/schemas/task.ts
15
+ var TaskSchema = defineSchema({
16
+ name: "Task",
17
+ namespace: "xnet://xnet.fyi/",
18
+ properties: {
19
+ /** Task title */
20
+ title: text({ required: true, maxLength: 500 }),
21
+ /**
22
+ * Human-readable identifier, e.g. "XN-142". Allocated from hub-issued
23
+ * per-device blocks (see task-identifiers.ts) so offline mints never
24
+ * collide. Pattern-matched in branch names / commit messages / PR text
25
+ * by the GitHub integration.
26
+ */
27
+ shortId: text({ maxLength: 20 }),
28
+ /** Whether the task is completed */
29
+ completed: checkbox({ default: false }),
30
+ /**
31
+ * Task workflow status.
32
+ *
33
+ * Statuses belong to categories (TASK_STATUS_CATEGORIES); `completed`
34
+ * is derivable from the category (isCompletedTaskStatus) so checkboxes
35
+ * stay one-tap everywhere. The original four statuses are unchanged;
36
+ * triage/backlog/in-review are additive (no version bump needed).
37
+ */
38
+ status: select({
39
+ options: [
40
+ { id: "triage", name: "Triage", color: "yellow" },
41
+ { id: "backlog", name: "Backlog", color: "gray" },
42
+ { id: "todo", name: "To Do", color: "gray" },
43
+ { id: "in-progress", name: "In Progress", color: "blue" },
44
+ { id: "in-review", name: "In Review", color: "green" },
45
+ { id: "done", name: "Done", color: "green" },
46
+ { id: "cancelled", name: "Cancelled", color: "red" }
47
+ ],
48
+ default: "todo"
49
+ }),
50
+ /** Task priority */
51
+ priority: select({
52
+ options: [
53
+ { id: "low", name: "Low", color: "gray" },
54
+ { id: "medium", name: "Medium", color: "yellow" },
55
+ { id: "high", name: "High", color: "orange" },
56
+ { id: "urgent", name: "Urgent", color: "red" }
57
+ ],
58
+ default: "medium"
59
+ }),
60
+ /** Due date */
61
+ dueDate: date({}),
62
+ /** Assigned person (legacy single assignee for compatibility) */
63
+ assignee: person({}),
64
+ /** Assigned people */
65
+ assignees: person({ multiple: true }),
66
+ /** Parent task (for subtasks) */
67
+ parent: relation({ target: "xnet://xnet.fyi/Task" }),
68
+ /** Project this task belongs to */
69
+ project: relation({ target: "xnet://xnet.fyi/Project@1.0.0" }),
70
+ /** Milestone within the project this task targets (one per task) */
71
+ milestone: relation({ target: "xnet://xnet.fyi/Milestone@1.0.0" }),
72
+ /** Page that currently hosts this task */
73
+ page: relation({ target: "xnet://xnet.fyi/Page@1.0.0" }),
74
+ /** Canvas that currently hosts this task (canvas-sourced tasks) */
75
+ canvas: relation({ target: "xnet://xnet.fyi/Canvas@1.0.0" }),
76
+ /** Surface-specific anchor: block id inside the page document, or the
77
+ * hosting canvas object id for canvas-sourced tasks */
78
+ anchorBlockId: text({ maxLength: 500 }),
79
+ /** Stable sibling order key for cross-view projections */
80
+ sortKey: text({ maxLength: 500 }),
81
+ /** Workspace-wide labels, referenced by id (exploration 0169) */
82
+ tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
83
+ /** Where this task was created */
84
+ source: select({
85
+ options: [
86
+ { id: "page", name: "Page" },
87
+ { id: "database", name: "Database" },
88
+ { id: "canvas", name: "Canvas" },
89
+ { id: "automation", name: "Automation" },
90
+ { id: "api", name: "API" }
91
+ ],
92
+ default: "page"
93
+ }),
94
+ /** Structured external references related to this task */
95
+ references: relation({
96
+ target: "xnet://xnet.fyi/ExternalReference@1.0.0",
97
+ multiple: true
98
+ }),
99
+ /** Canonical folder home for uniform filing; empty = Unfiled (0190) */
100
+ folder: relation({ target: "xnet://xnet.fyi/Folder@1.0.0" }),
101
+ /**
102
+ * Optional habit/metric this task tracks — completing the task can log an
103
+ * observation against the metric (cross-domain integration, 0190).
104
+ */
105
+ metric: relation({ target: "xnet://xnet.fyi/Metric@1.0.0" }),
106
+ /** Optional experiment this task belongs to (cross-domain, 0190). */
107
+ experiment: relation({ target: "xnet://xnet.fyi/Experiment@1.0.0" }),
108
+ /** Canonical SECURITY home; empty = personal/private (exploration 0179) */
109
+ space: relation({ target: "xnet://xnet.fyi/Space@1.0.0" }),
110
+ /** Per-node visibility; `inherit` defers to the Space (exploration 0179) */
111
+ visibility: select({
112
+ options: [
113
+ { id: "inherit", name: "Inherit", color: "gray" },
114
+ { id: "private", name: "Private", color: "gray" },
115
+ { id: "unlisted", name: "Unlisted", color: "yellow" },
116
+ { id: "public", name: "Public", color: "green" }
117
+ ],
118
+ default: "inherit"
119
+ })
120
+ },
121
+ document: "yjs",
122
+ // Collaborative Y.Doc for description
123
+ // Inherits access from its home Space (exploration 0181).
124
+ authorization: spaceCascadeAuthorization()
125
+ });
126
+ var TASK_STATUS_CATEGORIES = {
127
+ triage: "triage",
128
+ backlog: "backlog",
129
+ todo: "unstarted",
130
+ "in-progress": "started",
131
+ "in-review": "started",
132
+ done: "completed",
133
+ cancelled: "cancelled"
134
+ };
135
+ function getTaskStatusCategory(status) {
136
+ return TASK_STATUS_CATEGORIES[status ?? "todo"] ?? "unstarted";
137
+ }
138
+ function isCompletedTaskStatus(status) {
139
+ const category = getTaskStatusCategory(status);
140
+ return category === "completed" || category === "cancelled";
141
+ }
142
+
143
+ export {
144
+ TaskSchema,
145
+ TASK_STATUS_CATEGORIES,
146
+ getTaskStatusCategory,
147
+ isCompletedTaskStatus
148
+ };
@@ -1,3 +1,6 @@
1
+ import {
2
+ spaceCascadeAuthorization
3
+ } from "./chunk-6OPZJ7MG.js";
1
4
  import {
2
5
  checkbox,
3
6
  created,
@@ -5,11 +8,12 @@ import {
5
8
  date,
6
9
  defineSchema,
7
10
  file,
11
+ json,
8
12
  person,
9
13
  relation,
10
14
  select,
11
15
  text
12
- } from "./chunk-SZC345Z2.js";
16
+ } from "./chunk-O64EK5FK.js";
13
17
 
14
18
  // src/schema/schemas/comment.ts
15
19
  var CommentSchema = defineSchema({
@@ -44,8 +48,16 @@ var CommentSchema = defineSchema({
44
48
  // ─── Content ───────────────────────────────────────────────────────────────
45
49
  /** Comment body in GitHub-flavored markdown (stored as plain text) */
46
50
  content: text({ required: true, maxLength: 1e4 }),
51
+ /** Workspace-wide labels from inline #hashtag pills (exploration 0169) */
52
+ tags: relation({ target: "xnet://xnet.fyi/Tag@1.0.0", multiple: true }),
47
53
  /** Optional file attachments */
48
54
  attachments: file({ multiple: true }),
55
+ /**
56
+ * Structured mentions ({ dids, room? }) — populated by the composer when
57
+ * mention pills are inserted (exploration 0168). Additive and optional;
58
+ * legacy text-parsed mentions (commentReferences.ts) remain as fallback.
59
+ */
60
+ mentions: json({}),
49
61
  // ─── Pseudo Reply-To (for UI, not structural threading) ────────────────────
50
62
  /** DID of user being replied to (UI hint) */
51
63
  replyToUser: person({}),
@@ -68,7 +80,9 @@ var CommentSchema = defineSchema({
68
80
  createdBy: createdBy()
69
81
  },
70
82
  // Comments are plain text + markdown, no collaborative Y.Doc needed
71
- document: void 0
83
+ document: void 0,
84
+ // Inherits access from its home Space (exploration 0181/0192).
85
+ authorization: spaceCascadeAuthorization("target")
72
86
  });
73
87
 
74
88
  export {