happy-imou-cloud 2.1.39 → 2.1.40

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.
Files changed (25) hide show
  1. package/dist/{BaseReasoningProcessor-BUTolvO5.cjs → BaseReasoningProcessor-C8w4XM-x.cjs} +2 -2
  2. package/dist/{BaseReasoningProcessor-Cbp6sIDm.mjs → BaseReasoningProcessor-e-2bxjFB.mjs} +2 -2
  3. package/dist/{ProviderSelectionHandler-B22eXuym.cjs → ProviderSelectionHandler-CCSEAoQk.cjs} +2 -2
  4. package/dist/{ProviderSelectionHandler-DrSgStLw.mjs → ProviderSelectionHandler-DI3-RSW_.mjs} +2 -2
  5. package/dist/{api-wcqkneTg.mjs → api-BEKN9moW.mjs} +61 -2
  6. package/dist/{api-BoeZDGwx.cjs → api-Ixv6TLYP.cjs} +61 -1
  7. package/dist/{command-CkYq_KwA.cjs → command-DycfJnzn.cjs} +2 -2
  8. package/dist/{command-DcgK0y3F.mjs → command-bEdScxsw.mjs} +2 -2
  9. package/dist/{index-B9mt95QV.mjs → index-CNIT6feF.mjs} +7 -7
  10. package/dist/{index-Cgor8CE7.cjs → index-Mvx4hucr.cjs} +10 -10
  11. package/dist/index.cjs +2 -2
  12. package/dist/index.mjs +2 -2
  13. package/dist/lib.cjs +1 -1
  14. package/dist/lib.d.cts +19 -4
  15. package/dist/lib.d.mts +19 -4
  16. package/dist/lib.mjs +1 -1
  17. package/dist/{registerKillSessionHandler-Buc97BEh.mjs → registerKillSessionHandler--KMYjyvz.mjs} +2 -2
  18. package/dist/{registerKillSessionHandler-DtXhn2Cd.cjs → registerKillSessionHandler-CqjocTSr.cjs} +2 -2
  19. package/dist/{runClaude-CwXQwmgw.cjs → runClaude-DFdTqEU8.cjs} +59 -5
  20. package/dist/{runClaude-BYKNCDEU.mjs → runClaude-V1hBSsrL.mjs} +59 -5
  21. package/dist/{runCodex-BkB_YKhV.cjs → runCodex-BMafN7eI.cjs} +34 -8
  22. package/dist/{runCodex-DqAddhDE.mjs → runCodex-goHWKOd0.mjs} +34 -8
  23. package/dist/{runGemini-3jkfOtlr.mjs → runGemini-BDorYx-I.mjs} +65 -7
  24. package/dist/{runGemini-B4uXPrue.cjs → runGemini-CQBCnzbz.cjs} +65 -7
  25. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Cgor8CE7.cjs');
4
- var persistence = require('./api-BoeZDGwx.cjs');
3
+ var index = require('./index-Mvx4hucr.cjs');
4
+ var persistence = require('./api-Ixv6TLYP.cjs');
5
5
  var node_events = require('node:events');
6
6
  var node_crypto = require('node:crypto');
7
7
 
@@ -1,5 +1,5 @@
1
- import { a as createSessionMetadata, p as publishSessionRegistration } from './index-B9mt95QV.mjs';
2
- import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-wcqkneTg.mjs';
1
+ import { a as createSessionMetadata, p as publishSessionRegistration } from './index-CNIT6feF.mjs';
2
+ import { s as startOfflineReconnection, c as configuration, i as isAuthenticationRequiredError, l as logger } from './api-BEKN9moW.mjs';
3
3
  import { EventEmitter } from 'node:events';
4
4
  import { randomUUID } from 'node:crypto';
5
5
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-BoeZDGwx.cjs');
4
- var registerKillSessionHandler = require('./registerKillSessionHandler-DtXhn2Cd.cjs');
3
+ var persistence = require('./api-Ixv6TLYP.cjs');
4
+ var registerKillSessionHandler = require('./registerKillSessionHandler-CqjocTSr.cjs');
5
5
 
6
6
  async function runModeLoop(opts) {
7
7
  let currentMode = opts.startingMode;
@@ -1,5 +1,5 @@
1
- import { l as logger } from './api-wcqkneTg.mjs';
2
- import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler-Buc97BEh.mjs';
1
+ import { l as logger } from './api-BEKN9moW.mjs';
2
+ import { g as getPendingInteractionTimeoutMs, I as INTERACTION_SUPERSEDED_ERROR, a as INTERACTION_TIMED_OUT_ERROR } from './registerKillSessionHandler--KMYjyvz.mjs';
3
3
 
4
4
  async function runModeLoop(opts) {
5
5
  let currentMode = opts.startingMode;
@@ -18,7 +18,7 @@ import { spawn } from 'node:child_process';
18
18
  import { Expo } from 'expo-server-sdk';
19
19
 
20
20
  var name = "happy-imou-cloud";
21
- var version = "2.1.39";
21
+ var version = "2.1.40";
22
22
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
23
23
  var author = "long.zhu";
24
24
  var license = "MIT";
@@ -4003,6 +4003,59 @@ async function ensureSigningCredentials(credentials, opts = {}) {
4003
4003
  }
4004
4004
  }
4005
4005
 
4006
+ class AssistantMessageStream {
4007
+ constructor(createId = randomUUID) {
4008
+ this.createId = createId;
4009
+ }
4010
+ activeStream = null;
4011
+ delta() {
4012
+ return this.metadata("delta", "append");
4013
+ }
4014
+ commit() {
4015
+ const metadata = this.metadata("commit", "replace");
4016
+ this.reset();
4017
+ return metadata;
4018
+ }
4019
+ abort() {
4020
+ const metadata = this.metadata("abort", "replace");
4021
+ this.reset();
4022
+ return metadata;
4023
+ }
4024
+ hasActive() {
4025
+ return this.activeStream !== null;
4026
+ }
4027
+ reset() {
4028
+ this.activeStream = null;
4029
+ }
4030
+ metadata(phase, mode) {
4031
+ const activeStream = this.ensureActiveStream();
4032
+ return {
4033
+ streamId: activeStream.streamId,
4034
+ messageId: activeStream.messageId,
4035
+ phase,
4036
+ mode
4037
+ };
4038
+ }
4039
+ ensureActiveStream() {
4040
+ if (this.activeStream) {
4041
+ return this.activeStream;
4042
+ }
4043
+ const id = this.createId();
4044
+ this.activeStream = {
4045
+ streamId: `assistant-${id}`,
4046
+ messageId: id
4047
+ };
4048
+ return this.activeStream;
4049
+ }
4050
+ }
4051
+ function isTransientMessageStreamDelta(body) {
4052
+ if (!body || typeof body !== "object") {
4053
+ return false;
4054
+ }
4055
+ const record = body;
4056
+ return record.type === "message" && record.phase === "delta";
4057
+ }
4058
+
4006
4059
  const MAX_PENDING_RELIABLE_SESSION_MESSAGES = 200;
4007
4060
  const MAX_PENDING_RELIABLE_SESSION_MESSAGE_BYTES = 512 * 1024;
4008
4061
  const PROTOCOL_V3_INITIAL_SNAPSHOT_LIMIT = 150;
@@ -5455,6 +5508,9 @@ class ApiSessionClient extends EventEmitter {
5455
5508
  });
5456
5509
  }
5457
5510
  shouldBufferReliableCodexMessage(body) {
5511
+ if (isTransientMessageStreamDelta(body)) {
5512
+ return false;
5513
+ }
5458
5514
  switch (body?.type) {
5459
5515
  case "message":
5460
5516
  case "tool-call":
@@ -5471,6 +5527,9 @@ class ApiSessionClient extends EventEmitter {
5471
5527
  }
5472
5528
  }
5473
5529
  shouldBufferReliableAcpMessage(body) {
5530
+ if (isTransientMessageStreamDelta(body)) {
5531
+ return false;
5532
+ }
5474
5533
  switch (body?.type) {
5475
5534
  case "message":
5476
5535
  case "tool-call":
@@ -6793,4 +6852,4 @@ var api = /*#__PURE__*/Object.freeze({
6793
6852
  ApiClient: ApiClient
6794
6853
  });
6795
6854
 
6796
- export { ApiClient as A, clearDaemonState as B, packageJson as C, acquireDaemonLock as D, writeDaemonState as E, releaseDaemonLock as F, validateProfileForAgent as G, HeadTailPreviewBuffer as H, getProfileEnvironmentVariables as I, clearCredentials as J, clearMachineId as K, readHappyOrgDispatchTruthSnapshot as L, processHappyOrgRepoRequests as M, readHappyOrgRepoTaskBoard as N, HappyOrgTurnReportSchema as O, recordHappyOrgTurnReport as P, MessageContentSchema as Q, buildSocketAuth as R, encrypt as S, getLatestDaemonLog as T, persistence as U, api as V, ApiSessionClient as a, connectionState as b, configuration as c, HAPPY_ORG_REPLY_ACK_VERSION as d, HAPPY_ORG_TURN_REPORT_TAG as e, HAPPY_ORG_SUMMARY_MAX_LENGTH as f, HAPPY_ORG_REPEAT_THRESHOLD as g, backoff as h, isAuthenticationRequiredError as i, delay as j, AsyncLock as k, logger as l, encodeBase64 as m, readCredentials as n, ensureSigningCredentials as o, preserveSessionRuntimeMetadata as p, encodeBase64Url as q, readSettings as r, startOfflineReconnection as s, buildClientHeaders as t, updateSettings as u, decodeBase64 as v, writeCredentialsLegacy as w, writeCredentialsDataKey as x, readDaemonState as y, HAPPY_CLOUD_DAEMON_PORT as z };
6855
+ export { ApiClient as A, HAPPY_CLOUD_DAEMON_PORT as B, clearDaemonState as C, packageJson as D, acquireDaemonLock as E, writeDaemonState as F, releaseDaemonLock as G, HeadTailPreviewBuffer as H, validateProfileForAgent as I, getProfileEnvironmentVariables as J, clearCredentials as K, clearMachineId as L, readHappyOrgDispatchTruthSnapshot as M, processHappyOrgRepoRequests as N, readHappyOrgRepoTaskBoard as O, HappyOrgTurnReportSchema as P, recordHappyOrgTurnReport as Q, MessageContentSchema as R, buildSocketAuth as S, encrypt as T, getLatestDaemonLog as U, persistence as V, api as W, ApiSessionClient as a, connectionState as b, configuration as c, AssistantMessageStream as d, HAPPY_ORG_REPLY_ACK_VERSION as e, HAPPY_ORG_TURN_REPORT_TAG as f, HAPPY_ORG_SUMMARY_MAX_LENGTH as g, HAPPY_ORG_REPEAT_THRESHOLD as h, isAuthenticationRequiredError as i, backoff as j, delay as k, logger as l, AsyncLock as m, encodeBase64 as n, readCredentials as o, preserveSessionRuntimeMetadata as p, ensureSigningCredentials as q, readSettings as r, startOfflineReconnection as s, encodeBase64Url as t, updateSettings as u, buildClientHeaders as v, decodeBase64 as w, writeCredentialsLegacy as x, writeCredentialsDataKey as y, readDaemonState as z };
@@ -38,7 +38,7 @@ function _interopNamespaceDefault(e) {
38
38
  var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
39
39
 
40
40
  var name = "happy-imou-cloud";
41
- var version = "2.1.39";
41
+ var version = "2.1.40";
42
42
  var description = "hicloud - Imou 企业定制版。关键是 happy!移动端远程 AI 编程工具,支持 Claude Code、Codex 和 Gemini CLI";
43
43
  var author = "long.zhu";
44
44
  var license = "MIT";
@@ -4023,6 +4023,59 @@ async function ensureSigningCredentials(credentials, opts = {}) {
4023
4023
  }
4024
4024
  }
4025
4025
 
4026
+ class AssistantMessageStream {
4027
+ constructor(createId = node_crypto.randomUUID) {
4028
+ this.createId = createId;
4029
+ }
4030
+ activeStream = null;
4031
+ delta() {
4032
+ return this.metadata("delta", "append");
4033
+ }
4034
+ commit() {
4035
+ const metadata = this.metadata("commit", "replace");
4036
+ this.reset();
4037
+ return metadata;
4038
+ }
4039
+ abort() {
4040
+ const metadata = this.metadata("abort", "replace");
4041
+ this.reset();
4042
+ return metadata;
4043
+ }
4044
+ hasActive() {
4045
+ return this.activeStream !== null;
4046
+ }
4047
+ reset() {
4048
+ this.activeStream = null;
4049
+ }
4050
+ metadata(phase, mode) {
4051
+ const activeStream = this.ensureActiveStream();
4052
+ return {
4053
+ streamId: activeStream.streamId,
4054
+ messageId: activeStream.messageId,
4055
+ phase,
4056
+ mode
4057
+ };
4058
+ }
4059
+ ensureActiveStream() {
4060
+ if (this.activeStream) {
4061
+ return this.activeStream;
4062
+ }
4063
+ const id = this.createId();
4064
+ this.activeStream = {
4065
+ streamId: `assistant-${id}`,
4066
+ messageId: id
4067
+ };
4068
+ return this.activeStream;
4069
+ }
4070
+ }
4071
+ function isTransientMessageStreamDelta(body) {
4072
+ if (!body || typeof body !== "object") {
4073
+ return false;
4074
+ }
4075
+ const record = body;
4076
+ return record.type === "message" && record.phase === "delta";
4077
+ }
4078
+
4026
4079
  const MAX_PENDING_RELIABLE_SESSION_MESSAGES = 200;
4027
4080
  const MAX_PENDING_RELIABLE_SESSION_MESSAGE_BYTES = 512 * 1024;
4028
4081
  const PROTOCOL_V3_INITIAL_SNAPSHOT_LIMIT = 150;
@@ -5475,6 +5528,9 @@ class ApiSessionClient extends node_events.EventEmitter {
5475
5528
  });
5476
5529
  }
5477
5530
  shouldBufferReliableCodexMessage(body) {
5531
+ if (isTransientMessageStreamDelta(body)) {
5532
+ return false;
5533
+ }
5478
5534
  switch (body?.type) {
5479
5535
  case "message":
5480
5536
  case "tool-call":
@@ -5491,6 +5547,9 @@ class ApiSessionClient extends node_events.EventEmitter {
5491
5547
  }
5492
5548
  }
5493
5549
  shouldBufferReliableAcpMessage(body) {
5550
+ if (isTransientMessageStreamDelta(body)) {
5551
+ return false;
5552
+ }
5494
5553
  switch (body?.type) {
5495
5554
  case "message":
5496
5555
  case "tool-call":
@@ -6815,6 +6874,7 @@ var api = /*#__PURE__*/Object.freeze({
6815
6874
 
6816
6875
  exports.ApiClient = ApiClient;
6817
6876
  exports.ApiSessionClient = ApiSessionClient;
6877
+ exports.AssistantMessageStream = AssistantMessageStream;
6818
6878
  exports.AsyncLock = AsyncLock;
6819
6879
  exports.HAPPY_CLOUD_DAEMON_PORT = HAPPY_CLOUD_DAEMON_PORT;
6820
6880
  exports.HAPPY_ORG_REPEAT_THRESHOLD = HAPPY_ORG_REPEAT_THRESHOLD;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Cgor8CE7.cjs');
3
+ var index = require('./index-Mvx4hucr.cjs');
4
4
  require('chalk');
5
- require('./api-BoeZDGwx.cjs');
5
+ require('./api-Ixv6TLYP.cjs');
6
6
  require('axios');
7
7
  require('fs');
8
8
  require('node:fs');
@@ -1,6 +1,6 @@
1
- import { c as createDefaultRuntimeShell } from './index-B9mt95QV.mjs';
1
+ import { c as createDefaultRuntimeShell } from './index-CNIT6feF.mjs';
2
2
  import 'chalk';
3
- import './api-wcqkneTg.mjs';
3
+ import './api-BEKN9moW.mjs';
4
4
  import 'axios';
5
5
  import 'fs';
6
6
  import 'node:fs';
@@ -1,5 +1,5 @@
1
1
  import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import chalk from 'chalk';
2
- import { l as logger, m as encodeBase64, c as configuration, n as readCredentials, o as ensureSigningCredentials, r as readSettings, u as updateSettings, q as encodeBase64Url, j as delay, t as buildClientHeaders, v as decodeBase64, w as writeCredentialsLegacy, x as writeCredentialsDataKey, y as readDaemonState, z as HAPPY_CLOUD_DAEMON_PORT, B as clearDaemonState, C as packageJson, i as isAuthenticationRequiredError, D as acquireDaemonLock, E as writeDaemonState, A as ApiClient, F as releaseDaemonLock, G as validateProfileForAgent, I as getProfileEnvironmentVariables, J as clearCredentials, K as clearMachineId, L as readHappyOrgDispatchTruthSnapshot, M as processHappyOrgRepoRequests, N as readHappyOrgRepoTaskBoard, O as HappyOrgTurnReportSchema, P as recordHappyOrgTurnReport, Q as MessageContentSchema, R as buildSocketAuth, S as encrypt, H as HeadTailPreviewBuffer, T as getLatestDaemonLog } from './api-wcqkneTg.mjs';
2
+ import { l as logger, n as encodeBase64, c as configuration, o as readCredentials, q as ensureSigningCredentials, r as readSettings, u as updateSettings, t as encodeBase64Url, k as delay, v as buildClientHeaders, w as decodeBase64, x as writeCredentialsLegacy, y as writeCredentialsDataKey, z as readDaemonState, B as HAPPY_CLOUD_DAEMON_PORT, C as clearDaemonState, D as packageJson, i as isAuthenticationRequiredError, E as acquireDaemonLock, F as writeDaemonState, A as ApiClient, G as releaseDaemonLock, I as validateProfileForAgent, J as getProfileEnvironmentVariables, K as clearCredentials, L as clearMachineId, M as readHappyOrgDispatchTruthSnapshot, N as processHappyOrgRepoRequests, O as readHappyOrgRepoTaskBoard, P as HappyOrgTurnReportSchema, Q as recordHappyOrgTurnReport, R as MessageContentSchema, S as buildSocketAuth, T as encrypt, H as HeadTailPreviewBuffer, U as getLatestDaemonLog } from './api-BEKN9moW.mjs';
3
3
  import { z } from 'zod';
4
4
  import fs, { writeFile as writeFile$1, rename, unlink as unlink$1 } from 'fs/promises';
5
5
  import os$1, { homedir } from 'os';
@@ -11877,14 +11877,14 @@ var launch = /*#__PURE__*/Object.freeze({
11877
11877
  const unifiedProviderExecutors = {
11878
11878
  claude: async (opts) => {
11879
11879
  const claudeOptions = opts.claudeOptions ?? {};
11880
- const { runClaude } = await import('./runClaude-BYKNCDEU.mjs');
11880
+ const { runClaude } = await import('./runClaude-V1hBSsrL.mjs');
11881
11881
  await runClaude(opts.credentials, {
11882
11882
  ...claudeOptions,
11883
11883
  startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
11884
11884
  });
11885
11885
  },
11886
11886
  codex: async (opts) => {
11887
- const { runCodex } = await import('./runCodex-DqAddhDE.mjs');
11887
+ const { runCodex } = await import('./runCodex-goHWKOd0.mjs');
11888
11888
  await runCodex({
11889
11889
  credentials: opts.credentials,
11890
11890
  startedBy: opts.startedBy,
@@ -11893,7 +11893,7 @@ const unifiedProviderExecutors = {
11893
11893
  });
11894
11894
  },
11895
11895
  gemini: async (opts) => {
11896
- const { runGemini } = await import('./runGemini-3jkfOtlr.mjs');
11896
+ const { runGemini } = await import('./runGemini-BDorYx-I.mjs');
11897
11897
  await runGemini({
11898
11898
  credentials: opts.credentials,
11899
11899
  startedBy: opts.startedBy
@@ -11976,7 +11976,7 @@ function shouldRunMainClaudeFlow(opts) {
11976
11976
  return;
11977
11977
  } else if (subcommand === "runtime") {
11978
11978
  if (args[1] === "providers") {
11979
- const { renderRuntimeProviders } = await import('./command-DcgK0y3F.mjs');
11979
+ const { renderRuntimeProviders } = await import('./command-bEdScxsw.mjs');
11980
11980
  console.log(renderRuntimeProviders());
11981
11981
  return;
11982
11982
  }
@@ -12182,8 +12182,8 @@ function shouldRunMainClaudeFlow(opts) {
12182
12182
  const projectId = args[3];
12183
12183
  try {
12184
12184
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
12185
- const { readCredentials: readCredentials2 } = await import('./api-wcqkneTg.mjs').then(function (n) { return n.U; });
12186
- const { ApiClient: ApiClient2 } = await import('./api-wcqkneTg.mjs').then(function (n) { return n.V; });
12185
+ const { readCredentials: readCredentials2 } = await import('./api-BEKN9moW.mjs').then(function (n) { return n.V; });
12186
+ const { ApiClient: ApiClient2 } = await import('./api-BEKN9moW.mjs').then(function (n) { return n.W; });
12187
12187
  let userEmail = void 0;
12188
12188
  try {
12189
12189
  const credentials = await readCredentials2();
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var persistence = require('./api-BoeZDGwx.cjs');
4
+ var persistence = require('./api-Ixv6TLYP.cjs');
5
5
  var z = require('zod');
6
6
  var fs$2 = require('fs/promises');
7
7
  var os$1 = require('os');
@@ -72,7 +72,7 @@ async function openBrowser(url) {
72
72
  }
73
73
  }
74
74
 
75
- const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Cgor8CE7.cjs', document.baseURI).href)));
75
+ const require$1 = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Mvx4hucr.cjs', document.baseURI).href)));
76
76
  const QRCode = require$1("qrcode-terminal/vendor/QRCode");
77
77
  const QRErrorCorrectLevel = require$1("qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel");
78
78
  const pendingTempFiles = /* @__PURE__ */ new Set();
@@ -637,7 +637,7 @@ function setupCleanupHandlers() {
637
637
  });
638
638
  }
639
639
 
640
- const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Cgor8CE7.cjs', document.baseURI).href))));
640
+ const __dirname$2 = path$1.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Mvx4hucr.cjs', document.baseURI).href))));
641
641
  function projectPath() {
642
642
  const path = path$1.resolve(__dirname$2, "..");
643
643
  return path;
@@ -10574,7 +10574,7 @@ class AbortError extends Error {
10574
10574
  }
10575
10575
  }
10576
10576
 
10577
- const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Cgor8CE7.cjs', document.baseURI).href)));
10577
+ const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index-Mvx4hucr.cjs', document.baseURI).href)));
10578
10578
  const __dirname$1 = path.join(__filename$1, "..");
10579
10579
  function getGlobalClaudeVersion() {
10580
10580
  try {
@@ -11899,14 +11899,14 @@ var launch = /*#__PURE__*/Object.freeze({
11899
11899
  const unifiedProviderExecutors = {
11900
11900
  claude: async (opts) => {
11901
11901
  const claudeOptions = opts.claudeOptions ?? {};
11902
- const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-CwXQwmgw.cjs'); });
11902
+ const { runClaude } = await Promise.resolve().then(function () { return require('./runClaude-DFdTqEU8.cjs'); });
11903
11903
  await runClaude(opts.credentials, {
11904
11904
  ...claudeOptions,
11905
11905
  startingMode: claudeOptions.startingMode ?? (claudeOptions.startedBy === "daemon" ? "remote" : void 0)
11906
11906
  });
11907
11907
  },
11908
11908
  codex: async (opts) => {
11909
- const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-BkB_YKhV.cjs'); });
11909
+ const { runCodex } = await Promise.resolve().then(function () { return require('./runCodex-BMafN7eI.cjs'); });
11910
11910
  await runCodex({
11911
11911
  credentials: opts.credentials,
11912
11912
  startedBy: opts.startedBy,
@@ -11915,7 +11915,7 @@ const unifiedProviderExecutors = {
11915
11915
  });
11916
11916
  },
11917
11917
  gemini: async (opts) => {
11918
- const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-B4uXPrue.cjs'); });
11918
+ const { runGemini } = await Promise.resolve().then(function () { return require('./runGemini-CQBCnzbz.cjs'); });
11919
11919
  await runGemini({
11920
11920
  credentials: opts.credentials,
11921
11921
  startedBy: opts.startedBy
@@ -11998,7 +11998,7 @@ function shouldRunMainClaudeFlow(opts) {
11998
11998
  return;
11999
11999
  } else if (subcommand === "runtime") {
12000
12000
  if (args[1] === "providers") {
12001
- const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-CkYq_KwA.cjs'); });
12001
+ const { renderRuntimeProviders } = await Promise.resolve().then(function () { return require('./command-DycfJnzn.cjs'); });
12002
12002
  console.log(renderRuntimeProviders());
12003
12003
  return;
12004
12004
  }
@@ -12204,8 +12204,8 @@ function shouldRunMainClaudeFlow(opts) {
12204
12204
  const projectId = args[3];
12205
12205
  try {
12206
12206
  const { saveGoogleCloudProjectToConfig } = await Promise.resolve().then(function () { return config; });
12207
- const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-BoeZDGwx.cjs'); }).then(function (n) { return n.persistence; });
12208
- const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-BoeZDGwx.cjs'); }).then(function (n) { return n.api; });
12207
+ const { readCredentials: readCredentials2 } = await Promise.resolve().then(function () { return require('./api-Ixv6TLYP.cjs'); }).then(function (n) { return n.persistence; });
12208
+ const { ApiClient: ApiClient2 } = await Promise.resolve().then(function () { return require('./api-Ixv6TLYP.cjs'); }).then(function (n) { return n.api; });
12209
12209
  let userEmail = void 0;
12210
12210
  try {
12211
12211
  const credentials = await readCredentials2();
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  require('chalk');
4
- require('./api-BoeZDGwx.cjs');
4
+ require('./api-Ixv6TLYP.cjs');
5
5
  require('zod');
6
- require('./index-Cgor8CE7.cjs');
6
+ require('./index-Mvx4hucr.cjs');
7
7
  require('node:child_process');
8
8
  require('node:fs');
9
9
  require('cross-spawn');
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import 'chalk';
2
- import './api-wcqkneTg.mjs';
2
+ import './api-BEKN9moW.mjs';
3
3
  import 'zod';
4
- import './index-B9mt95QV.mjs';
4
+ import './index-CNIT6feF.mjs';
5
5
  import 'node:child_process';
6
6
  import 'node:fs';
7
7
  import 'cross-spawn';
package/dist/lib.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var persistence = require('./api-BoeZDGwx.cjs');
3
+ var persistence = require('./api-Ixv6TLYP.cjs');
4
4
  var types = require('./types-DVk3crez.cjs');
5
5
  require('axios');
6
6
  require('chalk');
package/dist/lib.d.cts CHANGED
@@ -2815,20 +2815,35 @@ type Credentials = {
2815
2815
  };
2816
2816
  };
2817
2817
 
2818
+ type MessageStreamPhase = 'start' | 'delta' | 'commit' | 'abort';
2819
+ type MessageStreamMode = 'append' | 'replace';
2820
+ type MessageStreamMetadata = {
2821
+ streamId: string;
2822
+ messageId: string;
2823
+ phase: MessageStreamPhase;
2824
+ mode: MessageStreamMode;
2825
+ };
2826
+
2818
2827
  /**
2819
2828
  * ACP (Agent Communication Protocol) message data types.
2820
2829
  * This is the unified format for all agent messages - CLI adapts each provider's format to ACP.
2821
2830
  */
2822
- type ACPMessageData = {
2831
+ type ACPMessageData = ({
2823
2832
  type: 'message';
2824
2833
  message: string;
2825
- } | {
2834
+ } & Partial<MessageStreamMetadata> & {
2835
+ id?: string;
2836
+ }) | ({
2826
2837
  type: 'reasoning';
2827
2838
  message: string;
2828
- } | {
2839
+ } & Partial<MessageStreamMetadata> & {
2840
+ id?: string;
2841
+ }) | ({
2829
2842
  type: 'thinking';
2830
2843
  text: string;
2831
- } | {
2844
+ } & Partial<MessageStreamMetadata> & {
2845
+ id?: string;
2846
+ }) | {
2832
2847
  type: 'tool-call';
2833
2848
  callId: string;
2834
2849
  name: string;
package/dist/lib.d.mts CHANGED
@@ -2815,20 +2815,35 @@ type Credentials = {
2815
2815
  };
2816
2816
  };
2817
2817
 
2818
+ type MessageStreamPhase = 'start' | 'delta' | 'commit' | 'abort';
2819
+ type MessageStreamMode = 'append' | 'replace';
2820
+ type MessageStreamMetadata = {
2821
+ streamId: string;
2822
+ messageId: string;
2823
+ phase: MessageStreamPhase;
2824
+ mode: MessageStreamMode;
2825
+ };
2826
+
2818
2827
  /**
2819
2828
  * ACP (Agent Communication Protocol) message data types.
2820
2829
  * This is the unified format for all agent messages - CLI adapts each provider's format to ACP.
2821
2830
  */
2822
- type ACPMessageData = {
2831
+ type ACPMessageData = ({
2823
2832
  type: 'message';
2824
2833
  message: string;
2825
- } | {
2834
+ } & Partial<MessageStreamMetadata> & {
2835
+ id?: string;
2836
+ }) | ({
2826
2837
  type: 'reasoning';
2827
2838
  message: string;
2828
- } | {
2839
+ } & Partial<MessageStreamMetadata> & {
2840
+ id?: string;
2841
+ }) | ({
2829
2842
  type: 'thinking';
2830
2843
  text: string;
2831
- } | {
2844
+ } & Partial<MessageStreamMetadata> & {
2845
+ id?: string;
2846
+ }) | {
2832
2847
  type: 'tool-call';
2833
2848
  callId: string;
2834
2849
  name: string;
package/dist/lib.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-wcqkneTg.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-BEKN9moW.mjs';
2
2
  export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
3
3
  import 'axios';
4
4
  import 'chalk';
@@ -1,5 +1,5 @@
1
- import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2, m as isTerminalReferenceOnlyPayload } from './index-B9mt95QV.mjs';
2
- import { r as readSettings, H as HeadTailPreviewBuffer, d as HAPPY_ORG_REPLY_ACK_VERSION, e as HAPPY_ORG_TURN_REPORT_TAG, f as HAPPY_ORG_SUMMARY_MAX_LENGTH, g as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-wcqkneTg.mjs';
1
+ import { k as initialMachineMetadata, R as RuntimeShell, f as formatDisplayMessage, l as resolveCanonicalToolNameV2, m as isTerminalReferenceOnlyPayload } from './index-CNIT6feF.mjs';
2
+ import { r as readSettings, H as HeadTailPreviewBuffer, e as HAPPY_ORG_REPLY_ACK_VERSION, f as HAPPY_ORG_TURN_REPORT_TAG, g as HAPPY_ORG_SUMMARY_MAX_LENGTH, h as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-BEKN9moW.mjs';
3
3
  import { randomUUID } from 'node:crypto';
4
4
  import { basename } from 'node:path';
5
5
  import { createHash } from 'crypto';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Cgor8CE7.cjs');
4
- var persistence = require('./api-BoeZDGwx.cjs');
3
+ var index = require('./index-Mvx4hucr.cjs');
4
+ var persistence = require('./api-Ixv6TLYP.cjs');
5
5
  var node_crypto = require('node:crypto');
6
6
  var path = require('node:path');
7
7
  var crypto = require('crypto');