@nativestudio/sdk 0.0.0-stage → 0.3.0-rc.2
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/COMPATIBILITY.json +14 -0
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/dist/BUNDLED_DEPENDENCIES.json +1 -0
- package/dist/_chunks/chunk-34KSWLCI.js +1 -0
- package/dist/_chunks/chunk-4IOFVNFG.js +1 -0
- package/dist/_chunks/chunk-4M3AGNTZ.js +1 -0
- package/dist/_chunks/chunk-6NVIN2NI.js +1 -0
- package/dist/_chunks/chunk-7YCEMDNZ.js +1 -0
- package/dist/_chunks/chunk-RK3YLCZP.js +1 -0
- package/dist/_types/contracts/accepted-shot.d.ts +27 -0
- package/dist/_types/contracts/accepted-visual-source.d.ts +120 -0
- package/dist/_types/contracts/agent-execution-lifecycle.d.ts +749 -0
- package/dist/_types/contracts/agent-execution-oauth.d.ts +71 -0
- package/dist/_types/contracts/agent-execution-registration.d.ts +240 -0
- package/dist/_types/contracts/agent-execution-selection.d.ts +107 -0
- package/dist/_types/contracts/agent-host-execution.d.ts +706 -0
- package/dist/_types/contracts/agent-host-generic-transport.d.ts +12 -0
- package/dist/_types/contracts/agent-host.d.ts +226 -0
- package/dist/_types/contracts/artifact-discovery.d.ts +170 -0
- package/dist/_types/contracts/artifact.d.ts +188 -0
- package/dist/_types/contracts/audio.d.ts +331 -0
- package/dist/_types/contracts/brief.d.ts +178 -0
- package/dist/_types/contracts/caption-render.d.ts +20 -0
- package/dist/_types/contracts/caption-transcript.d.ts +102 -0
- package/dist/_types/contracts/captions.d.ts +420 -0
- package/dist/_types/contracts/clip-framing.d.ts +14 -0
- package/dist/_types/contracts/clip-transition.d.ts +6 -0
- package/dist/_types/contracts/composition-authoring-guide.d.ts +160 -0
- package/dist/_types/contracts/composition-authoring.d.ts +744 -0
- package/dist/_types/contracts/composition-finding-locality.d.ts +24 -0
- package/dist/_types/contracts/composition-frame-render.d.ts +226 -0
- package/dist/_types/contracts/composition-making.d.ts +390 -0
- package/dist/_types/contracts/composition-observation.d.ts +239 -0
- package/dist/_types/contracts/composition-render-base.d.ts +292 -0
- package/dist/_types/contracts/composition-render-observation.d.ts +278 -0
- package/dist/_types/contracts/composition-render.d.ts +406 -0
- package/dist/_types/contracts/composition-repair.d.ts +451 -0
- package/dist/_types/contracts/composition-source-review.d.ts +1042 -0
- package/dist/_types/contracts/consistency-profile.d.ts +845 -0
- package/dist/_types/contracts/continuity-evaluation.d.ts +48 -0
- package/dist/_types/contracts/delivery-completion.d.ts +210 -0
- package/dist/_types/contracts/delivery-manifest.d.ts +11776 -0
- package/dist/_types/contracts/delivery-operations.d.ts +5009 -0
- package/dist/_types/contracts/delivery-output-profile.d.ts +12 -0
- package/dist/_types/contracts/delivery-summary.d.ts +220 -0
- package/dist/_types/contracts/delivery-validation.d.ts +183 -0
- package/dist/_types/contracts/director-proposal.d.ts +1067 -0
- package/dist/_types/contracts/editor-intelligence.d.ts +5751 -0
- package/dist/_types/contracts/exploration-recommendation.d.ts +11863 -0
- package/dist/_types/contracts/external-agent-access.d.ts +95 -0
- package/dist/_types/contracts/final-ready.d.ts +301 -0
- package/dist/_types/contracts/final-render-profile.d.ts +59 -0
- package/dist/_types/contracts/final-render.d.ts +8181 -0
- package/dist/_types/contracts/foundation.d.ts +1 -0
- package/dist/_types/contracts/generation-contract.d.ts +268 -0
- package/dist/_types/contracts/generation-cost.d.ts +70 -0
- package/dist/_types/contracts/health.d.ts +6 -0
- package/dist/_types/contracts/human-identity.d.ts +149 -0
- package/dist/_types/contracts/hyperframe-profile.d.ts +5 -0
- package/dist/_types/contracts/ids.d.ts +41 -0
- package/dist/_types/contracts/index.d.ts +122 -0
- package/dist/_types/contracts/interface/common.d.ts +56 -0
- package/dist/_types/contracts/interface/execution-output.d.ts +99 -0
- package/dist/_types/contracts/interface/index.d.ts +7 -0
- package/dist/_types/contracts/interface/media-output.d.ts +62 -0
- package/dist/_types/contracts/interface/operation.d.ts +61 -0
- package/dist/_types/contracts/interface/output.d.ts +15 -0
- package/dist/_types/contracts/interface/production-snapshot.d.ts +832 -0
- package/dist/_types/contracts/interface/query.d.ts +315 -0
- package/dist/_types/contracts/keyframe-generation.d.ts +349 -0
- package/dist/_types/contracts/keyframe-reference.d.ts +31 -0
- package/dist/_types/contracts/keyframe-review.d.ts +753 -0
- package/dist/_types/contracts/lifecycle-event-projections.d.ts +191 -0
- package/dist/_types/contracts/lifecycle-events.d.ts +156 -0
- package/dist/_types/contracts/listening-evidence.d.ts +37 -0
- package/dist/_types/contracts/local-execution/agent-review.d.ts +560 -0
- package/dist/_types/contracts/local-execution/canonical.d.ts +2 -0
- package/dist/_types/contracts/local-execution/common.d.ts +48 -0
- package/dist/_types/contracts/local-execution/completion.d.ts +128 -0
- package/dist/_types/contracts/local-execution/device.d.ts +134 -0
- package/dist/_types/contracts/local-execution/index.d.ts +11 -0
- package/dist/_types/contracts/local-execution/ipc.d.ts +1202 -0
- package/dist/_types/contracts/local-execution/lifecycle.d.ts +347 -0
- package/dist/_types/contracts/local-execution/local-navigation.d.ts +710 -0
- package/dist/_types/contracts/local-execution/preview.d.ts +3663 -0
- package/dist/_types/contracts/local-execution/tool-selection.d.ts +15 -0
- package/dist/_types/contracts/local-execution/work.d.ts +3441 -0
- package/dist/_types/contracts/matrix-parameter-rule.d.ts +23 -0
- package/dist/_types/contracts/media-export.d.ts +23 -0
- package/dist/_types/contracts/media-observation.d.ts +1159 -0
- package/dist/_types/contracts/model-capability-matrix.d.ts +118 -0
- package/dist/_types/contracts/native-tool-authority-failure.d.ts +38 -0
- package/dist/_types/contracts/native-tool-authority.d.ts +110 -0
- package/dist/_types/contracts/native-tool-execution.d.ts +287 -0
- package/dist/_types/contracts/native-tool-gateway.d.ts +41 -0
- package/dist/_types/contracts/native-video-audio.d.ts +62 -0
- package/dist/_types/contracts/navigation-context.d.ts +253 -0
- package/dist/_types/contracts/navigation-groups.d.ts +51 -0
- package/dist/_types/contracts/navigation.d.ts +238 -0
- package/dist/_types/contracts/observation-profile.d.ts +99 -0
- package/dist/_types/contracts/planning-input.d.ts +177 -0
- package/dist/_types/contracts/principal.d.ts +26 -0
- package/dist/_types/contracts/production-creation.d.ts +66 -0
- package/dist/_types/contracts/production-termination.d.ts +51 -0
- package/dist/_types/contracts/production.d.ts +111 -0
- package/dist/_types/contracts/programmatic-composition.d.ts +762 -0
- package/dist/_types/contracts/programmatic-exploration.d.ts +7459 -0
- package/dist/_types/contracts/programmatic-video-review.d.ts +894 -0
- package/dist/_types/contracts/project-library.d.ts +173 -0
- package/dist/_types/contracts/project.d.ts +93 -0
- package/dist/_types/contracts/provider-catalog.d.ts +421 -0
- package/dist/_types/contracts/provider-models.d.ts +3380 -0
- package/dist/_types/contracts/provider.d.ts +142 -0
- package/dist/_types/contracts/reference-preview.d.ts +36 -0
- package/dist/_types/contracts/repair-lifecycle.d.ts +2896 -0
- package/dist/_types/contracts/repair-plan.d.ts +728 -0
- package/dist/_types/contracts/repair-strategy.d.ts +5751 -0
- package/dist/_types/contracts/review-intelligence-evidence.d.ts +136 -0
- package/dist/_types/contracts/review-intelligence-final-output.d.ts +8705 -0
- package/dist/_types/contracts/review-intelligence.d.ts +11543 -0
- package/dist/_types/contracts/review1-repair-source.d.ts +452 -0
- package/dist/_types/contracts/review1-repair-strategy.d.ts +491 -0
- package/dist/_types/contracts/review1-repair.d.ts +36 -0
- package/dist/_types/contracts/rough-cut-manifest.d.ts +347 -0
- package/dist/_types/contracts/rough-cut-profile.d.ts +37 -0
- package/dist/_types/contracts/rough-cut-review.d.ts +12819 -0
- package/dist/_types/contracts/rough-cut.d.ts +5862 -0
- package/dist/_types/contracts/scene-shot-plan.d.ts +882 -0
- package/dist/_types/contracts/sdk-discovery.d.ts +66 -0
- package/dist/_types/contracts/shot-direction.d.ts +113 -0
- package/dist/_types/contracts/shot-preparation-basis.d.ts +356 -0
- package/dist/_types/contracts/shot-preparation.d.ts +2285 -0
- package/dist/_types/contracts/shot-sound-instruction.d.ts +58 -0
- package/dist/_types/contracts/sound-making-plan.d.ts +1585 -0
- package/dist/_types/contracts/source-sound-policy.d.ts +10 -0
- package/dist/_types/contracts/source-workspace.d.ts +62 -0
- package/dist/_types/contracts/speech.d.ts +424 -0
- package/dist/_types/contracts/story.d.ts +98 -0
- package/dist/_types/contracts/temporal-evidence-operation.d.ts +379 -0
- package/dist/_types/contracts/temporal-evidence-reference.d.ts +18 -0
- package/dist/_types/contracts/temporal-evidence.d.ts +248 -0
- package/dist/_types/contracts/tenant.d.ts +7 -0
- package/dist/_types/contracts/timeline-audio.d.ts +97 -0
- package/dist/_types/contracts/timeline-graphics.d.ts +80 -0
- package/dist/_types/contracts/timeline-manifest.d.ts +702 -0
- package/dist/_types/contracts/timeline-source-sound.d.ts +352 -0
- package/dist/_types/contracts/timeline-v2.d.ts +1263 -0
- package/dist/_types/contracts/timeline-version-reader.d.ts +2945 -0
- package/dist/_types/contracts/timeline-visual-layers.d.ts +1245 -0
- package/dist/_types/contracts/timeline.d.ts +4942 -0
- package/dist/_types/contracts/transcription.d.ts +80 -0
- package/dist/_types/contracts/video-generation.d.ts +643 -0
- package/dist/_types/contracts/video-review.d.ts +1871 -0
- package/dist/_types/contracts/visual-exploration.d.ts +1586 -0
- package/dist/_types/contracts/visual-layer-render.d.ts +2777 -0
- package/dist/_types/contracts/visual-layer.d.ts +112 -0
- package/dist/_types/contracts/visual-sequence.d.ts +121 -0
- package/dist/_types/contracts/writer-proposal.d.ts +268 -0
- package/dist/_types/sdk/account.d.ts +109 -0
- package/dist/_types/sdk/auxiliary-media.d.ts +43 -0
- package/dist/_types/sdk/catalog/agent-host-execution.d.ts +1551 -0
- package/dist/_types/sdk/catalog/agent-host.d.ts +344 -0
- package/dist/_types/sdk/catalog/assembly.d.ts +37634 -0
- package/dist/_types/sdk/catalog/audio-caption.d.ts +1374 -0
- package/dist/_types/sdk/catalog/canonical-repair.d.ts +4584 -0
- package/dist/_types/sdk/catalog/composition-source.d.ts +1556 -0
- package/dist/_types/sdk/catalog/composition.d.ts +2815 -0
- package/dist/_types/sdk/catalog/core.d.ts +3049 -0
- package/dist/_types/sdk/catalog/delivery.d.ts +14169 -0
- package/dist/_types/sdk/catalog/discovery.d.ts +75 -0
- package/dist/_types/sdk/catalog/editor.d.ts +6540 -0
- package/dist/_types/sdk/catalog/generation.d.ts +942 -0
- package/dist/_types/sdk/catalog/imported-visual.d.ts +3111 -0
- package/dist/_types/sdk/catalog/keyframe-review.d.ts +859 -0
- package/dist/_types/sdk/catalog/lifecycle-events.d.ts +329 -0
- package/dist/_types/sdk/catalog/mcp.d.ts +245 -0
- package/dist/_types/sdk/catalog/media-descriptors.d.ts +139 -0
- package/dist/_types/sdk/catalog/media-observation.d.ts +958 -0
- package/dist/_types/sdk/catalog/native-tool-authority.d.ts +281 -0
- package/dist/_types/sdk/catalog/navigation.d.ts +559 -0
- package/dist/_types/sdk/catalog/planning-intelligence.d.ts +2031 -0
- package/dist/_types/sdk/catalog/programmatic-exploration.d.ts +9855 -0
- package/dist/_types/sdk/catalog/programmatic-review.d.ts +1106 -0
- package/dist/_types/sdk/catalog/provider.d.ts +4439 -0
- package/dist/_types/sdk/catalog/reference-preview.d.ts +180 -0
- package/dist/_types/sdk/catalog/repair-strategy.d.ts +8916 -0
- package/dist/_types/sdk/catalog/reviewer.d.ts +23133 -0
- package/dist/_types/sdk/catalog/shot-preparation.d.ts +2974 -0
- package/dist/_types/sdk/catalog/sound-making-plan.d.ts +1778 -0
- package/dist/_types/sdk/catalog/source-sync.d.ts +1313 -0
- package/dist/_types/sdk/catalog/spec.d.ts +37 -0
- package/dist/_types/sdk/catalog/speech.d.ts +397 -0
- package/dist/_types/sdk/catalog/temporal-evidence.d.ts +391 -0
- package/dist/_types/sdk/catalog/video-review.d.ts +2149 -0
- package/dist/_types/sdk/catalog/visual-exploration.d.ts +10838 -0
- package/dist/_types/sdk/client.d.ts +75 -0
- package/dist/_types/sdk/desktop-catalogue.d.ts +25 -0
- package/dist/_types/sdk/desktop-previews.d.ts +118 -0
- package/dist/_types/sdk/desktop-releases.d.ts +75 -0
- package/dist/_types/sdk/errors.d.ts +9 -0
- package/dist/_types/sdk/evidence-image.d.ts +22 -0
- package/dist/_types/sdk/image-media.d.ts +43 -0
- package/dist/_types/sdk/index.d.ts +16 -0
- package/dist/_types/sdk/local-runtime/device-client.d.ts +77 -0
- package/dist/_types/sdk/local-runtime-client.d.ts +932 -0
- package/dist/_types/sdk/mcp-client.d.ts +55 -0
- package/dist/_types/sdk/mcp-image.d.ts +52 -0
- package/dist/_types/sdk/media.d.ts +104 -0
- package/dist/_types/sdk/navigation-client.d.ts +141 -0
- package/dist/_types/sdk/navigation-facade.d.ts +458 -0
- package/dist/_types/sdk/observe.d.ts +51 -0
- package/dist/_types/sdk/runtime-authority.d.ts +103 -0
- package/dist/_types/sdk/transport/http.d.ts +39 -0
- package/dist/account.d.ts +1 -0
- package/dist/account.js +1 -0
- package/dist/desktop-previews.d.ts +1 -0
- package/dist/desktop-previews.js +1 -0
- package/dist/desktop-releases.d.ts +1 -0
- package/dist/desktop-releases.js +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/local-runtime.d.ts +1 -0
- package/dist/local-runtime.js +1 -0
- package/dist/native/Bootstrap.ps1 +90 -0
- package/dist/native/JobNative.cs +127 -0
- package/dist/native/JobRunner.cs +360 -0
- package/dist/native/NativeMain.cs +146 -0
- package/dist/native/PipeBridge.cs +260 -0
- package/dist/native/PrivateAccess.cs +152 -0
- package/dist/runtime-authority.d.ts +1 -0
- package/dist/runtime-authority.js +1 -0
- package/package.json +50 -3
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import type { SdkInput, SdkOperation, SdkOutput } from "./client.js";
|
|
2
|
+
import type { SdkRequestOptions } from "./transport/http.js";
|
|
3
|
+
export interface NavigationCaller {
|
|
4
|
+
call<K extends SdkOperation>(key: K, input: SdkInput<K>, options?: SdkRequestOptions): Promise<SdkOutput<K>>;
|
|
5
|
+
}
|
|
6
|
+
/** Public read aliases; transport capabilities and owner admission remain explicit. */
|
|
7
|
+
export declare class NativeStudioNavigationFacade {
|
|
8
|
+
private readonly caller;
|
|
9
|
+
constructor(caller: NavigationCaller);
|
|
10
|
+
find(input: SdkInput<"studio.start">, options?: SdkRequestOptions): Promise<{
|
|
11
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
12
|
+
choices: {
|
|
13
|
+
id: string & import("zod").$brand<"ProductionId">;
|
|
14
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
15
|
+
projectId: string & import("zod").$brand<"ProjectId">;
|
|
16
|
+
state: {
|
|
17
|
+
lifecycle: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
18
|
+
phase: "INTAKE" | "PLANNING" | "PREPARING_GENERATION" | "GENERATING" | "SHOT_REVIEW" | "ASSEMBLING" | "ROUGH_CUT_REVIEW" | "FINAL_READY" | "FINAL_RENDERING" | "DELIVERY_VALIDATION";
|
|
19
|
+
condition: "BLOCKED" | "RUNNABLE" | "RUNNING" | "WAITING_PROVIDER" | "WAITING_HUMAN" | "RETRYING";
|
|
20
|
+
revision: number;
|
|
21
|
+
blockingReason: string | null;
|
|
22
|
+
waitingReason: string | null;
|
|
23
|
+
};
|
|
24
|
+
activeBriefVersion: number | null;
|
|
25
|
+
activeStoryVersion: number | null;
|
|
26
|
+
activeSceneShotPlanVersion: number | null;
|
|
27
|
+
createdByPrincipalId: string & import("zod").$brand<"PrincipalId">;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
}[];
|
|
31
|
+
page: {
|
|
32
|
+
hasMore: boolean;
|
|
33
|
+
next: string | null;
|
|
34
|
+
};
|
|
35
|
+
selection: "NONE" | "ONE" | "CHOOSE";
|
|
36
|
+
guidance: "Select an explicit Production ID, then call studio_navigate. Never infer an ID.";
|
|
37
|
+
}>;
|
|
38
|
+
overview(input: SdkInput<"studio.navigate">, options?: SdkRequestOptions): Promise<{
|
|
39
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
40
|
+
projectId: string & import("zod").$brand<"ProjectId">;
|
|
41
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
42
|
+
evidence: {
|
|
43
|
+
source: "production_snapshot";
|
|
44
|
+
revision: number;
|
|
45
|
+
generatedAt: string;
|
|
46
|
+
};
|
|
47
|
+
state: {
|
|
48
|
+
lifecycle: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
49
|
+
phase: "INTAKE" | "PLANNING" | "PREPARING_GENERATION" | "GENERATING" | "SHOT_REVIEW" | "ASSEMBLING" | "ROUGH_CUT_REVIEW" | "FINAL_READY" | "FINAL_RENDERING" | "DELIVERY_VALIDATION";
|
|
50
|
+
condition: "BLOCKED" | "RUNNABLE" | "RUNNING" | "WAITING_PROVIDER" | "WAITING_HUMAN" | "RETRYING";
|
|
51
|
+
revision: number;
|
|
52
|
+
blockingReason: string | null;
|
|
53
|
+
waitingReason: string | null;
|
|
54
|
+
};
|
|
55
|
+
stateReasonsTruncated: {
|
|
56
|
+
blockingReason: boolean;
|
|
57
|
+
waitingReason: boolean;
|
|
58
|
+
};
|
|
59
|
+
planning: {
|
|
60
|
+
activeBriefVersion: number | null;
|
|
61
|
+
activeStoryVersion: number | null;
|
|
62
|
+
activeSceneShotPlanVersion: number | null;
|
|
63
|
+
};
|
|
64
|
+
shots: {
|
|
65
|
+
planned: number;
|
|
66
|
+
ready: number;
|
|
67
|
+
generating: number;
|
|
68
|
+
candidates: number;
|
|
69
|
+
accepted: number;
|
|
70
|
+
blocked: number;
|
|
71
|
+
stale: number;
|
|
72
|
+
};
|
|
73
|
+
work: {
|
|
74
|
+
total: number;
|
|
75
|
+
pending: number;
|
|
76
|
+
ready: number;
|
|
77
|
+
running: number;
|
|
78
|
+
waiting: number;
|
|
79
|
+
succeeded: number;
|
|
80
|
+
failed: number;
|
|
81
|
+
cancelled: number;
|
|
82
|
+
superseded: number;
|
|
83
|
+
attempts: number;
|
|
84
|
+
};
|
|
85
|
+
findings: {
|
|
86
|
+
open: number;
|
|
87
|
+
blocking: number;
|
|
88
|
+
warnings: number;
|
|
89
|
+
};
|
|
90
|
+
timeline: {
|
|
91
|
+
currentVersion: number | null;
|
|
92
|
+
stale: boolean;
|
|
93
|
+
};
|
|
94
|
+
final: {
|
|
95
|
+
renderState: string | null;
|
|
96
|
+
deliveryValidationState: string | null;
|
|
97
|
+
};
|
|
98
|
+
blockers: {
|
|
99
|
+
total: number;
|
|
100
|
+
truncated: boolean;
|
|
101
|
+
items: {
|
|
102
|
+
code: string;
|
|
103
|
+
summary: string;
|
|
104
|
+
targetType: string;
|
|
105
|
+
targetId: string;
|
|
106
|
+
evidence: {
|
|
107
|
+
path: string;
|
|
108
|
+
};
|
|
109
|
+
}[];
|
|
110
|
+
};
|
|
111
|
+
actions: {
|
|
112
|
+
total: number;
|
|
113
|
+
truncated: boolean;
|
|
114
|
+
items: {
|
|
115
|
+
capability: string;
|
|
116
|
+
targetType: string;
|
|
117
|
+
targetId: string;
|
|
118
|
+
availability: "UNAVAILABLE" | "AVAILABLE";
|
|
119
|
+
reason: string | null;
|
|
120
|
+
tool: string | null;
|
|
121
|
+
registration: "REGISTERED" | "NOT_ON_SURFACE";
|
|
122
|
+
readOnly: boolean | null;
|
|
123
|
+
purpose: string | null;
|
|
124
|
+
group: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | null;
|
|
125
|
+
context: {
|
|
126
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
127
|
+
projectId: string & import("zod").$brand<"ProjectId">;
|
|
128
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
129
|
+
revision: number;
|
|
130
|
+
};
|
|
131
|
+
inputHints: {
|
|
132
|
+
knownInputs: Partial<Record<"shotId" | "artifactId" | "tenantId" | "projectId" | "productionId" | "sceneId" | "operationId" | "findingId", string>>;
|
|
133
|
+
schemaFingerprint: string | null;
|
|
134
|
+
requiredInputs: string[];
|
|
135
|
+
missingInputs: string[];
|
|
136
|
+
schemaInspectionRequired: true;
|
|
137
|
+
} | null;
|
|
138
|
+
recommendation: ("NOT_ON_SURFACE" | "NATIVE_AVAILABLE" | "NATIVE_UNAVAILABLE" | "GOAL_MATCH" | "INSPECT_SCHEMA")[];
|
|
139
|
+
inspect: {
|
|
140
|
+
tool: "studio_capability_describe";
|
|
141
|
+
arguments: {
|
|
142
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
143
|
+
tool: string;
|
|
144
|
+
projectId?: (string & import("zod").$brand<"ProjectId">) | undefined;
|
|
145
|
+
schemaCursor?: string | undefined;
|
|
146
|
+
};
|
|
147
|
+
} | null;
|
|
148
|
+
evidence: {
|
|
149
|
+
path: string;
|
|
150
|
+
};
|
|
151
|
+
}[];
|
|
152
|
+
page: {
|
|
153
|
+
hasMore: boolean;
|
|
154
|
+
next: string | null;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
operations: {
|
|
158
|
+
total: number;
|
|
159
|
+
truncated: boolean;
|
|
160
|
+
items: {
|
|
161
|
+
id: string & import("zod").$brand<"OperationId">;
|
|
162
|
+
updatedAt: string;
|
|
163
|
+
semanticStatus: "INVALID_INPUT" | "NOT_FOUND" | "BLOCKED" | "REVISION_CONFLICT" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_OPERATIONAL_FAILURE" | "CANCELLED" | "WAITING_PROVIDER" | "RETRYING" | "SUCCESS" | "ACCEPTED" | "NO_CHANGE" | "STALE_BASIS" | "WAITING_INPUT" | "PROVIDER_UNAVAILABLE" | "BUDGET_BLOCKED" | "SUPERSEDED";
|
|
164
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
165
|
+
startedAt: string;
|
|
166
|
+
inspect: {
|
|
167
|
+
tool: "operation_get";
|
|
168
|
+
arguments: {
|
|
169
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
170
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
171
|
+
operationId: string & import("zod").$brand<"OperationId">;
|
|
172
|
+
};
|
|
173
|
+
} | null;
|
|
174
|
+
targetCount: number;
|
|
175
|
+
blockerCount: number;
|
|
176
|
+
evidence: {
|
|
177
|
+
path: string;
|
|
178
|
+
};
|
|
179
|
+
}[];
|
|
180
|
+
};
|
|
181
|
+
related: {
|
|
182
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
183
|
+
catalogVersion: string;
|
|
184
|
+
outcome: "MATCHES" | "AMBIGUOUS" | "NO_MATCH";
|
|
185
|
+
candidates: {
|
|
186
|
+
tool: string;
|
|
187
|
+
title: string;
|
|
188
|
+
description: string;
|
|
189
|
+
family: string;
|
|
190
|
+
readOnly: boolean;
|
|
191
|
+
registration: "REGISTERED";
|
|
192
|
+
matchedTerms: string[];
|
|
193
|
+
group?: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | undefined;
|
|
194
|
+
}[];
|
|
195
|
+
page: {
|
|
196
|
+
hasMore: boolean;
|
|
197
|
+
next: string | null;
|
|
198
|
+
};
|
|
199
|
+
guidance: "Registration is not availability or authorization. Inspect the selected schema and native context before invoking its typed command.";
|
|
200
|
+
} | null;
|
|
201
|
+
guidance: "Use native IDs and revision from this snapshot. An outstanding or unacknowledged write must be reconciled through its Operation; never replay it automatically. Commands revalidate current authority, prerequisites, revision and idempotency.";
|
|
202
|
+
}>;
|
|
203
|
+
next(input: SdkInput<"studio.navigate">, options?: SdkRequestOptions): Promise<{
|
|
204
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
205
|
+
projectId: string & import("zod").$brand<"ProjectId">;
|
|
206
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
207
|
+
evidence: {
|
|
208
|
+
source: "production_snapshot";
|
|
209
|
+
revision: number;
|
|
210
|
+
generatedAt: string;
|
|
211
|
+
};
|
|
212
|
+
state: {
|
|
213
|
+
lifecycle: "ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED";
|
|
214
|
+
phase: "INTAKE" | "PLANNING" | "PREPARING_GENERATION" | "GENERATING" | "SHOT_REVIEW" | "ASSEMBLING" | "ROUGH_CUT_REVIEW" | "FINAL_READY" | "FINAL_RENDERING" | "DELIVERY_VALIDATION";
|
|
215
|
+
condition: "BLOCKED" | "RUNNABLE" | "RUNNING" | "WAITING_PROVIDER" | "WAITING_HUMAN" | "RETRYING";
|
|
216
|
+
revision: number;
|
|
217
|
+
blockingReason: string | null;
|
|
218
|
+
waitingReason: string | null;
|
|
219
|
+
};
|
|
220
|
+
stateReasonsTruncated: {
|
|
221
|
+
blockingReason: boolean;
|
|
222
|
+
waitingReason: boolean;
|
|
223
|
+
};
|
|
224
|
+
planning: {
|
|
225
|
+
activeBriefVersion: number | null;
|
|
226
|
+
activeStoryVersion: number | null;
|
|
227
|
+
activeSceneShotPlanVersion: number | null;
|
|
228
|
+
};
|
|
229
|
+
shots: {
|
|
230
|
+
planned: number;
|
|
231
|
+
ready: number;
|
|
232
|
+
generating: number;
|
|
233
|
+
candidates: number;
|
|
234
|
+
accepted: number;
|
|
235
|
+
blocked: number;
|
|
236
|
+
stale: number;
|
|
237
|
+
};
|
|
238
|
+
work: {
|
|
239
|
+
total: number;
|
|
240
|
+
pending: number;
|
|
241
|
+
ready: number;
|
|
242
|
+
running: number;
|
|
243
|
+
waiting: number;
|
|
244
|
+
succeeded: number;
|
|
245
|
+
failed: number;
|
|
246
|
+
cancelled: number;
|
|
247
|
+
superseded: number;
|
|
248
|
+
attempts: number;
|
|
249
|
+
};
|
|
250
|
+
findings: {
|
|
251
|
+
open: number;
|
|
252
|
+
blocking: number;
|
|
253
|
+
warnings: number;
|
|
254
|
+
};
|
|
255
|
+
timeline: {
|
|
256
|
+
currentVersion: number | null;
|
|
257
|
+
stale: boolean;
|
|
258
|
+
};
|
|
259
|
+
final: {
|
|
260
|
+
renderState: string | null;
|
|
261
|
+
deliveryValidationState: string | null;
|
|
262
|
+
};
|
|
263
|
+
blockers: {
|
|
264
|
+
total: number;
|
|
265
|
+
truncated: boolean;
|
|
266
|
+
items: {
|
|
267
|
+
code: string;
|
|
268
|
+
summary: string;
|
|
269
|
+
targetType: string;
|
|
270
|
+
targetId: string;
|
|
271
|
+
evidence: {
|
|
272
|
+
path: string;
|
|
273
|
+
};
|
|
274
|
+
}[];
|
|
275
|
+
};
|
|
276
|
+
actions: {
|
|
277
|
+
total: number;
|
|
278
|
+
truncated: boolean;
|
|
279
|
+
items: {
|
|
280
|
+
capability: string;
|
|
281
|
+
targetType: string;
|
|
282
|
+
targetId: string;
|
|
283
|
+
availability: "UNAVAILABLE" | "AVAILABLE";
|
|
284
|
+
reason: string | null;
|
|
285
|
+
tool: string | null;
|
|
286
|
+
registration: "REGISTERED" | "NOT_ON_SURFACE";
|
|
287
|
+
readOnly: boolean | null;
|
|
288
|
+
purpose: string | null;
|
|
289
|
+
group: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | null;
|
|
290
|
+
context: {
|
|
291
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
292
|
+
projectId: string & import("zod").$brand<"ProjectId">;
|
|
293
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
294
|
+
revision: number;
|
|
295
|
+
};
|
|
296
|
+
inputHints: {
|
|
297
|
+
knownInputs: Partial<Record<"shotId" | "artifactId" | "tenantId" | "projectId" | "productionId" | "sceneId" | "operationId" | "findingId", string>>;
|
|
298
|
+
schemaFingerprint: string | null;
|
|
299
|
+
requiredInputs: string[];
|
|
300
|
+
missingInputs: string[];
|
|
301
|
+
schemaInspectionRequired: true;
|
|
302
|
+
} | null;
|
|
303
|
+
recommendation: ("NOT_ON_SURFACE" | "NATIVE_AVAILABLE" | "NATIVE_UNAVAILABLE" | "GOAL_MATCH" | "INSPECT_SCHEMA")[];
|
|
304
|
+
inspect: {
|
|
305
|
+
tool: "studio_capability_describe";
|
|
306
|
+
arguments: {
|
|
307
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
308
|
+
tool: string;
|
|
309
|
+
projectId?: (string & import("zod").$brand<"ProjectId">) | undefined;
|
|
310
|
+
schemaCursor?: string | undefined;
|
|
311
|
+
};
|
|
312
|
+
} | null;
|
|
313
|
+
evidence: {
|
|
314
|
+
path: string;
|
|
315
|
+
};
|
|
316
|
+
}[];
|
|
317
|
+
page: {
|
|
318
|
+
hasMore: boolean;
|
|
319
|
+
next: string | null;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
operations: {
|
|
323
|
+
total: number;
|
|
324
|
+
truncated: boolean;
|
|
325
|
+
items: {
|
|
326
|
+
id: string & import("zod").$brand<"OperationId">;
|
|
327
|
+
updatedAt: string;
|
|
328
|
+
semanticStatus: "INVALID_INPUT" | "NOT_FOUND" | "BLOCKED" | "REVISION_CONFLICT" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_OPERATIONAL_FAILURE" | "CANCELLED" | "WAITING_PROVIDER" | "RETRYING" | "SUCCESS" | "ACCEPTED" | "NO_CHANGE" | "STALE_BASIS" | "WAITING_INPUT" | "PROVIDER_UNAVAILABLE" | "BUDGET_BLOCKED" | "SUPERSEDED";
|
|
329
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
330
|
+
startedAt: string;
|
|
331
|
+
inspect: {
|
|
332
|
+
tool: "operation_get";
|
|
333
|
+
arguments: {
|
|
334
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
335
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
336
|
+
operationId: string & import("zod").$brand<"OperationId">;
|
|
337
|
+
};
|
|
338
|
+
} | null;
|
|
339
|
+
targetCount: number;
|
|
340
|
+
blockerCount: number;
|
|
341
|
+
evidence: {
|
|
342
|
+
path: string;
|
|
343
|
+
};
|
|
344
|
+
}[];
|
|
345
|
+
};
|
|
346
|
+
related: {
|
|
347
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
348
|
+
catalogVersion: string;
|
|
349
|
+
outcome: "MATCHES" | "AMBIGUOUS" | "NO_MATCH";
|
|
350
|
+
candidates: {
|
|
351
|
+
tool: string;
|
|
352
|
+
title: string;
|
|
353
|
+
description: string;
|
|
354
|
+
family: string;
|
|
355
|
+
readOnly: boolean;
|
|
356
|
+
registration: "REGISTERED";
|
|
357
|
+
matchedTerms: string[];
|
|
358
|
+
group?: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | undefined;
|
|
359
|
+
}[];
|
|
360
|
+
page: {
|
|
361
|
+
hasMore: boolean;
|
|
362
|
+
next: string | null;
|
|
363
|
+
};
|
|
364
|
+
guidance: "Registration is not availability or authorization. Inspect the selected schema and native context before invoking its typed command.";
|
|
365
|
+
} | null;
|
|
366
|
+
guidance: "Use native IDs and revision from this snapshot. An outstanding or unacknowledged write must be reconciled through its Operation; never replay it automatically. Commands revalidate current authority, prerequisites, revision and idempotency.";
|
|
367
|
+
}>;
|
|
368
|
+
resume(input: SdkInput<"operation.get">, options?: SdkRequestOptions): Promise<{
|
|
369
|
+
id: string & import("zod").$brand<"OperationId">;
|
|
370
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
371
|
+
semanticStatus: "INVALID_INPUT" | "NOT_FOUND" | "BLOCKED" | "REVISION_CONFLICT" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_OPERATIONAL_FAILURE" | "CANCELLED" | "WAITING_PROVIDER" | "RETRYING" | "SUCCESS" | "ACCEPTED" | "NO_CHANGE" | "STALE_BASIS" | "WAITING_INPUT" | "PROVIDER_UNAVAILABLE" | "BUDGET_BLOCKED" | "SUPERSEDED";
|
|
372
|
+
targets: {
|
|
373
|
+
type: string;
|
|
374
|
+
id: string;
|
|
375
|
+
version: number | null;
|
|
376
|
+
}[];
|
|
377
|
+
work: {
|
|
378
|
+
total: number;
|
|
379
|
+
pending: number;
|
|
380
|
+
ready: number;
|
|
381
|
+
running: number;
|
|
382
|
+
waiting: number;
|
|
383
|
+
succeeded: number;
|
|
384
|
+
failed: number;
|
|
385
|
+
cancelled: number;
|
|
386
|
+
superseded: number;
|
|
387
|
+
attempts: number;
|
|
388
|
+
};
|
|
389
|
+
blockers: string[];
|
|
390
|
+
nextActions: {
|
|
391
|
+
capability: string;
|
|
392
|
+
targetType: string;
|
|
393
|
+
targetId: string;
|
|
394
|
+
availability: "UNAVAILABLE" | "AVAILABLE";
|
|
395
|
+
reason: string | null;
|
|
396
|
+
}[];
|
|
397
|
+
startedAt: string;
|
|
398
|
+
updatedAt: string;
|
|
399
|
+
}>;
|
|
400
|
+
groups(input?: SdkInput<"studio.capability.groups">, options?: SdkRequestOptions): Promise<{
|
|
401
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
402
|
+
catalogVersion: string;
|
|
403
|
+
groups: {
|
|
404
|
+
id: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified";
|
|
405
|
+
title: string;
|
|
406
|
+
description: string;
|
|
407
|
+
count: number;
|
|
408
|
+
readOnlyCount: number;
|
|
409
|
+
}[];
|
|
410
|
+
}>;
|
|
411
|
+
search(input: SdkInput<"studio.capability.search">, options?: SdkRequestOptions): Promise<{
|
|
412
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
413
|
+
catalogVersion: string;
|
|
414
|
+
outcome: "MATCHES" | "AMBIGUOUS" | "NO_MATCH";
|
|
415
|
+
candidates: {
|
|
416
|
+
tool: string;
|
|
417
|
+
title: string;
|
|
418
|
+
description: string;
|
|
419
|
+
family: string;
|
|
420
|
+
readOnly: boolean;
|
|
421
|
+
registration: "REGISTERED";
|
|
422
|
+
matchedTerms: string[];
|
|
423
|
+
group?: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | undefined;
|
|
424
|
+
}[];
|
|
425
|
+
page: {
|
|
426
|
+
hasMore: boolean;
|
|
427
|
+
next: string | null;
|
|
428
|
+
};
|
|
429
|
+
guidance: "Registration is not availability or authorization. Inspect the selected schema and native context before invoking its typed command.";
|
|
430
|
+
}>;
|
|
431
|
+
describe(input: SdkInput<"studio.capability.describe">, options?: SdkRequestOptions): Promise<{
|
|
432
|
+
tool: string;
|
|
433
|
+
title: string;
|
|
434
|
+
description: string;
|
|
435
|
+
family: string;
|
|
436
|
+
readOnly: boolean;
|
|
437
|
+
registration: "REGISTERED";
|
|
438
|
+
tenantId: string & import("zod").$brand<"TenantId">;
|
|
439
|
+
catalogVersion: string;
|
|
440
|
+
inputSchema: Record<string, unknown>;
|
|
441
|
+
outputSchema: Record<string, unknown> | null;
|
|
442
|
+
outputContract: "DECLARED" | "NOT_DECLARED";
|
|
443
|
+
schemaCursor: string;
|
|
444
|
+
guidance: "Use this bounded definition as client-local schema metadata. Standard tools/list stays stable; commands revalidate authority and current state.";
|
|
445
|
+
group?: "local" | "review" | "execution" | "planning" | "delivery" | "navigation" | "materials" | "administration" | "unclassified" | undefined;
|
|
446
|
+
definition?: {
|
|
447
|
+
name: string;
|
|
448
|
+
inputSchema: Record<string, unknown>;
|
|
449
|
+
title?: string | undefined;
|
|
450
|
+
description?: string | undefined;
|
|
451
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
452
|
+
annotations?: Record<string, unknown> | undefined;
|
|
453
|
+
execution?: Record<string, unknown> | undefined;
|
|
454
|
+
_meta?: Record<string, unknown> | undefined;
|
|
455
|
+
icons?: Record<string, unknown>[] | undefined;
|
|
456
|
+
} | undefined;
|
|
457
|
+
}>;
|
|
458
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { NativeStudioAgentClient, SdkInput, SdkOutput, SdkOperation } from "./client.js";
|
|
2
|
+
import type { SdkRequestOptions } from "./transport/http.js";
|
|
3
|
+
export type PagedOperation = {
|
|
4
|
+
[K in SdkOperation]: SdkOutput<K> extends {
|
|
5
|
+
items: unknown[];
|
|
6
|
+
page: {
|
|
7
|
+
hasMore: boolean;
|
|
8
|
+
next: string | null;
|
|
9
|
+
};
|
|
10
|
+
} ? K : never;
|
|
11
|
+
}[SdkOperation];
|
|
12
|
+
export declare function queryPages<K extends PagedOperation>(client: Pick<NativeStudioAgentClient, "call">, key: K, input: SdkInput<K>, options?: SdkRequestOptions & {
|
|
13
|
+
maxPages?: number;
|
|
14
|
+
maxItems?: number;
|
|
15
|
+
}): AsyncGenerator<SdkOutput<K>>;
|
|
16
|
+
export declare function waitForOperation(client: Pick<NativeStudioAgentClient, "call">, input: SdkInput<"operation.get">, options?: SdkRequestOptions & {
|
|
17
|
+
maxPolls?: number;
|
|
18
|
+
timeoutMs?: number;
|
|
19
|
+
intervalMs?: number;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
id: string & import("zod").$brand<"OperationId">;
|
|
22
|
+
productionId: string & import("zod").$brand<"ProductionId">;
|
|
23
|
+
semanticStatus: "INVALID_INPUT" | "NOT_FOUND" | "BLOCKED" | "REVISION_CONFLICT" | "CAPABILITY_UNAVAILABLE" | "INTERNAL_OPERATIONAL_FAILURE" | "CANCELLED" | "WAITING_PROVIDER" | "RETRYING" | "SUCCESS" | "ACCEPTED" | "NO_CHANGE" | "STALE_BASIS" | "WAITING_INPUT" | "PROVIDER_UNAVAILABLE" | "BUDGET_BLOCKED" | "SUPERSEDED";
|
|
24
|
+
targets: {
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
version: number | null;
|
|
28
|
+
}[];
|
|
29
|
+
work: {
|
|
30
|
+
total: number;
|
|
31
|
+
pending: number;
|
|
32
|
+
ready: number;
|
|
33
|
+
running: number;
|
|
34
|
+
waiting: number;
|
|
35
|
+
succeeded: number;
|
|
36
|
+
failed: number;
|
|
37
|
+
cancelled: number;
|
|
38
|
+
superseded: number;
|
|
39
|
+
attempts: number;
|
|
40
|
+
};
|
|
41
|
+
blockers: string[];
|
|
42
|
+
nextActions: {
|
|
43
|
+
capability: string;
|
|
44
|
+
targetType: string;
|
|
45
|
+
targetId: string;
|
|
46
|
+
availability: "UNAVAILABLE" | "AVAILABLE";
|
|
47
|
+
reason: string | null;
|
|
48
|
+
}[];
|
|
49
|
+
startedAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
}>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import { NativeRuntimeProofRequestSchema, NativeToolCredentialExchangeSchema } from "../contracts/index.js";
|
|
3
|
+
import { type NativeStudioHttpOptions, type SdkRequestOptions } from "./transport/http.js";
|
|
4
|
+
/** Runtime-only signed proof transport. There is no Human bearer source or automatic retry. */
|
|
5
|
+
export declare class NativeStudioRuntimeAuthorityClient {
|
|
6
|
+
readonly tenantId: string;
|
|
7
|
+
private readonly origin;
|
|
8
|
+
private readonly transport;
|
|
9
|
+
constructor(config: Omit<NativeStudioHttpOptions, "authorization"> & {
|
|
10
|
+
tenantId: string;
|
|
11
|
+
});
|
|
12
|
+
private input;
|
|
13
|
+
private resource;
|
|
14
|
+
prove(raw: Omit<z.input<typeof NativeRuntimeProofRequestSchema>, "tenantId"> & {
|
|
15
|
+
tenantId?: string;
|
|
16
|
+
}, options?: SdkRequestOptions): Promise<{
|
|
17
|
+
tenantId: string;
|
|
18
|
+
projectId: string;
|
|
19
|
+
protocol: "NATIVESTUDIO_RUNTIME_REGISTRATION_V1";
|
|
20
|
+
grantId: string;
|
|
21
|
+
bindingId: string;
|
|
22
|
+
bindingRevision: number;
|
|
23
|
+
configurationVersion: number;
|
|
24
|
+
selection: {
|
|
25
|
+
hostKey: string;
|
|
26
|
+
tenantKey: string;
|
|
27
|
+
workspaceKey: string;
|
|
28
|
+
projectKey: string;
|
|
29
|
+
agentKey: string;
|
|
30
|
+
agentVersion: number;
|
|
31
|
+
modelOptionKey: string;
|
|
32
|
+
};
|
|
33
|
+
runtimeKey: string;
|
|
34
|
+
installationId: string;
|
|
35
|
+
installationRevisionId: string;
|
|
36
|
+
publicKey: {
|
|
37
|
+
kty: "EC";
|
|
38
|
+
crv: "P-256";
|
|
39
|
+
x: string;
|
|
40
|
+
y: string;
|
|
41
|
+
};
|
|
42
|
+
resource: string;
|
|
43
|
+
revision: number;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
createdByPrincipalId: string;
|
|
46
|
+
runtimePrincipalId: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
expiresAt: string;
|
|
49
|
+
challengeId: string;
|
|
50
|
+
challengeExpiresAt: string;
|
|
51
|
+
verifiedAt: string | null;
|
|
52
|
+
revokedAt: string | null;
|
|
53
|
+
}>;
|
|
54
|
+
status(raw: Omit<z.input<typeof NativeRuntimeProofRequestSchema>, "tenantId"> & {
|
|
55
|
+
tenantId?: string;
|
|
56
|
+
}, options?: SdkRequestOptions): Promise<{
|
|
57
|
+
tenantId: string;
|
|
58
|
+
projectId: string;
|
|
59
|
+
protocol: "NATIVESTUDIO_RUNTIME_REGISTRATION_V1";
|
|
60
|
+
grantId: string;
|
|
61
|
+
bindingId: string;
|
|
62
|
+
bindingRevision: number;
|
|
63
|
+
configurationVersion: number;
|
|
64
|
+
selection: {
|
|
65
|
+
hostKey: string;
|
|
66
|
+
tenantKey: string;
|
|
67
|
+
workspaceKey: string;
|
|
68
|
+
projectKey: string;
|
|
69
|
+
agentKey: string;
|
|
70
|
+
agentVersion: number;
|
|
71
|
+
modelOptionKey: string;
|
|
72
|
+
};
|
|
73
|
+
runtimeKey: string;
|
|
74
|
+
installationId: string;
|
|
75
|
+
installationRevisionId: string;
|
|
76
|
+
publicKey: {
|
|
77
|
+
kty: "EC";
|
|
78
|
+
crv: "P-256";
|
|
79
|
+
x: string;
|
|
80
|
+
y: string;
|
|
81
|
+
};
|
|
82
|
+
resource: string;
|
|
83
|
+
revision: number;
|
|
84
|
+
enabled: boolean;
|
|
85
|
+
createdByPrincipalId: string;
|
|
86
|
+
runtimePrincipalId: string;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
expiresAt: string;
|
|
89
|
+
challengeId: string;
|
|
90
|
+
challengeExpiresAt: string;
|
|
91
|
+
verifiedAt: string | null;
|
|
92
|
+
revokedAt: string | null;
|
|
93
|
+
}>;
|
|
94
|
+
exchange(raw: Omit<z.input<typeof NativeToolCredentialExchangeSchema>, "tenantId"> & {
|
|
95
|
+
tenantId?: string;
|
|
96
|
+
}, options?: SdkRequestOptions): Promise<{
|
|
97
|
+
tokenType: "Bearer";
|
|
98
|
+
accessToken: string;
|
|
99
|
+
tokenId: string;
|
|
100
|
+
resource: string;
|
|
101
|
+
expiresAt: string;
|
|
102
|
+
}>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
export interface NativeStudioHttpOptions {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
authorization(signal: AbortSignal): string | Promise<string>;
|
|
5
|
+
timeoutMs?: number;
|
|
6
|
+
maxJsonBytes?: number;
|
|
7
|
+
fetch?: typeof fetch;
|
|
8
|
+
}
|
|
9
|
+
export interface SdkRequestOptions {
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
export interface HttpRequest {
|
|
13
|
+
method: "GET" | "POST";
|
|
14
|
+
path: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
query?: Record<string, string | number | undefined>;
|
|
17
|
+
body?: unknown;
|
|
18
|
+
importedVideo?: {
|
|
19
|
+
bytes: Uint8Array;
|
|
20
|
+
metadata: string;
|
|
21
|
+
};
|
|
22
|
+
authentication?: "runtime-proof";
|
|
23
|
+
readOnly?: boolean | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface SdkBinary {
|
|
26
|
+
bytes: Uint8Array;
|
|
27
|
+
contentType: string;
|
|
28
|
+
etag: string | null;
|
|
29
|
+
}
|
|
30
|
+
export declare class NativeStudioHttpTransport {
|
|
31
|
+
private readonly config;
|
|
32
|
+
private readonly origin;
|
|
33
|
+
private readonly timeout;
|
|
34
|
+
private readonly jsonLimit;
|
|
35
|
+
constructor(config: NativeStudioHttpOptions);
|
|
36
|
+
private response;
|
|
37
|
+
json<T>(request: HttpRequest, schema: z.ZodType<T>, options?: SdkRequestOptions): Promise<T>;
|
|
38
|
+
binary(request: HttpRequest, contentTypes: readonly string[], limit: number, options?: SdkRequestOptions): Promise<SdkBinary>;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./_types/sdk/account.js";
|
package/dist/account.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CliAccountExchangeSchema,CliAccountIdentitySchema,CliAccountSessionSchema,CliAccountStartSchema,CliAccountStartedSchema,ProjectLibraryPageSchema,ProjectWorkspaceSchema}from"./_chunks/chunk-7YCEMDNZ.js";import"./_chunks/chunk-4M3AGNTZ.js";import{NativeStudioSdkError}from"./_chunks/chunk-6NVIN2NI.js";import{z}from"zod";function accountServerOrigin(value){const url=new URL(value);if(url.pathname!=="/"||url.search||url.hash||url.username||url.password||!(url.protocol==="https:"||url.protocol==="http:"&&["127.0.0.1","localhost","[::1]"].includes(url.hostname)))throw new NativeStudioSdkError("ACCOUNT_SERVER_ORIGIN_REQUIRED","INVALID_INPUT","NO_WRITE");return url.origin}var NativeStudioAccountClient=class{constructor(options){this.options=options;this.serverOrigin=accountServerOrigin(options.serverOrigin);if(options.accessToken&&!/^nvsh_[A-Za-z0-9_-]{43}$/.test(options.accessToken))throw new NativeStudioSdkError("INVALID_ACCOUNT_CREDENTIAL","INVALID_INPUT","NO_WRITE")}options;serverOrigin;async request(action,schema,options={}){if(options.credential&&!this.options.accessToken)throw new NativeStudioSdkError("ACCOUNT_LOGIN_REQUIRED","INVALID_INPUT","NO_WRITE");const write=options.body!==void 0;let response;try{response=await(this.options.fetch??fetch)(`${this.serverOrigin}/api/cli-account/${action}${options.query?"?"+options.query:""}`,{method:write?"POST":"GET",cache:"no-store",redirect:"error",credentials:"omit",signal:AbortSignal.any([AbortSignal.timeout(15e3),...options.signal?[options.signal]:[]]),headers:{...write?{"content-type":"application/json"}:{},...options.credential?{authorization:"Bearer "+this.options.accessToken}:{}},...write?{body:JSON.stringify(options.body)}:{}})}catch{throw new NativeStudioSdkError("ACCOUNT_TRANSPORT_FAILED","BLOCKED",write?"UNKNOWN":"NO_WRITE")}if(!response.ok){await response.body?.cancel();throw new NativeStudioSdkError(response.status===401?"ACCOUNT_SESSION_EXPIRED_OR_REVOKED":"ACCOUNT_REQUEST_REJECTED","BLOCKED",write&&response.status>=500?"UNKNOWN":"REJECTED",response.status)}try{if(!(response.headers.get("content-type")??"").startsWith("application/json"))throw Error();const reader=response.body?.getReader();if(!reader)throw Error();const chunks=[];let size=0;try{while(true){const part=await reader.read();if(part.done)break;size+=part.value.byteLength;if(size>1024*1024){await reader.cancel();throw Error()}chunks.push(part.value)}}finally{reader.releaseLock()}const bytes=new Uint8Array(size);let offset=0;for(const part of chunks){bytes.set(part,offset);offset+=part.length}return schema.parse(JSON.parse(new TextDecoder().decode(bytes)))}catch{throw new NativeStudioSdkError("ACCOUNT_RESPONSE_INVALID","BLOCKED",write?"UNKNOWN":"NO_WRITE")}}async metadata(signal){return this.request("metadata",z.strictObject({protocol:z.literal("NVS_CLI_ACCOUNT_V1"),serverOrigin:z.literal(this.serverOrigin)}),{signal})}start(input,signal){return this.request("start",CliAccountStartedSchema,{body:CliAccountStartSchema.parse(input),signal})}exchange(input,signal){return this.request("exchange",CliAccountSessionSchema,{body:CliAccountExchangeSchema.parse(input),signal})}me(signal){return this.request("me",CliAccountIdentitySchema,{credential:true,signal})}logout(signal){return this.request("logout",z.strictObject({changed:z.literal(true)}),{credential:true,body:{},signal})}async projects(input,signal){const value=z.strictObject({tenantId:z.uuid(),limit:z.number().int().min(1).max(100).optional(),next:z.string().min(1).max(8192).optional()}).parse(input);const result=await this.request("projects",ProjectLibraryPageSchema,{credential:true,signal,query:new URLSearchParams({tenantId:value.tenantId,...value.limit?{limit:String(value.limit)}:{},...value.next?{next:value.next}:{}})});if(result.items.some(p=>p.tenantId!==value.tenantId))throw new NativeStudioSdkError("ACCOUNT_RESPONSE_SCOPE_MISMATCH","BLOCKED","NO_WRITE");return result}async project(input,signal){const value=z.strictObject({tenantId:z.uuid(),projectId:z.uuid()}).parse(input);const result=await this.request("project",ProjectWorkspaceSchema,{credential:true,signal,query:new URLSearchParams(value)});if(result.project.id!==value.projectId||result.project.tenantId!==value.tenantId)throw new NativeStudioSdkError("ACCOUNT_RESPONSE_SCOPE_MISMATCH","BLOCKED","NO_WRITE");return result}};export{CliAccountIdentitySchema,CliAccountSessionSchema,CliAccountStartSchema,CliAccountStartedSchema,NativeStudioAccountClient,accountServerOrigin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./_types/sdk/desktop-previews.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{desktopPublicKey,desktopReleaseSchema,desktopReleaseUrl,verifiedDesktopCatalogue}from"./_chunks/chunk-RK3YLCZP.js";import{z}from"zod";var previewPolicySchema=z.strictObject({protocol:z.literal("NVS_DESKTOP_PREVIEW_POLICY_V1"),applicationId:z.literal("com.nativestudio.desktop.preview"),catalogueUrl:z.string().url().max(4096),publicKey:z.string().min(32).max(16384)});var previewReleaseSchema=desktopReleaseSchema.extend({nativeSignature:z.enum(["UNSIGNED_PREVIEW","AD_HOC_PREVIEW"]),deviceAcceptance:z.enum(["ENGINEERING_VERIFIED","OWNER_PENDING"])});var previewCatalogueSchema=z.strictObject({protocol:z.literal("NVS_DESKTOP_PREVIEW_CATALOGUE_V1"),applicationId:z.literal("com.nativestudio.desktop.preview"),issuedAt:z.iso.datetime(),expiresAt:z.iso.datetime(),releases:z.array(previewReleaseSchema).max(128)});var signedSchema=z.strictObject({catalogue:previewCatalogueSchema,signature:z.string().regex(/^[A-Za-z0-9_-]{86}$/)});function parsePreviewPolicy(raw){const value=previewPolicySchema.parse(raw);desktopReleaseUrl(value.catalogueUrl);desktopPublicKey(value.publicKey);return value}function previewCatalogue(policy,signal=AbortSignal.timeout(15e3)){return verifiedDesktopCatalogue(policy,signedSchema,signal)}function newerPreviewVersion(candidate,current){const parse=v=>v.split(".").map(Number);if(!/^\d{1,8}\.\d{1,8}\.\d{1,8}$/.test(candidate)||!/^\d{1,8}\.\d{1,8}\.\d{1,8}$/.test(current))return false;const a=parse(candidate),b=parse(current);for(let i=0;i<3;i++)if(a[i]!==b[i])return a[i]>b[i];return false}export{newerPreviewVersion,parsePreviewPolicy,previewCatalogue,previewCatalogueSchema,previewPolicySchema,previewReleaseSchema};
|