@walkeros/cli 4.8.1 → 4.8.3-next-1793115089237

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 (51) hide show
  1. package/CHANGELOG.md +115 -3
  2. package/README.md +2 -2
  3. package/dist/cli.js +4149 -4149
  4. package/dist/dev.d.ts +51 -3
  5. package/dist/dev.js +186 -0
  6. package/dist/dev.js.map +1 -1
  7. package/dist/examples/README.md +12 -1
  8. package/dist/examples/contracts/app.json +261 -0
  9. package/dist/examples/contracts/base.json +708 -0
  10. package/dist/examples/contracts/ecommerce.json +963 -0
  11. package/dist/examples/contracts/leadgen.json +240 -0
  12. package/dist/examples/contracts/publisher.json +372 -0
  13. package/dist/examples/contracts/saas.json +229 -0
  14. package/dist/examples/contracts/travel.json +234 -0
  15. package/dist/examples/customers/README.md +4 -1
  16. package/dist/examples/event.json +1 -1
  17. package/dist/examples/flow-complete.json +107 -130
  18. package/dist/examples/flow-complete.md +12 -10
  19. package/dist/examples/flow-order-complete.json +1 -1
  20. package/dist/examples/flow.json +1 -1
  21. package/dist/examples/index.d.ts +34 -4
  22. package/dist/examples/index.js +128 -139
  23. package/dist/examples/index.js.map +1 -1
  24. package/dist/examples/shared/README.md +4 -0
  25. package/dist/index.d.ts +63 -223
  26. package/dist/index.js +572 -992
  27. package/dist/index.js.map +1 -1
  28. package/dist/validate.d.ts +1 -1
  29. package/dist/validate.js +337 -204
  30. package/dist/validate.js.map +1 -1
  31. package/examples/README.md +12 -1
  32. package/examples/contracts/app.json +261 -0
  33. package/examples/contracts/base.json +708 -0
  34. package/examples/contracts/ecommerce.json +963 -0
  35. package/examples/contracts/leadgen.json +240 -0
  36. package/examples/contracts/publisher.json +372 -0
  37. package/examples/contracts/saas.json +229 -0
  38. package/examples/contracts/travel.json +234 -0
  39. package/examples/customers/README.md +4 -1
  40. package/examples/event.json +1 -1
  41. package/examples/flow-complete.json +107 -130
  42. package/examples/flow-complete.md +12 -10
  43. package/examples/flow-order-complete.json +1 -1
  44. package/examples/flow.json +1 -1
  45. package/examples/shared/README.md +4 -0
  46. package/package.json +30 -30
  47. package/src/telemetry/flow.json +42 -34
  48. package/dist/examples/test.html +0 -43
  49. package/dist/examples/web-serve.js +0 -25503
  50. package/examples/test.html +0 -43
  51. package/examples/web-serve.js +0 -25503
@@ -20,3 +20,7 @@ walkeros bundle packages/cli/examples/flow-complete.json -f web -o packages/cli/
20
20
  walkeros bundle packages/cli/examples/flow-complete.json -f server -o dist/server.mjs
21
21
  runneros start dist/server.mjs -p 8080 --env-file .env
22
22
  ```
23
+
24
+ - `runneros` refuses an `.env` that group or other can read
25
+ (`Refusing to load env file ".env": it is readable by group or other`);
26
+ restrict it with `chmod 600 .env`.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,49 @@
1
- import { Flow, PreviewKey, Elb, Simulation, Ingest, WalkerOS, ObserveWeb, MoinTarget } from '@walkeros/core';
1
+ import { Flow, StepType, PreviewKey, Elb, Simulation, Ingest, WalkerOS, ObserveWeb, MoinTarget } from '@walkeros/core';
2
2
  export { Flow } from '@walkeros/core';
3
3
  import { BuildOptions as BuildOptions$1 } from 'esbuild';
4
4
  import { z, ValidateResult as ValidateResult$1, ValidationError as ValidationError$1, ValidationWarning as ValidationWarning$1, ValidationType } from '@walkeros/core/dev';
5
5
  export { ValidationType, validateFlowStructure } from '@walkeros/core/dev';
6
6
 
7
+ /**
8
+ * Shared resolver for the export name to import from a flow component's
9
+ * package.
10
+ *
11
+ * Both `walkeros bundle` and `walkeros setup` need to know which named export
12
+ * (or default) to pull off a package referenced by a flow component. The
13
+ * precedence chain is:
14
+ *
15
+ * 1. `flow.<kind>.<id>.import` if set (named export selector at the step).
16
+ * 2. `flow.config.bundle.packages[<package>].imports[0]` if set.
17
+ * 3. Otherwise undefined; the caller falls back to the package's `default`
18
+ * export.
19
+ *
20
+ * This lives in `cli/src/core/` so both `commands/bundle/*` and
21
+ * `commands/setup/*` import the same function. Duplicating the chain is how
22
+ * setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`
23
+ * routed through BigQuery's setup because it ignored the `code` field and
24
+ * always grabbed `mod.default`).
25
+ */
26
+
27
+ type ComponentKind = StepType;
28
+ type ResolveSource = 'import' | 'imports' | 'default';
29
+ interface ResolvedExportName {
30
+ /**
31
+ * The named export to pull off the imported module, or `undefined` to
32
+ * indicate the caller should use the package's `default` export.
33
+ */
34
+ exportName: string | undefined;
35
+ /** Which precedence step produced the result (useful for diagnostics). */
36
+ source: ResolveSource;
37
+ }
38
+ /**
39
+ * Resolve the export name to import for a flow component's package.
40
+ *
41
+ * See module docs for the precedence chain. Inline code (`code` is an object)
42
+ * doesn't enter this resolver at all — setup rejects inline code at a higher
43
+ * layer.
44
+ */
45
+ declare function resolveExportName(flow: Flow, kind: ComponentKind, id: string): ResolvedExportName;
46
+
7
47
  /**
8
48
  * CLI Build Configuration
9
49
  *
@@ -230,9 +270,9 @@ declare function buildDataPayload(flowSettings: Flow): Record<string, unknown>;
230
270
  */
231
271
  /**
232
272
  * Preview activation wiring. When present and enabled, the generated entry
233
- * imports the activator from core and lets it decide whether a preview bundle
234
- * boots in place of this flow. The bundle carries only PUBLIC values: a keyring,
235
- * an issuer, and opaque bindings. Never a project id, never a secret.
273
+ * imports the activator from web-core and lets it decide whether a preview
274
+ * bundle boots in place of this flow. The bundle carries only PUBLIC values: a
275
+ * keyring, an issuer, and opaque bindings. Never a project id, never a secret.
236
276
  */
237
277
  interface WrapEntryPreview {
238
278
  enabled: boolean;
@@ -341,31 +381,8 @@ declare function bundle(configOrPath: unknown, options?: {
341
381
  */
342
382
  type Platform = 'web' | 'server';
343
383
 
344
- /**
345
- * Resolve a bearer for an API call, refreshing the stored session when needed.
346
- *
347
- * Priority: `WALKEROS_TOKEN`, then a legacy static token, then the OAuth
348
- * session. Returns null when nothing can be resolved, which callers render as
349
- * "run `walkeros auth login`".
350
- *
351
- * Throws when a refresh was needed but could not be carried out, which is a
352
- * different problem from having no session and must not be reported as one.
353
- */
354
- declare function resolveAccessToken(opts?: {
355
- fetch?: typeof fetch;
356
- now?: () => number;
357
- }): Promise<string | null>;
358
- /**
359
- * Authorization header for the resolved credential, or an empty object when
360
- * there is none. Async because resolving may have to refresh the session.
361
- */
362
- declare function getAuthHeaders(): Promise<Record<string, string>>;
363
- /**
364
- * Where a credential would come from, without resolving or refreshing it.
365
- * For commands that want to send someone to `walkeros auth login` before spending
366
- * a network round trip.
367
- */
368
- declare function credentialSource(): 'env' | 'config' | null;
384
+ /** The one credential the CLI sends: WALKEROS_TOKEN, a token from Account > Automation tokens. */
385
+ declare function resolveAccessToken(): string | null;
369
386
 
370
387
  /** A network call a web run (push or simulate) recorded instead of sending (fetch, sendBeacon, XHR) */
371
388
  interface NetworkCall {
@@ -700,7 +717,7 @@ type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;
700
717
  * Every code an error, warning or skip of `validate` can carry. Agents and
701
718
  * tests branch on these, never on message text.
702
719
  */
703
- declare const VALIDATE_CODES: readonly ["INPUT_ERROR", "SERIALIZATION_ERROR", "OPTION_NOT_APPLICABLE", "FLOW_NOT_FOUND", "ENTRY_NOT_FOUND", "AMBIGUOUS_ENTRY", "UNSUPPORTED_SECTION", "INVALID_PATH", "SCHEMA_VALIDATION", "CONFIG_WARNING", "EMPTY_FLOWS", "UNKNOWN_KEY", "CONFLICT", "MISSING_PACKAGE", "OBSOLETE_CODE_STRING", "INVALID_IMPORT", "INVALID_CODE_SHAPE", "PACKAGE_VERSION_MISSING", "DEPRECATED_PACKAGE", "UNKNOWN_ROUTE_TARGET", "ROUTE_DEAD_CODE", "ROUTE_EMPTY_MANY", "ROUTE_SINGLE_MANY", "ROUTE_FIRST_MATCH", "INCOMPATIBLE_EXAMPLES", "EXAMPLES_INCOMPLETE", "CONTRACT_VIOLATION", "MAPPING_DOT_KEY", "FLOW_REF_WARNING", "FLOW_CYCLE", "VAR_CYCLE", "INVALID_COMPONENT_NAME", "INVALID_REFERENCE", "STORE_REFERENCE_NOT_FOUND", "STATE_STORE_UNKNOWN", "STATE_STORE_FILE", "TRANSFORMER_MAPPING_NO_OP", "UNRESOLVED_REFERENCE", "MISSING_ENV", "WEB_SECRET_REF", "UNRESOLVED_CONTRACT", "ENTRY_SCHEMA", "NO_CONTRACT_SECTION", "INVALID_CONTRACT", "FLAT_CONTRACT_SHAPE", "INVALID_CONTRACT_ENTRY", "UNKNOWN_CONTRACT_KEY", "INVALID_TAGGING", "INVALID_SCHEMA", "INVALID_EXTENDS", "INVALID_SECTION", "INVALID_EVENTS", "CIRCULAR_EXTENDS", "INVALID_ENTITY_KEY", "INVALID_ENTITY", "INVALID_ACTION_KEY", "INVALID_SCHEMA_ENTRY", "NOT_AN_OBJECT", "MISSING_EVENT_NAME", "EMPTY_EVENT_NAME", "INVALID_EVENT_NAME", "INVALID_MAPPING_TYPE", "INVALID_EVENT_PATTERN", "INVALID_RULE_TYPE", "CATCH_ALL_NOT_LAST", "GATED_BY_ERRORS", "CONTRACT_NOT_STATIC", "NO_PACKAGE", "NO_SETTINGS_SCHEMA", "SCHEMA_UNAVAILABLE"];
720
+ declare const VALIDATE_CODES: readonly ["INPUT_ERROR", "SERIALIZATION_ERROR", "OPTION_NOT_APPLICABLE", "FLOW_NOT_FOUND", "ENTRY_NOT_FOUND", "AMBIGUOUS_ENTRY", "UNSUPPORTED_SECTION", "INVALID_PATH", "SCHEMA_VALIDATION", "CONFIG_WARNING", "EMPTY_FLOWS", "UNKNOWN_KEY", "CONFLICT", "MISSING_PACKAGE", "OBSOLETE_CODE_STRING", "INVALID_IMPORT", "INVALID_CODE_SHAPE", "PACKAGE_VERSION_MISSING", "DEPRECATED_PACKAGE", "UNKNOWN_ROUTE_TARGET", "ROUTE_DEAD_CODE", "ROUTE_EMPTY_MANY", "ROUTE_SINGLE_MANY", "ROUTE_FIRST_MATCH", "INCOMPATIBLE_EXAMPLES", "EXAMPLES_INCOMPLETE", "CONTRACT_VIOLATION", "MAPPING_DOT_KEY", "FLOW_REF_WARNING", "WEB_LOGGER_FORMAT", "FLOW_CYCLE", "VAR_CYCLE", "INVALID_COMPONENT_NAME", "INVALID_REFERENCE", "STORE_REFERENCE_NOT_FOUND", "STATE_STORE_UNKNOWN", "STATE_STORE_FILE", "MAPPING_NO_OP", "MAPPING_VALUE_NO_OPERATOR", "MAPPING_VALUE_PRODUCERS", "BATCH_WITHOUT_PUSH_BATCH", "MALFORMED_REFERENCE", "UNRESOLVED_REFERENCE", "MISSING_ENV", "WEB_SECRET_REF", "UNRESOLVED_CONTRACT", "ENTRY_SCHEMA", "NO_CONTRACT_SECTION", "INVALID_CONTRACT", "FLAT_CONTRACT_SHAPE", "INVALID_CONTRACT_ENTRY", "UNKNOWN_CONTRACT_KEY", "INVALID_TAGGING", "INVALID_SCHEMA", "INVALID_EXTENDS", "INVALID_EVENTS", "CIRCULAR_EXTENDS", "INVALID_ENTITY_KEY", "INVALID_ENTITY", "INVALID_ACTION_KEY", "INVALID_SCHEMA_ENTRY", "NOT_AN_OBJECT", "MISSING_EVENT_NAME", "EMPTY_EVENT_NAME", "INVALID_EVENT_NAME", "INVALID_MAPPING_TYPE", "INVALID_EVENT_PATTERN", "INVALID_RULE_TYPE", "CATCH_ALL_NOT_LAST", "GATED_BY_ERRORS", "CONTRACT_NOT_STATIC", "NO_PACKAGE", "NO_SETTINGS_SCHEMA", "SCHEMA_UNAVAILABLE"];
704
721
  type ValidateCode = (typeof VALIDATE_CODES)[number];
705
722
  /**
706
723
  * Named checks a run includes (`details.scope.checks`). `file:` checks run
@@ -802,95 +819,6 @@ interface GlobalOptions {
802
819
  silent?: boolean;
803
820
  }
804
821
 
805
- interface LoginCommandOptions extends GlobalOptions {
806
- url?: string;
807
- json?: boolean;
808
- }
809
- interface LoginResult {
810
- success: boolean;
811
- email?: string;
812
- configPath?: string;
813
- error?: string;
814
- }
815
- interface LoginOptions {
816
- url?: string;
817
- /** Override browser opener for testing */
818
- openUrl?: (url: string) => Promise<void>;
819
- /** Override fetch for testing */
820
- fetch?: typeof globalThis.fetch;
821
- /** Max poll attempts before giving up (for testing) */
822
- maxPollAttempts?: number;
823
- /** Poll interval, replacing the server's stated one (for testing) */
824
- pollIntervalMs?: number;
825
- }
826
- /**
827
- * The outcome of finishing a device authorization.
828
- *
829
- * It carries no token material. `completeDeviceLogin` stores the session
830
- * itself, so the credential file keeps exactly one writer and a caller can
831
- * neither persist nor leak what came back.
832
- *
833
- * `pending` and `slow_down` both mean the window closed with the approval
834
- * still outstanding: the device code is untouched, so the same code can be
835
- * handed back in. `slow_down` is that same situation with the server asking
836
- * for a wider gap before the next attempt.
837
- */
838
- type DeviceLoginResult = {
839
- status: 'ok';
840
- } | {
841
- status: 'pending';
842
- } | {
843
- status: 'slow_down';
844
- } | {
845
- status: 'denied';
846
- } | {
847
- status: 'expired';
848
- } | {
849
- status: 'error';
850
- error: string;
851
- };
852
- interface CompleteDeviceLoginOptions {
853
- /** App to poll. Defaults to the resolved app URL. */
854
- url?: string;
855
- /** Stop polling after this long. */
856
- timeoutMs?: number;
857
- /** Wait between polls, before any `slow_down` widens it. */
858
- intervalMs?: number;
859
- /** Override fetch for testing */
860
- fetch?: typeof globalThis.fetch;
861
- /** Max poll attempts before giving up (for testing) */
862
- maxPollAttempts?: number;
863
- }
864
- declare function loginCommand(options: LoginCommandOptions): Promise<void>;
865
- /**
866
- * Poll a device authorization to its end and store the session it yields.
867
- *
868
- * Split out from `login` so a caller holding only a device code can finish an
869
- * authorization that is already under way. `login` cannot serve that: it
870
- * starts a fresh authorization on every call, which would strand the code the
871
- * person is looking at.
872
- */
873
- declare function completeDeviceLogin(deviceCode: string, options?: CompleteDeviceLoginOptions): Promise<DeviceLoginResult>;
874
- declare function login(options?: LoginOptions): Promise<LoginResult>;
875
-
876
- interface LogoutCommandOptions extends GlobalOptions {
877
- json?: boolean;
878
- }
879
- declare function logoutCommand(options: LogoutCommandOptions): Promise<void>;
880
- interface LogoutResult {
881
- deleted: boolean;
882
- /** A different session reached the config while the revocation was in flight. */
883
- superseded: boolean;
884
- }
885
- /**
886
- * Revoke the stored refresh token, then drop the local config.
887
- *
888
- * Revocation first, because deleting the file alone would leave a credential
889
- * alive on the server that nothing can ever reach to retire. It is best
890
- * effort: a logout on a plane still has to clear the machine.
891
- */
892
- declare function logout(): Promise<LogoutResult>;
893
-
894
822
  /** Who the current credential belongs to, as the app answers it. */
895
823
  declare function whoami(): Promise<unknown>;
896
824
  interface WhoamiCommandOptions extends GlobalOptions {
@@ -1057,10 +985,10 @@ declare const BuildBundleArtifactSchema: z.ZodObject<{
1057
985
  contentType: z.ZodOptional<z.ZodString>;
1058
986
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1059
987
  target: z.ZodEnum<{
1060
- runner: "runner";
1061
988
  push: "push";
1062
989
  cdn: "cdn";
1063
990
  "cdn-skeleton": "cdn-skeleton";
991
+ runner: "runner";
1064
992
  simulate: "simulate";
1065
993
  }>;
1066
994
  }, z.core.$strict>;
@@ -1180,10 +1108,10 @@ declare const BuildArtifactSchema: z.ZodUnion<readonly [z.ZodObject<{
1180
1108
  contentType: z.ZodOptional<z.ZodString>;
1181
1109
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1182
1110
  target: z.ZodEnum<{
1183
- runner: "runner";
1184
1111
  push: "push";
1185
1112
  cdn: "cdn";
1186
1113
  "cdn-skeleton": "cdn-skeleton";
1114
+ runner: "runner";
1187
1115
  simulate: "simulate";
1188
1116
  }>;
1189
1117
  }, z.core.$strict>, z.ZodObject<{
@@ -1261,10 +1189,10 @@ declare const BuildManifestSchema: z.ZodObject<{
1261
1189
  contentType: z.ZodOptional<z.ZodString>;
1262
1190
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1263
1191
  target: z.ZodEnum<{
1264
- runner: "runner";
1265
1192
  push: "push";
1266
1193
  cdn: "cdn";
1267
1194
  "cdn-skeleton": "cdn-skeleton";
1195
+ runner: "runner";
1268
1196
  simulate: "simulate";
1269
1197
  }>;
1270
1198
  }, z.core.$strict>, z.ZodObject<{
@@ -1420,20 +1348,6 @@ declare function runBuildManifest(source: string, retry?: BuildRetryOptions): Pr
1420
1348
  /** Resolve the `--manifest` value, falling back to the env for a bare flag. */
1421
1349
  declare function resolveManifestSource(manifest: string | true, env?: Record<string, string | undefined>): string;
1422
1350
 
1423
- interface DeviceAuthorization {
1424
- deviceCode: string;
1425
- userCode: string;
1426
- verificationUri: string;
1427
- verificationUriComplete: string;
1428
- expiresIn: number;
1429
- interval: number;
1430
- }
1431
- /**
1432
- * RFC 8628 section 3.1. Ask for a device code and the URL to send the person
1433
- * to. Unauthenticated: the code is worth nothing until somebody approves it.
1434
- */
1435
- declare function startDeviceAuthorization(appUrl: string, fetchFn?: typeof fetch): Promise<DeviceAuthorization>;
1436
-
1437
1351
  interface ApiErrorDetail {
1438
1352
  path: string;
1439
1353
  message: string;
@@ -1511,35 +1425,24 @@ declare function appErrorMessage(body: unknown): string | undefined;
1511
1425
  declare function appFetch(path: string, init?: AppFetchInit): Promise<Response>;
1512
1426
 
1513
1427
  /**
1514
- * The app operations the CLI itself calls: the OAuth device flow, identity,
1515
- * health, telemetry and the public API document. The app keeps every one in
1516
- * its public API set, so its change rule protects them. The only file in the
1517
- * CLI that names an app path; `walkeros api` takes its path from the person.
1428
+ * The app operations the CLI itself calls: identity, health, telemetry and
1429
+ * the public API document. The app keeps every one in its public API set, so
1430
+ * its change rule protects them. The only file in the CLI that names an app
1431
+ * path; `walkeros api` takes its path from the person.
1518
1432
  */
1519
1433
  declare const APP_PATHS: {
1520
- readonly deviceAuthorization: "/api/oauth/device_authorization";
1521
- readonly token: "/api/oauth/token";
1522
- readonly revoke: "/api/oauth/revoke";
1523
1434
  readonly whoami: "/api/auth/whoami";
1524
1435
  readonly health: "/api/health";
1525
1436
  readonly telemetry: "/api/telemetry";
1526
1437
  readonly openapi: "/api/openapi.json";
1527
1438
  };
1528
1439
 
1440
+ /**
1441
+ * The CLI's own settings. It holds no credential: the CLI authenticates with
1442
+ * WALKEROS_TOKEN only, and sign-in fields an older CLI left in the file are
1443
+ * never read.
1444
+ */
1529
1445
  interface WalkerOSConfig {
1530
- /**
1531
- * Static bearer written by the pre-OAuth CLI. Honored until it expires, and
1532
- * the first use in a process prints a one-line notice naming
1533
- * `walkeros auth login`, which replaces it with a refreshable session.
1534
- */
1535
- token?: string;
1536
- /** Short-lived bearer from the device authorization grant. */
1537
- accessToken?: string;
1538
- /** ISO 8601 instant at which `accessToken` stops being accepted. */
1539
- accessTokenExpiresAt?: string;
1540
- /** Single-use credential that buys a new `accessToken`. */
1541
- refreshToken?: string;
1542
- email?: string;
1543
1446
  appUrl?: string;
1544
1447
  anonymousFeedback?: boolean;
1545
1448
  defaultProjectId?: string;
@@ -1564,35 +1467,12 @@ declare function readConfig(): WalkerOSConfig | null;
1564
1467
  * Merge `config` into the stored config and write the result.
1565
1468
  *
1566
1469
  * Merging rather than replacing, because the file holds fields owned by
1567
- * unrelated commands: a writer that knows only about tokens would otherwise
1568
- * drop `defaultProjectId`, `installationId`, `telemetryEnabled` and
1569
- * `anonymousFeedback` every time somebody logs in.
1470
+ * unrelated commands: a writer that knows only about telemetry would otherwise
1471
+ * drop `appUrl`, `defaultProjectId` and `anonymousFeedback`.
1570
1472
  *
1571
- * A key passed explicitly as `undefined` is removed from the written file,
1572
- * which is how login drops the legacy static token it replaces.
1473
+ * A key passed explicitly as `undefined` is removed from the written file.
1573
1474
  */
1574
1475
  declare function writeConfig(config: WalkerOSConfig): void;
1575
- /**
1576
- * Remove every credential field, keeping the rest of the config.
1577
- *
1578
- * Used when the stored session is known to be dead, so the next command can
1579
- * say "run `walkeros auth login`" instead of failing against the API.
1580
- */
1581
- declare function clearAuthFields(): void;
1582
- /**
1583
- * Delete the config file (logout)
1584
- */
1585
- declare function deleteConfig(): boolean;
1586
- /**
1587
- * Resolve the API token using priority order:
1588
- * 1. WALKEROS_TOKEN env var
1589
- * 2. Config file (~/.config/walkeros/config.json)
1590
- * 3. null (not authenticated)
1591
- */
1592
- declare function resolveToken(): {
1593
- token: string;
1594
- source: 'env' | 'config';
1595
- } | null;
1596
1476
  /**
1597
1477
  * Resolve the app URL.
1598
1478
  * WALKEROS_APP_URL env var > config file > default.
@@ -1670,46 +1550,6 @@ declare function loadJsonConfig<T>(configPath: string): Promise<T>;
1670
1550
  */
1671
1551
  declare function collectKnownSecrets(flow: Flow.Json, env?: NodeJS.ProcessEnv): string[];
1672
1552
 
1673
- /**
1674
- * Shared resolver for the export name to import from a flow component's
1675
- * package.
1676
- *
1677
- * Both `walkeros bundle` and `walkeros setup` need to know which named export
1678
- * (or default) to pull off a package referenced by a flow component. The
1679
- * precedence chain is:
1680
- *
1681
- * 1. `flow.<kind>.<id>.import` if set (named export selector at the step).
1682
- * 2. `flow.config.bundle.packages[<package>].imports[0]` if set.
1683
- * 3. Otherwise undefined; the caller falls back to the package's `default`
1684
- * export.
1685
- *
1686
- * This lives in `cli/src/core/` so both `commands/bundle/*` and
1687
- * `commands/setup/*` import the same function. Duplicating the chain is how
1688
- * setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`
1689
- * routed through BigQuery's setup because it ignored the `code` field and
1690
- * always grabbed `mod.default`).
1691
- */
1692
-
1693
- type ComponentKind = 'source' | 'transformer' | 'destination' | 'store';
1694
- type ResolveSource = 'import' | 'imports' | 'default';
1695
- interface ResolvedExportName {
1696
- /**
1697
- * The named export to pull off the imported module, or `undefined` to
1698
- * indicate the caller should use the package's `default` export.
1699
- */
1700
- exportName: string | undefined;
1701
- /** Which precedence step produced the result (useful for diagnostics). */
1702
- source: ResolveSource;
1703
- }
1704
- /**
1705
- * Resolve the export name to import for a flow component's package.
1706
- *
1707
- * See module docs for the precedence chain. Inline code (`code` is an object)
1708
- * doesn't enter this resolver at all — setup rejects inline code at a higher
1709
- * layer.
1710
- */
1711
- declare function resolveExportName(flow: Flow, kind: ComponentKind, id: string): ResolvedExportName;
1712
-
1713
1553
  /**
1714
1554
  * Selects the dev examples of one export from a package's awaited `/dev`
1715
1555
  * module.
@@ -1887,4 +1727,4 @@ declare module '@walkeros/core' {
1887
1727
  }
1888
1728
  }
1889
1729
 
1890
- export { APP_PATHS, ApiError, type ApiErrorDetail, type AppFetchInit, BUILD_ERROR_CODES, BUILD_MANIFEST_ENV, BUILD_MANIFEST_VERSION, type BuildArtifact, BuildArtifactSchema, BuildBundleArtifactSchema, type BuildErrorCode, type BuildManifest, BuildManifestSchema, type BuildOptions, type BuildResult, BuildResultSchema, BuildWrapArtifactSchema, type BuildWrapOptions, BuildWrapOptionsSchema, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type CompleteDeviceLoginOptions, type DeviceAuthorization, type DeviceLoginResult, type GlobalOptions, type LoginOptions, type LoginResult, type MinifyOptions, type PrepareInput, type PreparedFlow, type PushResult, type RunBuildManifestResult, type SimulateCollectorOptions, type SimulateDataOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, VALIDATE_CODES, VERSION, type ValidateCheck, type ValidateCode, type ValidateDeferred, type ValidateResult, type ValidateScope, type ValidateSkip, type ValidationError, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, appErrorMessage, appFetch, buildDataPayload, bundle, bundleCommand, classifyStepProperties, clearAuthFields, clientContextHeaders, collectKnownSecrets, completeDeviceLogin, containsCodeMarkers, credentialSource, deleteConfig, formatPushResult, getAuthHeaders, getClientContext, loadConfig, loadJsonConfig, login, loginCommand, logout, logoutCommand, push, pushCommand, readConfig, resetClientContext, resolveAccessToken, resolveAppUrl, resolveExportName, resolveManifestSource, resolveToken, runBuildManifest, selectDevExamples, setClientContext, simulateCollector, simulateDestination, simulateSource, simulateTransformer, startDeviceAuthorization, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };
1730
+ export { APP_PATHS, ApiError, type ApiErrorDetail, type AppFetchInit, BUILD_ERROR_CODES, BUILD_MANIFEST_ENV, BUILD_MANIFEST_VERSION, type BuildArtifact, BuildArtifactSchema, BuildBundleArtifactSchema, type BuildErrorCode, type BuildManifest, BuildManifestSchema, type BuildOptions, type BuildResult, BuildResultSchema, BuildWrapArtifactSchema, type BuildWrapOptions, BuildWrapOptionsSchema, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type GlobalOptions, type MinifyOptions, type PrepareInput, type PreparedFlow, type PushResult, type RunBuildManifestResult, type SimulateCollectorOptions, type SimulateDataOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, VALIDATE_CODES, VERSION, type ValidateCheck, type ValidateCode, type ValidateDeferred, type ValidateResult, type ValidateScope, type ValidateSkip, type ValidationError, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, appErrorMessage, appFetch, buildDataPayload, bundle, bundleCommand, classifyStepProperties, clientContextHeaders, collectKnownSecrets, containsCodeMarkers, formatPushResult, getClientContext, loadConfig, loadJsonConfig, push, pushCommand, readConfig, resetClientContext, resolveAccessToken, resolveAppUrl, resolveExportName, resolveManifestSource, runBuildManifest, selectDevExamples, setClientContext, simulateCollector, simulateDestination, simulateSource, simulateTransformer, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };