@m8t-stack/cli 0.2.45 → 0.2.46

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
@@ -204,6 +204,19 @@ var init_founder_benchmark = __esm({
204
204
  }
205
205
  });
206
206
 
207
+ // ../../packages/api-contract/dist/esm/agent-roster.js
208
+ function productVisibilityFor(agentName) {
209
+ return PUBLIC_PRODUCT_AGENTS.has(agentName) ? "public" : "internal";
210
+ }
211
+ var INTAKE_AGENT_NAME, PUBLIC_PRODUCT_AGENTS;
212
+ var init_agent_roster = __esm({
213
+ "../../packages/api-contract/dist/esm/agent-roster.js"() {
214
+ "use strict";
215
+ INTAKE_AGENT_NAME = "azzy-intake";
216
+ PUBLIC_PRODUCT_AGENTS = /* @__PURE__ */ new Set(["stacey", "azzy"]);
217
+ }
218
+ });
219
+
207
220
  // ../../packages/api-contract/dist/esm/index.js
208
221
  var init_esm = __esm({
209
222
  "../../packages/api-contract/dist/esm/index.js"() {
@@ -220,6 +233,7 @@ var init_esm = __esm({
220
233
  init_a2a_card();
221
234
  init_brain_eval();
222
235
  init_founder_benchmark();
236
+ init_agent_roster();
223
237
  }
224
238
  });
225
239
 
@@ -948,7 +962,12 @@ async function createPromptVersion(args) {
948
962
  const metadata = {
949
963
  source: METADATA_SOURCE,
950
964
  kind: "prompt",
951
- persona: args.metadata.persona
965
+ persona: args.metadata.persona,
966
+ // Read by the web app to decide roster membership. Written on EVERY version:
967
+ // createVersion replaces version metadata wholesale rather than merging the
968
+ // previous version's, so omitting it here silently un-publishes an agent on
969
+ // its next re-deploy.
970
+ productVisibility: args.metadata.productVisibility
952
971
  };
953
972
  if (args.metadata.personaVersion !== null) metadata.personaVersion = args.metadata.personaVersion;
954
973
  if (args.metadata.fillableFieldValues !== void 0) {
@@ -1310,7 +1329,7 @@ var init_enable_hosted_brain = __esm({
1310
1329
  import { Builtins, Cli } from "clipanion";
1311
1330
 
1312
1331
  // src/lib/package-version.ts
1313
- var CLI_VERSION = "0.2.45";
1332
+ var CLI_VERSION = "0.2.46";
1314
1333
 
1315
1334
  // src/lib/render-error.ts
1316
1335
  init_errors();
@@ -16551,6 +16570,7 @@ import * as path12 from "path";
16551
16570
  import { parse as parseYaml6 } from "yaml";
16552
16571
  init_foundry_agents();
16553
16572
  init_errors();
16573
+ init_esm();
16554
16574
  function findPersonasRoot(hint) {
16555
16575
  let dir = path12.resolve(hint);
16556
16576
  const fsRoot = path12.parse(dir).root;
@@ -16616,7 +16636,14 @@ async function deployPromptAdvisor(args) {
16616
16636
  model,
16617
16637
  instructions,
16618
16638
  reasoningEffort,
16619
- metadata: { persona: args.persona, personaVersion, fillableFieldValues: JSON.stringify(valuesMap) },
16639
+ metadata: {
16640
+ persona: args.persona,
16641
+ personaVersion,
16642
+ fillableFieldValues: JSON.stringify(valuesMap),
16643
+ // Derived here, once, from the agent NAME — so no call site can forget it
16644
+ // and no two call sites can disagree.
16645
+ productVisibility: productVisibilityFor(args.agentName)
16646
+ },
16620
16647
  ...args.onNotice ? { onNotice: args.onNotice } : {}
16621
16648
  });
16622
16649
  }
@@ -18046,6 +18073,7 @@ async function stagePublicImageIfNeeded(args) {
18046
18073
  }
18047
18074
 
18048
18075
  // src/commands/coder/deploy.ts
18076
+ init_esm();
18049
18077
  var SIZE_PRESETS = {
18050
18078
  small: { cpu: "0.5", memory: "1Gi" },
18051
18079
  medium: { cpu: "1", memory: "2Gi" },
@@ -18056,7 +18084,6 @@ var DEFAULT_IMAGE = "m8t-coding-agent";
18056
18084
  var DEFAULT_TAG = "v0.1.2";
18057
18085
  var DEFAULT_MODEL = "gpt-4.1-mini";
18058
18086
  var NAME_RE = /^[a-z0-9-]+$/;
18059
- var PUBLIC_PRODUCT_AGENTS = /* @__PURE__ */ new Set(["stacey", "azzy"]);
18060
18087
  var CoderDeployCommand = class extends M8tCommand {
18061
18088
  static paths = [["coder", "deploy"]];
18062
18089
  static usage = Command28.Usage({
@@ -18195,7 +18222,7 @@ var CoderDeployCommand = class extends M8tCommand {
18195
18222
  kind: "hosted",
18196
18223
  persona: personaName,
18197
18224
  personaVersion,
18198
- productVisibility: PUBLIC_PRODUCT_AGENTS.has(this.name) ? "public" : "internal"
18225
+ productVisibility: productVisibilityFor(this.name)
18199
18226
  },
18200
18227
  onProgress
18201
18228
  });
@@ -19318,6 +19345,7 @@ async function readStamp(opts) {
19318
19345
  }
19319
19346
 
19320
19347
  // src/lib/platform-converge.ts
19348
+ init_esm();
19321
19349
  import * as fs22 from "fs";
19322
19350
  import * as path21 from "path";
19323
19351
  import { parse as parseYaml10 } from "yaml";
@@ -19909,6 +19937,10 @@ async function applyPersona(a, ctx, opts) {
19909
19937
  const metadata = {
19910
19938
  ...current.metadata ?? {},
19911
19939
  persona: a.personaName ?? opts.agentName,
19940
+ // Re-asserted on every converge, not just at initial deploy — heals an install whose
19941
+ // advisor was deployed by a CLI that predates the roster-visibility stamp (see
19942
+ // deploy-prompt-advisor.ts). Derived from the deployed agent name, same as there.
19943
+ productVisibility: productVisibilityFor(opts.agentName),
19912
19944
  ...values ? { fillableFieldValues: JSON.stringify(values) } : {}
19913
19945
  };
19914
19946
  const candidate2 = { definition: { ...current.definition, instructions }, metadata };
@@ -28072,6 +28104,7 @@ import * as path33 from "path";
28072
28104
  init_errors();
28073
28105
 
28074
28106
  // src/lib/onboarding-profile.ts
28107
+ init_esm();
28075
28108
  function describeBlockRejection(reason) {
28076
28109
  switch (reason) {
28077
28110
  case "unknown-schema-version":
@@ -28434,7 +28467,7 @@ async function findOnboardingProfile(args) {
28434
28467
  const conversations = orderNewest(listed.flatMap((value, ordinal) => {
28435
28468
  if (!isRecord(value) || typeof value.id !== "string" || value.id.length === 0 || !isRecord(value.metadata)) return [];
28436
28469
  const metadata = value.metadata;
28437
- if (metadata.app !== "m8t-webapp" || metadata.agent !== "azzy-intake") return [];
28470
+ if (metadata.app !== "m8t-webapp" || metadata.agent !== INTAKE_AGENT_NAME) return [];
28438
28471
  return [{
28439
28472
  id: value.id,
28440
28473
  createdAt: timestamp(value.created_at) !== Number.NEGATIVE_INFINITY ? timestamp(value.created_at) : timestamp(metadata.createdAt),
@@ -29150,8 +29183,9 @@ init_errors();
29150
29183
  init_rbac();
29151
29184
 
29152
29185
  // src/lib/intake-agent.ts
29186
+ init_esm();
29153
29187
  var INTAKE_PERSONA = "azure-advisor-intake";
29154
- var INTAKE_AGENT = "azzy-intake";
29188
+ var INTAKE_AGENT = INTAKE_AGENT_NAME;
29155
29189
  async function deployIntakeAgent(args) {
29156
29190
  try {
29157
29191
  return await deployPromptAdvisor({