@tailor-platform/sdk 2.27.0 → 2.28.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.
Files changed (177) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/agent-skills/tailor/SKILL.md +4 -2
  3. package/dist/{application-DFeuELRo.mjs → application-CgJLyJaF.mjs} +20 -20
  4. package/dist/application-CgJLyJaF.mjs.map +1 -0
  5. package/dist/application-CvmKh5WT.mjs +1 -0
  6. package/dist/cli/commands/executor/get.d.mts +2 -1
  7. package/dist/cli/commands/executor/jobs.d.mts +2 -1
  8. package/dist/cli/commands/executor/trigger.d.mts +2 -1
  9. package/dist/cli/commands/function/get.d.mts +2 -1
  10. package/dist/cli/commands/function/list.d.mts +2 -1
  11. package/dist/cli/commands/organization/folder/create.d.mts +2 -1
  12. package/dist/cli/commands/organization/folder/delete.d.mts +2 -1
  13. package/dist/cli/commands/organization/folder/get.d.mts +2 -1
  14. package/dist/cli/commands/organization/folder/list.d.mts +2 -1
  15. package/dist/cli/commands/organization/folder/update.d.mts +2 -1
  16. package/dist/cli/commands/organization/get.d.mts +2 -1
  17. package/dist/cli/commands/organization/tree.d.mts +2 -1
  18. package/dist/cli/commands/organization/update.d.mts +2 -1
  19. package/dist/cli/commands/show.d.mts +2 -1
  20. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +2 -1
  21. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +3 -1
  22. package/dist/cli/commands/workflow/executions.d.mts +2 -1
  23. package/dist/cli/commands/workflow/get.d.mts +2 -1
  24. package/dist/cli/commands/workflow/start.d.mts +2 -1
  25. package/dist/cli/commands/workspace/app/health.d.mts +2 -1
  26. package/dist/cli/commands/workspace/app/list.d.mts +2 -1
  27. package/dist/cli/commands/workspace/create.d.mts +5 -2
  28. package/dist/cli/commands/workspace/delete.d.mts +2 -1
  29. package/dist/cli/commands/workspace/get.d.mts +2 -1
  30. package/dist/cli/commands/workspace/restore.d.mts +2 -1
  31. package/dist/cli/commands/workspace/user/invite.d.mts +2 -1
  32. package/dist/cli/commands/workspace/user/list.d.mts +2 -1
  33. package/dist/cli/commands/workspace/user/remove.d.mts +2 -1
  34. package/dist/cli/commands/workspace/user/update.d.mts +2 -1
  35. package/dist/cli/lib.d.mts +1 -1
  36. package/dist/cli/lib.mjs +1 -1
  37. package/dist/cli/lib.mjs.map +1 -1
  38. package/dist/cli/main.d.mts +2 -0
  39. package/dist/cli/main.mjs +44 -31
  40. package/dist/cli/main.mjs.map +1 -1
  41. package/dist/cli/query/index.d.mts +2 -1
  42. package/dist/cli/shared/args.d.mts +4 -2
  43. package/dist/cli/shared/client.d.mts +6 -1
  44. package/dist/cli/shared/context.d.mts +2 -1
  45. package/dist/cli/shared/logger.d.mts +5 -2
  46. package/dist/cli/shared/readonly-guard.d.mts +2 -1
  47. package/dist/cli/shared/seed-context.d.mts +5 -0
  48. package/dist/cli/shared/type-generator.d.mts +2 -1
  49. package/dist/completion/zsh-worker.zsh +217 -18
  50. package/dist/configure/config/types.d.mts +23 -1
  51. package/dist/configure/services/aigateway/types.d.mts +2 -1
  52. package/dist/configure/services/auth/types.d.mts +2 -1
  53. package/dist/configure/services/executor/executor.d.mts +2 -1
  54. package/dist/configure/services/executor/operation.d.mts +2 -1
  55. package/dist/configure/services/executor/trigger/event.d.mts +2 -1
  56. package/dist/configure/services/executor/trigger/schedule.d.mts +2 -1
  57. package/dist/configure/services/http-adapter/http-adapter.d.mts +2 -1
  58. package/dist/configure/services/idp/permission.d.mts +2 -1
  59. package/dist/configure/services/idp/types.d.mts +2 -1
  60. package/dist/configure/services/resolver/permission.d.mts +2 -1
  61. package/dist/configure/services/resolver/resolver.d.mts +2 -1
  62. package/dist/configure/services/secrets/types.d.mts +2 -1
  63. package/dist/configure/services/staticwebsite/types.d.mts +2 -1
  64. package/dist/configure/services/tailordb/permission.d.mts +2 -1
  65. package/dist/configure/services/tailordb/schema.d.mts +4 -3
  66. package/dist/configure/services/tailordb/types.d.mts +12 -1
  67. package/dist/configure/services/workflow/execution-policy.types.d.mts +2 -1
  68. package/dist/configure/services/workflow/job.d.mts +2 -1
  69. package/dist/configure/services/workflow/wait-point.d.mts +2 -1
  70. package/dist/configure/types/field.types.d.mts +2 -1
  71. package/dist/configure/types/permission-operand.types.d.mts +2 -1
  72. package/dist/configure/types/type.d.mts +2 -1
  73. package/dist/{crashreport-DFpRn-LS.mjs → crashreport-BAG8c7hB.mjs} +4 -4
  74. package/dist/{crashreport-DFpRn-LS.mjs.map → crashreport-BAG8c7hB.mjs.map} +1 -1
  75. package/dist/crashreport-BcXuocwI.mjs +1 -0
  76. package/dist/{errors-CpvSChyL.mjs → errors-D3qpNHR6.mjs} +2 -2
  77. package/dist/{errors-CpvSChyL.mjs.map → errors-D3qpNHR6.mjs.map} +1 -1
  78. package/dist/kysely-type-BWMfV301.mjs +48 -0
  79. package/dist/kysely-type-BWMfV301.mjs.map +1 -0
  80. package/dist/logger-DuaT2zY3.mjs +9 -0
  81. package/dist/logger-DuaT2zY3.mjs.map +1 -0
  82. package/dist/package-json-D1BRkjtr.mjs +1 -0
  83. package/dist/parser/service/tailordb/types.d.mts +3 -1
  84. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
  85. package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
  86. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
  87. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  88. package/dist/plugin/builtin/seed/index.d.mts +11 -1
  89. package/dist/plugin/builtin/seed/index.mjs +1 -1
  90. package/dist/register-ts-hook-yxshv0LV.mjs +1013 -0
  91. package/dist/register-ts-hook-yxshv0LV.mjs.map +1 -0
  92. package/dist/runtime/aigateway.mjs +1 -1
  93. package/dist/runtime/authconnection.mjs +1 -1
  94. package/dist/runtime/context.d.mts +2 -1
  95. package/dist/runtime/context.mjs +1 -1
  96. package/dist/runtime/date.d.mts +2 -1
  97. package/dist/runtime/field-parse.d.mts +2 -1
  98. package/dist/runtime/file.d.mts +2 -1
  99. package/dist/runtime/file.mjs +1 -1
  100. package/dist/runtime/globals.d.mts +2 -1
  101. package/dist/runtime/iconv.mjs +1 -1
  102. package/dist/runtime/idp.mjs +1 -1
  103. package/dist/runtime/logger.mjs +1 -1
  104. package/dist/runtime/secretmanager.mjs +1 -1
  105. package/dist/runtime/types.d.mts +2 -1
  106. package/dist/runtime/workflow.d.mts +2 -1
  107. package/dist/runtime/workflow.mjs +1 -1
  108. package/dist/schema-B6hJQWp6.mjs.map +1 -1
  109. package/dist/seed/index.d.mts +16 -3
  110. package/dist/seed/index.mjs +6 -6
  111. package/dist/seed/index.mjs.map +1 -1
  112. package/dist/seed-C3P_T_Eh.mjs.map +1 -1
  113. package/dist/{service-Cc7OY0Oh.mjs → service-CETr0AKY.mjs} +3 -3
  114. package/dist/service-CETr0AKY.mjs.map +1 -0
  115. package/dist/service-DREWLYxD.mjs +1 -0
  116. package/dist/{service-DFmt9UJP.mjs → service-b1g22NN9.mjs} +2 -2
  117. package/dist/{service-DFmt9UJP.mjs.map → service-b1g22NN9.mjs.map} +1 -1
  118. package/dist/service_pb-Bbu2QSIr.mjs +2 -0
  119. package/dist/service_pb-Bbu2QSIr.mjs.map +1 -0
  120. package/dist/service_pb-urxAIYHT.mjs +1 -0
  121. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +53 -1
  122. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +33 -0
  123. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -8
  124. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +18 -1
  125. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +4 -0
  126. package/dist/telemetry-DpkFGBmu.mjs +1 -0
  127. package/dist/{telemetry-Bklv9kQY.mjs → telemetry-Xk7J829P.mjs} +2 -2
  128. package/dist/{telemetry-Bklv9kQY.mjs.map → telemetry-Xk7J829P.mjs.map} +1 -1
  129. package/dist/types/tailordb.generated.d.mts +2 -0
  130. package/dist/vitest/index.mjs +1 -1
  131. package/dist/vitest/index.mjs.map +1 -1
  132. package/dist/vitest/mock-kysely.d.mts +2 -1
  133. package/dist/vitest/mocks/aigateway.d.mts +2 -1
  134. package/dist/vitest/mocks/authconnection.d.mts +2 -1
  135. package/dist/vitest/mocks/file.d.mts +3 -2
  136. package/dist/vitest/mocks/iconv.d.mts +2 -1
  137. package/dist/vitest/mocks/idp.d.mts +2 -1
  138. package/dist/vitest/mocks/logger.d.mts +2 -1
  139. package/dist/vitest/mocks/secretmanager.d.mts +2 -1
  140. package/dist/vitest/mocks/tailordb-pglite.d.mts +2 -1
  141. package/dist/vitest/mocks/tailordb.d.mts +2 -1
  142. package/dist/vitest/mocks/workflow.d.mts +3 -1
  143. package/dist/vitest/pglite-kysely.d.mts +2 -1
  144. package/dist/vitest/workflow-local.d.mts +2 -1
  145. package/dist/{workspace_resource_pb-ChWejcj0.mjs → workspace_resource_pb-CaoM2npP.mjs} +2 -2
  146. package/dist/{workspace_resource_pb-ChWejcj0.mjs.map → workspace_resource_pb-CaoM2npP.mjs.map} +1 -1
  147. package/docs/cli/application.md +13 -0
  148. package/docs/cli/data.md +105 -0
  149. package/docs/cli/secret.md +6 -6
  150. package/docs/cli/tailordb.md +18 -16
  151. package/docs/cli/user.md +37 -7
  152. package/docs/cli/workspace.md +9 -1
  153. package/docs/cli-reference.md +25 -3
  154. package/docs/configuration.md +9 -0
  155. package/docs/github-actions.md +89 -6
  156. package/docs/multi-environment.md +24 -0
  157. package/docs/services/idp.md +1 -1
  158. package/docs/services/tailordb-migration.md +68 -9
  159. package/docs/services/tailordb.md +17 -4
  160. package/docs/testing.md +1 -0
  161. package/package.json +8 -8
  162. package/dist/application-DFeuELRo.mjs.map +0 -1
  163. package/dist/application-nT_4a5HO.mjs +0 -1
  164. package/dist/crashreport-CBaRJl5h.mjs +0 -1
  165. package/dist/kysely-type-RDX59E1j.mjs +0 -48
  166. package/dist/kysely-type-RDX59E1j.mjs.map +0 -1
  167. package/dist/logger-Db-YRTwK.mjs +0 -9
  168. package/dist/logger-Db-YRTwK.mjs.map +0 -1
  169. package/dist/package-json-CmqhDJ__.mjs +0 -1
  170. package/dist/register-ts-hook-D6KXrGrB.mjs +0 -1009
  171. package/dist/register-ts-hook-D6KXrGrB.mjs.map +0 -1
  172. package/dist/service-Cc7OY0Oh.mjs.map +0 -1
  173. package/dist/service-sH2MZ4_W.mjs +0 -1
  174. package/dist/service_pb-Dw2ilc1O.mjs +0 -2
  175. package/dist/service_pb-Dw2ilc1O.mjs.map +0 -1
  176. package/dist/service_pb-GDOqfwb6.mjs +0 -1
  177. package/dist/telemetry-DXHP3VVi.mjs +0 -1
@@ -0,0 +1 @@
1
+ export{t as defineApplication,n as generatePluginFilesIfNeeded}from"./application-CgJLyJaF.mjs";
@@ -15,4 +15,5 @@ export type GetExecutorTypedOptions<E extends ExecutorLike = ExecutorLike> = {
15
15
  * @returns Executor information
16
16
  */
17
17
  export declare function getExecutor<E extends ExecutorLike>(options: GetExecutorTypedOptions<E>): Promise<ExecutorInfo>;
18
- //#endregion
18
+ //#endregion
19
+ export {};
@@ -82,4 +82,5 @@ export declare function watchExecutorJob<E extends ExecutorLike>(options: WatchE
82
82
  * @returns Failure message, or undefined when the wait succeeded
83
83
  */
84
84
  export declare function getExecutorWaitFailureMessage(result: WatchExecutorJobResult): string | undefined;
85
- //#endregion
85
+ //#endregion
86
+ export {};
@@ -26,4 +26,5 @@ export interface TriggerExecutorResult {
26
26
  * @returns Result containing the job ID if available
27
27
  */
28
28
  export declare function triggerExecutor<E extends ManualTriggerExecutor>(options: TriggerExecutorTypedOptions<E>): Promise<TriggerExecutorResult>;
29
- //#endregion
29
+ //#endregion
30
+ export {};
@@ -13,4 +13,5 @@ export type GetFunctionRegistryOptions = z.input<typeof getFunctionRegistryOptio
13
13
  * @returns Function registry info
14
14
  */
15
15
  export declare function getFunctionRegistry(options: GetFunctionRegistryOptions): Promise<FunctionRegistryInfo>;
16
- //#endregion
16
+ //#endregion
17
+ export {};
@@ -17,4 +17,5 @@ export type ListFunctionRegistriesOptions = z.input<typeof listFunctionRegistrie
17
17
  * @returns List of function registries
18
18
  */
19
19
  export declare function listFunctionRegistries(options: ListFunctionRegistriesOptions): Promise<FunctionRegistryInfo[]>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -13,4 +13,5 @@ export type CreateFolderOptions = z.input<typeof createFolderOptionsSchema>;
13
13
  * @returns Created folder details
14
14
  */
15
15
  export declare function createFolder(options: CreateFolderOptions): Promise<FolderInfo>;
16
- //#endregion
16
+ //#endregion
17
+ export {};
@@ -11,4 +11,5 @@ export type DeleteFolderOptions = z.input<typeof deleteFolderOptionsSchema>;
11
11
  * @returns Promise that resolves when deletion completes
12
12
  */
13
13
  export declare function deleteFolder(options: DeleteFolderOptions): Promise<void>;
14
- //#endregion
14
+ //#endregion
15
+ export {};
@@ -12,4 +12,5 @@ export type GetFolderOptions = z.input<typeof getFolderOptionsSchema>;
12
12
  * @returns Folder details
13
13
  */
14
14
  export declare function getFolder(options: GetFolderOptions): Promise<FolderInfo>;
15
- //#endregion
15
+ //#endregion
16
+ export {};
@@ -17,4 +17,5 @@ export type ListFoldersOptions = z.input<typeof listFoldersOptionsSchema>;
17
17
  * @returns List of folders
18
18
  */
19
19
  export declare function listFolders(options: ListFoldersOptions): Promise<FolderListInfo[]>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -13,4 +13,5 @@ export type UpdateFolderOptions = z.input<typeof updateFolderOptionsSchema>;
13
13
  * @returns Updated folder details
14
14
  */
15
15
  export declare function updateFolder(options: UpdateFolderOptions): Promise<FolderInfo>;
16
- //#endregion
16
+ //#endregion
17
+ export {};
@@ -11,4 +11,5 @@ export type GetOrganizationOptions = z.input<typeof getOrganizationOptionsSchema
11
11
  * @returns Organization details
12
12
  */
13
13
  export declare function getOrganization(options: GetOrganizationOptions): Promise<OrganizationInfo>;
14
- //#endregion
14
+ //#endregion
15
+ export {};
@@ -20,4 +20,5 @@ interface FolderTreeJson {
20
20
  * @returns Organization tree as structured data
21
21
  */
22
22
  export declare function organizationTree(options?: OrganizationTreeOptions): Promise<OrganizationTreeJson[]>;
23
- //#endregion
23
+ //#endregion
24
+ export {};
@@ -12,4 +12,5 @@ export type UpdateOrganizationOptions = z.input<typeof updateOrganizationOptions
12
12
  * @returns Updated organization details
13
13
  */
14
14
  export declare function updateOrganization(options: UpdateOrganizationOptions): Promise<OrganizationInfo>;
15
- //#endregion
15
+ //#endregion
16
+ export {};
@@ -47,4 +47,5 @@ export interface ShowInfo extends ApplicationInfo, WorkspaceInfo {
47
47
  * @returns Deployed application, workspace, AI Gateway, static website, and OAuth2 client information
48
48
  */
49
49
  export declare function show(options?: ShowOptions): Promise<ShowInfo>;
50
- //#endregion
50
+ //#endregion
51
+ export {};
@@ -299,4 +299,5 @@ export declare function formatMigrationDiff(diff: MigrationDiff): string;
299
299
  * @returns {string} Formatted summary string
300
300
  */
301
301
  export declare function formatDiffSummary(diff: MigrationDiff): string;
302
- //#endregion
302
+ //#endregion
303
+ export {};
@@ -29,6 +29,7 @@ export interface SnapshotSerial {
29
29
  start: number;
30
30
  maxValue?: number;
31
31
  format?: string;
32
+ gapless?: boolean;
32
33
  }
33
34
  /**
34
35
  * Enum value with optional description in schema snapshot
@@ -213,4 +214,5 @@ declare const normalizedSchemaSnapshotBrand: unique symbol;
213
214
  export type NormalizedSchemaSnapshot = SchemaSnapshot & {
214
215
  readonly [normalizedSchemaSnapshotBrand]: true;
215
216
  };
216
- //#endregion
217
+ //#endregion
218
+ export {};
@@ -60,4 +60,5 @@ export declare function listWorkflowExecutions<W extends WorkflowLike>(options?:
60
60
  * @returns Workflow execution with optional logs
61
61
  */
62
62
  export declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
63
- //#endregion
63
+ //#endregion
64
+ export {};
@@ -17,4 +17,5 @@ export type GetWorkflowTypedOptions<W extends WorkflowLike = WorkflowLike> = {
17
17
  * @returns Workflow information
18
18
  */
19
19
  export declare function getWorkflow<W extends WorkflowLike>(options: GetWorkflowTypedOptions<W>): Promise<WorkflowInfo>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -44,4 +44,5 @@ export interface StartWorkflowResultWithWait {
44
44
  * @returns Start result with wait helper
45
45
  */
46
46
  export declare function startWorkflow<W extends WorkflowLike>(options: StartWorkflowTypedOptions<W>): Promise<StartWorkflowResultWithWait>;
47
- //#endregion
47
+ //#endregion
48
+ export {};
@@ -13,4 +13,5 @@ export type HealthOptions = z.input<typeof healthOptionsSchema>;
13
13
  * @returns Application health information
14
14
  */
15
15
  export declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
16
- //#endregion
16
+ //#endregion
17
+ export {};
@@ -17,4 +17,5 @@ export type ListAppsOptions = z.input<typeof listAppsOptionsSchema>;
17
17
  * @returns List of applications
18
18
  */
19
19
  export declare function listApps(options: ListAppsOptions): Promise<AppInfo[]>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -1,5 +1,6 @@
1
1
  import "../../shared/workspace-name.mjs";
2
2
  import "../../shared/client.mjs";
3
+ import "../../shared/context.mjs";
3
4
  import { WorkspaceInfo } from "./transform.mjs";
4
5
  import { z } from "zod";
5
6
  //#region src/cli/commands/workspace/create.d.ts
@@ -23,7 +24,8 @@ export type CreatedWorkspaceInfo = WorkspaceInfo & {
23
24
  ttl?: TtlWriteResult;
24
25
  };
25
26
  /**
26
- * Create a new workspace with the given options.
27
+ * Create a new workspace with the given options. When neither location ID is provided,
28
+ * use the selected user's defaults unless an environment token is set.
27
29
  * @param options - Workspace creation options
28
30
  * @returns Created workspace info
29
31
  */
@@ -38,4 +40,5 @@ export type TtlWriteResult = {
38
40
  requested: string;
39
41
  message: string;
40
42
  };
41
- //#endregion
43
+ //#endregion
44
+ export {};
@@ -10,4 +10,5 @@ export type DeleteWorkspaceOptions = z.input<typeof deleteWorkspaceOptionsSchema
10
10
  * @returns Promise that resolves when deletion completes
11
11
  */
12
12
  export declare function deleteWorkspace(options: DeleteWorkspaceOptions): Promise<void>;
13
- //#endregion
13
+ //#endregion
14
+ export {};
@@ -17,4 +17,5 @@ export type WorkspaceDetailsWithExpiry = WorkspaceDetails & {
17
17
  * @returns Workspace details
18
18
  */
19
19
  export declare function getWorkspace(options: GetWorkspaceOptions): Promise<WorkspaceDetailsWithExpiry>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -10,4 +10,5 @@ export type RestoreWorkspaceOptions = z.input<typeof restoreWorkspaceOptionsSche
10
10
  * @returns Promise that resolves when restoration completes
11
11
  */
12
12
  export declare function restoreWorkspace(options: RestoreWorkspaceOptions): Promise<void>;
13
- //#endregion
13
+ //#endregion
14
+ export {};
@@ -17,4 +17,5 @@ export type InviteUserOptions = z.input<typeof inviteUserOptionsSchema>;
17
17
  * @returns Promise that resolves when invitation is sent
18
18
  */
19
19
  export declare function inviteUser(options: InviteUserOptions): Promise<void>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -17,4 +17,5 @@ export type ListUsersOptions = z.input<typeof listUsersOptionsSchema>;
17
17
  * @returns List of workspace users
18
18
  */
19
19
  export declare function listUsers(options: ListUsersOptions): Promise<UserInfo[]>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -12,4 +12,5 @@ export type RemoveUserOptions = z.input<typeof removeUserOptionsSchema>;
12
12
  * @returns Promise that resolves when removal completes
13
13
  */
14
14
  export declare function removeUser(options: RemoveUserOptions): Promise<void>;
15
- //#endregion
15
+ //#endregion
16
+ export {};
@@ -17,4 +17,5 @@ export type UpdateUserOptions = z.input<typeof updateUserOptionsSchema>;
17
17
  * @returns Promise that resolves when update completes
18
18
  */
19
19
  export declare function updateUser(options: UpdateUserOptions): Promise<void>;
20
- //#endregion
20
+ //#endregion
21
+ export {};
@@ -39,6 +39,7 @@ import { assertWritable } from "./shared/readonly-guard.mjs";
39
39
  import { isPluginGeneratedTable } from "../parser/service/tailordb/type-source.mjs";
40
40
  import { AIGatewayInfo, ApplicationInfo, ShowInfo, ShowOAuth2ClientInfo, ShowOptions, ShowStaticWebsiteInfo, show } from "./commands/show.mjs";
41
41
  import { RemoveOptions, remove } from "./commands/remove.mjs";
42
+ import { loadAccessToken, loadWorkspaceId } from "./shared/context.mjs";
42
43
  import { WorkspaceDetails, WorkspaceInfo } from "./commands/workspace/transform.mjs";
43
44
  import { CreateWorkspaceOptions, createWorkspace } from "./commands/workspace/create.mjs";
44
45
  import { ListWorkspacesOptions, listWorkspaces } from "./commands/workspace/list.mjs";
@@ -86,7 +87,6 @@ import { GetFolderOptions, getFolder } from "./commands/organization/folder/get.
86
87
  import { CreateFolderOptions, createFolder } from "./commands/organization/folder/create.mjs";
87
88
  import { UpdateFolderOptions, updateFolder } from "./commands/organization/folder/update.mjs";
88
89
  import { DeleteFolderOptions, deleteFolder } from "./commands/organization/folder/delete.mjs";
89
- import { loadAccessToken, loadWorkspaceId } from "./shared/context.mjs";
90
90
  import { ApiCallOptions, ApiCallResult, apiCall } from "./commands/api/api-call.mjs";
91
91
  import "./commands/api/index.mjs";
92
92
  import { query } from "./query/index.mjs";
package/dist/cli/lib.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{ot as ee}from"../application-DFeuELRo.mjs";import{i as te,o as e}from"../logger-Db-YRTwK.mjs";import{$ as t,A as n,An as r,Ar as i,Br as a,C as o,Cr as s,Ct as c,Dn as l,Dr as u,Dt as d,E as f,En as p,Er as m,Et as h,F as g,Fn as _,Ft as v,Gr as y,H as b,Hi as x,Hr as S,Ht as C,I as w,Ir as T,J as E,Jr as D,Jt as O,Kt as k,L as A,Li as j,Lt as M,Mn as N,Mr as P,Mt as F,N as I,Nn as L,Nr as R,O as z,Oi as B,On as V,Or as H,P as U,Qt as W,Rr as G,Rt as K,Tn as q,Tt as J,Ui as Y,V as X,Vi as Z,Vr as Q,Vt as ne,W as re,Wi as ie,Wt as ae,Yr as oe,Yt as $,Z as se,Zt as ce,_ as le,_t as ue,ar as de,at as fe,bn as pe,bt as me,d as he,di as ge,dt as _e,ei as ve,gi as ye,gr as be,h as xe,hi as Se,i as Ce,j as we,jn as Te,jr as Ee,jt as De,kn as Oe,kr as ke,kt as Ae,l as je,lt as Me,mi as Ne,mt as Pe,n as Fe,na as Ie,ni as Le,on as Re,p as ze,pt as Be,q as Ve,qi as He,r as Ue,rn as We,rt as Ge,s as Ke,st as qe,t as Je,ti as Ye,tt as Xe,vt as Ze,wn as Qe,x as $e,xi as et,xn as tt,y as nt,yt as rt,zr as it,zt as at}from"../register-ts-hook-D6KXrGrB.mjs";import{t as ot}from"../type-source--ZNcV8RJ.mjs";import{arg as st,defineCommand as ct,runCommand as lt,runMain as ut}from"@politty/zod";await Je(new URL(`./ts-hook.mjs`,import.meta.url));export{u as DB_PGLITE_SCHEMA_FILE_NAME,H as DB_TYPES_FILE_NAME,ke as DIFF_FILE_NAME,i as INITIAL_SCHEMA_NUMBER,Ee as MIGRATE_FILE_NAME,P as MIGRATE_PGLITE_TEST_FILE_NAME,R as MIGRATE_TEST_FILE_NAME,y as MIGRATION_LABEL_KEY,T as SCHEMA_FILE_NAME,Qe as TAILOR_LOCK_FILENAME,q as TAILOR_LOCK_VERSION,pe as WORKSPACE_NAME_MAX_LENGTH,Fe as annotateTerminalError,Ne as apiCall,p as appIdLockKey,W as apply,W as deploy,st as arg,Se as assertWritable,de as bundleMigrationScript,g as bundleSeedDumpScript,w as bundleSeedScript,U as chunkSeedData,D as compareLocalTypesWithSnapshot,oe as compareSnapshots,Z as configArg,x as confirmationArgs,Y as createCommonArgs,Me as createFolder,s as createSnapshotFromLocalTypes,Re as createWorkspace,j as defineAppCommand,ct as defineCommand,qe as deleteFolder,nt as deleteWorkspace,_ as deployStaticWebsite,ie as deploymentArgs,N as ensureConfigId,rt as errorToJson,h as executeScript,J as extractOwnedNamespaces,l as findAppIdLock,ve as formatDiffSummary,Ye as formatMigrationDiff,Ze as generate,L as generateUserTypes,o as getAppHealth,ce as getExecutor,K as getExecutorJob,at as getExecutorWaitFailureMessage,fe as getFolder,De as getFunctionRegistry,G as getLatestMigrationNumber,Pe as getMachineUserToken,it as getMigrationDirPath,a as getMigrationFilePath,Q as getMigrationFiles,be as getNamespacesWithMigrations,S as getNextMigrationNumber,Be as getOAuth2Client,t as getOrganization,k as getWorkflow,O as getWorkflowExecution,le as getWorkspace,Le as hasChanges,ee as initOperatorClient,ze as inviteUser,ot as isPluginGeneratedTable,$e as listApps,ne as listExecutorJobs,M as listExecutors,Ge as listFolders,Ae as listFunctionRegistries,ue as listMachineUsers,_e as listOAuth2Clients,se as listOrganizations,he as listUsers,F as listWebhookExecutors,$ as listWorkflowExecutions,n as listWorkflows,We as listWorkspaces,et as loadAccessToken,ye as loadConfig,He as loadEnvFiles,I as loadSeedContext,c as loadTailorDBNamespaces,B as loadWorkspaceId,X as logBetaWarning,te as logger,A as migrateGenerate,E as organizationTree,V as parseAppIds,Oe as planAppIds,ge as prompt,Ce as query,m as reconstructSnapshotFromMigrations,re as remove,r as removeAdoptedConfigIds,je as removeUser,Te as resolveAppId,xe as restoreWorkspace,z as resumeWorkflow,lt as runCommand,ut as runMain,me as serializeError,b as show,ae as startWorkflow,e as styles,v as triggerExecutor,we as truncate,Xe as updateFolder,Ve as updateOrganization,Ke as updateUser,d as waitForExecution,f as waitWorkflowExecution,C as watchExecutorJob,Ue as withSourceLocation,Ie as workspaceArgs,tt as workspaceNameSchema};
1
+ import{ot as ee}from"../application-CgJLyJaF.mjs";import{a as te,c as e}from"../logger-DuaT2zY3.mjs";import{$ as t,A as n,An as r,Ar as i,At as a,B as o,Br as s,Bt as c,C as l,Cr as u,Ct as d,Dn as f,Dr as p,E as m,En as h,Er as g,Et as _,Fn as v,Ft as y,Gi as b,Gr as x,Gt as S,Hr as C,Ht as w,Ir as T,Jr as E,Jt as D,Ki as O,L as k,Lt as A,Mn as j,Mr as M,Mt as N,N as P,Nn as F,Nr as I,Nt as L,O as R,Oi as z,On as B,Or as V,Ot as H,Qt as U,R as W,Rr as G,St as K,Tn as q,U as J,Ui as Y,Ut as X,Vr as Z,W as Q,Wi as ne,Xi as re,Xt as ie,Y as ae,Yr as oe,Yt as $,Z as se,Zt as ce,_ as le,at as ue,bn as de,bt as fe,cr as pe,d as me,di as he,ei as ge,gi as _e,gr as ve,gt as ye,h as be,hi as xe,ht as Se,i as Ce,j as we,jn as Te,jr as Ee,kn as De,kr as Oe,kt as ke,l as Ae,lt as je,mi as Me,mt as Ne,n as Pe,ni as Fe,oa as Ie,on as Le,p as Re,pt as ze,q as Be,qt as Ve,r as He,rn as Ue,rt as We,s as Ge,st as Ke,t as qe,ti as Je,tt as Ye,ut as Xe,vt as Ze,wn as Qe,x as $e,xi as et,xn as tt,y as nt,zi as rt,zr as it,zt as at}from"../register-ts-hook-yxshv0LV.mjs";import{t as ot}from"../type-source--ZNcV8RJ.mjs";import{arg as st,defineCommand as ct,runCommand as lt,runMain as ut}from"@politty/zod";await qe(new URL(`./ts-hook.mjs`,import.meta.url));export{p as DB_PGLITE_SCHEMA_FILE_NAME,V as DB_TYPES_FILE_NAME,Oe as DIFF_FILE_NAME,i as INITIAL_SCHEMA_NUMBER,Ee as MIGRATE_FILE_NAME,M as MIGRATE_PGLITE_TEST_FILE_NAME,I as MIGRATE_TEST_FILE_NAME,x as MIGRATION_LABEL_KEY,T as SCHEMA_FILE_NAME,Qe as TAILOR_LOCK_FILENAME,q as TAILOR_LOCK_VERSION,de as WORKSPACE_NAME_MAX_LENGTH,Pe as annotateTerminalError,Me as apiCall,h as appIdLockKey,U as apply,U as deploy,st as arg,xe as assertWritable,pe as bundleMigrationScript,ie as bundleSeedDumpScript,ce as bundleSeedScript,Ve as chunkSeedData,E as compareLocalTypesWithSnapshot,oe as compareSnapshots,Y as configArg,ne as confirmationArgs,b as createCommonArgs,ue as createFolder,u as createSnapshotFromLocalTypes,Le as createWorkspace,rt as defineAppCommand,ct as defineCommand,We as deleteFolder,nt as deleteWorkspace,v as deployStaticWebsite,O as deploymentArgs,j as ensureConfigId,Se as errorToJson,D as executeScript,Ze as extractOwnedNamespaces,f as findAppIdLock,ge as formatDiffSummary,Je as formatMigrationDiff,Ne as generate,F as generateUserTypes,l as getAppHealth,w as getExecutor,ke as getExecutorJob,a as getExecutorWaitFailureMessage,Ye as getFolder,K as getFunctionRegistry,G as getLatestMigrationNumber,Xe as getMachineUserToken,it as getMigrationDirPath,s as getMigrationFilePath,Z as getMigrationFiles,ve as getNamespacesWithMigrations,C as getNextMigrationNumber,je as getOAuth2Client,ae as getOrganization,A as getWorkflow,at as getWorkflowExecution,le as getWorkspace,Fe as hasChanges,ee as initOperatorClient,Re as inviteUser,ot as isPluginGeneratedTable,$e as listApps,N as listExecutorJobs,H as listExecutors,t as listFolders,fe as listFunctionRegistries,ze as listMachineUsers,Ke as listOAuth2Clients,Be as listOrganizations,me as listUsers,d as listWebhookExecutors,c as listWorkflowExecutions,n as listWorkflows,Ue as listWorkspaces,et as loadAccessToken,_e as loadConfig,re as loadEnvFiles,X as loadSeedContext,S as loadTailorDBNamespaces,z as loadWorkspaceId,k as logBetaWarning,te as logger,P as migrateGenerate,Q as organizationTree,B as parseAppIds,De as planAppIds,he as prompt,Ce as query,g as reconstructSnapshotFromMigrations,o as remove,r as removeAdoptedConfigIds,Ae as removeUser,Te as resolveAppId,be as restoreWorkspace,R as resumeWorkflow,lt as runCommand,ut as runMain,ye as serializeError,W as show,y as startWorkflow,e as styles,_ as triggerExecutor,we as truncate,se as updateFolder,J as updateOrganization,Ge as updateUser,$ as waitForExecution,m as waitWorkflowExecution,L as watchExecutorJob,He as withSourceLocation,Ie as workspaceArgs,tt as workspaceNameSchema};
2
2
  //# sourceMappingURL=lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","names":["initOperatorClient","logger","styles","getOrganization","listWorkflows","removeAdoptedConfigIds","INITIAL_SCHEMA_NUMBER","getMigrationFilePath","getAppHealth","createSnapshotFromLocalTypes","loadTailorDBNamespaces","findAppIdLock","DB_PGLITE_SCHEMA_FILE_NAME","waitForExecution","waitWorkflowExecution","appIdLockKey","reconstructSnapshotFromMigrations","executeScript","bundleSeedDumpScript","deployStaticWebsite","triggerExecutor","MIGRATION_LABEL_KEY","show","confirmationArgs","getNextMigrationNumber","watchExecutorJob","bundleSeedScript","SCHEMA_FILE_NAME","organizationTree","compareLocalTypesWithSnapshot","getWorkflowExecution","getWorkflow","generate$1","defineAppCommand","listExecutors","ensureConfigId","MIGRATE_PGLITE_TEST_FILE_NAME","listWebhookExecutors","loadSeedContext","generateUserTypes","MIGRATE_TEST_FILE_NAME","resumeWorkflow","loadWorkspaceId","parseAppIds","DB_TYPES_FILE_NAME","chunkSeedData","deploy","getLatestMigrationNumber","getExecutorJob","TAILOR_LOCK_VERSION","extractOwnedNamespaces","createCommonArgs","logBetaWarning","configArg","getMigrationFiles","listExecutorJobs","remove","deploymentArgs","startWorkflow","compareSnapshots","listWorkflowExecutions","listOrganizations","getExecutor","getWorkspace","listMachineUsers","bundleMigrationScript","getFolder","WORKSPACE_NAME_MAX_LENGTH","serializeError","listUsers","prompt","listOAuth2Clients","formatDiffSummary","loadConfig","getNamespacesWithMigrations","restoreWorkspace","assertWritable","query","truncate","resolveAppId","MIGRATE_FILE_NAME","getFunctionRegistry","planAppIds","DIFF_FILE_NAME","listFunctionRegistries","removeUser","createFolder","apiCall","getMachineUserToken","annotateTerminalError","workspaceArgs","hasChanges","createWorkspace","inviteUser","getOAuth2Client","updateOrganization","loadEnvFiles","withSourceLocation","listWorkspaces","listFolders","updateUser","deleteFolder","registerTsHook","formatMigrationDiff","updateFolder","generate","TAILOR_LOCK_FILENAME","listApps","loadAccessToken","workspaceNameSchema","deleteWorkspace","errorToJson","getMigrationDirPath","getExecutorWaitFailureMessage","isPluginGeneratedTable","arg","defineCommand","runCommand","runMain"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"grCAGA,MAAMsG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}
1
+ {"version":3,"file":"lib.mjs","names":["initOperatorClient","logger","styles","listFolders","listWorkflows","removeAdoptedConfigIds","INITIAL_SCHEMA_NUMBER","getExecutorWaitFailureMessage","remove","getMigrationFilePath","listWorkflowExecutions","getAppHealth","createSnapshotFromLocalTypes","listWebhookExecutors","findAppIdLock","DB_PGLITE_SCHEMA_FILE_NAME","waitWorkflowExecution","appIdLockKey","reconstructSnapshotFromMigrations","triggerExecutor","deployStaticWebsite","startWorkflow","createCommonArgs","MIGRATION_LABEL_KEY","loadTailorDBNamespaces","getNextMigrationNumber","getExecutor","SCHEMA_FILE_NAME","compareLocalTypesWithSnapshot","executeScript","deploymentArgs","logBetaWarning","getWorkflow","ensureConfigId","MIGRATE_PGLITE_TEST_FILE_NAME","listExecutorJobs","generate$1","generateUserTypes","MIGRATE_TEST_FILE_NAME","watchExecutorJob","resumeWorkflow","loadWorkspaceId","parseAppIds","DB_TYPES_FILE_NAME","listExecutors","deploy","show","getLatestMigrationNumber","getFunctionRegistry","TAILOR_LOCK_VERSION","updateOrganization","configArg","loadSeedContext","getMigrationFiles","organizationTree","confirmationArgs","loadEnvFiles","bundleSeedDumpScript","getOrganization","compareSnapshots","waitForExecution","updateFolder","bundleSeedScript","getWorkspace","createFolder","WORKSPACE_NAME_MAX_LENGTH","listFunctionRegistries","bundleMigrationScript","listUsers","prompt","formatDiffSummary","loadConfig","getNamespacesWithMigrations","serializeError","restoreWorkspace","assertWritable","errorToJson","query","truncate","resolveAppId","MIGRATE_FILE_NAME","planAppIds","DIFF_FILE_NAME","getExecutorJob","removeUser","getOAuth2Client","apiCall","generate","annotateTerminalError","hasChanges","workspaceArgs","createWorkspace","inviteUser","listMachineUsers","listOrganizations","chunkSeedData","withSourceLocation","listWorkspaces","deleteFolder","updateUser","listOAuth2Clients","registerTsHook","formatMigrationDiff","getFolder","getMachineUserToken","extractOwnedNamespaces","TAILOR_LOCK_FILENAME","listApps","loadAccessToken","workspaceNameSchema","deleteWorkspace","defineAppCommand","getMigrationDirPath","getWorkflowExecution","isPluginGeneratedTable","arg","defineCommand","runCommand","runMain"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"krCAGA,MAAMqG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}
@@ -13,10 +13,12 @@ export declare const mainCommand: {
13
13
  setup?: ((context: import("@politty/zod").SetupContext<Record<string, never> & {
14
14
  $source?: (name: string) => import("@politty/zod").ArgSource;
15
15
  $invocation?: import("@politty/zod").RunInvocation;
16
+ $agent?: import("@politty/zod").AgentInfo | undefined;
16
17
  }>) => void | Promise<void>) | undefined;
17
18
  cleanup?: ((context: import("@politty/zod").CleanupContext<Record<string, never> & {
18
19
  $source?: (name: string) => import("@politty/zod").ArgSource;
19
20
  $invocation?: import("@politty/zod").RunInvocation;
21
+ $agent?: import("@politty/zod").AgentInfo | undefined;
20
22
  }>) => void | Promise<void>) | undefined;
21
23
  notes?: string | undefined;
22
24
  examples?: import("@politty/zod").Example[] | undefined;