@vm0/cli 9.230.3 → 9.230.4

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 (84) hide show
  1. package/{agent-UDFUOQQT.js → agent-WQXH6ARK.js} +4 -4
  2. package/{banking-VXIIOJL3.js → banking-DYCRAHX3.js} +2 -2
  3. package/{chat-BJDR72CU.js → chat-Z5RQHEOS.js} +3 -3
  4. package/{chunk-26JQTRTD.js → chunk-BM47JSBX.js} +228 -230
  5. package/chunk-BM47JSBX.js.map +1 -0
  6. package/{chunk-KHYLB7DT.js → chunk-D6BK5EIV.js} +2 -2
  7. package/{chunk-4O6L6IF2.js → chunk-DCL3INIH.js} +2 -2
  8. package/{chunk-JV5HF7MH.js → chunk-DRXISO7V.js} +2 -2
  9. package/{chunk-VSBQGITZ.js → chunk-IYKGIKEB.js} +3 -3
  10. package/{chunk-LCJX5RFE.js → chunk-QVBF2OFH.js} +3 -3
  11. package/{chunk-RWREJRBM.js → chunk-UZWLQTHX.js} +2 -52
  12. package/chunk-UZWLQTHX.js.map +1 -0
  13. package/{chunk-3GYNEDI5.js → chunk-X7URFQJA.js} +2 -2
  14. package/chunk-X7URFQJA.js.map +1 -0
  15. package/{chunk-HDJ62TIP.js → chunk-ZAEOJMGS.js} +2 -2
  16. package/{computer-use-4CZFRH4I.js → computer-use-5WJGBUXO.js} +2 -2
  17. package/{connector-S7DXTIPZ.js → connector-EVA7XU3V.js} +2 -2
  18. package/{credit-SWUGDE6H.js → credit-7YD43KT4.js} +2 -2
  19. package/{developer-support-LPBBY62L.js → developer-support-AHY2HQMG.js} +2 -2
  20. package/{doctor-U7KIT2W4.js → doctor-LOMSVTSN.js} +5 -5
  21. package/{generate-EKAAI4ZP.js → generate-U2GRXN4E.js} +2 -2
  22. package/{github-YHE3OUED.js → github-SZPXZBEQ.js} +2 -2
  23. package/{goal-32GUTO4I.js → goal-24AZP5AU.js} +2 -2
  24. package/{host-VEZ6G4JF.js → host-S5PS7DQP.js} +2 -2
  25. package/index.js +13 -13
  26. package/{logs-V7CN7HYO.js → logs-KS6P63MI.js} +6 -6
  27. package/{maps-CBXCDDDK.js → maps-HLSSVYSF.js} +2 -2
  28. package/{memory-IA55Z3EV.js → memory-233X2H7N.js} +2 -2
  29. package/{model-U3QH2DSC.js → model-DQV6L4V3.js} +3 -3
  30. package/{model-provider-IVPPHFOQ.js → model-provider-OIGVYGYF.js} +3 -3
  31. package/{org-HMDDNEVN.js → org-JI53X3DI.js} +2 -2
  32. package/package.json +1 -1
  33. package/{phone-Y22VCLQF.js → phone-EX5GABHZ.js} +2 -2
  34. package/{preference-GOLS6EAL.js → preference-XRPJ24RY.js} +2 -2
  35. package/{relationship-KJCB55CN.js → relationship-KXW6PXHV.js} +2 -2
  36. package/{resource-IOTGJRWG.js → resource-OGBJZOB7.js} +2 -2
  37. package/{search-JEIVR7XU.js → search-RCTLN4DY.js} +6 -6
  38. package/{secret-I3E2QLUR.js → secret-JIHOD7IV.js} +3 -3
  39. package/{slack-Y2JXD6A7.js → slack-6DPIKDZ6.js} +2 -2
  40. package/{telegram-WFTA6LYX.js → telegram-46WGNRQN.js} +2 -2
  41. package/{variable-4U5H2JUY.js → variable-Q5JJM456.js} +2 -2
  42. package/{web-6WXT6GKE.js → web-3P6WWQD2.js} +2 -2
  43. package/{whoami-ECXTHSLN.js → whoami-SAMXOXKD.js} +4 -4
  44. package/{workflow-MH25NET4.js → workflow-TJSYKQYS.js} +2 -2
  45. package/zero.js +32 -32
  46. package/chunk-26JQTRTD.js.map +0 -1
  47. package/chunk-3GYNEDI5.js.map +0 -1
  48. package/chunk-RWREJRBM.js.map +0 -1
  49. /package/{agent-UDFUOQQT.js.map → agent-WQXH6ARK.js.map} +0 -0
  50. /package/{banking-VXIIOJL3.js.map → banking-DYCRAHX3.js.map} +0 -0
  51. /package/{chat-BJDR72CU.js.map → chat-Z5RQHEOS.js.map} +0 -0
  52. /package/{chunk-KHYLB7DT.js.map → chunk-D6BK5EIV.js.map} +0 -0
  53. /package/{chunk-4O6L6IF2.js.map → chunk-DCL3INIH.js.map} +0 -0
  54. /package/{chunk-JV5HF7MH.js.map → chunk-DRXISO7V.js.map} +0 -0
  55. /package/{chunk-VSBQGITZ.js.map → chunk-IYKGIKEB.js.map} +0 -0
  56. /package/{chunk-LCJX5RFE.js.map → chunk-QVBF2OFH.js.map} +0 -0
  57. /package/{chunk-HDJ62TIP.js.map → chunk-ZAEOJMGS.js.map} +0 -0
  58. /package/{computer-use-4CZFRH4I.js.map → computer-use-5WJGBUXO.js.map} +0 -0
  59. /package/{connector-S7DXTIPZ.js.map → connector-EVA7XU3V.js.map} +0 -0
  60. /package/{credit-SWUGDE6H.js.map → credit-7YD43KT4.js.map} +0 -0
  61. /package/{developer-support-LPBBY62L.js.map → developer-support-AHY2HQMG.js.map} +0 -0
  62. /package/{doctor-U7KIT2W4.js.map → doctor-LOMSVTSN.js.map} +0 -0
  63. /package/{generate-EKAAI4ZP.js.map → generate-U2GRXN4E.js.map} +0 -0
  64. /package/{github-YHE3OUED.js.map → github-SZPXZBEQ.js.map} +0 -0
  65. /package/{goal-32GUTO4I.js.map → goal-24AZP5AU.js.map} +0 -0
  66. /package/{host-VEZ6G4JF.js.map → host-S5PS7DQP.js.map} +0 -0
  67. /package/{logs-V7CN7HYO.js.map → logs-KS6P63MI.js.map} +0 -0
  68. /package/{maps-CBXCDDDK.js.map → maps-HLSSVYSF.js.map} +0 -0
  69. /package/{memory-IA55Z3EV.js.map → memory-233X2H7N.js.map} +0 -0
  70. /package/{model-U3QH2DSC.js.map → model-DQV6L4V3.js.map} +0 -0
  71. /package/{model-provider-IVPPHFOQ.js.map → model-provider-OIGVYGYF.js.map} +0 -0
  72. /package/{org-HMDDNEVN.js.map → org-JI53X3DI.js.map} +0 -0
  73. /package/{phone-Y22VCLQF.js.map → phone-EX5GABHZ.js.map} +0 -0
  74. /package/{preference-GOLS6EAL.js.map → preference-XRPJ24RY.js.map} +0 -0
  75. /package/{relationship-KJCB55CN.js.map → relationship-KXW6PXHV.js.map} +0 -0
  76. /package/{resource-IOTGJRWG.js.map → resource-OGBJZOB7.js.map} +0 -0
  77. /package/{search-JEIVR7XU.js.map → search-RCTLN4DY.js.map} +0 -0
  78. /package/{secret-I3E2QLUR.js.map → secret-JIHOD7IV.js.map} +0 -0
  79. /package/{slack-Y2JXD6A7.js.map → slack-6DPIKDZ6.js.map} +0 -0
  80. /package/{telegram-WFTA6LYX.js.map → telegram-46WGNRQN.js.map} +0 -0
  81. /package/{variable-4U5H2JUY.js.map → variable-Q5JJM456.js.map} +0 -0
  82. /package/{web-6WXT6GKE.js.map → web-3P6WWQD2.js.map} +0 -0
  83. /package/{whoami-ECXTHSLN.js.map → whoami-SAMXOXKD.js.map} +0 -0
  84. /package/{workflow-MH25NET4.js.map → workflow-TJSYKQYS.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  CONNECTOR_TYPES,
6
6
  CONNECTOR_TYPE_KEYS,
7
7
  connectorAuthMethodIdSchema
8
- } from "./chunk-RWREJRBM.js";
8
+ } from "./chunk-UZWLQTHX.js";
9
9
  import {
10
10
  init_esm_shims
11
11
  } from "./chunk-DIRAZ3YX.js";
@@ -121,4 +121,4 @@ export {
121
121
  getConnectorStoredSecretDisplayInfo,
122
122
  getDiagnosticConnectorTypeForRuntimeEnvName
123
123
  };
124
- //# sourceMappingURL=chunk-3GYNEDI5.js.map
124
+ //# sourceMappingURL=chunk-X7URFQJA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/connectors/src/connector-utils.ts"],"sourcesContent":["import {\n CONNECTOR_TYPE_KEYS,\n CONNECTOR_TYPES,\n connectorAuthMethodIdSchema,\n type ConnectorAuthMethodConfig,\n type ConnectorAuthMethodId,\n type ConnectorAuthCodeGrantAuthMethodId,\n type ConnectorDeviceAuthGrantAuthMethodId,\n type ConnectorExternalCodeGrantAuthMethodId,\n type ConnectorAuthMethodIds,\n type ConnectorAuthMethodIdsByAccessKind,\n type ConnectorAuthMethodIdsByGrantKind,\n type ConnectorAuthMethodIdsByRevokeKind,\n type ConnectorTypesByAccessKind,\n type ConnectorTypesByGrantKind,\n type ConnectorAuthClientConfigForMethod,\n type ConnectorAuthMethodConfigFor,\n type RefreshTokenAccessConnectorType,\n type ConnectorAccessConfig,\n type ConnectorAccessKind,\n type ConnectorBrowserAuthCallbackOrigin,\n type ConnectorAuthCodeCallbackOrigin,\n type ConnectorAuthCodeGrantConfig,\n type ConnectorAuthClientConfig,\n type ConnectorDeviceAuthGrantConfig,\n type ConnectorExternalCodeGrantConfig,\n type ConnectorOpenIdAuthGrantConfig,\n type ConnectorDeviceAuthStartOptionConfig,\n type ConnectorDeviceAuthStartOptions,\n type ConnectorDeviceAuthStartOptionsConfig,\n type ConnectorEnvBindings,\n type ConnectorGenerationType,\n type ConnectorGrantOutputBindings,\n type ConnectorGrantConfig,\n type ConnectorGrantKind,\n type ConnectorManualGrantFieldConfig,\n type ConnectorPlatformSecretName,\n type ConnectorRefreshTokenInputValueRef,\n type ConnectorRefreshTokenInputBindings,\n type ConnectorRefreshTokenOutputBindings,\n type ConnectorRevokeInputBindings,\n type ConnectorRevokeKind,\n type ConnectorSecretValueRef,\n type ConnectorOutputValueRef,\n type ConnectorVariableValueRef,\n type ConnectorEnvBindingValue,\n type ConnectorType,\n type AuthCodeGrantConnectorType,\n type DeviceAuthGrantConnectorType,\n type ExternalCodeGrantConnectorType,\n type OpenIdAuthGrantConnectorType,\n type ConnectorOpenIdAuthGrantAuthMethodId,\n type DynamicPublicConnectorAuthClientConfig,\n type StaticConfidentialConnectorAuthClientConfig,\n type StaticPublicConnectorAuthClientConfig,\n} from \"./connectors\";\nimport type { FeatureSwitchKey } from \"./feature-switch-key\";\n\nconst CONNECTOR_AUTH_METHOD_PRIORITY = {\n oauth: 0,\n openid: 1,\n cli: 2,\n \"api-token\": 3,\n api: 4,\n} as const satisfies Record<ConnectorAuthMethodId, number>;\nconst CONNECTOR_SECRET_REF_PREFIX = \"$secrets.\";\nconst CONNECTOR_VARIABLE_REF_PREFIX = \"$vars.\";\nconst DEFAULT_AUTH_CODE_CALLBACK_ORIGIN: ConnectorAuthCodeCallbackOrigin =\n \"web\";\n\nfunction connectorAuthMethodPriority(\n authMethod: ConnectorAuthMethodId,\n): number {\n return CONNECTOR_AUTH_METHOD_PRIORITY[authMethod];\n}\n\nexport function getConfiguredConnectorAuthMethodIds(\n type: ConnectorType,\n): ConnectorAuthMethodId[] {\n // Configured methods are raw registry entries; callers apply availability filters.\n return Object.keys(CONNECTOR_TYPES[type].authMethods)\n .map((authMethod) => {\n return connectorAuthMethodIdSchema.parse(authMethod);\n })\n .sort((a, b) => {\n const priorityDiff =\n connectorAuthMethodPriority(a) - connectorAuthMethodPriority(b);\n return priorityDiff === 0 ? a.localeCompare(b) : priorityDiff;\n });\n}\n\n/**\n * Connector utility vocabulary:\n *\n * - Available auth methods are user-selectable connection flows after\n * feature-switch and surface policy filtering.\n * - Runtime available connector types are connector types the current server\n * environment can offer as connection candidates.\n * - User connected connector types come from persisted connector rows.\n * - Runtime injection happens later when a run receives environment entries, secrets,\n * variables, and firewall context.\n */\n\n/**\n * Get one auth method config for a connector type.\n */\nexport function getConnectorAuthMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n>(type: Type, authMethod: Method): ConnectorAuthMethodConfigFor<Type, Method>;\nexport function getConnectorAuthMethod(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodConfig | undefined;\nexport function getConnectorAuthMethod(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodConfig | undefined {\n for (const [methodId, method] of Object.entries(\n CONNECTOR_TYPES[type].authMethods,\n )) {\n if (methodId === authMethod) {\n return method;\n }\n }\n return undefined;\n}\n\nexport function getConnectorAuthMethodIdsForGrantKind<\n Type extends ConnectorType,\n Kind extends ConnectorGrantKind,\n>(\n type: Type,\n grantKind: Kind,\n): ConnectorAuthMethodIdsByGrantKind<Type, Kind>[] {\n return getConfiguredConnectorAuthMethodIds(type).filter(\n (\n authMethod,\n ): authMethod is ConnectorAuthMethodIdsByGrantKind<Type, Kind> => {\n return connectorAuthMethodHasGrantKind(type, authMethod, grantKind);\n },\n );\n}\n\nfunction connectorAuthMethodHasAccessKind<\n Type extends ConnectorType,\n Kind extends ConnectorAccessKind,\n>(\n type: Type,\n authMethod: string,\n accessKind: Kind,\n): authMethod is ConnectorAuthMethodIdsByAccessKind<Type, Kind> {\n return getConnectorAuthMethod(type, authMethod)?.access.kind === accessKind;\n}\n\nexport function getConnectorAuthMethodIdsForAccessKind<\n Type extends ConnectorType,\n Kind extends ConnectorAccessKind,\n>(\n type: Type,\n accessKind: Kind,\n): ConnectorAuthMethodIdsByAccessKind<Type, Kind>[] {\n return getConfiguredConnectorAuthMethodIds(type).filter(\n (\n authMethod,\n ): authMethod is ConnectorAuthMethodIdsByAccessKind<Type, Kind> => {\n return connectorAuthMethodHasAccessKind(type, authMethod, accessKind);\n },\n );\n}\n\nfunction connectorAuthMethodHasRevokeKind<\n Type extends ConnectorType,\n Kind extends ConnectorRevokeKind,\n>(\n type: Type,\n authMethod: string,\n revokeKind: Kind,\n): authMethod is ConnectorAuthMethodIdsByRevokeKind<Type, Kind> {\n return getConnectorAuthMethod(type, authMethod)?.revoke.kind === revokeKind;\n}\n\nexport function getConnectorAuthMethodIdsForRevokeKind<\n Type extends ConnectorType,\n Kind extends ConnectorRevokeKind,\n>(\n type: Type,\n revokeKind: Kind,\n): ConnectorAuthMethodIdsByRevokeKind<Type, Kind>[] {\n return getConfiguredConnectorAuthMethodIds(type).filter(\n (\n authMethod,\n ): authMethod is ConnectorAuthMethodIdsByRevokeKind<Type, Kind> => {\n return connectorAuthMethodHasRevokeKind(type, authMethod, revokeKind);\n },\n );\n}\n\nfunction getManualGrantFields(\n method: ConnectorAuthMethodConfig | undefined,\n): Record<string, ConnectorManualGrantFieldConfig> | undefined {\n if (!method || method.grant.kind !== \"manual\") {\n return undefined;\n }\n return method.grant.fields;\n}\n\nexport interface ConnectorManualGrantFieldNames {\n readonly secrets: readonly string[];\n readonly variables: readonly string[];\n}\n\nfunction manualGrantFieldNames(\n fields: Record<string, ConnectorManualGrantFieldConfig>,\n): ConnectorManualGrantFieldNames {\n const secretNames: string[] = [];\n const variableNames: string[] = [];\n for (const [name, cfg] of Object.entries(fields)) {\n if (cfg.storage === \"variable\") {\n variableNames.push(name);\n } else {\n secretNames.push(name);\n }\n }\n return { secrets: secretNames, variables: variableNames };\n}\n\nexport function getConnectorManualGrantFieldNamesForAuthMethod(\n type: ConnectorType,\n authMethod: string,\n): ConnectorManualGrantFieldNames | null {\n const fields = getManualGrantFields(getConnectorAuthMethod(type, authMethod));\n return fields ? manualGrantFieldNames(fields) : null;\n}\n\nexport function getConnectorManualGrantFieldNames(\n type: ConnectorType,\n): ConnectorManualGrantFieldNames | null {\n const secretNames = new Set<string>();\n const variableNames = new Set<string>();\n for (const authMethod of getConfiguredConnectorAuthMethodIds(type)) {\n const fields = getConnectorManualGrantFieldNamesForAuthMethod(\n type,\n authMethod,\n );\n if (!fields) {\n continue;\n }\n fields.secrets.forEach((name) => {\n secretNames.add(name);\n });\n fields.variables.forEach((name) => {\n variableNames.add(name);\n });\n }\n\n if (secretNames.size === 0 && variableNames.size === 0) {\n return null;\n }\n return { secrets: [...secretNames], variables: [...variableNames] };\n}\n\nfunction addValueRefPrivateName(\n valueRef: ConnectorOutputValueRef,\n privateNames: Set<string>,\n): void {\n if (isConnectorSecretValueRef(valueRef)) {\n privateNames.add(connectorSecretNameFromValueRef(valueRef));\n return;\n }\n\n privateNames.add(connectorVariableNameFromValueRef(valueRef));\n}\n\nfunction addStoragePrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n for (const secret of method.storage.secrets) {\n privateNames.add(secret);\n }\n for (const variable of method.storage.variables) {\n privateNames.add(variable);\n }\n}\n\nfunction addGrantPrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n if (method.grant.kind === \"manual\") {\n for (const fieldName of Object.keys(method.grant.fields)) {\n privateNames.add(fieldName);\n }\n }\n if (\"outputs\" in method.grant) {\n for (const valueRef of Object.values(method.grant.outputs)) {\n addValueRefPrivateName(valueRef, privateNames);\n }\n }\n}\n\nfunction addAccessPrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n if (method.access.kind === \"none\") {\n return;\n }\n\n for (const [envName, binding] of Object.entries(method.access.envBindings)) {\n privateNames.add(envName);\n addValueRefPrivateName(\n typeof binding === \"string\" ? binding : binding.valueRef,\n privateNames,\n );\n }\n for (const platformSecret of method.access.platformSecrets ?? []) {\n privateNames.add(platformSecret);\n }\n}\n\nfunction addRefreshPrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n if (method.access.kind !== \"refresh-token\") {\n return;\n }\n\n for (const valueRef of Object.values(method.access.inputs)) {\n addValueRefPrivateName(valueRef, privateNames);\n }\n for (const valueRef of Object.values(method.access.outputs)) {\n addValueRefPrivateName(valueRef, privateNames);\n }\n for (const refreshableSecret of method.access.refreshableSecrets) {\n privateNames.add(refreshableSecret);\n }\n}\n\nfunction addRevokePrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n if (method.revoke.kind !== \"token-revoke\") {\n return;\n }\n\n for (const valueRef of Object.values(method.revoke.inputs)) {\n addValueRefPrivateName(valueRef, privateNames);\n }\n}\n\nfunction addClientPrivateNames(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n if (!(\"client\" in method) || !method.client) {\n return;\n }\n\n if (\"clientIdEnv\" in method.client) {\n privateNames.add(method.client.clientIdEnv);\n }\n if (\"clientSecretEnv\" in method.client) {\n privateNames.add(method.client.clientSecretEnv);\n }\n}\n\nfunction addPrivateNamesForAuthMethod(\n method: ConnectorAuthMethodConfig,\n privateNames: Set<string>,\n): void {\n addStoragePrivateNames(method, privateNames);\n addGrantPrivateNames(method, privateNames);\n addAccessPrivateNames(method, privateNames);\n addRefreshPrivateNames(method, privateNames);\n addRevokePrivateNames(method, privateNames);\n addClientPrivateNames(method, privateNames);\n}\n\n/**\n * Private connector implementation names that must not appear in public\n * catalog surfaces or public form ids.\n */\nexport function getConnectorAuthMethodPrivateNames(\n type: ConnectorType,\n authMethod: string,\n): readonly string[] {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return [];\n }\n const privateNames = new Set<string>();\n addPrivateNamesForAuthMethod(method, privateNames);\n return [...privateNames];\n}\n\nexport function getConnectorPrivateNames(\n type: ConnectorType,\n authMethods: readonly string[] = getConfiguredConnectorAuthMethodIds(type),\n): readonly string[] {\n const privateNames = new Set<string>();\n for (const authMethod of authMethods) {\n for (const privateName of getConnectorAuthMethodPrivateNames(\n type,\n authMethod,\n )) {\n privateNames.add(privateName);\n }\n }\n return [...privateNames];\n}\n\nfunction connectorAccessEnvBindings(\n access: ConnectorAccessConfig,\n): ConnectorEnvBindings {\n switch (access.kind) {\n case \"static\":\n case \"refresh-token\":\n return access.envBindings;\n case \"none\":\n return {};\n }\n}\n\nfunction connectorAccessRuntimeEnvBindings(\n access: ConnectorAccessConfig,\n): ConnectorRuntimeEnvBindings {\n return connectorRuntimeEnvBindings(connectorAccessEnvBindings(access));\n}\n\nfunction connectorAccessPlatformSecrets(\n access: ConnectorAccessConfig,\n): readonly ConnectorPlatformSecretName[] {\n switch (access.kind) {\n case \"static\":\n case \"refresh-token\":\n return access.platformSecrets ?? [];\n case \"none\":\n return [];\n }\n}\n\nexport type ConnectorAuthMethodAccessMetadata =\n | {\n readonly kind: \"static\";\n readonly envBindings: ConnectorRuntimeEnvBindings;\n readonly platformSecrets: readonly ConnectorPlatformSecretName[];\n }\n | {\n readonly kind: \"refresh-token\";\n readonly inputs: Readonly<\n Record<string, ConnectorRefreshTokenInputMetadata>\n >;\n readonly outputs: Readonly<\n Record<string, ConnectorRefreshTokenOutputMetadata>\n >;\n readonly refreshableSecrets: readonly string[];\n readonly envBindings: ConnectorRuntimeEnvBindings;\n readonly platformSecrets: readonly ConnectorPlatformSecretName[];\n }\n | {\n readonly kind: \"none\";\n readonly envBindings: ConnectorRuntimeEnvBindings;\n readonly platformSecrets: readonly ConnectorPlatformSecretName[];\n };\n\nexport type ConnectorRefreshTokenAccessMetadata = Extract<\n ConnectorAuthMethodAccessMetadata,\n { readonly kind: \"refresh-token\" }\n>;\n\nexport interface ConnectorRefreshTokenInputMetadata {\n readonly valueRef: string;\n readonly source: Extract<\n ConnectorRuntimeBindingSource,\n { readonly kind: \"connector-secret\" | \"connector-variable\" }\n >;\n}\n\nexport interface ConnectorRefreshTokenOutputMetadata {\n readonly valueRef: string;\n readonly target: ConnectorOutputTarget;\n}\n\nexport interface ConnectorRefreshTokenMetadata {\n readonly inputs: Readonly<Record<string, ConnectorRefreshTokenInputMetadata>>;\n readonly outputs: Readonly<\n Record<string, ConnectorRefreshTokenOutputMetadata>\n >;\n readonly refreshableSecrets: readonly string[];\n}\n\nexport interface ConnectorGrantOutputMetadata {\n readonly valueRef: string;\n readonly target: ConnectorOutputTarget;\n}\n\nexport type ConnectorAuthMethodGrantMetadata =\n | {\n readonly kind:\n | \"auth-code\"\n | \"openid-auth\"\n | \"external-code\"\n | \"device-auth\";\n readonly outputs: Readonly<Record<string, ConnectorGrantOutputMetadata>>;\n }\n | {\n readonly kind: \"manual\" | \"managed\";\n readonly outputs: Readonly<Record<string, ConnectorGrantOutputMetadata>>;\n };\n\nexport interface ConnectorRevokeInputMetadata {\n readonly valueRef: string;\n readonly secretName: string;\n}\n\nexport type ConnectorAuthMethodRevokeMetadata =\n | {\n readonly kind: \"token-revoke\";\n readonly inputs: Readonly<Record<string, ConnectorRevokeInputMetadata>>;\n }\n | {\n readonly kind: \"none\";\n readonly inputs: Readonly<Record<string, ConnectorRevokeInputMetadata>>;\n };\n\nexport type ConnectorRuntimeBindingSource =\n | {\n readonly kind: \"connector-secret\";\n readonly name: string;\n }\n | {\n readonly kind: \"connector-variable\";\n readonly name: string;\n }\n | {\n readonly kind: \"platform-secret\";\n readonly name: ConnectorPlatformSecretName;\n };\n\nexport type ConnectorOutputTarget =\n | {\n readonly kind: \"connector-secret\";\n readonly name: string;\n }\n | {\n readonly kind: \"connector-variable\";\n readonly name: string;\n };\n\nexport interface ConnectorRuntimeBindingEntry {\n readonly envName: string;\n readonly valueRef: string;\n readonly optional: boolean;\n readonly source: ConnectorRuntimeBindingSource;\n}\n\nexport interface ConnectorAuthMethodRuntimeMetadata {\n readonly storage: {\n readonly secrets: readonly string[];\n readonly variables: readonly string[];\n };\n readonly runtimeBindings: readonly ConnectorRuntimeBindingEntry[];\n}\n\nfunction isConnectorSecretValueRef(\n valueRef: ConnectorOutputValueRef,\n): valueRef is ConnectorSecretValueRef {\n return valueRef.startsWith(CONNECTOR_SECRET_REF_PREFIX);\n}\n\nfunction connectorSecretNameFromValueRef(\n valueRef: ConnectorSecretValueRef,\n): string {\n return valueRef.slice(CONNECTOR_SECRET_REF_PREFIX.length);\n}\n\nfunction connectorVariableNameFromValueRef(\n valueRef: ConnectorVariableValueRef,\n): string {\n return valueRef.slice(CONNECTOR_VARIABLE_REF_PREFIX.length);\n}\n\nfunction connectorRefreshInputMetadata(\n valueRef: ConnectorRefreshTokenInputValueRef,\n): ConnectorRefreshTokenInputMetadata {\n if (isConnectorSecretValueRef(valueRef)) {\n return {\n valueRef,\n source: {\n kind: \"connector-secret\",\n name: connectorSecretNameFromValueRef(valueRef),\n },\n };\n }\n\n const variableName = connectorVariableNameFromValueRef(valueRef);\n return {\n valueRef,\n source: { kind: \"connector-variable\", name: variableName },\n };\n}\n\nfunction connectorRefreshOutputMetadata(\n valueRef: ConnectorOutputValueRef,\n): ConnectorRefreshTokenOutputMetadata {\n return {\n valueRef,\n target: connectorOutputTargetFromValueRef(valueRef),\n };\n}\n\nfunction connectorGrantOutputMetadata(\n valueRef: ConnectorOutputValueRef,\n): ConnectorGrantOutputMetadata {\n return connectorRefreshOutputMetadata(valueRef);\n}\n\nfunction connectorOutputTargetFromValueRef(\n valueRef: ConnectorOutputValueRef,\n): ConnectorOutputTarget {\n if (isConnectorSecretValueRef(valueRef)) {\n return {\n kind: \"connector-secret\",\n name: connectorSecretNameFromValueRef(valueRef),\n };\n }\n\n return {\n kind: \"connector-variable\",\n name: connectorVariableNameFromValueRef(valueRef),\n };\n}\n\nfunction connectorRevokeInputMetadata(\n valueRef: ConnectorSecretValueRef,\n): ConnectorRevokeInputMetadata {\n return { valueRef, secretName: connectorSecretNameFromValueRef(valueRef) };\n}\n\nfunction connectorRefreshMetadata(args: {\n readonly inputs: ConnectorRefreshTokenInputBindings;\n readonly outputs: ConnectorRefreshTokenOutputBindings;\n readonly refreshableSecrets: readonly string[];\n}): ConnectorRefreshTokenMetadata {\n return {\n inputs: Object.fromEntries(\n Object.entries(args.inputs).map(([name, valueRef]) => {\n return [name, connectorRefreshInputMetadata(valueRef)];\n }),\n ),\n outputs: Object.fromEntries(\n Object.entries(args.outputs).map(([name, valueRef]) => {\n return [name, connectorRefreshOutputMetadata(valueRef)];\n }),\n ),\n refreshableSecrets: [...args.refreshableSecrets],\n };\n}\n\nexport function getConnectorAuthMethodAccessMetadata<\n Type extends RefreshTokenAccessConnectorType,\n Method extends ConnectorAuthMethodIdsByAccessKind<Type, \"refresh-token\">,\n>(type: Type, authMethod: Method): ConnectorRefreshTokenAccessMetadata;\nexport function getConnectorAuthMethodAccessMetadata(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodAccessMetadata | undefined;\nexport function getConnectorAuthMethodAccessMetadata(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodAccessMetadata | undefined {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return undefined;\n }\n\n switch (method.access.kind) {\n case \"static\": {\n return {\n kind: \"static\",\n envBindings: connectorAccessRuntimeEnvBindings(method.access),\n platformSecrets: method.access.platformSecrets ?? [],\n };\n }\n case \"refresh-token\":\n return {\n kind: \"refresh-token\",\n ...connectorRefreshMetadata(method.access),\n envBindings: connectorAccessRuntimeEnvBindings(method.access),\n platformSecrets: method.access.platformSecrets ?? [],\n };\n case \"none\":\n return {\n kind: \"none\",\n envBindings: {},\n platformSecrets: [],\n };\n }\n}\n\nfunction connectorGrantOutputMetadataMap(\n outputs: ConnectorGrantOutputBindings,\n): Record<string, ConnectorGrantOutputMetadata> {\n return Object.fromEntries(\n Object.entries(outputs).map(([name, valueRef]) => {\n return [name, connectorGrantOutputMetadata(valueRef)];\n }),\n );\n}\n\nexport function getConnectorAuthMethodGrantMetadata(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodGrantMetadata | undefined {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return undefined;\n }\n\n switch (method.grant.kind) {\n case \"auth-code\":\n case \"openid-auth\":\n case \"external-code\":\n case \"device-auth\":\n return {\n kind: method.grant.kind,\n outputs: connectorGrantOutputMetadataMap(method.grant.outputs),\n };\n case \"manual\":\n case \"managed\":\n return {\n kind: method.grant.kind,\n outputs: {},\n };\n }\n}\n\nexport function getConnectorGrantOutputTarget(\n metadata: ConnectorAuthMethodGrantMetadata,\n outputName: string,\n): ConnectorOutputTarget | undefined {\n return metadata.outputs[outputName]?.target;\n}\n\nfunction connectorRevokeInputMetadataMap(\n inputs: ConnectorRevokeInputBindings,\n): Record<string, ConnectorRevokeInputMetadata> {\n return Object.fromEntries(\n Object.entries(inputs).map(([name, valueRef]) => {\n return [name, connectorRevokeInputMetadata(valueRef)];\n }),\n );\n}\n\nexport function getConnectorAuthMethodRevokeMetadata(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodRevokeMetadata | undefined {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return undefined;\n }\n\n switch (method.revoke.kind) {\n case \"token-revoke\":\n return {\n kind: \"token-revoke\",\n inputs: connectorRevokeInputMetadataMap(method.revoke.inputs),\n };\n case \"none\":\n return {\n kind: \"none\",\n inputs: {},\n };\n }\n}\n\nexport function getConnectorRefreshOutputTarget(\n metadata: ConnectorAuthMethodAccessMetadata,\n outputName: string,\n): ConnectorOutputTarget | undefined {\n return metadata.kind === \"refresh-token\"\n ? metadata.outputs[outputName]?.target\n : undefined;\n}\n\nexport function getConnectorRuntimeBindingSecretName(\n metadata: ConnectorAuthMethodRuntimeMetadata,\n envName: string,\n): string | undefined {\n const binding = metadata.runtimeBindings.find((entry) => {\n return (\n entry.envName === envName && entry.source.kind === \"connector-secret\"\n );\n });\n return binding?.source.kind === \"connector-secret\"\n ? binding.source.name\n : undefined;\n}\n\nexport function getConnectorRuntimeBindingPlatformSecretName(\n metadata: ConnectorAuthMethodRuntimeMetadata,\n envName: string,\n): ConnectorPlatformSecretName | undefined {\n const binding = metadata.runtimeBindings.find((entry) => {\n return entry.envName === envName && entry.source.kind === \"platform-secret\";\n });\n return binding?.source.kind === \"platform-secret\"\n ? binding.source.name\n : undefined;\n}\n\nexport function connectorRefreshMetadataHasRefreshableSecret(\n metadata: ConnectorAuthMethodAccessMetadata,\n secretName: string,\n): boolean {\n return (\n metadata.kind === \"refresh-token\" &&\n metadata.refreshableSecrets.includes(secretName)\n );\n}\n\nfunction connectorPlatformSecretSource(\n secretName: string,\n platformSecrets: readonly ConnectorPlatformSecretName[],\n): ConnectorPlatformSecretName | undefined {\n return platformSecrets.find((platformSecret) => {\n return platformSecret === secretName;\n });\n}\n\nexport type ConnectorRuntimeEnvBindings = Record<\n string,\n ConnectorRefreshTokenInputValueRef\n>;\n\nfunction connectorEnvBindingValueRef(\n binding: ConnectorEnvBindingValue,\n): ConnectorRefreshTokenInputValueRef {\n return typeof binding === \"string\" ? binding : binding.valueRef;\n}\n\nfunction connectorEnvBindingIsOptional(\n binding: ConnectorEnvBindingValue,\n): boolean {\n return typeof binding === \"string\" ? false : (binding.optional ?? false);\n}\n\nfunction connectorRuntimeEnvBindings(\n envBindings: ConnectorEnvBindings,\n): ConnectorRuntimeEnvBindings {\n return Object.fromEntries(\n Object.entries(envBindings).map(([envName, binding]) => {\n return [envName, connectorEnvBindingValueRef(binding)];\n }),\n );\n}\n\nfunction connectorRuntimeBindingEntries(args: {\n readonly envBindings: ConnectorEnvBindings;\n readonly platformSecrets: readonly ConnectorPlatformSecretName[];\n}): ConnectorRuntimeBindingEntry[] {\n const entries: ConnectorRuntimeBindingEntry[] = [];\n for (const [envName, binding] of Object.entries(args.envBindings)) {\n const valueRef = connectorEnvBindingValueRef(binding);\n const optional = connectorEnvBindingIsOptional(binding);\n if (valueRef.startsWith(CONNECTOR_SECRET_REF_PREFIX)) {\n const secretName = valueRef.slice(CONNECTOR_SECRET_REF_PREFIX.length);\n const platformSecret = connectorPlatformSecretSource(\n secretName,\n args.platformSecrets,\n );\n entries.push({\n envName,\n valueRef,\n optional,\n source: platformSecret\n ? { kind: \"platform-secret\", name: platformSecret }\n : { kind: \"connector-secret\", name: secretName },\n });\n continue;\n }\n\n if (valueRef.startsWith(CONNECTOR_VARIABLE_REF_PREFIX)) {\n entries.push({\n envName,\n valueRef,\n optional,\n source: {\n kind: \"connector-variable\",\n name: valueRef.slice(CONNECTOR_VARIABLE_REF_PREFIX.length),\n },\n });\n }\n }\n return entries;\n}\n\nexport function getConnectorAuthMethodRuntimeMetadata(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthMethodRuntimeMetadata | undefined {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return undefined;\n }\n const platformSecrets = connectorAccessPlatformSecrets(method.access);\n return {\n storage: {\n secrets: [...method.storage.secrets],\n variables: [...method.storage.variables],\n },\n runtimeBindings: connectorRuntimeBindingEntries({\n envBindings: connectorAccessEnvBindings(method.access),\n platformSecrets,\n }),\n };\n}\n\nexport function connectorAuthMethodHasGrantKind<\n Type extends ConnectorType,\n Kind extends ConnectorGrantKind,\n>(\n type: Type,\n authMethod: string,\n grantKind: Kind,\n): authMethod is ConnectorAuthMethodIdsByGrantKind<Type, Kind> {\n const method = getConnectorAuthMethod(type, authMethod);\n return method?.grant.kind === grantKind;\n}\n\nexport interface ConnectorAuthMethodRef {\n readonly type: ConnectorType;\n readonly authMethod: ConnectorAuthMethodId;\n}\n\nexport type ConnectorAuthMethodRefByGrantKind<Kind extends ConnectorGrantKind> =\n {\n readonly [Type in ConnectorTypesByGrantKind<Kind>]: {\n readonly type: Type;\n readonly authMethod: ConnectorAuthMethodIdsByGrantKind<Type, Kind>;\n };\n }[ConnectorTypesByGrantKind<Kind>];\n\nexport type ConnectorAuthMethodRefByAccessKind<\n Kind extends ConnectorAccessKind,\n> = ConnectorAuthMethodRef & {\n readonly __connectorAuthMethodAccessKind?: Kind;\n};\n\nexport type ConnectorAuthMethodRefByRevokeKind<\n Kind extends ConnectorRevokeKind,\n> = ConnectorAuthMethodRef & {\n readonly __connectorAuthMethodRevokeKind?: Kind;\n};\n\nexport function connectorAuthMethodRefHasGrantKind<\n Kind extends ConnectorGrantKind,\n>(\n authMethodRef: ConnectorAuthMethodRef,\n grantKind: Kind,\n): authMethodRef is ConnectorAuthMethodRefByGrantKind<Kind> {\n return (\n getConnectorAuthMethod(authMethodRef.type, authMethodRef.authMethod)?.grant\n .kind === grantKind\n );\n}\n\nexport function connectorAuthMethodRefHasAccessKind<\n Kind extends ConnectorAccessKind,\n>(\n authMethodRef: ConnectorAuthMethodRef,\n accessKind: Kind,\n): authMethodRef is ConnectorAuthMethodRefByAccessKind<Kind> {\n return (\n getConnectorAuthMethod(authMethodRef.type, authMethodRef.authMethod)?.access\n .kind === accessKind\n );\n}\n\nexport function connectorAuthMethodRefHasRevokeKind<\n Kind extends ConnectorRevokeKind,\n>(\n authMethodRef: ConnectorAuthMethodRef,\n revokeKind: Kind,\n): authMethodRef is ConnectorAuthMethodRefByRevokeKind<Kind> {\n return (\n getConnectorAuthMethod(authMethodRef.type, authMethodRef.authMethod)?.revoke\n .kind === revokeKind\n );\n}\n\nexport function getConnectorAuthMethodAuthCodeGrantConfig<\n Type extends AuthCodeGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorAuthCodeGrantAuthMethodId<Type>,\n): ConnectorAuthCodeGrantConfig;\nexport function getConnectorAuthMethodAuthCodeGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthCodeGrantConfig | undefined;\nexport function getConnectorAuthMethodAuthCodeGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthCodeGrantConfig | undefined {\n const grant = getConnectorAuthMethod(type, authMethod)?.grant;\n return grant?.kind === \"auth-code\" ? grant : undefined;\n}\n\nexport function getConnectorAuthMethodOpenIdAuthGrantConfig<\n Type extends OpenIdAuthGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorOpenIdAuthGrantAuthMethodId<Type>,\n): ConnectorOpenIdAuthGrantConfig;\nexport function getConnectorAuthMethodOpenIdAuthGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorOpenIdAuthGrantConfig | undefined;\nexport function getConnectorAuthMethodOpenIdAuthGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorOpenIdAuthGrantConfig | undefined {\n const grant = getConnectorAuthMethod(type, authMethod)?.grant;\n return grant?.kind === \"openid-auth\" ? grant : undefined;\n}\n\nexport function getConnectorAuthMethodOpenIdAuthCallbackOrigin<\n Type extends OpenIdAuthGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorOpenIdAuthGrantAuthMethodId<Type>,\n): ConnectorBrowserAuthCallbackOrigin;\nexport function getConnectorAuthMethodOpenIdAuthCallbackOrigin(\n type: ConnectorType,\n authMethod: string,\n): ConnectorBrowserAuthCallbackOrigin | undefined;\nexport function getConnectorAuthMethodOpenIdAuthCallbackOrigin(\n type: ConnectorType,\n authMethod: string,\n): ConnectorBrowserAuthCallbackOrigin | undefined {\n const grant = getConnectorAuthMethodOpenIdAuthGrantConfig(type, authMethod);\n if (!grant) {\n return undefined;\n }\n return grant.callbackOrigin ?? \"api\";\n}\n\nexport function getConnectorAuthMethodAuthCodeCallbackOrigin<\n Type extends AuthCodeGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorAuthCodeGrantAuthMethodId<Type>,\n): ConnectorAuthCodeCallbackOrigin;\nexport function getConnectorAuthMethodAuthCodeCallbackOrigin(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthCodeCallbackOrigin | undefined;\nexport function getConnectorAuthMethodAuthCodeCallbackOrigin(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthCodeCallbackOrigin | undefined {\n const grant = getConnectorAuthMethodAuthCodeGrantConfig(type, authMethod);\n if (!grant) {\n return undefined;\n }\n return grant.callbackOrigin ?? DEFAULT_AUTH_CODE_CALLBACK_ORIGIN;\n}\n\nexport function connectorAuthCodeCallbacksUseOnlyApiOrigin(\n type: AuthCodeGrantConnectorType,\n): boolean {\n const authMethods = getConnectorAuthMethodIdsForGrantKind(type, \"auth-code\");\n return authMethods.every((authMethod) => {\n return (\n getConnectorAuthMethodAuthCodeCallbackOrigin(type, authMethod) === \"api\"\n );\n });\n}\n\nexport function getConnectorAuthMethodExternalCodeGrantConfig<\n Type extends ExternalCodeGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorExternalCodeGrantAuthMethodId<Type>,\n): ConnectorExternalCodeGrantConfig;\nexport function getConnectorAuthMethodExternalCodeGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorExternalCodeGrantConfig | undefined;\nexport function getConnectorAuthMethodExternalCodeGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorExternalCodeGrantConfig | undefined {\n const grant = getConnectorAuthMethod(type, authMethod)?.grant;\n return grant?.kind === \"external-code\" ? grant : undefined;\n}\n\nexport function getConnectorAuthMethodDeviceAuthGrantConfig<\n Type extends DeviceAuthGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorDeviceAuthGrantAuthMethodId<Type>,\n): ConnectorDeviceAuthGrantConfig;\nexport function getConnectorAuthMethodDeviceAuthGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorDeviceAuthGrantConfig | undefined;\nexport function getConnectorAuthMethodDeviceAuthGrantConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorDeviceAuthGrantConfig | undefined {\n const grant = getConnectorAuthMethod(type, authMethod)?.grant;\n return grant?.kind === \"device-auth\" ? grant : undefined;\n}\n\nexport function getConnectorAuthMethodDeviceAuthStartOptionsConfig<\n Type extends DeviceAuthGrantConnectorType,\n>(\n type: Type,\n authMethod: ConnectorDeviceAuthGrantAuthMethodId<Type>,\n): ConnectorDeviceAuthStartOptionsConfig | undefined;\nexport function getConnectorAuthMethodDeviceAuthStartOptionsConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorDeviceAuthStartOptionsConfig | undefined;\nexport function getConnectorAuthMethodDeviceAuthStartOptionsConfig(\n type: ConnectorType,\n authMethod: string,\n): ConnectorDeviceAuthStartOptionsConfig | undefined {\n return getConnectorAuthMethodDeviceAuthGrantConfig(type, authMethod)\n ?.startOptions;\n}\n\nexport type ConnectorDeviceAuthStartOptionsParseResult =\n | {\n readonly success: true;\n readonly options: ConnectorDeviceAuthStartOptions;\n }\n | {\n readonly success: false;\n readonly message: string;\n };\n\nfunction parseConnectorDeviceAuthStartOption(args: {\n readonly type: ConnectorType;\n readonly authMethod: string;\n readonly optionName: string;\n readonly config: ConnectorDeviceAuthStartOptionConfig;\n readonly requestedValue: string | undefined;\n}): ConnectorDeviceAuthStartOptionsParseResult {\n const value = args.requestedValue ?? args.config.defaultValue;\n if (value === undefined) {\n if (args.config.required) {\n return {\n success: false,\n message: `${args.type} ${args.authMethod} device-auth start option ${args.optionName} is required`,\n };\n }\n return { success: true, options: {} };\n }\n\n switch (args.config.kind) {\n case \"select\": {\n if (\n !args.config.options.some((option) => {\n return option.value === value;\n })\n ) {\n return {\n success: false,\n message: `${args.type} ${args.authMethod} device-auth start option ${args.optionName} must be one of: ${args.config.options\n .map((option) => {\n return option.value;\n })\n .join(\", \")}`,\n };\n }\n return { success: true, options: { [args.optionName]: value } };\n }\n }\n}\n\nfunction connectorDeviceAuthStartOptionValue(\n options: ConnectorDeviceAuthStartOptions | undefined,\n optionName: string,\n): string | undefined {\n if (!options || !Object.hasOwn(options, optionName)) {\n return undefined;\n }\n return options[optionName];\n}\n\nexport function parseConnectorDeviceAuthStartOptions(args: {\n readonly type: ConnectorType;\n readonly authMethod: string;\n readonly options: ConnectorDeviceAuthStartOptions | undefined;\n}): ConnectorDeviceAuthStartOptionsParseResult {\n const configuredOptions = getConnectorAuthMethodDeviceAuthStartOptionsConfig(\n args.type,\n args.authMethod,\n );\n const requestedOptionKeys = Object.keys(args.options ?? {});\n\n if (!configuredOptions || Object.keys(configuredOptions).length === 0) {\n if (requestedOptionKeys.length === 0) {\n return { success: true, options: {} };\n }\n return {\n success: false,\n message: `${args.type} ${args.authMethod} device-auth start options are not supported: ${requestedOptionKeys.join(\", \")}`,\n };\n }\n\n for (const optionName of requestedOptionKeys) {\n if (!Object.hasOwn(configuredOptions, optionName)) {\n return {\n success: false,\n message: `${args.type} ${args.authMethod} device-auth start option ${optionName} is not supported`,\n };\n }\n }\n\n const normalizedOptions: Record<string, string> = {};\n for (const [optionName, config] of Object.entries(configuredOptions)) {\n const parsedOption = parseConnectorDeviceAuthStartOption({\n type: args.type,\n authMethod: args.authMethod,\n optionName,\n config,\n requestedValue: connectorDeviceAuthStartOptionValue(\n args.options,\n optionName,\n ),\n });\n if (!parsedOption.success) {\n return parsedOption;\n }\n for (const [parsedOptionName, parsedOptionValue] of Object.entries(\n parsedOption.options,\n )) {\n normalizedOptions[parsedOptionName] = parsedOptionValue;\n }\n }\n\n return { success: true, options: normalizedOptions };\n}\n\nfunction connectorGrantScopes(\n grant: ConnectorGrantConfig | undefined,\n): readonly string[] {\n switch (grant?.kind) {\n case \"auth-code\":\n case \"external-code\":\n case \"device-auth\":\n return grant.scopes;\n case \"openid-auth\":\n case \"manual\":\n case \"managed\":\n case undefined:\n return [];\n }\n}\n\nexport function getConnectorAuthMethodGrantScopes(\n type: ConnectorType,\n authMethod: string,\n): string[] {\n return [\n ...connectorGrantScopes(getConnectorAuthMethod(type, authMethod)?.grant),\n ];\n}\n\nexport function getConnectorGenerationTypes(\n type: ConnectorType,\n): readonly ConnectorGenerationType[] {\n const config = CONNECTOR_TYPES[type];\n return \"generation\" in config ? (config.generation ?? []) : [];\n}\n\nexport function getConnectorTags(type: ConnectorType): readonly string[] {\n const config = CONNECTOR_TYPES[type];\n return \"tags\" in config ? (config.tags ?? []) : [];\n}\n\nexport type ConnectorFeatureStates =\n | Partial<Record<FeatureSwitchKey, boolean>>\n | null\n | undefined;\n\nexport type ApiAuthMethodPolicy =\n | \"exclude\"\n | \"include\"\n | { readonly includeForTypes: readonly ConnectorType[] };\n\nexport interface AvailableConnectorAuthMethodsOptions {\n readonly apiAuthMethodPolicy?: ApiAuthMethodPolicy;\n}\n\nexport function isConnectorAuthMethodAvailable(\n type: ConnectorType,\n authMethod: ConnectorAuthMethodId,\n featureStates: ConnectorFeatureStates,\n): boolean {\n const method = getConnectorAuthMethod(type, authMethod);\n if (!method) {\n return false;\n }\n if (method.visible === false) {\n return false;\n }\n return !method.featureFlag || !!featureStates?.[method.featureFlag];\n}\n\nfunction shouldIncludeApiAuthMethod(\n type: ConnectorType,\n policy: ApiAuthMethodPolicy | undefined,\n): boolean {\n switch (policy) {\n case \"include\":\n return true;\n case \"exclude\":\n case undefined:\n return false;\n }\n return policy.includeForTypes.includes(type);\n}\n\n/**\n * Return user-selectable connector connection flows for a surface.\n *\n * This includes static visibility, feature-switch, and surface policy filtering.\n * It does not describe persisted connected state.\n */\nexport function getAvailableConnectorAuthMethodIds(\n type: ConnectorType,\n featureStates: ConnectorFeatureStates,\n options: AvailableConnectorAuthMethodsOptions = {},\n): ConnectorAuthMethodId[] {\n const apiAuthMethodPolicy = options.apiAuthMethodPolicy ?? \"exclude\";\n const availableAuthMethodIds: ConnectorAuthMethodId[] = [];\n const configuredAuthMethodIds = getConfiguredConnectorAuthMethodIds(type);\n\n for (const authMethod of configuredAuthMethodIds) {\n const method = getConnectorAuthMethod(type, authMethod);\n switch (method?.grant.kind) {\n case \"managed\": {\n if (!shouldIncludeApiAuthMethod(type, apiAuthMethodPolicy)) {\n continue;\n }\n break;\n }\n case \"openid-auth\":\n case \"auth-code\":\n case \"external-code\":\n case \"device-auth\":\n case \"manual\": {\n break;\n }\n case undefined: {\n continue;\n }\n }\n if (isConnectorAuthMethodAvailable(type, authMethod, featureStates)) {\n availableAuthMethodIds.push(authMethod);\n }\n }\n\n return availableAuthMethodIds;\n}\n\nexport type ConnectorEnvReader = (name: string) => string | undefined;\n\nexport type StaticConfidentialConnectorAuthClient = {\n readonly clientRegistration: \"static\";\n readonly clientType: \"confidential\";\n readonly clientId: string;\n readonly clientSecret: string;\n};\n\nexport type StaticConfidentialConnectorAuthClientIdentity = {\n readonly clientRegistration: \"static\";\n readonly clientType: \"confidential\";\n readonly clientId: string;\n};\n\nexport type StaticPublicConnectorAuthClient = {\n readonly clientRegistration: \"static\";\n readonly clientType: \"public\";\n readonly clientId: string;\n};\n\nexport type DynamicPublicConnectorAuthClient = {\n readonly clientRegistration: \"dynamic\";\n readonly clientType: \"public\";\n};\n\nexport type StaticConnectorAuthClient =\n | StaticConfidentialConnectorAuthClient\n | StaticPublicConnectorAuthClient;\n\nexport type ConnectorAuthClient =\n | StaticConnectorAuthClient\n | DynamicPublicConnectorAuthClient;\n\nexport type ConnectorAuthClientIdentity =\n | StaticConfidentialConnectorAuthClientIdentity\n | StaticPublicConnectorAuthClient\n | DynamicPublicConnectorAuthClient;\n\nexport type ConnectorAuthClientForConfig<\n Client extends ConnectorAuthClientConfig,\n> = Client extends StaticConfidentialConnectorAuthClientConfig\n ? StaticConfidentialConnectorAuthClient\n : Client extends StaticPublicConnectorAuthClientConfig\n ? StaticPublicConnectorAuthClient\n : Client extends DynamicPublicConnectorAuthClientConfig\n ? DynamicPublicConnectorAuthClient\n : never;\n\nexport type ConnectorAuthClientForMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n> = ConnectorAuthClientForConfig<\n ConnectorAuthClientConfigForMethod<Type, Method>\n>;\n\nexport type ConnectorAuthClientIdentityForConfig<\n Client extends ConnectorAuthClientConfig,\n> = Client extends StaticConfidentialConnectorAuthClientConfig\n ? StaticConfidentialConnectorAuthClientIdentity\n : Client extends StaticPublicConnectorAuthClientConfig\n ? StaticPublicConnectorAuthClient\n : Client extends DynamicPublicConnectorAuthClientConfig\n ? DynamicPublicConnectorAuthClient\n : never;\n\nexport type ConnectorAuthClientIdentityForMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n> = ConnectorAuthClientIdentityForConfig<\n ConnectorAuthClientConfigForMethod<Type, Method>\n>;\n\nexport type ConnectorResolvedAuthMethodClient<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n> = {\n readonly type: Type;\n readonly authMethod: Method;\n readonly authClient: ConnectorAuthClientForMethod<Type, Method>;\n};\n\nexport type ConnectorGrantKindWithAuthClient =\n | \"auth-code\"\n | \"external-code\"\n | \"device-auth\";\n\nexport type ConnectorResolvedAuthMethodClientByGrantKind<\n Kind extends ConnectorGrantKindWithAuthClient,\n> = {\n readonly [Type in ConnectorTypesByGrantKind<Kind>]: {\n readonly [Method in ConnectorAuthMethodIdsByGrantKind<\n Type,\n Kind\n >]: ConnectorResolvedAuthMethodClient<Type, Method>;\n }[ConnectorAuthMethodIdsByGrantKind<Type, Kind>];\n}[ConnectorTypesByGrantKind<Kind>];\n\nexport type ConnectorResolvedAuthMethodClientByAccessKind<\n Kind extends \"refresh-token\",\n> = {\n readonly [Type in ConnectorTypesByAccessKind<Kind>]: {\n readonly [Method in ConnectorAuthMethodIdsByAccessKind<\n Type,\n Kind\n >]: ConnectorResolvedAuthMethodClient<Type, Method>;\n }[ConnectorAuthMethodIdsByAccessKind<Type, Kind>];\n}[ConnectorTypesByAccessKind<Kind>];\n\nexport function isStaticConnectorAuthClient(\n authClient: ConnectorAuthClient,\n): authClient is StaticConnectorAuthClient {\n return authClient.clientRegistration === \"static\";\n}\n\nexport function isStaticConfidentialConnectorAuthClient(\n authClient: ConnectorAuthClient,\n): authClient is StaticConfidentialConnectorAuthClient {\n return (\n isStaticConnectorAuthClient(authClient) &&\n authClient.clientType === \"confidential\"\n );\n}\n\nexport function connectorAuthClientIdentity(\n authClient: StaticConfidentialConnectorAuthClient,\n): StaticConfidentialConnectorAuthClientIdentity;\nexport function connectorAuthClientIdentity(\n authClient: StaticPublicConnectorAuthClient,\n): StaticPublicConnectorAuthClient;\nexport function connectorAuthClientIdentity(\n authClient: DynamicPublicConnectorAuthClient,\n): DynamicPublicConnectorAuthClient;\nexport function connectorAuthClientIdentity(\n authClient: ConnectorAuthClient,\n): ConnectorAuthClientIdentity;\nexport function connectorAuthClientIdentity(\n authClient: ConnectorAuthClient,\n): ConnectorAuthClientIdentity {\n switch (authClient.clientRegistration) {\n case \"dynamic\":\n return authClient;\n case \"static\":\n return {\n clientRegistration: \"static\",\n clientType: authClient.clientType,\n clientId: authClient.clientId,\n };\n }\n}\n\nexport function connectorAuthClientIdentityForMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n>(\n authClient: ConnectorAuthClientForMethod<Type, Method>,\n): ConnectorAuthClientIdentityForMethod<Type, Method> {\n return connectorAuthClientIdentity(\n authClient,\n ) as ConnectorAuthClientIdentityForMethod<Type, Method>;\n}\n\nexport function getConnectorAuthClientConfigForMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n>(\n type: Type,\n authMethod: Method,\n): ConnectorAuthClientConfigForMethod<Type, Method> | undefined;\nexport function getConnectorAuthClientConfigForMethod(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthClientConfig | undefined;\nexport function getConnectorAuthClientConfigForMethod(\n type: ConnectorType,\n authMethod: string,\n): ConnectorAuthClientConfig | undefined {\n return getConnectorAuthMethod(type, authMethod)?.client;\n}\n\nexport function resolveConnectorAuthClient<\n Client extends ConnectorAuthClientConfig,\n>(\n client: Client,\n readEnv: ConnectorEnvReader,\n): ConnectorAuthClientForConfig<Client> | undefined;\nexport function resolveConnectorAuthClient(\n client: ConnectorAuthClientConfig,\n readEnv: ConnectorEnvReader,\n): ConnectorAuthClient | undefined {\n if (client.clientRegistration === \"dynamic\") {\n return { clientRegistration: \"dynamic\", clientType: \"public\" };\n }\n\n if (\"clientId\" in client) {\n if (client.clientType === \"confidential\") {\n return {\n clientRegistration: \"static\",\n clientType: \"confidential\",\n clientId: client.clientId,\n clientSecret: client.clientSecret,\n };\n }\n return {\n clientRegistration: \"static\",\n clientType: \"public\",\n clientId: client.clientId,\n };\n }\n\n const clientId = readEnv(client.clientIdEnv);\n if (!clientId) {\n return undefined;\n }\n\n if (client.clientType === \"public\") {\n return { clientRegistration: \"static\", clientType: \"public\", clientId };\n }\n\n const clientSecret = readEnv(client.clientSecretEnv);\n if (!clientSecret) {\n return undefined;\n }\n\n return {\n clientRegistration: \"static\",\n clientType: \"confidential\",\n clientId,\n clientSecret,\n };\n}\n\nexport function resolveConnectorAuthClientForMethod<\n Type extends ConnectorType,\n Method extends ConnectorAuthMethodIds<Type>,\n>(\n type: Type,\n authMethod: Method,\n readEnv: ConnectorEnvReader,\n): ConnectorAuthClientForMethod<Type, Method> | undefined;\nexport function resolveConnectorAuthClientForMethod(\n type: ConnectorType,\n authMethod: string,\n readEnv: ConnectorEnvReader,\n): ConnectorAuthClient | undefined;\nexport function resolveConnectorAuthClientForMethod(\n type: ConnectorType,\n authMethod: string,\n readEnv: ConnectorEnvReader,\n): ConnectorAuthClient | undefined {\n const clientConfig = getConnectorAuthClientConfigForMethod(type, authMethod);\n if (!clientConfig) {\n return undefined;\n }\n return resolveConnectorAuthClient(clientConfig, readEnv);\n}\n\ntype AnyConnectorResolvedAuthMethodClient = {\n readonly type: ConnectorType;\n readonly authMethod: ConnectorAuthMethodId;\n readonly authClient: ConnectorAuthClient;\n};\n\nfunction resolveConnectorResolvedAuthMethodClient(\n authMethodRef: ConnectorAuthMethodRef,\n readEnv: ConnectorEnvReader,\n): AnyConnectorResolvedAuthMethodClient | undefined {\n const authClient = resolveConnectorAuthClientForMethod(\n authMethodRef.type,\n authMethodRef.authMethod,\n readEnv,\n );\n if (!authClient) {\n return undefined;\n }\n return {\n type: authMethodRef.type,\n authMethod: authMethodRef.authMethod,\n authClient,\n };\n}\n\nexport function resolveConnectorResolvedAuthMethodClientByGrantKind(\n authMethodRef: ConnectorAuthMethodRefByGrantKind<\"auth-code\">,\n readEnv: ConnectorEnvReader,\n): ConnectorResolvedAuthMethodClientByGrantKind<\"auth-code\"> | undefined;\nexport function resolveConnectorResolvedAuthMethodClientByGrantKind(\n authMethodRef: ConnectorAuthMethodRefByGrantKind<\"external-code\">,\n readEnv: ConnectorEnvReader,\n): ConnectorResolvedAuthMethodClientByGrantKind<\"external-code\"> | undefined;\nexport function resolveConnectorResolvedAuthMethodClientByGrantKind(\n authMethodRef: ConnectorAuthMethodRefByGrantKind<\"device-auth\">,\n readEnv: ConnectorEnvReader,\n): ConnectorResolvedAuthMethodClientByGrantKind<\"device-auth\"> | undefined;\nexport function resolveConnectorResolvedAuthMethodClientByGrantKind(\n authMethodRef: ConnectorAuthMethodRefByGrantKind<ConnectorGrantKindWithAuthClient>,\n readEnv: ConnectorEnvReader,\n): AnyConnectorResolvedAuthMethodClient | undefined {\n return resolveConnectorResolvedAuthMethodClient(authMethodRef, readEnv);\n}\n\nexport function resolveConnectorResolvedAuthMethodClientByAccessKind(\n authMethodRef: ConnectorAuthMethodRefByAccessKind<\"refresh-token\">,\n readEnv: ConnectorEnvReader,\n): ConnectorResolvedAuthMethodClientByAccessKind<\"refresh-token\"> | undefined;\nexport function resolveConnectorResolvedAuthMethodClientByAccessKind(\n authMethodRef: ConnectorAuthMethodRefByAccessKind<\"refresh-token\">,\n readEnv: ConnectorEnvReader,\n): AnyConnectorResolvedAuthMethodClient | undefined {\n return resolveConnectorResolvedAuthMethodClient(authMethodRef, readEnv);\n}\n\nfunction hasRuntimeAvailableAuthMethod(\n readEnv: ConnectorEnvReader,\n type: ConnectorType,\n): boolean {\n for (const authMethod of getConfiguredConnectorAuthMethodIds(type)) {\n const method = getConnectorAuthMethod(type, authMethod);\n switch (method?.grant.kind) {\n case \"auth-code\":\n case \"external-code\":\n case \"device-auth\": {\n if (resolveConnectorAuthClientForMethod(type, authMethod, readEnv)) {\n return true;\n }\n break;\n }\n case \"openid-auth\": {\n return true;\n }\n case \"manual\": {\n return true;\n }\n case \"managed\":\n case undefined: {\n break;\n }\n }\n }\n return false;\n}\n\n/**\n * Return connector types the current runtime can offer as connection candidates.\n *\n * This is not user connected state and it does not evaluate feature switches.\n * It includes connectors with user-entered manual grant methods because they\n * do not require a server auth client, while auth-provider methods require\n * their runtime client env to exist unless their client config is static inline.\n */\nexport function getRuntimeAvailableConnectorTypes(\n readEnv: ConnectorEnvReader,\n): ConnectorType[] {\n const runtimeAvailable = new Set<ConnectorType>();\n\n for (const type of CONNECTOR_TYPE_KEYS) {\n if (hasRuntimeAvailableAuthMethod(readEnv, type)) {\n runtimeAvailable.add(type);\n }\n }\n\n return [...runtimeAvailable].sort();\n}\n\n/**\n * Get connector-owned secret storage names for a specific auth method.\n */\nexport function getConnectorOwnedSecretNames(\n type: ConnectorType,\n authMethod: string,\n): string[] {\n return connectorAuthMethodOwnedSecretNames(\n getConnectorAuthMethod(type, authMethod),\n );\n}\n\n/**\n * Get connector-owned variable storage names for a specific auth method.\n */\nexport function getConnectorOwnedVariableNames(\n type: ConnectorType,\n authMethod: string,\n): string[] {\n return connectorAuthMethodOwnedVariableNames(\n getConnectorAuthMethod(type, authMethod),\n );\n}\n\nfunction connectorAuthMethodOwnedSecretNames(\n method: ConnectorAuthMethodConfig | undefined,\n): string[] {\n return method ? [...method.storage.secrets] : [];\n}\n\nfunction connectorAuthMethodOwnedVariableNames(\n method: ConnectorAuthMethodConfig | undefined,\n): string[] {\n return method ? [...method.storage.variables] : [];\n}\n\n/**\n * Get runtime environment bindings for a specific connector auth method.\n */\nexport function getConnectorAuthMethodEnvBindings(\n type: ConnectorType,\n authMethod: string,\n): ConnectorRuntimeEnvBindings {\n const method = getConnectorAuthMethod(type, authMethod);\n return method ? connectorAccessRuntimeEnvBindings(method.access) : {};\n}\n\nexport interface ConnectorEnvBindingEntry {\n readonly authMethod: ConnectorAuthMethodId;\n readonly envName: string;\n readonly valueRef: string;\n}\n\n/**\n * Get all configured environment binding entries across auth methods.\n *\n * This is for discovery and reverse lookup. Runtime injection must use\n * getConnectorAuthMethodEnvBindings() with the selected auth method.\n */\nexport function getConnectorEnvBindingEntries(\n type: ConnectorType,\n): ConnectorEnvBindingEntry[] {\n const entries: ConnectorEnvBindingEntry[] = [];\n for (const authMethod of getConfiguredConnectorAuthMethodIds(type)) {\n const envBindings = getConnectorAuthMethodEnvBindings(type, authMethod);\n for (const [envName, valueRef] of Object.entries(envBindings)) {\n entries.push({ authMethod, envName, valueRef });\n }\n }\n return entries;\n}\n\nexport interface ConnectorStoredSecretDisplayInfo {\n readonly connectorLabel: string;\n readonly envNames: string[];\n}\n\n/**\n * Diagnostic/display lookup for a stored connector secret name.\n *\n * This reverse-searches registry metadata to explain which runtime env aliases\n * can expose a stored secret. Runtime injection must use selected auth method\n * storage metadata instead.\n */\nexport function getConnectorStoredSecretDisplayInfo(\n secretName: string,\n): ConnectorStoredSecretDisplayInfo | null {\n const allTypes = CONNECTOR_TYPE_KEYS;\n\n for (const type of allTypes) {\n const config = CONNECTOR_TYPES[type];\n\n const found = Object.values(config.authMethods).some((method) => {\n return connectorAuthMethodOwnedSecretNames(method).includes(secretName);\n });\n if (!found) {\n continue;\n }\n\n const envNames = [\n ...new Set(\n getConnectorEnvBindingEntries(type)\n .filter(({ valueRef }) => {\n return valueRef === `$secrets.${secretName}`;\n })\n .map(({ envName }) => {\n return envName;\n }),\n ),\n ];\n\n if (envNames.length > 0) {\n return { connectorLabel: config.label, envNames };\n }\n }\n\n return null;\n}\n\n/**\n * Diagnostic lookup for a runtime env alias declared by connector env bindings.\n *\n * This is for human-facing commands such as CLI doctor; runtime connector\n * behavior must use selected auth method metadata.\n */\nexport function getDiagnosticConnectorTypeForRuntimeEnvName(\n envName: string,\n): ConnectorType | null {\n for (const type of CONNECTOR_TYPE_KEYS) {\n const hasEnvName = getConnectorEnvBindingEntries(type).some((entry) => {\n return entry.envName === envName;\n });\n if (hasEnvName) {\n return type;\n }\n }\n return null;\n}\n\nexport function hasConnectorAuthCodeGrant(\n type: ConnectorType,\n): type is AuthCodeGrantConnectorType {\n return getConnectorAuthMethodIdsForGrantKind(type, \"auth-code\").length > 0;\n}\n\nexport function hasConnectorOpenIdAuthGrant(\n type: ConnectorType,\n): type is OpenIdAuthGrantConnectorType {\n return getConnectorAuthMethodIdsForGrantKind(type, \"openid-auth\").length > 0;\n}\n\nexport function hasConnectorExternalCodeGrant(\n type: ConnectorType,\n): type is ExternalCodeGrantConnectorType {\n return (\n getConnectorAuthMethodIdsForGrantKind(type, \"external-code\").length > 0\n );\n}\n\nexport function hasConnectorDeviceAuthGrant(\n type: ConnectorType,\n): type is DeviceAuthGrantConnectorType {\n return getConnectorAuthMethodIdsForGrantKind(type, \"device-auth\").length > 0;\n}\n\nfunction hasRequiredGrantScopes(\n requiredScopes: readonly string[],\n storedScopes: string[] | null,\n): boolean {\n if (requiredScopes.length === 0) return true;\n if (!storedScopes) return false;\n const storedSet = new Set(storedScopes);\n return requiredScopes.every((s) => {\n return storedSet.has(s);\n });\n}\n\n/**\n * Compute the diff between currently required scopes and stored scopes for a connector.\n */\nexport interface ScopeDiff {\n addedScopes: string[];\n removedScopes: string[];\n currentScopes: string[];\n storedScopes: string[];\n}\n\nfunction scopeDiff(\n currentScopes: readonly string[],\n storedScopes: string[] | null,\n): ScopeDiff {\n const stored = storedScopes ?? [];\n const storedSet = new Set(stored);\n const currentSet = new Set(currentScopes);\n\n return {\n addedScopes: currentScopes.filter((s) => {\n return !storedSet.has(s);\n }),\n removedScopes: stored.filter((s) => {\n return !currentSet.has(s);\n }),\n currentScopes: [...currentScopes],\n storedScopes: stored,\n };\n}\n\nexport function hasRequiredConnectorAuthMethodScopes(\n connectorType: ConnectorType,\n authMethod: string,\n storedScopes: string[] | null,\n): boolean {\n return hasRequiredGrantScopes(\n getConnectorAuthMethodGrantScopes(connectorType, authMethod),\n storedScopes,\n );\n}\n\nexport function getConnectorAuthMethodScopeDiff(\n connectorType: ConnectorType,\n authMethod: string,\n storedScopes: string[] | null,\n): ScopeDiff {\n return scopeDiff(\n getConnectorAuthMethodGrantScopes(connectorType, authMethod),\n storedScopes,\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;AA0DA,IAAM,iCAAiC;AAAA,EACrC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,aAAa;AAAA,EACb,KAAK;AACP;AAMA,SAAS,4BACP,YACQ;AACR,SAAO,+BAA+B,UAAU;AAClD;AAEO,SAAS,oCACd,MACyB;AAEzB,SAAO,OAAO,KAAK,gBAAgB,IAAI,EAAE,WAAW,EACjD,IAAI,CAAC,eAAe;AACnB,WAAO,4BAA4B,MAAM,UAAU;AAAA,EACrD,CAAC,EACA,KAAK,CAAC,GAAG,MAAM;AACd,UAAM,eACJ,4BAA4B,CAAC,IAAI,4BAA4B,CAAC;AAChE,WAAO,iBAAiB,IAAI,EAAE,cAAc,CAAC,IAAI;AAAA,EACnD,CAAC;AACL;AAyBO,SAAS,uBACd,MACA,YACuC;AACvC,aAAW,CAAC,UAAU,MAAM,KAAK,OAAO;AAAA,IACtC,gBAAgB,IAAI,EAAE;AAAA,EACxB,GAAG;AACD,QAAI,aAAa,YAAY;AAC3B,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAiSA,SAAS,2BACP,QACsB;AACtB,UAAQ,OAAO,MAAM;AAAA,IACnB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,OAAO;AAAA,IAChB,KAAK;AACH,aAAO,CAAC;AAAA,EACZ;AACF;AAEA,SAAS,kCACP,QAC6B;AAC7B,SAAO,4BAA4B,2BAA2B,MAAM,CAAC;AACvE;AAyZA,SAAS,4BACP,SACoC;AACpC,SAAO,OAAO,YAAY,WAAW,UAAU,QAAQ;AACzD;AAQA,SAAS,4BACP,aAC6B;AAC7B,SAAO,OAAO;AAAA,IACZ,OAAO,QAAQ,WAAW,EAAE,IAAI,CAAC,CAAC,SAAS,OAAO,MAAM;AACtD,aAAO,CAAC,SAAS,4BAA4B,OAAO,CAAC;AAAA,IACvD,CAAC;AAAA,EACH;AACF;AAw4BA,SAAS,oCACP,QACU;AACV,SAAO,SAAS,CAAC,GAAG,OAAO,QAAQ,OAAO,IAAI,CAAC;AACjD;AAWO,SAAS,kCACd,MACA,YAC6B;AAC7B,QAAM,SAAS,uBAAuB,MAAM,UAAU;AACtD,SAAO,SAAS,kCAAkC,OAAO,MAAM,IAAI,CAAC;AACtE;AAcO,SAAS,8BACd,MAC4B;AAC5B,QAAM,UAAsC,CAAC;AAC7C,aAAW,cAAc,oCAAoC,IAAI,GAAG;AAClE,UAAM,cAAc,kCAAkC,MAAM,UAAU;AACtE,eAAW,CAAC,SAAS,QAAQ,KAAK,OAAO,QAAQ,WAAW,GAAG;AAC7D,cAAQ,KAAK,EAAE,YAAY,SAAS,SAAS,CAAC;AAAA,IAChD;AAAA,EACF;AACA,SAAO;AACT;AAcO,SAAS,oCACd,YACyC;AACzC,QAAM,WAAW;AAEjB,aAAW,QAAQ,UAAU;AAC3B,UAAM,SAAS,gBAAgB,IAAI;AAEnC,UAAM,QAAQ,OAAO,OAAO,OAAO,WAAW,EAAE,KAAK,CAAC,WAAW;AAC/D,aAAO,oCAAoC,MAAM,EAAE,SAAS,UAAU;AAAA,IACxE,CAAC;AACD,QAAI,CAAC,OAAO;AACV;AAAA,IACF;AAEA,UAAM,WAAW;AAAA,MACf,GAAG,IAAI;AAAA,QACL,8BAA8B,IAAI,EAC/B,OAAO,CAAC,EAAE,SAAS,MAAM;AACxB,iBAAO,aAAa,YAAY,UAAU;AAAA,QAC5C,CAAC,EACA,IAAI,CAAC,EAAE,QAAQ,MAAM;AACpB,iBAAO;AAAA,QACT,CAAC;AAAA,MACL;AAAA,IACF;AAEA,QAAI,SAAS,SAAS,GAAG;AACvB,aAAO,EAAE,gBAAgB,OAAO,OAAO,SAAS;AAAA,IAClD;AAAA,EACF;AAEA,SAAO;AACT;AAQO,SAAS,4CACd,SACsB;AACtB,aAAW,QAAQ,qBAAqB;AACtC,UAAM,aAAa,8BAA8B,IAAI,EAAE,KAAK,CAAC,UAAU;AACrE,aAAO,MAAM,YAAY;AAAA,IAC3B,CAAC;AACD,QAAI,YAAY;AACd,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  UNKNOWN_PERMISSION_GRANT
6
- } from "./chunk-RWREJRBM.js";
6
+ } from "./chunk-UZWLQTHX.js";
7
7
  import {
8
8
  init_esm_shims
9
9
  } from "./chunk-DIRAZ3YX.js";
@@ -3120,4 +3120,4 @@ export {
3120
3120
  getFirewallPermissionSummary,
3121
3121
  loadFirewallPermissionMetadata
3122
3122
  };
3123
- //# sourceMappingURL=chunk-HDJ62TIP.js.map
3123
+ //# sourceMappingURL=chunk-ZAEOJMGS.js.map
@@ -9,7 +9,7 @@ import {
9
9
  fetchComputerUsePluginContent,
10
10
  fetchComputerUseScreenshot,
11
11
  getComputerUseCommand
12
- } from "./chunk-RWREJRBM.js";
12
+ } from "./chunk-UZWLQTHX.js";
13
13
  import {
14
14
  ApiRequestError,
15
15
  withErrorHandler
@@ -881,4 +881,4 @@ export {
881
881
  formatComputerUseResultForConsole,
882
882
  zeroComputerUseCommand
883
883
  };
884
- //# sourceMappingURL=computer-use-4CZFRH4I.js.map
884
+ //# sourceMappingURL=computer-use-5WJGBUXO.js.map
@@ -15,7 +15,7 @@ import {
15
15
  getZeroCustomConnector,
16
16
  listZeroConnectorCatalogStatus,
17
17
  listZeroCustomConnectors
18
- } from "./chunk-RWREJRBM.js";
18
+ } from "./chunk-UZWLQTHX.js";
19
19
  import "./chunk-LTDQISD7.js";
20
20
  import {
21
21
  withErrorHandler
@@ -832,4 +832,4 @@ var zeroConnectorCommand = new Command().name("connector").description("Check th
832
832
  export {
833
833
  zeroConnectorCommand
834
834
  };
835
- //# sourceMappingURL=connector-S7DXTIPZ.js.map
835
+ //# sourceMappingURL=connector-EVA7XU3V.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  createZeroCreditCheckout,
9
9
  getZeroOrgMembers
10
- } from "./chunk-RWREJRBM.js";
10
+ } from "./chunk-UZWLQTHX.js";
11
11
  import "./chunk-LTDQISD7.js";
12
12
  import {
13
13
  withErrorHandler
@@ -87,4 +87,4 @@ var zeroCreditCommand = new Command().name("credit").description("Create a Strip
87
87
  export {
88
88
  zeroCreditCommand
89
89
  };
90
- //# sourceMappingURL=credit-SWUGDE6H.js.map
90
+ //# sourceMappingURL=credit-7YD43KT4.js.map
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  requestDeveloperSupportConsent,
6
6
  submitDeveloperSupport
7
- } from "./chunk-RWREJRBM.js";
7
+ } from "./chunk-UZWLQTHX.js";
8
8
  import "./chunk-LTDQISD7.js";
9
9
  import {
10
10
  withErrorHandler
@@ -61,4 +61,4 @@ Notes:
61
61
  export {
62
62
  zeroDeveloperSupportCommand
63
63
  };
64
- //# sourceMappingURL=developer-support-LPBBY62L.js.map
64
+ //# sourceMappingURL=developer-support-AHY2HQMG.js.map
@@ -5,7 +5,7 @@ import {
5
5
  findFirewallMetadataPermission,
6
6
  getFirewallPermissionSummary,
7
7
  loadFirewallPermissionMetadata
8
- } from "./chunk-HDJ62TIP.js";
8
+ } from "./chunk-ZAEOJMGS.js";
9
9
  import {
10
10
  getPlatformOrigin,
11
11
  toPlatformUrl
@@ -13,11 +13,11 @@ import {
13
13
  import {
14
14
  matchFirewallBaseUrl,
15
15
  matchFirewallRequestDecision
16
- } from "./chunk-JV5HF7MH.js";
16
+ } from "./chunk-DRXISO7V.js";
17
17
  import {
18
18
  getConnectorEnvBindingEntries,
19
19
  getDiagnosticConnectorTypeForRuntimeEnvName
20
- } from "./chunk-3GYNEDI5.js";
20
+ } from "./chunk-X7URFQJA.js";
21
21
  import {
22
22
  CONNECTOR_TYPES,
23
23
  UNKNOWN_PERMISSION_GRANT,
@@ -31,7 +31,7 @@ import {
31
31
  hasUnsafeFirewallPath,
32
32
  resolveFirewallBaseUrlTemplate,
33
33
  searchZeroConnectors
34
- } from "./chunk-RWREJRBM.js";
34
+ } from "./chunk-UZWLQTHX.js";
35
35
  import "./chunk-LTDQISD7.js";
36
36
  import {
37
37
  ApiRequestError,
@@ -8704,4 +8704,4 @@ Notes:
8704
8704
  export {
8705
8705
  zeroDoctorCommand
8706
8706
  };
8707
- //# sourceMappingURL=doctor-U7KIT2W4.js.map
8707
+ //# sourceMappingURL=doctor-LOMSVTSN.js.map
@@ -25,7 +25,7 @@ import {
25
25
  getZeroAgentUserConnectors,
26
26
  listZeroConnectorCatalog,
27
27
  listZeroConnectorCatalogStatus
28
- } from "./chunk-RWREJRBM.js";
28
+ } from "./chunk-UZWLQTHX.js";
29
29
  import "./chunk-LTDQISD7.js";
30
30
  import {
31
31
  generateWebImage,
@@ -2695,4 +2695,4 @@ var generateCommand = new Command().name("generate").description(
2695
2695
  export {
2696
2696
  generateCommand
2697
2697
  };
2698
- //# sourceMappingURL=generate-EKAAI4ZP.js.map
2698
+ //# sourceMappingURL=generate-U2GRXN4E.js.map
@@ -5,7 +5,7 @@ import {
5
5
  completeGithubFileUpload,
6
6
  downloadGithubFile,
7
7
  initGithubFileUpload
8
- } from "./chunk-RWREJRBM.js";
8
+ } from "./chunk-UZWLQTHX.js";
9
9
  import "./chunk-LTDQISD7.js";
10
10
  import {
11
11
  withErrorHandler
@@ -201,4 +201,4 @@ Examples:
201
201
  export {
202
202
  zeroGithubCommand
203
203
  };
204
- //# sourceMappingURL=github-YHE3OUED.js.map
204
+ //# sourceMappingURL=github-SZPXZBEQ.js.map
@@ -10,7 +10,7 @@ import {
10
10
  getGoal,
11
11
  pauseGoal,
12
12
  resumeGoal
13
- } from "./chunk-RWREJRBM.js";
13
+ } from "./chunk-UZWLQTHX.js";
14
14
  import "./chunk-LTDQISD7.js";
15
15
  import {
16
16
  withErrorHandler
@@ -78,4 +78,4 @@ var zeroGoalCommand = new Command().name("goal").description("Manage the current
78
78
  export {
79
79
  zeroGoalCommand
80
80
  };
81
- //# sourceMappingURL=goal-32GUTO4I.js.map
81
+ //# sourceMappingURL=goal-24AZP5AU.js.map
@@ -11,7 +11,7 @@ import {
11
11
  getHostedSiteFiles,
12
12
  hostedArtifactKindSchema,
13
13
  prepareHostedSite
14
- } from "./chunk-RWREJRBM.js";
14
+ } from "./chunk-UZWLQTHX.js";
15
15
  import "./chunk-LTDQISD7.js";
16
16
  import {
17
17
  withErrorHandler
@@ -547,4 +547,4 @@ Notes:
547
547
  export {
548
548
  zeroHostCommand
549
549
  };
550
- //# sourceMappingURL=host-VEZ6G4JF.js.map
550
+ //# sourceMappingURL=host-S5PS7DQP.js.map
package/index.js CHANGED
@@ -36,14 +36,14 @@ import {
36
36
  renderRunCreated,
37
37
  require_dist,
38
38
  showNextSteps
39
- } from "./chunk-26JQTRTD.js";
39
+ } from "./chunk-BM47JSBX.js";
40
40
  import {
41
41
  Kn,
42
42
  uo
43
43
  } from "./chunk-J4HTPZIN.js";
44
44
  import "./chunk-DKOCDBW4.js";
45
- import "./chunk-JV5HF7MH.js";
46
- import "./chunk-3GYNEDI5.js";
45
+ import "./chunk-DRXISO7V.js";
46
+ import "./chunk-X7URFQJA.js";
47
47
  import {
48
48
  isInteractive,
49
49
  promptText
@@ -76,7 +76,7 @@ import {
76
76
  prepareStorage,
77
77
  searchLogs,
78
78
  volumeConfigSchema
79
- } from "./chunk-RWREJRBM.js";
79
+ } from "./chunk-UZWLQTHX.js";
80
80
  import "./chunk-LTDQISD7.js";
81
81
  import {
82
82
  ApiRequestError,
@@ -94,7 +94,7 @@ import {
94
94
  } from "./chunk-JUTUEPIR.js";
95
95
  import {
96
96
  configureGlobalProxyFromEnv
97
- } from "./chunk-LCJX5RFE.js";
97
+ } from "./chunk-QVBF2OFH.js";
98
98
  import "./chunk-LRHXR7JT.js";
99
99
  import {
100
100
  Command,
@@ -432,7 +432,7 @@ function getConfigPath() {
432
432
  return join(os.homedir(), ".vm0", "config.json");
433
433
  }
434
434
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
435
- console.log(source_default.bold(`VM0 CLI v${"9.230.3"}`));
435
+ console.log(source_default.bold(`VM0 CLI v${"9.230.4"}`));
436
436
  console.log();
437
437
  const config = await loadConfig();
438
438
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1135,7 +1135,7 @@ var composeCommand = new Command().name("compose").description("Create or update
1135
1135
  options.autoUpdate = false;
1136
1136
  }
1137
1137
  if (options.autoUpdate !== false) {
1138
- await startSilentUpgrade("9.230.3");
1138
+ await startSilentUpgrade("9.230.4");
1139
1139
  }
1140
1140
  try {
1141
1141
  const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
@@ -1232,7 +1232,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
1232
1232
  withErrorHandler(
1233
1233
  async (identifier, prompt, options) => {
1234
1234
  if (options.autoUpdate !== false) {
1235
- await startSilentUpgrade("9.230.3");
1235
+ await startSilentUpgrade("9.230.4");
1236
1236
  }
1237
1237
  const { name, version } = parseIdentifier(identifier);
1238
1238
  let composeId;
@@ -3091,13 +3091,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3091
3091
  if (latestVersion === null) {
3092
3092
  throw new Error("Could not check for updates. Please try again later.");
3093
3093
  }
3094
- if (latestVersion === "9.230.3") {
3095
- console.log(source_default.green(`\u2713 Already up to date (${"9.230.3"})`));
3094
+ if (latestVersion === "9.230.4") {
3095
+ console.log(source_default.green(`\u2713 Already up to date (${"9.230.4"})`));
3096
3096
  return;
3097
3097
  }
3098
3098
  console.log(
3099
3099
  source_default.yellow(
3100
- `Current version: ${"9.230.3"} -> Latest version: ${latestVersion}`
3100
+ `Current version: ${"9.230.4"} -> Latest version: ${latestVersion}`
3101
3101
  )
3102
3102
  );
3103
3103
  console.log();
@@ -3124,7 +3124,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3124
3124
  const success = await performUpgrade(packageManager);
3125
3125
  if (success) {
3126
3126
  console.log(
3127
- source_default.green(`\u2713 Upgraded from ${"9.230.3"} to ${latestVersion}`)
3127
+ source_default.green(`\u2713 Upgraded from ${"9.230.4"} to ${latestVersion}`)
3128
3128
  );
3129
3129
  return;
3130
3130
  }
@@ -3191,7 +3191,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
3191
3191
 
3192
3192
  // src/index.ts
3193
3193
  var program = new Command();
3194
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.230.3");
3194
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.230.4");
3195
3195
  program.addCommand(authCommand);
3196
3196
  program.addCommand(infoCommand);
3197
3197
  program.addCommand(composeCommand);
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  searchCommand
6
- } from "./chunk-VSBQGITZ.js";
6
+ } from "./chunk-IYKGIKEB.js";
7
7
  import {
8
8
  EventRenderer,
9
9
  EventStreamNormalizer,
@@ -14,14 +14,14 @@ import {
14
14
  parseBoundedLogCount,
15
15
  parsePositiveLogCount,
16
16
  parseTime
17
- } from "./chunk-26JQTRTD.js";
17
+ } from "./chunk-BM47JSBX.js";
18
18
  import "./chunk-DKOCDBW4.js";
19
- import "./chunk-JV5HF7MH.js";
20
- import "./chunk-3GYNEDI5.js";
19
+ import "./chunk-DRXISO7V.js";
20
+ import "./chunk-X7URFQJA.js";
21
21
  import {
22
22
  getZeroRunAgentEvents,
23
23
  listZeroLogs
24
- } from "./chunk-RWREJRBM.js";
24
+ } from "./chunk-UZWLQTHX.js";
25
25
  import "./chunk-LTDQISD7.js";
26
26
  import {
27
27
  withErrorHandler
@@ -274,4 +274,4 @@ Examples:
274
274
  export {
275
275
  zeroLogsCommand
276
276
  };
277
- //# sourceMappingURL=logs-V7CN7HYO.js.map
277
+ //# sourceMappingURL=logs-KS6P63MI.js.map
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  callZeroMaps
6
- } from "./chunk-RWREJRBM.js";
6
+ } from "./chunk-UZWLQTHX.js";
7
7
  import "./chunk-LTDQISD7.js";
8
8
  import {
9
9
  withErrorHandler
@@ -484,4 +484,4 @@ Notes:
484
484
  export {
485
485
  zeroMapsCommand
486
486
  };
487
- //# sourceMappingURL=maps-CBXCDDDK.js.map
487
+ //# sourceMappingURL=maps-HLSSVYSF.js.map
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  getZeroMemoryContext,
6
6
  recallZeroMemory
7
- } from "./chunk-RWREJRBM.js";
7
+ } from "./chunk-UZWLQTHX.js";
8
8
  import "./chunk-LTDQISD7.js";
9
9
  import {
10
10
  withErrorHandler
@@ -179,4 +179,4 @@ var zeroMemoryCommand = new Command().name("memory").description("Recall structu
179
179
  export {
180
180
  zeroMemoryCommand
181
181
  };
182
- //# sourceMappingURL=memory-IA55Z3EV.js.map
182
+ //# sourceMappingURL=memory-233X2H7N.js.map
@@ -5,11 +5,11 @@ import {
5
5
  formatModelPolicyStatus,
6
6
  formatModelProviderRoute,
7
7
  getModelProviderRouteKind
8
- } from "./chunk-KHYLB7DT.js";
8
+ } from "./chunk-D6BK5EIV.js";
9
9
  import {
10
10
  getVm0ModelPriceTier,
11
11
  listZeroModelPolicies
12
- } from "./chunk-RWREJRBM.js";
12
+ } from "./chunk-UZWLQTHX.js";
13
13
  import "./chunk-LTDQISD7.js";
14
14
  import {
15
15
  withErrorHandler
@@ -90,4 +90,4 @@ export {
90
90
  switchCommand,
91
91
  zeroModelCommand
92
92
  };
93
- //# sourceMappingURL=model-U3QH2DSC.js.map
93
+ //# sourceMappingURL=model-DQV6L4V3.js.map
@@ -5,10 +5,10 @@ import {
5
5
  formatModelPolicyStatus,
6
6
  getModelProviderRouteKind,
7
7
  getModelProviderTypeLabel
8
- } from "./chunk-KHYLB7DT.js";
8
+ } from "./chunk-D6BK5EIV.js";
9
9
  import {
10
10
  listZeroModelPolicies
11
- } from "./chunk-RWREJRBM.js";
11
+ } from "./chunk-UZWLQTHX.js";
12
12
  import "./chunk-LTDQISD7.js";
13
13
  import {
14
14
  withErrorHandler
@@ -74,4 +74,4 @@ export {
74
74
  setCommand,
75
75
  zeroModelProviderCommand
76
76
  };
77
- //# sourceMappingURL=model-provider-IVPPHFOQ.js.map
77
+ //# sourceMappingURL=model-provider-OIGVYGYF.js.map
@@ -32,7 +32,7 @@ import {
32
32
  switchZeroOrg,
33
33
  updateZeroOrg,
34
34
  upsertZeroOrgModelProvider
35
- } from "./chunk-RWREJRBM.js";
35
+ } from "./chunk-UZWLQTHX.js";
36
36
  import "./chunk-LTDQISD7.js";
37
37
  import {
38
38
  ApiRequestError,
@@ -919,4 +919,4 @@ var zeroOrgCommand = new Command().name("org").description("Manage organization
919
919
  export {
920
920
  zeroOrgCommand
921
921
  };
922
- //# sourceMappingURL=org-HMDDNEVN.js.map
922
+ //# sourceMappingURL=org-JI53X3DI.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.230.3",
3
+ "version": "9.230.4",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,7 +6,7 @@ import {
6
6
  downloadPhoneFile,
7
7
  initPhoneFileUpload,
8
8
  sendPhoneMessage
9
- } from "./chunk-RWREJRBM.js";
9
+ } from "./chunk-UZWLQTHX.js";
10
10
  import "./chunk-LTDQISD7.js";
11
11
  import {
12
12
  withErrorHandler
@@ -201,4 +201,4 @@ Examples:
201
201
  export {
202
202
  zeroPhoneCommand
203
203
  };
204
- //# sourceMappingURL=phone-Y22VCLQF.js.map
204
+ //# sourceMappingURL=phone-EX5GABHZ.js.map
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  getZeroUserPreferences,
10
10
  updateZeroUserPreferences
11
- } from "./chunk-RWREJRBM.js";
11
+ } from "./chunk-UZWLQTHX.js";
12
12
  import "./chunk-LTDQISD7.js";
13
13
  import {
14
14
  withErrorHandler
@@ -107,4 +107,4 @@ var zeroPreferenceCommand = new Command().name("preference").description("View o
107
107
  export {
108
108
  zeroPreferenceCommand
109
109
  };
110
- //# sourceMappingURL=preference-GOLS6EAL.js.map
110
+ //# sourceMappingURL=preference-XRPJ24RY.js.map
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  resolveZeroRelationship,
6
6
  searchZeroRelationships
7
- } from "./chunk-RWREJRBM.js";
7
+ } from "./chunk-UZWLQTHX.js";
8
8
  import "./chunk-LTDQISD7.js";
9
9
  import {
10
10
  withErrorHandler
@@ -185,4 +185,4 @@ var zeroRelationshipCommand = new Command().name("relationship").description("Qu
185
185
  export {
186
186
  zeroRelationshipCommand
187
187
  };
188
- //# sourceMappingURL=relationship-KJCB55CN.js.map
188
+ //# sourceMappingURL=relationship-KXW6PXHV.js.map
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-DKOCDBW4.js";
17
17
  import {
18
18
  getRegistryResourceDownload
19
- } from "./chunk-RWREJRBM.js";
19
+ } from "./chunk-UZWLQTHX.js";
20
20
  import "./chunk-LTDQISD7.js";
21
21
  import {
22
22
  withErrorHandler
@@ -139,4 +139,4 @@ export {
139
139
  findRegistryResourceForPull,
140
140
  zeroResourceCommand
141
141
  };
142
- //# sourceMappingURL=resource-IOTGJRWG.js.map
142
+ //# sourceMappingURL=resource-OGBJZOB7.js.map