happy-imou-cloud 2.0.0 → 2.0.1
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-BRCQXCZY.cjs → BaseReasoningProcessor-01KqA3Kz.cjs} +96 -9
- package/dist/{BaseReasoningProcessor-BKLRCKTU.mjs → BaseReasoningProcessor-DQE2l7Xu.mjs} +95 -10
- package/dist/{api-BGXYX0yH.mjs → api-B5Ui8Fw0.mjs} +68 -6
- package/dist/{api-D7OK-mML.cjs → api-B8v4tczT.cjs} +70 -5
- package/dist/{command-CnLtKtP-.mjs → command-BfIuJmeo.mjs} +3 -3
- package/dist/{command-G85giEAF.cjs → command-D8yNlaDo.cjs} +3 -3
- package/dist/{index-C7Y0R-MI.mjs → index-BByhFIIq.mjs} +682 -220
- package/dist/{index-B_wlQBy2.cjs → index-BOqJ9hwi.cjs} +684 -220
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +1 -0
- package/dist/lib.d.mts +1 -0
- package/dist/lib.mjs +1 -1
- package/dist/{persistence-DHgf1CTG.cjs → persistence-C33AMdtv.cjs} +1 -1
- package/dist/{persistence-BA_unuca.mjs → persistence-CzpZpiL3.mjs} +1 -1
- package/dist/{registerKillSessionHandler-CLREXN11.cjs → registerKillSessionHandler-BkzQulD9.cjs} +6 -4
- package/dist/{registerKillSessionHandler-C2-yHm1V.mjs → registerKillSessionHandler-BtSK7IOa.mjs} +6 -4
- package/dist/{runClaude-CwAitpX-.cjs → runClaude-CNVufgZb.cjs} +14 -6
- package/dist/{runClaude-uNC5Eym4.mjs → runClaude-C_WLfM6c.mjs} +13 -5
- package/dist/{runCodex-B-05E-YZ.mjs → runCodex-8eWjTPJr.mjs} +636 -819
- package/dist/{runCodex-Cm0VTqw_.cjs → runCodex-Dzy8anlX.cjs} +639 -819
- package/dist/{runGemini-CLWjwDYS.cjs → runGemini-CgsVKP7m.cjs} +20 -16
- package/dist/{runGemini-_biXvQAH.mjs → runGemini-nbr0mm-S.mjs} +20 -16
- package/package.json +14 -14
- package/scripts/env-wrapper.cjs +11 -11
- package/scripts/setup-dev.cjs +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('chalk');
|
|
4
|
-
require('./api-
|
|
5
|
-
require('./persistence-
|
|
4
|
+
require('./api-B8v4tczT.cjs');
|
|
5
|
+
require('./persistence-C33AMdtv.cjs');
|
|
6
6
|
require('zod');
|
|
7
|
-
require('./index-
|
|
7
|
+
require('./index-BOqJ9hwi.cjs');
|
|
8
8
|
require('node:child_process');
|
|
9
9
|
require('node:fs');
|
|
10
10
|
require('@agentclientprotocol/sdk');
|
|
@@ -13,9 +13,9 @@ require('fs');
|
|
|
13
13
|
require('path');
|
|
14
14
|
require('os');
|
|
15
15
|
require('child_process');
|
|
16
|
-
require('node:os');
|
|
17
16
|
require('node:path');
|
|
18
17
|
require('axios');
|
|
18
|
+
require('node:os');
|
|
19
19
|
require('node:events');
|
|
20
20
|
require('socket.io-client');
|
|
21
21
|
require('tweetnacl');
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'chalk';
|
|
2
|
-
import './api-
|
|
3
|
-
import './persistence-
|
|
2
|
+
import './api-B5Ui8Fw0.mjs';
|
|
3
|
+
import './persistence-CzpZpiL3.mjs';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-BByhFIIq.mjs';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import '@agentclientprotocol/sdk';
|
|
@@ -11,9 +11,9 @@ import 'fs';
|
|
|
11
11
|
import 'path';
|
|
12
12
|
import 'os';
|
|
13
13
|
import 'child_process';
|
|
14
|
-
import 'node:os';
|
|
15
14
|
import 'node:path';
|
|
16
15
|
import 'axios';
|
|
16
|
+
import 'node:os';
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import 'socket.io-client';
|
|
19
19
|
import 'tweetnacl';
|
package/dist/lib.cjs
CHANGED
package/dist/lib.d.cts
CHANGED
package/dist/lib.d.mts
CHANGED
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-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-B5Ui8Fw0.mjs';
|
|
2
2
|
export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'chalk';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile, unlink, open, stat, mkdir, writeFile, rename } from 'node:fs/promises';
|
|
2
2
|
import { existsSync, unlinkSync, writeFileSync, readdirSync, readFileSync, constants } from 'node:fs';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
-
import { c as configuration, l as logger, e as encodeBase64 } from './api-
|
|
4
|
+
import { c as configuration, l as logger, e as encodeBase64 } from './api-B5Ui8Fw0.mjs';
|
|
5
5
|
import * as z from 'zod';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'chalk';
|
package/dist/{registerKillSessionHandler-CLREXN11.cjs → registerKillSessionHandler-BkzQulD9.cjs}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('./index-BOqJ9hwi.cjs');
|
|
4
|
+
var api = require('./api-B8v4tczT.cjs');
|
|
4
5
|
var crypto = require('crypto');
|
|
5
6
|
require('axios');
|
|
6
7
|
require('node:events');
|
|
@@ -19,7 +20,7 @@ class MessageBuffer {
|
|
|
19
20
|
const message = {
|
|
20
21
|
id: `msg-${this.nextId++}`,
|
|
21
22
|
timestamp: /* @__PURE__ */ new Date(),
|
|
22
|
-
content,
|
|
23
|
+
content: index.formatDisplayMessage(content),
|
|
23
24
|
type
|
|
24
25
|
};
|
|
25
26
|
this.messages.push(message);
|
|
@@ -30,19 +31,20 @@ class MessageBuffer {
|
|
|
30
31
|
* Useful for streaming responses where deltas should accumulate in one message
|
|
31
32
|
*/
|
|
32
33
|
updateLastMessage(contentDelta, type = "assistant") {
|
|
34
|
+
const normalizedDelta = index.formatDisplayMessage(contentDelta);
|
|
33
35
|
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
34
36
|
if (this.messages[i].type === type) {
|
|
35
37
|
const oldMessage = this.messages[i];
|
|
36
38
|
const updatedMessage = {
|
|
37
39
|
...oldMessage,
|
|
38
|
-
content: oldMessage.content +
|
|
40
|
+
content: oldMessage.content + normalizedDelta
|
|
39
41
|
};
|
|
40
42
|
this.messages[i] = updatedMessage;
|
|
41
43
|
this.notifyListeners();
|
|
42
44
|
return;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
|
-
this.addMessage(
|
|
47
|
+
this.addMessage(normalizedDelta, type);
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
50
|
* Remove the last message of a specific type
|
package/dist/{registerKillSessionHandler-C2-yHm1V.mjs → registerKillSessionHandler-BtSK7IOa.mjs}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as formatDisplayMessage } from './index-BByhFIIq.mjs';
|
|
2
|
+
import { l as logger } from './api-B5Ui8Fw0.mjs';
|
|
2
3
|
import { createHash } from 'crypto';
|
|
3
4
|
import 'axios';
|
|
4
5
|
import 'node:events';
|
|
@@ -17,7 +18,7 @@ class MessageBuffer {
|
|
|
17
18
|
const message = {
|
|
18
19
|
id: `msg-${this.nextId++}`,
|
|
19
20
|
timestamp: /* @__PURE__ */ new Date(),
|
|
20
|
-
content,
|
|
21
|
+
content: formatDisplayMessage(content),
|
|
21
22
|
type
|
|
22
23
|
};
|
|
23
24
|
this.messages.push(message);
|
|
@@ -28,19 +29,20 @@ class MessageBuffer {
|
|
|
28
29
|
* Useful for streaming responses where deltas should accumulate in one message
|
|
29
30
|
*/
|
|
30
31
|
updateLastMessage(contentDelta, type = "assistant") {
|
|
32
|
+
const normalizedDelta = formatDisplayMessage(contentDelta);
|
|
31
33
|
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
32
34
|
if (this.messages[i].type === type) {
|
|
33
35
|
const oldMessage = this.messages[i];
|
|
34
36
|
const updatedMessage = {
|
|
35
37
|
...oldMessage,
|
|
36
|
-
content: oldMessage.content +
|
|
38
|
+
content: oldMessage.content + normalizedDelta
|
|
37
39
|
};
|
|
38
40
|
this.messages[i] = updatedMessage;
|
|
39
41
|
this.notifyListeners();
|
|
40
42
|
return;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
this.addMessage(
|
|
45
|
+
this.addMessage(normalizedDelta, type);
|
|
44
46
|
}
|
|
45
47
|
/**
|
|
46
48
|
* Remove the last message of a specific type
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
4
|
var node_crypto = require('node:crypto');
|
|
5
|
-
var api = require('./api-
|
|
6
|
-
var index = require('./index-
|
|
5
|
+
var api = require('./api-B8v4tczT.cjs');
|
|
6
|
+
var index = require('./index-BOqJ9hwi.cjs');
|
|
7
7
|
var future = require('./future-Dq4Ha1Dn.cjs');
|
|
8
8
|
var types = require('./types-DVk3crez.cjs');
|
|
9
9
|
var path = require('node:path');
|
|
10
10
|
var promises = require('node:fs/promises');
|
|
11
11
|
var fs = require('fs/promises');
|
|
12
12
|
var ink = require('ink');
|
|
13
|
-
var registerKillSessionHandler = require('./registerKillSessionHandler-
|
|
13
|
+
var registerKillSessionHandler = require('./registerKillSessionHandler-BkzQulD9.cjs');
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var node_child_process = require('node:child_process');
|
|
16
16
|
var node_readline = require('node:readline');
|
|
@@ -23,7 +23,7 @@ require('tweetnacl');
|
|
|
23
23
|
require('expo-server-sdk');
|
|
24
24
|
require('chalk');
|
|
25
25
|
var node_util = require('node:util');
|
|
26
|
-
var persistence = require('./persistence-
|
|
26
|
+
var persistence = require('./persistence-C33AMdtv.cjs');
|
|
27
27
|
var node_http = require('node:http');
|
|
28
28
|
require('fs');
|
|
29
29
|
require('zod');
|
|
@@ -750,7 +750,7 @@ class AbortError extends Error {
|
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('runClaude-
|
|
753
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('runClaude-CNVufgZb.cjs', document.baseURI).href)));
|
|
754
754
|
const __dirname$1 = path.join(__filename$1, "..");
|
|
755
755
|
function getGlobalClaudeVersion() {
|
|
756
756
|
try {
|
|
@@ -2985,7 +2985,15 @@ async function runClaude(credentials, options = {}) {
|
|
|
2985
2985
|
lifecycleStateSince: Date.now(),
|
|
2986
2986
|
flavor: "claude"
|
|
2987
2987
|
};
|
|
2988
|
-
|
|
2988
|
+
let response = null;
|
|
2989
|
+
try {
|
|
2990
|
+
response = await api$1.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
2991
|
+
} catch (error) {
|
|
2992
|
+
if (!api.isAuthenticationRequiredError(error)) {
|
|
2993
|
+
throw error;
|
|
2994
|
+
}
|
|
2995
|
+
api.logger.debug("[START] Falling back to local/offline mode after authentication failure");
|
|
2996
|
+
}
|
|
2989
2997
|
if (!response) {
|
|
2990
2998
|
let offlineSessionId = null;
|
|
2991
2999
|
const reconnection = api.startOfflineReconnection({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import os, { homedir } from 'node:os';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
|
-
import { l as logger, d as backoff, f as delay, g as AsyncLock, c as configuration, b as connectionState, A as ApiClient, p as packageJson, s as startOfflineReconnection } from './api-
|
|
4
|
-
import {
|
|
3
|
+
import { l as logger, d as backoff, f as delay, g as AsyncLock, c as configuration, b as connectionState, A as ApiClient, p as packageJson, i as isAuthenticationRequiredError, s as startOfflineReconnection } from './api-B5Ui8Fw0.mjs';
|
|
4
|
+
import { e as getProjectPath, h as claudeLocal, E as ExitCodeError, j as isBun, k as trimIdent, l as claudeCheckSession, p as projectPath, m as getEnvironmentInfo, i as initialMachineMetadata, b as stopCaffeinate, n as notifyDaemonSessionStarted, o as startCaffeinate } from './index-BByhFIIq.mjs';
|
|
5
5
|
import { F as Future } from './future-xRdLl3vf.mjs';
|
|
6
6
|
import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
7
7
|
import { join, resolve } from 'node:path';
|
|
8
8
|
import { readFile } from 'node:fs/promises';
|
|
9
9
|
import { watch, access } from 'fs/promises';
|
|
10
10
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
11
|
-
import { a as MessageBuffer, M as MessageQueue2, h as hashObject, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
11
|
+
import { a as MessageBuffer, M as MessageQueue2, h as hashObject, r as registerKillSessionHandler } from './registerKillSessionHandler-BtSK7IOa.mjs';
|
|
12
12
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
13
13
|
import { execSync, spawn } from 'node:child_process';
|
|
14
14
|
import { createInterface } from 'node:readline';
|
|
@@ -21,7 +21,7 @@ import 'tweetnacl';
|
|
|
21
21
|
import 'expo-server-sdk';
|
|
22
22
|
import 'chalk';
|
|
23
23
|
import { isDeepStrictEqual } from 'node:util';
|
|
24
|
-
import { readSettings } from './persistence-
|
|
24
|
+
import { readSettings } from './persistence-CzpZpiL3.mjs';
|
|
25
25
|
import { createServer } from 'node:http';
|
|
26
26
|
import 'fs';
|
|
27
27
|
import 'zod';
|
|
@@ -2982,7 +2982,15 @@ async function runClaude(credentials, options = {}) {
|
|
|
2982
2982
|
lifecycleStateSince: Date.now(),
|
|
2983
2983
|
flavor: "claude"
|
|
2984
2984
|
};
|
|
2985
|
-
|
|
2985
|
+
let response = null;
|
|
2986
|
+
try {
|
|
2987
|
+
response = await api.getOrCreateSession({ tag: sessionTag, metadata, state });
|
|
2988
|
+
} catch (error) {
|
|
2989
|
+
if (!isAuthenticationRequiredError(error)) {
|
|
2990
|
+
throw error;
|
|
2991
|
+
}
|
|
2992
|
+
logger.debug("[START] Falling back to local/offline mode after authentication failure");
|
|
2993
|
+
}
|
|
2986
2994
|
if (!response) {
|
|
2987
2995
|
let offlineSessionId = null;
|
|
2988
2996
|
const reconnection = startOfflineReconnection({
|