happy-imou-cloud 2.1.48 → 2.1.49
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/{BaseReasoningProcessor-CM3JbXUC.mjs → BaseReasoningProcessor-CAVeOdyo.mjs} +2 -2
- package/dist/{BaseReasoningProcessor-CKtDfihV.cjs → BaseReasoningProcessor-Dn9NcoHz.cjs} +2 -2
- package/dist/{ProviderSelectionHandler-BHKIBw4t.cjs → ProviderSelectionHandler-BJJc7qOR.cjs} +2 -2
- package/dist/{ProviderSelectionHandler-vgZ2egD_.mjs → ProviderSelectionHandler-DIYidT13.mjs} +2 -2
- package/dist/{api-eaGKJjMt.cjs → api-D7nAeZi7.cjs} +1 -1
- package/dist/{api-CSjP-Z3Y.mjs → api-DnqaNvyV.mjs} +1 -1
- package/dist/{command-BzPI4N1n.mjs → command-CzfRRhVe.mjs} +2 -2
- package/dist/{command-DDoz1Eky.cjs → command-VcH4hbhi.cjs} +2 -2
- package/dist/{index-BzsBo3_Z.mjs → index-7Z93BoVn.mjs} +95 -20
- package/dist/{index-C8X1VlHZ.cjs → index-xa1kwZoj.cjs} +98 -23
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +86 -86
- package/dist/lib.d.mts +86 -86
- package/dist/lib.mjs +1 -1
- package/dist/{registerKillSessionHandler-CLCYBgZX.cjs → registerKillSessionHandler-CfCya6si.cjs} +2 -2
- package/dist/{registerKillSessionHandler-BHu-3hZQ.mjs → registerKillSessionHandler-DLDg2EES.mjs} +2 -2
- package/dist/{runClaude-BkUbXE2F.cjs → runClaude-BBGNmGj6.cjs} +4 -4
- package/dist/{runClaude-D3CBLW5o.mjs → runClaude-zCwRhpOw.mjs} +4 -4
- package/dist/{runCodex-DqzdgDwZ.mjs → runCodex-BbgLVjb9.mjs} +56 -8
- package/dist/{runCodex-CdgrZK7P.cjs → runCodex-jUU6U2tZ.cjs} +56 -8
- package/dist/{runGemini-BE05R24D.cjs → runGemini-C0NT8MHK.cjs} +4 -4
- package/dist/{runGemini-UZuiKe59.mjs → runGemini-DcwNsudA.mjs} +4 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as preserveSessionRuntimeMetadata, l as logger, h as hashObject, d as AssistantMessageStream, b as connectionState, A as ApiClient } from './api-
|
|
2
|
-
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, c as registerKillSessionHandler, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, t as createSessionTranscriptInkRenderer, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-
|
|
3
|
-
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, A as AcpBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as resolveCodexExecutable, j as shouldUseShellForCodex, F as Future, k as readManagedSessionTag, l as resolveManagedSessionTag } from './index-
|
|
1
|
+
import { p as preserveSessionRuntimeMetadata, l as logger, h as hashObject, d as AssistantMessageStream, b as connectionState, A as ApiClient } from './api-DnqaNvyV.mjs';
|
|
2
|
+
import { B as BasePermissionHandler, d as MessageBuffer, C as ConversationHistory$1, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, c as registerKillSessionHandler, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, t as createSessionTranscriptInkRenderer, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, e as ensureManagedProviderMachine, M as MissingMachineIdError, b as MessageQueue2, r as resolveHappyOrgQueuedTurn, s as syncControlledByUserState } from './registerKillSessionHandler-DLDg2EES.mjs';
|
|
3
|
+
import { f as formatDisplayMessage, v as validateCodexAcpSpawn, h as createCodexBackend, A as AcpBackend, t as truncateDisplayMessage, b as closeProviderSession, e as stopCaffeinate, i as resolveCodexExecutable, j as shouldUseShellForCodex, F as Future, k as readManagedSessionTag, l as resolveManagedSessionTag } from './index-7Z93BoVn.mjs';
|
|
4
4
|
import 'cross-spawn';
|
|
5
5
|
import '@agentclientprotocol/sdk';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
@@ -24,8 +24,8 @@ import 'tweetnacl';
|
|
|
24
24
|
import 'open';
|
|
25
25
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
26
26
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
27
|
-
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-
|
|
28
|
-
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-
|
|
27
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-DIYidT13.mjs';
|
|
28
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-CAVeOdyo.mjs';
|
|
29
29
|
import 'zod';
|
|
30
30
|
import 'socket.io-client';
|
|
31
31
|
import 'expo-server-sdk';
|
|
@@ -1913,6 +1913,50 @@ function installFatalProcessHandlers(options) {
|
|
|
1913
1913
|
};
|
|
1914
1914
|
}
|
|
1915
1915
|
|
|
1916
|
+
function normalizeResumeSessionId(value) {
|
|
1917
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
1918
|
+
}
|
|
1919
|
+
function normalizeCodexArgsForHappy(options) {
|
|
1920
|
+
const sourceArgs = options.codexArgs ?? [];
|
|
1921
|
+
const codexArgs = [];
|
|
1922
|
+
let resumeSessionId = normalizeResumeSessionId(options.resumeSessionId);
|
|
1923
|
+
for (let index = 0; index < sourceArgs.length; index += 1) {
|
|
1924
|
+
const arg = sourceArgs[index];
|
|
1925
|
+
if (arg === "--resume") {
|
|
1926
|
+
const nextArg = sourceArgs[index + 1];
|
|
1927
|
+
const normalizedNextArg = normalizeResumeSessionId(nextArg);
|
|
1928
|
+
if (!normalizedNextArg || nextArg?.startsWith("-")) {
|
|
1929
|
+
throw new Error("Codex --resume requires a provider session id when used through Happy.");
|
|
1930
|
+
}
|
|
1931
|
+
resumeSessionId ??= normalizedNextArg;
|
|
1932
|
+
index += 1;
|
|
1933
|
+
continue;
|
|
1934
|
+
}
|
|
1935
|
+
if (arg.startsWith("--resume=")) {
|
|
1936
|
+
const normalizedValue = normalizeResumeSessionId(arg.slice("--resume=".length));
|
|
1937
|
+
if (!normalizedValue) {
|
|
1938
|
+
throw new Error("Codex --resume requires a provider session id when used through Happy.");
|
|
1939
|
+
}
|
|
1940
|
+
resumeSessionId ??= normalizedValue;
|
|
1941
|
+
continue;
|
|
1942
|
+
}
|
|
1943
|
+
if (index === 0 && arg === "resume") {
|
|
1944
|
+
const nextArg = sourceArgs[index + 1];
|
|
1945
|
+
const normalizedNextArg = normalizeResumeSessionId(nextArg);
|
|
1946
|
+
if (normalizedNextArg && !nextArg?.startsWith("-")) {
|
|
1947
|
+
resumeSessionId ??= normalizedNextArg;
|
|
1948
|
+
index += 1;
|
|
1949
|
+
continue;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
codexArgs.push(arg);
|
|
1953
|
+
}
|
|
1954
|
+
return {
|
|
1955
|
+
codexArgs,
|
|
1956
|
+
resumeSessionId
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1916
1960
|
function resolveInitialCodexPermissionMode(opts) {
|
|
1917
1961
|
if (opts.permissionMode) {
|
|
1918
1962
|
return opts.permissionMode;
|
|
@@ -1948,6 +1992,10 @@ function resolveIncomingCodexPermissionMode(opts) {
|
|
|
1948
1992
|
};
|
|
1949
1993
|
}
|
|
1950
1994
|
async function runCodex(opts) {
|
|
1995
|
+
const normalizedArgs = normalizeCodexArgsForHappy({
|
|
1996
|
+
codexArgs: opts.codexArgs,
|
|
1997
|
+
resumeSessionId: opts.resumeSessionId
|
|
1998
|
+
});
|
|
1951
1999
|
const managedSessionTag = opts.startedBy === "daemon" ? readManagedSessionTag() : null;
|
|
1952
2000
|
const sessionTag = managedSessionTag ?? resolveManagedSessionTag(
|
|
1953
2001
|
opts.startedBy === "daemon" ? process.env : {}
|
|
@@ -1958,7 +2006,7 @@ async function runCodex(opts) {
|
|
|
1958
2006
|
permissionMode: opts.permissionMode,
|
|
1959
2007
|
startedBy: opts.startedBy,
|
|
1960
2008
|
startingMode: requestedStartingMode,
|
|
1961
|
-
codexArgs:
|
|
2009
|
+
codexArgs: normalizedArgs.codexArgs
|
|
1962
2010
|
});
|
|
1963
2011
|
const preserveCurrentPermissionModeForRemoteDefault = opts.startedBy === "daemon" && requestedStartingMode === "remote";
|
|
1964
2012
|
if (opts.startedBy === "daemon" && requestedStartingMode === "local") {
|
|
@@ -2054,10 +2102,10 @@ async function runCodex(opts) {
|
|
|
2054
2102
|
path: metadata.path,
|
|
2055
2103
|
logPath: logger.logFilePath,
|
|
2056
2104
|
startupRolePrompt: happyOrgStartupBinding?.identityPrompt ?? null,
|
|
2057
|
-
sessionId:
|
|
2105
|
+
sessionId: normalizedArgs.resumeSessionId,
|
|
2058
2106
|
mode: requestedStartingMode,
|
|
2059
2107
|
messageQueue,
|
|
2060
|
-
codexArgs:
|
|
2108
|
+
codexArgs: normalizedArgs.codexArgs,
|
|
2061
2109
|
protocolDescriptor,
|
|
2062
2110
|
protocolStateSources: userScopedObserver ? [userScopedObserver] : [],
|
|
2063
2111
|
userObserver: userScopedObserver,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./api-
|
|
4
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
5
|
-
var index = require('./index-
|
|
3
|
+
var persistence = require('./api-D7nAeZi7.cjs');
|
|
4
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CfCya6si.cjs');
|
|
5
|
+
var index = require('./index-xa1kwZoj.cjs');
|
|
6
6
|
require('cross-spawn');
|
|
7
7
|
require('@agentclientprotocol/sdk');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
@@ -26,8 +26,8 @@ require('tweetnacl');
|
|
|
26
26
|
require('open');
|
|
27
27
|
var React = require('react');
|
|
28
28
|
var ink = require('ink');
|
|
29
|
-
var ProviderSelectionHandler = require('./ProviderSelectionHandler-
|
|
30
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
29
|
+
var ProviderSelectionHandler = require('./ProviderSelectionHandler-BJJc7qOR.cjs');
|
|
30
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-Dn9NcoHz.cjs');
|
|
31
31
|
require('zod');
|
|
32
32
|
require('socket.io-client');
|
|
33
33
|
require('expo-server-sdk');
|
|
@@ -1915,6 +1915,50 @@ function installFatalProcessHandlers(options) {
|
|
|
1915
1915
|
};
|
|
1916
1916
|
}
|
|
1917
1917
|
|
|
1918
|
+
function normalizeResumeSessionId(value) {
|
|
1919
|
+
return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
|
|
1920
|
+
}
|
|
1921
|
+
function normalizeCodexArgsForHappy(options) {
|
|
1922
|
+
const sourceArgs = options.codexArgs ?? [];
|
|
1923
|
+
const codexArgs = [];
|
|
1924
|
+
let resumeSessionId = normalizeResumeSessionId(options.resumeSessionId);
|
|
1925
|
+
for (let index = 0; index < sourceArgs.length; index += 1) {
|
|
1926
|
+
const arg = sourceArgs[index];
|
|
1927
|
+
if (arg === "--resume") {
|
|
1928
|
+
const nextArg = sourceArgs[index + 1];
|
|
1929
|
+
const normalizedNextArg = normalizeResumeSessionId(nextArg);
|
|
1930
|
+
if (!normalizedNextArg || nextArg?.startsWith("-")) {
|
|
1931
|
+
throw new Error("Codex --resume requires a provider session id when used through Happy.");
|
|
1932
|
+
}
|
|
1933
|
+
resumeSessionId ??= normalizedNextArg;
|
|
1934
|
+
index += 1;
|
|
1935
|
+
continue;
|
|
1936
|
+
}
|
|
1937
|
+
if (arg.startsWith("--resume=")) {
|
|
1938
|
+
const normalizedValue = normalizeResumeSessionId(arg.slice("--resume=".length));
|
|
1939
|
+
if (!normalizedValue) {
|
|
1940
|
+
throw new Error("Codex --resume requires a provider session id when used through Happy.");
|
|
1941
|
+
}
|
|
1942
|
+
resumeSessionId ??= normalizedValue;
|
|
1943
|
+
continue;
|
|
1944
|
+
}
|
|
1945
|
+
if (index === 0 && arg === "resume") {
|
|
1946
|
+
const nextArg = sourceArgs[index + 1];
|
|
1947
|
+
const normalizedNextArg = normalizeResumeSessionId(nextArg);
|
|
1948
|
+
if (normalizedNextArg && !nextArg?.startsWith("-")) {
|
|
1949
|
+
resumeSessionId ??= normalizedNextArg;
|
|
1950
|
+
index += 1;
|
|
1951
|
+
continue;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
codexArgs.push(arg);
|
|
1955
|
+
}
|
|
1956
|
+
return {
|
|
1957
|
+
codexArgs,
|
|
1958
|
+
resumeSessionId
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1918
1962
|
function resolveInitialCodexPermissionMode(opts) {
|
|
1919
1963
|
if (opts.permissionMode) {
|
|
1920
1964
|
return opts.permissionMode;
|
|
@@ -1950,6 +1994,10 @@ function resolveIncomingCodexPermissionMode(opts) {
|
|
|
1950
1994
|
};
|
|
1951
1995
|
}
|
|
1952
1996
|
async function runCodex(opts) {
|
|
1997
|
+
const normalizedArgs = normalizeCodexArgsForHappy({
|
|
1998
|
+
codexArgs: opts.codexArgs,
|
|
1999
|
+
resumeSessionId: opts.resumeSessionId
|
|
2000
|
+
});
|
|
1953
2001
|
const managedSessionTag = opts.startedBy === "daemon" ? index.readManagedSessionTag() : null;
|
|
1954
2002
|
const sessionTag = managedSessionTag ?? index.resolveManagedSessionTag(
|
|
1955
2003
|
opts.startedBy === "daemon" ? process.env : {}
|
|
@@ -1960,7 +2008,7 @@ async function runCodex(opts) {
|
|
|
1960
2008
|
permissionMode: opts.permissionMode,
|
|
1961
2009
|
startedBy: opts.startedBy,
|
|
1962
2010
|
startingMode: requestedStartingMode,
|
|
1963
|
-
codexArgs:
|
|
2011
|
+
codexArgs: normalizedArgs.codexArgs
|
|
1964
2012
|
});
|
|
1965
2013
|
const preserveCurrentPermissionModeForRemoteDefault = opts.startedBy === "daemon" && requestedStartingMode === "remote";
|
|
1966
2014
|
if (opts.startedBy === "daemon" && requestedStartingMode === "local") {
|
|
@@ -2056,10 +2104,10 @@ async function runCodex(opts) {
|
|
|
2056
2104
|
path: metadata.path,
|
|
2057
2105
|
logPath: persistence.logger.logFilePath,
|
|
2058
2106
|
startupRolePrompt: happyOrgStartupBinding?.identityPrompt ?? null,
|
|
2059
|
-
sessionId:
|
|
2107
|
+
sessionId: normalizedArgs.resumeSessionId,
|
|
2060
2108
|
mode: requestedStartingMode,
|
|
2061
2109
|
messageQueue,
|
|
2062
|
-
codexArgs:
|
|
2110
|
+
codexArgs: normalizedArgs.codexArgs,
|
|
2063
2111
|
protocolDescriptor,
|
|
2064
2112
|
protocolStateSources: userScopedObserver ? [userScopedObserver] : [],
|
|
2065
2113
|
userObserver: userScopedObserver,
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var ink = require('ink');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
|
-
var persistence = require('./api-
|
|
7
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
8
|
-
var index = require('./index-
|
|
9
|
-
var BaseReasoningProcessor = require('./BaseReasoningProcessor-
|
|
6
|
+
var persistence = require('./api-D7nAeZi7.cjs');
|
|
7
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-CfCya6si.cjs');
|
|
8
|
+
var index = require('./index-xa1kwZoj.cjs');
|
|
9
|
+
var BaseReasoningProcessor = require('./BaseReasoningProcessor-Dn9NcoHz.cjs');
|
|
10
10
|
require('cross-spawn');
|
|
11
11
|
require('@agentclientprotocol/sdk');
|
|
12
12
|
require('ps-list');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
2
2
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { l as logger, b as connectionState, A as ApiClient, h as hashObject, d as AssistantMessageStream } from './api-
|
|
5
|
-
import { B as BasePermissionHandler, C as ConversationHistory$1, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, t as createSessionTranscriptInkRenderer } from './registerKillSessionHandler-
|
|
6
|
-
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e as stopCaffeinate } from './index-
|
|
7
|
-
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-
|
|
4
|
+
import { l as logger, b as connectionState, A as ApiClient, h as hashObject, d as AssistantMessageStream } from './api-DnqaNvyV.mjs';
|
|
5
|
+
import { B as BasePermissionHandler, C as ConversationHistory$1, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, s as syncControlledByUserState, b as MessageQueue2, c as registerKillSessionHandler, d as MessageBuffer, f as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, h as finalizeHappyOrgTurnWithBusinessAck, i as buildTurnResultPushNotification, j as buildReadyPushNotification, l as launchRuntimeHandleWithFactoryResult, k as extractPermissionRequestPushContext, m as buildPermissionPushNotification, n as renderTerminalOutputPreview, p as prepareTerminalOutputForForwarding, o as inferToolResultError, q as forwardAgentMessageToProviderSession, t as createSessionTranscriptInkRenderer } from './registerKillSessionHandler-DLDg2EES.mjs';
|
|
6
|
+
import { g as getInitialGeminiModel, r as readGeminiLocalConfig, G as GEMINI_MODEL_ENV, b as closeProviderSession, s as saveGeminiModelToConfig, d as createGeminiBackend, e as stopCaffeinate } from './index-7Z93BoVn.mjs';
|
|
7
|
+
import { B as BaseReasoningProcessor, b as bootstrapManagedProviderSession } from './BaseReasoningProcessor-CAVeOdyo.mjs';
|
|
8
8
|
import 'cross-spawn';
|
|
9
9
|
import '@agentclientprotocol/sdk';
|
|
10
10
|
import 'ps-list';
|