@nativestudio/cli 0.3.0-rc.1 → 0.3.0-rc.11

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 (185) hide show
  1. package/COMPATIBILITY.json +33 -8
  2. package/LICENSE +201 -21
  3. package/components/runtime.json +29 -4
  4. package/components/runtime.tgz +0 -0
  5. package/dist/_chunks/chunk-37PAJCKA.js +1 -0
  6. package/dist/_chunks/{chunk-G42IS5JF.js → chunk-3AVC742O.js} +1 -1
  7. package/dist/_chunks/chunk-4U4Y2K73.js +1 -0
  8. package/dist/_chunks/chunk-65FQPXKC.js +1 -0
  9. package/dist/_chunks/chunk-6DVZBKNV.js +1 -0
  10. package/dist/_chunks/{chunk-25EDDZQA.js → chunk-6LU6GJKW.js} +1 -1
  11. package/dist/_chunks/chunk-6N433ZWR.js +1 -0
  12. package/dist/_chunks/chunk-EGUJ2YRX.js +1 -0
  13. package/dist/_chunks/{chunk-MSOMVWKN.js → chunk-FU3524Z6.js} +1 -1
  14. package/dist/_chunks/chunk-GZBWA4YN.js +1 -0
  15. package/dist/_chunks/chunk-HR34UMPP.js +1 -0
  16. package/dist/_chunks/chunk-HTUTYIRU.js +1 -0
  17. package/dist/_chunks/chunk-KB2GVAN7.js +1 -0
  18. package/dist/_chunks/chunk-L543FEDK.js +1 -0
  19. package/dist/_chunks/chunk-LISB5W7B.js +1 -0
  20. package/dist/_chunks/chunk-LUAH3KAS.js +1 -0
  21. package/dist/_chunks/chunk-M2KVQQ4X.js +1 -0
  22. package/dist/_chunks/chunk-ODGPV7MM.js +1 -0
  23. package/dist/_chunks/chunk-PUBMDP4E.js +1 -0
  24. package/dist/_chunks/chunk-Q57YFNK5.js +1 -0
  25. package/dist/_chunks/chunk-QAJH4RJQ.js +1 -0
  26. package/dist/_chunks/chunk-WFRRNWO5.js +1 -0
  27. package/dist/_chunks/connect-5YMO6MAR.js +1 -0
  28. package/dist/_chunks/device-management-2OTGEBJQ.js +1 -0
  29. package/dist/_chunks/device-preflight-XPHFZGLO.js +1 -0
  30. package/dist/_chunks/devices-inventory-VWNTU5TE.js +1 -0
  31. package/dist/_chunks/devices-main-VQ4APRVS.js +1 -0
  32. package/dist/_chunks/{files-TBJVDQWU.js → files-TTIQ7LYJ.js} +1 -1
  33. package/dist/_chunks/host-main-H7DPLV7B.js +1 -0
  34. package/dist/_chunks/http-profile-MNJX6OXO.js +1 -0
  35. package/dist/_chunks/library-main-SAC3V2ML.js +1 -0
  36. package/dist/_chunks/local-main-D6B3APK6.js +1 -0
  37. package/dist/_chunks/local-mcp-ONCANLPH.js +1 -0
  38. package/dist/_chunks/main-PW6HB3NC.js +2 -0
  39. package/dist/_chunks/mcp-ZIGBYFUW.js +1 -0
  40. package/dist/_chunks/oauth-HC6TI7HB.js +1 -0
  41. package/dist/_chunks/render-main-GYWKP72O.js +1 -0
  42. package/dist/_chunks/source-import-BC5GNCUZ.js +1 -0
  43. package/dist/_chunks/src-R6DNU336.js +1 -0
  44. package/dist/_chunks/{stdio-main-JEADWO7U.js → stdio-main-RIJS5REB.js} +1 -1
  45. package/dist/_chunks/workspace-main-GNSKHKBG.js +1 -0
  46. package/dist/_types/cli/local/desktop-contract.d.ts +1969 -1
  47. package/dist/_types/cli/local/desktop-device-contract.d.ts +779 -0
  48. package/dist/_types/cli/local/desktop-device-navigation.d.ts +3 -0
  49. package/dist/_types/cli/local/desktop-device-owner.d.ts +244 -0
  50. package/dist/_types/cli/local/desktop-device-state.d.ts +397 -0
  51. package/dist/_types/cli/local/desktop-library.d.ts +853 -0
  52. package/dist/_types/cli/local/desktop-owner.d.ts +735 -1
  53. package/dist/_types/cli/local/ledger.d.ts +64 -10
  54. package/dist/_types/cli/local/manager.d.ts +1146 -43
  55. package/dist/_types/cli/local/mcp-tools.d.ts +287 -46
  56. package/dist/_types/cli/local/releases.d.ts +28 -5
  57. package/dist/_types/cli/local-management.d.ts +5 -0
  58. package/dist/_types/cli/local-navigation.d.ts +1 -0
  59. package/dist/_types/contracts/artifact-discovery.d.ts +76 -4
  60. package/dist/_types/contracts/audio.d.ts +4 -0
  61. package/dist/_types/contracts/composition-authoring.d.ts +8 -8
  62. package/dist/_types/contracts/composition-frame-render.d.ts +4 -4
  63. package/dist/_types/contracts/composition-render-base.d.ts +5 -4
  64. package/dist/_types/contracts/composition-render.d.ts +8 -8
  65. package/dist/_types/contracts/composition-repair.d.ts +10 -10
  66. package/dist/_types/contracts/composition-source-review.d.ts +12 -12
  67. package/dist/_types/contracts/delivery-manifest.d.ts +25 -11729
  68. package/dist/_types/contracts/delivery-operations.d.ts +51 -3909
  69. package/dist/_types/contracts/delivery-summary.d.ts +2 -2
  70. package/dist/_types/contracts/delivery-validation.d.ts +23 -0
  71. package/dist/_types/contracts/device-render.d.ts +77 -0
  72. package/dist/_types/contracts/editor-intelligence.d.ts +114 -2491
  73. package/dist/_types/contracts/exploration-recommendation.d.ts +263 -11607
  74. package/dist/_types/contracts/external-agent-access.d.ts +4 -6
  75. package/dist/_types/contracts/final-ready.d.ts +22 -22
  76. package/dist/_types/contracts/final-render.d.ts +1569 -6940
  77. package/dist/_types/contracts/human-identity.d.ts +13 -0
  78. package/dist/_types/contracts/index.d.ts +4 -0
  79. package/dist/_types/contracts/interface/media-output.d.ts +28 -0
  80. package/dist/_types/contracts/interface/production-snapshot.d.ts +15 -193
  81. package/dist/_types/contracts/keyframe-generation.d.ts +29 -0
  82. package/dist/_types/contracts/local-execution/agent-context.d.ts +365 -0
  83. package/dist/_types/contracts/local-execution/agent-evidence.d.ts +79 -0
  84. package/dist/_types/contracts/local-execution/agent-grant.d.ts +31 -0
  85. package/dist/_types/contracts/local-execution/agent-review.d.ts +496 -64
  86. package/dist/_types/contracts/local-execution/common.d.ts +12 -11
  87. package/dist/_types/contracts/local-execution/completion.d.ts +41 -45
  88. package/dist/_types/contracts/local-execution/components.d.ts +45 -0
  89. package/dist/_types/contracts/local-execution/descriptor.d.ts +38 -0
  90. package/dist/_types/contracts/local-execution/device-authority.d.ts +31 -0
  91. package/dist/_types/contracts/local-execution/device-inventory.d.ts +76 -0
  92. package/dist/_types/contracts/local-execution/device-workspace.d.ts +11 -0
  93. package/dist/_types/contracts/local-execution/device.d.ts +19 -51
  94. package/dist/_types/contracts/local-execution/external-generation.d.ts +199 -0
  95. package/dist/_types/contracts/local-execution/index.d.ts +26 -0
  96. package/dist/_types/contracts/local-execution/ipc.d.ts +2756 -228
  97. package/dist/_types/contracts/local-execution/library-command.d.ts +620 -0
  98. package/dist/_types/contracts/local-execution/library-result.d.ts +408 -0
  99. package/dist/_types/contracts/local-execution/library.d.ts +873 -0
  100. package/dist/_types/contracts/local-execution/lifecycle.d.ts +242 -42
  101. package/dist/_types/contracts/local-execution/local-navigation.d.ts +275 -56
  102. package/dist/_types/contracts/local-execution/management.d.ts +400 -0
  103. package/dist/_types/contracts/local-execution/media-recipe.d.ts +207 -0
  104. package/dist/_types/contracts/local-execution/media-validation-request.d.ts +232 -0
  105. package/dist/_types/contracts/local-execution/media-validation.d.ts +262 -0
  106. package/dist/_types/contracts/local-execution/object-transfer.d.ts +155 -0
  107. package/dist/_types/contracts/local-execution/offline.d.ts +59 -0
  108. package/dist/_types/contracts/local-execution/preview.d.ts +144 -3564
  109. package/dist/_types/contracts/local-execution/processor-capability.d.ts +39 -0
  110. package/dist/_types/contracts/local-execution/processor-direct.d.ts +290 -0
  111. package/dist/_types/contracts/local-execution/processor-recipes.d.ts +1122 -0
  112. package/dist/_types/contracts/local-execution/processor.d.ts +6173 -0
  113. package/dist/_types/contracts/local-execution/project-source-direct.d.ts +201 -0
  114. package/dist/_types/contracts/local-execution/qwen-tts.d.ts +31 -0
  115. package/dist/_types/contracts/local-execution/recognition.d.ts +170 -0
  116. package/dist/_types/contracts/local-execution/speech.d.ts +95 -0
  117. package/dist/_types/contracts/local-execution/tool-selection.d.ts +45 -5
  118. package/dist/_types/contracts/local-execution/whisper.d.ts +24 -0
  119. package/dist/_types/contracts/local-execution/work.d.ts +111 -3403
  120. package/dist/_types/contracts/local-execution/workspace.d.ts +141 -0
  121. package/dist/_types/contracts/media-category.d.ts +11 -0
  122. package/dist/_types/contracts/media-observation.d.ts +929 -8
  123. package/dist/_types/contracts/navigation.d.ts +25 -15
  124. package/dist/_types/contracts/observation-profile.d.ts +3 -3
  125. package/dist/_types/contracts/programmatic-composition.d.ts +24 -24
  126. package/dist/_types/contracts/programmatic-exploration.d.ts +348 -5985
  127. package/dist/_types/contracts/provider-catalog.d.ts +3 -3
  128. package/dist/_types/contracts/provider-models.d.ts +16 -8
  129. package/dist/_types/contracts/provider.d.ts +66 -1
  130. package/dist/_types/contracts/reference-preview.d.ts +19 -0
  131. package/dist/_types/contracts/repair-lifecycle.d.ts +52 -384
  132. package/dist/_types/contracts/repair-plan.d.ts +16 -98
  133. package/dist/_types/contracts/repair-strategy.d.ts +162 -4481
  134. package/dist/_types/contracts/review-intelligence-final-output.d.ts +317 -8139
  135. package/dist/_types/contracts/review-intelligence.d.ts +450 -11420
  136. package/dist/_types/contracts/rough-cut-manifest.d.ts +8 -3
  137. package/dist/_types/contracts/rough-cut-profile.d.ts +12 -3
  138. package/dist/_types/contracts/rough-cut-review.d.ts +134 -12494
  139. package/dist/_types/contracts/rough-cut.d.ts +1073 -5675
  140. package/dist/_types/contracts/sound-making-plan.d.ts +3 -2
  141. package/dist/_types/contracts/speech-cost.d.ts +81 -0
  142. package/dist/_types/contracts/speech.d.ts +149 -0
  143. package/dist/_types/contracts/temporal-evidence-operation.d.ts +1 -0
  144. package/dist/_types/contracts/timeline-audio.d.ts +1 -0
  145. package/dist/_types/contracts/timeline-manifest.d.ts +2 -0
  146. package/dist/_types/contracts/timeline-source-sound.d.ts +1 -0
  147. package/dist/_types/contracts/timeline-v2.d.ts +4 -0
  148. package/dist/_types/contracts/timeline-version-reader.d.ts +10 -0
  149. package/dist/_types/contracts/timeline-visual-layers.d.ts +4 -0
  150. package/dist/_types/contracts/timeline.d.ts +50 -4850
  151. package/dist/_types/contracts/transcription.d.ts +1 -1
  152. package/dist/_types/contracts/video-generation.d.ts +33 -0
  153. package/dist/_types/contracts/visual-layer-render.d.ts +58 -15
  154. package/dist/_types/contracts/visual-sequence.d.ts +22 -0
  155. package/dist/_types/contracts/workspace.d.ts +32 -0
  156. package/dist/_types/sdk/errors.d.ts +8 -3
  157. package/dist/_types/sdk/local-runtime/components.d.ts +2 -0
  158. package/dist/_types/sdk/local-runtime/device-client.d.ts +127 -17
  159. package/dist/_types/sdk/local-runtime/library.d.ts +268 -0
  160. package/dist/_types/sdk/local-runtime/workspace.d.ts +186 -0
  161. package/dist/_types/sdk/local-runtime-client.d.ts +1773 -89
  162. package/dist/entry.js +1 -1
  163. package/dist/local-management.js +1 -1
  164. package/dist/local-navigation.js +1 -1
  165. package/dist/native/JobNative.cs +10 -0
  166. package/dist/native/JobRunner.cs +24 -3
  167. package/dist/native/NativeMain.cs +15 -0
  168. package/package.json +2 -8
  169. package/README.md +0 -78
  170. package/dist/_chunks/chunk-6NVIN2NI.js +0 -1
  171. package/dist/_chunks/chunk-E57YVMQ4.js +0 -1
  172. package/dist/_chunks/chunk-EAZKDCLD.js +0 -1
  173. package/dist/_chunks/chunk-GIEYSDCG.js +0 -1
  174. package/dist/_chunks/chunk-GJ7BZJLW.js +0 -1
  175. package/dist/_chunks/chunk-HLKERZIE.js +0 -1
  176. package/dist/_chunks/chunk-QC7RLTGU.js +0 -1
  177. package/dist/_chunks/chunk-RUMDDTON.js +0 -1
  178. package/dist/_chunks/chunk-U2UKGYGF.js +0 -1
  179. package/dist/_chunks/local-main-SOERK22D.js +0 -1
  180. package/dist/_chunks/local-mcp-JLPXXIDW.js +0 -1
  181. package/dist/_chunks/main-4SNF5EKE.js +0 -2
  182. package/dist/_chunks/mcp-EIMXNRH3.js +0 -1
  183. package/dist/_chunks/oauth-257CEUQH.js +0 -1
  184. package/dist/_chunks/project-connect-6MH2QG6G.js +0 -1
  185. package/dist/_chunks/src-7F6ZEU3U.js +0 -1
@@ -0,0 +1,3 @@
1
+ import { LocalMcpTools } from "./mcp-tools.js";
2
+ /** Reads an already-issued scoped connector; grants no installation/owner authority. */
3
+ export declare function openDesktopDeviceTools(raw: unknown, home: string): Promise<LocalMcpTools>;
@@ -0,0 +1,244 @@
1
+ import { type DesktopDeviceState } from "./desktop-device-contract.js";
2
+ /** 桌面与外部 Agent 的本机 CLI 共用设备 Owner;远端 MCP 不获得本机控制权。 */
3
+ export declare function runDesktopDeviceRequest(home: string, raw: unknown, policy?: {
4
+ allowedPendingKinds: readonly NonNullable<DesktopDeviceState["pending"]>["command"]["kind"][];
5
+ }): Promise<{
6
+ view: {
7
+ revision: number;
8
+ connection: {
9
+ phase: "READY" | "CONNECTED" | "CONNECTING";
10
+ expiresAt: string;
11
+ deviceRevision: number;
12
+ tenantMediaProcessing?: true | undefined;
13
+ processorCapabilities?: ("KEYFRAME_GENERATE" | "VIDEO_GENERATE" | "SPEECH_SYNTHESIZE" | "SPEECH_EXTERNAL_QWEN" | "TEMPORAL_SAMPLE" | "DELIVERY_VALIDATE" | "COMPOSITION_RENDER" | "IMPORTED_VISUAL_NORMALIZE" | "SOURCE_SYNC_AUDIO" | "IMPORT_ORIGINAL" | "LOCAL_MEDIA_INSPECT" | "LOCAL_MEDIA_PUBLISH" | "IMPORT_PROJECT_SOURCE" | "REGISTER_VISUAL_SEQUENCE" | "TRANSCRIBE_AUDIO" | "TRANSCRIBE_EXTERNAL_QWEN")[] | undefined;
14
+ tenantMediaValidation?: true | undefined;
15
+ } | null;
16
+ previews: ({
17
+ semanticStatus: "ACCEPTED";
18
+ renderId: string;
19
+ operationId: string & import("zod").$brand<"OperationId">;
20
+ productionId: string;
21
+ timelineVersionId: string;
22
+ timelineFingerprint: string;
23
+ executionClass: "LIVE" | "TEST_ONLY";
24
+ manifestFingerprint: string;
25
+ productionRevision: number;
26
+ placement: {
27
+ target: "DEVICE" | "SERVER";
28
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
29
+ policy: {
30
+ mode: "local-only";
31
+ deviceId: string;
32
+ } | {
33
+ mode: "local-preferred";
34
+ deviceId: string;
35
+ } | {
36
+ mode: "cloud-only";
37
+ };
38
+ };
39
+ deviceExecution?: {
40
+ mode: "tenant-device-only";
41
+ deviceId: string;
42
+ runtimeJobId: string;
43
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
44
+ } | undefined;
45
+ } | {
46
+ semanticStatus: "ACCEPTED";
47
+ renderId: string;
48
+ operationId: string & import("zod").$brand<"OperationId">;
49
+ productionId: string;
50
+ timelineVersionId: string;
51
+ timelineFingerprint: string;
52
+ executionClass: "LIVE" | "TEST_ONLY";
53
+ manifestFingerprint: string;
54
+ productionRevision: number;
55
+ selectionId: string;
56
+ selectionVersion: number;
57
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
58
+ placement: {
59
+ target: "DEVICE" | "SERVER";
60
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
61
+ policy: {
62
+ mode: "local-only";
63
+ deviceId: string;
64
+ } | {
65
+ mode: "local-preferred";
66
+ deviceId: string;
67
+ } | {
68
+ mode: "cloud-only";
69
+ };
70
+ };
71
+ deviceExecution?: {
72
+ mode: "tenant-device-only";
73
+ deviceId: string;
74
+ runtimeJobId: string;
75
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
76
+ } | undefined;
77
+ })[];
78
+ device: {
79
+ deviceId: string;
80
+ label: string;
81
+ revision: number;
82
+ revokedAt: string | null;
83
+ } | null;
84
+ pending: {
85
+ kind: "FINAL_RENDER" | "ENROLL" | "REVOKE_DEVICE" | "PREVIEW";
86
+ phase: "SENDING" | "PREPARED" | "REFUSED";
87
+ fingerprint: string;
88
+ } | null;
89
+ installation?: {
90
+ version: string;
91
+ fingerprint: string;
92
+ workProtocol?: "NVS_LOCAL_WORK_V1" | "NVS_LOCAL_WORK_V2" | undefined;
93
+ } | null | undefined;
94
+ automaticConnection?: boolean | undefined;
95
+ };
96
+ command?: {
97
+ kind: "ENROLL";
98
+ input: {
99
+ tenantId: string;
100
+ requestId: string;
101
+ label: string;
102
+ platform: {
103
+ os: "darwin" | "linux" | "win32";
104
+ architecture: "x64" | "arm64";
105
+ };
106
+ runtimeVersion: string;
107
+ publicKey: {
108
+ kty: "EC";
109
+ crv: "P-256";
110
+ x: string;
111
+ y: string;
112
+ };
113
+ };
114
+ } | {
115
+ kind: "REVOKE_DEVICE";
116
+ input: {
117
+ tenantId: string;
118
+ deviceId: string;
119
+ requestId: string;
120
+ expectedRevision: number;
121
+ };
122
+ } | {
123
+ kind: "PREVIEW";
124
+ input: {
125
+ tenantId: string & import("zod").$brand<"TenantId">;
126
+ idempotencyKey: string;
127
+ productionId: string & import("zod").$brand<"ProductionId">;
128
+ expectedProductionRevision: number;
129
+ timelineVersionId: string;
130
+ profileId: "PREVIEW_H264_480P_V1" | "PREVIEW_H264_720P_V1" | "PREVIEW_H264_1080P_V1";
131
+ timelineFingerprint: string;
132
+ placement: {
133
+ mode: "local-only";
134
+ deviceId: string;
135
+ } | {
136
+ mode: "local-preferred";
137
+ deviceId: string;
138
+ } | {
139
+ mode: "cloud-only";
140
+ };
141
+ localProfile?: "STUDIO_MEDIA_V2" | undefined;
142
+ };
143
+ } | {
144
+ kind: "FINAL_RENDER";
145
+ input: {
146
+ tenantId: string & import("zod").$brand<"TenantId">;
147
+ idempotencyKey: string;
148
+ productionId: string & import("zod").$brand<"ProductionId">;
149
+ expectedProductionRevision: number;
150
+ timelineVersionId: string;
151
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
152
+ timelineFingerprint: string;
153
+ selectionId: string;
154
+ audioPolicy: "SILENT" | "MIXED";
155
+ captionPolicy: "NONE" | "BURN_IN";
156
+ expectedFinalReadyVersion: number;
157
+ placement: {
158
+ mode: "local-only";
159
+ deviceId: string;
160
+ } | {
161
+ mode: "local-preferred";
162
+ deviceId: string;
163
+ } | {
164
+ mode: "cloud-only";
165
+ };
166
+ };
167
+ } | undefined;
168
+ mediaValidationSupported?: boolean | undefined;
169
+ mediaProcessingSupported?: boolean | undefined;
170
+ localLibrarySupported?: boolean | undefined;
171
+ compositionProcessingSupported?: boolean | undefined;
172
+ }>;
173
+ export declare function desktopDevicePending(home: string, scope: unknown): Promise<{
174
+ kind: "ENROLL";
175
+ input: {
176
+ tenantId: string;
177
+ requestId: string;
178
+ label: string;
179
+ platform: {
180
+ os: "darwin" | "linux" | "win32";
181
+ architecture: "x64" | "arm64";
182
+ };
183
+ runtimeVersion: string;
184
+ publicKey: {
185
+ kty: "EC";
186
+ crv: "P-256";
187
+ x: string;
188
+ y: string;
189
+ };
190
+ };
191
+ } | {
192
+ kind: "REVOKE_DEVICE";
193
+ input: {
194
+ tenantId: string;
195
+ deviceId: string;
196
+ requestId: string;
197
+ expectedRevision: number;
198
+ };
199
+ } | {
200
+ kind: "PREVIEW";
201
+ input: {
202
+ tenantId: string & import("zod").$brand<"TenantId">;
203
+ idempotencyKey: string;
204
+ productionId: string & import("zod").$brand<"ProductionId">;
205
+ expectedProductionRevision: number;
206
+ timelineVersionId: string;
207
+ profileId: "PREVIEW_H264_480P_V1" | "PREVIEW_H264_720P_V1" | "PREVIEW_H264_1080P_V1";
208
+ timelineFingerprint: string;
209
+ placement: {
210
+ mode: "local-only";
211
+ deviceId: string;
212
+ } | {
213
+ mode: "local-preferred";
214
+ deviceId: string;
215
+ } | {
216
+ mode: "cloud-only";
217
+ };
218
+ localProfile?: "STUDIO_MEDIA_V2" | undefined;
219
+ };
220
+ } | {
221
+ kind: "FINAL_RENDER";
222
+ input: {
223
+ tenantId: string & import("zod").$brand<"TenantId">;
224
+ idempotencyKey: string;
225
+ productionId: string & import("zod").$brand<"ProductionId">;
226
+ expectedProductionRevision: number;
227
+ timelineVersionId: string;
228
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
229
+ timelineFingerprint: string;
230
+ selectionId: string;
231
+ audioPolicy: "SILENT" | "MIXED";
232
+ captionPolicy: "NONE" | "BURN_IN";
233
+ expectedFinalReadyVersion: number;
234
+ placement: {
235
+ mode: "local-only";
236
+ deviceId: string;
237
+ } | {
238
+ mode: "local-preferred";
239
+ deviceId: string;
240
+ } | {
241
+ mode: "cloud-only";
242
+ };
243
+ };
244
+ } | null>;
@@ -0,0 +1,397 @@
1
+ import { type DesktopDeviceScope, type DesktopDeviceState } from "./desktop-device-contract.js";
2
+ /** Mechanical receipts only; current cloud authority is checked by every native call. */
3
+ export declare class DesktopDeviceRecords {
4
+ readonly root: string;
5
+ readonly scope: DesktopDeviceScope;
6
+ private constructor();
7
+ static open(home: string, raw: unknown): Promise<DesktopDeviceRecords>;
8
+ /** 无设备记录时保留空状态,不创建登记目录或密钥。 */
9
+ static inspect(home: string, raw: unknown): Promise<{
10
+ revision: number;
11
+ scope: {
12
+ origin: string;
13
+ tenantId: string;
14
+ principalId: string;
15
+ };
16
+ enrollment: {
17
+ tenantId: string;
18
+ requestId: string;
19
+ label: string;
20
+ platform: {
21
+ os: "darwin" | "linux" | "win32";
22
+ architecture: "x64" | "arm64";
23
+ };
24
+ runtimeVersion: string;
25
+ publicKey: {
26
+ kty: "EC";
27
+ crv: "P-256";
28
+ x: string;
29
+ y: string;
30
+ };
31
+ } | null;
32
+ device: {
33
+ tenantId: string;
34
+ publicKey: {
35
+ kty: "EC";
36
+ crv: "P-256";
37
+ x: string;
38
+ y: string;
39
+ };
40
+ label: string;
41
+ platform: {
42
+ os: "darwin" | "linux" | "win32";
43
+ architecture: "x64" | "arm64";
44
+ };
45
+ runtimeVersion: string;
46
+ deviceId: string;
47
+ revision: number;
48
+ enrolledByPrincipalId: string;
49
+ createdAt: string;
50
+ verifiedAt: string | null;
51
+ revokedAt: string | null;
52
+ } | null;
53
+ previews: ({
54
+ semanticStatus: "ACCEPTED";
55
+ renderId: string;
56
+ operationId: string & import("zod").$brand<"OperationId">;
57
+ productionId: string;
58
+ timelineVersionId: string;
59
+ timelineFingerprint: string;
60
+ executionClass: "LIVE" | "TEST_ONLY";
61
+ manifestFingerprint: string;
62
+ productionRevision: number;
63
+ placement: {
64
+ target: "DEVICE" | "SERVER";
65
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
66
+ policy: {
67
+ mode: "local-only";
68
+ deviceId: string;
69
+ } | {
70
+ mode: "local-preferred";
71
+ deviceId: string;
72
+ } | {
73
+ mode: "cloud-only";
74
+ };
75
+ };
76
+ deviceExecution?: {
77
+ mode: "tenant-device-only";
78
+ deviceId: string;
79
+ runtimeJobId: string;
80
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
81
+ } | undefined;
82
+ } | {
83
+ semanticStatus: "ACCEPTED";
84
+ renderId: string;
85
+ operationId: string & import("zod").$brand<"OperationId">;
86
+ productionId: string;
87
+ timelineVersionId: string;
88
+ timelineFingerprint: string;
89
+ executionClass: "LIVE" | "TEST_ONLY";
90
+ manifestFingerprint: string;
91
+ productionRevision: number;
92
+ selectionId: string;
93
+ selectionVersion: number;
94
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
95
+ placement: {
96
+ target: "DEVICE" | "SERVER";
97
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
98
+ policy: {
99
+ mode: "local-only";
100
+ deviceId: string;
101
+ } | {
102
+ mode: "local-preferred";
103
+ deviceId: string;
104
+ } | {
105
+ mode: "cloud-only";
106
+ };
107
+ };
108
+ deviceExecution?: {
109
+ mode: "tenant-device-only";
110
+ deviceId: string;
111
+ runtimeJobId: string;
112
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
113
+ } | undefined;
114
+ })[];
115
+ connectorId: string | null;
116
+ connection: {
117
+ phase: "READY" | "CONNECTED" | "CONNECTING";
118
+ expiresAt: string;
119
+ deviceRevision: number;
120
+ tenantMediaProcessing?: true | undefined;
121
+ processorCapabilities?: ("KEYFRAME_GENERATE" | "VIDEO_GENERATE" | "SPEECH_SYNTHESIZE" | "SPEECH_EXTERNAL_QWEN" | "TEMPORAL_SAMPLE" | "DELIVERY_VALIDATE" | "COMPOSITION_RENDER" | "IMPORTED_VISUAL_NORMALIZE" | "SOURCE_SYNC_AUDIO" | "IMPORT_ORIGINAL" | "LOCAL_MEDIA_INSPECT" | "LOCAL_MEDIA_PUBLISH" | "IMPORT_PROJECT_SOURCE" | "REGISTER_VISUAL_SEQUENCE" | "TRANSCRIBE_AUDIO" | "TRANSCRIBE_EXTERNAL_QWEN")[] | undefined;
122
+ tenantMediaValidation?: true | undefined;
123
+ } | null;
124
+ pending: {
125
+ command: {
126
+ kind: "ENROLL";
127
+ input: {
128
+ tenantId: string;
129
+ requestId: string;
130
+ label: string;
131
+ platform: {
132
+ os: "darwin" | "linux" | "win32";
133
+ architecture: "x64" | "arm64";
134
+ };
135
+ runtimeVersion: string;
136
+ publicKey: {
137
+ kty: "EC";
138
+ crv: "P-256";
139
+ x: string;
140
+ y: string;
141
+ };
142
+ };
143
+ } | {
144
+ kind: "REVOKE_DEVICE";
145
+ input: {
146
+ tenantId: string;
147
+ deviceId: string;
148
+ requestId: string;
149
+ expectedRevision: number;
150
+ };
151
+ } | {
152
+ kind: "PREVIEW";
153
+ input: {
154
+ tenantId: string & import("zod").$brand<"TenantId">;
155
+ idempotencyKey: string;
156
+ productionId: string & import("zod").$brand<"ProductionId">;
157
+ expectedProductionRevision: number;
158
+ timelineVersionId: string;
159
+ profileId: "PREVIEW_H264_480P_V1" | "PREVIEW_H264_720P_V1" | "PREVIEW_H264_1080P_V1";
160
+ timelineFingerprint: string;
161
+ placement: {
162
+ mode: "local-only";
163
+ deviceId: string;
164
+ } | {
165
+ mode: "local-preferred";
166
+ deviceId: string;
167
+ } | {
168
+ mode: "cloud-only";
169
+ };
170
+ localProfile?: "STUDIO_MEDIA_V2" | undefined;
171
+ };
172
+ } | {
173
+ kind: "FINAL_RENDER";
174
+ input: {
175
+ tenantId: string & import("zod").$brand<"TenantId">;
176
+ idempotencyKey: string;
177
+ productionId: string & import("zod").$brand<"ProductionId">;
178
+ expectedProductionRevision: number;
179
+ timelineVersionId: string;
180
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
181
+ timelineFingerprint: string;
182
+ selectionId: string;
183
+ audioPolicy: "SILENT" | "MIXED";
184
+ captionPolicy: "NONE" | "BURN_IN";
185
+ expectedFinalReadyVersion: number;
186
+ placement: {
187
+ mode: "local-only";
188
+ deviceId: string;
189
+ } | {
190
+ mode: "local-preferred";
191
+ deviceId: string;
192
+ } | {
193
+ mode: "cloud-only";
194
+ };
195
+ };
196
+ };
197
+ fingerprint: string;
198
+ phase: "SENDING" | "PREPARED" | "REFUSED";
199
+ } | null;
200
+ } | null>;
201
+ current(): Promise<DesktopDeviceState>;
202
+ save(before: DesktopDeviceState, fields: Partial<DesktopDeviceState>): Promise<{
203
+ revision: number;
204
+ scope: {
205
+ origin: string;
206
+ tenantId: string;
207
+ principalId: string;
208
+ };
209
+ enrollment: {
210
+ tenantId: string;
211
+ requestId: string;
212
+ label: string;
213
+ platform: {
214
+ os: "darwin" | "linux" | "win32";
215
+ architecture: "x64" | "arm64";
216
+ };
217
+ runtimeVersion: string;
218
+ publicKey: {
219
+ kty: "EC";
220
+ crv: "P-256";
221
+ x: string;
222
+ y: string;
223
+ };
224
+ } | null;
225
+ device: {
226
+ tenantId: string;
227
+ publicKey: {
228
+ kty: "EC";
229
+ crv: "P-256";
230
+ x: string;
231
+ y: string;
232
+ };
233
+ label: string;
234
+ platform: {
235
+ os: "darwin" | "linux" | "win32";
236
+ architecture: "x64" | "arm64";
237
+ };
238
+ runtimeVersion: string;
239
+ deviceId: string;
240
+ revision: number;
241
+ enrolledByPrincipalId: string;
242
+ createdAt: string;
243
+ verifiedAt: string | null;
244
+ revokedAt: string | null;
245
+ } | null;
246
+ previews: ({
247
+ semanticStatus: "ACCEPTED";
248
+ renderId: string;
249
+ operationId: string & import("zod").$brand<"OperationId">;
250
+ productionId: string;
251
+ timelineVersionId: string;
252
+ timelineFingerprint: string;
253
+ executionClass: "LIVE" | "TEST_ONLY";
254
+ manifestFingerprint: string;
255
+ productionRevision: number;
256
+ placement: {
257
+ target: "DEVICE" | "SERVER";
258
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
259
+ policy: {
260
+ mode: "local-only";
261
+ deviceId: string;
262
+ } | {
263
+ mode: "local-preferred";
264
+ deviceId: string;
265
+ } | {
266
+ mode: "cloud-only";
267
+ };
268
+ };
269
+ deviceExecution?: {
270
+ mode: "tenant-device-only";
271
+ deviceId: string;
272
+ runtimeJobId: string;
273
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
274
+ } | undefined;
275
+ } | {
276
+ semanticStatus: "ACCEPTED";
277
+ renderId: string;
278
+ operationId: string & import("zod").$brand<"OperationId">;
279
+ productionId: string;
280
+ timelineVersionId: string;
281
+ timelineFingerprint: string;
282
+ executionClass: "LIVE" | "TEST_ONLY";
283
+ manifestFingerprint: string;
284
+ productionRevision: number;
285
+ selectionId: string;
286
+ selectionVersion: number;
287
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
288
+ placement: {
289
+ target: "DEVICE" | "SERVER";
290
+ reason: "OFFLINE" | "UNQUALIFIED" | "BUSY" | "LOCAL_AVAILABLE" | "CLOUD_ONLY" | "LEASE_RECOVERY";
291
+ policy: {
292
+ mode: "local-only";
293
+ deviceId: string;
294
+ } | {
295
+ mode: "local-preferred";
296
+ deviceId: string;
297
+ } | {
298
+ mode: "cloud-only";
299
+ };
300
+ };
301
+ deviceExecution?: {
302
+ mode: "tenant-device-only";
303
+ deviceId: string;
304
+ runtimeJobId: string;
305
+ validationMode?: "TENANT_TRUSTED_VALIDATOR" | undefined;
306
+ } | undefined;
307
+ })[];
308
+ connectorId: string | null;
309
+ connection: {
310
+ phase: "READY" | "CONNECTED" | "CONNECTING";
311
+ expiresAt: string;
312
+ deviceRevision: number;
313
+ tenantMediaProcessing?: true | undefined;
314
+ processorCapabilities?: ("KEYFRAME_GENERATE" | "VIDEO_GENERATE" | "SPEECH_SYNTHESIZE" | "SPEECH_EXTERNAL_QWEN" | "TEMPORAL_SAMPLE" | "DELIVERY_VALIDATE" | "COMPOSITION_RENDER" | "IMPORTED_VISUAL_NORMALIZE" | "SOURCE_SYNC_AUDIO" | "IMPORT_ORIGINAL" | "LOCAL_MEDIA_INSPECT" | "LOCAL_MEDIA_PUBLISH" | "IMPORT_PROJECT_SOURCE" | "REGISTER_VISUAL_SEQUENCE" | "TRANSCRIBE_AUDIO" | "TRANSCRIBE_EXTERNAL_QWEN")[] | undefined;
315
+ tenantMediaValidation?: true | undefined;
316
+ } | null;
317
+ pending: {
318
+ command: {
319
+ kind: "ENROLL";
320
+ input: {
321
+ tenantId: string;
322
+ requestId: string;
323
+ label: string;
324
+ platform: {
325
+ os: "darwin" | "linux" | "win32";
326
+ architecture: "x64" | "arm64";
327
+ };
328
+ runtimeVersion: string;
329
+ publicKey: {
330
+ kty: "EC";
331
+ crv: "P-256";
332
+ x: string;
333
+ y: string;
334
+ };
335
+ };
336
+ } | {
337
+ kind: "REVOKE_DEVICE";
338
+ input: {
339
+ tenantId: string;
340
+ deviceId: string;
341
+ requestId: string;
342
+ expectedRevision: number;
343
+ };
344
+ } | {
345
+ kind: "PREVIEW";
346
+ input: {
347
+ tenantId: string & import("zod").$brand<"TenantId">;
348
+ idempotencyKey: string;
349
+ productionId: string & import("zod").$brand<"ProductionId">;
350
+ expectedProductionRevision: number;
351
+ timelineVersionId: string;
352
+ profileId: "PREVIEW_H264_480P_V1" | "PREVIEW_H264_720P_V1" | "PREVIEW_H264_1080P_V1";
353
+ timelineFingerprint: string;
354
+ placement: {
355
+ mode: "local-only";
356
+ deviceId: string;
357
+ } | {
358
+ mode: "local-preferred";
359
+ deviceId: string;
360
+ } | {
361
+ mode: "cloud-only";
362
+ };
363
+ localProfile?: "STUDIO_MEDIA_V2" | undefined;
364
+ };
365
+ } | {
366
+ kind: "FINAL_RENDER";
367
+ input: {
368
+ tenantId: string & import("zod").$brand<"TenantId">;
369
+ idempotencyKey: string;
370
+ productionId: string & import("zod").$brand<"ProductionId">;
371
+ expectedProductionRevision: number;
372
+ timelineVersionId: string;
373
+ profileId: "FINAL_H264_1080P_V1" | "FINAL_H264_720P_V1" | "FINAL_H264_480P_V1";
374
+ timelineFingerprint: string;
375
+ selectionId: string;
376
+ audioPolicy: "SILENT" | "MIXED";
377
+ captionPolicy: "NONE" | "BURN_IN";
378
+ expectedFinalReadyVersion: number;
379
+ placement: {
380
+ mode: "local-only";
381
+ deviceId: string;
382
+ } | {
383
+ mode: "local-preferred";
384
+ deviceId: string;
385
+ } | {
386
+ mode: "cloud-only";
387
+ };
388
+ };
389
+ };
390
+ fingerprint: string;
391
+ phase: "SENDING" | "PREPARED" | "REFUSED";
392
+ } | null;
393
+ }>;
394
+ keyPath(): string;
395
+ connectorPath(id: string): string;
396
+ }
397
+ export declare function desktopDeviceConnector(home: string, scope: DesktopDeviceScope): Promise<string>;