@openspecui/core 6.0.1 → 6.1.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 (120) hide show
  1. package/dist/app-daemon-control.d.mts +362 -0
  2. package/dist/app-daemon-control.mjs +81 -0
  3. package/dist/{cli-projection-vO3-FJg5.mjs → cli-projection-BHfqvlpA.mjs} +1 -1
  4. package/dist/{cli-projection-w3LzenG5.d.mts → cli-projection-DVpaxd82.d.mts} +9 -9
  5. package/dist/cli-projection.d.mts +5 -5
  6. package/dist/cli-projection.mjs +2 -2
  7. package/dist/{command-result-CjnZNtGL.d.mts → command-result-BRYzlmg1.d.mts} +71 -60
  8. package/dist/{dashboard-summary-transport-CYBuU4iT.mjs → dashboard-summary-transport-BMtZ0q12.mjs} +2 -2
  9. package/dist/{dashboard-summary-transport-DAFz2ZQe.d.mts → dashboard-summary-transport-DEjdVWdn.d.mts} +4080 -2642
  10. package/dist/dashboard-summary-transport.d.mts +25 -24
  11. package/dist/dashboard-summary-transport.mjs +4 -4
  12. package/dist/{document-translation-CeJFGMoy.mjs → document-translation-CUkkxnYV.mjs} +1 -1
  13. package/dist/{document-translation-DyEj4JKj.d.mts → document-translation-J_NddeDy.d.mts} +100 -100
  14. package/dist/document-translation.d.mts +1 -1
  15. package/dist/document-translation.mjs +2 -2
  16. package/dist/{hosted-app-Y7yqlPBG.mjs → hosted-app-C3gBSvov.mjs} +3 -2
  17. package/dist/hosted-app.d.mts +26 -25
  18. package/dist/hosted-app.mjs +8 -7
  19. package/dist/{hosted-contract-BuhF_tuQ.mjs → hosted-contract-CaN2aw54.mjs} +31 -7
  20. package/dist/hosted-contract.d.mts +26 -25
  21. package/dist/hosted-contract.mjs +7 -6
  22. package/dist/index.d.mts +26 -25
  23. package/dist/index.mjs +953 -102
  24. package/dist/{local-download-profiles-BokmRLew.d.mts → local-download-profiles-CI66p2NW.d.mts} +1 -1
  25. package/dist/local-download-profiles.d.mts +2 -2
  26. package/dist/local-download-profiles.mjs +1 -1
  27. package/dist/markdown-facts.d.mts +1 -1
  28. package/dist/markdown-facts.mjs +1 -1
  29. package/dist/{markdown-reading-mG4OAbDO.mjs → markdown-reading-0L-mVBJp.mjs} +1 -1
  30. package/dist/{markdown-reading-LUdqfbxH.d.mts → markdown-reading-w686Obnl.d.mts} +1 -1
  31. package/dist/markdown-reading.d.mts +2 -2
  32. package/dist/markdown-reading.mjs +2 -2
  33. package/dist/{notifications-CgJlLgLO.d.mts → notifications-DaDB-ZBM.d.mts} +1 -1
  34. package/dist/{notifications-C2bxAzX_.mjs → notifications-E6_WBjQO.mjs} +2 -2
  35. package/dist/notifications.d.mts +2 -2
  36. package/dist/notifications.mjs +3 -3
  37. package/dist/{openspec-annotations-C58Aoi-V.d.mts → openspec-annotations-BXAqKLXc.d.mts} +2 -2
  38. package/dist/{openspec-annotations-DCfqBMal.mjs → openspec-annotations-DiHje5HD.mjs} +2 -2
  39. package/dist/openspec-annotations.d.mts +3 -3
  40. package/dist/openspec-annotations.mjs +3 -3
  41. package/dist/openspec-compat.d.mts +12 -10
  42. package/dist/openspec-compat.mjs +19 -23
  43. package/dist/{openspec-projection-DnB0EalA.d.mts → openspec-projection-DrrLI_ub.d.mts} +3 -3
  44. package/dist/{openspec-projection-DCgToo0Q.mjs → openspec-projection-DvJnsxLZ.mjs} +2 -2
  45. package/dist/openspec-projection.d.mts +5 -5
  46. package/dist/openspec-projection.mjs +4 -4
  47. package/dist/opsx-display-path.d.mts +1 -1
  48. package/dist/opsx-display-path.mjs +1 -1
  49. package/dist/{opsx-entity-CQGXOj_a.d.mts → opsx-entity-BhMqFWGT.d.mts} +2 -2
  50. package/dist/opsx-entity.d.mts +7 -7
  51. package/dist/opsx-entity.mjs +1 -1
  52. package/dist/{opsx-schema-detail-DTWBhlbh.d.mts → opsx-schema-detail-DvkJvwg_.d.mts} +2 -2
  53. package/dist/opsx-schema-detail.d.mts +8 -8
  54. package/dist/opsx-schema-detail.mjs +1 -1
  55. package/dist/{opsx-types-BKGpvDDe.d.mts → opsx-types-DRg1Yo2Y.d.mts} +213 -213
  56. package/dist/opsx-workflows.d.mts +1 -1
  57. package/dist/opsx-workflows.mjs +1 -1
  58. package/dist/{planning-cli-projection-DIRxeq2H.mjs → planning-cli-projection-DrkT18EI.mjs} +4 -4
  59. package/dist/planning-cli-projection.d.mts +25 -24
  60. package/dist/planning-cli-projection.mjs +7 -7
  61. package/dist/{schemas-C-BZiH0m.d.mts → schemas-Bafi7L8Y.d.mts} +190 -190
  62. package/dist/{sounds-qhRgCy0F.d.mts → sounds-B6SBMmGR.d.mts} +8 -8
  63. package/dist/sounds.d.mts +1 -1
  64. package/dist/sounds.mjs +1 -1
  65. package/dist/{spec-catalog-ZGuiZ4CE.mjs → spec-catalog-Dv2qolxy.mjs} +3 -3
  66. package/dist/spec-catalog.d.mts +25 -24
  67. package/dist/spec-catalog.mjs +4 -4
  68. package/dist/store-content-projection-BPDCma8v.d.mts +463 -0
  69. package/dist/store-content-projection-CiMcGZnG.mjs +82 -0
  70. package/dist/store-content-projection.d.mts +2 -0
  71. package/dist/store-content-projection.mjs +4 -0
  72. package/dist/{store-mutation-protocol-CSwD-xPO.mjs → store-mutation-protocol-CLtYUSwC.mjs} +1 -1
  73. package/dist/{store-mutation-protocol-3TzQ6ete.d.mts → store-mutation-protocol-Ckcv2-zs.d.mts} +48 -48
  74. package/dist/store-mutation-protocol.d.mts +1 -1
  75. package/dist/store-mutation-protocol.mjs +2 -2
  76. package/dist/{store-types-QeY5nWlF.d.mts → store-types-B0Qx8UPs.d.mts} +1 -1
  77. package/dist/store-types.d.mts +5 -5
  78. package/dist/store-types.mjs +1 -1
  79. package/dist/{task-progress-B_IWVXjA.mjs → task-progress-DpZak5xA.mjs} +1 -1
  80. package/dist/task-progress.d.mts +6 -6
  81. package/dist/task-progress.mjs +2 -2
  82. package/dist/{terminal-audio-tXDm_EDe.d.mts → terminal-audio-BoIZa5SP.d.mts} +1 -1
  83. package/dist/{terminal-audio-d6KItUeJ.mjs → terminal-audio-punFQHXI.mjs} +1 -1
  84. package/dist/terminal-audio.d.mts +2 -2
  85. package/dist/terminal-audio.mjs +2 -2
  86. package/dist/terminal-control.d.mts +2 -2
  87. package/dist/terminal-control.mjs +1 -1
  88. package/dist/{terminal-invocation-rKDNnsUS.d.mts → terminal-invocation-ChWI_i72.d.mts} +86 -86
  89. package/dist/terminal-invocation.d.mts +1 -1
  90. package/dist/terminal-invocation.mjs +1 -1
  91. package/dist/terminal-theme.d.mts +1 -1
  92. package/dist/terminal-theme.mjs +1 -1
  93. package/dist/translation-language-pair.d.mts +1 -1
  94. package/dist/translation-language-pair.mjs +1 -1
  95. package/dist/{translator-BEiXnLjR.d.mts → translator-C7d_Bkbo.d.mts} +204 -204
  96. package/dist/translator.d.mts +1 -1
  97. package/dist/translator.mjs +1 -1
  98. package/dist/workspace-directory-catalog.d.mts +172 -0
  99. package/dist/workspace-directory-catalog.mjs +111 -0
  100. package/package.json +28 -5
  101. /package/dist/{common-D8YUK9dA.mjs → common-BpgNUOOT.mjs} +0 -0
  102. /package/dist/{local-download-profiles-odzOdf96.mjs → local-download-profiles-DK4g6FRe.mjs} +0 -0
  103. /package/dist/{markdown-facts-CCw3QdbM.d.mts → markdown-facts-C9yWB2I9.d.mts} +0 -0
  104. /package/dist/{markdown-facts-BUqLvFRf.mjs → markdown-facts-Dve6IAJP.mjs} +0 -0
  105. /package/dist/{opsx-display-path-D13XV20v.mjs → opsx-display-path-DuPEvPV0.mjs} +0 -0
  106. /package/dist/{opsx-display-path-RXS5JTbV.d.mts → opsx-display-path-eWJ4ve-O.d.mts} +0 -0
  107. /package/dist/{opsx-entity-Cn_Zu1J3.mjs → opsx-entity-Br5S5N0o.mjs} +0 -0
  108. /package/dist/{opsx-schema-detail-Beis4Ba2.mjs → opsx-schema-detail-CckZIEVr.mjs} +0 -0
  109. /package/dist/{opsx-workflows-BvnJqjfL.d.mts → opsx-workflows-Bhh_bI-e.d.mts} +0 -0
  110. /package/dist/{opsx-workflows-Ccc6U7IR.mjs → opsx-workflows-GPZSe1C_.mjs} +0 -0
  111. /package/dist/{schemas-BFroDdOC.mjs → schemas-BrS9qSB3.mjs} +0 -0
  112. /package/dist/{sounds-NXwveBqq.mjs → sounds-na4c8j0c.mjs} +0 -0
  113. /package/dist/{store-types-DlX1REBg.mjs → store-types-Cs40yohL.mjs} +0 -0
  114. /package/dist/{terminal-control-BSAlOTs8.mjs → terminal-control-BvoxwQ6m.mjs} +0 -0
  115. /package/dist/{terminal-invocation-0p-j2eSP.mjs → terminal-invocation-BexVY5E2.mjs} +0 -0
  116. /package/dist/{terminal-theme-m3MSGJ7U.d.mts → terminal-theme-BzARb2Do.d.mts} +0 -0
  117. /package/dist/{terminal-theme-B8iRttTR.mjs → terminal-theme-DIhzj5Si.mjs} +0 -0
  118. /package/dist/{translation-language-pair-Bbhk-LAC.mjs → translation-language-pair-BV2cGjfv.mjs} +0 -0
  119. /package/dist/{translation-language-pair-C18GPATW.d.mts → translation-language-pair-DeAiww3_.d.mts} +0 -0
  120. /package/dist/{translator-Cjtv4tya.mjs → translator-DCCZeHt1.mjs} +0 -0
@@ -0,0 +1,362 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/app-daemon-control.d.ts
4
+
5
+ /** Runtime-only Workspace authority delivered from the local daemon to its same-origin App shell. */
6
+ declare const AppDaemonWorkspaceBindingSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ backendUrl: z.ZodString;
9
+ credential: z.ZodNullable<z.ZodString>;
10
+ projectDir: z.ZodString;
11
+ ownership: z.ZodEnum<["daemon-managed", "external"]>;
12
+ registeredAt: z.ZodNumber;
13
+ managedGeneration: z.ZodNullable<z.ZodNumber>;
14
+ shutdown: z.ZodEnum<["managed", "external-owner", "close-only"]>;
15
+ git: z.ZodNullable<z.ZodObject<{
16
+ remoteUrl: z.ZodNullable<z.ZodString>;
17
+ branch: z.ZodNullable<z.ZodString>;
18
+ githubSlug: z.ZodNullable<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ remoteUrl: string | null;
21
+ branch: string | null;
22
+ githubSlug: string | null;
23
+ }, {
24
+ remoteUrl: string | null;
25
+ branch: string | null;
26
+ githubSlug: string | null;
27
+ }>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ id: string;
30
+ credential: string | null;
31
+ backendUrl: string;
32
+ projectDir: string;
33
+ ownership: "daemon-managed" | "external";
34
+ registeredAt: number;
35
+ managedGeneration: number | null;
36
+ shutdown: "managed" | "external-owner" | "close-only";
37
+ git: {
38
+ remoteUrl: string | null;
39
+ branch: string | null;
40
+ githubSlug: string | null;
41
+ } | null;
42
+ }, {
43
+ id: string;
44
+ credential: string | null;
45
+ backendUrl: string;
46
+ projectDir: string;
47
+ ownership: "daemon-managed" | "external";
48
+ registeredAt: number;
49
+ managedGeneration: number | null;
50
+ shutdown: "managed" | "external-owner" | "close-only";
51
+ git: {
52
+ remoteUrl: string | null;
53
+ branch: string | null;
54
+ githubSlug: string | null;
55
+ } | null;
56
+ }>;
57
+ type AppDaemonWorkspaceBinding = z.infer<typeof AppDaemonWorkspaceBindingSchema>;
58
+ /** Complete current daemon ledger; clients replace by revision instead of applying event deltas. */
59
+ declare const AppDaemonWorkspaceSnapshotSchema: z.ZodObject<{
60
+ revision: z.ZodNumber;
61
+ workspaces: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ backendUrl: z.ZodString;
64
+ credential: z.ZodNullable<z.ZodString>;
65
+ projectDir: z.ZodString;
66
+ ownership: z.ZodEnum<["daemon-managed", "external"]>;
67
+ registeredAt: z.ZodNumber;
68
+ managedGeneration: z.ZodNullable<z.ZodNumber>;
69
+ shutdown: z.ZodEnum<["managed", "external-owner", "close-only"]>;
70
+ git: z.ZodNullable<z.ZodObject<{
71
+ remoteUrl: z.ZodNullable<z.ZodString>;
72
+ branch: z.ZodNullable<z.ZodString>;
73
+ githubSlug: z.ZodNullable<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ remoteUrl: string | null;
76
+ branch: string | null;
77
+ githubSlug: string | null;
78
+ }, {
79
+ remoteUrl: string | null;
80
+ branch: string | null;
81
+ githubSlug: string | null;
82
+ }>>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ id: string;
85
+ credential: string | null;
86
+ backendUrl: string;
87
+ projectDir: string;
88
+ ownership: "daemon-managed" | "external";
89
+ registeredAt: number;
90
+ managedGeneration: number | null;
91
+ shutdown: "managed" | "external-owner" | "close-only";
92
+ git: {
93
+ remoteUrl: string | null;
94
+ branch: string | null;
95
+ githubSlug: string | null;
96
+ } | null;
97
+ }, {
98
+ id: string;
99
+ credential: string | null;
100
+ backendUrl: string;
101
+ projectDir: string;
102
+ ownership: "daemon-managed" | "external";
103
+ registeredAt: number;
104
+ managedGeneration: number | null;
105
+ shutdown: "managed" | "external-owner" | "close-only";
106
+ git: {
107
+ remoteUrl: string | null;
108
+ branch: string | null;
109
+ githubSlug: string | null;
110
+ } | null;
111
+ }>, "many">;
112
+ }, "strip", z.ZodTypeAny, {
113
+ revision: number;
114
+ workspaces: {
115
+ id: string;
116
+ credential: string | null;
117
+ backendUrl: string;
118
+ projectDir: string;
119
+ ownership: "daemon-managed" | "external";
120
+ registeredAt: number;
121
+ managedGeneration: number | null;
122
+ shutdown: "managed" | "external-owner" | "close-only";
123
+ git: {
124
+ remoteUrl: string | null;
125
+ branch: string | null;
126
+ githubSlug: string | null;
127
+ } | null;
128
+ }[];
129
+ }, {
130
+ revision: number;
131
+ workspaces: {
132
+ id: string;
133
+ credential: string | null;
134
+ backendUrl: string;
135
+ projectDir: string;
136
+ ownership: "daemon-managed" | "external";
137
+ registeredAt: number;
138
+ managedGeneration: number | null;
139
+ shutdown: "managed" | "external-owner" | "close-only";
140
+ git: {
141
+ remoteUrl: string | null;
142
+ branch: string | null;
143
+ githubSlug: string | null;
144
+ } | null;
145
+ }[];
146
+ }>;
147
+ type AppDaemonWorkspaceSnapshot = z.infer<typeof AppDaemonWorkspaceSnapshotSchema>;
148
+ /** Invalidation carries ordering evidence only; the App always Pulls the complete replacement snapshot. */
149
+ declare const AppDaemonInvalidationSchema: z.ZodObject<{
150
+ revision: z.ZodNumber;
151
+ }, "strip", z.ZodTypeAny, {
152
+ revision: number;
153
+ }, {
154
+ revision: number;
155
+ }>;
156
+ type AppDaemonInvalidation = z.infer<typeof AppDaemonInvalidationSchema>;
157
+ /** Result of asking the daemon to open one currently registered opaque Workspace id. */
158
+ declare const AppDaemonOpenWorkspaceResponseSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
159
+ ok: z.ZodLiteral<true>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ ok: true;
162
+ }, {
163
+ ok: true;
164
+ }>, z.ZodObject<{
165
+ ok: z.ZodLiteral<false>;
166
+ error: z.ZodObject<{
167
+ code: z.ZodEnum<["NOT_FOUND", "PRESENTATION_FAILED"]>;
168
+ message: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ code: "NOT_FOUND" | "PRESENTATION_FAILED";
171
+ message: string;
172
+ }, {
173
+ code: "NOT_FOUND" | "PRESENTATION_FAILED";
174
+ message: string;
175
+ }>;
176
+ }, "strip", z.ZodTypeAny, {
177
+ error: {
178
+ code: "NOT_FOUND" | "PRESENTATION_FAILED";
179
+ message: string;
180
+ };
181
+ ok: false;
182
+ }, {
183
+ error: {
184
+ code: "NOT_FOUND" | "PRESENTATION_FAILED";
185
+ message: string;
186
+ };
187
+ ok: false;
188
+ }>]>;
189
+ type AppDaemonOpenWorkspaceResponse = z.infer<typeof AppDaemonOpenWorkspaceResponseSchema>;
190
+ /** Same-origin request body for starting one daemon-managed project from a local directory. */
191
+ declare const AppDaemonStartManagedProjectRequestSchema: z.ZodObject<{
192
+ projectDir: z.ZodString;
193
+ }, "strip", z.ZodTypeAny, {
194
+ projectDir: string;
195
+ }, {
196
+ projectDir: string;
197
+ }>;
198
+ type AppDaemonStartManagedProjectRequest = z.infer<typeof AppDaemonStartManagedProjectRequestSchema>;
199
+ /** Same-origin request body for stopping one exact daemon-managed generation. */
200
+ declare const AppDaemonStopManagedProjectRequestSchema: z.ZodObject<{
201
+ generation: z.ZodNumber;
202
+ }, "strip", z.ZodTypeAny, {
203
+ generation: number;
204
+ }, {
205
+ generation: number;
206
+ }>;
207
+ type AppDaemonStopManagedProjectRequest = z.infer<typeof AppDaemonStopManagedProjectRequestSchema>;
208
+ /** Settled same-origin managed start response. Success means readiness and lease admission completed. */
209
+ declare const AppDaemonStartManagedProjectResponseSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
210
+ ok: z.ZodLiteral<true>;
211
+ workspace: z.ZodObject<{
212
+ id: z.ZodString;
213
+ backendUrl: z.ZodString;
214
+ credential: z.ZodNullable<z.ZodString>;
215
+ projectDir: z.ZodString;
216
+ ownership: z.ZodEnum<["daemon-managed", "external"]>;
217
+ registeredAt: z.ZodNumber;
218
+ managedGeneration: z.ZodNullable<z.ZodNumber>;
219
+ shutdown: z.ZodEnum<["managed", "external-owner", "close-only"]>;
220
+ git: z.ZodNullable<z.ZodObject<{
221
+ remoteUrl: z.ZodNullable<z.ZodString>;
222
+ branch: z.ZodNullable<z.ZodString>;
223
+ githubSlug: z.ZodNullable<z.ZodString>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ remoteUrl: string | null;
226
+ branch: string | null;
227
+ githubSlug: string | null;
228
+ }, {
229
+ remoteUrl: string | null;
230
+ branch: string | null;
231
+ githubSlug: string | null;
232
+ }>>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ id: string;
235
+ credential: string | null;
236
+ backendUrl: string;
237
+ projectDir: string;
238
+ ownership: "daemon-managed" | "external";
239
+ registeredAt: number;
240
+ managedGeneration: number | null;
241
+ shutdown: "managed" | "external-owner" | "close-only";
242
+ git: {
243
+ remoteUrl: string | null;
244
+ branch: string | null;
245
+ githubSlug: string | null;
246
+ } | null;
247
+ }, {
248
+ id: string;
249
+ credential: string | null;
250
+ backendUrl: string;
251
+ projectDir: string;
252
+ ownership: "daemon-managed" | "external";
253
+ registeredAt: number;
254
+ managedGeneration: number | null;
255
+ shutdown: "managed" | "external-owner" | "close-only";
256
+ git: {
257
+ remoteUrl: string | null;
258
+ branch: string | null;
259
+ githubSlug: string | null;
260
+ } | null;
261
+ }>;
262
+ alreadyRunning: z.ZodBoolean;
263
+ }, "strip", z.ZodTypeAny, {
264
+ ok: true;
265
+ workspace: {
266
+ id: string;
267
+ credential: string | null;
268
+ backendUrl: string;
269
+ projectDir: string;
270
+ ownership: "daemon-managed" | "external";
271
+ registeredAt: number;
272
+ managedGeneration: number | null;
273
+ shutdown: "managed" | "external-owner" | "close-only";
274
+ git: {
275
+ remoteUrl: string | null;
276
+ branch: string | null;
277
+ githubSlug: string | null;
278
+ } | null;
279
+ };
280
+ alreadyRunning: boolean;
281
+ }, {
282
+ ok: true;
283
+ workspace: {
284
+ id: string;
285
+ credential: string | null;
286
+ backendUrl: string;
287
+ projectDir: string;
288
+ ownership: "daemon-managed" | "external";
289
+ registeredAt: number;
290
+ managedGeneration: number | null;
291
+ shutdown: "managed" | "external-owner" | "close-only";
292
+ git: {
293
+ remoteUrl: string | null;
294
+ branch: string | null;
295
+ githubSlug: string | null;
296
+ } | null;
297
+ };
298
+ alreadyRunning: boolean;
299
+ }>, z.ZodObject<{
300
+ ok: z.ZodLiteral<false>;
301
+ error: z.ZodObject<{
302
+ code: z.ZodEnum<["UNSUPPORTED", "INVALID_DIRECTORY", "SPAWN_FAILED", "GENERATION_MISMATCH", "INVALID_REQUEST"]>;
303
+ message: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
306
+ message: string;
307
+ }, {
308
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
309
+ message: string;
310
+ }>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ error: {
313
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
314
+ message: string;
315
+ };
316
+ ok: false;
317
+ }, {
318
+ error: {
319
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
320
+ message: string;
321
+ };
322
+ ok: false;
323
+ }>]>;
324
+ type AppDaemonStartManagedProjectResponse = z.infer<typeof AppDaemonStartManagedProjectResponseSchema>;
325
+ /** Settled same-origin exact-generation Stop response. */
326
+ declare const AppDaemonStopManagedProjectResponseSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
327
+ ok: z.ZodLiteral<true>;
328
+ generation: z.ZodNumber;
329
+ }, "strip", z.ZodTypeAny, {
330
+ ok: true;
331
+ generation: number;
332
+ }, {
333
+ ok: true;
334
+ generation: number;
335
+ }>, z.ZodObject<{
336
+ ok: z.ZodLiteral<false>;
337
+ error: z.ZodObject<{
338
+ code: z.ZodEnum<["UNSUPPORTED", "INVALID_DIRECTORY", "SPAWN_FAILED", "GENERATION_MISMATCH", "INVALID_REQUEST"]>;
339
+ message: z.ZodString;
340
+ }, "strip", z.ZodTypeAny, {
341
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
342
+ message: string;
343
+ }, {
344
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
345
+ message: string;
346
+ }>;
347
+ }, "strip", z.ZodTypeAny, {
348
+ error: {
349
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
350
+ message: string;
351
+ };
352
+ ok: false;
353
+ }, {
354
+ error: {
355
+ code: "INVALID_REQUEST" | "UNSUPPORTED" | "INVALID_DIRECTORY" | "SPAWN_FAILED" | "GENERATION_MISMATCH";
356
+ message: string;
357
+ };
358
+ ok: false;
359
+ }>]>;
360
+ type AppDaemonStopManagedProjectResponse = z.infer<typeof AppDaemonStopManagedProjectResponseSchema>;
361
+ //#endregion
362
+ export { AppDaemonInvalidation, AppDaemonInvalidationSchema, AppDaemonOpenWorkspaceResponse, AppDaemonOpenWorkspaceResponseSchema, AppDaemonStartManagedProjectRequest, AppDaemonStartManagedProjectRequestSchema, AppDaemonStartManagedProjectResponse, AppDaemonStartManagedProjectResponseSchema, AppDaemonStopManagedProjectRequest, AppDaemonStopManagedProjectRequestSchema, AppDaemonStopManagedProjectResponse, AppDaemonStopManagedProjectResponseSchema, AppDaemonWorkspaceBinding, AppDaemonWorkspaceBindingSchema, AppDaemonWorkspaceSnapshot, AppDaemonWorkspaceSnapshotSchema };
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/app-daemon-control.ts
4
+ /**
5
+ * Orthogonal intents (updated 2026-07-30 Asia/Shanghai):
6
+ * 1. Define the browser-safe daemon Workspace snapshot and invalidation wire contract.
7
+ * 2. Keep runtime credentials typed but separate from persistent App shell state.
8
+ * 3. Define the same-origin open-by-id acknowledgement without exposing backend targets.
9
+ * 4. Define local-only managed directory start/Stop and path-first runtime evidence.
10
+ *
11
+ * Original request (2026-07-29): "如果已经有 app daemon,那么默认投递到 app 中。"
12
+ */
13
+ /** Runtime-only Workspace authority delivered from the local daemon to its same-origin App shell. */
14
+ const AppDaemonWorkspaceBindingSchema = z.object({
15
+ id: z.string().min(1),
16
+ backendUrl: z.string().url(),
17
+ credential: z.string().min(1).nullable(),
18
+ projectDir: z.string().min(1),
19
+ ownership: z.enum(["daemon-managed", "external"]),
20
+ registeredAt: z.number().int().nonnegative(),
21
+ managedGeneration: z.number().int().nonnegative().nullable(),
22
+ shutdown: z.enum([
23
+ "managed",
24
+ "external-owner",
25
+ "close-only"
26
+ ]),
27
+ git: z.object({
28
+ remoteUrl: z.string().min(1).nullable(),
29
+ branch: z.string().min(1).nullable(),
30
+ githubSlug: z.string().min(1).nullable()
31
+ }).nullable()
32
+ });
33
+ /** Complete current daemon ledger; clients replace by revision instead of applying event deltas. */
34
+ const AppDaemonWorkspaceSnapshotSchema = z.object({
35
+ revision: z.number().int().nonnegative(),
36
+ workspaces: z.array(AppDaemonWorkspaceBindingSchema)
37
+ });
38
+ /** Invalidation carries ordering evidence only; the App always Pulls the complete replacement snapshot. */
39
+ const AppDaemonInvalidationSchema = z.object({ revision: z.number().int().nonnegative() });
40
+ /** Result of asking the daemon to open one currently registered opaque Workspace id. */
41
+ const AppDaemonOpenWorkspaceResponseSchema = z.discriminatedUnion("ok", [z.object({ ok: z.literal(true) }), z.object({
42
+ ok: z.literal(false),
43
+ error: z.object({
44
+ code: z.enum(["NOT_FOUND", "PRESENTATION_FAILED"]),
45
+ message: z.string().min(1)
46
+ })
47
+ })]);
48
+ /** Same-origin request body for starting one daemon-managed project from a local directory. */
49
+ const AppDaemonStartManagedProjectRequestSchema = z.object({ projectDir: z.string().trim().min(1) });
50
+ /** Same-origin request body for stopping one exact daemon-managed generation. */
51
+ const AppDaemonStopManagedProjectRequestSchema = z.object({ generation: z.number().int().nonnegative() });
52
+ const AppDaemonManagedProjectErrorSchema = z.object({
53
+ code: z.enum([
54
+ "UNSUPPORTED",
55
+ "INVALID_DIRECTORY",
56
+ "SPAWN_FAILED",
57
+ "GENERATION_MISMATCH",
58
+ "INVALID_REQUEST"
59
+ ]),
60
+ message: z.string().min(1)
61
+ });
62
+ /** Settled same-origin managed start response. Success means readiness and lease admission completed. */
63
+ const AppDaemonStartManagedProjectResponseSchema = z.discriminatedUnion("ok", [z.object({
64
+ ok: z.literal(true),
65
+ workspace: AppDaemonWorkspaceBindingSchema,
66
+ alreadyRunning: z.boolean()
67
+ }), z.object({
68
+ ok: z.literal(false),
69
+ error: AppDaemonManagedProjectErrorSchema
70
+ })]);
71
+ /** Settled same-origin exact-generation Stop response. */
72
+ const AppDaemonStopManagedProjectResponseSchema = z.discriminatedUnion("ok", [z.object({
73
+ ok: z.literal(true),
74
+ generation: z.number().int().nonnegative()
75
+ }), z.object({
76
+ ok: z.literal(false),
77
+ error: AppDaemonManagedProjectErrorSchema
78
+ })]);
79
+
80
+ //#endregion
81
+ export { AppDaemonInvalidationSchema, AppDaemonOpenWorkspaceResponseSchema, AppDaemonStartManagedProjectRequestSchema, AppDaemonStartManagedProjectResponseSchema, AppDaemonStopManagedProjectRequestSchema, AppDaemonStopManagedProjectResponseSchema, AppDaemonWorkspaceBindingSchema, AppDaemonWorkspaceSnapshotSchema };
@@ -1,4 +1,4 @@
1
- import { n as CliDiagnosticSchema } from "./common-D8YUK9dA.mjs";
1
+ import { n as CliDiagnosticSchema } from "./common-BpgNUOOT.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/cli-projection.ts
@@ -1,4 +1,4 @@
1
- import { n as CliJsonValue, t as CliCommandResult } from "./command-result-CjnZNtGL.mjs";
1
+ import { n as CliJsonValue, t as CliCommandResult } from "./command-result-BRYzlmg1.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/cli-projection.d.ts
@@ -215,21 +215,21 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
215
215
  workGeneration: z.ZodNumber;
216
216
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
217
217
  }, "strip", z.ZodTypeAny, {
218
+ identity: string;
218
219
  error: null;
219
220
  state: "loading";
220
221
  data: null;
221
222
  freshness: null;
222
223
  snapshotGeneration: null;
223
- identity: string;
224
224
  workGeneration: number;
225
225
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
226
226
  }, {
227
+ identity: string;
227
228
  error: null;
228
229
  state: "loading";
229
230
  data: null;
230
231
  freshness: null;
231
232
  snapshotGeneration: null;
232
- identity: string;
233
233
  workGeneration: number;
234
234
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
235
235
  }>, z.ZodObject<{
@@ -390,6 +390,7 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
390
390
  workGeneration: z.ZodNumber;
391
391
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
392
392
  }, "strip", z.ZodTypeAny, {
393
+ identity: string;
393
394
  error: {
394
395
  message: string;
395
396
  name: string;
@@ -413,10 +414,10 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
413
414
  data: null;
414
415
  freshness: null;
415
416
  snapshotGeneration: null;
416
- identity: string;
417
417
  workGeneration: number;
418
418
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
419
419
  }, {
420
+ identity: string;
420
421
  error: {
421
422
  message: string;
422
423
  name: string;
@@ -440,7 +441,6 @@ declare function createCliProjectionStateSchema<TOutput, TInput>(dataSchema: z.Z
440
441
  data: null;
441
442
  freshness: null;
442
443
  snapshotGeneration: null;
443
- identity: string;
444
444
  workGeneration: number;
445
445
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
446
446
  }>, z.ZodObject<{
@@ -761,15 +761,15 @@ declare const CliProjectionNoticeSchema: z.ZodObject<{
761
761
  state: z.ZodEnum<["loading", "ready", "revalidating", "error", "refresh-error"]>;
762
762
  invalidationCause: z.ZodEnum<["initial", "dependency", "explicit-refresh", "subscriber-resume"]>;
763
763
  }, "strip", z.ZodTypeAny, {
764
- state: "error" | "loading" | "ready" | "revalidating" | "refresh-error";
765
- snapshotGeneration: number | null;
766
764
  identity: string;
765
+ state: "ready" | "error" | "loading" | "revalidating" | "refresh-error";
766
+ snapshotGeneration: number | null;
767
767
  workGeneration: number;
768
768
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
769
769
  }, {
770
- state: "error" | "loading" | "ready" | "revalidating" | "refresh-error";
771
- snapshotGeneration: number | null;
772
770
  identity: string;
771
+ state: "ready" | "error" | "loading" | "revalidating" | "refresh-error";
772
+ snapshotGeneration: number | null;
773
773
  workGeneration: number;
774
774
  invalidationCause: "initial" | "dependency" | "explicit-refresh" | "subscriber-resume";
775
775
  }>;
@@ -1,6 +1,6 @@
1
- import "./command-result-CjnZNtGL.mjs";
2
- import "./document-translation-DyEj4JKj.mjs";
3
- import "./sounds-qhRgCy0F.mjs";
4
- import "./notifications-CgJlLgLO.mjs";
5
- import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-w3LzenG5.mjs";
1
+ import "./command-result-BRYzlmg1.mjs";
2
+ import "./document-translation-J_NddeDy.mjs";
3
+ import "./sounds-B6SBMmGR.mjs";
4
+ import "./notifications-DaDB-ZBM.mjs";
5
+ import { _ as toCliProjectionCommandEvidence, a as CliProjectionFailure, c as CliProjectionInvalidationCauseSchema, d as CliProjectionState, f as CliProjectionStateName, g as createCliProjectionStateSchema, h as cliProjectionStates, i as CliProjectionCommandEvidenceSchema, l as CliProjectionNotice, m as cliProjectionInvalidationCauses, n as CliProjectionCommandError, o as CliProjectionFailureSchema, p as CliProjectionStateNameSchema, r as CliProjectionCommandEvidence, s as CliProjectionInvalidationCause, t as CliJsonValueSchema, u as CliProjectionNoticeSchema, v as toCliProjectionFailure, y as toCliProjectionNotice } from "./cli-projection-DVpaxd82.mjs";
6
6
  export { CliJsonValueSchema, CliProjectionCommandError, CliProjectionCommandEvidence, CliProjectionCommandEvidenceSchema, CliProjectionFailure, CliProjectionFailureSchema, CliProjectionInvalidationCause, CliProjectionInvalidationCauseSchema, CliProjectionNotice, CliProjectionNoticeSchema, CliProjectionState, CliProjectionStateName, CliProjectionStateNameSchema, cliProjectionInvalidationCauses, cliProjectionStates, createCliProjectionStateSchema, toCliProjectionCommandEvidence, toCliProjectionFailure, toCliProjectionNotice };
@@ -1,4 +1,4 @@
1
- import "./common-D8YUK9dA.mjs";
2
- import { a as CliProjectionInvalidationCauseSchema, c as cliProjectionInvalidationCauses, d as toCliProjectionCommandEvidence, f as toCliProjectionFailure, i as CliProjectionFailureSchema, l as cliProjectionStates, n as CliProjectionCommandError, o as CliProjectionNoticeSchema, p as toCliProjectionNotice, r as CliProjectionCommandEvidenceSchema, s as CliProjectionStateNameSchema, t as CliJsonValueSchema, u as createCliProjectionStateSchema } from "./cli-projection-vO3-FJg5.mjs";
1
+ import "./common-BpgNUOOT.mjs";
2
+ import { a as CliProjectionInvalidationCauseSchema, c as cliProjectionInvalidationCauses, d as toCliProjectionCommandEvidence, f as toCliProjectionFailure, i as CliProjectionFailureSchema, l as cliProjectionStates, n as CliProjectionCommandError, o as CliProjectionNoticeSchema, p as toCliProjectionNotice, r as CliProjectionCommandEvidenceSchema, s as CliProjectionStateNameSchema, t as CliJsonValueSchema, u as createCliProjectionStateSchema } from "./cli-projection-BHfqvlpA.mjs";
3
3
 
4
4
  export { CliJsonValueSchema, CliProjectionCommandError, CliProjectionCommandEvidenceSchema, CliProjectionFailureSchema, CliProjectionInvalidationCauseSchema, CliProjectionNoticeSchema, CliProjectionStateNameSchema, cliProjectionInvalidationCauses, cliProjectionStates, createCliProjectionStateSchema, toCliProjectionCommandEvidence, toCliProjectionFailure, toCliProjectionNotice };