@vm0/cli 9.148.1 → 9.148.2

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.
@@ -74083,7 +74083,7 @@ if (DSN) {
74083
74083
  init2({
74084
74084
  dsn: DSN,
74085
74085
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
74086
- release: "9.148.1",
74086
+ release: "9.148.2",
74087
74087
  sendDefaultPii: false,
74088
74088
  tracesSampleRate: 0,
74089
74089
  shutdownTimeout: 500,
@@ -74102,7 +74102,7 @@ if (DSN) {
74102
74102
  }
74103
74103
  });
74104
74104
  setContext("cli", {
74105
- version: "9.148.1",
74105
+ version: "9.148.2",
74106
74106
  command: process.argv.slice(2).join(" ")
74107
74107
  });
74108
74108
  setContext("runtime", {
@@ -95546,11 +95546,6 @@ init_esm_shims();
95546
95546
 
95547
95547
  // ../../packages/api-contracts/src/contracts/model-providers.ts
95548
95548
  init_esm_shims();
95549
-
95550
- // ../../packages/connectors/src/feature-switch-key.ts
95551
- init_esm_shims();
95552
-
95553
- // ../../packages/api-contracts/src/contracts/model-providers.ts
95554
95549
  var SUPPORTED_RUN_MODELS = [
95555
95550
  "claude-opus-4-7",
95556
95551
  "claude-opus-4-6",
@@ -95617,28 +95612,23 @@ var VM0_MODEL_TO_PROVIDER = {
95617
95612
  },
95618
95613
  "gpt-5.5": {
95619
95614
  concreteType: "openai-api-key",
95620
- vendor: "openai",
95621
- featureFlag: "codexBeta" /* CodexBeta */
95615
+ vendor: "openai"
95622
95616
  },
95623
95617
  "gpt-5.4": {
95624
95618
  concreteType: "openai-api-key",
95625
- vendor: "openai",
95626
- featureFlag: "codexBeta" /* CodexBeta */
95619
+ vendor: "openai"
95627
95620
  },
95628
95621
  "gpt-5.4-mini": {
95629
95622
  concreteType: "openai-api-key",
95630
- vendor: "openai",
95631
- featureFlag: "codexBeta" /* CodexBeta */
95623
+ vendor: "openai"
95632
95624
  },
95633
95625
  "gpt-5.3-codex": {
95634
95626
  concreteType: "openai-api-key",
95635
- vendor: "openai",
95636
- featureFlag: "codexBeta" /* CodexBeta */
95627
+ vendor: "openai"
95637
95628
  },
95638
95629
  "gpt-5.2": {
95639
95630
  concreteType: "openai-api-key",
95640
- vendor: "openai",
95641
- featureFlag: "codexBeta" /* CodexBeta */
95631
+ vendor: "openai"
95642
95632
  }
95643
95633
  };
95644
95634
  var MODEL_PROVIDER_TYPES = {
@@ -97006,6 +96996,11 @@ var axiom = {
97006
96996
 
97007
96997
  // ../../packages/connectors/src/connectors/ahrefs.ts
97008
96998
  init_esm_shims();
96999
+
97000
+ // ../../packages/connectors/src/feature-switch-key.ts
97001
+ init_esm_shims();
97002
+
97003
+ // ../../packages/connectors/src/connectors/ahrefs.ts
97009
97004
  var ahrefs = {
97010
97005
  ahrefs: {
97011
97006
  label: "Ahrefs",
@@ -120047,6 +120042,9 @@ function resolveFirewallPolicies(stored, connectors) {
120047
120042
  return resolved;
120048
120043
  }
120049
120044
 
120045
+ // src/lib/events/event-stream-normalizer.ts
120046
+ init_esm_shims();
120047
+
120050
120048
  // src/lib/events/event-parser-factory.ts
120051
120049
  init_esm_shims();
120052
120050
 
@@ -124218,6 +124216,18 @@ var FEATURE_SWITCHES = {
124218
124216
  description: "Enable the Stripe payment connector integration",
124219
124217
  enabled: false
124220
124218
  },
124219
+ ["cliAuth" /* CliAuth */]: {
124220
+ maintainer: "liangyou@vm0.ai",
124221
+ description: "Gate CLI-based connector auth UI and API surfaces. Rollout control only; credential routes still require normal auth and ownership checks.",
124222
+ enabled: false,
124223
+ enabledOrgIdHashes: STAFF_ORG_ID_HASHES
124224
+ },
124225
+ ["stripeCliAuth" /* StripeCliAuth */]: {
124226
+ maintainer: "liangyou@vm0.ai",
124227
+ description: "Gate Stripe-specific CLI auth UI and API surfaces. Stripe CLI auth consumers should also require CliAuth.",
124228
+ enabled: false,
124229
+ enabledOrgIdHashes: STAFF_ORG_ID_HASHES
124230
+ },
124221
124231
  ["posthogConnector" /* PosthogConnector */]: {
124222
124232
  maintainer: "ethan@vm0.ai",
124223
124233
  description: "Enable the PostHog analytics connector",
@@ -124385,18 +124395,6 @@ var FEATURE_SWITCHES = {
124385
124395
  description: "Enable the Zapier connector. When disabled, Zapier is hidden from the connectors list and cannot be connected.",
124386
124396
  enabled: false
124387
124397
  },
124388
- ["codexBeta" /* CodexBeta */]: {
124389
- maintainer: "lancy@vm0.ai",
124390
- description: "Gate the codex framework via BYOK OpenAI provider in zero web. When off, the openai-api-key tile is hidden in the add-provider dialog and POST /api/zero/model-providers with type=openai-api-key returns 404. Staff-only during rollout; per-user toggle via Lab.",
124391
- enabled: false,
124392
- enabledOrgIdHashes: STAFF_ORG_ID_HASHES
124393
- },
124394
- ["codexOauthProvider" /* CodexOauthProvider */]: {
124395
- maintainer: "lancy@vm0.ai",
124396
- description: "Gate the ChatGPT-OAuth model provider in zero web (Epic #11872). When off, the 'Connect ChatGPT' tile is hidden in the add-provider dialog, server routes that initiate the OAuth dance return 404, and stale-provider UX is bypassed. Staff-only during rollout; per-user toggle via Lab.",
124397
- enabled: false,
124398
- enabledOrgIdHashes: STAFF_ORG_ID_HASHES
124399
- },
124400
124398
  ["voiceChatRealtimeBilling" /* VoiceChatRealtimeBilling */]: {
124401
124399
  maintainer: "lancy@vm0.ai",
124402
124400
  description: "Gate voice-chat realtime billing (Plan D, Epic #12128). When OFF, the token route mints an OpenAI ephemeral token without admission checks and the /session-started, /usage, and /session-ended endpoints are 200 no-ops \u2014 the org gets unmetered voice-chat. When ON, the token route runs credit + pricing admission, /session-started inserts an audit row in voice_chat_realtime_sessions, and the browser self-reports response.done + transcription.completed usage events for billing. Staff-only during rollout; operator flips per org via the feature-switch overrides API.",
@@ -124804,6 +124802,59 @@ function parseEvent(rawEvent, framework) {
124804
124802
  return ClaudeEventParser.parse(rawEvent);
124805
124803
  }
124806
124804
 
124805
+ // src/lib/events/event-stream-normalizer.ts
124806
+ function asRecord(rawEvent) {
124807
+ if (!rawEvent || typeof rawEvent !== "object") {
124808
+ return null;
124809
+ }
124810
+ return rawEvent;
124811
+ }
124812
+ function getEventType(rawEvent) {
124813
+ const eventType = rawEvent?.type;
124814
+ return typeof eventType === "string" ? eventType : void 0;
124815
+ }
124816
+ var EventStreamNormalizer = class {
124817
+ pendingCodexError = null;
124818
+ process(rawEvent, framework, timestamp) {
124819
+ const isCodex = framework === "codex";
124820
+ const rawRecord = asRecord(rawEvent);
124821
+ const eventType = getEventType(rawRecord);
124822
+ const parsed = rawRecord ? parseEvent(rawRecord, framework) : null;
124823
+ if (parsed && timestamp) {
124824
+ parsed.timestamp = timestamp;
124825
+ }
124826
+ if (!isCodex) {
124827
+ const output2 = this.flush();
124828
+ if (parsed) {
124829
+ output2.push(parsed);
124830
+ }
124831
+ return output2;
124832
+ }
124833
+ if (eventType === "error" && parsed?.type === "result") {
124834
+ const output2 = this.flush();
124835
+ this.pendingCodexError = parsed;
124836
+ return output2;
124837
+ }
124838
+ if (eventType === "turn.failed") {
124839
+ this.pendingCodexError = null;
124840
+ return parsed ? [parsed] : [];
124841
+ }
124842
+ const output = this.flush();
124843
+ if (parsed) {
124844
+ output.push(parsed);
124845
+ }
124846
+ return output;
124847
+ }
124848
+ flush() {
124849
+ if (!this.pendingCodexError) {
124850
+ return [];
124851
+ }
124852
+ const output = [this.pendingCodexError];
124853
+ this.pendingCodexError = null;
124854
+ return output;
124855
+ }
124856
+ };
124857
+
124807
124858
  // src/lib/events/event-renderer.ts
124808
124859
  init_esm_shims();
124809
124860
 
@@ -125554,12 +125605,18 @@ function sleep3(ms) {
125554
125605
  }
125555
125606
  async function pollEvents(runId, options) {
125556
125607
  const renderer = new EventRenderer({ verbose: options?.verbose });
125608
+ const normalizer = new EventStreamNormalizer();
125557
125609
  let nextSequence = -1;
125558
125610
  const terminalDrain = {
125559
125611
  seenAt: 0,
125560
125612
  lastProgressAt: 0
125561
125613
  };
125562
125614
  let seenResultEvent = false;
125615
+ const flushPendingEvents = () => {
125616
+ for (const parsed of normalizer.flush()) {
125617
+ renderer.render(parsed);
125618
+ }
125619
+ };
125563
125620
  for (; ; ) {
125564
125621
  const previousSequence = nextSequence;
125565
125622
  const response = await getEvents(runId, {
@@ -125570,9 +125627,11 @@ async function pollEvents(runId, options) {
125570
125627
  let pageHasResultEvent = false;
125571
125628
  if (madeSequenceProgress) {
125572
125629
  for (const event of response.events) {
125573
- const eventData = event.eventData;
125574
- const parsed = parseEvent(eventData, response.framework);
125575
- if (parsed) {
125630
+ const parsedEvents = normalizer.process(
125631
+ event.eventData,
125632
+ response.framework
125633
+ );
125634
+ for (const parsed of parsedEvents) {
125576
125635
  renderer.render(parsed);
125577
125636
  if (parsed.type === "result") {
125578
125637
  pageHasResultEvent = true;
@@ -125593,6 +125652,7 @@ async function pollEvents(runId, options) {
125593
125652
  now
125594
125653
  );
125595
125654
  if (terminalDrain.runState && hasReachedTerminalWatermark(terminalDrain.runState, nextSequence)) {
125655
+ flushPendingEvents();
125596
125656
  return renderTerminalRunResult(runId, terminalDrain.runState);
125597
125657
  }
125598
125658
  const terminalRunState = terminalDrain.runState;
@@ -125603,6 +125663,7 @@ async function pollEvents(runId, options) {
125603
125663
  madeSequenceProgress,
125604
125664
  seenResultEvent
125605
125665
  )) {
125666
+ flushPendingEvents();
125606
125667
  return renderTerminalRunResult(runId, terminalRunState);
125607
125668
  }
125608
125669
  if (shouldDrainNextEventPage(response, madeSequenceProgress)) {
@@ -125853,6 +125914,7 @@ export {
125853
125914
  resolveFirewallPolicies,
125854
125915
  findMatchingPermissions,
125855
125916
  parseEvent,
125917
+ EventStreamNormalizer,
125856
125918
  EventRenderer,
125857
125919
  collectKeyValue,
125858
125920
  collectVolumeVersions,
@@ -125880,4 +125942,4 @@ undici/lib/web/fetch/body.js:
125880
125942
  undici/lib/web/websocket/frame.js:
125881
125943
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
125882
125944
  */
125883
- //# sourceMappingURL=chunk-WSZTOGEW.js.map
125945
+ //# sourceMappingURL=chunk-KAN2DFAY.js.map