first-tree-staging 0.5.2-staging.31.1 → 0.5.2-staging.32.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-DirO-XHk.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-CELrKY8z.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";
|
|
@@ -9904,19 +9904,23 @@ const createClaudeCodeHandler = (config) => {
|
|
|
9904
9904
|
}
|
|
9905
9905
|
if (retryCount >= MAX_RETRIES || !claudeSessionId) {
|
|
9906
9906
|
sessionCtx.log("Exhausted retries, session will be suspended");
|
|
9907
|
-
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9907
|
+
try {
|
|
9908
|
+
const preview = errMsg.slice(0, 800);
|
|
9909
|
+
const reason = claudeSessionId ? `Query failed after ${MAX_RETRIES} retries: ${preview}` : `Query failed and no resume id available: ${preview}`;
|
|
9910
|
+
sessionCtx.emitEvent({
|
|
9911
|
+
kind: "error",
|
|
9912
|
+
payload: {
|
|
9913
|
+
source: "runtime",
|
|
9914
|
+
message: reason
|
|
9915
|
+
}
|
|
9916
|
+
});
|
|
9917
|
+
sessionCtx.emitEvent({
|
|
9918
|
+
kind: "turn_end",
|
|
9919
|
+
payload: { status: "error" }
|
|
9920
|
+
});
|
|
9921
|
+
} catch (emitErr) {
|
|
9922
|
+
sessionCtx.log(`Failed to emit retry-exhaustion error event: ${emitErr instanceof Error ? emitErr.message : String(emitErr)}`);
|
|
9923
|
+
}
|
|
9920
9924
|
sessionCtx.setRuntimeState("error");
|
|
9921
9925
|
return;
|
|
9922
9926
|
}
|
|
@@ -9928,17 +9932,21 @@ const createClaudeCodeHandler = (config) => {
|
|
|
9928
9932
|
} catch (resumeErr) {
|
|
9929
9933
|
const resumeMsg = resumeErr instanceof Error ? resumeErr.message : String(resumeErr);
|
|
9930
9934
|
sessionCtx.log(`Auto-resume failed: ${resumeMsg}`);
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9935
|
+
try {
|
|
9936
|
+
sessionCtx.emitEvent({
|
|
9937
|
+
kind: "error",
|
|
9938
|
+
payload: {
|
|
9939
|
+
source: "runtime",
|
|
9940
|
+
message: `Auto-resume failed: ${resumeMsg.slice(0, 800)}`
|
|
9941
|
+
}
|
|
9942
|
+
});
|
|
9943
|
+
sessionCtx.emitEvent({
|
|
9944
|
+
kind: "turn_end",
|
|
9945
|
+
payload: { status: "error" }
|
|
9946
|
+
});
|
|
9947
|
+
} catch (emitErr) {
|
|
9948
|
+
sessionCtx.log(`Failed to emit auto-resume error event: ${emitErr instanceof Error ? emitErr.message : String(emitErr)}`);
|
|
9949
|
+
}
|
|
9942
9950
|
sessionCtx.setRuntimeState("error");
|
|
9943
9951
|
return;
|
|
9944
9952
|
}
|
|
@@ -11840,14 +11848,21 @@ var SessionManager = class {
|
|
|
11840
11848
|
phase
|
|
11841
11849
|
}, "session start/resume failed");
|
|
11842
11850
|
this.notifySessionState(chatId, "errored");
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
+
try {
|
|
11852
|
+
const preview = errMsg.slice(0, 800);
|
|
11853
|
+
ctx.emitEvent({
|
|
11854
|
+
kind: "error",
|
|
11855
|
+
payload: {
|
|
11856
|
+
source: "runtime",
|
|
11857
|
+
message: `Session ${phase} failed: ${preview}`
|
|
11858
|
+
}
|
|
11859
|
+
});
|
|
11860
|
+
} catch (emitErr) {
|
|
11861
|
+
this.config.log.warn({
|
|
11862
|
+
chatId,
|
|
11863
|
+
emitErr
|
|
11864
|
+
}, "session error event emit failed");
|
|
11865
|
+
}
|
|
11851
11866
|
this.sessions.delete(chatId);
|
|
11852
11867
|
this.sessionRuntimeStates.delete(chatId);
|
|
11853
11868
|
this.recomputeRuntimeState();
|
|
@@ -11885,14 +11900,21 @@ var SessionManager = class {
|
|
|
11885
11900
|
err
|
|
11886
11901
|
}, "resume failed");
|
|
11887
11902
|
this.notifySessionState(entry.chatId, "errored");
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11903
|
+
try {
|
|
11904
|
+
const preview = errMsg.slice(0, 800);
|
|
11905
|
+
ctx.emitEvent({
|
|
11906
|
+
kind: "error",
|
|
11907
|
+
payload: {
|
|
11908
|
+
source: "runtime",
|
|
11909
|
+
message: `Session resume failed: ${preview}`
|
|
11910
|
+
}
|
|
11911
|
+
});
|
|
11912
|
+
} catch (emitErr) {
|
|
11913
|
+
this.config.log.warn({
|
|
11914
|
+
chatId: entry.chatId,
|
|
11915
|
+
emitErr
|
|
11916
|
+
}, "session error event emit failed");
|
|
11917
|
+
}
|
|
11896
11918
|
this.sessions.delete(entry.chatId);
|
|
11897
11919
|
this.sessionRuntimeStates.delete(entry.chatId);
|
|
11898
11920
|
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-DirO-XHk.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-CELrKY8z.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.32.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": [
|