@ankhorage/contracts 7.3.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 7.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4383dc0: Add canonical provider-neutral app deployment contracts for Web, Android, and iOS, expose them through `AppManifest.deploy` and `@ankhorage/contracts/deploy`, and validate the serialized deployment subtree through the canonical AppManifest parser.
8
+
9
+ ## 7.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 06223da: Add provider-neutral object listing and readable URL resolution capabilities for app-authoring media storage adapters.
14
+
3
15
  ## 7.3.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # CONTRACTS
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v7.2.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v7.3.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -0,0 +1,3 @@
1
+ import type { AppDeployManifest } from '../deploy';
2
+ export declare function isAppDeployManifest(value: unknown): value is AppDeployManifest;
3
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,iBAAiB,EAIlB,MAAM,WAAW,CAAC;AAUnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
@@ -0,0 +1,53 @@
1
+ import { isRecord } from './shared';
2
+ const DEPLOY_KEYS = new Set(['targets']);
3
+ const TARGET_KEYS = new Set(['web', 'android', 'ios']);
4
+ const PROVIDER_KEYS = new Set(['build', 'publish']);
5
+ const WEB_KEYS = new Set(['enabled', 'providers']);
6
+ const ANDROID_KEYS = new Set(['enabled', 'package', 'providers']);
7
+ const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'providers']);
8
+ export function isAppDeployManifest(value) {
9
+ return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);
10
+ }
11
+ function isAppDeployTargets(value) {
12
+ return (isRecord(value) &&
13
+ hasOnlyKeys(value, TARGET_KEYS) &&
14
+ (value.web === undefined || isWebTarget(value.web)) &&
15
+ (value.android === undefined || isAndroidTarget(value.android)) &&
16
+ (value.ios === undefined || isIosTarget(value.ios)));
17
+ }
18
+ function isWebTarget(value) {
19
+ return (isRecord(value) &&
20
+ hasOnlyKeys(value, WEB_KEYS) &&
21
+ typeof value.enabled === 'boolean' &&
22
+ isOptionalProviders(value.providers));
23
+ }
24
+ function isAndroidTarget(value) {
25
+ return (isRecord(value) &&
26
+ hasOnlyKeys(value, ANDROID_KEYS) &&
27
+ typeof value.enabled === 'boolean' &&
28
+ isNonEmptyString(value.package) &&
29
+ isOptionalProviders(value.providers));
30
+ }
31
+ function isIosTarget(value) {
32
+ return (isRecord(value) &&
33
+ hasOnlyKeys(value, IOS_KEYS) &&
34
+ typeof value.enabled === 'boolean' &&
35
+ isNonEmptyString(value.bundleIdentifier) &&
36
+ isOptionalProviders(value.providers));
37
+ }
38
+ function isOptionalProviders(value) {
39
+ return value === undefined || isProviderSelection(value);
40
+ }
41
+ function isProviderSelection(value) {
42
+ return (isRecord(value) &&
43
+ hasOnlyKeys(value, PROVIDER_KEYS) &&
44
+ (value.build === undefined || isNonEmptyString(value.build)) &&
45
+ (value.publish === undefined || isNonEmptyString(value.publish)));
46
+ }
47
+ function isNonEmptyString(value) {
48
+ return typeof value === 'string' && value.trim().length > 0;
49
+ }
50
+ function hasOnlyKeys(value, allowed) {
51
+ return Object.keys(value).every((key) => allowed.has(key));
52
+ }
53
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/appManifest/deploy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AACvD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACpD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAClE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAC;AAEvE,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAA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C,OAAO,KAAK,KAAK,SAAS,IAAI,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC;QACjC,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5D,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CACjE,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,WAAW,CAAC,KAA8B,EAAE,OAA4B;IAC/E,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import type {\n AppDeployAndroidTargetConfig,\n AppDeployIosTargetConfig,\n AppDeployManifest,\n AppDeployProviderSelection,\n AppDeployTargets,\n AppDeployWebTargetConfig,\n} from '../deploy';\nimport { isRecord } from './shared';\n\nconst DEPLOY_KEYS = new Set(['targets']);\nconst TARGET_KEYS = new Set(['web', 'android', 'ios']);\nconst PROVIDER_KEYS = new Set(['build', 'publish']);\nconst WEB_KEYS = new Set(['enabled', 'providers']);\nconst ANDROID_KEYS = new Set(['enabled', 'package', 'providers']);\nconst IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'providers']);\n\nexport function isAppDeployManifest(value: unknown): value is AppDeployManifest {\n return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);\n}\n\nfunction isAppDeployTargets(value: unknown): value is AppDeployTargets {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, TARGET_KEYS) &&\n (value.web === undefined || isWebTarget(value.web)) &&\n (value.android === undefined || isAndroidTarget(value.android)) &&\n (value.ios === undefined || isIosTarget(value.ios))\n );\n}\n\nfunction isWebTarget(value: unknown): value is AppDeployWebTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, WEB_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, ANDROID_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.package) &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isIosTarget(value: unknown): value is AppDeployIosTargetConfig {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, IOS_KEYS) &&\n typeof value.enabled === 'boolean' &&\n isNonEmptyString(value.bundleIdentifier) &&\n isOptionalProviders(value.providers)\n );\n}\n\nfunction isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {\n return value === undefined || isProviderSelection(value);\n}\n\nfunction isProviderSelection(value: unknown): value is AppDeployProviderSelection {\n return (\n isRecord(value) &&\n hasOnlyKeys(value, PROVIDER_KEYS) &&\n (value.build === undefined || isNonEmptyString(value.build)) &&\n (value.publish === undefined || isNonEmptyString(value.publish))\n );\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nfunction hasOnlyKeys(value: Record<string, unknown>, allowed: ReadonlySet<string>): boolean {\n return Object.keys(value).every((key) => allowed.has(key));\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"appManifest.d.ts","sourceRoot":"","sources":["../src/appManifest.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAkBrD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAIvE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAmBlE"}
1
+ {"version":3,"file":"appManifest.d.ts","sourceRoot":"","sources":["../src/appManifest.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBrD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAIvE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAoBlE"}
@@ -1,5 +1,6 @@
1
1
  import { isComponentDataBindingRegistry } from './appManifest/bindings';
2
2
  import { isDataSourceRegistry } from './appManifest/dataSources';
3
+ import { isAppDeployManifest } from './appManifest/deploy';
3
4
  import { isGeneratedApiRegistry } from './appManifest/generatedApis';
4
5
  import { isInfraManifest } from './appManifest/infra';
5
6
  import { isMediaManifest } from './appManifest/media';
@@ -12,6 +13,7 @@ const APP_MANIFEST_KEY_POLICY = {
12
13
  activeThemeMode: 'optional',
13
14
  splashScreen: 'optional',
14
15
  media: 'optional',
16
+ deploy: 'optional',
15
17
  infra: 'required',
16
18
  navigator: 'required',
17
19
  screens: 'required',
@@ -43,6 +45,7 @@ export function isAppManifest(value) {
43
45
  isActiveThemeMode(value.activeThemeMode) &&
44
46
  (value.splashScreen === undefined || isSplashScreenSpec(value.splashScreen)) &&
45
47
  (value.media === undefined || isMediaManifest(value.media)) &&
48
+ (value.deploy === undefined || isAppDeployManifest(value.deploy)) &&
46
49
  isInfraManifest(value.infra) &&
47
50
  isNavigatorSpec(value.navigator) &&
48
51
  isScreenRegistry(value.screens) &&
@@ -1 +1 @@
1
- {"version":3,"file":"appManifest.js","sourceRoot":"","sources":["../src/appManifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOjF,MAAM,uBAAuB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,UAAU;IAClB,aAAa,EAAE,UAAU;IACzB,eAAe,EAAE,UAAU;IAC3B,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,UAAU;IACrB,OAAO,EAAE,UAAU;IACnB,aAAa,EAAE,UAAU;IACzB,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,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AC,CAAC;QACxF,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAAC,KAA8B;IAC7D,OAAO,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,KAAK,CAClD,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,KAAK,UAAU,IAAI,GAAG,IAAI,KAAK,CACzD,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,CAAC;AACtE,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC;QAC5B,OAAO,KAAK,CAAC,YAAY,CAAC,aAAa,KAAK,QAAQ;QACpD,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC;QACzC,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,CACnC,CAAC;AACJ,CAAC","sourcesContent":["import { isComponentDataBindingRegistry } from './appManifest/bindings';\nimport { isDataSourceRegistry } from './appManifest/dataSources';\nimport { isGeneratedApiRegistry } from './appManifest/generatedApis';\nimport { isInfraManifest } from './appManifest/infra';\nimport { isMediaManifest } from './appManifest/media';\nimport {\n isManifestMetadata,\n isNavigatorSpec,\n isScreenRegistry,\n isSplashScreenSpec,\n isThemeConfig,\n} from './appManifest/screens';\nimport { isOptionalString, isRecord, isStringArray } from './appManifest/shared';\nimport type { AppManifest } from './types';\n\nexport type AppManifestParseResult =\n | { readonly ok: true; readonly manifest: AppManifest }\n | { readonly ok: false; readonly message: string };\n\nconst APP_MANIFEST_KEY_POLICY = {\n metadata: 'required',\n themes: 'required',\n activeThemeId: 'required',\n activeThemeMode: 'optional',\n splashScreen: 'optional',\n media: 'optional',\n infra: 'required',\n navigator: 'required',\n screens: 'required',\n generatedApis: 'optional',\n dataSources: 'optional',\n dataBindings: 'optional',\n settings: 'required',\n} as const satisfies Record<keyof AppManifest, 'optional' | 'required'>;\n\n/**\n * Parse unknown JSON-compatible input at the canonical AppManifest boundary.\n *\n * Contracts owns structural manifest validation. Consumers may add semantic\n * diagnostics after this parser succeeds, but should not reconstruct the\n * AppManifest shape in their own packages.\n */\nexport function parseAppManifest(value: unknown): AppManifestParseResult {\n return isAppManifest(value)\n ? { ok: true, manifest: value }\n : { ok: false, message: 'Value is not a canonical AppManifest.' };\n}\n\n/** Return whether an unknown value satisfies the canonical AppManifest shape. */\nexport function isAppManifest(value: unknown): value is AppManifest {\n return (\n isRecord(value) &&\n hasRequiredManifestKeys(value) &&\n isManifestMetadata(value.metadata) &&\n Array.isArray(value.themes) &&\n value.themes.every(isThemeConfig) &&\n typeof value.activeThemeId === 'string' &&\n isActiveThemeMode(value.activeThemeMode) &&\n (value.splashScreen === undefined || isSplashScreenSpec(value.splashScreen)) &&\n (value.media === undefined || isMediaManifest(value.media)) &&\n isInfraManifest(value.infra) &&\n isNavigatorSpec(value.navigator) &&\n isScreenRegistry(value.screens) &&\n (value.generatedApis === undefined || isGeneratedApiRegistry(value.generatedApis)) &&\n (value.dataSources === undefined || isDataSourceRegistry(value.dataSources)) &&\n (value.dataBindings === undefined || isComponentDataBindingRegistry(value.dataBindings)) &&\n isAppSettings(value.settings)\n );\n}\n\nfunction hasRequiredManifestKeys(value: Record<string, unknown>): boolean {\n return Object.entries(APP_MANIFEST_KEY_POLICY).every(\n ([key, policy]) => policy === 'optional' || key in value,\n );\n}\n\nfunction isActiveThemeMode(value: unknown): boolean {\n return value === undefined || value === 'dark' || value === 'light';\n}\n\nfunction isAppSettings(value: unknown): boolean {\n return (\n isRecord(value) &&\n isRecord(value.localization) &&\n typeof value.localization.defaultLocale === 'string' &&\n isStringArray(value.localization.locales) &&\n isOptionalString(value.apiBaseUrl)\n );\n}\n"]}
1
+ {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AAE,EAAE,CAAC,MAAM,KAAK,UAAU,IAAI,GAAG,IAAI,KAAK,CACzD,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,CAAC;AACtE,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC;QACf,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC;QAC5B,OAAO,KAAK,CAAC,YAAY,CAAC,aAAa,KAAK,QAAQ;QACpD,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC;QACzC,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,CACnC,CAAC;AACJ,CAAC","sourcesContent":["import { isComponentDataBindingRegistry } from './appManifest/bindings';\nimport { isDataSourceRegistry } from './appManifest/dataSources';\nimport { isAppDeployManifest } from './appManifest/deploy';\nimport { isGeneratedApiRegistry } from './appManifest/generatedApis';\nimport { isInfraManifest } from './appManifest/infra';\nimport { isMediaManifest } from './appManifest/media';\nimport {\n isManifestMetadata,\n isNavigatorSpec,\n isScreenRegistry,\n isSplashScreenSpec,\n isThemeConfig,\n} from './appManifest/screens';\nimport { isOptionalString, isRecord, isStringArray } from './appManifest/shared';\nimport type { AppManifest } from './types';\n\nexport type AppManifestParseResult =\n | { readonly ok: true; readonly manifest: AppManifest }\n | { readonly ok: false; readonly message: string };\n\nconst APP_MANIFEST_KEY_POLICY = {\n metadata: 'required',\n themes: 'required',\n activeThemeId: 'required',\n activeThemeMode: 'optional',\n splashScreen: 'optional',\n media: 'optional',\n deploy: 'optional',\n infra: 'required',\n navigator: 'required',\n screens: 'required',\n generatedApis: 'optional',\n dataSources: 'optional',\n dataBindings: 'optional',\n settings: 'required',\n} as const satisfies Record<keyof AppManifest, 'optional' | 'required'>;\n\n/**\n * Parse unknown JSON-compatible input at the canonical AppManifest boundary.\n *\n * Contracts owns structural manifest validation. Consumers may add semantic\n * diagnostics after this parser succeeds, but should not reconstruct the\n * AppManifest shape in their own packages.\n */\nexport function parseAppManifest(value: unknown): AppManifestParseResult {\n return isAppManifest(value)\n ? { ok: true, manifest: value }\n : { ok: false, message: 'Value is not a canonical AppManifest.' };\n}\n\n/** Return whether an unknown value satisfies the canonical AppManifest shape. */\nexport function isAppManifest(value: unknown): value is AppManifest {\n return (\n isRecord(value) &&\n hasRequiredManifestKeys(value) &&\n isManifestMetadata(value.metadata) &&\n Array.isArray(value.themes) &&\n value.themes.every(isThemeConfig) &&\n typeof value.activeThemeId === 'string' &&\n isActiveThemeMode(value.activeThemeMode) &&\n (value.splashScreen === undefined || isSplashScreenSpec(value.splashScreen)) &&\n (value.media === undefined || isMediaManifest(value.media)) &&\n (value.deploy === undefined || isAppDeployManifest(value.deploy)) &&\n isInfraManifest(value.infra) &&\n isNavigatorSpec(value.navigator) &&\n isScreenRegistry(value.screens) &&\n (value.generatedApis === undefined || isGeneratedApiRegistry(value.generatedApis)) &&\n (value.dataSources === undefined || isDataSourceRegistry(value.dataSources)) &&\n (value.dataBindings === undefined || isComponentDataBindingRegistry(value.dataBindings)) &&\n isAppSettings(value.settings)\n );\n}\n\nfunction hasRequiredManifestKeys(value: Record<string, unknown>): boolean {\n return Object.entries(APP_MANIFEST_KEY_POLICY).every(\n ([key, policy]) => policy === 'optional' || key in value,\n );\n}\n\nfunction isActiveThemeMode(value: unknown): boolean {\n return value === undefined || value === 'dark' || value === 'light';\n}\n\nfunction isAppSettings(value: unknown): boolean {\n return (\n isRecord(value) &&\n isRecord(value.localization) &&\n typeof value.localization.defaultLocale === 'string' &&\n isStringArray(value.localization.locales) &&\n isOptionalString(value.apiBaseUrl)\n );\n}\n"]}
@@ -0,0 +1,30 @@
1
+ export declare const APP_DEPLOY_TARGET_IDS: readonly ["web", "android", "ios"];
2
+ export type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];
3
+ export interface AppDeployProviderSelection {
4
+ readonly build?: string;
5
+ readonly publish?: string;
6
+ }
7
+ export interface AppDeployWebTargetConfig {
8
+ readonly enabled: boolean;
9
+ readonly providers?: AppDeployProviderSelection;
10
+ }
11
+ export interface AppDeployAndroidTargetConfig {
12
+ readonly enabled: boolean;
13
+ readonly package: string;
14
+ readonly providers?: AppDeployProviderSelection;
15
+ }
16
+ export interface AppDeployIosTargetConfig {
17
+ readonly enabled: boolean;
18
+ readonly bundleIdentifier: string;
19
+ readonly providers?: AppDeployProviderSelection;
20
+ }
21
+ export interface AppDeployTargets {
22
+ readonly web?: AppDeployWebTargetConfig;
23
+ readonly android?: AppDeployAndroidTargetConfig;
24
+ readonly ios?: AppDeployIosTargetConfig;
25
+ }
26
+ export interface AppDeployManifest {
27
+ readonly targets: AppDeployTargets;
28
+ }
29
+ export { isAppDeployManifest } from './appManifest/deploy';
30
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACjD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,CAAC;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,wBAAwB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/deploy.js ADDED
@@ -0,0 +1,3 @@
1
+ export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'];
2
+ export { isAppDeployManifest } from './appManifest/deploy';
3
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AAoCxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;\n\nexport type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];\n\nexport interface AppDeployProviderSelection {\n readonly build?: string;\n readonly publish?: string;\n}\n\nexport interface AppDeployWebTargetConfig {\n readonly enabled: boolean;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployAndroidTargetConfig {\n readonly enabled: boolean;\n readonly package: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployIosTargetConfig {\n readonly enabled: boolean;\n readonly bundleIdentifier: string;\n readonly providers?: AppDeployProviderSelection;\n}\n\nexport interface AppDeployTargets {\n readonly web?: AppDeployWebTargetConfig;\n readonly android?: AppDeployAndroidTargetConfig;\n readonly ios?: AppDeployIosTargetConfig;\n}\n\nexport interface AppDeployManifest {\n readonly targets: AppDeployTargets;\n}\n\nexport { isAppDeployManifest } from './appManifest/deploy';\n"]}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './bindings';
4
4
  export * from './cli';
5
5
  export * from './data';
6
6
  export * from './db';
7
+ export * from './deploy';
7
8
  export * from './media';
8
9
  export * from './requirements';
9
10
  export * from './runtimeCallbacks';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export * from './bindings';
4
4
  export * from './cli';
5
5
  export * from './data';
6
6
  export * from './db';
7
+ export * from './deploy';
7
8
  export * from './media';
8
9
  export * from './requirements';
9
10
  export * from './runtimeCallbacks';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC","sourcesContent":["export * from './appManifest';\nexport * from './auth';\nexport * from './bindings';\nexport * from './cli';\nexport * from './data';\nexport * from './db';\nexport * from './media';\nexport * from './requirements';\nexport * from './runtimeCallbacks';\nexport * from './secretManifest';\nexport * from './secrets';\nexport * from './state';\nexport * from './storage';\nexport * from './theme';\nexport * from './types';\nexport * from './ui';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC","sourcesContent":["export * from './appManifest';\nexport * from './auth';\nexport * from './bindings';\nexport * from './cli';\nexport * from './data';\nexport * from './db';\nexport * from './deploy';\nexport * from './media';\nexport * from './requirements';\nexport * from './runtimeCallbacks';\nexport * from './secretManifest';\nexport * from './secrets';\nexport * from './state';\nexport * from './storage';\nexport * from './theme';\nexport * from './types';\nexport * from './ui';\n"]}
package/dist/storage.d.ts CHANGED
@@ -45,6 +45,46 @@ export interface StoragePublicUrlInput {
45
45
  export interface StoragePublicUrlResult {
46
46
  publicUrl: string;
47
47
  }
48
+ export interface StorageObjectMetadata {
49
+ storageId?: string;
50
+ bucket: string;
51
+ path: string;
52
+ contentType?: string;
53
+ sizeBytes?: number;
54
+ createdAt?: string;
55
+ updatedAt?: string;
56
+ etag?: string;
57
+ }
58
+ export interface StorageListInput {
59
+ storageId?: string;
60
+ bucket: string;
61
+ prefix?: string;
62
+ cursor?: string;
63
+ limit?: number;
64
+ }
65
+ export interface StorageListResult {
66
+ objects: readonly StorageObjectMetadata[];
67
+ nextCursor?: string;
68
+ }
69
+ export type StorageResolvedAccess = 'public' | 'signed';
70
+ export interface StorageResolveInput {
71
+ storageId?: string;
72
+ bucket: string;
73
+ path: string;
74
+ access?: StorageResolvedAccess;
75
+ expiresInSeconds?: number;
76
+ }
77
+ export interface StorageResolvedAsset {
78
+ storageId?: string;
79
+ bucket: string;
80
+ path: string;
81
+ url: string;
82
+ access: StorageResolvedAccess;
83
+ expiresAt?: string;
84
+ }
85
+ export interface StorageResolveResult {
86
+ asset: StorageResolvedAsset;
87
+ }
48
88
  export interface ImageMetadata {
49
89
  fileName?: string;
50
90
  sizeBytes?: number;
@@ -78,4 +118,19 @@ export interface StorageAdapter {
78
118
  publicUrl(input: StoragePublicUrlInput): Promise<StorageResult<StoragePublicUrlResult>>;
79
119
  getImageMetadata?(input: StorageAssetReference): Promise<StorageResult<ImageMetadata>>;
80
120
  }
121
+ export interface StorageListAdapter {
122
+ list(input: StorageListInput): Promise<StorageResult<StorageListResult>>;
123
+ }
124
+ export interface StorageResolveAdapter {
125
+ resolve(input: StorageResolveInput): Promise<StorageResult<StorageResolveResult>>;
126
+ }
127
+ /**
128
+ * Storage capability required by the app-authoring media service.
129
+ *
130
+ * Remote URL import/ingest is intentionally not part of this low-level object-storage
131
+ * contract. It is a trusted service operation that can be implemented by reading the
132
+ * remote object and delegating to `upload` when ingestion is requested.
133
+ */
134
+ export interface MediaStorageAdapter extends StorageAdapter, StorageListAdapter, StorageResolveAdapter {
135
+ }
81
136
  //# sourceMappingURL=storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,eAAe,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GACvD;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAE9B,MAAM,MAAM,aAAa,CAAC,KAAK,GAAG,IAAI,IAClC,eAAe,CAAC,KAAK,CAAC,GACtB;IACE,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC;AAEN,MAAM,WAAW,qBAAqB;IACpC,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,qBAAqB;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"","sourcesContent":["export interface StorageAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type StorageOkResult<TData> = [TData] extends [void]\n ? { ok: true; data?: undefined }\n : { ok: true; data: TData };\n\nexport type StorageResult<TData = void> =\n | StorageOkResult<TData>\n | {\n ok: false;\n error: StorageAdapterError;\n };\n\nexport interface StorageAssetReference {\n storageId?: string;\n bucket: string;\n path: string;\n publicUrl?: string;\n}\n\nexport interface StorageUploadInput {\n storageId?: string;\n bucket: string;\n path: string;\n body: Uint8Array;\n contentType?: string;\n cacheControl?: string;\n upsert?: boolean;\n}\n\nexport interface StorageUploadResult {\n asset: StorageAssetReference;\n}\n\nexport interface StorageRemoveInput {\n storageId?: string;\n bucket: string;\n path: string;\n}\n\nexport interface StoragePublicUrlInput {\n storageId?: string;\n bucket: string;\n path: string;\n}\n\nexport interface StoragePublicUrlResult {\n publicUrl: string;\n}\n\nexport interface ImageMetadata {\n fileName?: string;\n sizeBytes?: number;\n createdAt?: string;\n}\n\nexport interface StorageImageAssetSource {\n kind: 'storage';\n storageId?: string;\n bucket: string;\n path: string;\n publicUrl?: string;\n alt?: string;\n width?: number;\n height?: number;\n contentType?: string;\n metadata?: ImageMetadata;\n}\n\nexport interface UrlImageAssetSource {\n kind: 'url';\n url: string;\n alt?: string;\n width?: number;\n height?: number;\n contentType?: string;\n metadata?: ImageMetadata;\n}\n\nexport type ImageAssetSource = StorageImageAssetSource | UrlImageAssetSource;\n\nexport interface StorageAdapter {\n upload(input: StorageUploadInput): Promise<StorageResult<StorageUploadResult>>;\n remove(input: StorageRemoveInput): Promise<StorageResult>;\n publicUrl(input: StoragePublicUrlInput): Promise<StorageResult<StoragePublicUrlResult>>;\n getImageMetadata?(input: StorageAssetReference): Promise<StorageResult<ImageMetadata>>;\n}\n"]}
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"","sourcesContent":["export interface StorageAdapterError {\n code: string;\n message: string;\n cause?: unknown;\n}\n\nexport type StorageOkResult<TData> = [TData] extends [void]\n ? { ok: true; data?: undefined }\n : { ok: true; data: TData };\n\nexport type StorageResult<TData = void> =\n | StorageOkResult<TData>\n | {\n ok: false;\n error: StorageAdapterError;\n };\n\nexport interface StorageAssetReference {\n storageId?: string;\n bucket: string;\n path: string;\n publicUrl?: string;\n}\n\nexport interface StorageUploadInput {\n storageId?: string;\n bucket: string;\n path: string;\n body: Uint8Array;\n contentType?: string;\n cacheControl?: string;\n upsert?: boolean;\n}\n\nexport interface StorageUploadResult {\n asset: StorageAssetReference;\n}\n\nexport interface StorageRemoveInput {\n storageId?: string;\n bucket: string;\n path: string;\n}\n\nexport interface StoragePublicUrlInput {\n storageId?: string;\n bucket: string;\n path: string;\n}\n\nexport interface StoragePublicUrlResult {\n publicUrl: string;\n}\n\nexport interface StorageObjectMetadata {\n storageId?: string;\n bucket: string;\n path: string;\n contentType?: string;\n sizeBytes?: number;\n createdAt?: string;\n updatedAt?: string;\n etag?: string;\n}\n\nexport interface StorageListInput {\n storageId?: string;\n bucket: string;\n prefix?: string;\n cursor?: string;\n limit?: number;\n}\n\nexport interface StorageListResult {\n objects: readonly StorageObjectMetadata[];\n nextCursor?: string;\n}\n\nexport type StorageResolvedAccess = 'public' | 'signed';\n\nexport interface StorageResolveInput {\n storageId?: string;\n bucket: string;\n path: string;\n access?: StorageResolvedAccess;\n expiresInSeconds?: number;\n}\n\nexport interface StorageResolvedAsset {\n storageId?: string;\n bucket: string;\n path: string;\n url: string;\n access: StorageResolvedAccess;\n expiresAt?: string;\n}\n\nexport interface StorageResolveResult {\n asset: StorageResolvedAsset;\n}\n\nexport interface ImageMetadata {\n fileName?: string;\n sizeBytes?: number;\n createdAt?: string;\n}\n\nexport interface StorageImageAssetSource {\n kind: 'storage';\n storageId?: string;\n bucket: string;\n path: string;\n publicUrl?: string;\n alt?: string;\n width?: number;\n height?: number;\n contentType?: string;\n metadata?: ImageMetadata;\n}\n\nexport interface UrlImageAssetSource {\n kind: 'url';\n url: string;\n alt?: string;\n width?: number;\n height?: number;\n contentType?: string;\n metadata?: ImageMetadata;\n}\n\nexport type ImageAssetSource = StorageImageAssetSource | UrlImageAssetSource;\n\nexport interface StorageAdapter {\n upload(input: StorageUploadInput): Promise<StorageResult<StorageUploadResult>>;\n remove(input: StorageRemoveInput): Promise<StorageResult>;\n publicUrl(input: StoragePublicUrlInput): Promise<StorageResult<StoragePublicUrlResult>>;\n getImageMetadata?(input: StorageAssetReference): Promise<StorageResult<ImageMetadata>>;\n}\n\nexport interface StorageListAdapter {\n list(input: StorageListInput): Promise<StorageResult<StorageListResult>>;\n}\n\nexport interface StorageResolveAdapter {\n resolve(input: StorageResolveInput): Promise<StorageResult<StorageResolveResult>>;\n}\n\n/**\n * Storage capability required by the app-authoring media service.\n *\n * Remote URL import/ingest is intentionally not part of this low-level object-storage\n * contract. It is a trusted service operation that can be implemented by reading the\n * remote object and delegating to `upload` when ingestion is requested.\n */\nexport interface MediaStorageAdapter\n extends StorageAdapter, StorageListAdapter, StorageResolveAdapter {}\n"]}
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { ColorHarmony } from '@ankhorage/color-theory';
2
2
  import type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';
3
3
  import type { BindingValueSource, ComponentDataBindingRegistry, ScreenDataLoaderDefinition } from './bindings';
4
4
  import type { DataSourceRegistry, GeneratedApiRegistry } from './data';
5
+ import type { AppDeployManifest } from './deploy';
5
6
  import type { MediaManifest } from './media';
6
7
  import type { ScreenRequirements } from './requirements';
7
8
  import type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';
@@ -271,6 +272,8 @@ export interface AppManifest {
271
272
  splashScreen?: SplashScreenSpec;
272
273
  /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */
273
274
  media?: MediaManifest;
275
+ /** App distribution desired state. Infrastructure deployment remains under `infra.deployment`. */
276
+ deploy?: AppDeployManifest;
274
277
  infra: InfraManifest;
275
278
  navigator: NavigatorSpec;
276
279
  screens: Record<string, ScreenSpec>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACnG,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/E,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,SAAS,GACT,gBAAgB,GAChB,aAAa,GACb,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAA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C,QAAQ,CAAU,CAAC;AAInD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAGxF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAU,CAAC;AAGrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAG3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAGrE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,CAAU,CAAC;AAIpD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,YAAY,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { DataSourceRegistry, GeneratedApiRegistry } from './data';\nimport type { MediaManifest } from './media';\nimport type { ScreenRequirements } from './requirements';\nimport type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n /** Theme-global authored token overrides shared by light and dark mode. */\n tokens?: ThemeGlobalTokenOverrides;\n /** Component/pattern recipe override values; recipe schemas remain package-owned metadata. */\n recipes?: ThemeRecipeOverrides;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /**\n * Whether this route appears in Tabs and Drawer primary navigation.\n *\n * Omitted routes are visible by default. Setting this to `false` hides the\n * route from primary navigation without making it unnavigable. Stack\n * navigators preserve the value but do not present primary navigation.\n */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n modules: string[];\n modulesConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */\n media?: MediaManifest;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n generatedApis?: GeneratedApiRegistry;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkJA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,Q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G,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAGpF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,wBAAwB;IAC3B,WAAW;IACX,UAAU;IACV,aAAa;IACb,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,YAAY,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGjF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import type { ColorHarmony } from '@ankhorage/color-theory';\n\nimport type { AuthFlowConfig, AuthIdentifierKind, AuthOAuthConfig, AuthSignUpField } from './auth';\nimport type {\n BindingValueSource,\n ComponentDataBindingRegistry,\n ScreenDataLoaderDefinition,\n} from './bindings';\nimport type { DataSourceRegistry, GeneratedApiRegistry } from './data';\nimport type { AppDeployManifest } from './deploy';\nimport type { MediaManifest } from './media';\nimport type { ScreenRequirements } from './requirements';\nimport type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';\n\nexport interface ThemeModeConfig {\n primaryColor: string;\n harmony: ColorHarmony;\n}\n\nexport interface ThemeConfig {\n id: string;\n name: string;\n light: ThemeModeConfig;\n dark: ThemeModeConfig;\n /** Theme-global authored token overrides shared by light and dark mode. */\n tokens?: ThemeGlobalTokenOverrides;\n /** Component/pattern recipe override values; recipe schemas remain package-owned metadata. */\n recipes?: ThemeRecipeOverrides;\n}\n\nexport type ActionType =\n | 'navigate'\n | 'alert'\n | 'console'\n | 'toggleDarkMode'\n | 'setLanguage'\n | 'search'\n | 'filter';\n\nexport interface NavigateAction {\n type: 'navigate';\n payload: {\n route: string;\n params?: Record<string, number | string>;\n };\n}\n\nexport interface AlertAction {\n type: 'alert';\n payload?: {\n message?: string;\n };\n}\n\nexport interface ConsoleAction {\n type: 'console';\n payload?: Record<string, unknown>;\n}\n\nexport interface ToggleDarkModeAction {\n type: 'toggleDarkMode';\n payload?: never;\n}\n\nexport interface SetLanguageAction {\n type: 'setLanguage';\n payload: {\n locale: string;\n };\n}\n\nexport interface SearchAction {\n type: 'search';\n payload: {\n query: string;\n scope?: string;\n };\n}\n\nexport interface FilterAction {\n type: 'filter';\n payload: {\n filterKey: string;\n filterValue: string;\n };\n}\n\nexport type Action =\n | AlertAction\n | ConsoleAction\n | FilterAction\n | NavigateAction\n | SearchAction\n | SetLanguageAction\n | ToggleDarkModeAction;\n\nexport type ManifestValue =\n | string\n | number\n | boolean\n | null\n | readonly ManifestValue[]\n | { readonly [key: string]: ManifestValue };\n\nexport type ComponentEventPayloadValue = ManifestValue;\n\nexport interface ComponentEventDto<\n TType extends string = string,\n TPayload extends object = Record<string, ComponentEventPayloadValue>,\n> {\n readonly type: TType;\n readonly sourceNodeId: string;\n readonly payload: TPayload;\n}\n\nexport type FormSubmitValues = Record<string, ComponentEventPayloadValue>;\n\nexport type FormSubmitEventDto = ComponentEventDto<\n 'form.submit',\n {\n readonly values: FormSubmitValues;\n }\n>;\n\nexport type ButtonPressEventDto = ComponentEventDto<'button.press', Record<string, never>>;\n\nexport interface CollectionItemPressPayload {\n readonly itemId: string | number;\n readonly item: Record<string, ComponentEventPayloadValue>;\n}\n\nexport type CollectionItemPressEventDto = ComponentEventDto<\n 'collection.itemPress',\n CollectionItemPressPayload\n>;\n\nexport type ComponentEventDtoKind =\n | ButtonPressEventDto['type']\n | CollectionItemPressEventDto['type']\n | FormSubmitEventDto['type'];\n\nexport type KnownComponentEventDto =\n | ButtonPressEventDto\n | CollectionItemPressEventDto\n | FormSubmitEventDto;\n\nexport const NAVIGATOR_TYPES = ['stack', 'tabs', 'drawer'] as const;\nexport type NavigatorType = (typeof NAVIGATOR_TYPES)[number];\n\nexport const APP_CATEGORIES = [\n 'books_reading',\n 'business_productivity',\n 'developer_tools',\n 'education_learning',\n 'entertainment_media',\n 'finance_money',\n 'food_drink',\n 'games',\n 'graphics_design',\n 'health_fitness',\n 'kids_family',\n 'lifestyle',\n 'medical',\n 'music_audio',\n 'navigation_travel',\n 'news_magazines',\n 'photo_video',\n 'reference',\n 'shopping_commerce',\n 'social_community',\n 'sports',\n 'utilities_tools',\n 'weather',\n] as const;\nexport type AppCategory = (typeof APP_CATEGORIES)[number];\n\nexport const DEPLOYMENT_TARGETS = ['minikube'] as const;\nexport type KnownDeploymentTarget = (typeof DEPLOYMENT_TARGETS)[number];\nexport type DeploymentTarget = KnownDeploymentTarget | (string & {});\n\nexport const DATABASE_PROVIDERS = ['supabase'] as const;\nexport type KnownDatabaseProvider = (typeof DATABASE_PROVIDERS)[number];\nexport type DatabaseProvider = KnownDatabaseProvider | (string & {});\n\nexport const DATABASE_TIERS = ['dev', 'prod'] as const;\nexport type DatabaseTier = (typeof DATABASE_TIERS)[number];\n\nexport const STORAGE_PROVIDERS = ['auto', 's3', 'r2'] as const;\nexport type StorageProvider = (typeof STORAGE_PROVIDERS)[number];\n\nexport const STATE_PROVIDERS = ['legend'] as const;\nexport type KnownStateProvider = (typeof STATE_PROVIDERS)[number];\nexport type StateProvider = KnownStateProvider | (string & {});\n\nexport const STATE_PERSISTENCE_MODES = ['none', 'local', 'secure', 'database'] as const;\nexport type StatePersistenceMode = (typeof STATE_PERSISTENCE_MODES)[number];\n\nexport const AUTHZ_KINDS = ['RBAC', 'ABAC'] as const;\nexport type AuthzKind = (typeof AUTHZ_KINDS)[number];\n\nexport const AUTHZ_ENGINES = ['cerbos', 'native'] as const;\nexport type AuthzEngine = (typeof AUTHZ_ENGINES)[number];\n\nexport const AUTH_SCOPES = ['global', 'none', 'integrated'] as const;\nexport type AuthScope = (typeof AUTH_SCOPES)[number];\n\nexport const AUTH_PROVIDERS = ['supabase'] as const;\nexport type KnownAuthProvider = (typeof AUTH_PROVIDERS)[number];\nexport type AuthProvider = KnownAuthProvider | (string & {});\n\nexport const AUTH_SIGN_IN_IDENTIFIERS = ['email', 'username', 'phone'] as const;\nexport type AuthSignInIdentifier = AuthIdentifierKind;\n\nexport const AUTH_SIGN_UP_POLICIES = ['autoSignIn', 'requireVerification'] as const;\nexport type AuthSignUpPolicy = (typeof AUTH_SIGN_UP_POLICIES)[number];\n\nexport const AUTH_PROFILE_FIELDS = [\n ...AUTH_SIGN_IN_IDENTIFIERS,\n 'firstName',\n 'lastName',\n 'displayName',\n 'avatarUrl',\n] as const;\nexport type KnownAuthProfileField = (typeof AUTH_PROFILE_FIELDS)[number];\nexport type AuthProfileField = KnownAuthProfileField | (string & {});\n\nexport const AUTH_PROFILE_PRIMARY_KEY_STRATEGIES = ['authUserId'] as const;\nexport type AuthProfilePrimaryKeyStrategy = (typeof AUTH_PROFILE_PRIMARY_KEY_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_CREATE_STRATEGIES = ['trigger', 'api', 'app'] as const;\nexport type AuthProfileCreateStrategy = (typeof AUTH_PROFILE_CREATE_STRATEGIES)[number];\n\nexport const AUTH_PROFILE_UPDATE_STRATEGIES = ['api', 'app'] as const;\nexport type AuthProfileUpdateStrategy = (typeof AUTH_PROFILE_UPDATE_STRATEGIES)[number];\n\nexport interface IconSpec {\n name: string;\n provider?: string;\n size?: number | string;\n color?: string;\n}\n\nexport interface UiNodeRepeatSpec {\n source: BindingValueSource;\n itemAlias?: string;\n keyPath?: string;\n empty?: readonly UiNode[];\n}\n\nexport interface UiNode {\n id: string;\n type: string;\n alias?: string;\n props?: Record<string, unknown>;\n children?: UiNode[];\n style?: Record<string, number | string>;\n repeat?: UiNodeRepeatSpec;\n}\n\nexport interface ScreenSpec {\n id: string;\n name: string;\n title?: string;\n description?: string;\n root: UiNode;\n dataLoaders?: readonly ScreenDataLoaderDefinition[];\n requires?: ScreenRequirements;\n}\n\nexport interface NavigatorSpec {\n type: NavigatorType;\n initialRouteName?: string;\n routes: RouteDefinition[];\n options?: Record<string, unknown>;\n}\n\nexport interface RouteDefinition {\n name: string;\n path?: string;\n label?: string;\n icon?: IconSpec;\n /**\n * Whether this route appears in Tabs and Drawer primary navigation.\n *\n * Omitted routes are visible by default. Setting this to `false` hides the\n * route from primary navigation without making it unnavigable. Stack\n * navigators preserve the value but do not present primary navigation.\n */\n showInPrimaryNavigation?: boolean;\n guards?: string[];\n screenId?: string;\n navigator?: NavigatorSpec;\n}\n\nexport type SplashScreenResizeMode = 'contain' | 'cover' | 'native';\n\nexport interface SplashScreenAssetSpec {\n readonly image?: string;\n readonly imageWidth?: number;\n readonly resizeMode?: SplashScreenResizeMode;\n}\n\nexport interface SplashScreenModeSpec extends SplashScreenAssetSpec {\n readonly backgroundColor?: string;\n}\n\nexport interface SplashScreenSpec extends SplashScreenModeSpec {\n readonly dark?: SplashScreenModeSpec;\n}\n\nexport interface DeploymentSpec {\n target: DeploymentTarget;\n monitoring: boolean;\n}\n\nexport interface DatabaseSpec {\n provider: DatabaseProvider;\n tier: DatabaseTier;\n}\n\nexport interface StorageSpec {\n provider: StorageProvider;\n buckets: string[];\n}\n\nexport interface StateSpec {\n readonly provider: StateProvider;\n readonly persistence?: StatePersistenceMode;\n}\n\nexport interface AuthzSpec {\n kind: AuthzKind;\n engine: AuthzEngine;\n}\n\nexport interface AuthSignInSpec {\n identifiers: AuthSignInIdentifier[];\n}\n\nexport interface AuthSignUpSpec {\n requiredFields: AuthSignUpField[];\n optionalFields?: AuthSignUpField[];\n signUpPolicy?: AuthSignUpPolicy;\n}\n\nexport interface AuthProfileSpec {\n fields: AuthProfileField[];\n table?: string;\n primaryKey?: AuthProfilePrimaryKeyStrategy;\n createStrategy?: AuthProfileCreateStrategy;\n updateStrategy?: AuthProfileUpdateStrategy;\n}\n\nexport interface AuthSpec {\n scope: AuthScope;\n provider: AuthProvider;\n authorization?: AuthzSpec;\n flow?: AuthFlowConfig;\n signIn?: AuthSignInSpec;\n signUp?: AuthSignUpSpec;\n oauth?: AuthOAuthConfig;\n profile?: AuthProfileSpec;\n}\n\nexport interface NetworkingSpec {\n domain?: string;\n cdn: boolean;\n}\n\nexport interface InfraManifest {\n deployment?: DeploymentSpec;\n auth?: AuthSpec;\n database?: DatabaseSpec;\n storage?: StorageSpec;\n state?: StateSpec;\n networking?: NetworkingSpec;\n modules: string[];\n modulesConfig?: Record<string, unknown>;\n}\n\nexport interface AppSettings {\n apiBaseUrl?: string;\n localization: {\n defaultLocale: string;\n locales: string[];\n };\n}\n\nexport interface AppManifest {\n metadata: {\n name: string;\n slug: string;\n version: string;\n category: AppCategory;\n themeId: string;\n created?: string;\n updated?: string;\n };\n themes: ThemeConfig[];\n activeThemeId: string;\n activeThemeMode?: 'dark' | 'light';\n splashScreen?: SplashScreenSpec;\n /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */\n media?: MediaManifest;\n /** App distribution desired state. Infrastructure deployment remains under `infra.deployment`. */\n deploy?: AppDeployManifest;\n infra: InfraManifest;\n navigator: NavigatorSpec;\n screens: Record<string, ScreenSpec>;\n generatedApis?: GeneratedApiRegistry;\n dataSources?: DataSourceRegistry;\n dataBindings?: ComponentDataBindingRegistry;\n settings: AppSettings;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "7.3.0",
3
+ "version": "7.5.0",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",
@@ -45,6 +45,10 @@
45
45
  "types": "./dist/db.d.ts",
46
46
  "default": "./dist/db.js"
47
47
  },
48
+ "./deploy": {
49
+ "types": "./dist/deploy.d.ts",
50
+ "default": "./dist/deploy.js"
51
+ },
48
52
  "./runtime": {
49
53
  "types": "./dist/runtimeCallbacks.d.ts",
50
54
  "default": "./dist/runtimeCallbacks.js"
@@ -0,0 +1,80 @@
1
+ import type {
2
+ AppDeployAndroidTargetConfig,
3
+ AppDeployIosTargetConfig,
4
+ AppDeployManifest,
5
+ AppDeployProviderSelection,
6
+ AppDeployTargets,
7
+ AppDeployWebTargetConfig,
8
+ } from '../deploy';
9
+ import { isRecord } from './shared';
10
+
11
+ const DEPLOY_KEYS = new Set(['targets']);
12
+ const TARGET_KEYS = new Set(['web', 'android', 'ios']);
13
+ const PROVIDER_KEYS = new Set(['build', 'publish']);
14
+ const WEB_KEYS = new Set(['enabled', 'providers']);
15
+ const ANDROID_KEYS = new Set(['enabled', 'package', 'providers']);
16
+ const IOS_KEYS = new Set(['enabled', 'bundleIdentifier', 'providers']);
17
+
18
+ export function isAppDeployManifest(value: unknown): value is AppDeployManifest {
19
+ return isRecord(value) && hasOnlyKeys(value, DEPLOY_KEYS) && isAppDeployTargets(value.targets);
20
+ }
21
+
22
+ function isAppDeployTargets(value: unknown): value is AppDeployTargets {
23
+ return (
24
+ isRecord(value) &&
25
+ hasOnlyKeys(value, TARGET_KEYS) &&
26
+ (value.web === undefined || isWebTarget(value.web)) &&
27
+ (value.android === undefined || isAndroidTarget(value.android)) &&
28
+ (value.ios === undefined || isIosTarget(value.ios))
29
+ );
30
+ }
31
+
32
+ function isWebTarget(value: unknown): value is AppDeployWebTargetConfig {
33
+ return (
34
+ isRecord(value) &&
35
+ hasOnlyKeys(value, WEB_KEYS) &&
36
+ typeof value.enabled === 'boolean' &&
37
+ isOptionalProviders(value.providers)
38
+ );
39
+ }
40
+
41
+ function isAndroidTarget(value: unknown): value is AppDeployAndroidTargetConfig {
42
+ return (
43
+ isRecord(value) &&
44
+ hasOnlyKeys(value, ANDROID_KEYS) &&
45
+ typeof value.enabled === 'boolean' &&
46
+ isNonEmptyString(value.package) &&
47
+ isOptionalProviders(value.providers)
48
+ );
49
+ }
50
+
51
+ function isIosTarget(value: unknown): value is AppDeployIosTargetConfig {
52
+ return (
53
+ isRecord(value) &&
54
+ hasOnlyKeys(value, IOS_KEYS) &&
55
+ typeof value.enabled === 'boolean' &&
56
+ isNonEmptyString(value.bundleIdentifier) &&
57
+ isOptionalProviders(value.providers)
58
+ );
59
+ }
60
+
61
+ function isOptionalProviders(value: unknown): value is AppDeployProviderSelection | undefined {
62
+ return value === undefined || isProviderSelection(value);
63
+ }
64
+
65
+ function isProviderSelection(value: unknown): value is AppDeployProviderSelection {
66
+ return (
67
+ isRecord(value) &&
68
+ hasOnlyKeys(value, PROVIDER_KEYS) &&
69
+ (value.build === undefined || isNonEmptyString(value.build)) &&
70
+ (value.publish === undefined || isNonEmptyString(value.publish))
71
+ );
72
+ }
73
+
74
+ function isNonEmptyString(value: unknown): value is string {
75
+ return typeof value === 'string' && value.trim().length > 0;
76
+ }
77
+
78
+ function hasOnlyKeys(value: Record<string, unknown>, allowed: ReadonlySet<string>): boolean {
79
+ return Object.keys(value).every((key) => allowed.has(key));
80
+ }
@@ -1,5 +1,6 @@
1
1
  import { isComponentDataBindingRegistry } from './appManifest/bindings';
2
2
  import { isDataSourceRegistry } from './appManifest/dataSources';
3
+ import { isAppDeployManifest } from './appManifest/deploy';
3
4
  import { isGeneratedApiRegistry } from './appManifest/generatedApis';
4
5
  import { isInfraManifest } from './appManifest/infra';
5
6
  import { isMediaManifest } from './appManifest/media';
@@ -24,6 +25,7 @@ const APP_MANIFEST_KEY_POLICY = {
24
25
  activeThemeMode: 'optional',
25
26
  splashScreen: 'optional',
26
27
  media: 'optional',
28
+ deploy: 'optional',
27
29
  infra: 'required',
28
30
  navigator: 'required',
29
31
  screens: 'required',
@@ -58,6 +60,7 @@ export function isAppManifest(value: unknown): value is AppManifest {
58
60
  isActiveThemeMode(value.activeThemeMode) &&
59
61
  (value.splashScreen === undefined || isSplashScreenSpec(value.splashScreen)) &&
60
62
  (value.media === undefined || isMediaManifest(value.media)) &&
63
+ (value.deploy === undefined || isAppDeployManifest(value.deploy)) &&
61
64
  isInfraManifest(value.infra) &&
62
65
  isNavigatorSpec(value.navigator) &&
63
66
  isScreenRegistry(value.screens) &&
@@ -0,0 +1,121 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+
4
+ import { describe, expect, it } from 'bun:test';
5
+
6
+ import { isAppManifest } from './appManifest';
7
+ import { APP_DEPLOY_TARGET_IDS, isAppDeployManifest } from './deploy';
8
+ import { DEPLOYMENT_TARGETS } from './types';
9
+
10
+ function createManifest(deploy?: unknown): Record<string, unknown> {
11
+ return {
12
+ metadata: {
13
+ name: 'Example',
14
+ slug: 'example',
15
+ version: '1.0.0',
16
+ category: 'developer_tools',
17
+ themeId: 'default',
18
+ },
19
+ themes: [
20
+ {
21
+ id: 'default',
22
+ name: 'Default',
23
+ light: { primaryColor: '#3366ff', harmony: 'analogous' },
24
+ dark: { primaryColor: '#6699ff', harmony: 'analogous' },
25
+ },
26
+ ],
27
+ activeThemeId: 'default',
28
+ ...(deploy === undefined ? {} : { deploy }),
29
+ infra: { deployment: { target: 'minikube', monitoring: true }, modules: [] },
30
+ navigator: { type: 'stack', routes: [] },
31
+ screens: {},
32
+ settings: { localization: { defaultLocale: 'en', locales: ['en'] } },
33
+ };
34
+ }
35
+
36
+ describe('app deployment contracts', () => {
37
+ it('keeps app distribution targets distinct from Infra deployment targets', () => {
38
+ expect(APP_DEPLOY_TARGET_IDS).toEqual(['web', 'android', 'ios']);
39
+ expect(DEPLOYMENT_TARGETS).toEqual(['minikube']);
40
+ });
41
+
42
+ it('accepts canonical web, Android, and iOS desired state', () => {
43
+ const deploy = {
44
+ targets: {
45
+ web: { enabled: true, providers: { publish: 'eas' } },
46
+ android: {
47
+ enabled: true,
48
+ package: 'com.example.app',
49
+ providers: { build: 'eas', publish: 'google-play' },
50
+ },
51
+ ios: {
52
+ enabled: false,
53
+ bundleIdentifier: 'com.example.app',
54
+ providers: { build: 'eas', publish: 'app-store-connect' },
55
+ },
56
+ },
57
+ };
58
+
59
+ expect(isAppDeployManifest(deploy)).toBe(true);
60
+ expect(isAppManifest(createManifest(deploy))).toBe(true);
61
+ });
62
+
63
+ it('keeps deployment optional and accepts an empty target registry structurally', () => {
64
+ expect(isAppManifest(createManifest())).toBe(true);
65
+ expect(isAppDeployManifest({ targets: {} })).toBe(true);
66
+ });
67
+
68
+ it('keeps provider identifiers opaque but non-empty', () => {
69
+ expect(
70
+ isAppDeployManifest({
71
+ targets: {
72
+ web: {
73
+ enabled: true,
74
+ providers: { build: 'custom-build', publish: 'custom-host' },
75
+ },
76
+ },
77
+ }),
78
+ ).toBe(true);
79
+ });
80
+
81
+ it('rejects malformed, unknown, and credential-shaped deployment fields', () => {
82
+ const invalidValues: readonly unknown[] = [
83
+ null,
84
+ {},
85
+ { targets: null },
86
+ { targets: { desktop: { enabled: true } } },
87
+ { targets: { web: { enabled: 'yes' } } },
88
+ { targets: { android: { enabled: true, package: '' } } },
89
+ { targets: { ios: { enabled: true, bundleIdentifier: ' ' } } },
90
+ { targets: { web: { enabled: true, providers: { publish: '' } } } },
91
+ { targets: { web: { enabled: true, providerConfig: { region: 'eu' } } } },
92
+ { targets: { web: { enabled: true, credentials: { token: 'secret' } } } },
93
+ { targets: {}, credentials: { token: 'secret' } },
94
+ ];
95
+
96
+ for (const value of invalidValues) {
97
+ expect(isAppDeployManifest(value)).toBe(false);
98
+ }
99
+ });
100
+
101
+ it('rejects a malformed deploy subtree through the canonical AppManifest parser', () => {
102
+ expect(
103
+ isAppManifest(
104
+ createManifest({
105
+ targets: { android: { enabled: true, package: 'com.example.app', credentials: {} } },
106
+ }),
107
+ ),
108
+ ).toBe(false);
109
+ });
110
+
111
+ it('publishes the focused deployment contract subpath', async () => {
112
+ const packageJson = JSON.parse(await readFile(join(process.cwd(), 'package.json'), 'utf8')) as {
113
+ exports?: Record<string, { default?: string; types?: string }>;
114
+ };
115
+
116
+ expect(packageJson.exports?.['./deploy']).toEqual({
117
+ types: './dist/deploy.d.ts',
118
+ default: './dist/deploy.js',
119
+ });
120
+ });
121
+ });
package/src/deploy.ts ADDED
@@ -0,0 +1,37 @@
1
+ export const APP_DEPLOY_TARGET_IDS = ['web', 'android', 'ios'] as const;
2
+
3
+ export type AppDeployTargetId = (typeof APP_DEPLOY_TARGET_IDS)[number];
4
+
5
+ export interface AppDeployProviderSelection {
6
+ readonly build?: string;
7
+ readonly publish?: string;
8
+ }
9
+
10
+ export interface AppDeployWebTargetConfig {
11
+ readonly enabled: boolean;
12
+ readonly providers?: AppDeployProviderSelection;
13
+ }
14
+
15
+ export interface AppDeployAndroidTargetConfig {
16
+ readonly enabled: boolean;
17
+ readonly package: string;
18
+ readonly providers?: AppDeployProviderSelection;
19
+ }
20
+
21
+ export interface AppDeployIosTargetConfig {
22
+ readonly enabled: boolean;
23
+ readonly bundleIdentifier: string;
24
+ readonly providers?: AppDeployProviderSelection;
25
+ }
26
+
27
+ export interface AppDeployTargets {
28
+ readonly web?: AppDeployWebTargetConfig;
29
+ readonly android?: AppDeployAndroidTargetConfig;
30
+ readonly ios?: AppDeployIosTargetConfig;
31
+ }
32
+
33
+ export interface AppDeployManifest {
34
+ readonly targets: AppDeployTargets;
35
+ }
36
+
37
+ export { isAppDeployManifest } from './appManifest/deploy';
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ export * from './bindings';
4
4
  export * from './cli';
5
5
  export * from './data';
6
6
  export * from './db';
7
+ export * from './deploy';
7
8
  export * from './media';
8
9
  export * from './requirements';
9
10
  export * from './runtimeCallbacks';
@@ -0,0 +1,107 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+
3
+ import type { MediaStorageAdapter } from './storage';
4
+
5
+ const adapter: MediaStorageAdapter = {
6
+ upload(input) {
7
+ return Promise.resolve({
8
+ ok: true,
9
+ data: {
10
+ asset: {
11
+ storageId: input.storageId,
12
+ bucket: input.bucket,
13
+ path: input.path,
14
+ },
15
+ },
16
+ });
17
+ },
18
+ remove() {
19
+ return Promise.resolve({ ok: true });
20
+ },
21
+ publicUrl(input) {
22
+ return Promise.resolve({
23
+ ok: true,
24
+ data: { publicUrl: `https://cdn.example.test/${input.bucket}/${input.path}` },
25
+ });
26
+ },
27
+ list(input) {
28
+ return Promise.resolve({
29
+ ok: true,
30
+ data: {
31
+ objects: [
32
+ {
33
+ storageId: input.storageId,
34
+ bucket: input.bucket,
35
+ path: `${input.prefix ?? ''}hero.png`,
36
+ contentType: 'image/png',
37
+ sizeBytes: 4096,
38
+ },
39
+ ],
40
+ },
41
+ });
42
+ },
43
+ resolve(input) {
44
+ return Promise.resolve({
45
+ ok: true,
46
+ data: {
47
+ asset: {
48
+ storageId: input.storageId,
49
+ bucket: input.bucket,
50
+ path: input.path,
51
+ url: `https://signed.example.test/${input.bucket}/${input.path}`,
52
+ access: input.access ?? 'signed',
53
+ expiresAt: '2026-08-12T10:00:00.000Z',
54
+ },
55
+ },
56
+ });
57
+ },
58
+ };
59
+
60
+ describe('media storage capabilities', () => {
61
+ it('lists normalized provider-neutral object metadata', async () => {
62
+ const result = await adapter.list({
63
+ storageId: 'primary',
64
+ bucket: 'media',
65
+ prefix: 'authoring/',
66
+ });
67
+
68
+ expect(result).toEqual({
69
+ ok: true,
70
+ data: {
71
+ objects: [
72
+ {
73
+ storageId: 'primary',
74
+ bucket: 'media',
75
+ path: 'authoring/hero.png',
76
+ contentType: 'image/png',
77
+ sizeBytes: 4096,
78
+ },
79
+ ],
80
+ },
81
+ });
82
+ });
83
+
84
+ it('resolves a stable storage identity to a runtime-readable URL', async () => {
85
+ const result = await adapter.resolve({
86
+ storageId: 'primary',
87
+ bucket: 'media',
88
+ path: 'authoring/hero.png',
89
+ access: 'signed',
90
+ expiresInSeconds: 900,
91
+ });
92
+
93
+ expect(result).toEqual({
94
+ ok: true,
95
+ data: {
96
+ asset: {
97
+ storageId: 'primary',
98
+ bucket: 'media',
99
+ path: 'authoring/hero.png',
100
+ url: 'https://signed.example.test/media/authoring/hero.png',
101
+ access: 'signed',
102
+ expiresAt: '2026-08-12T10:00:00.000Z',
103
+ },
104
+ },
105
+ });
106
+ });
107
+ });
package/src/storage.ts CHANGED
@@ -52,6 +52,53 @@ export interface StoragePublicUrlResult {
52
52
  publicUrl: string;
53
53
  }
54
54
 
55
+ export interface StorageObjectMetadata {
56
+ storageId?: string;
57
+ bucket: string;
58
+ path: string;
59
+ contentType?: string;
60
+ sizeBytes?: number;
61
+ createdAt?: string;
62
+ updatedAt?: string;
63
+ etag?: string;
64
+ }
65
+
66
+ export interface StorageListInput {
67
+ storageId?: string;
68
+ bucket: string;
69
+ prefix?: string;
70
+ cursor?: string;
71
+ limit?: number;
72
+ }
73
+
74
+ export interface StorageListResult {
75
+ objects: readonly StorageObjectMetadata[];
76
+ nextCursor?: string;
77
+ }
78
+
79
+ export type StorageResolvedAccess = 'public' | 'signed';
80
+
81
+ export interface StorageResolveInput {
82
+ storageId?: string;
83
+ bucket: string;
84
+ path: string;
85
+ access?: StorageResolvedAccess;
86
+ expiresInSeconds?: number;
87
+ }
88
+
89
+ export interface StorageResolvedAsset {
90
+ storageId?: string;
91
+ bucket: string;
92
+ path: string;
93
+ url: string;
94
+ access: StorageResolvedAccess;
95
+ expiresAt?: string;
96
+ }
97
+
98
+ export interface StorageResolveResult {
99
+ asset: StorageResolvedAsset;
100
+ }
101
+
55
102
  export interface ImageMetadata {
56
103
  fileName?: string;
57
104
  sizeBytes?: number;
@@ -89,3 +136,21 @@ export interface StorageAdapter {
89
136
  publicUrl(input: StoragePublicUrlInput): Promise<StorageResult<StoragePublicUrlResult>>;
90
137
  getImageMetadata?(input: StorageAssetReference): Promise<StorageResult<ImageMetadata>>;
91
138
  }
139
+
140
+ export interface StorageListAdapter {
141
+ list(input: StorageListInput): Promise<StorageResult<StorageListResult>>;
142
+ }
143
+
144
+ export interface StorageResolveAdapter {
145
+ resolve(input: StorageResolveInput): Promise<StorageResult<StorageResolveResult>>;
146
+ }
147
+
148
+ /**
149
+ * Storage capability required by the app-authoring media service.
150
+ *
151
+ * Remote URL import/ingest is intentionally not part of this low-level object-storage
152
+ * contract. It is a trusted service operation that can be implemented by reading the
153
+ * remote object and delegating to `upload` when ingestion is requested.
154
+ */
155
+ export interface MediaStorageAdapter
156
+ extends StorageAdapter, StorageListAdapter, StorageResolveAdapter {}
package/src/types.ts CHANGED
@@ -7,6 +7,7 @@ import type {
7
7
  ScreenDataLoaderDefinition,
8
8
  } from './bindings';
9
9
  import type { DataSourceRegistry, GeneratedApiRegistry } from './data';
10
+ import type { AppDeployManifest } from './deploy';
10
11
  import type { MediaManifest } from './media';
11
12
  import type { ScreenRequirements } from './requirements';
12
13
  import type { ThemeGlobalTokenOverrides, ThemeRecipeOverrides } from './theme';
@@ -401,6 +402,8 @@ export interface AppManifest {
401
402
  splashScreen?: SplashScreenSpec;
402
403
  /** Studio-managed authoring media. Runtime/user uploads are intentionally separate. */
403
404
  media?: MediaManifest;
405
+ /** App distribution desired state. Infrastructure deployment remains under `infra.deployment`. */
406
+ deploy?: AppDeployManifest;
404
407
  infra: InfraManifest;
405
408
  navigator: NavigatorSpec;
406
409
  screens: Record<string, ScreenSpec>;