@m8t-stack/cli 0.2.79 → 0.2.80

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/cli.js CHANGED
@@ -229,9 +229,19 @@ var init_agent_roster = __esm({
229
229
  });
230
230
 
231
231
  // ../../packages/api-contract/dist/esm/ui-directive.js
232
+ var DECISION_REFUSAL_REASONS, decisionRefusalReasons;
232
233
  var init_ui_directive = __esm({
233
234
  "../../packages/api-contract/dist/esm/ui-directive.js"() {
234
235
  "use strict";
236
+ DECISION_REFUSAL_REASONS = {
237
+ /** 409 — no live call with that `callId`. Answered twice, or talked past and dismissed. */
238
+ notPending: "decision_not_pending",
239
+ /** 400 — decisions are a prompt-worker surface; a hosted worker raises none. */
240
+ invalidAgent: "invalid_decision_agent",
241
+ /** 400 — the `data-ui-result` payload is malformed or its option is out of range. */
242
+ invalidResult: "invalid_decision_result"
243
+ };
244
+ decisionRefusalReasons = Object.values(DECISION_REFUSAL_REASONS);
235
245
  }
236
246
  });
237
247
 
@@ -1390,7 +1400,7 @@ var init_enable_hosted_brain = __esm({
1390
1400
  import { Builtins, Cli } from "clipanion";
1391
1401
 
1392
1402
  // src/lib/package-version.ts
1393
- var CLI_VERSION = "0.2.79";
1403
+ var CLI_VERSION = "0.2.80";
1394
1404
 
1395
1405
  // src/lib/render-error.ts
1396
1406
  init_errors();
@@ -15005,14 +15015,14 @@ function tryResolveRepoRoot() {
15005
15015
  const root = fs5.readFileSync(marker, "utf8").trim();
15006
15016
  return root.length > 0 ? root : null;
15007
15017
  }
15008
- function assertPlatformCheckout(repoRoot, operation, needs = ["personas"]) {
15018
+ function assertPlatformCheckout(repoRoot, operation, needs = ["personas"], overrides = {}) {
15009
15019
  const missing = needs.filter((d) => !fs5.existsSync(path6.join(repoRoot, d)));
15010
15020
  if (missing.length === 0) return;
15011
15021
  const isAgentRepo = fs5.existsSync(path6.join(repoRoot, "agent", "persona.md"));
15012
15022
  throw new LocalCliError({
15013
15023
  code: "PLATFORM_CHECKOUT_REQUIRED",
15014
- message: `${operation} needs a platform checkout, but ~/.m8t/repo-root points at '${repoRoot}', which has no ${missing.join("/ or ")}/.` + (isAgentRepo ? " That path is the agent repository \u2014 it carries the install runbook, not the platform." : ""),
15015
- hint: "This operation reads platform content that is not published today, so it is maintainer-side for now. Your installation still updates itself: the auto-update rail applies published releases without needing any checkout."
15024
+ message: `${operation} needs a platform checkout, but ${overrides.source ?? "~/.m8t/repo-root"} points at '${repoRoot}', which has no ${missing.join("/ or ")}/.` + (isAgentRepo ? " That path is the agent repository \u2014 it carries the install runbook, not the platform." : ""),
15025
+ hint: overrides.hint ?? "This operation reads platform content that is not published today, so it is maintainer-side for now. Your installation still updates itself: the auto-update rail applies published releases without needing any checkout."
15016
15026
  });
15017
15027
  }
15018
15028
  function resolvePlatformRepoRoot(operation, needs) {
@@ -33855,7 +33865,12 @@ var BootstrapUiCommand = class extends M8tCommand {
33855
33865
  hint: "Run 'm8t bootstrap launch --location <region>' first."
33856
33866
  });
33857
33867
  }
33858
- const repoRoot = (typeof this.repoRoot === "string" ? this.repoRoot : void 0) ?? process.cwd();
33868
+ const explicitRoot = typeof this.repoRoot === "string" ? this.repoRoot : void 0;
33869
+ const repoRoot = explicitRoot ?? process.cwd();
33870
+ assertPlatformCheckout(repoRoot, "'m8t bootstrap ui'", ["apps/web"], {
33871
+ source: explicitRoot === void 0 ? "the working directory" : "--repo-root",
33872
+ hint: "The local onboarding chat is part of the platform's web app, which is not published, so this step is unavailable today. Nothing else is blocked: let the install finish, then run 'm8t open' to meet Ezra in your deployed web app."
33873
+ });
33859
33874
  if (this.port !== "3000") {
33860
33875
  throw new LocalCliError({
33861
33876
  code: "BOOTSTRAP_UI_PORT_MSAL_LOCKED",