@walkeros/cli 4.7.0-next-1790722899482 → 4.7.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/dist/index.d.ts CHANGED
@@ -102,8 +102,9 @@ interface BuildOptions extends CLIBuildOptions {
102
102
  */
103
103
  minifyOptions?: MinifyOptions;
104
104
  /**
105
- * Window property name for collector (web platform only).
106
- * @default "collector"
105
+ * Window property name for collector (web platform only). Set from the
106
+ * flow's `config.settings.windowCollector`.
107
+ * @default "walkerOS"
107
108
  */
108
109
  windowCollector?: string;
109
110
  /**
@@ -267,7 +268,7 @@ interface BundleCommandOptions {
267
268
  cache?: boolean;
268
269
  verbose?: boolean;
269
270
  silent?: boolean;
270
- /** Config release id baked into config.collector.release (set-if-absent). */
271
+ /** Release id baked into config.collector.release. Beats an authored one. */
271
272
  release?: string;
272
273
  }
273
274
  declare function bundleCommand(options: BundleCommandOptions): Promise<void>;
@@ -313,8 +314,9 @@ declare function bundle(configOrPath: unknown, options?: {
313
314
  cache?: boolean;
314
315
  flowName?: string;
315
316
  /**
316
- * Config release id baked into `config.collector.release` (set-if-absent),
317
- * stamping this flow's entry in `event.source.release` at runtime.
317
+ * Release id baked into `config.collector.release`, stamping this flow's
318
+ * entry in `event.source.release` at runtime. Beats an authored release;
319
+ * omitted, the release is a content id of config, packages and CLI.
318
320
  */
319
321
  release?: string;
320
322
  /**
@@ -727,6 +729,8 @@ declare const ValidateOptionsSchema: z.ZodObject<{
727
729
  flow: z.ZodOptional<z.ZodString>;
728
730
  path: z.ZodOptional<z.ZodString>;
729
731
  strict: z.ZodOptional<z.ZodBoolean>;
732
+ offline: z.ZodOptional<z.ZodBoolean>;
733
+ configDir: z.ZodOptional<z.ZodString>;
730
734
  }, z.core.$strip>;
731
735
  type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;
732
736
 
@@ -734,14 +738,14 @@ type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;
734
738
  * Every code an error, warning or skip of `validate` can carry. Agents and
735
739
  * tests branch on these, never on message text.
736
740
  */
737
- 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", "ENTRY_SCHEMA", "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", "NO_PACKAGE", "NO_SETTINGS_SCHEMA", "SCHEMA_UNAVAILABLE"];
741
+ 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", "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"];
738
742
  type ValidateCode = (typeof VALIDATE_CODES)[number];
739
743
  /**
740
744
  * Named checks a run includes (`details.scope.checks`). `file:` checks run
741
745
  * on the whole file whatever `--flow` says; `flow:` checks run per flow in
742
746
  * scope; `entry:` checks run per entry `--path` addressed.
743
747
  */
744
- type ValidateCheck = 'file:schema' | 'flow:schema' | 'flow:steps' | 'flow:package-versions' | 'flow:routes' | 'flow:examples' | 'flow:contract-examples' | 'flow:mapping-keys' | 'flow:flow-refs' | 'entry:settings' | 'contract' | 'event' | 'mapping';
748
+ type ValidateCheck = 'file:schema' | 'file:contract' | 'flow:schema' | 'flow:steps' | 'flow:structure' | 'flow:package-versions' | 'flow:routes' | 'flow:examples' | 'flow:contract-examples' | 'flow:mapping-keys' | 'flow:resolve' | 'flow:package-settings' | 'entry:settings' | 'contract' | 'event' | 'mapping';
745
749
  interface ValidateScopeEntry {
746
750
  /** Section of the addressed entry, when the path or the match names one. */
747
751
  section?: string;
@@ -756,6 +760,8 @@ interface ValidateScope {
756
760
  flows: string[];
757
761
  entry?: ValidateScopeEntry;
758
762
  checks: ValidateCheck[];
763
+ /** Set when `offline` removed the package settings check from `checks`. */
764
+ offline?: true;
759
765
  }
760
766
  /** A check the scope includes that did not run (C5). */
761
767
  interface ValidateSkip {
@@ -796,6 +802,8 @@ interface ValidateCommandOptions {
796
802
  json?: boolean;
797
803
  verbose?: boolean;
798
804
  strict?: boolean;
805
+ /** Skip every package settings check (no network); named in the scope. */
806
+ offline?: boolean;
799
807
  silent?: boolean;
800
808
  }
801
809
 
@@ -15408,11 +15416,11 @@ declare const BuildResultSchema: z.ZodObject<{
15408
15416
  }, z.core.$strip>>;
15409
15417
  error: z.ZodOptional<z.ZodObject<{
15410
15418
  code: z.ZodEnum<{
15419
+ WEB_SECRET_REF: "WEB_SECRET_REF";
15411
15420
  INVALID_MANIFEST: "INVALID_MANIFEST";
15412
15421
  TOOLCHAIN_MISMATCH: "TOOLCHAIN_MISMATCH";
15413
15422
  INVALID_CONFIG: "INVALID_CONFIG";
15414
15423
  MISSING_BUILD_ENV: "MISSING_BUILD_ENV";
15415
- WEB_SECRET_REF: "WEB_SECRET_REF";
15416
15424
  UNSUPPORTED_PACKAGE_SPEC: "UNSUPPORTED_PACKAGE_SPEC";
15417
15425
  LOCAL_PATH_NOT_ALLOWED: "LOCAL_PATH_NOT_ALLOWED";
15418
15426
  BUILD_FAILED: "BUILD_FAILED";
@@ -15424,6 +15432,26 @@ declare const BuildResultSchema: z.ZodObject<{
15424
15432
  }, z.core.$strip>;
15425
15433
  type BuildResult = z.infer<typeof BuildResultSchema>;
15426
15434
 
15435
+ /**
15436
+ * One retry policy for every network call of a manifest build: the manifest
15437
+ * download, a skeleton download and each PUT. A transient failure (the fetch
15438
+ * rejects, times out, or answers 5xx or 429) is retried; any other status
15439
+ * fails at once, since an expired or wrong presign never heals.
15440
+ *
15441
+ * Messages never carry the URL, its query or a header value: presigned
15442
+ * credentials live there.
15443
+ */
15444
+ interface FetchRetryOptions {
15445
+ /** Names the call in warnings and errors, e.g. `Manifest download`. */
15446
+ label: string;
15447
+ /** Per-attempt timeout; each attempt gets a fresh signal. */
15448
+ timeoutMs: number;
15449
+ /** Called once per retry with a ready-to-print line. */
15450
+ warn?: (message: string) => void;
15451
+ /** Injectable for tests. */
15452
+ sleep?: (ms: number) => Promise<void>;
15453
+ }
15454
+
15427
15455
  /**
15428
15456
  * `walkeros bundle --manifest <source>`: build from a manifest.
15429
15457
  *
@@ -15439,6 +15467,8 @@ type BuildResult = z.infer<typeof BuildResultSchema>;
15439
15467
 
15440
15468
  /** Env var a bare `--manifest` reads its source from. */
15441
15469
  declare const BUILD_MANIFEST_ENV = "BUILD_MANIFEST_URL";
15470
+ /** Retry hooks for the build's network calls; see `fetchWithRetry`. */
15471
+ type BuildRetryOptions = Pick<FetchRetryOptions, 'warn' | 'sleep'>;
15442
15472
  interface RunBuildManifestResult {
15443
15473
  result: BuildResult;
15444
15474
  /** False when the result could not be PUT (or the manifest was unreadable). */
@@ -15447,8 +15477,10 @@ interface RunBuildManifestResult {
15447
15477
  /**
15448
15478
  * Run a manifest build end to end. Never throws: every failure becomes a
15449
15479
  * result, and `reported` says whether that result reached `resultPutUrl`.
15480
+ * Each download and upload retries transient failures; `retry.warn` hears
15481
+ * about every retry.
15450
15482
  */
15451
- declare function runBuildManifest(source: string): Promise<RunBuildManifestResult>;
15483
+ declare function runBuildManifest(source: string, retry?: BuildRetryOptions): Promise<RunBuildManifestResult>;
15452
15484
  /** Resolve the `--manifest` value, falling back to the env for a bare flag. */
15453
15485
  declare function resolveManifestSource(manifest: string | true, env?: Record<string, string | undefined>): string;
15454
15486
 
@@ -16026,14 +16058,6 @@ declare function loadJsonConfig<T>(configPath: string): Promise<T>;
16026
16058
  * value is masked whatever its shape.
16027
16059
  */
16028
16060
  declare function collectKnownSecrets(flow: Flow.Json, env?: NodeJS.ProcessEnv): string[];
16029
- /**
16030
- * A deep copy of `value` in which every number whose printed form contains a
16031
- * known secret (6+ characters, e.g. `12345678`, `-1234567`, `1234567.5`)
16032
- * becomes `'***'`. Masking such a number inside serialized JSON would leave an
16033
- * unquoted `***` and break the JSON, so it runs on the value before
16034
- * `JSON.stringify`; the text scrub still runs on the serialized result.
16035
- */
16036
- declare function maskKnownNumbers(value: unknown, known: readonly string[]): unknown;
16037
16061
 
16038
16062
  /**
16039
16063
  * Shared resolver for the export name to import from a flow component's
@@ -16252,4 +16276,4 @@ declare module '@walkeros/core' {
16252
16276
  }
16253
16277
  }
16254
16278
 
16255
- export { type AddThreadMessageOptions, ApiError, type ApiErrorDetail, 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 CompareContractInput, type CompleteDeviceLoginOptions, type ContractComparison, type ContractVerdict, type CreatePreviewOptions, type CreateSecretOptions, type CreateThreadOptions, type DeletePreviewOptions, type DeleteSecretOptions, type DeployOptions, DeploymentAmbiguityError, type DeploymentSummaryForFlow, type DeviceAuthorization, type DeviceLoginResult, type EndObserveSessionOptions, type FeedbackOptions, type GetFrameOptions, type GetObserveSessionOptions, type GetPreviewOptions, type GetReleaseOptions, type GlobalOptions, type HealthResult, type ListDeploymentsOptions, type ListFlowsOptions, type ListFramesOptions, type ListJourneysOptions, type ListKnowledgeOptions, type ListPageFramesOptions, type ListPreviewsOptions, type ListProjectsOptions, type ListReleasesOptions, type ListSecretsOptions, type ListStepHistoryOptions, type ListThreadsOptions, type LoginOptions, type LoginResult, type MinifyOptions, type PrepareInput, type PreparedFlow, type ProjectFlows, type PushResult, type RegrantPreviewOptions, type ReleaseDetailResponse, type ReleaseDiffResponse, type ReleaseIndexResponse, type ReleaseRationaleSummary, type ReleaseRef, type RunBuildManifestResult, type SSEEvent, type SSEParseResult, type SetReleaseRationaleOptions, type SimulateCollectorOptions, type SimulateDataOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type StartObserveSessionOptions, type ThreadAnchorType, type ThreadStatus, type UpdateSecretOptions, VERSION, type ValidateResult, type ValidationError, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, addThreadMessage, annotateErrorWithDrift, apiFetch, bakedContractHash, bakedContractVersion, buildDataPayload, bundle, bundleCommand, canonicalContractHash, classifyStepProperties, clearAuthFields, clientContextHeaders, collectKnownSecrets, compareContract, completeDeviceLogin, containsCodeMarkers, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, createSecret, createThread, credentialSource, deleteConfig, deleteDeployment, deleteDeploymentByFlowId, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deleteSecret, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, endObserveSession, feedback, feedbackCommand, fetchHealth, formatPushResult, getAuthHeaders, getClientContext, getDefaultProject, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFeedbackPreference, getFlow, getFlowCommand, getFrame, getObserveSession, getPreview, getProject, getProjectCommand, getRelease, listAllFlows, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listFrames, listJourneys, listKnowledge, listPageFrames, listPreviews, listProjects, listProjectsCommand, listReleases, listSecrets, listStepHistory, listThreads, loadConfig, loadJsonConfig, login, loginCommand, logout, logoutCommand, maskKnownNumbers, mergeAuthHeaders, parseSSEEvents, publicFetch, push, pushCommand, readConfig, regrantPreview, requireProjectId, resetClientContext, resolveAccessToken, resolveAppUrl, resolveExportName, resolveManifestSource, resolveToken, runBuildManifest, selectDevExamples, setClientContext, setDefaultProject, setFeedbackPreference, setReleaseRationale, simulateCollector, simulateDestination, simulateSource, simulateTransformer, startDeviceAuthorization, startObserveSession, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, updateSecret, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };
16279
+ export { type AddThreadMessageOptions, ApiError, type ApiErrorDetail, 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 CompareContractInput, type CompleteDeviceLoginOptions, type ContractComparison, type ContractVerdict, type CreatePreviewOptions, type CreateSecretOptions, type CreateThreadOptions, type DeletePreviewOptions, type DeleteSecretOptions, type DeployOptions, DeploymentAmbiguityError, type DeploymentSummaryForFlow, type DeviceAuthorization, type DeviceLoginResult, type EndObserveSessionOptions, type FeedbackOptions, type GetFrameOptions, type GetObserveSessionOptions, type GetPreviewOptions, type GetReleaseOptions, type GlobalOptions, type HealthResult, type ListDeploymentsOptions, type ListFlowsOptions, type ListFramesOptions, type ListJourneysOptions, type ListKnowledgeOptions, type ListPageFramesOptions, type ListPreviewsOptions, type ListProjectsOptions, type ListReleasesOptions, type ListSecretsOptions, type ListStepHistoryOptions, type ListThreadsOptions, type LoginOptions, type LoginResult, type MinifyOptions, type PrepareInput, type PreparedFlow, type ProjectFlows, type PushResult, type RegrantPreviewOptions, type ReleaseDetailResponse, type ReleaseDiffResponse, type ReleaseIndexResponse, type ReleaseRationaleSummary, type ReleaseRef, type RunBuildManifestResult, type SSEEvent, type SSEParseResult, type SetReleaseRationaleOptions, type SimulateCollectorOptions, type SimulateDataOptions, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type StartObserveSessionOptions, type ThreadAnchorType, type ThreadStatus, type UpdateSecretOptions, VALIDATE_CODES, VERSION, type ValidateCheck, type ValidateCode, type ValidateDeferred, type ValidateResult, type ValidateScope, type ValidateSkip, type ValidationError, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, addThreadMessage, annotateErrorWithDrift, apiFetch, bakedContractHash, bakedContractVersion, buildDataPayload, bundle, bundleCommand, canonicalContractHash, classifyStepProperties, clearAuthFields, clientContextHeaders, collectKnownSecrets, compareContract, completeDeviceLogin, containsCodeMarkers, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, createSecret, createThread, credentialSource, deleteConfig, deleteDeployment, deleteDeploymentByFlowId, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deleteSecret, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, endObserveSession, feedback, feedbackCommand, fetchHealth, formatPushResult, getAuthHeaders, getClientContext, getDefaultProject, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFeedbackPreference, getFlow, getFlowCommand, getFrame, getObserveSession, getPreview, getProject, getProjectCommand, getRelease, listAllFlows, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listFrames, listJourneys, listKnowledge, listPageFrames, listPreviews, listProjects, listProjectsCommand, listReleases, listSecrets, listStepHistory, listThreads, loadConfig, loadJsonConfig, login, loginCommand, logout, logoutCommand, mergeAuthHeaders, parseSSEEvents, publicFetch, push, pushCommand, readConfig, regrantPreview, requireProjectId, resetClientContext, resolveAccessToken, resolveAppUrl, resolveExportName, resolveManifestSource, resolveToken, runBuildManifest, selectDevExamples, setClientContext, setDefaultProject, setFeedbackPreference, setReleaseRationale, simulateCollector, simulateDestination, simulateSource, simulateTransformer, startDeviceAuthorization, startObserveSession, index as telemetry, telemetryDisableCommand, telemetryEnableCommand, telemetryStatusCommand, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, updateSecret, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };