rivet-design 0.12.1 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +14 -34
  2. package/README.npm.md +14 -34
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +0 -12
  5. package/dist/index.js.map +1 -1
  6. package/dist/mcp/agent-variants/areNaSourceContext.d.ts +0 -1
  7. package/dist/mcp/agent-variants/areNaSourceContext.d.ts.map +1 -1
  8. package/dist/mcp/agent-variants/areNaSourceContext.js +3 -12
  9. package/dist/mcp/agent-variants/areNaSourceContext.js.map +1 -1
  10. package/dist/mcp/agent-variants/contracts.d.ts +561 -101
  11. package/dist/mcp/agent-variants/contracts.d.ts.map +1 -1
  12. package/dist/mcp/agent-variants/contracts.js +51 -24
  13. package/dist/mcp/agent-variants/contracts.js.map +1 -1
  14. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts +1 -1
  15. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts.map +1 -1
  16. package/dist/mcp/agent-variants/createZeroToOneTool.js +9 -13
  17. package/dist/mcp/agent-variants/createZeroToOneTool.js.map +1 -1
  18. package/dist/mcp/agent-variants/pinterestSourceContext.d.ts +0 -1
  19. package/dist/mcp/agent-variants/pinterestSourceContext.d.ts.map +1 -1
  20. package/dist/mcp/agent-variants/pinterestSourceContext.js +3 -18
  21. package/dist/mcp/agent-variants/pinterestSourceContext.js.map +1 -1
  22. package/dist/mcp/agent-variants/tools.d.ts +16 -2
  23. package/dist/mcp/agent-variants/tools.d.ts.map +1 -1
  24. package/dist/mcp/agent-variants/tools.js +149 -247
  25. package/dist/mcp/agent-variants/tools.js.map +1 -1
  26. package/dist/mcp/auth/tools.d.ts.map +1 -1
  27. package/dist/mcp/auth/tools.js +3 -8
  28. package/dist/mcp/auth/tools.js.map +1 -1
  29. package/dist/mcp/instructions.d.ts +11 -2
  30. package/dist/mcp/instructions.d.ts.map +1 -1
  31. package/dist/mcp/instructions.js +20 -5
  32. package/dist/mcp/instructions.js.map +1 -1
  33. package/dist/mcp/integrations/tools.d.ts +5 -1
  34. package/dist/mcp/integrations/tools.d.ts.map +1 -1
  35. package/dist/mcp/integrations/tools.js +59 -30
  36. package/dist/mcp/integrations/tools.js.map +1 -1
  37. package/dist/mcp/server.d.ts.map +1 -1
  38. package/dist/mcp/server.js +46 -21
  39. package/dist/mcp/server.js.map +1 -1
  40. package/dist/mcp/toolAnalytics.d.ts +11 -0
  41. package/dist/mcp/toolAnalytics.d.ts.map +1 -1
  42. package/dist/mcp/toolAnalytics.js +8 -0
  43. package/dist/mcp/toolAnalytics.js.map +1 -1
  44. package/dist/routes/agentVariants.d.ts.map +1 -1
  45. package/dist/routes/agentVariants.js +17 -9
  46. package/dist/routes/agentVariants.js.map +1 -1
  47. package/dist/routes/mcp.d.ts.map +1 -1
  48. package/dist/routes/mcp.js +18 -11
  49. package/dist/routes/mcp.js.map +1 -1
  50. package/dist/services/ConfigManager.d.ts +13 -0
  51. package/dist/services/ConfigManager.d.ts.map +1 -1
  52. package/dist/services/ConfigManager.js +24 -0
  53. package/dist/services/ConfigManager.js.map +1 -1
  54. package/dist/services/IntegrationsClient.d.ts +2 -3
  55. package/dist/services/IntegrationsClient.d.ts.map +1 -1
  56. package/dist/services/IntegrationsClient.js.map +1 -1
  57. package/dist/services/TelemetryService.d.ts +4 -0
  58. package/dist/services/TelemetryService.d.ts.map +1 -1
  59. package/dist/services/TelemetryService.js +19 -0
  60. package/dist/services/TelemetryService.js.map +1 -1
  61. package/dist/services/createAgentVariantsOrchestrator.d.ts +16 -0
  62. package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
  63. package/dist/services/createAgentVariantsOrchestrator.js +60 -2
  64. package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
  65. package/dist/utils/skills/claude-skill.d.ts +1 -1
  66. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  67. package/dist/utils/skills/claude-skill.js +16 -6
  68. package/dist/utils/skills/claude-skill.js.map +1 -1
  69. package/dist/utils/skills/cursor-rules.d.ts +1 -1
  70. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  71. package/dist/utils/skills/cursor-rules.js +16 -6
  72. package/dist/utils/skills/cursor-rules.js.map +1 -1
  73. package/dist/utils/skills/describe-motion-protocol.d.ts +1 -1
  74. package/dist/utils/skills/describe-motion-protocol.d.ts.map +1 -1
  75. package/dist/utils/skills/describe-motion-protocol.js +1 -1
  76. package/dist/utils/skills/shared-variants-protocol.d.ts +20 -2
  77. package/dist/utils/skills/shared-variants-protocol.d.ts.map +1 -1
  78. package/dist/utils/skills/shared-variants-protocol.js +91 -19
  79. package/dist/utils/skills/shared-variants-protocol.js.map +1 -1
  80. package/package.json +16 -38
  81. package/src/ui/dist/assets/main-CLAqO1bm.js +656 -0
  82. package/src/ui/dist/assets/main-Ke-Q9lWa.css +1 -0
  83. package/src/ui/dist/index.html +2 -2
  84. package/src/ui/dist/assets/main-DH8bmUcZ.css +0 -1
  85. package/src/ui/dist/assets/main-Utev2DA9.js +0 -655
@@ -8866,97 +8866,555 @@ export type ReportVariantBriefsInput = {
8866
8866
  briefs: Brief[];
8867
8867
  bindings?: VariantContextBinding[];
8868
8868
  };
8869
- export declare const approveVariantBriefsInput: {
8869
+ export declare const commitVariantInput: {
8870
8870
  sessionId: z.ZodString;
8871
- briefIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8871
+ variantId: z.ZodString;
8872
8872
  confirmedByUser: z.ZodOptional<z.ZodBoolean>;
8873
8873
  bypassRequestedByUser: z.ZodOptional<z.ZodBoolean>;
8874
8874
  bypassReason: z.ZodOptional<z.ZodString>;
8875
- selections: z.ZodOptional<z.ZodArray<z.ZodObject<{
8875
+ };
8876
+ export type CommitVariantInput = {
8877
+ sessionId: string;
8878
+ variantId: string;
8879
+ confirmedByUser?: boolean;
8880
+ bypassRequestedByUser?: boolean;
8881
+ bypassReason?: string;
8882
+ };
8883
+ export type CommitVariantOutput = {
8884
+ stage: Stage;
8885
+ enqueued: boolean;
8886
+ duplicate: boolean;
8887
+ changedFilesCount: number;
8888
+ payloadKind?: 'diff' | 'diff-applied' | 'project-created';
8889
+ destinationPath?: string;
8890
+ } | {
8891
+ stage: 'failed';
8892
+ errorCode: ErrorCode;
8893
+ message: string;
8894
+ };
8895
+ export declare const continueVariantsAction: z.ZodOptional<z.ZodEnum<["check", "wait", "request_work", "refine_variant"]>>;
8896
+ export declare const continueVariantsInput: {
8897
+ sessionId: z.ZodString;
8898
+ clientRequestId: z.ZodOptional<z.ZodString>;
8899
+ action: z.ZodOptional<z.ZodEnum<["check", "wait", "request_work", "refine_variant"]>>;
8900
+ requestedLeaseCount: z.ZodOptional<z.ZodNumber>;
8901
+ workItemIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8902
+ variantId: z.ZodOptional<z.ZodString>;
8903
+ instruction: z.ZodOptional<z.ZodString>;
8904
+ };
8905
+ export type ContinueVariantsInput = {
8906
+ sessionId: string;
8907
+ clientRequestId?: string;
8908
+ action?: 'check' | 'wait' | 'request_work' | 'refine_variant';
8909
+ requestedLeaseCount?: number;
8910
+ workItemIds?: string[];
8911
+ variantId?: string;
8912
+ instruction?: string;
8913
+ };
8914
+ export declare const reportVariantCompleteStatus: z.ZodEnum<["running", "succeeded", "failed", "cancelled"]>;
8915
+ export declare const reportVariantCompleteInput: {
8916
+ sessionId: z.ZodString;
8917
+ workItemId: z.ZodString;
8918
+ leaseId: z.ZodString;
8919
+ attempt: z.ZodNumber;
8920
+ status: z.ZodEnum<["running", "succeeded", "failed", "cancelled"]>;
8921
+ output: z.ZodOptional<z.ZodUnknown>;
8922
+ error: z.ZodOptional<z.ZodObject<{
8923
+ code: z.ZodString;
8924
+ message: z.ZodString;
8925
+ }, "strip", z.ZodTypeAny, {
8926
+ code: string;
8927
+ message: string;
8928
+ }, {
8929
+ code: string;
8930
+ message: string;
8931
+ }>>;
8932
+ terminalChunk: z.ZodOptional<z.ZodString>;
8933
+ tokensIn: z.ZodOptional<z.ZodNumber>;
8934
+ tokensOut: z.ZodOptional<z.ZodNumber>;
8935
+ model: z.ZodOptional<z.ZodString>;
8936
+ title: z.ZodOptional<z.ZodString>;
8937
+ description: z.ZodOptional<z.ZodString>;
8938
+ };
8939
+ export type ReportVariantCompleteInput = {
8940
+ sessionId: string;
8941
+ workItemId: string;
8942
+ leaseId: string;
8943
+ attempt: number;
8944
+ status: 'running' | 'succeeded' | 'failed' | 'cancelled';
8945
+ output?: unknown;
8946
+ error?: {
8947
+ code: string;
8948
+ message: string;
8949
+ };
8950
+ terminalChunk?: string;
8951
+ tokensIn?: number;
8952
+ tokensOut?: number;
8953
+ model?: string;
8954
+ title?: string;
8955
+ description?: string;
8956
+ };
8957
+ /**
8958
+ * Unified hand-back tool that replaces `report_variant_briefs`,
8959
+ * `report_source_plan`, and `report_variant_complete`. The three share the
8960
+ * lease header (sessionId/workItemId/attempt/leaseId) and differ only by
8961
+ * payload, so they collapse behind a `kind` discriminator — the same pattern
8962
+ * `continue_variants(action=...)` uses. Because `mcp.tool()` takes a flat
8963
+ * ZodRawShape (not a top-level discriminated union), all payload fields are
8964
+ * optional here and the handler validates the per-kind requirements at runtime
8965
+ * (e.g. `kind:'status'` requires `leaseId` + `status`).
8966
+ */
8967
+ export declare const reportWorkItemInput: {
8968
+ kind: z.ZodEnum<["brief", "source_plan", "status"]>;
8969
+ sessionId: z.ZodString;
8970
+ workItemId: z.ZodString;
8971
+ attempt: z.ZodNumber;
8972
+ leaseId: z.ZodOptional<z.ZodString>;
8973
+ briefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
8876
8974
  briefId: z.ZodString;
8877
- bodyOverride: z.ZodOptional<z.ZodString>;
8975
+ label: z.ZodString;
8976
+ body: z.ZodString;
8977
+ /**
8978
+ * Optional per-brief visual reference URL. Uses the same synchronous
8979
+ * network-target guard as inspiration URLs before downstream agents fetch it.
8980
+ */
8981
+ visualReferenceUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
8982
+ }, "strip", z.ZodTypeAny, {
8983
+ label: string;
8984
+ briefId: string;
8985
+ body: string;
8986
+ visualReferenceUrl?: string | undefined;
8987
+ }, {
8988
+ label: string;
8989
+ briefId: string;
8990
+ body: string;
8991
+ visualReferenceUrl?: string | undefined;
8992
+ }>, "many">>;
8993
+ bindings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
8994
+ kind: z.ZodLiteral<"global">;
8995
+ sourceIds: z.ZodArray<z.ZodString, "many">;
8996
+ actionIds: z.ZodArray<z.ZodString, "many">;
8997
+ metadataIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8998
+ }, "strip", z.ZodTypeAny, {
8999
+ kind: "global";
9000
+ sourceIds: string[];
9001
+ actionIds: string[];
9002
+ metadataIds?: string[] | undefined;
9003
+ }, {
9004
+ kind: "global";
9005
+ sourceIds: string[];
9006
+ actionIds: string[];
9007
+ metadataIds?: string[] | undefined;
9008
+ }>, z.ZodObject<{
9009
+ kind: z.ZodLiteral<"slot">;
9010
+ slotIndex: z.ZodNumber;
9011
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9012
+ actionIds: z.ZodArray<z.ZodString, "many">;
9013
+ metadataIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9014
+ }, "strip", z.ZodTypeAny, {
9015
+ kind: "slot";
9016
+ sourceIds: string[];
9017
+ actionIds: string[];
9018
+ slotIndex: number;
9019
+ metadataIds?: string[] | undefined;
9020
+ }, {
9021
+ kind: "slot";
9022
+ sourceIds: string[];
9023
+ actionIds: string[];
9024
+ slotIndex: number;
9025
+ metadataIds?: string[] | undefined;
9026
+ }>]>, "many">>;
9027
+ sourcePlan: z.ZodOptional<z.ZodObject<{
9028
+ actions: z.ZodArray<z.ZodObject<{
9029
+ id: z.ZodString;
9030
+ kind: z.ZodEnum<["extract_design_system", "describe_motion"]>;
9031
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9032
+ reason: z.ZodString;
9033
+ outputMetadataIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9034
+ }, "strip", z.ZodTypeAny, {
9035
+ reason: string;
9036
+ kind: "extract_design_system" | "describe_motion";
9037
+ id: string;
9038
+ sourceIds: string[];
9039
+ outputMetadataIds?: string[] | undefined;
9040
+ }, {
9041
+ reason: string;
9042
+ kind: "extract_design_system" | "describe_motion";
9043
+ id: string;
9044
+ sourceIds: string[];
9045
+ outputMetadataIds?: string[] | undefined;
9046
+ }>, "many">;
9047
+ metadata: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
9048
+ id: z.ZodString;
9049
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9050
+ actionId: z.ZodOptional<z.ZodString>;
9051
+ producedBy: z.ZodEnum<["rivet", "agent", "browser", "skill"]>;
9052
+ path: z.ZodOptional<z.ZodString>;
9053
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9054
+ } & {
9055
+ kind: z.ZodLiteral<"design_system">;
9056
+ data: z.ZodObject<{
9057
+ designMarkdown: z.ZodOptional<z.ZodString>;
9058
+ /**
9059
+ * Provenance for the design system: `captured` = derived from rendered
9060
+ * browser evidence (e.g. `capture_design_evidence`); `partial` = some
9061
+ * evidence, gaps filled by inference; `inferred` = no rendered evidence
9062
+ * (static fetch / native inspection only). Keeps DESIGN.md honest about
9063
+ * extracted-vs-guessed values.
9064
+ */
9065
+ evidenceStatus: z.ZodOptional<z.ZodEnum<["captured", "partial", "inferred"]>>;
9066
+ sourceFindings: z.ZodArray<z.ZodString, "many">;
9067
+ sectionInventory: z.ZodArray<z.ZodString, "many">;
9068
+ visualObservations: z.ZodArray<z.ZodString, "many">;
9069
+ sourceRoles: z.ZodArray<z.ZodObject<{
9070
+ sourceId: z.ZodString;
9071
+ role: z.ZodEnum<["primary", "inspiration", "competitor"]>;
9072
+ rationale: z.ZodOptional<z.ZodString>;
9073
+ }, "strip", z.ZodTypeAny, {
9074
+ sourceId: string;
9075
+ role: "primary" | "inspiration" | "competitor";
9076
+ rationale?: string | undefined;
9077
+ }, {
9078
+ sourceId: string;
9079
+ role: "primary" | "inspiration" | "competitor";
9080
+ rationale?: string | undefined;
9081
+ }>, "many">;
9082
+ qualityBar: z.ZodArray<z.ZodString, "many">;
9083
+ risks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9084
+ }, "strip", z.ZodTypeAny, {
9085
+ sourceFindings: string[];
9086
+ sectionInventory: string[];
9087
+ visualObservations: string[];
9088
+ sourceRoles: {
9089
+ sourceId: string;
9090
+ role: "primary" | "inspiration" | "competitor";
9091
+ rationale?: string | undefined;
9092
+ }[];
9093
+ qualityBar: string[];
9094
+ designMarkdown?: string | undefined;
9095
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9096
+ risks?: string[] | undefined;
9097
+ }, {
9098
+ sourceFindings: string[];
9099
+ sectionInventory: string[];
9100
+ visualObservations: string[];
9101
+ sourceRoles: {
9102
+ sourceId: string;
9103
+ role: "primary" | "inspiration" | "competitor";
9104
+ rationale?: string | undefined;
9105
+ }[];
9106
+ qualityBar: string[];
9107
+ designMarkdown?: string | undefined;
9108
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9109
+ risks?: string[] | undefined;
9110
+ }>;
9111
+ }, "strip", z.ZodTypeAny, {
9112
+ kind: "design_system";
9113
+ id: string;
9114
+ data: {
9115
+ sourceFindings: string[];
9116
+ sectionInventory: string[];
9117
+ visualObservations: string[];
9118
+ sourceRoles: {
9119
+ sourceId: string;
9120
+ role: "primary" | "inspiration" | "competitor";
9121
+ rationale?: string | undefined;
9122
+ }[];
9123
+ qualityBar: string[];
9124
+ designMarkdown?: string | undefined;
9125
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9126
+ risks?: string[] | undefined;
9127
+ };
9128
+ sourceIds: string[];
9129
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9130
+ path?: string | undefined;
9131
+ actionId?: string | undefined;
9132
+ warnings?: string[] | undefined;
9133
+ }, {
9134
+ kind: "design_system";
9135
+ id: string;
9136
+ data: {
9137
+ sourceFindings: string[];
9138
+ sectionInventory: string[];
9139
+ visualObservations: string[];
9140
+ sourceRoles: {
9141
+ sourceId: string;
9142
+ role: "primary" | "inspiration" | "competitor";
9143
+ rationale?: string | undefined;
9144
+ }[];
9145
+ qualityBar: string[];
9146
+ designMarkdown?: string | undefined;
9147
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9148
+ risks?: string[] | undefined;
9149
+ };
9150
+ sourceIds: string[];
9151
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9152
+ path?: string | undefined;
9153
+ actionId?: string | undefined;
9154
+ warnings?: string[] | undefined;
9155
+ }>, z.ZodObject<{
9156
+ id: z.ZodString;
9157
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9158
+ actionId: z.ZodOptional<z.ZodString>;
9159
+ producedBy: z.ZodEnum<["rivet", "agent", "browser", "skill"]>;
9160
+ path: z.ZodOptional<z.ZodString>;
9161
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9162
+ } & {
9163
+ kind: z.ZodLiteral<"motion_guidance">;
9164
+ data: z.ZodObject<{
9165
+ motionMarkdown: z.ZodOptional<z.ZodString>;
9166
+ notes: z.ZodArray<z.ZodString, "many">;
9167
+ timings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9168
+ }, "strip", z.ZodTypeAny, {
9169
+ notes: string[];
9170
+ motionMarkdown?: string | undefined;
9171
+ timings?: string[] | undefined;
9172
+ }, {
9173
+ notes: string[];
9174
+ motionMarkdown?: string | undefined;
9175
+ timings?: string[] | undefined;
9176
+ }>;
9177
+ }, "strip", z.ZodTypeAny, {
9178
+ kind: "motion_guidance";
9179
+ id: string;
9180
+ data: {
9181
+ notes: string[];
9182
+ motionMarkdown?: string | undefined;
9183
+ timings?: string[] | undefined;
9184
+ };
9185
+ sourceIds: string[];
9186
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9187
+ path?: string | undefined;
9188
+ actionId?: string | undefined;
9189
+ warnings?: string[] | undefined;
9190
+ }, {
9191
+ kind: "motion_guidance";
9192
+ id: string;
9193
+ data: {
9194
+ notes: string[];
9195
+ motionMarkdown?: string | undefined;
9196
+ timings?: string[] | undefined;
9197
+ };
9198
+ sourceIds: string[];
9199
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9200
+ path?: string | undefined;
9201
+ actionId?: string | undefined;
9202
+ warnings?: string[] | undefined;
9203
+ }>]>, "many">;
9204
+ bindings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
9205
+ kind: z.ZodLiteral<"global">;
9206
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9207
+ actionIds: z.ZodArray<z.ZodString, "many">;
9208
+ metadataIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9209
+ }, "strip", z.ZodTypeAny, {
9210
+ kind: "global";
9211
+ sourceIds: string[];
9212
+ actionIds: string[];
9213
+ metadataIds?: string[] | undefined;
9214
+ }, {
9215
+ kind: "global";
9216
+ sourceIds: string[];
9217
+ actionIds: string[];
9218
+ metadataIds?: string[] | undefined;
9219
+ }>, z.ZodObject<{
9220
+ kind: z.ZodLiteral<"slot">;
9221
+ slotIndex: z.ZodNumber;
9222
+ sourceIds: z.ZodArray<z.ZodString, "many">;
9223
+ actionIds: z.ZodArray<z.ZodString, "many">;
9224
+ metadataIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9225
+ }, "strip", z.ZodTypeAny, {
9226
+ kind: "slot";
9227
+ sourceIds: string[];
9228
+ actionIds: string[];
9229
+ slotIndex: number;
9230
+ metadataIds?: string[] | undefined;
9231
+ }, {
9232
+ kind: "slot";
9233
+ sourceIds: string[];
9234
+ actionIds: string[];
9235
+ slotIndex: number;
9236
+ metadataIds?: string[] | undefined;
9237
+ }>]>, "many">>;
9238
+ executionPlan: z.ZodObject<{
9239
+ mode: z.ZodEnum<["static_preview", "vite_app"]>;
9240
+ confidence: z.ZodEnum<["low", "medium", "high"]>;
9241
+ reason: z.ZodString;
9242
+ assetPlan: z.ZodOptional<z.ZodArray<z.ZodObject<{
9243
+ source: z.ZodString;
9244
+ destination: z.ZodString;
9245
+ referenceAs: z.ZodString;
9246
+ }, "strip", z.ZodTypeAny, {
9247
+ destination: string;
9248
+ source: string;
9249
+ referenceAs: string;
9250
+ }, {
9251
+ destination: string;
9252
+ source: string;
9253
+ referenceAs: string;
9254
+ }>, "many">>;
9255
+ runtimeRequirements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9256
+ userQuestion: z.ZodOptional<z.ZodString>;
9257
+ }, "strip", z.ZodTypeAny, {
9258
+ mode: "static_preview" | "vite_app";
9259
+ reason: string;
9260
+ confidence: "low" | "medium" | "high";
9261
+ assetPlan?: {
9262
+ destination: string;
9263
+ source: string;
9264
+ referenceAs: string;
9265
+ }[] | undefined;
9266
+ runtimeRequirements?: string[] | undefined;
9267
+ userQuestion?: string | undefined;
9268
+ }, {
9269
+ mode: "static_preview" | "vite_app";
9270
+ reason: string;
9271
+ confidence: "low" | "medium" | "high";
9272
+ assetPlan?: {
9273
+ destination: string;
9274
+ source: string;
9275
+ referenceAs: string;
9276
+ }[] | undefined;
9277
+ runtimeRequirements?: string[] | undefined;
9278
+ userQuestion?: string | undefined;
9279
+ }>;
8878
9280
  }, "strip", z.ZodTypeAny, {
8879
- briefId: string;
8880
- bodyOverride?: string | undefined;
9281
+ executionPlan: {
9282
+ mode: "static_preview" | "vite_app";
9283
+ reason: string;
9284
+ confidence: "low" | "medium" | "high";
9285
+ assetPlan?: {
9286
+ destination: string;
9287
+ source: string;
9288
+ referenceAs: string;
9289
+ }[] | undefined;
9290
+ runtimeRequirements?: string[] | undefined;
9291
+ userQuestion?: string | undefined;
9292
+ };
9293
+ actions: {
9294
+ reason: string;
9295
+ kind: "extract_design_system" | "describe_motion";
9296
+ id: string;
9297
+ sourceIds: string[];
9298
+ outputMetadataIds?: string[] | undefined;
9299
+ }[];
9300
+ metadata: ({
9301
+ kind: "design_system";
9302
+ id: string;
9303
+ data: {
9304
+ sourceFindings: string[];
9305
+ sectionInventory: string[];
9306
+ visualObservations: string[];
9307
+ sourceRoles: {
9308
+ sourceId: string;
9309
+ role: "primary" | "inspiration" | "competitor";
9310
+ rationale?: string | undefined;
9311
+ }[];
9312
+ qualityBar: string[];
9313
+ designMarkdown?: string | undefined;
9314
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9315
+ risks?: string[] | undefined;
9316
+ };
9317
+ sourceIds: string[];
9318
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9319
+ path?: string | undefined;
9320
+ actionId?: string | undefined;
9321
+ warnings?: string[] | undefined;
9322
+ } | {
9323
+ kind: "motion_guidance";
9324
+ id: string;
9325
+ data: {
9326
+ notes: string[];
9327
+ motionMarkdown?: string | undefined;
9328
+ timings?: string[] | undefined;
9329
+ };
9330
+ sourceIds: string[];
9331
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9332
+ path?: string | undefined;
9333
+ actionId?: string | undefined;
9334
+ warnings?: string[] | undefined;
9335
+ })[];
9336
+ bindings?: ({
9337
+ kind: "global";
9338
+ sourceIds: string[];
9339
+ actionIds: string[];
9340
+ metadataIds?: string[] | undefined;
9341
+ } | {
9342
+ kind: "slot";
9343
+ sourceIds: string[];
9344
+ actionIds: string[];
9345
+ slotIndex: number;
9346
+ metadataIds?: string[] | undefined;
9347
+ })[] | undefined;
8881
9348
  }, {
8882
- briefId: string;
8883
- bodyOverride?: string | undefined;
8884
- }>, "many">>;
8885
- };
8886
- export type ApproveVariantBriefsInput = {
8887
- sessionId: string;
8888
- briefIds?: string[];
8889
- confirmedByUser?: boolean;
8890
- bypassRequestedByUser?: boolean;
8891
- bypassReason?: string;
8892
- selections?: Array<{
8893
- briefId: string;
8894
- bodyOverride?: string;
8895
- }>;
8896
- };
8897
- export type ApproveVariantBriefsOutput = {
8898
- stage: 'work_items_ready';
8899
- approvedCount: number;
8900
- codeGenWorkItemIds: string[];
8901
- scaffoldBaseWorkItemId: string | null;
8902
- nextAction: 'continue_variants';
8903
- } | {
8904
- stage: 'failed';
8905
- errorCode: ErrorCode;
8906
- message: string;
8907
- };
8908
- export declare const commitVariantInput: {
8909
- sessionId: z.ZodString;
8910
- variantId: z.ZodString;
8911
- confirmedByUser: z.ZodOptional<z.ZodBoolean>;
8912
- bypassRequestedByUser: z.ZodOptional<z.ZodBoolean>;
8913
- bypassReason: z.ZodOptional<z.ZodString>;
8914
- };
8915
- export type CommitVariantInput = {
8916
- sessionId: string;
8917
- variantId: string;
8918
- confirmedByUser?: boolean;
8919
- bypassRequestedByUser?: boolean;
8920
- bypassReason?: string;
8921
- };
8922
- export type CommitVariantOutput = {
8923
- stage: Stage;
8924
- enqueued: boolean;
8925
- duplicate: boolean;
8926
- changedFilesCount: number;
8927
- payloadKind?: 'diff' | 'diff-applied' | 'project-created';
8928
- destinationPath?: string;
8929
- } | {
8930
- stage: 'failed';
8931
- errorCode: ErrorCode;
8932
- message: string;
8933
- };
8934
- export declare const continueVariantsAction: z.ZodOptional<z.ZodEnum<["check", "wait", "request_work", "refine_variant"]>>;
8935
- export declare const continueVariantsInput: {
8936
- sessionId: z.ZodString;
8937
- clientRequestId: z.ZodOptional<z.ZodString>;
8938
- action: z.ZodOptional<z.ZodEnum<["check", "wait", "request_work", "refine_variant"]>>;
8939
- requestedLeaseCount: z.ZodOptional<z.ZodNumber>;
8940
- workItemIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8941
- variantId: z.ZodOptional<z.ZodString>;
8942
- instruction: z.ZodOptional<z.ZodString>;
8943
- };
8944
- export type ContinueVariantsInput = {
8945
- sessionId: string;
8946
- clientRequestId?: string;
8947
- action?: 'check' | 'wait' | 'request_work' | 'refine_variant';
8948
- requestedLeaseCount?: number;
8949
- workItemIds?: string[];
8950
- variantId?: string;
8951
- instruction?: string;
8952
- };
8953
- export declare const reportVariantCompleteStatus: z.ZodEnum<["running", "succeeded", "failed", "cancelled"]>;
8954
- export declare const reportVariantCompleteInput: {
8955
- sessionId: z.ZodString;
8956
- workItemId: z.ZodString;
8957
- leaseId: z.ZodString;
8958
- attempt: z.ZodNumber;
8959
- status: z.ZodEnum<["running", "succeeded", "failed", "cancelled"]>;
9349
+ executionPlan: {
9350
+ mode: "static_preview" | "vite_app";
9351
+ reason: string;
9352
+ confidence: "low" | "medium" | "high";
9353
+ assetPlan?: {
9354
+ destination: string;
9355
+ source: string;
9356
+ referenceAs: string;
9357
+ }[] | undefined;
9358
+ runtimeRequirements?: string[] | undefined;
9359
+ userQuestion?: string | undefined;
9360
+ };
9361
+ actions: {
9362
+ reason: string;
9363
+ kind: "extract_design_system" | "describe_motion";
9364
+ id: string;
9365
+ sourceIds: string[];
9366
+ outputMetadataIds?: string[] | undefined;
9367
+ }[];
9368
+ metadata: ({
9369
+ kind: "design_system";
9370
+ id: string;
9371
+ data: {
9372
+ sourceFindings: string[];
9373
+ sectionInventory: string[];
9374
+ visualObservations: string[];
9375
+ sourceRoles: {
9376
+ sourceId: string;
9377
+ role: "primary" | "inspiration" | "competitor";
9378
+ rationale?: string | undefined;
9379
+ }[];
9380
+ qualityBar: string[];
9381
+ designMarkdown?: string | undefined;
9382
+ evidenceStatus?: "captured" | "partial" | "inferred" | undefined;
9383
+ risks?: string[] | undefined;
9384
+ };
9385
+ sourceIds: string[];
9386
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9387
+ path?: string | undefined;
9388
+ actionId?: string | undefined;
9389
+ warnings?: string[] | undefined;
9390
+ } | {
9391
+ kind: "motion_guidance";
9392
+ id: string;
9393
+ data: {
9394
+ notes: string[];
9395
+ motionMarkdown?: string | undefined;
9396
+ timings?: string[] | undefined;
9397
+ };
9398
+ sourceIds: string[];
9399
+ producedBy: "rivet" | "agent" | "browser" | "skill";
9400
+ path?: string | undefined;
9401
+ actionId?: string | undefined;
9402
+ warnings?: string[] | undefined;
9403
+ })[];
9404
+ bindings?: ({
9405
+ kind: "global";
9406
+ sourceIds: string[];
9407
+ actionIds: string[];
9408
+ metadataIds?: string[] | undefined;
9409
+ } | {
9410
+ kind: "slot";
9411
+ sourceIds: string[];
9412
+ actionIds: string[];
9413
+ slotIndex: number;
9414
+ metadataIds?: string[] | undefined;
9415
+ })[] | undefined;
9416
+ }>>;
9417
+ status: z.ZodOptional<z.ZodEnum<["running", "succeeded", "failed", "cancelled"]>>;
8960
9418
  output: z.ZodOptional<z.ZodUnknown>;
8961
9419
  error: z.ZodOptional<z.ZodObject<{
8962
9420
  code: z.ZodString;
@@ -8975,12 +9433,16 @@ export declare const reportVariantCompleteInput: {
8975
9433
  title: z.ZodOptional<z.ZodString>;
8976
9434
  description: z.ZodOptional<z.ZodString>;
8977
9435
  };
8978
- export type ReportVariantCompleteInput = {
9436
+ export type ReportWorkItemInput = {
9437
+ kind: 'brief' | 'source_plan' | 'status';
8979
9438
  sessionId: string;
8980
9439
  workItemId: string;
8981
- leaseId: string;
8982
9440
  attempt: number;
8983
- status: 'running' | 'succeeded' | 'failed' | 'cancelled';
9441
+ leaseId?: string;
9442
+ briefs?: Brief[];
9443
+ bindings?: VariantContextBinding[];
9444
+ sourcePlan?: SourcePlanArtifact;
9445
+ status?: 'running' | 'succeeded' | 'failed' | 'cancelled';
8984
9446
  output?: unknown;
8985
9447
  error?: {
8986
9448
  code: string;
@@ -8995,20 +9457,12 @@ export type ReportVariantCompleteInput = {
8995
9457
  };
8996
9458
  export declare const cancelVariantsInput: {
8997
9459
  sessionId: z.ZodString;
9460
+ variantId: z.ZodOptional<z.ZodString>;
8998
9461
  reason: z.ZodOptional<z.ZodString>;
8999
9462
  };
9000
9463
  export type CancelVariantsInput = {
9001
9464
  sessionId: string;
9002
- reason?: string;
9003
- };
9004
- export declare const cancelVariantInput: {
9005
- sessionId: z.ZodString;
9006
- variantId: z.ZodString;
9007
- reason: z.ZodOptional<z.ZodString>;
9008
- };
9009
- export type CancelVariantInput = {
9010
- sessionId: string;
9011
- variantId: string;
9465
+ variantId?: string;
9012
9466
  reason?: string;
9013
9467
  };
9014
9468
  export type CancelVariantOutput = {
@@ -9285,7 +9739,7 @@ export type StartVariantsOutput = {
9285
9739
  * time. `> 0` means the agent should keep draining via
9286
9740
  * watch_for_changes / get_pending_changes. */
9287
9741
  pendingVariantRequests?: number;
9288
- nextAction: 'report_variant_complete';
9742
+ nextAction: 'report_work_item';
9289
9743
  } | {
9290
9744
  sessionId: string;
9291
9745
  stage: 'awaiting_source_plan';
@@ -9301,7 +9755,7 @@ export type StartVariantsOutput = {
9301
9755
  stage: 'awaiting_briefs';
9302
9756
  mode: 'zero_to_one';
9303
9757
  briefWorkItem: BriefWorkItemDescriptor;
9304
- nextAction: 'report_variant_briefs';
9758
+ nextAction: 'report_work_item';
9305
9759
  destinationPath?: string;
9306
9760
  visualEditor?: VisualEditorAttachment;
9307
9761
  editorNextAction?: VisualEditorWatchAction;
@@ -9354,7 +9808,7 @@ export type ProposeVariantsOutput = {
9354
9808
  sessionId: string;
9355
9809
  stage: 'awaiting_briefs';
9356
9810
  briefWorkItem: BriefWorkItemDescriptor;
9357
- nextAction: 'report_variant_briefs';
9811
+ nextAction: 'report_work_item';
9358
9812
  visualEditor?: VisualEditorAttachment;
9359
9813
  } | {
9360
9814
  stage: 'cancelled';
@@ -9384,7 +9838,7 @@ export type ReportSourcePlanOutput = {
9384
9838
  assetCount: number;
9385
9839
  runtimeRequirementCount: number;
9386
9840
  };
9387
- nextAction: 'report_variant_briefs';
9841
+ nextAction: 'report_work_item';
9388
9842
  } | {
9389
9843
  stage: 'failed';
9390
9844
  errorCode: ErrorCode;
@@ -9508,11 +9962,17 @@ export declare const listPastVariantsInput: {
9508
9962
  projectPath: z.ZodOptional<z.ZodString>;
9509
9963
  limit: z.ZodOptional<z.ZodNumber>;
9510
9964
  status: z.ZodOptional<z.ZodEnum<["completed", "committed", "rejected", "cancelled", "removed"]>>;
9965
+ sessionId: z.ZodOptional<z.ZodString>;
9966
+ variantId: z.ZodOptional<z.ZodString>;
9967
+ includeBody: z.ZodOptional<z.ZodBoolean>;
9511
9968
  };
9512
9969
  export type ListPastVariantsInput = {
9513
9970
  projectPath?: string;
9514
9971
  limit?: number;
9515
9972
  status?: z.infer<typeof variantHistoryStatusSchema>;
9973
+ sessionId?: string;
9974
+ variantId?: string;
9975
+ includeBody?: boolean;
9516
9976
  };
9517
9977
  export type PastVariantArtifact = {
9518
9978
  kind: 'diff';