@walkeros/cli 4.5.0 → 4.5.1-next-1788726985928

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.js CHANGED
@@ -139,9 +139,17 @@ function createCLILoggerConfig(options = {}) {
139
139
  // at DEBUG, ERROR always reaches the handler (and the ring) even without
140
140
  // --verbose.
141
141
  level: Level.DEBUG,
142
- handler: (level, message, _context, scope) => {
142
+ handler: (level, message, context2, scope) => {
143
143
  const scopePath = scope.length > 0 ? `[${scope.join(":")}] ` : "";
144
- const fullMessage = scrubSecrets(`${scopePath}${message}`);
144
+ let meta = "";
145
+ if (Object.keys(context2).length > 0) {
146
+ try {
147
+ meta = ` ${JSON.stringify(context2)}`;
148
+ } catch {
149
+ meta = " [unserializable context]";
150
+ }
151
+ }
152
+ const fullMessage = scrubSecrets(`${scopePath}${message}${meta}`);
145
153
  try {
146
154
  options.onLine?.(level, fullMessage);
147
155
  } catch {
@@ -8262,7 +8270,7 @@ function validateMapping(input) {
8262
8270
  // src/commands/validate/validators/entry.ts
8263
8271
  import Ajv from "ajv";
8264
8272
  import { fetchPackageSchema } from "@walkeros/core";
8265
- var CLIENT_HEADER = "walkeros-cli/4.5.0";
8273
+ var CLIENT_HEADER = "walkeros-cli/4.5.1-next-1788726985928";
8266
8274
  var SECTIONS = ["destinations", "sources", "transformers"];
8267
8275
  function resolveEntry(path20, flowConfig) {
8268
8276
  const flows = flowConfig.flows;
@@ -8827,8 +8835,8 @@ import createClient from "openapi-fetch";
8827
8835
  init_config_file();
8828
8836
  import { createHash } from "crypto";
8829
8837
  import semver4 from "semver";
8830
- var bakedContractVersion = true ? "4.3.0" : PLACEHOLDER;
8831
- var bakedContractHash = true ? "78d9f32be512ebb51e8c6c262aab05dd4eda28a84269fc53ff87b88e41940e6d" : "";
8838
+ var bakedContractVersion = true ? "4.4.0" : PLACEHOLDER;
8839
+ var bakedContractHash = true ? "c381f0b647eb8c72a2d187c95956284be75be59527a5e63710314be29ba33b55" : "";
8832
8840
  function isRecord3(value) {
8833
8841
  return value !== null && typeof value === "object" && !Array.isArray(value);
8834
8842
  }
@@ -10413,6 +10421,149 @@ async function endObserveSession(options) {
10413
10421
  }
10414
10422
  }
10415
10423
 
10424
+ // src/commands/hub/index.ts
10425
+ init_auth();
10426
+ init_http();
10427
+ async function readJson(response, fallback) {
10428
+ if (!response.ok) {
10429
+ const body = await response.json().catch(() => ({}));
10430
+ throwApiResponseError(response, body, fallback);
10431
+ }
10432
+ return response.json();
10433
+ }
10434
+ async function listReleases(options) {
10435
+ const pid = options.projectId ?? requireProjectId();
10436
+ const params = new URLSearchParams({ rationale: "true" });
10437
+ if (options.limit !== void 0) params.set("limit", String(options.limit));
10438
+ if (options.offset !== void 0)
10439
+ params.set("offset", String(options.offset));
10440
+ const response = await apiFetch(
10441
+ `/api/projects/${pid}/flows/${options.flowId}/releases?${params.toString()}`
10442
+ );
10443
+ return readJson(response, "Failed to list releases");
10444
+ }
10445
+ async function getRelease(options) {
10446
+ const pid = options.projectId ?? requireProjectId();
10447
+ const segment = "versionId" in options.ref ? options.ref.versionId : String(options.ref.versionNumber);
10448
+ const response = await apiFetch(
10449
+ `/api/projects/${pid}/flows/${options.flowId}/releases/${encodeURIComponent(segment)}`
10450
+ );
10451
+ return readJson(response, "Failed to read release");
10452
+ }
10453
+ async function listStepHistory(options) {
10454
+ const pid = options.projectId ?? requireProjectId();
10455
+ const params = new URLSearchParams({ step: options.step });
10456
+ if (options.flow !== void 0) params.set("flow", options.flow);
10457
+ if (options.limit !== void 0) params.set("limit", String(options.limit));
10458
+ const response = await apiFetch(
10459
+ `/api/projects/${pid}/flows/${options.flowId}/releases/step-history?${params.toString()}`
10460
+ );
10461
+ return readJson(response, "Failed to read step history");
10462
+ }
10463
+ async function setReleaseRationale(options) {
10464
+ const pid = options.projectId ?? requireProjectId();
10465
+ const response = await apiFetch(
10466
+ `/api/projects/${pid}/flows/${options.flowId}/releases/annotations`,
10467
+ {
10468
+ method: "PUT",
10469
+ headers: { "Content-Type": "application/json" },
10470
+ body: JSON.stringify({
10471
+ versionId: options.versionId,
10472
+ humanText: options.text
10473
+ })
10474
+ }
10475
+ );
10476
+ return readJson(response, "Failed to write release rationale");
10477
+ }
10478
+ async function listThreads(options) {
10479
+ const pid = options.projectId ?? requireProjectId();
10480
+ const params = new URLSearchParams();
10481
+ if (options.anchorType !== void 0)
10482
+ params.set("anchorType", options.anchorType);
10483
+ if (options.anchorKey !== void 0)
10484
+ params.set("anchorKey", options.anchorKey);
10485
+ if (options.status !== void 0) params.set("status", options.status);
10486
+ params.set("includeMessages", options.includeMessages ? "true" : "false");
10487
+ if (options.limit !== void 0) params.set("limit", String(options.limit));
10488
+ const response = await apiFetch(
10489
+ `/api/projects/${pid}/flows/${options.flowId}/threads?${params.toString()}`
10490
+ );
10491
+ return readJson(response, "Failed to list threads");
10492
+ }
10493
+ async function createThread(options) {
10494
+ const pid = options.projectId ?? requireProjectId();
10495
+ const response = await apiFetch(
10496
+ `/api/projects/${pid}/flows/${options.flowId}/threads`,
10497
+ {
10498
+ method: "POST",
10499
+ headers: { "Content-Type": "application/json" },
10500
+ body: JSON.stringify({
10501
+ anchorType: options.anchorType,
10502
+ anchorKey: options.anchorKey,
10503
+ ...options.anchorLabel !== void 0 ? { anchorLabel: options.anchorLabel } : {},
10504
+ text: options.text
10505
+ })
10506
+ }
10507
+ );
10508
+ return readJson(response, "Failed to open thread");
10509
+ }
10510
+ async function addThreadMessage(options) {
10511
+ const pid = options.projectId ?? requireProjectId();
10512
+ const response = await apiFetch(
10513
+ `/api/projects/${pid}/flows/${options.flowId}/threads/${encodeURIComponent(options.threadId)}/messages`,
10514
+ {
10515
+ method: "POST",
10516
+ headers: { "Content-Type": "application/json" },
10517
+ body: JSON.stringify({ text: options.text })
10518
+ }
10519
+ );
10520
+ return readJson(response, "Failed to add message");
10521
+ }
10522
+ async function listKnowledge(options) {
10523
+ const pid = options.projectId ?? requireProjectId();
10524
+ const params = new URLSearchParams();
10525
+ if (options.pageKey !== void 0) params.set("pageKey", options.pageKey);
10526
+ if (options.frameId !== void 0) params.set("frameId", options.frameId);
10527
+ if (options.markId !== void 0) params.set("markId", options.markId);
10528
+ params.set("includeMessages", options.includeMessages ? "true" : "false");
10529
+ if (options.limit !== void 0) params.set("limit", String(options.limit));
10530
+ const response = await apiFetch(
10531
+ `/api/projects/${pid}/knowledge?${params.toString()}`
10532
+ );
10533
+ return readJson(response, "Failed to read knowledge");
10534
+ }
10535
+
10536
+ // src/commands/frames/index.ts
10537
+ init_auth();
10538
+ init_http();
10539
+ async function readJson2(response, fallback) {
10540
+ if (!response.ok) {
10541
+ const body = await response.json().catch(() => ({}));
10542
+ throwApiResponseError(response, body, fallback);
10543
+ }
10544
+ return response.json();
10545
+ }
10546
+ async function listFrames(options = {}) {
10547
+ const pid = options.projectId ?? requireProjectId();
10548
+ const response = await apiFetch(`/api/projects/${pid}/frames`);
10549
+ return readJson2(response, "Failed to list frames");
10550
+ }
10551
+ async function listPageFrames(options) {
10552
+ const pid = options.projectId ?? requireProjectId();
10553
+ const params = new URLSearchParams({ pageKey: options.pageKey });
10554
+ const response = await apiFetch(
10555
+ `/api/projects/${pid}/frames?${params.toString()}`
10556
+ );
10557
+ return readJson2(response, "Failed to list page frames");
10558
+ }
10559
+ async function getFrame(options) {
10560
+ const pid = options.projectId ?? requireProjectId();
10561
+ const response = await apiFetch(
10562
+ `/api/projects/${pid}/frames/${encodeURIComponent(options.frameId)}`
10563
+ );
10564
+ return readJson2(response, "Failed to read frame");
10565
+ }
10566
+
10416
10567
  // src/commands/secrets/index.ts
10417
10568
  init_auth();
10418
10569
  init_http();
@@ -10784,6 +10935,7 @@ export {
10784
10935
  ApiError,
10785
10936
  DeploymentAmbiguityError,
10786
10937
  VERSION,
10938
+ addThreadMessage,
10787
10939
  annotateErrorWithDrift,
10788
10940
  apiFetch,
10789
10941
  bakedContractHash,
@@ -10807,6 +10959,7 @@ export {
10807
10959
  createProject,
10808
10960
  createProjectCommand,
10809
10961
  createSecret,
10962
+ createThread,
10810
10963
  deleteConfig,
10811
10964
  deleteDeployment,
10812
10965
  deleteDeploymentByFlowId,
@@ -10837,21 +10990,29 @@ export {
10837
10990
  getFeedbackPreference,
10838
10991
  getFlow,
10839
10992
  getFlowCommand,
10993
+ getFrame,
10840
10994
  getObserveSession,
10841
10995
  getPreview,
10842
10996
  getProject,
10843
10997
  getProjectCommand,
10998
+ getRelease,
10844
10999
  getToken,
10845
11000
  listAllFlows,
10846
11001
  listDeployments,
10847
11002
  listDeploymentsCommand,
10848
11003
  listFlows,
10849
11004
  listFlowsCommand,
11005
+ listFrames,
10850
11006
  listJourneys,
11007
+ listKnowledge,
11008
+ listPageFrames,
10851
11009
  listPreviews,
10852
11010
  listProjects,
10853
11011
  listProjectsCommand,
11012
+ listReleases,
10854
11013
  listSecrets,
11014
+ listStepHistory,
11015
+ listThreads,
10855
11016
  loadConfig,
10856
11017
  loadJsonConfig,
10857
11018
  loginCommand,
@@ -10874,6 +11035,7 @@ export {
10874
11035
  setClientContext,
10875
11036
  setDefaultProject,
10876
11037
  setFeedbackPreference,
11038
+ setReleaseRationale,
10877
11039
  simulateCollector,
10878
11040
  simulateDestination,
10879
11041
  simulateSource,