@openspecui/core 6.0.0 → 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.
- package/dist/app-daemon-control.d.mts +362 -0
- package/dist/app-daemon-control.mjs +81 -0
- package/dist/{cli-projection-vO3-FJg5.mjs → cli-projection-BHfqvlpA.mjs} +1 -1
- package/dist/{cli-projection-D97_RM6V.d.mts → cli-projection-DVpaxd82.d.mts} +1 -1
- package/dist/cli-projection.d.mts +5 -5
- package/dist/cli-projection.mjs +2 -2
- package/dist/{command-result-CfME21jF.d.mts → command-result-BRYzlmg1.d.mts} +102 -91
- package/dist/{dashboard-summary-transport-CYBuU4iT.mjs → dashboard-summary-transport-BMtZ0q12.mjs} +2 -2
- package/dist/{dashboard-summary-transport-CwQpcPXI.d.mts → dashboard-summary-transport-DEjdVWdn.d.mts} +3459 -2021
- package/dist/dashboard-summary-transport.d.mts +25 -24
- package/dist/dashboard-summary-transport.mjs +4 -4
- package/dist/{document-translation-CeJFGMoy.mjs → document-translation-CUkkxnYV.mjs} +1 -1
- package/dist/{document-translation-D9bhVMu9.d.mts → document-translation-J_NddeDy.d.mts} +102 -102
- package/dist/document-translation.d.mts +1 -1
- package/dist/document-translation.mjs +2 -2
- package/dist/{hosted-app-Y7yqlPBG.mjs → hosted-app-C3gBSvov.mjs} +3 -2
- package/dist/hosted-app.d.mts +26 -25
- package/dist/hosted-app.mjs +8 -7
- package/dist/{hosted-contract-BuhF_tuQ.mjs → hosted-contract-CaN2aw54.mjs} +31 -7
- package/dist/hosted-contract.d.mts +26 -25
- package/dist/hosted-contract.mjs +7 -6
- package/dist/index.d.mts +26 -25
- package/dist/index.mjs +979 -106
- package/dist/{local-download-profiles-D0EDIDY3.d.mts → local-download-profiles-CI66p2NW.d.mts} +1 -1
- package/dist/local-download-profiles.d.mts +2 -2
- package/dist/local-download-profiles.mjs +1 -1
- package/dist/markdown-facts.d.mts +1 -1
- package/dist/markdown-facts.mjs +1 -1
- package/dist/{markdown-reading-mG4OAbDO.mjs → markdown-reading-0L-mVBJp.mjs} +1 -1
- package/dist/{markdown-reading-LUdqfbxH.d.mts → markdown-reading-w686Obnl.d.mts} +1 -1
- package/dist/markdown-reading.d.mts +2 -2
- package/dist/markdown-reading.mjs +2 -2
- package/dist/{notifications-APukMHjf.d.mts → notifications-DaDB-ZBM.d.mts} +4 -4
- package/dist/{notifications-C2bxAzX_.mjs → notifications-E6_WBjQO.mjs} +2 -2
- package/dist/notifications.d.mts +2 -2
- package/dist/notifications.mjs +3 -3
- package/dist/{openspec-annotations-C58Aoi-V.d.mts → openspec-annotations-BXAqKLXc.d.mts} +2 -2
- package/dist/{openspec-annotations-DCfqBMal.mjs → openspec-annotations-DiHje5HD.mjs} +2 -2
- package/dist/openspec-annotations.d.mts +3 -3
- package/dist/openspec-annotations.mjs +3 -3
- package/dist/openspec-compat.d.mts +12 -10
- package/dist/openspec-compat.mjs +19 -23
- package/dist/{openspec-projection-CeRyRol_.d.mts → openspec-projection-DrrLI_ub.d.mts} +3 -3
- package/dist/{openspec-projection-DCgToo0Q.mjs → openspec-projection-DvJnsxLZ.mjs} +2 -2
- package/dist/openspec-projection.d.mts +5 -5
- package/dist/openspec-projection.mjs +4 -4
- package/dist/opsx-display-path.d.mts +1 -1
- package/dist/opsx-display-path.mjs +1 -1
- package/dist/{opsx-entity-O_EFhltR.d.mts → opsx-entity-BhMqFWGT.d.mts} +2 -2
- package/dist/opsx-entity.d.mts +7 -7
- package/dist/opsx-entity.mjs +1 -1
- package/dist/{opsx-schema-detail-BTksrDp1.d.mts → opsx-schema-detail-DvkJvwg_.d.mts} +2 -2
- package/dist/opsx-schema-detail.d.mts +8 -8
- package/dist/opsx-schema-detail.mjs +1 -1
- package/dist/{opsx-types-BYSPqX85.d.mts → opsx-types-DRg1Yo2Y.d.mts} +2 -2
- package/dist/opsx-workflows.d.mts +1 -1
- package/dist/opsx-workflows.mjs +1 -1
- package/dist/{planning-cli-projection-DIRxeq2H.mjs → planning-cli-projection-DrkT18EI.mjs} +4 -4
- package/dist/planning-cli-projection.d.mts +25 -24
- package/dist/planning-cli-projection.mjs +7 -7
- package/dist/{schemas-BLWVYKEk.d.mts → schemas-Bafi7L8Y.d.mts} +182 -182
- package/dist/{sounds-BLspIXhv.d.mts → sounds-B6SBMmGR.d.mts} +9 -9
- package/dist/sounds.d.mts +1 -1
- package/dist/sounds.mjs +1 -1
- package/dist/{spec-catalog-ZGuiZ4CE.mjs → spec-catalog-Dv2qolxy.mjs} +3 -3
- package/dist/spec-catalog.d.mts +25 -24
- package/dist/spec-catalog.mjs +4 -4
- package/dist/store-content-projection-BPDCma8v.d.mts +463 -0
- package/dist/store-content-projection-CiMcGZnG.mjs +82 -0
- package/dist/store-content-projection.d.mts +2 -0
- package/dist/store-content-projection.mjs +4 -0
- package/dist/{store-mutation-protocol-CSwD-xPO.mjs → store-mutation-protocol-CLtYUSwC.mjs} +1 -1
- package/dist/{store-mutation-protocol-B6AF69kW.d.mts → store-mutation-protocol-Ckcv2-zs.d.mts} +36 -36
- package/dist/store-mutation-protocol.d.mts +1 -1
- package/dist/store-mutation-protocol.mjs +2 -2
- package/dist/{store-types-pd0g35dI.d.mts → store-types-B0Qx8UPs.d.mts} +1 -1
- package/dist/store-types.d.mts +5 -5
- package/dist/store-types.mjs +1 -1
- package/dist/{task-progress-B_IWVXjA.mjs → task-progress-DpZak5xA.mjs} +1 -1
- package/dist/task-progress.d.mts +6 -6
- package/dist/task-progress.mjs +2 -2
- package/dist/{terminal-audio-DuJNjIJ3.d.mts → terminal-audio-BoIZa5SP.d.mts} +2 -2
- package/dist/{terminal-audio-d6KItUeJ.mjs → terminal-audio-punFQHXI.mjs} +1 -1
- package/dist/terminal-audio.d.mts +2 -2
- package/dist/terminal-audio.mjs +2 -2
- package/dist/terminal-control.d.mts +2 -2
- package/dist/terminal-control.mjs +1 -1
- package/dist/{terminal-invocation-C4EE7MeN.d.mts → terminal-invocation-ChWI_i72.d.mts} +12 -12
- package/dist/terminal-invocation.d.mts +1 -1
- package/dist/terminal-invocation.mjs +1 -1
- package/dist/terminal-theme.d.mts +1 -1
- package/dist/terminal-theme.mjs +1 -1
- package/dist/translation-language-pair.d.mts +1 -1
- package/dist/translation-language-pair.mjs +1 -1
- package/dist/{translator-BgYwP0UT.d.mts → translator-C7d_Bkbo.d.mts} +184 -184
- package/dist/translator.d.mts +1 -1
- package/dist/translator.mjs +1 -1
- package/dist/workspace-directory-catalog.d.mts +172 -0
- package/dist/workspace-directory-catalog.mjs +111 -0
- package/package.json +30 -5
- /package/dist/{common-D8YUK9dA.mjs → common-BpgNUOOT.mjs} +0 -0
- /package/dist/{local-download-profiles-odzOdf96.mjs → local-download-profiles-DK4g6FRe.mjs} +0 -0
- /package/dist/{markdown-facts-CCw3QdbM.d.mts → markdown-facts-C9yWB2I9.d.mts} +0 -0
- /package/dist/{markdown-facts-BUqLvFRf.mjs → markdown-facts-Dve6IAJP.mjs} +0 -0
- /package/dist/{opsx-display-path-D13XV20v.mjs → opsx-display-path-DuPEvPV0.mjs} +0 -0
- /package/dist/{opsx-display-path-RXS5JTbV.d.mts → opsx-display-path-eWJ4ve-O.d.mts} +0 -0
- /package/dist/{opsx-entity-Cn_Zu1J3.mjs → opsx-entity-Br5S5N0o.mjs} +0 -0
- /package/dist/{opsx-schema-detail-Beis4Ba2.mjs → opsx-schema-detail-CckZIEVr.mjs} +0 -0
- /package/dist/{opsx-workflows-BvnJqjfL.d.mts → opsx-workflows-Bhh_bI-e.d.mts} +0 -0
- /package/dist/{opsx-workflows-Ccc6U7IR.mjs → opsx-workflows-GPZSe1C_.mjs} +0 -0
- /package/dist/{schemas-BFroDdOC.mjs → schemas-BrS9qSB3.mjs} +0 -0
- /package/dist/{sounds-NXwveBqq.mjs → sounds-na4c8j0c.mjs} +0 -0
- /package/dist/{store-types-DlX1REBg.mjs → store-types-Cs40yohL.mjs} +0 -0
- /package/dist/{terminal-control-BSAlOTs8.mjs → terminal-control-BvoxwQ6m.mjs} +0 -0
- /package/dist/{terminal-invocation-0p-j2eSP.mjs → terminal-invocation-BexVY5E2.mjs} +0 -0
- /package/dist/{terminal-theme-m3MSGJ7U.d.mts → terminal-theme-BzARb2Do.d.mts} +0 -0
- /package/dist/{terminal-theme-B8iRttTR.mjs → terminal-theme-DIhzj5Si.mjs} +0 -0
- /package/dist/{translation-language-pair-Bbhk-LAC.mjs → translation-language-pair-BV2cGjfv.mjs} +0 -0
- /package/dist/{translation-language-pair-C18GPATW.d.mts → translation-language-pair-DeAiww3_.d.mts} +0 -0
- /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,6 +1,6 @@
|
|
|
1
|
-
import "./command-result-
|
|
2
|
-
import "./document-translation-
|
|
3
|
-
import "./sounds-
|
|
4
|
-
import "./notifications-
|
|
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-
|
|
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 };
|
package/dist/cli-projection.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./common-
|
|
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-
|
|
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 };
|