@wayai/cli 0.3.160 → 0.3.162

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
@@ -8117,14 +8117,6 @@ var init_contracts = __esm({
8117
8117
  * accepts it; this exposes it on the route.
8118
8118
  */
8119
8119
  harness_enabled: external_exports.number().int().min(0).max(1).optional(),
8120
- /**
8121
- * The ConversationDO `runTurn` TurnState conversion gate (refactor #4 Tier 3,
8122
- * `turn/` Step A). 0 = off (the RETAINED pre-conversion turn body runs), 1 = on (the
8123
- * converted `TurnState` body runs). Default-deny, and the reader fails CLOSED — a
8124
- * platform-config read error also runs the retained body. Both bodies stay compiled in
8125
- * while this flag is live, so a change to either is a change to both.
8126
- */
8127
- turn_state_enabled: external_exports.number().int().min(0).max(1).optional(),
8128
8120
  /**
8129
8121
  * Default eval-session retention window in days, used by every hub that sets no
8130
8122
  * `eval_retention_days` override. `0` disables eval retention platform-wide.
@@ -9085,14 +9077,13 @@ var init_api_client = __esm({
9085
9077
  async adminRepairLegacyOrgGrants(body) {
9086
9078
  return this.request("POST", "/api/admin/organizations/repair-legacy-grants", body);
9087
9079
  }
9088
- // Read the platform config (platform-admin gated). Used by every `wayai admin
9089
- // <gate> status` — `harness`, `turn-state`.
9080
+ // Read the platform config (platform-admin gated). Used by `wayai admin harness
9081
+ // status` — grep `PlatformGate` in `commands/admin.ts` for the gates it serves.
9090
9082
  async adminGetConfig() {
9091
9083
  return this.request("GET", "/api/admin/config");
9092
9084
  }
9093
9085
  // Patch the platform config (platform-admin gated). Used by every `wayai admin
9094
- // <gate> disable|enable` — `harness` flips `harness_enabled`, `turn-state` flips
9095
- // `turn_state_enabled`.
9086
+ // <gate> disable|enable` — `harness` flips `harness_enabled`.
9096
9087
  async adminUpdateConfig(body) {
9097
9088
  return this.request("PATCH", "/api/admin/config", body);
9098
9089
  }
@@ -9651,7 +9642,7 @@ var init_api_client = __esm({
9651
9642
  * `toDataProxyPath` knows how WayAI mounts that surface. Identity is the
9652
9643
  * caller's ordinary WayAI session — there is one keyring login, and the
9653
9644
  * backend attests the org over its service binding rather than forwarding a
9654
- * credential (docs/reference/rekor-platform-contracts.md §1).
9645
+ * credential.
9655
9646
  *
9656
9647
  * Returns the surface's `{ data, meta }` envelope rather than unwrapping, so
9657
9648
  * cursor-paginated lists can follow `meta.has_more`. A failure throws the same
@@ -9749,11 +9740,11 @@ var init_api_client = __esm({
9749
9740
  // unlabelled body should fall back rather than announce nothing.
9750
9741
  "Content-Type": body instanceof Uint8Array ? contentType || "application/octet-stream" : "application/json",
9751
9742
  // Names the calling surface for the Data Worker's audit rows, which
9752
- // record `cli` vs `api` vs `mcp` (contracts §1.4). A HINT, not an
9743
+ // record `cli` vs `api` vs `mcp`. A HINT, not an
9753
9744
  // authorization input: any client can send it, so the backend must
9754
9745
  // normalize it against what it knows about its own ingress rather than
9755
9746
  // trust it. Nothing is granted or denied on its value; the Data Worker's
9756
- // audit rows are its consumer (contracts §1.4).
9747
+ // audit rows are its consumer.
9757
9748
  "X-WayAI-Client": "cli"
9758
9749
  },
9759
9750
  // Bytes go on the wire verbatim (file content, attachments); everything
@@ -13855,14 +13846,6 @@ var init_dist = __esm({
13855
13846
  * accepts it; this exposes it on the route.
13856
13847
  */
13857
13848
  harness_enabled: external_exports.number().int().min(0).max(1).optional(),
13858
- /**
13859
- * The ConversationDO `runTurn` TurnState conversion gate (refactor #4 Tier 3,
13860
- * `turn/` Step A). 0 = off (the RETAINED pre-conversion turn body runs), 1 = on (the
13861
- * converted `TurnState` body runs). Default-deny, and the reader fails CLOSED — a
13862
- * platform-config read error also runs the retained body. Both bodies stay compiled in
13863
- * while this flag is live, so a change to either is a change to both.
13864
- */
13865
- turn_state_enabled: external_exports.number().int().min(0).max(1).optional(),
13866
13849
  /**
13867
13850
  * Default eval-session retention window in days, used by every hub that sets no
13868
13851
  * `eval_retention_days` override. `0` disables eval retention platform-wide.
@@ -15792,7 +15775,7 @@ var init_registry = __esm({
15792
15775
  // The organization vault this word named is retired: nothing resolves a value stored
15793
15776
  // there any more, so the surviving surface is `bases credentials` below — per-base
15794
15777
  // rows, which is what a `credential:<name>` reference actually reads. The row stays
15795
- // (this table records how every original word was dispositioned, and §3.2's semantic
15778
+ // (this table records how every original word was dispositioned, and the semantic
15796
15779
  // collision list is checked independently of it) with `shipped: false`, which
15797
15780
  // `registry.test.ts` enforces by asserting the invocation is NOT reachable.
15798
15781
  original: "secrets",
@@ -25854,26 +25837,6 @@ async function adminCommand(args2) {
25854
25837
  process.exit(1);
25855
25838
  }
25856
25839
  }
25857
- if (group === "turn-state") {
25858
- if (!sub) {
25859
- printHelp2();
25860
- process.exit(1);
25861
- }
25862
- switch (sub) {
25863
- case "disable":
25864
- await runTurnStateToggle(false, flagArgs);
25865
- return;
25866
- case "enable":
25867
- await runTurnStateToggle(true, flagArgs);
25868
- return;
25869
- case "status":
25870
- await runPlatformGateStatus(TURN_STATE_GATE, flagArgs);
25871
- return;
25872
- default:
25873
- printHelp2();
25874
- process.exit(1);
25875
- }
25876
- }
25877
25840
  printHelp2();
25878
25841
  process.exit(1);
25879
25842
  }
@@ -26504,24 +26467,6 @@ async function runHarnessToggle(enable, flagArgs) {
26504
26467
  console.log("Next: run `wayai admin harness mass-destroy --all --dry-run` to see what is still live, then reap it.");
26505
26468
  }
26506
26469
  }
26507
- async function runTurnStateToggle(enable, flagArgs) {
26508
- rejectPlatformGateFlags(TURN_STATE_GATE, "enable|disable", flagArgs);
26509
- const value = await patchPlatformGate(TURN_STATE_GATE, enable);
26510
- if (value === void 0) {
26511
- console.error("PATCH /api/admin/config returned no turn_state_enabled value \u2014 the flag state is UNKNOWN.");
26512
- console.error("Run `wayai admin turn-state status` to read what the platform config now holds.");
26513
- process.exit(1);
26514
- }
26515
- const state = value ? "ENABLED" : "DISABLED";
26516
- console.log(`TurnState conversion ${state} platform-wide (turn_state_enabled=${value}).`);
26517
- if (value) {
26518
- console.log("New turns run the converted TurnState body (runTurnWithState) once the platform-config cache clears \u2014 up to ~60s.");
26519
- console.log("Roll back with `wayai admin turn-state disable` \u2014 the retained body stays compiled in while this flag is live.");
26520
- } else {
26521
- console.log("New turns run the RETAINED pre-conversion body (runTurnRetained) \u2014 the fail-closed default \u2014 once the platform-config cache clears, up to ~60s.");
26522
- }
26523
- console.log("Turns already in flight finish on the body they picked at entry.");
26524
- }
26525
26470
  function requireFlagValue(flagArgs, index, flag) {
26526
26471
  const v = flagArgs[index];
26527
26472
  if (v === void 0 || v === "" || v.startsWith("--")) {
@@ -26962,10 +26907,6 @@ Usage:
26962
26907
  wayai admin harness mass-destroy --all | --org <org_id> | --hub <hub_id> [--dry-run] [--yes] [--json]
26963
26908
  Reap every live harness sandbox/token/slot in scope (run --dry-run first to see the blast radius)
26964
26909
 
26965
- wayai admin turn-state disable Flip the platform turn_state_enabled flag OFF (new turns run the RETAINED pre-conversion body \u2014 the fail-closed default)
26966
- wayai admin turn-state enable Flip the platform turn_state_enabled flag ON (new turns run the converted TurnState body)
26967
- wayai admin turn-state status Print the platform turn_state_enabled flag
26968
-
26969
26910
  Sources:
26970
26911
  do Live DO SQLite (existing conversation, hub config, etc.).
26971
26912
  analytics ClickHouse projections (conversation, message, schedule_event).
@@ -27007,8 +26948,7 @@ Sources:
27007
26948
  is NULL). Each row is resolved to a real user and granted both halves of
27008
26949
  access, or dropped when no account matches. A repaired row is a REAL grant
27009
26950
  to a real person and sends no email, so read --dry-run output as the list of
27010
- people about to get access. Idempotent. See
27011
- docs/runbooks/legacy-org-grant-repair.md.
26951
+ people about to get access. Idempotent.
27012
26952
 
27013
26953
  sandbox Run arbitrary code in a fresh E2B sandbox (harness-agents isolation surface).
27014
26954
  \`exec\` provisions a sandbox from a named Sandbox connection, runs one
@@ -27022,16 +26962,7 @@ Sources:
27022
26962
  turn aborts on its next invocation. \`mass-destroy\` reaps every harness
27023
26963
  sandbox/token/slot that is live NOW (scope: --hub < --org < --all, prefer
27024
26964
  the narrowest). Run \`mass-destroy --dry-run\` first to see the blast
27025
- radius. See docs/runbooks/harness-incident-response.md.
27026
- turn-state The ConversationDO TurnState conversion gate. \`disable\`/\`enable\` flip the
27027
- single PLATFORM-wide turn_state_enabled flag; \`status\` prints it. That one
27028
- flag picks which turn body runs: OFF (default-deny, fail-closed \u2014 a
27029
- platform-config read error lands here too) runs the RETAINED pre-conversion
27030
- body, ON runs the converted TurnState body. Both stay compiled in while the
27031
- flag is live, so \`disable\` is the rollback. The turn reads the flag at
27032
- entry through the platform-config KV cache this write invalidates, so a
27033
- flip propagates in up to ~60s, and a turn already in flight finishes on the
27034
- body it picked.
26965
+ radius.
27035
26966
 
27036
26967
  Types (do): ${VALID_TYPES.join(" | ")}
27037
26968
  Tables (analytics): ${VALID_ANALYTICS_TABLES.join(" | ")}
@@ -27061,9 +26992,6 @@ Examples:
27061
26992
  wayai admin harness mass-destroy --all --dry-run
27062
26993
  wayai admin harness mass-destroy --hub <hub-id> --yes
27063
26994
  wayai admin harness enable
27064
- wayai admin turn-state status
27065
- wayai admin turn-state enable
27066
- wayai admin turn-state disable
27067
26995
 
27068
26996
  Audit + rate limit:
27069
26997
  Every successful read is logged as admin_debug_read (queryable in Grafana
@@ -27071,7 +26999,7 @@ Audit + rate limit:
27071
26999
  across all sources. Platform-admin grant required.
27072
27000
  `.trim());
27073
27001
  }
27074
- var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, TURN_STATE_GATE, VALID_NOTICE_SEVERITIES;
27002
+ var VALID_TYPES, VALID_ANALYTICS_TABLES, HARNESS_GATE, VALID_NOTICE_SEVERITIES;
27075
27003
  var init_admin = __esm({
27076
27004
  "src/commands/admin.ts"() {
27077
27005
  "use strict";
@@ -27091,11 +27019,6 @@ var init_admin = __esm({
27091
27019
  key: "harness_enabled",
27092
27020
  label: "harness rollout gate"
27093
27021
  };
27094
- TURN_STATE_GATE = {
27095
- group: "turn-state",
27096
- key: "turn_state_enabled",
27097
- label: "TurnState conversion gate"
27098
- };
27099
27022
  VALID_NOTICE_SEVERITIES = ["critical", "warn", "info"];
27100
27023
  }
27101
27024
  });