@builder.io/ai-utils 0.96.1 → 0.98.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/package.json +1 -1
- package/src/codegen.d.ts +33 -0
- package/src/codegen.js +24 -2
- package/src/completion.d.ts +14 -1
- package/src/events.d.ts +14 -2
- package/src/projects.d.ts +264 -60
- package/src/projects.js +79 -0
- package/src/projects.test.js +50 -1
- package/src/publish-agent.d.ts +4 -77
- package/src/publish-agent.js +3 -30
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -384,6 +384,18 @@ export declare const GetScreenshotToolInputSchema: z.ZodObject<{
|
|
|
384
384
|
height: z.ZodOptional<z.ZodNumber>;
|
|
385
385
|
}, z.core.$strip>;
|
|
386
386
|
export type GetScreenshotToolInput = z.infer<typeof GetScreenshotToolInputSchema>;
|
|
387
|
+
export declare const JudgeCommandSafetyInputSchema: z.ZodObject<{
|
|
388
|
+
command: z.ZodString;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
export type JudgeCommandSafetyInput = z.infer<typeof JudgeCommandSafetyInputSchema>;
|
|
391
|
+
export declare const JudgeCommandSafetyResultSchema: z.ZodObject<{
|
|
392
|
+
verdict: z.ZodEnum<{
|
|
393
|
+
destructive: "destructive";
|
|
394
|
+
safe: "safe";
|
|
395
|
+
}>;
|
|
396
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, z.core.$strip>;
|
|
398
|
+
export type JudgeCommandSafetyResult = z.infer<typeof JudgeCommandSafetyResultSchema>;
|
|
387
399
|
export declare const NavigatePreviewToolInputSchema: z.ZodObject<{
|
|
388
400
|
href: z.ZodString;
|
|
389
401
|
}, z.core.$strip>;
|
|
@@ -2157,6 +2169,17 @@ export type CodeGenPosition = z.infer<typeof CodeGenPositionSchema>;
|
|
|
2157
2169
|
export declare const PublishAgentMessageRequestSchema: z.ZodObject<{
|
|
2158
2170
|
message: z.ZodOptional<z.ZodString>;
|
|
2159
2171
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2172
|
+
modelOverride: z.ZodOptional<z.ZodString>;
|
|
2173
|
+
reasoning: z.ZodOptional<z.ZodEnum<{
|
|
2174
|
+
auto: "auto";
|
|
2175
|
+
high: "high";
|
|
2176
|
+
low: "low";
|
|
2177
|
+
max: "max";
|
|
2178
|
+
medium: "medium";
|
|
2179
|
+
minimal: "minimal";
|
|
2180
|
+
none: "none";
|
|
2181
|
+
xhigh: "xhigh";
|
|
2182
|
+
}>>;
|
|
2160
2183
|
toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2161
2184
|
type: z.ZodLiteral<"tool_result">;
|
|
2162
2185
|
tool_use_id: z.ZodString;
|
|
@@ -2694,6 +2717,7 @@ export declare const CodeGenInputOptionsSchema: z.ZodObject<{
|
|
|
2694
2717
|
v1: "v1";
|
|
2695
2718
|
v2: "v2";
|
|
2696
2719
|
v3: "v3";
|
|
2720
|
+
v4: "v4";
|
|
2697
2721
|
}>>;
|
|
2698
2722
|
reasoning: z.ZodOptional<z.ZodEnum<{
|
|
2699
2723
|
auto: "auto";
|
|
@@ -3975,6 +3999,7 @@ export interface GenerateCodeEventDone {
|
|
|
3975
3999
|
nextUrl: string;
|
|
3976
4000
|
autoContinue: boolean;
|
|
3977
4001
|
model: string;
|
|
4002
|
+
modelOverride?: string;
|
|
3978
4003
|
promptVersion: string | undefined;
|
|
3979
4004
|
/** True when this turn was a compaction pass run on an internal model. */
|
|
3980
4005
|
compact: boolean;
|
|
@@ -4563,6 +4588,14 @@ export interface FusionConfig {
|
|
|
4563
4588
|
* This is a dangerous setting that removes safety guardrails - equivalent to full shell access.
|
|
4564
4589
|
*/
|
|
4565
4590
|
skipCommandSecurity?: boolean;
|
|
4591
|
+
/**
|
|
4592
|
+
* LaunchDarkly `command-safety-judge-enabled` flag, resolved server-side at
|
|
4593
|
+
* session start and threaded down since the sandbox has no LaunchDarkly
|
|
4594
|
+
* access of its own. When true, `executeShellCommand` routes Tier 2
|
|
4595
|
+
* judgment-requiring commands to the `JudgeCommandSafety` endpoint instead
|
|
4596
|
+
* of hard-blocking them.
|
|
4597
|
+
*/
|
|
4598
|
+
commandSafetyJudgeEnabled?: boolean;
|
|
4566
4599
|
/** @deprecated use devCommand */
|
|
4567
4600
|
command?: string;
|
|
4568
4601
|
}
|
package/src/codegen.js
CHANGED
|
@@ -580,6 +580,26 @@ export const GetScreenshotToolInputSchema = z
|
|
|
580
580
|
height: z.number().optional(),
|
|
581
581
|
})
|
|
582
582
|
.meta({ title: "GetScreenshotToolInput" });
|
|
583
|
+
export const JudgeCommandSafetyInputSchema = z
|
|
584
|
+
.object({
|
|
585
|
+
// Bounded so a caller can't force multi-megabyte payloads through this
|
|
586
|
+
// directly-callable, AI-credit-exempt endpoint into every completionLLM
|
|
587
|
+
// call — real shell commands are nowhere near this size.
|
|
588
|
+
command: z.string().max(20000).meta({
|
|
589
|
+
description: "The shell command to classify.",
|
|
590
|
+
}),
|
|
591
|
+
})
|
|
592
|
+
.meta({ title: "JudgeCommandSafetyInput" });
|
|
593
|
+
export const JudgeCommandSafetyResultSchema = z
|
|
594
|
+
.object({
|
|
595
|
+
verdict: z.enum(["safe", "destructive"]).meta({
|
|
596
|
+
description: "Whether the command is safe to run in this ephemeral, fully-writable sandbox, or destructive and should be denied.",
|
|
597
|
+
}),
|
|
598
|
+
reason: z.string().optional().meta({
|
|
599
|
+
description: "Required when verdict is destructive: a short, non-scary explanation shown to the user. Omit when safe.",
|
|
600
|
+
}),
|
|
601
|
+
})
|
|
602
|
+
.meta({ title: "JudgeCommandSafetyResult" });
|
|
583
603
|
export const NavigatePreviewToolInputSchema = z
|
|
584
604
|
.object({
|
|
585
605
|
href: z.string().meta({
|
|
@@ -1761,6 +1781,8 @@ export const PublishAgentMessageRequestSchema = z
|
|
|
1761
1781
|
.object({
|
|
1762
1782
|
message: z.string().max(100000).optional(),
|
|
1763
1783
|
sessionId: z.string().min(1).max(256).optional(),
|
|
1784
|
+
modelOverride: z.string().min(1).max(256).optional(),
|
|
1785
|
+
reasoning: ReasoningEffortSchema.optional(),
|
|
1764
1786
|
toolResults: z.array(ContentMessageItemToolResultSchema).optional(),
|
|
1765
1787
|
confirmation: z
|
|
1766
1788
|
.object({
|
|
@@ -1773,7 +1795,7 @@ export const PublishAgentMessageRequestSchema = z
|
|
|
1773
1795
|
path: ["message"],
|
|
1774
1796
|
message: "A message or at least one tool result is required.",
|
|
1775
1797
|
})
|
|
1776
|
-
.refine(({
|
|
1798
|
+
.refine(({ toolResults, sessionId }) => !(toolResults === null || toolResults === void 0 ? void 0 : toolResults.length) || Boolean(sessionId), {
|
|
1777
1799
|
path: ["sessionId"],
|
|
1778
1800
|
message: "A session ID is required when continuing with tool results.",
|
|
1779
1801
|
})
|
|
@@ -1962,7 +1984,7 @@ export const CodeGenInputOptionsSchema = z
|
|
|
1962
1984
|
modelOverride: z.string().optional(),
|
|
1963
1985
|
errorIfHadCompaction: z.boolean().optional(),
|
|
1964
1986
|
softContextWindow: z.number().optional(),
|
|
1965
|
-
promptVersion: z.enum(["v1", "v2", "v3"]).optional(),
|
|
1987
|
+
promptVersion: z.enum(["v1", "v2", "v3", "v4"]).optional(),
|
|
1966
1988
|
reasoning: ReasoningEffortSchema.optional(),
|
|
1967
1989
|
redactUserMessages: z.boolean().optional(),
|
|
1968
1990
|
redactLLMMessages: z.boolean().optional(),
|
package/src/completion.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BuilderContent, BuilderElement, Component } from "@builder.io/sdk";
|
|
2
|
-
import type { Message, MessageParam, Attachment } from "./messages.js";
|
|
2
|
+
import type { Message, MessageParam, Attachment, ContentMessageItemToolResult } from "./messages.js";
|
|
3
3
|
import type { BuilderModel } from "./events.js";
|
|
4
|
+
import type { ReasoningEffort } from "./codegen.js";
|
|
4
5
|
export type { BuilderContent, BuilderElement, Component };
|
|
5
6
|
export interface CompletionOptions {
|
|
6
7
|
/**
|
|
@@ -14,6 +15,11 @@ export interface CompletionOptions {
|
|
|
14
15
|
* Note: This is not the Builder.io data model.
|
|
15
16
|
*/
|
|
16
17
|
modelId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Reasoning effort for the selected LLM.
|
|
20
|
+
* Defaults according to the session mode, typically to medium.
|
|
21
|
+
*/
|
|
22
|
+
reasoning?: ReasoningEffort;
|
|
17
23
|
/**
|
|
18
24
|
* The unique LOCAL identifier of the thread to submit the user message to.
|
|
19
25
|
* This is used to identify the thread with our own id (openai assistant id is different)
|
|
@@ -84,6 +90,13 @@ export interface CompletionOptions {
|
|
|
84
90
|
*/
|
|
85
91
|
thread?: "persist" | "ephemeral";
|
|
86
92
|
attachments?: Attachment[];
|
|
93
|
+
/**
|
|
94
|
+
* Answers to a prior `AskUserQuestion` tool call, sent on the follow-up
|
|
95
|
+
* request that resumes the paused turn. Each entry's `tool_use_id` must match
|
|
96
|
+
* the `id` from the `assistant.model.question.required` event, so the resumed
|
|
97
|
+
* codegen session pairs the answer with its pending tool_use.
|
|
98
|
+
*/
|
|
99
|
+
toolResults?: ContentMessageItemToolResult[];
|
|
87
100
|
}
|
|
88
101
|
export interface BuilderEditorState {
|
|
89
102
|
/**
|
package/src/events.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BuilderContent, BuilderElement } from "@builder.io/sdk";
|
|
2
2
|
import type { AssistantMessage, AssistantMessageAction } from "./messages.js";
|
|
3
3
|
import type { AssistantSettings } from "./settings.js";
|
|
4
|
-
import type { ExitState, UserSource, CodeGenPosition, ReviewSeverity, ReviewVerdict } from "./codegen.js";
|
|
4
|
+
import type { ExitState, UserSource, CodeGenPosition, ReviewSeverity, ReviewVerdict, AskUserQuestion } from "./codegen.js";
|
|
5
5
|
import type { FileUpload } from "./messages.js";
|
|
6
6
|
import type { BuilderConfigRealtime } from "./builder-config.js";
|
|
7
7
|
import type { DeployFailureReport } from "./projects.js";
|
|
8
8
|
export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void;
|
|
9
|
-
export type BuilderAssistantEvent = AssistantCompletionResultEvent | AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptSubmitEvent | AppReadyEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | AssistantThemeEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent | AssistantEditorAuthMessage | AppAttachmentTemplateEvent | AppPasteSmartExportEvent | ThreadMessageRetryEvent | AppFigmaImportEvent | AppWebImportEvent | AppMcpServersEvent | AssistantContentInitialEvent | ThreadMessageSummaryEvent | ThreadMessageSummaryCodegenDeltaEvent | ThreadMessageThinkingDeltaEvent | AssistantHeartbeatEvent | ShowUpgradeDialogEvent | AssistantFusionSuggestionEvent | AppNavigateToFusionEvent | ModelPermissionRequiredEvent | ModelPermissionResponseEvent;
|
|
9
|
+
export type BuilderAssistantEvent = AssistantCompletionResultEvent | AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptSubmitEvent | AppReadyEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | AssistantThemeEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent | AssistantEditorAuthMessage | AppAttachmentTemplateEvent | AppPasteSmartExportEvent | ThreadMessageRetryEvent | AppFigmaImportEvent | AppWebImportEvent | AppMcpServersEvent | AssistantContentInitialEvent | ThreadMessageSummaryEvent | ThreadMessageSummaryCodegenDeltaEvent | ThreadMessageThinkingDeltaEvent | AssistantHeartbeatEvent | ShowUpgradeDialogEvent | AssistantFusionSuggestionEvent | AppNavigateToFusionEvent | ModelPermissionRequiredEvent | ModelPermissionResponseEvent | AssistantQuestionRequiredEvent;
|
|
10
10
|
export interface AssistantCompletionResultEvent {
|
|
11
11
|
type: "assistant.result";
|
|
12
12
|
data: {
|
|
@@ -1400,4 +1400,16 @@ export interface ModelPermissionResponseEvent extends AwaitResultEvent {
|
|
|
1400
1400
|
reason?: string;
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
|
+
/**
|
|
1404
|
+
* Emitted when the model calls `AskUserQuestion`. The turn pauses; the client
|
|
1405
|
+
* renders the questions and resumes by sending a new completion whose
|
|
1406
|
+
* `toolResults` carries a result with `tool_use_id === data.id`.
|
|
1407
|
+
*/
|
|
1408
|
+
export interface AssistantQuestionRequiredEvent {
|
|
1409
|
+
type: "assistant.model.question.required";
|
|
1410
|
+
data: {
|
|
1411
|
+
id: string;
|
|
1412
|
+
questions: AskUserQuestion[];
|
|
1413
|
+
};
|
|
1414
|
+
}
|
|
1403
1415
|
export {};
|
package/src/projects.d.ts
CHANGED
|
@@ -767,6 +767,140 @@ export interface ListBranchesResult {
|
|
|
767
767
|
}
|
|
768
768
|
export type CpuKind = "performance" | "standard" | "shared";
|
|
769
769
|
export type MachineAutoStop = "stop" | "off" | "suspend";
|
|
770
|
+
export declare const ShapeEffectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
771
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
772
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
773
|
+
key: z.ZodString;
|
|
774
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
775
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
776
|
+
designSystemId: z.ZodString;
|
|
777
|
+
}, z.core.$strip>], "kind">;
|
|
778
|
+
export type ShapeEffect = z.infer<typeof ShapeEffectSchema>;
|
|
779
|
+
export declare const ShapeOptionEffectSchema: z.ZodObject<{
|
|
780
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
781
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
782
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
783
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
784
|
+
key: z.ZodString;
|
|
785
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
786
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
787
|
+
designSystemId: z.ZodString;
|
|
788
|
+
}, z.core.$strip>], "kind">>>;
|
|
789
|
+
}, z.core.$strip>;
|
|
790
|
+
export type ShapeOptionEffect = z.infer<typeof ShapeOptionEffectSchema>;
|
|
791
|
+
export declare const ShapeOptionSchema: z.ZodObject<{
|
|
792
|
+
id: z.ZodString;
|
|
793
|
+
label: z.ZodString;
|
|
794
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
795
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
796
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
797
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
798
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
799
|
+
key: z.ZodString;
|
|
800
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
801
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
802
|
+
designSystemId: z.ZodString;
|
|
803
|
+
}, z.core.$strip>], "kind">>>;
|
|
804
|
+
}, z.core.$strip>>;
|
|
805
|
+
}, z.core.$strip>;
|
|
806
|
+
export type ShapeOption = z.infer<typeof ShapeOptionSchema>;
|
|
807
|
+
export declare const ShapeQuestionSchema: z.ZodObject<{
|
|
808
|
+
id: z.ZodString;
|
|
809
|
+
question: z.ZodString;
|
|
810
|
+
kind: z.ZodEnum<{
|
|
811
|
+
"figma-upload": "figma-upload";
|
|
812
|
+
select: "select";
|
|
813
|
+
}>;
|
|
814
|
+
options: z.ZodArray<z.ZodObject<{
|
|
815
|
+
id: z.ZodString;
|
|
816
|
+
label: z.ZodString;
|
|
817
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
818
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
819
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
820
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
821
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
822
|
+
key: z.ZodString;
|
|
823
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
824
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
825
|
+
designSystemId: z.ZodString;
|
|
826
|
+
}, z.core.$strip>], "kind">>>;
|
|
827
|
+
}, z.core.$strip>>;
|
|
828
|
+
}, z.core.$strip>>;
|
|
829
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
830
|
+
}, z.core.$strip>;
|
|
831
|
+
export type ShapeQuestion = z.infer<typeof ShapeQuestionSchema>;
|
|
832
|
+
export declare const ShapeAnswerSchema: z.ZodObject<{
|
|
833
|
+
questionId: z.ZodString;
|
|
834
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
835
|
+
designSystemId: z.ZodOptional<z.ZodString>;
|
|
836
|
+
skipped: z.ZodBoolean;
|
|
837
|
+
delegated: z.ZodBoolean;
|
|
838
|
+
resolvedFrom: z.ZodEnum<{
|
|
839
|
+
llm: "llm";
|
|
840
|
+
user: "user";
|
|
841
|
+
}>;
|
|
842
|
+
llmOptionId: z.ZodOptional<z.ZodString>;
|
|
843
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
844
|
+
}, z.core.$strip>;
|
|
845
|
+
export type ShapeAnswer = z.infer<typeof ShapeAnswerSchema>;
|
|
846
|
+
export declare const ShapeSessionSchema: z.ZodObject<{
|
|
847
|
+
questionnaireId: z.ZodString;
|
|
848
|
+
catalogVersion: z.ZodString;
|
|
849
|
+
source: z.ZodEnum<{
|
|
850
|
+
agent: "agent";
|
|
851
|
+
static: "static";
|
|
852
|
+
}>;
|
|
853
|
+
status: z.ZodEnum<{
|
|
854
|
+
assembling: "assembling";
|
|
855
|
+
pending: "pending";
|
|
856
|
+
resolved: "resolved";
|
|
857
|
+
}>;
|
|
858
|
+
selection: z.ZodEnum<{
|
|
859
|
+
fallback: "fallback";
|
|
860
|
+
llm: "llm";
|
|
861
|
+
}>;
|
|
862
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
863
|
+
id: z.ZodString;
|
|
864
|
+
question: z.ZodString;
|
|
865
|
+
kind: z.ZodEnum<{
|
|
866
|
+
"figma-upload": "figma-upload";
|
|
867
|
+
select: "select";
|
|
868
|
+
}>;
|
|
869
|
+
options: z.ZodArray<z.ZodObject<{
|
|
870
|
+
id: z.ZodString;
|
|
871
|
+
label: z.ZodString;
|
|
872
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
873
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
874
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
875
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
876
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
877
|
+
key: z.ZodString;
|
|
878
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
879
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
880
|
+
designSystemId: z.ZodString;
|
|
881
|
+
}, z.core.$strip>], "kind">>>;
|
|
882
|
+
}, z.core.$strip>>;
|
|
883
|
+
}, z.core.$strip>>;
|
|
884
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
885
|
+
}, z.core.$strip>>;
|
|
886
|
+
initialPromptId: z.ZodString;
|
|
887
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
888
|
+
questionId: z.ZodString;
|
|
889
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
890
|
+
designSystemId: z.ZodOptional<z.ZodString>;
|
|
891
|
+
skipped: z.ZodBoolean;
|
|
892
|
+
delegated: z.ZodBoolean;
|
|
893
|
+
resolvedFrom: z.ZodEnum<{
|
|
894
|
+
llm: "llm";
|
|
895
|
+
user: "user";
|
|
896
|
+
}>;
|
|
897
|
+
llmOptionId: z.ZodOptional<z.ZodString>;
|
|
898
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
899
|
+
}, z.core.$strip>>>;
|
|
900
|
+
assembledAt: z.ZodOptional<z.ZodString>;
|
|
901
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
902
|
+
}, z.core.$strip>;
|
|
903
|
+
export type ShapeSession = z.infer<typeof ShapeSessionSchema>;
|
|
770
904
|
export declare const ProjectRolePermissionsSchema: z.ZodObject<{
|
|
771
905
|
view: z.ZodOptional<z.ZodBoolean>;
|
|
772
906
|
editCode: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1171,6 +1305,63 @@ export declare const ProjectSettingsSchema: z.ZodObject<{
|
|
|
1171
1305
|
enabled: z.ZodBoolean;
|
|
1172
1306
|
password: z.ZodOptional<z.ZodString>;
|
|
1173
1307
|
}, z.core.$strip>>;
|
|
1308
|
+
shapeSession: z.ZodOptional<z.ZodObject<{
|
|
1309
|
+
questionnaireId: z.ZodString;
|
|
1310
|
+
catalogVersion: z.ZodString;
|
|
1311
|
+
source: z.ZodEnum<{
|
|
1312
|
+
agent: "agent";
|
|
1313
|
+
static: "static";
|
|
1314
|
+
}>;
|
|
1315
|
+
status: z.ZodEnum<{
|
|
1316
|
+
assembling: "assembling";
|
|
1317
|
+
pending: "pending";
|
|
1318
|
+
resolved: "resolved";
|
|
1319
|
+
}>;
|
|
1320
|
+
selection: z.ZodEnum<{
|
|
1321
|
+
fallback: "fallback";
|
|
1322
|
+
llm: "llm";
|
|
1323
|
+
}>;
|
|
1324
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
1325
|
+
id: z.ZodString;
|
|
1326
|
+
question: z.ZodString;
|
|
1327
|
+
kind: z.ZodEnum<{
|
|
1328
|
+
"figma-upload": "figma-upload";
|
|
1329
|
+
select: "select";
|
|
1330
|
+
}>;
|
|
1331
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1332
|
+
id: z.ZodString;
|
|
1333
|
+
label: z.ZodString;
|
|
1334
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
1335
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1337
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
1338
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
1339
|
+
key: z.ZodString;
|
|
1340
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1341
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
1342
|
+
designSystemId: z.ZodString;
|
|
1343
|
+
}, z.core.$strip>], "kind">>>;
|
|
1344
|
+
}, z.core.$strip>>;
|
|
1345
|
+
}, z.core.$strip>>;
|
|
1346
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
}, z.core.$strip>>;
|
|
1348
|
+
initialPromptId: z.ZodString;
|
|
1349
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1350
|
+
questionId: z.ZodString;
|
|
1351
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1352
|
+
designSystemId: z.ZodOptional<z.ZodString>;
|
|
1353
|
+
skipped: z.ZodBoolean;
|
|
1354
|
+
delegated: z.ZodBoolean;
|
|
1355
|
+
resolvedFrom: z.ZodEnum<{
|
|
1356
|
+
llm: "llm";
|
|
1357
|
+
user: "user";
|
|
1358
|
+
}>;
|
|
1359
|
+
llmOptionId: z.ZodOptional<z.ZodString>;
|
|
1360
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
1361
|
+
}, z.core.$strip>>>;
|
|
1362
|
+
assembledAt: z.ZodOptional<z.ZodString>;
|
|
1363
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
1364
|
+
}, z.core.$strip>>;
|
|
1174
1365
|
}, z.core.$strip>;
|
|
1175
1366
|
export type ProjectSettings = z.infer<typeof ProjectSettingsSchema>;
|
|
1176
1367
|
/**
|
|
@@ -1935,6 +2126,7 @@ export interface CreateBranchOptions {
|
|
|
1935
2126
|
branchFriendlyName?: string;
|
|
1936
2127
|
agentType?: AgentType;
|
|
1937
2128
|
actor: string;
|
|
2129
|
+
isPublic?: boolean;
|
|
1938
2130
|
hidden?: boolean;
|
|
1939
2131
|
featureFlags?: Record<string, boolean>;
|
|
1940
2132
|
checkoutBranch?: string | null;
|
|
@@ -1992,6 +2184,7 @@ export interface CreateBranchOptions {
|
|
|
1992
2184
|
*/
|
|
1993
2185
|
sessionId?: string;
|
|
1994
2186
|
}
|
|
2187
|
+
export declare function resolveBranchIsPublic(isPublic: boolean | undefined, defaultBranchType: "shared" | "private" | undefined): boolean;
|
|
1995
2188
|
interface BaseCreateBranchMessage {
|
|
1996
2189
|
}
|
|
1997
2190
|
export interface CreatingBranchMessage extends BaseCreateBranchMessage {
|
|
@@ -3444,6 +3637,20 @@ export declare const CloneProjectOptionsSchema: z.ZodObject<{
|
|
|
3444
3637
|
useKube: z.ZodDefault<z.ZodBoolean>;
|
|
3445
3638
|
}, z.core.$strip>;
|
|
3446
3639
|
export type CloneProjectOptions = z.infer<typeof CloneProjectOptionsSchema>;
|
|
3640
|
+
export declare const GetPreferredProjectForRepoOptionsSchema: z.ZodObject<{
|
|
3641
|
+
repoUrl: z.ZodString;
|
|
3642
|
+
repoFullName: z.ZodOptional<z.ZodString>;
|
|
3643
|
+
}, z.core.$strip>;
|
|
3644
|
+
export type GetPreferredProjectForRepoOptions = z.infer<typeof GetPreferredProjectForRepoOptionsSchema>;
|
|
3645
|
+
/** Identity only — this powers a "currently preferred: X" label, not a project read. */
|
|
3646
|
+
export declare const GetPreferredProjectForRepoResultSchema: z.ZodObject<{
|
|
3647
|
+
status: z.ZodLiteral<"success">;
|
|
3648
|
+
project: z.ZodNullable<z.ZodObject<{
|
|
3649
|
+
id: z.ZodString;
|
|
3650
|
+
name: z.ZodString;
|
|
3651
|
+
}, z.core.$strip>>;
|
|
3652
|
+
}, z.core.$strip>;
|
|
3653
|
+
export type GetPreferredProjectForRepoResult = z.infer<typeof GetPreferredProjectForRepoResultSchema>;
|
|
3447
3654
|
/**
|
|
3448
3655
|
* Write-time contract for a single hosted-site access rule. Mirrors the stored
|
|
3449
3656
|
* {@link SiteAccessRule} in `organization.ts`, except a password rule carries a
|
|
@@ -3972,6 +4179,63 @@ export declare const ProjectTemplateSchema: z.ZodObject<{
|
|
|
3972
4179
|
enabled: z.ZodBoolean;
|
|
3973
4180
|
password: z.ZodOptional<z.ZodString>;
|
|
3974
4181
|
}, z.core.$strip>>>;
|
|
4182
|
+
shapeSession: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
4183
|
+
questionnaireId: z.ZodString;
|
|
4184
|
+
catalogVersion: z.ZodString;
|
|
4185
|
+
source: z.ZodEnum<{
|
|
4186
|
+
agent: "agent";
|
|
4187
|
+
static: "static";
|
|
4188
|
+
}>;
|
|
4189
|
+
status: z.ZodEnum<{
|
|
4190
|
+
assembling: "assembling";
|
|
4191
|
+
pending: "pending";
|
|
4192
|
+
resolved: "resolved";
|
|
4193
|
+
}>;
|
|
4194
|
+
selection: z.ZodEnum<{
|
|
4195
|
+
fallback: "fallback";
|
|
4196
|
+
llm: "llm";
|
|
4197
|
+
}>;
|
|
4198
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
4199
|
+
id: z.ZodString;
|
|
4200
|
+
question: z.ZodString;
|
|
4201
|
+
kind: z.ZodEnum<{
|
|
4202
|
+
"figma-upload": "figma-upload";
|
|
4203
|
+
select: "select";
|
|
4204
|
+
}>;
|
|
4205
|
+
options: z.ZodArray<z.ZodObject<{
|
|
4206
|
+
id: z.ZodString;
|
|
4207
|
+
label: z.ZodString;
|
|
4208
|
+
effect: z.ZodOptional<z.ZodObject<{
|
|
4209
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
4210
|
+
effects: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4211
|
+
kind: z.ZodLiteral<"remove-env">;
|
|
4212
|
+
scope: z.ZodLiteral<"hosting-prod">;
|
|
4213
|
+
key: z.ZodString;
|
|
4214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4215
|
+
kind: z.ZodLiteral<"attach-design-system">;
|
|
4216
|
+
designSystemId: z.ZodString;
|
|
4217
|
+
}, z.core.$strip>], "kind">>>;
|
|
4218
|
+
}, z.core.$strip>>;
|
|
4219
|
+
}, z.core.$strip>>;
|
|
4220
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
4221
|
+
}, z.core.$strip>>;
|
|
4222
|
+
initialPromptId: z.ZodString;
|
|
4223
|
+
answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4224
|
+
questionId: z.ZodString;
|
|
4225
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
4226
|
+
designSystemId: z.ZodOptional<z.ZodString>;
|
|
4227
|
+
skipped: z.ZodBoolean;
|
|
4228
|
+
delegated: z.ZodBoolean;
|
|
4229
|
+
resolvedFrom: z.ZodEnum<{
|
|
4230
|
+
llm: "llm";
|
|
4231
|
+
user: "user";
|
|
4232
|
+
}>;
|
|
4233
|
+
llmOptionId: z.ZodOptional<z.ZodString>;
|
|
4234
|
+
guessOptionId: z.ZodOptional<z.ZodString>;
|
|
4235
|
+
}, z.core.$strip>>>;
|
|
4236
|
+
assembledAt: z.ZodOptional<z.ZodString>;
|
|
4237
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4238
|
+
}, z.core.$strip>>>;
|
|
3975
4239
|
}, z.core.$strip>;
|
|
3976
4240
|
hosting: z.ZodOptional<z.ZodObject<{
|
|
3977
4241
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4077,36 +4341,13 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4077
4341
|
containerized: "containerized";
|
|
4078
4342
|
}>>>;
|
|
4079
4343
|
devServerPort: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4080
|
-
devServerUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4081
|
-
refreshPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4082
4344
|
installCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4083
4345
|
installNpmrc: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
4084
|
-
validateCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4085
|
-
proxyOrigin: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4086
|
-
proxyDefaultOrigin: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4087
|
-
defaultAutoPush: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
4088
|
-
"ff-push": "ff-push";
|
|
4089
|
-
"force-push": "force-push";
|
|
4090
|
-
"merge-push": "merge-push";
|
|
4091
|
-
none: "none";
|
|
4092
|
-
"safe-push": "safe-push";
|
|
4093
|
-
}>>>;
|
|
4094
4346
|
gitBranchNamingStrategy: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
4095
4347
|
"ai-session": "ai-session";
|
|
4096
4348
|
"branch-name": "branch-name";
|
|
4097
4349
|
custom: "custom";
|
|
4098
4350
|
}>>>;
|
|
4099
|
-
setupDependencies: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4100
|
-
key: z.ZodString;
|
|
4101
|
-
type: z.ZodLiteral<"mise">;
|
|
4102
|
-
tool: z.ZodString;
|
|
4103
|
-
version: z.ZodOptional<z.ZodString>;
|
|
4104
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4105
|
-
key: z.ZodString;
|
|
4106
|
-
type: z.ZodLiteral<"script">;
|
|
4107
|
-
name: z.ZodString;
|
|
4108
|
-
script: z.ZodString;
|
|
4109
|
-
}, z.core.$strip>], "type">>>>;
|
|
4110
4351
|
hostRequirements: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4111
4352
|
name: z.ZodString;
|
|
4112
4353
|
checkScript: z.ZodString;
|
|
@@ -4169,7 +4410,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4169
4410
|
mainBranchName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4170
4411
|
minMachinesRunning: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4171
4412
|
volumeSize: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<5>, z.ZodLiteral<10>, z.ZodLiteral<12>, z.ZodLiteral<15>, z.ZodLiteral<20>, z.ZodLiteral<25>, z.ZodLiteral<30>, z.ZodLiteral<50>]>>>;
|
|
4172
|
-
includePath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4173
4413
|
includePatterns: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4174
4414
|
errorIgnorePatterns: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4175
4415
|
environmentVariables: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -4337,7 +4577,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4337
4577
|
"draft-prs": "draft-prs";
|
|
4338
4578
|
prs: "prs";
|
|
4339
4579
|
}>>>;
|
|
4340
|
-
autoCloseBranchOnMerge: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4341
4580
|
enableMergePR: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4342
4581
|
minRequiredApprovals: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4343
4582
|
requireApprovalBeforePR: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -4354,7 +4593,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4354
4593
|
designSystems: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4355
4594
|
designTokenStrictMode: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4356
4595
|
designModeSelector: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4357
|
-
useNI: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4358
4596
|
folders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4359
4597
|
name: z.ZodString;
|
|
4360
4598
|
remoteUrl: z.ZodString;
|
|
@@ -4367,8 +4605,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4367
4605
|
}, z.core.$strip>>>>;
|
|
4368
4606
|
agentsMD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4369
4607
|
initializationCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4370
|
-
repoSubpath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4371
|
-
recommendedRoot: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4372
4608
|
https: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4373
4609
|
localHttpsDomain: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4374
4610
|
browserAutomation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -4390,7 +4626,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4390
4626
|
}, z.core.$strip>>>;
|
|
4391
4627
|
enableSnapshots: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4392
4628
|
postMergeMemories: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4393
|
-
commitInstructions: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4394
4629
|
maxAgentCompletions: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4395
4630
|
enableAgentMode: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4396
4631
|
allowPreviewAutoSubmit: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -4402,7 +4637,6 @@ export declare const ProjectTemplateOverridesSchema: z.ZodObject<{
|
|
|
4402
4637
|
timestamp: z.ZodNumber;
|
|
4403
4638
|
starred: z.ZodBoolean;
|
|
4404
4639
|
}, z.core.$strip>>>>;
|
|
4405
|
-
skipCommandSecurity: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4406
4640
|
httpsServerKeyPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4407
4641
|
httpsServerCertPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4408
4642
|
httpsServerCaPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -4484,36 +4718,13 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4484
4718
|
containerized: "containerized";
|
|
4485
4719
|
}>>>;
|
|
4486
4720
|
devServerPort: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4487
|
-
devServerUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4488
|
-
refreshPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4489
4721
|
installCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4490
4722
|
installNpmrc: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
4491
|
-
validateCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4492
|
-
proxyOrigin: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4493
|
-
proxyDefaultOrigin: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4494
|
-
defaultAutoPush: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
4495
|
-
"ff-push": "ff-push";
|
|
4496
|
-
"force-push": "force-push";
|
|
4497
|
-
"merge-push": "merge-push";
|
|
4498
|
-
none: "none";
|
|
4499
|
-
"safe-push": "safe-push";
|
|
4500
|
-
}>>>;
|
|
4501
4723
|
gitBranchNamingStrategy: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
4502
4724
|
"ai-session": "ai-session";
|
|
4503
4725
|
"branch-name": "branch-name";
|
|
4504
4726
|
custom: "custom";
|
|
4505
4727
|
}>>>;
|
|
4506
|
-
setupDependencies: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4507
|
-
key: z.ZodString;
|
|
4508
|
-
type: z.ZodLiteral<"mise">;
|
|
4509
|
-
tool: z.ZodString;
|
|
4510
|
-
version: z.ZodOptional<z.ZodString>;
|
|
4511
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
4512
|
-
key: z.ZodString;
|
|
4513
|
-
type: z.ZodLiteral<"script">;
|
|
4514
|
-
name: z.ZodString;
|
|
4515
|
-
script: z.ZodString;
|
|
4516
|
-
}, z.core.$strip>], "type">>>>;
|
|
4517
4728
|
hostRequirements: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4518
4729
|
name: z.ZodString;
|
|
4519
4730
|
checkScript: z.ZodString;
|
|
@@ -4576,7 +4787,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4576
4787
|
mainBranchName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4577
4788
|
minMachinesRunning: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4578
4789
|
volumeSize: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<5>, z.ZodLiteral<10>, z.ZodLiteral<12>, z.ZodLiteral<15>, z.ZodLiteral<20>, z.ZodLiteral<25>, z.ZodLiteral<30>, z.ZodLiteral<50>]>>>;
|
|
4579
|
-
includePath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4580
4790
|
includePatterns: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4581
4791
|
errorIgnorePatterns: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4582
4792
|
environmentVariables: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -4744,7 +4954,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4744
4954
|
"draft-prs": "draft-prs";
|
|
4745
4955
|
prs: "prs";
|
|
4746
4956
|
}>>>;
|
|
4747
|
-
autoCloseBranchOnMerge: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4748
4957
|
enableMergePR: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4749
4958
|
minRequiredApprovals: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4750
4959
|
requireApprovalBeforePR: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -4761,7 +4970,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4761
4970
|
designSystems: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
4762
4971
|
designTokenStrictMode: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4763
4972
|
designModeSelector: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4764
|
-
useNI: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4765
4973
|
folders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4766
4974
|
name: z.ZodString;
|
|
4767
4975
|
remoteUrl: z.ZodString;
|
|
@@ -4774,8 +4982,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4774
4982
|
}, z.core.$strip>>>>;
|
|
4775
4983
|
agentsMD: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4776
4984
|
initializationCommand: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4777
|
-
repoSubpath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4778
|
-
recommendedRoot: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4779
4985
|
https: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4780
4986
|
localHttpsDomain: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4781
4987
|
browserAutomation: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -4797,7 +5003,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4797
5003
|
}, z.core.$strip>>>;
|
|
4798
5004
|
enableSnapshots: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4799
5005
|
postMergeMemories: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4800
|
-
commitInstructions: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4801
5006
|
maxAgentCompletions: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
4802
5007
|
enableAgentMode: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4803
5008
|
allowPreviewAutoSubmit: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -4809,7 +5014,6 @@ export declare const CreateProjectTemplateFromProjectOptionsSchema: z.ZodObject<
|
|
|
4809
5014
|
timestamp: z.ZodNumber;
|
|
4810
5015
|
starred: z.ZodBoolean;
|
|
4811
5016
|
}, z.core.$strip>>>>;
|
|
4812
|
-
skipCommandSecurity: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
4813
5017
|
httpsServerKeyPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4814
5018
|
httpsServerCertPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
4815
5019
|
httpsServerCaPath: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
package/src/projects.js
CHANGED
|
@@ -271,6 +271,55 @@ export const ListBranchesOptionsSchema = z.object({
|
|
|
271
271
|
description: "Superuser-only: list branches for a different owner/org.",
|
|
272
272
|
}),
|
|
273
273
|
});
|
|
274
|
+
export const ShapeEffectSchema = z.discriminatedUnion("kind", [
|
|
275
|
+
z.object({
|
|
276
|
+
kind: z.literal("remove-env"),
|
|
277
|
+
scope: z.literal("hosting-prod"),
|
|
278
|
+
key: z.string(),
|
|
279
|
+
}),
|
|
280
|
+
z.object({
|
|
281
|
+
kind: z.literal("attach-design-system"),
|
|
282
|
+
designSystemId: z.string(),
|
|
283
|
+
}),
|
|
284
|
+
]);
|
|
285
|
+
export const ShapeOptionEffectSchema = z.object({
|
|
286
|
+
instruction: z.string().optional(),
|
|
287
|
+
effects: z.array(ShapeEffectSchema).optional(),
|
|
288
|
+
});
|
|
289
|
+
export const ShapeOptionSchema = z.object({
|
|
290
|
+
id: z.string(),
|
|
291
|
+
label: z.string(),
|
|
292
|
+
effect: ShapeOptionEffectSchema.optional(),
|
|
293
|
+
});
|
|
294
|
+
export const ShapeQuestionSchema = z.object({
|
|
295
|
+
id: z.string(),
|
|
296
|
+
question: z.string(),
|
|
297
|
+
kind: z.enum(["select", "figma-upload"]),
|
|
298
|
+
options: z.array(ShapeOptionSchema),
|
|
299
|
+
guessOptionId: z.string().optional(),
|
|
300
|
+
});
|
|
301
|
+
export const ShapeAnswerSchema = z.object({
|
|
302
|
+
questionId: z.string(),
|
|
303
|
+
optionId: z.string().optional(),
|
|
304
|
+
designSystemId: z.string().optional(),
|
|
305
|
+
skipped: z.boolean(),
|
|
306
|
+
delegated: z.boolean(),
|
|
307
|
+
resolvedFrom: z.enum(["user", "llm"]),
|
|
308
|
+
llmOptionId: z.string().optional(),
|
|
309
|
+
guessOptionId: z.string().optional(),
|
|
310
|
+
});
|
|
311
|
+
export const ShapeSessionSchema = z.object({
|
|
312
|
+
questionnaireId: z.string(),
|
|
313
|
+
catalogVersion: z.string().regex(/^\d{4}-\d{2}-\d{2}\.\d+$/),
|
|
314
|
+
source: z.enum(["static", "agent"]),
|
|
315
|
+
status: z.enum(["assembling", "pending", "resolved"]),
|
|
316
|
+
selection: z.enum(["llm", "fallback"]),
|
|
317
|
+
questions: z.array(ShapeQuestionSchema),
|
|
318
|
+
initialPromptId: z.string(),
|
|
319
|
+
answers: z.array(ShapeAnswerSchema).optional(),
|
|
320
|
+
assembledAt: z.string().optional(),
|
|
321
|
+
resolvedAt: z.string().optional(),
|
|
322
|
+
});
|
|
274
323
|
export const ProjectRolePermissionsSchema = z
|
|
275
324
|
.object({
|
|
276
325
|
view: z.boolean().optional(),
|
|
@@ -758,6 +807,9 @@ export const ProjectSettingsSchema = z
|
|
|
758
807
|
})
|
|
759
808
|
.optional()
|
|
760
809
|
.meta({ description: "Password-protect the preview URL." }),
|
|
810
|
+
shapeSession: ShapeSessionSchema.optional().meta({
|
|
811
|
+
description: "@internal Guided-onboarding questionnaire issued for this project.",
|
|
812
|
+
}),
|
|
761
813
|
})
|
|
762
814
|
.meta({ title: "ProjectSettings" });
|
|
763
815
|
/**
|
|
@@ -781,6 +833,7 @@ const INTERNAL_PROJECT_SETTINGS_MASK = {
|
|
|
781
833
|
commitInstructions: true,
|
|
782
834
|
skipCommandSecurity: true,
|
|
783
835
|
autoCloseBranchOnMerge: true,
|
|
836
|
+
shapeSession: true,
|
|
784
837
|
};
|
|
785
838
|
/**
|
|
786
839
|
* Runtime schema for the client-writable subset of {@link Project.settings},
|
|
@@ -885,6 +938,13 @@ export const CreateProjectRequestSchema = z.object({
|
|
|
885
938
|
/** Design system ids to seed into project settings at creation. */
|
|
886
939
|
designSystems: z.array(z.string()).optional(),
|
|
887
940
|
});
|
|
941
|
+
export function resolveBranchIsPublic(isPublic, defaultBranchType) {
|
|
942
|
+
if (isPublic !== undefined)
|
|
943
|
+
return isPublic;
|
|
944
|
+
if (defaultBranchType === undefined)
|
|
945
|
+
return true;
|
|
946
|
+
return defaultBranchType === "shared";
|
|
947
|
+
}
|
|
888
948
|
export const MEMORY_PICKED_FIELDS = [
|
|
889
949
|
"id",
|
|
890
950
|
"updatedAt",
|
|
@@ -1897,6 +1957,24 @@ export const CloneProjectOptionsSchema = z.object({
|
|
|
1897
1957
|
description: "Whether to provision on cloud-v2 (Kubernetes). Defaults to false.",
|
|
1898
1958
|
}),
|
|
1899
1959
|
});
|
|
1960
|
+
export const GetPreferredProjectForRepoOptionsSchema = z.object({
|
|
1961
|
+
repoUrl: z.string().min(1).meta({
|
|
1962
|
+
description: "Full clone URL of the repository to look up.",
|
|
1963
|
+
}),
|
|
1964
|
+
repoFullName: z.string().optional().meta({
|
|
1965
|
+
description: 'Repo in "owner/repo" form; derived from `repoUrl` when omitted.',
|
|
1966
|
+
}),
|
|
1967
|
+
});
|
|
1968
|
+
/** Identity only — this powers a "currently preferred: X" label, not a project read. */
|
|
1969
|
+
export const GetPreferredProjectForRepoResultSchema = z.object({
|
|
1970
|
+
status: z.literal("success"),
|
|
1971
|
+
project: z
|
|
1972
|
+
.object({
|
|
1973
|
+
id: z.string(),
|
|
1974
|
+
name: z.string(),
|
|
1975
|
+
})
|
|
1976
|
+
.nullable(),
|
|
1977
|
+
});
|
|
1900
1978
|
/**
|
|
1901
1979
|
* Write-time contract for a single hosted-site access rule. Mirrors the stored
|
|
1902
1980
|
* {@link SiteAccessRule} in `organization.ts`, except a password rule carries a
|
|
@@ -2039,6 +2117,7 @@ export const ProjectTemplateOverridesSchema = z.object({
|
|
|
2039
2117
|
sourceProjectId: true,
|
|
2040
2118
|
sourceBranchName: true,
|
|
2041
2119
|
}).partial().shape,
|
|
2120
|
+
settings: ProjectSettingsExternalSchema.partial().optional(),
|
|
2042
2121
|
hosting: ProjectHostingExternalSchema.optional(),
|
|
2043
2122
|
});
|
|
2044
2123
|
export const CreateProjectTemplateFromProjectOptionsSchema = z.object({
|
package/src/projects.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { AGENT_NATIVE_STARTER_REPO, getAgentNativeRootPackageJsonWriteError, getManagedDatabasePackageJsonError, matchesAgentNativeStarter, ProjectHostingExternalSchema, ProjectHostingSchema, } from "./projects";
|
|
2
|
+
import { AGENT_NATIVE_STARTER_REPO, getAgentNativeRootPackageJsonWriteError, getManagedDatabasePackageJsonError, matchesAgentNativeStarter, ProjectHostingExternalSchema, ProjectHostingSchema, ProjectSettingsExternalSchema, ProjectSettingsSchema, ProjectTemplateOverridesSchema, ShapeSessionSchema, } from "./projects";
|
|
3
3
|
describe("project hosting schemas", () => {
|
|
4
4
|
it("accepts the canonical published branch route", () => {
|
|
5
5
|
expect(ProjectHostingSchema.parse({ publishedBranchId: "branch-live" })).toEqual({ publishedBranchId: "branch-live" });
|
|
@@ -11,6 +11,55 @@ describe("project hosting schemas", () => {
|
|
|
11
11
|
})).toEqual({ enabled: true });
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
|
+
describe("guided onboarding project settings", () => {
|
|
15
|
+
const shapeSession = {
|
|
16
|
+
questionnaireId: "questionnaire-1",
|
|
17
|
+
catalogVersion: "2026-09-03.1",
|
|
18
|
+
source: "static",
|
|
19
|
+
status: "pending",
|
|
20
|
+
selection: "llm",
|
|
21
|
+
questions: [
|
|
22
|
+
{
|
|
23
|
+
id: "authentication",
|
|
24
|
+
question: "Will users need to login to use your app?",
|
|
25
|
+
kind: "select",
|
|
26
|
+
options: [
|
|
27
|
+
{
|
|
28
|
+
id: "required",
|
|
29
|
+
label: "Yes",
|
|
30
|
+
effect: {
|
|
31
|
+
instruction: "Require users to sign in.",
|
|
32
|
+
effects: [
|
|
33
|
+
{
|
|
34
|
+
kind: "remove-env",
|
|
35
|
+
scope: "hosting-prod",
|
|
36
|
+
key: "AUTH_DISABLED",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
initialPromptId: "prompt-1",
|
|
45
|
+
};
|
|
46
|
+
it("parses a snapshotted questionnaire session", () => {
|
|
47
|
+
expect(ShapeSessionSchema.parse(shapeSession)).toEqual(shapeSession);
|
|
48
|
+
expect(ProjectSettingsSchema.parse({ shapeSession })).toEqual({
|
|
49
|
+
shapeSession,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
it("requires a dated catalog version", () => {
|
|
53
|
+
expect(() => ShapeSessionSchema.parse({
|
|
54
|
+
...shapeSession,
|
|
55
|
+
catalogVersion: "v1",
|
|
56
|
+
})).toThrow();
|
|
57
|
+
});
|
|
58
|
+
it("does not allow clients to write a shape session", () => {
|
|
59
|
+
expect(ProjectSettingsExternalSchema.parse({ shapeSession })).toEqual({});
|
|
60
|
+
expect(ProjectTemplateOverridesSchema.parse({ settings: { shapeSession } })).toEqual({ settings: {} });
|
|
61
|
+
});
|
|
62
|
+
});
|
|
14
63
|
describe("matchesAgentNativeStarter", () => {
|
|
15
64
|
it("matches when repoName is the starter", () => {
|
|
16
65
|
expect(matchesAgentNativeStarter({ repoName: AGENT_NATIVE_STARTER_REPO })).toBe(true);
|
package/src/publish-agent.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GenerateCompletionStep } from "./codegen.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
export declare const PublishAgentSessionCursorSchema: z.ZodObject<{
|
|
3
4
|
updatedAt: z.ZodNumber;
|
|
@@ -23,52 +24,6 @@ export declare const PublishAgentSessionUpdateRequestSchema: z.ZodObject<{
|
|
|
23
24
|
archived: z.ZodOptional<z.ZodBoolean>;
|
|
24
25
|
}, z.core.$strip>;
|
|
25
26
|
export type PublishAgentSessionUpdateRequest = z.infer<typeof PublishAgentSessionUpdateRequestSchema>;
|
|
26
|
-
export declare const PublishAgentAttachmentReferenceSchema: z.ZodObject<{
|
|
27
|
-
id: z.ZodOptional<z.ZodString>;
|
|
28
|
-
type: z.ZodString;
|
|
29
|
-
name: z.ZodOptional<z.ZodString>;
|
|
30
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
export type PublishAgentAttachmentReference = z.infer<typeof PublishAgentAttachmentReferenceSchema>;
|
|
33
|
-
export declare const PublishAgentToolReferenceSchema: z.ZodObject<{
|
|
34
|
-
id: z.ZodOptional<z.ZodString>;
|
|
35
|
-
name: z.ZodString;
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
completed: "completed";
|
|
38
|
-
requested: "requested";
|
|
39
|
-
}>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
export type PublishAgentToolReference = z.infer<typeof PublishAgentToolReferenceSchema>;
|
|
42
|
-
export declare const PublishAgentSessionMessageSchema: z.ZodObject<{
|
|
43
|
-
id: z.ZodString;
|
|
44
|
-
role: z.ZodEnum<{
|
|
45
|
-
assistant: "assistant";
|
|
46
|
-
user: "user";
|
|
47
|
-
}>;
|
|
48
|
-
senderId: z.ZodOptional<z.ZodString>;
|
|
49
|
-
content: z.ZodOptional<z.ZodString>;
|
|
50
|
-
createdAt: z.ZodNumber;
|
|
51
|
-
status: z.ZodEnum<{
|
|
52
|
-
completed: "completed";
|
|
53
|
-
error: "error";
|
|
54
|
-
running: "running";
|
|
55
|
-
}>;
|
|
56
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
-
id: z.ZodOptional<z.ZodString>;
|
|
58
|
-
type: z.ZodString;
|
|
59
|
-
name: z.ZodOptional<z.ZodString>;
|
|
60
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
}, z.core.$strip>>>;
|
|
62
|
-
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
-
id: z.ZodOptional<z.ZodString>;
|
|
64
|
-
name: z.ZodString;
|
|
65
|
-
status: z.ZodEnum<{
|
|
66
|
-
completed: "completed";
|
|
67
|
-
requested: "requested";
|
|
68
|
-
}>;
|
|
69
|
-
}, z.core.$strip>>>;
|
|
70
|
-
}, z.core.$strip>;
|
|
71
|
-
export type PublishAgentSessionMessage = z.infer<typeof PublishAgentSessionMessageSchema>;
|
|
72
27
|
export declare const PublishAgentSessionSummarySchema: z.ZodObject<{
|
|
73
28
|
id: z.ZodString;
|
|
74
29
|
spaceId: z.ZodString;
|
|
@@ -114,36 +69,8 @@ export declare const PublishAgentSessionDetailResponseSchema: z.ZodObject<{
|
|
|
114
69
|
totalCompletions: z.ZodNumber;
|
|
115
70
|
numUserMessages: z.ZodNumber;
|
|
116
71
|
}, z.core.$strip>;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
assistant: "assistant";
|
|
121
|
-
user: "user";
|
|
122
|
-
}>;
|
|
123
|
-
senderId: z.ZodOptional<z.ZodString>;
|
|
124
|
-
content: z.ZodOptional<z.ZodString>;
|
|
125
|
-
createdAt: z.ZodNumber;
|
|
126
|
-
status: z.ZodEnum<{
|
|
127
|
-
completed: "completed";
|
|
128
|
-
error: "error";
|
|
129
|
-
running: "running";
|
|
130
|
-
}>;
|
|
131
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
-
id: z.ZodOptional<z.ZodString>;
|
|
133
|
-
type: z.ZodString;
|
|
134
|
-
name: z.ZodOptional<z.ZodString>;
|
|
135
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
136
|
-
}, z.core.$strip>>>;
|
|
137
|
-
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
138
|
-
id: z.ZodOptional<z.ZodString>;
|
|
139
|
-
name: z.ZodString;
|
|
140
|
-
status: z.ZodEnum<{
|
|
141
|
-
completed: "completed";
|
|
142
|
-
requested: "requested";
|
|
143
|
-
}>;
|
|
144
|
-
}, z.core.$strip>>>;
|
|
145
|
-
}, z.core.$strip>>;
|
|
146
|
-
messagesCanLoadMore: z.ZodBoolean;
|
|
147
|
-
messagesNextCursor: z.ZodNullable<z.ZodString>;
|
|
72
|
+
steps: z.ZodArray<z.ZodCustom<GenerateCompletionStep, GenerateCompletionStep>>;
|
|
73
|
+
canLoadMore: z.ZodBoolean;
|
|
74
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
148
75
|
}, z.core.$strip>;
|
|
149
76
|
export type PublishAgentSessionDetailResponse = z.infer<typeof PublishAgentSessionDetailResponseSchema>;
|
package/src/publish-agent.js
CHANGED
|
@@ -30,33 +30,6 @@ export const PublishAgentSessionUpdateRequestSchema = z
|
|
|
30
30
|
message: "Provide title, archived, or both.",
|
|
31
31
|
})
|
|
32
32
|
.meta({ title: "PublishAgentSessionUpdateRequest" });
|
|
33
|
-
export const PublishAgentAttachmentReferenceSchema = z
|
|
34
|
-
.object({
|
|
35
|
-
id: z.string().optional(),
|
|
36
|
-
type: z.string(),
|
|
37
|
-
name: z.string().optional(),
|
|
38
|
-
size: z.number().optional(),
|
|
39
|
-
})
|
|
40
|
-
.meta({ title: "PublishAgentAttachmentReference" });
|
|
41
|
-
export const PublishAgentToolReferenceSchema = z
|
|
42
|
-
.object({
|
|
43
|
-
id: z.string().optional(),
|
|
44
|
-
name: z.string(),
|
|
45
|
-
status: z.enum(["requested", "completed"]),
|
|
46
|
-
})
|
|
47
|
-
.meta({ title: "PublishAgentToolReference" });
|
|
48
|
-
export const PublishAgentSessionMessageSchema = z
|
|
49
|
-
.object({
|
|
50
|
-
id: z.string(),
|
|
51
|
-
role: z.enum(["user", "assistant"]),
|
|
52
|
-
senderId: z.string().optional(),
|
|
53
|
-
content: z.string().optional(),
|
|
54
|
-
createdAt: z.number(),
|
|
55
|
-
status: z.enum(["completed", "running", "error"]),
|
|
56
|
-
attachments: z.array(PublishAgentAttachmentReferenceSchema).optional(),
|
|
57
|
-
tools: z.array(PublishAgentToolReferenceSchema).optional(),
|
|
58
|
-
})
|
|
59
|
-
.meta({ title: "PublishAgentSessionMessage" });
|
|
60
33
|
export const PublishAgentSessionSummarySchema = z
|
|
61
34
|
.object({
|
|
62
35
|
id: z.string(),
|
|
@@ -81,8 +54,8 @@ export const PublishAgentSessionListResponseSchema = z
|
|
|
81
54
|
export const PublishAgentSessionDetailResponseSchema = z
|
|
82
55
|
.object({
|
|
83
56
|
session: PublishAgentSessionSummarySchema,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
steps: z.array(z.custom()),
|
|
58
|
+
canLoadMore: z.boolean(),
|
|
59
|
+
nextCursor: z.string().nullable(),
|
|
87
60
|
})
|
|
88
61
|
.meta({ title: "PublishAgentSessionDetailResponse" });
|