@clawos-dev/clawd 0.2.67 → 0.2.68
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.cjs +21 -5
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -4470,7 +4470,7 @@ var init_persona_schemas = __esm({
|
|
|
4470
4470
|
});
|
|
4471
4471
|
|
|
4472
4472
|
// ../protocol/src/schemas.ts
|
|
4473
|
-
var SessionStatusSchema, UsageSchema, ContextUsageSchema, sessionMetaShape, SessionMetaSchema, ModelInfoSchema, ModeInfoSchema, ConfigFieldSchemaSchema, CapabilitiesGetArgs, CapabilitiesResponseSchema, AllowRuleSchema, SessionFileSchema, ParsedEventBase, HistoryUserMetaSchema, SubagentToolStatsSchema, StructuredPatchHunkSchema, ToolResultExtraSchema, MemoryEntrySchema, AskQuestionOptionSchema, AskQuestionItemSchema, ParsedEventSchema, SessionCreateArgs, SessionIdArgs, SessionUpdateArgs, SessionSendArgs, SessionRewindArgs, SessionRewindResponseSchema, SessionRewindDiffArgs, RewindDiffHunkSchema, RewindDiffFileSchema, SessionRewindDiffResponseSchema, SessionRewindableMessageIdsArgs, SessionRewindableMessageIdsResponseSchema, SessionResumeArgs, SessionForkArgs, SessionForkResponseSchema, SessionObserveArgs, SessionEventsArgs, PermissionRespondArgs, HistoryListArgs, HistoryReadArgs, HistorySubagentsArgs, HistorySubagentReadArgs, WorkspaceListArgs, WorkspaceReadArgs, SkillsListArgs, SkillEntrySchema, AgentEntrySchema, AgentsListArgs, AgentsListResponseSchema, SessionSubscribeArgs, SessionPinArgs, SessionReorderPinsArgs, GitRootArgs, GitRootResponseSchema, GitBranchArgs, GitBranchResponseSchema, GitBranchesArgs, GitBranchesResponseSchema, HistoryRecentDirsArgs, RecentDirEntrySchema, HistoryRecentDirsResponseSchema, SessionQuestionFrameSchema, SessionQuestionClearedFrameSchema, AnswerQuestionArgs, AnswerQuestionResponseSchema, CancelQuestionArgs, CancelQuestionResponseSchema, AuthRequestFrameSchema, AuthOkFrameSchema, TunnelExitedEventSchema, InfoRunningSessionSchema, InfoResponseSchema;
|
|
4473
|
+
var SessionStatusSchema, UsageSchema, ContextUsageSchema, sessionMetaShape, SessionMetaSchema, ModelInfoSchema, ModeInfoSchema, ConfigFieldSchemaSchema, CapabilitiesGetArgs, CapabilitiesResponseSchema, AllowRuleSchema, SessionFileSchema, ParsedEventBase, HistoryUserMetaSchema, SubagentToolStatsSchema, StructuredPatchHunkSchema, ToolResultExtraSchema, MemoryEntrySchema, AskQuestionOptionSchema, AskQuestionItemSchema, ParsedEventSchema, SessionCreateArgs, SessionIdArgs, SessionUpdateArgs, SessionSendArgs, SessionRewindArgs, SessionRewindResponseSchema, SessionRewindDiffArgs, RewindDiffHunkSchema, RewindDiffFileSchema, SessionRewindDiffResponseSchema, SessionRewindableMessageIdsArgs, SessionRewindableMessageIdsResponseSchema, SessionResumeArgs, SessionForkArgs, SessionForkResponseSchema, SessionObserveArgs, SessionEventsArgs, PermissionRespondArgs, HistoryListArgs, HistoryReadArgs, HistorySubagentsArgs, HistorySubagentReadArgs, WorkspaceListArgs, WorkspaceReadArgs, SkillsListArgs, SkillEntrySchema, AgentEntrySchema, AgentsListArgs, AgentsListResponseSchema, SessionSubscribeArgs, SessionPinArgs, SessionReorderPinsArgs, GitRootArgs, GitRootResponseSchema, GitBranchArgs, GitBranchResponseSchema, GitBranchesArgs, GitBranchesResponseSchema, HistoryRecentDirsArgs, RecentDirEntrySchema, HistoryRecentDirsResponseSchema, SessionQuestionFrameSchema, SessionQuestionClearedFrameSchema, AnswerQuestionArgs, AnswerQuestionResponseSchema, CancelQuestionArgs, CancelQuestionResponseSchema, AuthRequestFrameSchema, AuthOkFrameSchema, TunnelExitedEventSchema, TunnelUnavailableEventSchema, InfoRunningSessionSchema, InfoResponseSchema;
|
|
4474
4474
|
var init_schemas = __esm({
|
|
4475
4475
|
"../protocol/src/schemas.ts"() {
|
|
4476
4476
|
"use strict";
|
|
@@ -4994,6 +4994,11 @@ var init_schemas = __esm({
|
|
|
4994
4994
|
subdomain: external_exports.string().nullable(),
|
|
4995
4995
|
url: external_exports.string().nullable()
|
|
4996
4996
|
});
|
|
4997
|
+
TunnelUnavailableEventSchema = external_exports.object({
|
|
4998
|
+
type: external_exports.literal("tunnel:unavailable"),
|
|
4999
|
+
reason: external_exports.string().min(1),
|
|
5000
|
+
failedAt: external_exports.string().min(1)
|
|
5001
|
+
});
|
|
4997
5002
|
InfoRunningSessionSchema = external_exports.object({
|
|
4998
5003
|
sessionId: external_exports.string().min(1),
|
|
4999
5004
|
status: SessionStatusSchema,
|
|
@@ -28067,7 +28072,7 @@ async function startDaemon(config) {
|
|
|
28067
28072
|
});
|
|
28068
28073
|
try {
|
|
28069
28074
|
const r = await tunnelMgr.start({ localPort: config.port });
|
|
28070
|
-
stateSnapshot = { ...stateSnapshot, tunnelUrl: r.url };
|
|
28075
|
+
stateSnapshot = { ...stateSnapshot, tunnelUrl: r.url, tunnelError: void 0 };
|
|
28071
28076
|
stateMgr.write(stateSnapshot);
|
|
28072
28077
|
currentTunnelUrl = r.url;
|
|
28073
28078
|
const connectUrl = resolvedAuthToken ? `${r.url}#token=${resolvedAuthToken}` : r.url;
|
|
@@ -28093,14 +28098,25 @@ ${bar}
|
|
|
28093
28098
|
} catch {
|
|
28094
28099
|
}
|
|
28095
28100
|
} catch (err) {
|
|
28101
|
+
const tunnelError = err?.message ?? String(err);
|
|
28096
28102
|
try {
|
|
28097
28103
|
await tunnelMgr.stop();
|
|
28098
28104
|
} catch {
|
|
28099
28105
|
}
|
|
28100
28106
|
tunnelMgr = null;
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
|
|
28107
|
+
stateSnapshot = { ...stateSnapshot, tunnelUrl: void 0, tunnelError };
|
|
28108
|
+
try {
|
|
28109
|
+
stateMgr.write(stateSnapshot);
|
|
28110
|
+
} catch {
|
|
28111
|
+
}
|
|
28112
|
+
wss.broadcastAll({
|
|
28113
|
+
type: "tunnel:unavailable",
|
|
28114
|
+
reason: tunnelError,
|
|
28115
|
+
failedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
28116
|
+
});
|
|
28117
|
+
process.stdout.write(`Tunnel: unavailable (local mode) \u2014 ${tunnelError}
|
|
28118
|
+
`);
|
|
28119
|
+
logger.warn("tunnel unavailable, degraded to local mode", { reason: tunnelError });
|
|
28104
28120
|
}
|
|
28105
28121
|
}
|
|
28106
28122
|
const shutdown = async () => {
|