first-tree-staging 0.5.2-staging.24.1 → 0.5.2-staging.26.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/cli/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as cliFetch, f as channelConfig, l as print, n as bindFeishuUser, o as CLI_USER_AGENT, r as documentContextSchema, s as COMMAND_VERSION, t as bindFeishuBot, u as setJsonMode } from "../feishu-DmpOdXci.mjs";
|
|
3
|
-
import { $ as agentConfigSchema, A as installClientService, C as checkClientConfig, D as printResults, E as checkWebSocket, F as startClientService, G as loadCredentials, I as stopClientService, J as saveAgentConfig, M as isServiceUnitDriftDetected, O as reconcileAgentConfigs, P as restartClientService, Q as removeLocalAgent, R as ClientRuntime, S as checkBackgroundService, T as checkServerReachable, U as ensureFreshAccessToken, W as ensureFreshAdminToken, X as findStaleAliases, Y as saveCredentials, Z as formatStaleReason, _t as buildMessageDocumentSnapshots, a as declineUpdate, at as initConfig, b as migrateLocalAgentDirs, bt as applyClientLoggerConfig, c as detectInstallMode, ct as resetConfig, d as reconcileLocalRuntimeProviders, dt as setConfigValue, et as clientConfigSchema, f as uploadClientCapabilities, ft as ClientOrgMismatchError, gt as SessionRegistry, h as promptMissingFields, ht as SdkError, i as createExecuteUpdate, it as getConfigValue, j as isServiceSupported, k as getClientServiceStatus, l as fetchLatestVersion, lt as resetConfigMeta, m as promptAddAgent, mt as FirstTreeHubSDK, n as decodeJwtPayload, nt as defaultDataDir, o as promptUpdate, ot as loadAgents, pt as ClientUserMismatchError, q as resolveServerUrl, r as deriveHubUrlFromToken, rt as defaultHome, s as PACKAGE_NAME, st as readConfigFile, t as HubUrlDerivationError, tt as defaultConfigDir, u as installGlobalLatest, ut as resolveConfigReadonly, vt as cleanWorkspaces, w as checkNodeVersion, x as checkAgentConfigs, xt as configureClientLoggerForService, y as createApiNameResolver, yt as probeCapabilities, z as handleClientOrgMismatch } from "../connect-token-
|
|
3
|
+
import { $ as agentConfigSchema, A as installClientService, C as checkClientConfig, D as printResults, E as checkWebSocket, F as startClientService, G as loadCredentials, I as stopClientService, J as saveAgentConfig, M as isServiceUnitDriftDetected, O as reconcileAgentConfigs, P as restartClientService, Q as removeLocalAgent, R as ClientRuntime, S as checkBackgroundService, T as checkServerReachable, U as ensureFreshAccessToken, W as ensureFreshAdminToken, X as findStaleAliases, Y as saveCredentials, Z as formatStaleReason, _t as buildMessageDocumentSnapshots, a as declineUpdate, at as initConfig, b as migrateLocalAgentDirs, bt as applyClientLoggerConfig, c as detectInstallMode, ct as resetConfig, d as reconcileLocalRuntimeProviders, dt as setConfigValue, et as clientConfigSchema, f as uploadClientCapabilities, ft as ClientOrgMismatchError, gt as SessionRegistry, h as promptMissingFields, ht as SdkError, i as createExecuteUpdate, it as getConfigValue, j as isServiceSupported, k as getClientServiceStatus, l as fetchLatestVersion, lt as resetConfigMeta, m as promptAddAgent, mt as FirstTreeHubSDK, n as decodeJwtPayload, nt as defaultDataDir, o as promptUpdate, ot as loadAgents, pt as ClientUserMismatchError, q as resolveServerUrl, r as deriveHubUrlFromToken, rt as defaultHome, s as PACKAGE_NAME, st as readConfigFile, t as HubUrlDerivationError, tt as defaultConfigDir, u as installGlobalLatest, ut as resolveConfigReadonly, vt as cleanWorkspaces, w as checkNodeVersion, x as checkAgentConfigs, xt as configureClientLoggerForService, y as createApiNameResolver, yt as probeCapabilities, z as handleClientOrgMismatch } from "../connect-token-18Jcc1BV.mjs";
|
|
4
4
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { homedir, tmpdir } from "node:os";
|
|
6
6
|
import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -9903,6 +9903,19 @@ const createClaudeCodeHandler = (config) => {
|
|
|
9903
9903
|
}
|
|
9904
9904
|
if (retryCount >= MAX_RETRIES || !claudeSessionId) {
|
|
9905
9905
|
sessionCtx.log("Exhausted retries, session will be suspended");
|
|
9906
|
+
const preview = errMsg.slice(0, 800);
|
|
9907
|
+
const reason = claudeSessionId ? `Query failed after ${MAX_RETRIES} retries: ${preview}` : `Query failed and no resume id available: ${preview}`;
|
|
9908
|
+
sessionCtx.emitEvent({
|
|
9909
|
+
kind: "error",
|
|
9910
|
+
payload: {
|
|
9911
|
+
source: "runtime",
|
|
9912
|
+
message: reason
|
|
9913
|
+
}
|
|
9914
|
+
});
|
|
9915
|
+
sessionCtx.emitEvent({
|
|
9916
|
+
kind: "turn_end",
|
|
9917
|
+
payload: { status: "error" }
|
|
9918
|
+
});
|
|
9906
9919
|
sessionCtx.setRuntimeState("error");
|
|
9907
9920
|
return;
|
|
9908
9921
|
}
|
|
@@ -9912,7 +9925,19 @@ const createClaudeCodeHandler = (config) => {
|
|
|
9912
9925
|
try {
|
|
9913
9926
|
respawnQuery(claudeSessionId, sessionCtx);
|
|
9914
9927
|
} catch (resumeErr) {
|
|
9915
|
-
|
|
9928
|
+
const resumeMsg = resumeErr instanceof Error ? resumeErr.message : String(resumeErr);
|
|
9929
|
+
sessionCtx.log(`Auto-resume failed: ${resumeMsg}`);
|
|
9930
|
+
sessionCtx.emitEvent({
|
|
9931
|
+
kind: "error",
|
|
9932
|
+
payload: {
|
|
9933
|
+
source: "runtime",
|
|
9934
|
+
message: `Auto-resume failed: ${resumeMsg.slice(0, 800)}`
|
|
9935
|
+
}
|
|
9936
|
+
});
|
|
9937
|
+
sessionCtx.emitEvent({
|
|
9938
|
+
kind: "turn_end",
|
|
9939
|
+
payload: { status: "error" }
|
|
9940
|
+
});
|
|
9916
9941
|
sessionCtx.setRuntimeState("error");
|
|
9917
9942
|
return;
|
|
9918
9943
|
}
|
|
@@ -11814,16 +11839,14 @@ var SessionManager = class {
|
|
|
11814
11839
|
phase
|
|
11815
11840
|
}, "session start/resume failed");
|
|
11816
11841
|
this.notifySessionState(chatId, "errored");
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
}, "session error forward failed");
|
|
11826
|
-
}
|
|
11842
|
+
const preview = errMsg.slice(0, 800);
|
|
11843
|
+
ctx.emitEvent({
|
|
11844
|
+
kind: "error",
|
|
11845
|
+
payload: {
|
|
11846
|
+
source: "runtime",
|
|
11847
|
+
message: `Session ${phase} failed: ${preview}`
|
|
11848
|
+
}
|
|
11849
|
+
});
|
|
11827
11850
|
this.sessions.delete(chatId);
|
|
11828
11851
|
this.sessionRuntimeStates.delete(chatId);
|
|
11829
11852
|
this.recomputeRuntimeState();
|
|
@@ -11861,16 +11884,14 @@ var SessionManager = class {
|
|
|
11861
11884
|
err
|
|
11862
11885
|
}, "resume failed");
|
|
11863
11886
|
this.notifySessionState(entry.chatId, "errored");
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
}, "session error forward failed");
|
|
11873
|
-
}
|
|
11887
|
+
const preview = errMsg.slice(0, 800);
|
|
11888
|
+
ctx.emitEvent({
|
|
11889
|
+
kind: "error",
|
|
11890
|
+
payload: {
|
|
11891
|
+
source: "runtime",
|
|
11892
|
+
message: `Session resume failed: ${preview}`
|
|
11893
|
+
}
|
|
11894
|
+
});
|
|
11874
11895
|
this.sessions.delete(entry.chatId);
|
|
11875
11896
|
this.sessionRuntimeStates.delete(entry.chatId);
|
|
11876
11897
|
this.recomputeRuntimeState();
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { c as blank, d as status, n as bindFeishuUser, t as bindFeishuBot } from "./feishu-DmpOdXci.mjs";
|
|
2
|
-
import { A as installClientService, B as rotateClientIdWithBackup, C as checkClientConfig, D as printResults, E as checkWebSocket, F as startClientService, H as AuthRefreshRateLimitedError, I as stopClientService, K as resolveAccessToken, L as uninstallClientService, N as resolveCliInvocation, P as restartClientService, R as ClientRuntime, T as checkServerReachable, U as ensureFreshAccessToken, V as AuthRefreshFailedError, W as ensureFreshAdminToken, _ as onboardCheck, g as formatCheckReport, h as promptMissingFields, ht as SdkError, j as isServiceSupported, k as getClientServiceStatus, m as promptAddAgent, mt as FirstTreeHubSDK, p as isInteractive, q as resolveServerUrl, r as deriveHubUrlFromToken, t as HubUrlDerivationError, v as onboardCreate, w as checkNodeVersion, x as checkAgentConfigs, z as handleClientOrgMismatch } from "./connect-token-
|
|
2
|
+
import { A as installClientService, B as rotateClientIdWithBackup, C as checkClientConfig, D as printResults, E as checkWebSocket, F as startClientService, H as AuthRefreshRateLimitedError, I as stopClientService, K as resolveAccessToken, L as uninstallClientService, N as resolveCliInvocation, P as restartClientService, R as ClientRuntime, T as checkServerReachable, U as ensureFreshAccessToken, V as AuthRefreshFailedError, W as ensureFreshAdminToken, _ as onboardCheck, g as formatCheckReport, h as promptMissingFields, ht as SdkError, j as isServiceSupported, k as getClientServiceStatus, m as promptAddAgent, mt as FirstTreeHubSDK, p as isInteractive, q as resolveServerUrl, r as deriveHubUrlFromToken, t as HubUrlDerivationError, v as onboardCreate, w as checkNodeVersion, x as checkAgentConfigs, z as handleClientOrgMismatch } from "./connect-token-18Jcc1BV.mjs";
|
|
3
3
|
export { AuthRefreshFailedError, AuthRefreshRateLimitedError, ClientRuntime, FirstTreeHubSDK, HubUrlDerivationError, SdkError, bindFeishuBot, bindFeishuUser, blank, checkAgentConfigs, checkClientConfig, checkNodeVersion, checkServerReachable, checkWebSocket, deriveHubUrlFromToken, ensureFreshAccessToken, ensureFreshAdminToken, formatCheckReport, getClientServiceStatus, handleClientOrgMismatch, installClientService, isInteractive, isServiceSupported, onboardCheck, onboardCreate, printResults, promptAddAgent, promptMissingFields, resolveAccessToken, resolveCliInvocation, resolveServerUrl, restartClientService, rotateClientIdWithBackup, startClientService, status, stopClientService, uninstallClientService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "first-tree-staging",
|
|
3
|
-
"version": "0.5.2-staging.
|
|
3
|
+
"version": "0.5.2-staging.26.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "First Tree — unified CLI for Context Tree onboarding, GitHub Scan automation, agent management, and Hub messaging. (Source-tree dev build; CI rewrites `name` and `bin` for prod / staging publishes — see docs/local-dev-isolation.md.)",
|
|
6
6
|
"keywords": [
|