@opencorelabs/lucidity 0.7.0 → 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.
Files changed (219) hide show
  1. package/README.md +9 -2
  2. package/dist/assets/speech/lucidity-speech +0 -0
  3. package/dist/automations/agent.d.ts.map +1 -1
  4. package/dist/automations/agent.js +2 -0
  5. package/dist/automations/designer.d.ts +1 -1
  6. package/dist/chat/server.d.ts +1 -0
  7. package/dist/chat/server.d.ts.map +1 -1
  8. package/dist/chat/server.js +6 -1
  9. package/dist/coding/conduct.d.ts +1 -22
  10. package/dist/coding/conduct.d.ts.map +1 -1
  11. package/dist/coding/conduct.js +9 -94
  12. package/dist/coding/runCodeTurn.d.ts +3 -16
  13. package/dist/coding/runCodeTurn.d.ts.map +1 -1
  14. package/dist/coding/runCodeTurn.js +157 -165
  15. package/dist/coding/workspaceRegistry.d.ts +24 -0
  16. package/dist/coding/workspaceRegistry.d.ts.map +1 -0
  17. package/dist/coding/workspaceRegistry.js +230 -0
  18. package/dist/coding/worktree.d.ts +11 -14
  19. package/dist/coding/worktree.d.ts.map +1 -1
  20. package/dist/coding/worktree.js +41 -21
  21. package/dist/config.d.ts +2 -0
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/daemonLease.d.ts +12 -0
  24. package/dist/daemonLease.d.ts.map +1 -0
  25. package/dist/daemonLease.js +32 -0
  26. package/dist/goals/assessment.d.ts +115 -0
  27. package/dist/goals/assessment.d.ts.map +1 -0
  28. package/dist/goals/assessment.js +67 -0
  29. package/dist/goals/notes.d.ts +18 -0
  30. package/dist/goals/notes.d.ts.map +1 -0
  31. package/dist/goals/notes.js +72 -0
  32. package/dist/index.js +57 -15
  33. package/dist/jobs/goals.d.ts +15 -0
  34. package/dist/jobs/goals.d.ts.map +1 -0
  35. package/dist/jobs/goals.js +286 -0
  36. package/dist/jobs/weeklyReview.d.ts.map +1 -1
  37. package/dist/jobs/weeklyReview.js +3 -2
  38. package/dist/queue.d.ts +1 -0
  39. package/dist/queue.d.ts.map +1 -1
  40. package/dist/queue.js +4 -0
  41. package/dist/room/client.d.ts +5 -0
  42. package/dist/room/client.d.ts.map +1 -1
  43. package/dist/room/client.js +116 -101
  44. package/dist/room/computer.d.ts.map +1 -1
  45. package/dist/room/computer.js +1 -0
  46. package/dist/room/durablePublish.d.ts +6 -0
  47. package/dist/room/durablePublish.d.ts.map +1 -0
  48. package/dist/room/durablePublish.js +19 -0
  49. package/dist/room/incidents.d.ts +1 -1
  50. package/dist/room/incidents.d.ts.map +1 -1
  51. package/dist/room/incidents.js +14 -7
  52. package/dist/room/turnQueue.d.ts.map +1 -1
  53. package/dist/room/turnQueue.js +27 -24
  54. package/dist/runtimeStore.d.ts +44 -0
  55. package/dist/runtimeStore.d.ts.map +1 -0
  56. package/dist/runtimeStore.js +188 -0
  57. package/dist/setup/server.js +1 -1
  58. package/dist/turnLog.d.ts +10 -40
  59. package/dist/turnLog.d.ts.map +1 -1
  60. package/dist/turnLog.js +33 -56
  61. package/package.json +4 -4
  62. package/src/automations/agent.ts +2 -0
  63. package/src/chat/server.ts +7 -1
  64. package/src/coding/conduct.ts +10 -147
  65. package/src/coding/runCodeTurn.ts +42 -61
  66. package/src/coding/workspaceRegistry.ts +210 -0
  67. package/src/coding/worktree.ts +44 -20
  68. package/src/config.ts +2 -0
  69. package/src/daemonLease.ts +33 -0
  70. package/src/goals/assessment.ts +106 -0
  71. package/src/goals/notes.ts +88 -0
  72. package/src/index.ts +57 -18
  73. package/src/jobs/goals.ts +384 -0
  74. package/src/jobs/weeklyReview.ts +4 -3
  75. package/src/queue.ts +4 -0
  76. package/src/room/client.ts +77 -74
  77. package/src/room/computer.ts +1 -0
  78. package/src/room/durablePublish.ts +25 -0
  79. package/src/room/incidents.ts +16 -8
  80. package/src/room/turnQueue.ts +26 -27
  81. package/src/runtimeStore.ts +190 -0
  82. package/src/setup/server.ts +1 -1
  83. package/src/turnLog.ts +32 -75
  84. package/vendor/mcp-server/dist/index.js +2 -0
  85. package/vendor/mcp-server/dist/tools/goals.d.ts +4 -0
  86. package/vendor/mcp-server/dist/tools/goals.d.ts.map +1 -0
  87. package/vendor/mcp-server/dist/tools/goals.js +38 -0
  88. package/vendor/mcp-server/package.json +1 -1
  89. package/vendor/mcp-server/src/index.ts +2 -0
  90. package/vendor/mcp-server/src/tools/goals.ts +62 -0
  91. package/vendor/runtime/README.md +2 -2
  92. package/vendor/runtime/dist/executor/asyncQueue.d.ts +1 -0
  93. package/vendor/runtime/dist/executor/asyncQueue.d.ts.map +1 -1
  94. package/vendor/runtime/dist/executor/asyncQueue.js +3 -0
  95. package/vendor/runtime/dist/executor/claudeAgent.d.ts +1 -1
  96. package/vendor/runtime/dist/executor/claudeAgent.d.ts.map +1 -1
  97. package/vendor/runtime/dist/executor/claudeAgent.js +20 -9
  98. package/vendor/runtime/dist/executor/codex.d.ts +1 -0
  99. package/vendor/runtime/dist/executor/codex.d.ts.map +1 -1
  100. package/vendor/runtime/dist/executor/codex.js +68 -36
  101. package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts +4 -1
  102. package/vendor/runtime/dist/executor/codexProtocol/FunctionCallOutputContentItem.d.ts.map +1 -1
  103. package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts +3 -0
  104. package/vendor/runtime/dist/executor/codexProtocol/Personality.d.ts.map +1 -1
  105. package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts +1 -1
  106. package/vendor/runtime/dist/executor/codexProtocol/PlanType.d.ts.map +1 -1
  107. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts +6 -0
  108. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.d.ts.map +1 -0
  109. package/vendor/runtime/dist/executor/codexProtocol/v2/CyberAccessProgram.js +2 -0
  110. package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts +5 -0
  111. package/vendor/runtime/dist/executor/codexProtocol/v2/GetAccountRateLimitsResponse.d.ts.map +1 -1
  112. package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts +8 -0
  113. package/vendor/runtime/dist/executor/codexProtocol/v2/Model.d.ts.map +1 -1
  114. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts +11 -0
  115. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.d.ts.map +1 -0
  116. package/vendor/runtime/dist/executor/codexProtocol/v2/ModelAccessPrograms.js +2 -0
  117. package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts +4 -0
  118. package/vendor/runtime/dist/executor/codexProtocol/v2/RateLimitSnapshot.d.ts.map +1 -1
  119. package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts +2 -0
  120. package/vendor/runtime/dist/executor/codexProtocol/v2/ReviewStartParams.d.ts.map +1 -1
  121. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts +4 -1
  122. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadResumeParams.d.ts.map +1 -1
  123. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts +3 -1
  124. package/vendor/runtime/dist/executor/codexProtocol/v2/ThreadStartParams.d.ts.map +1 -1
  125. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts +7 -2
  126. package/vendor/runtime/dist/executor/codexProtocol/v2/TurnStartParams.d.ts.map +1 -1
  127. package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts +3 -0
  128. package/vendor/runtime/dist/executor/codexProtocol/v2/UserInput.d.ts.map +1 -1
  129. package/vendor/runtime/dist/executor/codexRpc.d.ts +10 -3
  130. package/vendor/runtime/dist/executor/codexRpc.d.ts.map +1 -1
  131. package/vendor/runtime/dist/executor/codexRpc.js +18 -3
  132. package/vendor/runtime/dist/executor/codexSessions.d.ts +30 -0
  133. package/vendor/runtime/dist/executor/codexSessions.d.ts.map +1 -0
  134. package/vendor/runtime/dist/executor/codexSessions.js +88 -0
  135. package/vendor/runtime/dist/executor/health.d.ts +2 -1
  136. package/vendor/runtime/dist/executor/health.d.ts.map +1 -1
  137. package/vendor/runtime/dist/executor/health.js +17 -5
  138. package/vendor/runtime/dist/executor/liveTurns.d.ts +2 -1
  139. package/vendor/runtime/dist/executor/liveTurns.d.ts.map +1 -1
  140. package/vendor/runtime/dist/executor/liveTurns.js +12 -5
  141. package/vendor/runtime/dist/executor/ownership.d.ts +35 -0
  142. package/vendor/runtime/dist/executor/ownership.d.ts.map +1 -0
  143. package/vendor/runtime/dist/executor/ownership.js +99 -0
  144. package/vendor/runtime/dist/executor/providerRouter.d.ts +1 -0
  145. package/vendor/runtime/dist/executor/providerRouter.d.ts.map +1 -1
  146. package/vendor/runtime/dist/executor/providerRouter.js +5 -0
  147. package/vendor/runtime/dist/executor/types.d.ts +2 -0
  148. package/vendor/runtime/dist/executor/types.d.ts.map +1 -1
  149. package/vendor/runtime/dist/index.d.ts +1 -0
  150. package/vendor/runtime/dist/index.d.ts.map +1 -1
  151. package/vendor/runtime/dist/index.js +1 -0
  152. package/vendor/runtime/src/executor/asyncQueue.ts +3 -0
  153. package/vendor/runtime/src/executor/claudeAgent.ts +16 -9
  154. package/vendor/runtime/src/executor/codex.ts +75 -44
  155. package/vendor/runtime/src/executor/codexProtocol/FunctionCallOutputContentItem.ts +1 -1
  156. package/vendor/runtime/src/executor/codexProtocol/Personality.ts +3 -0
  157. package/vendor/runtime/src/executor/codexProtocol/PlanType.ts +1 -1
  158. package/vendor/runtime/src/executor/codexProtocol/README.md +2 -2
  159. package/vendor/runtime/src/executor/codexProtocol/v2/CyberAccessProgram.ts +9 -0
  160. package/vendor/runtime/src/executor/codexProtocol/v2/GetAccountRateLimitsResponse.ts +5 -0
  161. package/vendor/runtime/src/executor/codexProtocol/v2/Model.ts +11 -2
  162. package/vendor/runtime/src/executor/codexProtocol/v2/ModelAccessPrograms.ts +13 -0
  163. package/vendor/runtime/src/executor/codexProtocol/v2/RateLimitSnapshot.ts +5 -1
  164. package/vendor/runtime/src/executor/codexProtocol/v2/ReviewStartParams.ts +2 -0
  165. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadResumeParams.ts +5 -1
  166. package/vendor/runtime/src/executor/codexProtocol/v2/ThreadStartParams.ts +4 -1
  167. package/vendor/runtime/src/executor/codexProtocol/v2/TurnStartParams.ts +7 -2
  168. package/vendor/runtime/src/executor/codexProtocol/v2/UserInput.ts +1 -1
  169. package/vendor/runtime/src/executor/codexRpc.ts +22 -4
  170. package/vendor/runtime/src/executor/codexSessions.ts +108 -0
  171. package/vendor/runtime/src/executor/health.ts +16 -6
  172. package/vendor/runtime/src/executor/liveTurns.ts +12 -5
  173. package/vendor/runtime/src/executor/ownership.ts +76 -0
  174. package/vendor/runtime/src/executor/providerRouter.ts +6 -0
  175. package/vendor/runtime/src/executor/types.ts +2 -0
  176. package/vendor/runtime/src/index.ts +1 -0
  177. package/vendor/shared/dist/agentCommands.d.ts +1 -0
  178. package/vendor/shared/dist/agentCommands.d.ts.map +1 -1
  179. package/vendor/shared/dist/cardStudio.d.ts +41 -0
  180. package/vendor/shared/dist/cardStudio.d.ts.map +1 -1
  181. package/vendor/shared/dist/cardStudio.js +13 -3
  182. package/vendor/shared/dist/computer.d.ts +7 -1
  183. package/vendor/shared/dist/computer.d.ts.map +1 -1
  184. package/vendor/shared/dist/computer.js +12 -2
  185. package/vendor/shared/dist/constants.d.ts +3 -3
  186. package/vendor/shared/dist/constants.d.ts.map +1 -1
  187. package/vendor/shared/dist/constants.js +5 -4
  188. package/vendor/shared/dist/goalNotes.d.ts +4 -0
  189. package/vendor/shared/dist/goalNotes.d.ts.map +1 -0
  190. package/vendor/shared/dist/goalNotes.js +23 -0
  191. package/vendor/shared/dist/goals.d.ts +835 -0
  192. package/vendor/shared/dist/goals.d.ts.map +1 -0
  193. package/vendor/shared/dist/goals.js +198 -0
  194. package/vendor/shared/dist/index.d.ts +3 -0
  195. package/vendor/shared/dist/index.d.ts.map +1 -1
  196. package/vendor/shared/dist/index.js +3 -0
  197. package/vendor/shared/dist/schemas/harness.d.ts +101 -0
  198. package/vendor/shared/dist/schemas/harness.d.ts.map +1 -1
  199. package/vendor/shared/dist/schemas/harness.js +6 -0
  200. package/vendor/shared/dist/workspaces.d.ts +138 -0
  201. package/vendor/shared/dist/workspaces.d.ts.map +1 -0
  202. package/vendor/shared/dist/workspaces.js +40 -0
  203. package/vendor/shared/src/agentCommands.ts +1 -0
  204. package/vendor/shared/src/cardStudio.ts +13 -3
  205. package/vendor/shared/src/computer.ts +16 -2
  206. package/vendor/shared/src/constants.ts +5 -4
  207. package/vendor/shared/src/goalNotes.ts +23 -0
  208. package/vendor/shared/src/goals.ts +237 -0
  209. package/vendor/shared/src/index.ts +4 -0
  210. package/vendor/shared/src/schemas/harness.ts +6 -0
  211. package/vendor/shared/src/workspaces.ts +48 -0
  212. package/dist/coding/fleetIntegrate.d.ts +0 -37
  213. package/dist/coding/fleetIntegrate.d.ts.map +0 -1
  214. package/dist/coding/fleetIntegrate.js +0 -64
  215. package/dist/coding/openFleetPr.d.ts +0 -41
  216. package/dist/coding/openFleetPr.d.ts.map +0 -1
  217. package/dist/coding/openFleetPr.js +0 -121
  218. package/src/coding/fleetIntegrate.ts +0 -95
  219. package/src/coding/openFleetPr.ts +0 -148
@@ -0,0 +1,835 @@
1
+ import { z } from 'zod';
2
+ export declare const GoalTimeZoneSchema: z.ZodString;
3
+ export declare const GoalTimeframeSchema: z.ZodObject<{
4
+ start: z.ZodString;
5
+ end: z.ZodString;
6
+ precision: z.ZodEnum<{
7
+ custom: "custom";
8
+ year: "year";
9
+ month: "month";
10
+ quarter: "quarter";
11
+ }>;
12
+ timeZone: z.ZodString;
13
+ }, z.core.$strip>;
14
+ export type GoalTimeframe = z.infer<typeof GoalTimeframeSchema>;
15
+ export declare const GoalStatusSchema: z.ZodEnum<{
16
+ archived: "archived";
17
+ completed: "completed";
18
+ paused: "paused";
19
+ active: "active";
20
+ }>;
21
+ export declare const GoalCadenceSchema: z.ZodEnum<{
22
+ weekly: "weekly";
23
+ monthly: "monthly";
24
+ yearly: "yearly";
25
+ }>;
26
+ export type GoalCadence = z.infer<typeof GoalCadenceSchema>;
27
+ export declare const GoalInputSchema: z.ZodObject<{
28
+ title: z.ZodString;
29
+ timeframe: z.ZodObject<{
30
+ start: z.ZodString;
31
+ end: z.ZodString;
32
+ precision: z.ZodEnum<{
33
+ custom: "custom";
34
+ year: "year";
35
+ month: "month";
36
+ quarter: "quarter";
37
+ }>;
38
+ timeZone: z.ZodString;
39
+ }, z.core.$strip>;
40
+ status: z.ZodDefault<z.ZodEnum<{
41
+ archived: "archived";
42
+ completed: "completed";
43
+ paused: "paused";
44
+ active: "active";
45
+ }>>;
46
+ tracking: z.ZodDefault<z.ZodBoolean>;
47
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
48
+ weekly: "weekly";
49
+ monthly: "monthly";
50
+ yearly: "yearly";
51
+ }>>>;
52
+ }, z.core.$strip>;
53
+ export type GoalInput = z.infer<typeof GoalInputSchema>;
54
+ export declare const SaveGoalSchema: z.ZodObject<{
55
+ title: z.ZodString;
56
+ timeframe: z.ZodObject<{
57
+ start: z.ZodString;
58
+ end: z.ZodString;
59
+ precision: z.ZodEnum<{
60
+ custom: "custom";
61
+ year: "year";
62
+ month: "month";
63
+ quarter: "quarter";
64
+ }>;
65
+ timeZone: z.ZodString;
66
+ }, z.core.$strip>;
67
+ status: z.ZodDefault<z.ZodEnum<{
68
+ archived: "archived";
69
+ completed: "completed";
70
+ paused: "paused";
71
+ active: "active";
72
+ }>>;
73
+ tracking: z.ZodDefault<z.ZodBoolean>;
74
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
75
+ weekly: "weekly";
76
+ monthly: "monthly";
77
+ yearly: "yearly";
78
+ }>>>;
79
+ id: z.ZodUUID;
80
+ revision: z.ZodNumber;
81
+ }, z.core.$strip>;
82
+ export declare const GoalSchema: z.ZodObject<{
83
+ title: z.ZodString;
84
+ timeframe: z.ZodObject<{
85
+ start: z.ZodString;
86
+ end: z.ZodString;
87
+ precision: z.ZodEnum<{
88
+ custom: "custom";
89
+ year: "year";
90
+ month: "month";
91
+ quarter: "quarter";
92
+ }>;
93
+ timeZone: z.ZodString;
94
+ }, z.core.$strip>;
95
+ status: z.ZodDefault<z.ZodEnum<{
96
+ archived: "archived";
97
+ completed: "completed";
98
+ paused: "paused";
99
+ active: "active";
100
+ }>>;
101
+ tracking: z.ZodDefault<z.ZodBoolean>;
102
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
103
+ weekly: "weekly";
104
+ monthly: "monthly";
105
+ yearly: "yearly";
106
+ }>>>;
107
+ id: z.ZodUUID;
108
+ revision: z.ZodNumber;
109
+ createdAt: z.ZodISODateTime;
110
+ updatedAt: z.ZodISODateTime;
111
+ }, z.core.$strip>;
112
+ export type Goal = z.infer<typeof GoalSchema>;
113
+ export declare const GoalReferenceSchema: z.ZodObject<{
114
+ kind: z.ZodEnum<{
115
+ task: "task";
116
+ project: "project";
117
+ habit: "habit";
118
+ note: "note";
119
+ }>;
120
+ id: z.ZodUUID;
121
+ }, z.core.$strip>;
122
+ export type GoalReference = z.infer<typeof GoalReferenceSchema>;
123
+ export declare const goalReferenceKey: (ref: GoalReference) => string;
124
+ export declare const GoalLinkInputSchema: z.ZodObject<{
125
+ kind: z.ZodEnum<{
126
+ task: "task";
127
+ project: "project";
128
+ habit: "habit";
129
+ note: "note";
130
+ }>;
131
+ id: z.ZodUUID;
132
+ source: z.ZodDefault<z.ZodEnum<{
133
+ manual: "manual";
134
+ ai: "ai";
135
+ }>>;
136
+ reason: z.ZodString;
137
+ state: z.ZodDefault<z.ZodEnum<{
138
+ active: "active";
139
+ rejected: "rejected";
140
+ }>>;
141
+ }, z.core.$strip>;
142
+ export declare const GoalLinkSchema: z.ZodObject<{
143
+ kind: z.ZodEnum<{
144
+ task: "task";
145
+ project: "project";
146
+ habit: "habit";
147
+ note: "note";
148
+ }>;
149
+ id: z.ZodUUID;
150
+ source: z.ZodDefault<z.ZodEnum<{
151
+ manual: "manual";
152
+ ai: "ai";
153
+ }>>;
154
+ reason: z.ZodString;
155
+ state: z.ZodDefault<z.ZodEnum<{
156
+ active: "active";
157
+ rejected: "rejected";
158
+ }>>;
159
+ title: z.ZodNullable<z.ZodString>;
160
+ available: z.ZodBoolean;
161
+ updatedAt: z.ZodISODateTime;
162
+ }, z.core.$strip>;
163
+ export type GoalLink = z.infer<typeof GoalLinkSchema>;
164
+ export declare const GoalEvidenceSchema: z.ZodObject<{
165
+ key: z.ZodString;
166
+ reference: z.ZodObject<{
167
+ kind: z.ZodEnum<{
168
+ task: "task";
169
+ project: "project";
170
+ habit: "habit";
171
+ note: "note";
172
+ }>;
173
+ id: z.ZodUUID;
174
+ }, z.core.$strip>;
175
+ at: z.ZodISODateTime;
176
+ kind: z.ZodEnum<{
177
+ task_completed: "task_completed";
178
+ task_started: "task_started";
179
+ task_reopened: "task_reopened";
180
+ task_changed: "task_changed";
181
+ habit_check_in: "habit_check_in";
182
+ note_changed: "note_changed";
183
+ }>;
184
+ title: z.ZodNullable<z.ZodString>;
185
+ available: z.ZodBoolean;
186
+ }, z.core.$strip>;
187
+ export type GoalEvidence = z.infer<typeof GoalEvidenceSchema>;
188
+ export declare const GoalCheckSchema: z.ZodObject<{
189
+ key: z.ZodString;
190
+ cadence: z.ZodEnum<{
191
+ daily: "daily";
192
+ weekly: "weekly";
193
+ monthly: "monthly";
194
+ yearly: "yearly";
195
+ }>;
196
+ start: z.ZodString;
197
+ end: z.ZodString;
198
+ checkedAt: z.ZodISODateTime;
199
+ signal: z.ZodEnum<{
200
+ unknown: "unknown";
201
+ moving: "moving";
202
+ quiet: "quiet";
203
+ }>;
204
+ summary: z.ZodString;
205
+ evidence: z.ZodArray<z.ZodObject<{
206
+ key: z.ZodString;
207
+ reference: z.ZodObject<{
208
+ kind: z.ZodEnum<{
209
+ task: "task";
210
+ project: "project";
211
+ habit: "habit";
212
+ note: "note";
213
+ }>;
214
+ id: z.ZodUUID;
215
+ }, z.core.$strip>;
216
+ at: z.ZodISODateTime;
217
+ kind: z.ZodEnum<{
218
+ task_completed: "task_completed";
219
+ task_started: "task_started";
220
+ task_reopened: "task_reopened";
221
+ task_changed: "task_changed";
222
+ habit_check_in: "habit_check_in";
223
+ note_changed: "note_changed";
224
+ }>;
225
+ title: z.ZodNullable<z.ZodString>;
226
+ available: z.ZodBoolean;
227
+ }, z.core.$strip>>;
228
+ references: z.ZodArray<z.ZodObject<{
229
+ kind: z.ZodEnum<{
230
+ task: "task";
231
+ project: "project";
232
+ habit: "habit";
233
+ note: "note";
234
+ }>;
235
+ id: z.ZodUUID;
236
+ }, z.core.$strip>>;
237
+ timeframe: z.ZodObject<{
238
+ start: z.ZodString;
239
+ end: z.ZodString;
240
+ precision: z.ZodEnum<{
241
+ custom: "custom";
242
+ year: "year";
243
+ month: "month";
244
+ quarter: "quarter";
245
+ }>;
246
+ timeZone: z.ZodString;
247
+ }, z.core.$strip>;
248
+ }, z.core.$strip>;
249
+ export type GoalCheck = z.infer<typeof GoalCheckSchema>;
250
+ export declare const GoalActionSchema: z.ZodObject<{
251
+ id: z.ZodUUID;
252
+ goalId: z.ZodUUID;
253
+ title: z.ZodString;
254
+ instruction: z.ZodString;
255
+ references: z.ZodArray<z.ZodObject<{
256
+ kind: z.ZodEnum<{
257
+ task: "task";
258
+ project: "project";
259
+ habit: "habit";
260
+ note: "note";
261
+ }>;
262
+ id: z.ZodUUID;
263
+ }, z.core.$strip>>;
264
+ status: z.ZodEnum<{
265
+ running: "running";
266
+ approved: "approved";
267
+ completed: "completed";
268
+ failed: "failed";
269
+ cancelled: "cancelled";
270
+ proposed: "proposed";
271
+ }>;
272
+ createdAt: z.ZodISODateTime;
273
+ updatedAt: z.ZodISODateTime;
274
+ resultNoteId: z.ZodNullable<z.ZodUUID>;
275
+ resultMarkdown: z.ZodNullable<z.ZodString>;
276
+ error: z.ZodNullable<z.ZodString>;
277
+ }, z.core.$strip>;
278
+ export type GoalAction = z.infer<typeof GoalActionSchema>;
279
+ export declare const GoalDetailSchema: z.ZodObject<{
280
+ goal: z.ZodObject<{
281
+ title: z.ZodString;
282
+ timeframe: z.ZodObject<{
283
+ start: z.ZodString;
284
+ end: z.ZodString;
285
+ precision: z.ZodEnum<{
286
+ custom: "custom";
287
+ year: "year";
288
+ month: "month";
289
+ quarter: "quarter";
290
+ }>;
291
+ timeZone: z.ZodString;
292
+ }, z.core.$strip>;
293
+ status: z.ZodDefault<z.ZodEnum<{
294
+ archived: "archived";
295
+ completed: "completed";
296
+ paused: "paused";
297
+ active: "active";
298
+ }>>;
299
+ tracking: z.ZodDefault<z.ZodBoolean>;
300
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
301
+ weekly: "weekly";
302
+ monthly: "monthly";
303
+ yearly: "yearly";
304
+ }>>>;
305
+ id: z.ZodUUID;
306
+ revision: z.ZodNumber;
307
+ createdAt: z.ZodISODateTime;
308
+ updatedAt: z.ZodISODateTime;
309
+ }, z.core.$strip>;
310
+ links: z.ZodArray<z.ZodObject<{
311
+ kind: z.ZodEnum<{
312
+ task: "task";
313
+ project: "project";
314
+ habit: "habit";
315
+ note: "note";
316
+ }>;
317
+ id: z.ZodUUID;
318
+ source: z.ZodDefault<z.ZodEnum<{
319
+ manual: "manual";
320
+ ai: "ai";
321
+ }>>;
322
+ reason: z.ZodString;
323
+ state: z.ZodDefault<z.ZodEnum<{
324
+ active: "active";
325
+ rejected: "rejected";
326
+ }>>;
327
+ title: z.ZodNullable<z.ZodString>;
328
+ available: z.ZodBoolean;
329
+ updatedAt: z.ZodISODateTime;
330
+ }, z.core.$strip>>;
331
+ checks: z.ZodArray<z.ZodObject<{
332
+ key: z.ZodString;
333
+ cadence: z.ZodEnum<{
334
+ daily: "daily";
335
+ weekly: "weekly";
336
+ monthly: "monthly";
337
+ yearly: "yearly";
338
+ }>;
339
+ start: z.ZodString;
340
+ end: z.ZodString;
341
+ checkedAt: z.ZodISODateTime;
342
+ signal: z.ZodEnum<{
343
+ unknown: "unknown";
344
+ moving: "moving";
345
+ quiet: "quiet";
346
+ }>;
347
+ summary: z.ZodString;
348
+ evidence: z.ZodArray<z.ZodObject<{
349
+ key: z.ZodString;
350
+ reference: z.ZodObject<{
351
+ kind: z.ZodEnum<{
352
+ task: "task";
353
+ project: "project";
354
+ habit: "habit";
355
+ note: "note";
356
+ }>;
357
+ id: z.ZodUUID;
358
+ }, z.core.$strip>;
359
+ at: z.ZodISODateTime;
360
+ kind: z.ZodEnum<{
361
+ task_completed: "task_completed";
362
+ task_started: "task_started";
363
+ task_reopened: "task_reopened";
364
+ task_changed: "task_changed";
365
+ habit_check_in: "habit_check_in";
366
+ note_changed: "note_changed";
367
+ }>;
368
+ title: z.ZodNullable<z.ZodString>;
369
+ available: z.ZodBoolean;
370
+ }, z.core.$strip>>;
371
+ references: z.ZodArray<z.ZodObject<{
372
+ kind: z.ZodEnum<{
373
+ task: "task";
374
+ project: "project";
375
+ habit: "habit";
376
+ note: "note";
377
+ }>;
378
+ id: z.ZodUUID;
379
+ }, z.core.$strip>>;
380
+ timeframe: z.ZodObject<{
381
+ start: z.ZodString;
382
+ end: z.ZodString;
383
+ precision: z.ZodEnum<{
384
+ custom: "custom";
385
+ year: "year";
386
+ month: "month";
387
+ quarter: "quarter";
388
+ }>;
389
+ timeZone: z.ZodString;
390
+ }, z.core.$strip>;
391
+ }, z.core.$strip>>;
392
+ actions: z.ZodArray<z.ZodObject<{
393
+ id: z.ZodUUID;
394
+ goalId: z.ZodUUID;
395
+ title: z.ZodString;
396
+ instruction: z.ZodString;
397
+ references: z.ZodArray<z.ZodObject<{
398
+ kind: z.ZodEnum<{
399
+ task: "task";
400
+ project: "project";
401
+ habit: "habit";
402
+ note: "note";
403
+ }>;
404
+ id: z.ZodUUID;
405
+ }, z.core.$strip>>;
406
+ status: z.ZodEnum<{
407
+ running: "running";
408
+ approved: "approved";
409
+ completed: "completed";
410
+ failed: "failed";
411
+ cancelled: "cancelled";
412
+ proposed: "proposed";
413
+ }>;
414
+ createdAt: z.ZodISODateTime;
415
+ updatedAt: z.ZodISODateTime;
416
+ resultNoteId: z.ZodNullable<z.ZodUUID>;
417
+ resultMarkdown: z.ZodNullable<z.ZodString>;
418
+ error: z.ZodNullable<z.ZodString>;
419
+ }, z.core.$strip>>;
420
+ }, z.core.$strip>;
421
+ export type GoalDetail = z.infer<typeof GoalDetailSchema>;
422
+ export declare const GoalsSnapshotSchema: z.ZodObject<{
423
+ goals: z.ZodArray<z.ZodObject<{
424
+ goal: z.ZodObject<{
425
+ title: z.ZodString;
426
+ timeframe: z.ZodObject<{
427
+ start: z.ZodString;
428
+ end: z.ZodString;
429
+ precision: z.ZodEnum<{
430
+ custom: "custom";
431
+ year: "year";
432
+ month: "month";
433
+ quarter: "quarter";
434
+ }>;
435
+ timeZone: z.ZodString;
436
+ }, z.core.$strip>;
437
+ status: z.ZodDefault<z.ZodEnum<{
438
+ archived: "archived";
439
+ completed: "completed";
440
+ paused: "paused";
441
+ active: "active";
442
+ }>>;
443
+ tracking: z.ZodDefault<z.ZodBoolean>;
444
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
445
+ weekly: "weekly";
446
+ monthly: "monthly";
447
+ yearly: "yearly";
448
+ }>>>;
449
+ id: z.ZodUUID;
450
+ revision: z.ZodNumber;
451
+ createdAt: z.ZodISODateTime;
452
+ updatedAt: z.ZodISODateTime;
453
+ }, z.core.$strip>;
454
+ links: z.ZodArray<z.ZodObject<{
455
+ kind: z.ZodEnum<{
456
+ task: "task";
457
+ project: "project";
458
+ habit: "habit";
459
+ note: "note";
460
+ }>;
461
+ id: z.ZodUUID;
462
+ source: z.ZodDefault<z.ZodEnum<{
463
+ manual: "manual";
464
+ ai: "ai";
465
+ }>>;
466
+ reason: z.ZodString;
467
+ state: z.ZodDefault<z.ZodEnum<{
468
+ active: "active";
469
+ rejected: "rejected";
470
+ }>>;
471
+ title: z.ZodNullable<z.ZodString>;
472
+ available: z.ZodBoolean;
473
+ updatedAt: z.ZodISODateTime;
474
+ }, z.core.$strip>>;
475
+ checks: z.ZodArray<z.ZodObject<{
476
+ key: z.ZodString;
477
+ cadence: z.ZodEnum<{
478
+ daily: "daily";
479
+ weekly: "weekly";
480
+ monthly: "monthly";
481
+ yearly: "yearly";
482
+ }>;
483
+ start: z.ZodString;
484
+ end: z.ZodString;
485
+ checkedAt: z.ZodISODateTime;
486
+ signal: z.ZodEnum<{
487
+ unknown: "unknown";
488
+ moving: "moving";
489
+ quiet: "quiet";
490
+ }>;
491
+ summary: z.ZodString;
492
+ evidence: z.ZodArray<z.ZodObject<{
493
+ key: z.ZodString;
494
+ reference: z.ZodObject<{
495
+ kind: z.ZodEnum<{
496
+ task: "task";
497
+ project: "project";
498
+ habit: "habit";
499
+ note: "note";
500
+ }>;
501
+ id: z.ZodUUID;
502
+ }, z.core.$strip>;
503
+ at: z.ZodISODateTime;
504
+ kind: z.ZodEnum<{
505
+ task_completed: "task_completed";
506
+ task_started: "task_started";
507
+ task_reopened: "task_reopened";
508
+ task_changed: "task_changed";
509
+ habit_check_in: "habit_check_in";
510
+ note_changed: "note_changed";
511
+ }>;
512
+ title: z.ZodNullable<z.ZodString>;
513
+ available: z.ZodBoolean;
514
+ }, z.core.$strip>>;
515
+ references: z.ZodArray<z.ZodObject<{
516
+ kind: z.ZodEnum<{
517
+ task: "task";
518
+ project: "project";
519
+ habit: "habit";
520
+ note: "note";
521
+ }>;
522
+ id: z.ZodUUID;
523
+ }, z.core.$strip>>;
524
+ timeframe: z.ZodObject<{
525
+ start: z.ZodString;
526
+ end: z.ZodString;
527
+ precision: z.ZodEnum<{
528
+ custom: "custom";
529
+ year: "year";
530
+ month: "month";
531
+ quarter: "quarter";
532
+ }>;
533
+ timeZone: z.ZodString;
534
+ }, z.core.$strip>;
535
+ }, z.core.$strip>>;
536
+ actions: z.ZodArray<z.ZodObject<{
537
+ id: z.ZodUUID;
538
+ goalId: z.ZodUUID;
539
+ title: z.ZodString;
540
+ instruction: z.ZodString;
541
+ references: z.ZodArray<z.ZodObject<{
542
+ kind: z.ZodEnum<{
543
+ task: "task";
544
+ project: "project";
545
+ habit: "habit";
546
+ note: "note";
547
+ }>;
548
+ id: z.ZodUUID;
549
+ }, z.core.$strip>>;
550
+ status: z.ZodEnum<{
551
+ running: "running";
552
+ approved: "approved";
553
+ completed: "completed";
554
+ failed: "failed";
555
+ cancelled: "cancelled";
556
+ proposed: "proposed";
557
+ }>;
558
+ createdAt: z.ZodISODateTime;
559
+ updatedAt: z.ZodISODateTime;
560
+ resultNoteId: z.ZodNullable<z.ZodUUID>;
561
+ resultMarkdown: z.ZodNullable<z.ZodString>;
562
+ error: z.ZodNullable<z.ZodString>;
563
+ }, z.core.$strip>>;
564
+ }, z.core.$strip>>;
565
+ refreshedAt: z.ZodISODateTime;
566
+ }, z.core.$strip>;
567
+ export type GoalsSnapshot = z.infer<typeof GoalsSnapshotSchema>;
568
+ /** Date-only arithmetic deliberately ignores DST and the computer's current zone. */
569
+ export declare function goalDaysRemaining(timeframe: GoalTimeframe, now?: Date): number;
570
+ export declare function goalPeriod(cadence: 'daily' | GoalCadence, today: string): {
571
+ start: string;
572
+ end: string;
573
+ key: string;
574
+ };
575
+ /** Completed periods only, with no backlog flood after a computer wakes. */
576
+ export declare function dueGoalPeriods(goal: Goal, existing: readonly Pick<GoalCheck, 'key'>[], now?: Date): {
577
+ start: string;
578
+ end: string;
579
+ key: string;
580
+ cadence: "daily" | "weekly" | "monthly" | "yearly";
581
+ }[];
582
+ export declare const GoalAnalysisSchema: z.ZodObject<{
583
+ links: z.ZodArray<z.ZodObject<{
584
+ kind: z.ZodEnum<{
585
+ task: "task";
586
+ project: "project";
587
+ habit: "habit";
588
+ note: "note";
589
+ }>;
590
+ id: z.ZodUUID;
591
+ reason: z.ZodString;
592
+ }, z.core.$strip>>;
593
+ summary: z.ZodString;
594
+ help: z.ZodNullable<z.ZodObject<{
595
+ title: z.ZodString;
596
+ instruction: z.ZodString;
597
+ references: z.ZodArray<z.ZodObject<{
598
+ kind: z.ZodEnum<{
599
+ task: "task";
600
+ project: "project";
601
+ habit: "habit";
602
+ note: "note";
603
+ }>;
604
+ id: z.ZodUUID;
605
+ }, z.core.$strip>>;
606
+ }, z.core.$strip>>;
607
+ }, z.core.$strip>;
608
+ export type GoalAnalysis = z.infer<typeof GoalAnalysisSchema>;
609
+ export declare const GoalCandidateSchema: z.ZodObject<{
610
+ kind: z.ZodEnum<{
611
+ task: "task";
612
+ project: "project";
613
+ habit: "habit";
614
+ note: "note";
615
+ }>;
616
+ id: z.ZodUUID;
617
+ title: z.ZodString;
618
+ description: z.ZodNullable<z.ZodString>;
619
+ updatedAt: z.ZodNullable<z.ZodISODateTime>;
620
+ status: z.ZodNullable<z.ZodString>;
621
+ projectId: z.ZodNullable<z.ZodUUID>;
622
+ }, z.core.$strip>;
623
+ export type GoalCandidate = z.infer<typeof GoalCandidateSchema>;
624
+ export declare const GoalTrackingContextSchema: z.ZodObject<{
625
+ detail: z.ZodObject<{
626
+ goal: z.ZodObject<{
627
+ title: z.ZodString;
628
+ timeframe: z.ZodObject<{
629
+ start: z.ZodString;
630
+ end: z.ZodString;
631
+ precision: z.ZodEnum<{
632
+ custom: "custom";
633
+ year: "year";
634
+ month: "month";
635
+ quarter: "quarter";
636
+ }>;
637
+ timeZone: z.ZodString;
638
+ }, z.core.$strip>;
639
+ status: z.ZodDefault<z.ZodEnum<{
640
+ archived: "archived";
641
+ completed: "completed";
642
+ paused: "paused";
643
+ active: "active";
644
+ }>>;
645
+ tracking: z.ZodDefault<z.ZodBoolean>;
646
+ reviews: z.ZodDefault<z.ZodArray<z.ZodEnum<{
647
+ weekly: "weekly";
648
+ monthly: "monthly";
649
+ yearly: "yearly";
650
+ }>>>;
651
+ id: z.ZodUUID;
652
+ revision: z.ZodNumber;
653
+ createdAt: z.ZodISODateTime;
654
+ updatedAt: z.ZodISODateTime;
655
+ }, z.core.$strip>;
656
+ links: z.ZodArray<z.ZodObject<{
657
+ kind: z.ZodEnum<{
658
+ task: "task";
659
+ project: "project";
660
+ habit: "habit";
661
+ note: "note";
662
+ }>;
663
+ id: z.ZodUUID;
664
+ source: z.ZodDefault<z.ZodEnum<{
665
+ manual: "manual";
666
+ ai: "ai";
667
+ }>>;
668
+ reason: z.ZodString;
669
+ state: z.ZodDefault<z.ZodEnum<{
670
+ active: "active";
671
+ rejected: "rejected";
672
+ }>>;
673
+ title: z.ZodNullable<z.ZodString>;
674
+ available: z.ZodBoolean;
675
+ updatedAt: z.ZodISODateTime;
676
+ }, z.core.$strip>>;
677
+ checks: z.ZodArray<z.ZodObject<{
678
+ key: z.ZodString;
679
+ cadence: z.ZodEnum<{
680
+ daily: "daily";
681
+ weekly: "weekly";
682
+ monthly: "monthly";
683
+ yearly: "yearly";
684
+ }>;
685
+ start: z.ZodString;
686
+ end: z.ZodString;
687
+ checkedAt: z.ZodISODateTime;
688
+ signal: z.ZodEnum<{
689
+ unknown: "unknown";
690
+ moving: "moving";
691
+ quiet: "quiet";
692
+ }>;
693
+ summary: z.ZodString;
694
+ evidence: z.ZodArray<z.ZodObject<{
695
+ key: z.ZodString;
696
+ reference: z.ZodObject<{
697
+ kind: z.ZodEnum<{
698
+ task: "task";
699
+ project: "project";
700
+ habit: "habit";
701
+ note: "note";
702
+ }>;
703
+ id: z.ZodUUID;
704
+ }, z.core.$strip>;
705
+ at: z.ZodISODateTime;
706
+ kind: z.ZodEnum<{
707
+ task_completed: "task_completed";
708
+ task_started: "task_started";
709
+ task_reopened: "task_reopened";
710
+ task_changed: "task_changed";
711
+ habit_check_in: "habit_check_in";
712
+ note_changed: "note_changed";
713
+ }>;
714
+ title: z.ZodNullable<z.ZodString>;
715
+ available: z.ZodBoolean;
716
+ }, z.core.$strip>>;
717
+ references: z.ZodArray<z.ZodObject<{
718
+ kind: z.ZodEnum<{
719
+ task: "task";
720
+ project: "project";
721
+ habit: "habit";
722
+ note: "note";
723
+ }>;
724
+ id: z.ZodUUID;
725
+ }, z.core.$strip>>;
726
+ timeframe: z.ZodObject<{
727
+ start: z.ZodString;
728
+ end: z.ZodString;
729
+ precision: z.ZodEnum<{
730
+ custom: "custom";
731
+ year: "year";
732
+ month: "month";
733
+ quarter: "quarter";
734
+ }>;
735
+ timeZone: z.ZodString;
736
+ }, z.core.$strip>;
737
+ }, z.core.$strip>>;
738
+ actions: z.ZodArray<z.ZodObject<{
739
+ id: z.ZodUUID;
740
+ goalId: z.ZodUUID;
741
+ title: z.ZodString;
742
+ instruction: z.ZodString;
743
+ references: z.ZodArray<z.ZodObject<{
744
+ kind: z.ZodEnum<{
745
+ task: "task";
746
+ project: "project";
747
+ habit: "habit";
748
+ note: "note";
749
+ }>;
750
+ id: z.ZodUUID;
751
+ }, z.core.$strip>>;
752
+ status: z.ZodEnum<{
753
+ running: "running";
754
+ approved: "approved";
755
+ completed: "completed";
756
+ failed: "failed";
757
+ cancelled: "cancelled";
758
+ proposed: "proposed";
759
+ }>;
760
+ createdAt: z.ZodISODateTime;
761
+ updatedAt: z.ZodISODateTime;
762
+ resultNoteId: z.ZodNullable<z.ZodUUID>;
763
+ resultMarkdown: z.ZodNullable<z.ZodString>;
764
+ error: z.ZodNullable<z.ZodString>;
765
+ }, z.core.$strip>>;
766
+ }, z.core.$strip>;
767
+ candidates: z.ZodArray<z.ZodObject<{
768
+ kind: z.ZodEnum<{
769
+ task: "task";
770
+ project: "project";
771
+ habit: "habit";
772
+ note: "note";
773
+ }>;
774
+ id: z.ZodUUID;
775
+ title: z.ZodString;
776
+ description: z.ZodNullable<z.ZodString>;
777
+ updatedAt: z.ZodNullable<z.ZodISODateTime>;
778
+ status: z.ZodNullable<z.ZodString>;
779
+ projectId: z.ZodNullable<z.ZodUUID>;
780
+ }, z.core.$strip>>;
781
+ evidence: z.ZodArray<z.ZodObject<{
782
+ key: z.ZodString;
783
+ reference: z.ZodObject<{
784
+ kind: z.ZodEnum<{
785
+ task: "task";
786
+ project: "project";
787
+ habit: "habit";
788
+ note: "note";
789
+ }>;
790
+ id: z.ZodUUID;
791
+ }, z.core.$strip>;
792
+ at: z.ZodISODateTime;
793
+ kind: z.ZodEnum<{
794
+ task_completed: "task_completed";
795
+ task_started: "task_started";
796
+ task_reopened: "task_reopened";
797
+ task_changed: "task_changed";
798
+ habit_check_in: "habit_check_in";
799
+ note_changed: "note_changed";
800
+ }>;
801
+ title: z.ZodNullable<z.ZodString>;
802
+ available: z.ZodBoolean;
803
+ }, z.core.$strip>>;
804
+ complete: z.ZodBoolean;
805
+ }, z.core.$strip>;
806
+ export type GoalTrackingContext = z.infer<typeof GoalTrackingContextSchema>;
807
+ export declare const RecordGoalCheckSchema: z.ZodObject<{
808
+ revision: z.ZodNumber;
809
+ cadence: z.ZodEnum<{
810
+ daily: "daily";
811
+ weekly: "weekly";
812
+ monthly: "monthly";
813
+ yearly: "yearly";
814
+ }>;
815
+ summary: z.ZodString;
816
+ noteObservations: z.ZodDefault<z.ZodArray<z.ZodObject<{
817
+ id: z.ZodUUID;
818
+ at: z.ZodISODateTime;
819
+ }, z.core.$strip>>>;
820
+ notesAvailable: z.ZodDefault<z.ZodBoolean>;
821
+ help: z.ZodNullable<z.ZodObject<{
822
+ title: z.ZodString;
823
+ instruction: z.ZodString;
824
+ references: z.ZodArray<z.ZodObject<{
825
+ kind: z.ZodEnum<{
826
+ task: "task";
827
+ project: "project";
828
+ habit: "habit";
829
+ note: "note";
830
+ }>;
831
+ id: z.ZodUUID;
832
+ }, z.core.$strip>>;
833
+ }, z.core.$strip>>;
834
+ }, z.core.$strip>;
835
+ //# sourceMappingURL=goals.d.ts.map