@ganglion/xacpx 0.8.3 → 0.9.0

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.
Files changed (75) hide show
  1. package/README.md +2 -0
  2. package/dist/bridge/bridge-main.js +2178 -4
  3. package/dist/channels/types.d.ts +7 -0
  4. package/dist/cli.js +4313 -2011
  5. package/dist/commands/handlers/agent-handler.d.ts +1 -1
  6. package/dist/commands/handlers/config-handler.d.ts +1 -1
  7. package/dist/commands/handlers/later-handler.d.ts +2 -11
  8. package/dist/commands/handlers/orchestration-handler.d.ts +1 -1
  9. package/dist/commands/handlers/permission-handler.d.ts +3 -3
  10. package/dist/commands/handlers/session-handler.d.ts +6 -6
  11. package/dist/commands/handlers/workspace-handler.d.ts +1 -1
  12. package/dist/commands/help/help-registry.d.ts +0 -1
  13. package/dist/config/types.d.ts +2 -0
  14. package/dist/i18n/index.d.ts +8 -0
  15. package/dist/i18n/messages/en/acpx-note.d.ts +2 -0
  16. package/dist/i18n/messages/en/agent.d.ts +2 -0
  17. package/dist/i18n/messages/en/channel-cli.d.ts +2 -0
  18. package/dist/i18n/messages/en/cli-update.d.ts +2 -0
  19. package/dist/i18n/messages/en/cli.d.ts +2 -0
  20. package/dist/i18n/messages/en/common.d.ts +2 -0
  21. package/dist/i18n/messages/en/config.d.ts +2 -0
  22. package/dist/i18n/messages/en/coordinator-prompt.d.ts +2 -0
  23. package/dist/i18n/messages/en/help.d.ts +2 -0
  24. package/dist/i18n/messages/en/hints.d.ts +2 -0
  25. package/dist/i18n/messages/en/index.d.ts +2 -0
  26. package/dist/i18n/messages/en/later.d.ts +2 -0
  27. package/dist/i18n/messages/en/login.d.ts +2 -0
  28. package/dist/i18n/messages/en/migrate.d.ts +2 -0
  29. package/dist/i18n/messages/en/misc.d.ts +2 -0
  30. package/dist/i18n/messages/en/native-session.d.ts +2 -0
  31. package/dist/i18n/messages/en/orchestration.d.ts +2 -0
  32. package/dist/i18n/messages/en/permission.d.ts +2 -0
  33. package/dist/i18n/messages/en/plugin-cli.d.ts +2 -0
  34. package/dist/i18n/messages/en/recovery.d.ts +2 -0
  35. package/dist/i18n/messages/en/render.d.ts +2 -0
  36. package/dist/i18n/messages/en/router.d.ts +2 -0
  37. package/dist/i18n/messages/en/scheduled-render.d.ts +2 -0
  38. package/dist/i18n/messages/en/session.d.ts +2 -0
  39. package/dist/i18n/messages/en/shortcut.d.ts +2 -0
  40. package/dist/i18n/messages/en/weixin.d.ts +2 -0
  41. package/dist/i18n/messages/en/worker-prompt.d.ts +2 -0
  42. package/dist/i18n/messages/en/workspace.d.ts +2 -0
  43. package/dist/i18n/messages/zh/acpx-note.d.ts +2 -0
  44. package/dist/i18n/messages/zh/agent.d.ts +2 -0
  45. package/dist/i18n/messages/zh/channel-cli.d.ts +2 -0
  46. package/dist/i18n/messages/zh/cli-update.d.ts +2 -0
  47. package/dist/i18n/messages/zh/cli.d.ts +2 -0
  48. package/dist/i18n/messages/zh/common.d.ts +2 -0
  49. package/dist/i18n/messages/zh/config.d.ts +2 -0
  50. package/dist/i18n/messages/zh/coordinator-prompt.d.ts +2 -0
  51. package/dist/i18n/messages/zh/help.d.ts +2 -0
  52. package/dist/i18n/messages/zh/hints.d.ts +2 -0
  53. package/dist/i18n/messages/zh/index.d.ts +2 -0
  54. package/dist/i18n/messages/zh/later.d.ts +2 -0
  55. package/dist/i18n/messages/zh/login.d.ts +2 -0
  56. package/dist/i18n/messages/zh/migrate.d.ts +2 -0
  57. package/dist/i18n/messages/zh/misc.d.ts +2 -0
  58. package/dist/i18n/messages/zh/native-session.d.ts +2 -0
  59. package/dist/i18n/messages/zh/orchestration.d.ts +2 -0
  60. package/dist/i18n/messages/zh/permission.d.ts +2 -0
  61. package/dist/i18n/messages/zh/plugin-cli.d.ts +2 -0
  62. package/dist/i18n/messages/zh/recovery.d.ts +2 -0
  63. package/dist/i18n/messages/zh/render.d.ts +2 -0
  64. package/dist/i18n/messages/zh/router.d.ts +2 -0
  65. package/dist/i18n/messages/zh/scheduled-render.d.ts +2 -0
  66. package/dist/i18n/messages/zh/session.d.ts +2 -0
  67. package/dist/i18n/messages/zh/shortcut.d.ts +2 -0
  68. package/dist/i18n/messages/zh/weixin.d.ts +2 -0
  69. package/dist/i18n/messages/zh/worker-prompt.d.ts +2 -0
  70. package/dist/i18n/messages/zh/workspace.d.ts +2 -0
  71. package/dist/i18n/resolve-locale.d.ts +6 -0
  72. package/dist/i18n/types.d.ts +861 -0
  73. package/dist/plugin-api.d.ts +2 -0
  74. package/dist/plugin-api.js +2180 -8
  75. package/package.json +1 -1
@@ -839,6 +839,2175 @@ function quoteIfNeeded(input) {
839
839
  return `"${escapeForDoubleQuotes(input)}"`;
840
840
  }
841
841
 
842
+ // src/i18n/messages/en/common.ts
843
+ var common;
844
+ var init_common = __esm(() => {
845
+ common = {
846
+ localeName: "English"
847
+ };
848
+ });
849
+
850
+ // src/i18n/messages/en/session.ts
851
+ var session;
852
+ var init_session = __esm(() => {
853
+ session = {
854
+ noCurrent: "No session is currently selected. Run /session new ... or /use <alias> first.",
855
+ noSessions: "No sessions yet.",
856
+ crossChannelHint: "Hint: sessions from other channels were detected. Sessions are isolated per channel — please create or attach one in the current channel.",
857
+ createSessionHint: "Create a session: /ss <agent> -d /path/to/the/project",
858
+ createSessionExample: "Example: /ss claude -d /path/to/the/project",
859
+ sessionListHeader: "Sessions:",
860
+ currentLabel: "[current]",
861
+ sessionListItem: (alias, agent, workspace) => `- ${alias} (${agent} @ ${workspace})`,
862
+ sessionCreated: (alias) => `Session "${alias}" created and switched.`,
863
+ sessionAttachNotFound: (alias, agent, workspace) => [
864
+ "No existing session found to attach.",
865
+ `Check the session name and retry: /session attach ${alias} --agent ${agent} --ws ${workspace} --name <session-name>`
866
+ ].join(`
867
+ `),
868
+ sessionAttached: (alias) => `Session "${alias}" attached and switched.`,
869
+ switched: (alias, agent, workspace) => `Switched to ${alias} · ${agent} · ${workspace}`,
870
+ switchedWithPrev: (alias, agent, workspace, previousAlias) => `Switched to ${alias} · ${agent} · ${workspace} (previous: ${previousAlias})`,
871
+ stillRunning: (alias) => `⏳ ${alias} is still running…`,
872
+ noMatchingSession: (input) => `No session matching "${input}". Send /sessions to see all.`,
873
+ ambiguousSession: (input) => `"${input}" matches multiple sessions, please specify:`,
874
+ noPreviousSession: "No previous session yet. Send /sessions to see all.",
875
+ modeHeader: "Current mode:",
876
+ modeSessionLabel: (alias) => `- Session: ${alias}`,
877
+ modeModeLabel: (modeId) => `- mode: ${modeId}`,
878
+ modeNotSet: "not set",
879
+ modeSet: (modeId) => `Current session mode set to: ${modeId}`,
880
+ replyModeHeader: "Current reply mode:",
881
+ replyModeSessionLabel: (alias) => `- Session: ${alias}`,
882
+ replyModeGlobalDefault: (value) => `- Global default: ${value}`,
883
+ replyModeSessionOverride: (value) => `- Session override: ${value}`,
884
+ replyModeEffective: (value) => `- Effective: ${value}`,
885
+ replyModeSet: (replyMode) => `Current session reply mode set to: ${replyMode}`,
886
+ replyModeReset: (globalDefault) => `Session reply mode reset. Falling back to global default: ${globalDefault}`,
887
+ statusHeader: "Current session:",
888
+ statusNameLabel: (alias) => `- Name: ${alias}`,
889
+ statusAgentLabel: (agent) => `- Agent: ${agent}`,
890
+ statusWorkspaceLabel: (workspace) => `- Workspace: ${workspace}`,
891
+ orchestrationRouteError: "Unable to record session route context. This request has been cancelled.",
892
+ orchestrationRouteRetry: "Please retry later. If the issue persists, check the xacpx runtime log and state.json write permissions.",
893
+ sessionNotFound: (alias) => `Session "${alias}" does not exist.`,
894
+ sessionBlockedByTasks: (alias, count) => `Session "${alias}" has ${count} unfinished task(s). Cancel or wait for them to complete first.`,
895
+ sessionBlockedByTasksHint: "Use /tasks to list tasks, or /task cancel <id> to cancel one.",
896
+ sessionRemoved: (alias) => `Session "${alias}" removed.`,
897
+ sessionRemovedWasActive: "This was the active session. Its chat context has been cleared.",
898
+ sessionTransportShared: (transportSession, count) => `Note: backend session "${transportSession}" is still referenced by ${count} other session(s) and was not closed.`,
899
+ sessionOrchestrationPurgeFailed: (warning) => `Note: failed to purge orchestration references (${warning}). Run /tasks clean manually to clean up.`,
900
+ sessionTransportTeardownFailed: (warning) => `Note: backend session could not be closed automatically (${warning}). Run acpx sessions close manually if needed.`,
901
+ sessionHelpSummary: "Create, reuse, switch, and reset xacpx logical sessions.",
902
+ sessionHelpCmdSsList: "/sessions",
903
+ sessionHelpCmdSsListDesc: "List current sessions",
904
+ sessionHelpCmdSsOrSlash: "/session or /ss",
905
+ sessionHelpCmdSsOrSlashDesc: "List sessions",
906
+ sessionHelpCmdSsQuick: "/ss <agent> (-d <path> | --ws <name>)",
907
+ sessionHelpCmdSsQuickDesc: "Quickly create or reuse a session",
908
+ sessionHelpCmdSsNew: "/ss new <agent> (-d <path> | --ws <name>)",
909
+ sessionHelpCmdSsNewDesc: "Force-create a new session",
910
+ sessionHelpCmdSsNewAlias: "/ss new <alias> -a <name> --ws <name>",
911
+ sessionHelpCmdSsNewAliasDesc: "Create a session with explicit config",
912
+ sessionHelpCmdSsAttach: "/ss attach <alias> -a <name> --ws <name> --name <transport-session>",
913
+ sessionHelpCmdSsAttachDesc: "Attach to an existing session",
914
+ sessionHelpCmdSsn: "/ssn or /help ssn",
915
+ sessionHelpCmdSsnDesc: "Attach to a local native session (Codex and other agent-native sessions)",
916
+ sessionHelpCmdTail: "/session tail [N]",
917
+ sessionHelpCmdTailDesc: "Pull session history output (default 50 lines)",
918
+ sessionHelpCmdRm: "/session rm <alias>",
919
+ sessionHelpCmdRmDesc: "Remove a logical session",
920
+ sessionHelpCmdUse: "/use <alias>",
921
+ sessionHelpCmdUseDesc: "Switch to a session",
922
+ sessionHelpCmdUseFuzzy: "/use <fragment>",
923
+ sessionHelpCmdUseFuzzyDesc: "Switch by alias fragment (exact > prefix > substring; lists candidates on multiple matches)",
924
+ sessionHelpCmdUsePrev: "/use -",
925
+ sessionHelpCmdUsePrevDesc: "Switch back to the previous session (like shell cd -)",
926
+ sessionHelpCmdReset: "/session reset or /clear",
927
+ sessionHelpCmdResetDesc: "Reset the current session context",
928
+ nativeHelpSummary: "Attach to local native sessions of Codex and other agents.",
929
+ nativeHelpCmdSsn: "/ssn",
930
+ nativeHelpCmdSsnDesc: "List local native sessions using the current xacpx session context",
931
+ nativeHelpCmdSsnAgentWs: "/ssn <agent> --ws <workspace>",
932
+ nativeHelpCmdSsnAgentWsDesc: "Query native sessions for a workspace; auto-attach when only one candidate",
933
+ nativeHelpCmdSsnAgentDir: "/ssn <agent> -d <path>",
934
+ nativeHelpCmdSsnAgentDirDesc: "Query by absolute path; auto-attach when only one candidate",
935
+ nativeHelpCmdSsnAgentAll: "/ssn <agent> --ws <workspace> --all",
936
+ nativeHelpCmdSsnAgentAllDesc: "List all native sessions for the agent across working directories",
937
+ nativeHelpCmdSsnNumber: "/ssn 1",
938
+ nativeHelpCmdSsnNumberDesc: "Attach to or switch to the 1st candidate from the last listing",
939
+ nativeHelpCmdSsnNumberAlias: "/ssn 1 -a <alias>",
940
+ nativeHelpCmdSsnNumberAliasDesc: "Attach to the 1st candidate with an explicit xacpx alias (recommended, no full sessionId needed)",
941
+ nativeHelpCmdSsnAttach: "/ssn attach <sessionId> -a <alias>",
942
+ nativeHelpCmdSsnAttachDesc: "Attach by native sessionId (use when you know the full id) and assign an xacpx alias",
943
+ nativeHelpCmdSsnAttachLong: "/ss attach native <sessionId> -a <alias>",
944
+ nativeHelpCmdSsnAttachLongDesc: "Long form of /ssn attach",
945
+ nativeHelpNote1: "/ss manages xacpx logical sessions; /ssn only queries and attaches to agent-native sessions.",
946
+ nativeHelpNote2: "After attaching, subsequent messages continue the same agent-native session rather than cloning a new context.",
947
+ nativeHelpNote3: "If the current acpx or agent does not support native sessions, keep using /ss.",
948
+ nativeHelpNote4: "Full documentation at docs/native-sessions.md.",
949
+ modeHelpSummary: "View or set the mode for the current session.",
950
+ modeHelpCmdShow: "/mode",
951
+ modeHelpCmdShowDesc: "Show the saved mode of the current session",
952
+ modeHelpCmdSet: "/mode <id>",
953
+ modeHelpCmdSetDesc: "Set the current session mode",
954
+ replyModeHelpSummary: "View or set the reply output mode for the current logical session.",
955
+ replyModeHelpCmdShow: "/replymode",
956
+ replyModeHelpCmdShowDesc: "Show global default, current override, and effective value",
957
+ replyModeHelpCmdStream: "/replymode stream",
958
+ replyModeHelpCmdStreamDesc: "Use streaming replies for the current session",
959
+ replyModeHelpCmdVerbose: "/replymode verbose",
960
+ replyModeHelpCmdVerboseDesc: "Streaming replies with tool-call visibility for the current session",
961
+ replyModeHelpCmdFinal: "/replymode final",
962
+ replyModeHelpCmdFinalDesc: "Send only the final text for the current session",
963
+ replyModeHelpCmdReset: "/replymode reset",
964
+ replyModeHelpCmdResetDesc: "Clear the session override and revert to the global default",
965
+ statusHelpSummary: "View the status of the currently selected session.",
966
+ statusHelpCmdShow: "/status",
967
+ statusHelpCmdShowDesc: "Show the current session status",
968
+ cancelHelpSummary: "Cancel the in-progress task in a session.",
969
+ cancelHelpCmdCancel: "/cancel",
970
+ cancelHelpCmdCancelDesc: "Cancel the current foreground session task",
971
+ cancelHelpCmdCancelAlias: "/cancel <alias>",
972
+ cancelHelpCmdCancelAliasDesc: "Cancel the task in the specified (including background) session",
973
+ cancelHelpCmdStop: "/stop",
974
+ cancelHelpCmdStopDesc: "Cancel the current task (alias for /cancel)",
975
+ cancelHelpCmdStopAlias: "/stop <alias>",
976
+ cancelHelpCmdStopAliasDesc: "Cancel the task in the specified session (alias for /cancel <alias>)"
977
+ };
978
+ });
979
+
980
+ // src/i18n/messages/en/native-session.ts
981
+ var nativeSession;
982
+ var init_native_session = __esm(() => {
983
+ nativeSession = {
984
+ transportNotSupported: `The current transport does not support listing local sessions. Keep using /ss.
985
+ Help: /help ssn`,
986
+ noSessionsFound: (agentDisplayName, workspaceLabel) => `No local ${agentDisplayName} sessions found (${workspaceLabel}).`,
987
+ noSessionsFoundHint: "Try again later, or keep your current logical session with /ss.",
988
+ selectPrompt: `Please specify the native session number or sessionId to switch to.
989
+ Help: /help ssn`,
990
+ noCachedList: `No cached native session list available. Run /ssn first, then select.
991
+ Help: /help ssn`,
992
+ indexOutOfRange: "Index out of range. Run /ssn again to refresh the list.",
993
+ attachNotSupported: "The current transport does not support attaching to local sessions. Keep using /ss.",
994
+ alreadySwitched: (agentDisplayName, displayAlias) => `Switched to already-attached local session: ${agentDisplayName} · ${displayAlias}`,
995
+ attachVerificationFailed: (agentDisplayName) => `Local ${agentDisplayName} session attach failed: no resumed backend session detected.`,
996
+ attachedAndSwitched: (agentDisplayName, displayAlias) => `Attached to local ${agentDisplayName} session and switched: ${displayAlias}`,
997
+ noContextHint: `Please select a context first, e.g.:
998
+ /ssn codex --ws project
999
+ /ssn codex -d /Users/me/project
1000
+ Help: /help ssn`,
1001
+ agentNotRegistered: (agent) => `Agent "${agent}" is not registered.`,
1002
+ workspaceNotRegistered: (workspace) => `Workspace "${workspace}" is not registered.`,
1003
+ workspacePathNotFound: (cwd) => `Workspace path does not exist: ${cwd}`,
1004
+ noWritableConfig: "No writable config is loaded. Cannot create a workspace from a path.",
1005
+ tableHeader: (agentDisplayName, workspaceLabel) => `Local ${agentDisplayName} sessions (${workspaceLabel}):`,
1006
+ tableColNum: "#",
1007
+ tableColTitle: "Title",
1008
+ tableColUpdatedAt: "Updated",
1009
+ tableColId: "ID",
1010
+ tableAttachedLabel: (displayAlias) => `attached: ${displayAlias}`,
1011
+ tableAttachedCurrent: " [current]",
1012
+ tableActions: "Actions:",
1013
+ tableActionAttach: "Attach: /ssn 1",
1014
+ tableActionAlias: "With alias: /ssn 1 -a fix-ci",
1015
+ tableActionHelp: "Help: /help ssn",
1016
+ tableMore: (cmd) => `More: ${cmd}`,
1017
+ cardHeader: (agentDisplayName, workspaceLabel) => `Local ${agentDisplayName} sessions (${workspaceLabel}):`,
1018
+ cardReplyHint: "Reply with a number to attach. The ID suffix distinguishes sessions.",
1019
+ cardTimeLabel: (updatedAt) => `Updated: ${updatedAt}`,
1020
+ cardIdLabel: (idTail) => `ID: ${idTail}`,
1021
+ cardAttachedLabel: (displayAlias) => `attached: ${displayAlias}`,
1022
+ cardAttachedCurrent: " [current]",
1023
+ cardActions: "Actions:",
1024
+ cardActionAttach: "Attach: /ssn 1",
1025
+ cardActionAlias: "With alias: /ssn 1 -a fix-ci",
1026
+ cardActionHelp: "Help: /help ssn",
1027
+ cardMore: (cmd) => `More: ${cmd}`,
1028
+ listError: (agentDisplayName, errorMessage) => `Local ${agentDisplayName} session listing failed: ${errorMessage}`,
1029
+ listErrorHint: "Confirm that acpx/Agent supports native session listing, or keep using /ss.",
1030
+ listErrorHelp: "Help: /help ssn",
1031
+ resumeError: (agentDisplayName, errorMessage) => `Local ${agentDisplayName} session attach failed: ${errorMessage}`,
1032
+ resumeErrorHint: "Confirm that acpx/Agent supports native session resume, or keep using /ss.",
1033
+ resumeErrorHelp: "Help: /help ssn"
1034
+ };
1035
+ });
1036
+
1037
+ // src/i18n/messages/en/recovery.ts
1038
+ var recovery;
1039
+ var init_recovery = __esm(() => {
1040
+ recovery = {
1041
+ transientSessionFailed: "The scheduled task's temporary session failed to start; this run was not executed.",
1042
+ transientSessionHint: "Temporary sessions are created automatically at run time — no manual action needed. To reschedule, use /lt.",
1043
+ sessionUnavailable: (alias) => `Current session "${alias}" is temporarily unavailable.`,
1044
+ sessionUnavailableRenewHint: (alias, agent, quotedWorkspace) => `Re-create it: /session new ${alias} --agent ${agent} --ws ${quotedWorkspace}`,
1045
+ sessionUnavailableAttachHint: (alias, agent, quotedWorkspace) => `Or attach an existing session: /session attach ${alias} --agent ${agent} --ws ${quotedWorkspace} --name <session-name>`,
1046
+ sessionInterrupted: (alias) => `Session "${alias}" was interrupted; no final reply received.`,
1047
+ sessionInterruptedHint: "Retry directly. If the session remains unresponsive, send /cancel first, then retry.",
1048
+ sessionInterruptedError: (summary) => `Error: ${summary}`,
1049
+ autoInstallHeadlineFixed: "⚠️ Auto-install ran but could not fix the session startup problem",
1050
+ autoInstallHeadlineFailed: "❌ Auto-install failed",
1051
+ autoInstallOriginalError: "Original error:",
1052
+ autoInstallStepVerifyFailed: (label) => `Install ran but verification failed (${label}): session still throws a missing-dependency error`,
1053
+ autoInstallStepError: (label, stderrTail) => `Install error (${label}):
1054
+ ${stderrTail}`,
1055
+ autoInstallManual: (pkg) => `Run manually: npm install -g ${pkg}`,
1056
+ autoInstallLog: (logPath) => `Detailed log: ${logPath}`,
1057
+ autoInstallScopePrecise: (manager, path2) => {
1058
+ const parts = ["precise"];
1059
+ if (manager)
1060
+ parts.push(manager);
1061
+ if (path2)
1062
+ parts.push(path2);
1063
+ return parts.join(" / ");
1064
+ },
1065
+ autoInstallScopeGlobal: "global",
1066
+ sessionCreationFailed: "Session creation failed.",
1067
+ sessionCreationVerificationDetail: "No usable backend session detected.",
1068
+ sessionCreationError: (summary) => `Error: ${summary}`,
1069
+ sessionCreationAttachHint: (alias, agent, quotedWorkspace) => `To attach an existing session instead: /session attach ${alias} --agent ${agent} --ws ${quotedWorkspace} --name <session-name>`
1070
+ };
1071
+ });
1072
+
1073
+ // src/i18n/messages/en/shortcut.ts
1074
+ var shortcut;
1075
+ var init_shortcut = __esm(() => {
1076
+ shortcut = {
1077
+ noConfig: "No writable config is currently loaded.",
1078
+ agentNotRegistered: (agent, hint) => `Agent "${agent}" is not registered. ${hint}`,
1079
+ agentNotRegisteredAvailable: (names) => `Available: ${names}`,
1080
+ agentNotRegisteredNone: "No agents are registered yet. Run /agent add <template> first.",
1081
+ reuseHeader: (display) => `Switched to session "${display}"`,
1082
+ reuseWorkspace: (name) => `- Reusing workspace: ${name}`,
1083
+ reuseSession: (display) => `- Reusing session: ${display}`,
1084
+ createdHeader: (display) => `Created and switched to session "${display}"`,
1085
+ createdNewWorkspace: (name, cwd) => `- New workspace: ${name} -> ${cwd}`,
1086
+ createdReusedWorkspace: (name) => `- Reusing workspace: ${name}`,
1087
+ createdNewSession: (display) => `- New session: ${display}`,
1088
+ creationFailed: (alias) => `Session "${alias}" creation failed.`,
1089
+ creationFailedNewWorkspace: (name, cwd) => `- Workspace added: ${name} -> ${cwd}`,
1090
+ creationFailedReusedWorkspace: (name) => `- Reusing workspace: ${name}`,
1091
+ creationFailedSession: "- Session was not created. Please retry.",
1092
+ workspaceNotRegistered: (workspace, hint) => `Workspace "${workspace}" is not registered. ${hint}`,
1093
+ workspaceAvailable: (names) => `Available: ${names}`,
1094
+ workspaceNone: "No workspaces are registered yet. Run /ws new <name> -d <path> first.",
1095
+ workspacePathNotFound: (cwd) => `Workspace path does not exist: ${cwd}`
1096
+ };
1097
+ });
1098
+
1099
+ // src/i18n/messages/en/workspace.ts
1100
+ var workspace;
1101
+ var init_workspace = __esm(() => {
1102
+ workspace = {
1103
+ workspacesEmpty: "No workspaces registered yet.",
1104
+ workspacesHeader: "Registered workspaces:",
1105
+ noWritableConfig: "No writable config is currently loaded.",
1106
+ pathNotFound: (cwd) => `Workspace path does not exist: ${cwd}`,
1107
+ nameSanitized: (original, saved) => `Name ${JSON.stringify(original)} contains special characters and has been saved as "${saved}". Add --raw to keep the original name.`,
1108
+ saved: (name) => `Workspace "${name}" saved.`,
1109
+ removed: (name) => `Workspace "${name}" removed.`,
1110
+ helpSummary: "Manage registered workspaces.",
1111
+ helpCmdList: "/workspaces",
1112
+ helpCmdListDesc: "List all registered workspaces",
1113
+ helpCmdListOrAlias: "/workspace or /ws",
1114
+ helpCmdListOrAliasDesc: "List workspaces",
1115
+ helpCmdNew: "/ws new <name> -d <path> [--raw]",
1116
+ helpCmdNewDesc: "Add a workspace; names with special characters are auto-sanitized, --raw keeps the original name",
1117
+ helpCmdRm: "/workspace rm <name>",
1118
+ helpCmdRmDesc: "Remove a workspace"
1119
+ };
1120
+ });
1121
+
1122
+ // src/i18n/messages/en/agent.ts
1123
+ var agent;
1124
+ var init_agent = __esm(() => {
1125
+ agent = {
1126
+ agentsEmpty: "No agents registered yet.",
1127
+ agentsHeader: "Registered agents:",
1128
+ noWritableConfig: "No writable config is currently loaded.",
1129
+ unsupportedTemplate: (available) => `This agent template is not supported. Available: ${available}`,
1130
+ alreadyExists: (name) => `Agent "${name}" already exists.`,
1131
+ alreadyExistsDifferent: (name) => `Agent "${name}" already exists with a different configuration. Run /agent rm ${name} first.`,
1132
+ saved: (name) => `Agent "${name}" saved.`,
1133
+ notFound: "Agent not found.",
1134
+ removed: (name) => `Agent "${name}" removed.`,
1135
+ helpSummary: "Manage registered agents.",
1136
+ helpCmdList: "/agents",
1137
+ helpCmdListDesc: "List all registered agents",
1138
+ helpCmdAdd: (templates) => `/agent add <${templates}>`,
1139
+ helpCmdAddDesc: "Add a built-in agent template",
1140
+ helpCmdRm: "/agent rm <name>",
1141
+ helpCmdRmDesc: "Remove an agent"
1142
+ };
1143
+ });
1144
+
1145
+ // src/i18n/messages/en/later.ts
1146
+ var later;
1147
+ var init_later = __esm(() => {
1148
+ later = {
1149
+ serviceNotEnabled: "Scheduled task service is not enabled.",
1150
+ bindAndTempMutuallyExclusive: "--bind and --temp cannot be used together.",
1151
+ noSession: "No current session; cannot create a scheduled task.",
1152
+ noSessionHint: "Create or switch to a session first:",
1153
+ noSessionExampleNew: "- /ss codex --ws backend (create and switch)",
1154
+ noSessionExampleUse: "- /use backend-codex (switch to an existing session)",
1155
+ slashMessageRejected: "Scheduling slash-prefixed commands is not supported.",
1156
+ slashMessageHint: "If you need the agent to explain a command, describe it in natural language:",
1157
+ slashMessageExample: "Example: /lt in 1h explain what /status does",
1158
+ cancelSuccess: (id) => `Cancelled scheduled task #${id}`,
1159
+ cancelNotFound: (id) => `No pending scheduled task #${id} found.`,
1160
+ cancelNotFoundHint: "Use /lt list to view pending tasks.",
1161
+ missingMessage: "A scheduled task requires a message. Please include the content after the time.",
1162
+ tooSoon: "Scheduled task time must be at least 10 seconds in the future.",
1163
+ outOfRange: "Scheduled task time cannot exceed 7 days from now.",
1164
+ pastTodayTime: (value) => `${value} today has already passed. Specify a future time or use "tomorrow".`,
1165
+ unrecognizedTime: "Unrecognized time format.",
1166
+ unrecognizedTimeFormats: "Supported formats:",
1167
+ unrecognizedTimeExample1: "- /lt in 2h message (2 hours from now)",
1168
+ unrecognizedTimeExample2: "- /lt in 30m message",
1169
+ unrecognizedTimeExample3: "- /lt tomorrow 09:00 message",
1170
+ unrecognizedTimeExample4: "- /lt friday 09:00 message",
1171
+ helpSummary: "Scheduled tasks: run at a set time in a temp session (or --bind to the current session)",
1172
+ helpCmdCreate: "/lt <time> <message>",
1173
+ helpCmdCreateDesc: "Create a scheduled task",
1174
+ helpCmdBind: "/lt --bind <time> <message>",
1175
+ helpCmdBindDesc: "Send to the current session instead",
1176
+ helpCmdTemp: "/lt --temp <time> <message>",
1177
+ helpCmdTempDesc: "Force a temporary session",
1178
+ helpCmdList: "/lt list",
1179
+ helpCmdListDesc: "List pending scheduled tasks",
1180
+ helpCmdCancel: "/lt cancel <id>",
1181
+ helpCmdCancelDesc: "Cancel a scheduled task",
1182
+ helpExample1: "/lt in 2h check CI",
1183
+ helpExample2: "/lt in 30m summarize progress",
1184
+ helpExample3: "/lt tomorrow 09:00 review PR",
1185
+ helpExample4: "/lt today 21:30 continue work",
1186
+ helpExample5: "/lt friday 09:00 continue work",
1187
+ helpNote1: "One-shot tasks only; repeating schedules are not supported",
1188
+ helpNote2: "Time must be at least 10 seconds and at most 7 days away",
1189
+ helpNote3: "By default runs in a new temporary session that is destroyed after completion",
1190
+ helpNote4: "Use --bind to send to the session that was current when the task was created (configurable via later.defaultMode)",
1191
+ helpNote5: "/lt list shows all pending tasks globally; in group chats only the owner can cancel",
1192
+ helpNote6: "Scheduling slash-prefixed xacpx commands is not supported",
1193
+ helpNote7: "Full time format reference: docs/later-command.md"
1194
+ };
1195
+ });
1196
+
1197
+ // src/i18n/messages/en/scheduled-render.ts
1198
+ var scheduledRender;
1199
+ var init_scheduled_render = __esm(() => {
1200
+ scheduledRender = {
1201
+ tempSession: (workspace2, agent2) => `Temp session (${workspace2} · ${agent2})`,
1202
+ boundSession: (displaySession) => `Session: ${displaySession}`,
1203
+ helpUsage: "Scheduled task usage:",
1204
+ helpCreate: "Create:",
1205
+ helpCreateEx1: "/lt in 2h check CI",
1206
+ helpCreateEx2: "/lt in 30m summarize progress",
1207
+ helpCreateEx3: "/lt tomorrow 09:00 review PR",
1208
+ helpCreateEx4: "/lt friday 09:00 continue work",
1209
+ helpView: "View:",
1210
+ helpViewCmd: "/lt list",
1211
+ helpCancel: "Cancel:",
1212
+ helpCancelCmd: "/lt cancel <id>",
1213
+ helpNotes: "Notes:",
1214
+ helpNote1: "- One-shot tasks only",
1215
+ helpNote2: "- Time must be at least 10 seconds and at most 7 days away",
1216
+ helpNote3: "- By default runs in a new temporary session (destroyed after completion)",
1217
+ helpNote4: "- Use --bind to send to the session that was current when the task was created",
1218
+ helpNote5: "- Trigger notifications and agent replies reuse the existing channel route; WeChat reply quota is controlled by the existing route",
1219
+ helpNote6: "- Scheduling slash-prefixed xacpx commands is not supported",
1220
+ helpNote7: "- Full time format reference: docs/later-command.md",
1221
+ unsupportedChannel: "This channel does not support scheduled tasks; no task was created.",
1222
+ unsupportedChannelReason: "Reason: this channel has not implemented scheduled message delivery, so the result cannot be sent back to this chat when the task fires.",
1223
+ unsupportedChannelHint: "Switch to a channel that supports scheduled tasks before using /lt.",
1224
+ taskCreated: (id) => `Scheduled task #${id} created`,
1225
+ taskExecuteAt: (datetime) => `Execute at: ${datetime}`,
1226
+ taskContent: (preview) => `Message: ${preview}`,
1227
+ listEmpty: "No pending scheduled tasks.",
1228
+ listHeader: "Pending scheduled tasks:",
1229
+ weekdaySun: "Sun",
1230
+ weekdayMon: "Mon",
1231
+ weekdayTue: "Tue",
1232
+ weekdayWed: "Wed",
1233
+ weekdayThu: "Thu",
1234
+ weekdayFri: "Fri",
1235
+ weekdaySat: "Sat"
1236
+ };
1237
+ });
1238
+
1239
+ // src/i18n/messages/en/orchestration.ts
1240
+ var orchestration;
1241
+ var init_orchestration = __esm(() => {
1242
+ orchestration = {
1243
+ noCurrentSession: "No session is currently selected. Run /session new ... or /use <alias> first.",
1244
+ serviceUnavailable: "Orchestration service is not enabled.",
1245
+ taskNotFound: "No matching task found.",
1246
+ groupNotFound: "No matching task group found.",
1247
+ delegateSuccessCreated: (taskId) => `Delegated task "${taskId}" created.`,
1248
+ delegateSuccessWorker: (workerSession) => `Worker session: ${workerSession}`,
1249
+ groupCreatedId: (groupId) => `Task group "${groupId}" created.`,
1250
+ groupCreatedTitle: (title) => `- Title: ${title}`,
1251
+ groupListEmpty: "No task groups under the current coordinator session.",
1252
+ groupListHeader: "Task groups for the current coordinator session:",
1253
+ groupSummaryId: (groupId) => `Task group "${groupId}"`,
1254
+ groupSummaryTitle: (title) => `- Title: ${title}`,
1255
+ groupSummaryCoordinator: (coordinatorSession) => `- Coordinator session: ${coordinatorSession}`,
1256
+ groupSummaryTotal: (count) => `- Total tasks: ${count}`,
1257
+ groupSummaryPending: (count) => `- Pending approval: ${count}`,
1258
+ groupSummaryRunning: (count) => `- Running: ${count}`,
1259
+ groupSummaryCompleted: (count) => `- Completed: ${count}`,
1260
+ groupSummaryFailed: (count) => `- Failed: ${count}`,
1261
+ groupSummaryCancelled: (count) => `- Cancelled: ${count}`,
1262
+ groupSummaryTerminal: (isTerminal) => `- Terminal: ${isTerminal ? "yes" : "no"}`,
1263
+ groupSummaryTerminalYes: "yes",
1264
+ groupSummaryTerminalNo: "no",
1265
+ groupSummaryInjectionPending: (pending) => `- Injection pending: ${pending ? "yes" : "no"}`,
1266
+ groupSummaryInjectionAppliedAt: (time) => `- Injection applied at: ${time}`,
1267
+ groupSummaryLastInjectionError: (error) => `- Last injection error: ${error}`,
1268
+ groupSummaryMembersHeader: "- Members:",
1269
+ groupCancelSuccessId: (groupId) => `Cancellation requested for task group "${groupId}".`,
1270
+ groupCancelSuccessCancelledCount: (count) => `- Cancellation requested: ${count}`,
1271
+ groupCancelSuccessSkippedCount: (count) => `- Skipped (already terminal): ${count}`,
1272
+ taskListEmpty: "No tasks under the current coordinator session.",
1273
+ taskListHeader: "Tasks for the current coordinator session:",
1274
+ taskSummaryId: (taskId) => `Task "${taskId}"`,
1275
+ taskSummaryStatus: (status) => `- Status: ${status}`,
1276
+ taskSummaryCoordinator: (coordinatorSession) => `- Coordinator session: ${coordinatorSession}`,
1277
+ taskSummaryWorker: (workerSession) => `- Worker session: ${workerSession}`,
1278
+ taskSummaryWorkerUnassigned: "unassigned",
1279
+ taskSummaryTargetAgent: (agent2) => `- Target agent: ${agent2}`,
1280
+ taskSummaryRole: (role) => `- Role: ${role}`,
1281
+ taskSummaryGroup: (groupId) => `- Group: ${groupId}`,
1282
+ taskSummarySource: (sourceKind, sourceHandle, roleSuffix) => `- Source: ${sourceKind} / ${sourceHandle}${roleSuffix}`,
1283
+ taskSummaryTask: (task) => `- Task: ${task}`,
1284
+ taskSummarySummary: (summary) => `- Summary: ${summary}`,
1285
+ taskSummaryLatestProgress: (progress) => `- Latest progress: ${progress}`,
1286
+ taskSummaryResult: (result) => `- Result: ${result}`,
1287
+ taskSummaryTimelineHeader: "- Timeline:",
1288
+ taskCancelAlreadyDone: (taskId) => `Task "${taskId}" has already finished.`,
1289
+ taskCancelRequested: (taskId) => `Cancellation requested for task "${taskId}".`,
1290
+ taskCancelled: (taskId) => `Task "${taskId}" cancelled.`,
1291
+ taskCurrentStatus: (status) => `- Current status: ${status}`,
1292
+ taskApproved: (taskId) => `Task "${taskId}" approved.`,
1293
+ taskRejected: (taskId) => `Task "${taskId}" rejected.`,
1294
+ taskConfirmationUnavailable: (taskId) => `Task "${taskId}" is not in needs_confirmation state.`,
1295
+ tasksCleanEmpty: "No tasks to clean under the current coordinator session.",
1296
+ tasksCleanRemovedTasks: (count) => `Cleaned ${count} finished task(s).`,
1297
+ tasksCleanRemovedBindings: (count) => `Released ${count} stale worker binding(s).`,
1298
+ taskListItemGroup: (groupId) => `; group: ${groupId}`,
1299
+ taskListItemSource: (sourceKind, sourceHandle, roleSuffix) => `; source: ${sourceKind} / ${sourceHandle}${roleSuffix}`,
1300
+ taskListItemNoticePending: "notice retry pending",
1301
+ taskListItemInjectionPending: "injection retry pending",
1302
+ taskListItemCancelling: "cancelling",
1303
+ groupListItemInjectionPending: "injection retry pending",
1304
+ groupListItemTotal: (count) => `total ${count}`,
1305
+ groupListItemPending: (count) => `pending ${count}`,
1306
+ groupListItemRunning: (count) => `running ${count}`,
1307
+ groupListItemCompleted: (count) => `completed ${count}`,
1308
+ groupListItemFailed: (count) => `failed ${count}`,
1309
+ groupListItemCancelled: (count) => `cancelled ${count}`,
1310
+ truncatedResult: (taskId) => `
1311
+ ... (result truncated — run /task ${taskId} for the full output)`,
1312
+ nextActionNoMembers: "This group has no members; the aggregate result can be ignored.",
1313
+ nextActionMixed: "Prioritise analysing the failures section, then decide whether to continue based on the successes.",
1314
+ nextActionAllFailed: "All tasks failed. Diagnose the failures section before deciding on next steps.",
1315
+ nextActionOtherOnly: "No results yet — remaining members are still running or have been cancelled.",
1316
+ nextActionMostlySuccess: "You can proceed based on the successes section; other members are still running or cancelled.",
1317
+ nextActionAllSuccess: "You can proceed based on the successes section.",
1318
+ helpSummary: "Delegate subtasks, organise task groups, view task status, and handle pending orchestration confirmations.",
1319
+ helpCmdDg: "/dg <agent> <task>",
1320
+ helpCmdDgDesc: "Quickly delegate a subtask in the current mainline to the target agent",
1321
+ helpCmdDelegate: "/delegate <agent> <task>",
1322
+ helpCmdDelegateDesc: "Delegate a subtask in the current mainline to the target agent",
1323
+ helpCmdDelegateRole: "/delegate <agent> --role <role> <task>",
1324
+ helpCmdDelegateRoleDesc: "Delegate a subtask using the specified role template",
1325
+ helpCmdDelegateGroup: "/delegate <agent> --group <groupId> <task>",
1326
+ helpCmdDelegateGroupDesc: "Attach a delegated task to the specified task group",
1327
+ helpCmdGroupNew: "/group new <title>",
1328
+ helpCmdGroupNewDesc: "Create a task group under the current mainline",
1329
+ helpCmdGroupGet: "/group <id>",
1330
+ helpCmdGroupGetDesc: "View the details of a single task group",
1331
+ helpCmdGroupAdd: "/group add <groupId> <agent> <task>",
1332
+ helpCmdGroupAddDesc: "Add a subtask to an existing task group (equivalent to /delegate --group)",
1333
+ helpCmdGroupAddRole: "/group add <groupId> <agent> --role <role> <task>",
1334
+ helpCmdGroupAddRoleDesc: "Add a subtask to an existing task group using a role template",
1335
+ helpCmdGroupCancel: "/group cancel <groupId>",
1336
+ helpCmdGroupCancelDesc: "Cancel all unfinished tasks in the specified task group",
1337
+ helpCmdGroups: "/groups",
1338
+ helpCmdGroupsDesc: "List task groups under the current mainline",
1339
+ helpCmdTasks: "/tasks",
1340
+ helpCmdTasksDesc: "List tasks under the current mainline",
1341
+ helpCmdTasksStatus: "/tasks --status <state>",
1342
+ helpCmdTasksStatusDesc: "Filter tasks by status (running/completed/failed/cancelled/needs_confirmation)",
1343
+ helpCmdTasksStuck: "/tasks --stuck",
1344
+ helpCmdTasksStuckDesc: "Show only running tasks with a stale heartbeat",
1345
+ helpCmdTasksClean: "/tasks clean",
1346
+ helpCmdTasksCleanDesc: "Clean up finished tasks and stale bindings under the current mainline",
1347
+ helpCmdTaskGet: "/task <id>",
1348
+ helpCmdTaskGetDesc: "View the details of a single task",
1349
+ helpCmdTaskApprove: "/task approve <id>",
1350
+ helpCmdTaskApproveDesc: "Approve a needs_confirmation task and start dispatching it",
1351
+ helpCmdTaskReject: "/task reject <id>",
1352
+ helpCmdTaskRejectDesc: "Reject a needs_confirmation task",
1353
+ helpCmdTaskCancel: "/task cancel <id>",
1354
+ helpCmdTaskCancelDesc: "Cancel a task under the current mainline",
1355
+ helpExample1: "/dg claude Review the 3 highest-risk points in the current plan",
1356
+ helpExample2: "/dg claude --group review-batch Review the API design",
1357
+ helpExample3: "/dg codex --role planner Break this requirement into the smallest implementation steps",
1358
+ helpExample4: "/group new parallel review",
1359
+ helpExample5: "/group add review-batch claude --role reviewer Review the API design",
1360
+ helpExample6: "/groups",
1361
+ helpExample7: "/group cancel review-batch",
1362
+ helpExample8: "/tasks",
1363
+ helpExample9: "/tasks clean",
1364
+ helpExample10: "/task approve task_123"
1365
+ };
1366
+ });
1367
+
1368
+ // src/i18n/messages/en/coordinator-prompt.ts
1369
+ var coordinatorPrompt;
1370
+ var init_coordinator_prompt = __esm(() => {
1371
+ coordinatorPrompt = {
1372
+ pendingResultsHeader: "The following are delegated task results completed since the last turn. Please absorb these results before answering the user's question.",
1373
+ humanReplyBindingHeader: "There is currently a question package awaiting a human reply. Please first determine which tasks this reply resolves.",
1374
+ reopenedOutsideSnapshotLabel: "reopened_tasks_outside_snapshot: The following tasks are not part of the current awaited message and can only be used as follow-up reference — do not resolve them with this human reply.",
1375
+ activePackageAwaitingReply: "There is still an active human package awaiting a reply.",
1376
+ packageNotDelivered: "The current question package has not yet been successfully delivered to the human. Please handle this as a normal main-line conversation and remind that the question package is still pending delivery or continuation.",
1377
+ activePackageNotClosed: "The current active human package is still not closed. Please continue the follow-up first and do not open a new question package.",
1378
+ recentHumanPackageLabel: "Most recent question package sent to human:",
1379
+ userMessageLabel: "Latest user message:"
1380
+ };
1381
+ });
1382
+
1383
+ // src/i18n/messages/en/worker-prompt.ts
1384
+ var workerPrompt;
1385
+ var init_worker_prompt = __esm(() => {
1386
+ workerPrompt = {
1387
+ taskHeader: "This is a delegated task from xacpx.",
1388
+ taskIdLabel: (taskId) => `Task ID: ${taskId}`,
1389
+ taskWorkerSessionLabel: (workerSession) => `Current worker session: ${workerSession}`,
1390
+ taskRoleLabel: (role) => `Role: ${role}`,
1391
+ taskInstruction: "Please complete the task below directly; xacpx will record your final reply.",
1392
+ taskBlockerInstruction: "If you are unable to continue due to missing critical context, permission boundaries, or business decisions, do not guess; call worker_raise_question to submit a question / whyBlocked / whatIsNeeded and let the coordinator decide the next step.",
1393
+ taskProgressInstruction: "When you complete an important step, output a single line [PROGRESS] followed by a brief progress note, for example: [PROGRESS] Code review complete.",
1394
+ taskProgressNote: "You do not need to report every action — only output at key milestones.",
1395
+ taskContentLabel: (task) => `Task content: ${task}`,
1396
+ answerHeader: "The following is the coordinator's organized reply to your blocker. Please continue the current task based on these explicit instructions.",
1397
+ answerInstruction: "Do not treat the original human conversation as a context source; only execute the answer below.",
1398
+ answerLabel: "Answer:"
1399
+ };
1400
+ });
1401
+
1402
+ // src/i18n/messages/en/config.ts
1403
+ var config;
1404
+ var init_config = __esm(() => {
1405
+ config = {
1406
+ helpSummary: "View and modify supported configuration fields.",
1407
+ helpCmdShow: "/config",
1408
+ helpCmdShowDesc: "View the list of supported config paths",
1409
+ helpCmdSet: "/config set <path> <value>",
1410
+ helpCmdSetDesc: "Modify a supported config value",
1411
+ showSupportedHeader: "Supported config fields:",
1412
+ showLegacyHeader: "Legacy config compatibility:",
1413
+ showExamplesHeader: "Examples:",
1414
+ legacyWechatReplyMode: "wechat.replyMode (deprecated, use channel.replyMode instead)",
1415
+ legacyChannelType: "channel.type (write disabled; use xacpx channel ... to manage channels[])",
1416
+ legacyChannels: "channels[] (multi-channel config, edit JSON directly)",
1417
+ noWritableConfig: "No writable config is currently loaded.",
1418
+ updated: (path2, value) => `Config updated: ${path2} = ${value}`,
1419
+ languageInvalid: "language only supports: en, zh",
1420
+ transportTypeInvalid: "transport.type only supports: acpx-cli, acpx-bridge",
1421
+ transportCommandEmpty: "transport.command cannot be empty.",
1422
+ transportPermissionModeInvalid: "transport.permissionMode only supports: approve-all, approve-reads, deny-all",
1423
+ transportNonInteractiveInvalid: "transport.nonInteractivePermissions only supports: deny, fail",
1424
+ transportPermissionPolicyEmpty: "transport.permissionPolicy cannot be empty.",
1425
+ loggingLevelInvalid: "logging.level only supports: error, info, debug",
1426
+ mustBePositiveNumber: (path2) => `${path2} must be a positive number.`,
1427
+ channelTypeDisabled: "channel.type is a legacy single-channel field; /config set writes are disabled. Use `xacpx channel ...` to manage channels[], then restart xacpx.",
1428
+ channelReplyModeInvalid: "channel.replyMode only supports: stream, final, verbose",
1429
+ wechatReplyModeInvalid: "wechat.replyMode only supports: stream, final, verbose",
1430
+ wechatReplyModeMapped: (value) => `${value} (mapped to channel.replyMode)`,
1431
+ agentNotFound: (name) => `Agent "${name}" does not exist. Create it first.`,
1432
+ fieldEmpty: (path2) => `${path2} cannot be empty.`,
1433
+ workspaceNotFound: (name) => `Workspace "${name}" does not exist. Create it first.`,
1434
+ pathNotSupported: (path2) => `This config path is not supported: ${path2}`
1435
+ };
1436
+ });
1437
+
1438
+ // src/i18n/messages/en/permission.ts
1439
+ var permission;
1440
+ var init_permission = __esm(() => {
1441
+ permission = {
1442
+ helpSummary: "View and modify the transport permission policy.",
1443
+ helpCmdShow: "/pm or /permission",
1444
+ helpCmdShowDesc: "View the current permission mode",
1445
+ helpCmdSet: "/pm set <allow|read|deny>",
1446
+ helpCmdSetDesc: "Set the approval level",
1447
+ helpCmdAuto: "/pm auto",
1448
+ helpCmdAutoDesc: "View the current non-interactive policy",
1449
+ helpCmdAutoSet: "/pm auto <deny|fail>",
1450
+ helpCmdAutoSetDesc: "Set the non-interactive policy",
1451
+ noWritableConfig: "No writable config is currently loaded.",
1452
+ statusTitleCurrent: "Current permission mode:",
1453
+ statusTitleAutoStatus: "Current non-interactive policy:",
1454
+ statusTitleModeUpdated: "Permission mode updated:",
1455
+ statusTitleAutoUpdated: "Non-interactive policy updated:"
1456
+ };
1457
+ });
1458
+
1459
+ // src/i18n/messages/en/help.ts
1460
+ var help;
1461
+ var init_help = __esm(() => {
1462
+ help = {
1463
+ invalidCommandPrefix: "Invalid command format. See usage below:",
1464
+ invalidCommandFallbackHeader: "Unrecognized command format.",
1465
+ invalidCommandFallbackFormat: `Correct session creation format:
1466
+ /session new <alias> --agent <AgentName> --ws <WorkspaceName>`,
1467
+ invalidCommandFallbackExample: `Example:
1468
+ /session new demo --agent claude --ws weacpx`,
1469
+ indexCommonHeader: "Quick access:",
1470
+ indexEntryShortcut: "- /ss <agent> (-d <path> | --ws <name>) - quickly create or switch to a session",
1471
+ indexEntryNative: "- /ssn <agent> (-d <path> | --ws <name>) - attach to a local Agent native session",
1472
+ indexEntryUse: "- /use <alias> - switch current session",
1473
+ indexEntryStatus: "- /status - view current session status",
1474
+ indexTopicsHeader: "Top-level commands:",
1475
+ indexViewTopicHeader: "View topic help:",
1476
+ indexViewTopicExample: "- Examples: /help ss, /help ssn, /help ws, /help pm",
1477
+ topicHeader: (name) => `Help topic: ${name}`,
1478
+ topicSummary: (summary) => `Description: ${summary}`,
1479
+ topicAliases: (aliases) => `Aliases: ${aliases}`,
1480
+ topicCommandsHeader: "Commands:",
1481
+ topicExamplesHeader: "Examples:",
1482
+ topicNotesHeader: "Notes:",
1483
+ unknownTopicHeader: (name) => `Unknown help topic: ${name}`,
1484
+ unknownTopicAvailableHeader: "Available topics:"
1485
+ };
1486
+ });
1487
+
1488
+ // src/i18n/messages/en/hints.ts
1489
+ var hints;
1490
+ var init_hints = __esm(() => {
1491
+ hints = {
1492
+ helpDescription: "View command help."
1493
+ };
1494
+ });
1495
+
1496
+ // src/i18n/messages/en/router.ts
1497
+ var router;
1498
+ var init_router = __esm(() => {
1499
+ router = {
1500
+ depMissing: (pkg) => `\uD83D\uDCE6 Missing dependency \`${pkg}\` detected, installing automatically…`,
1501
+ depInstallVerifying: "\uD83D\uDD04 Installation complete, verifying session startup…",
1502
+ agentHeartbeat: (agent2, elapsed) => `⏳ \`${agent2}\` is still starting up… (waited ${elapsed}s)`,
1503
+ agentSpawning: (agent2) => `\uD83D\uDE80 Starting \`${agent2}\`…`,
1504
+ agentInitializing: (agent2, elapsed) => `\uD83D\uDD27 \`${agent2}\` initializing… (waited ${elapsed}s)`,
1505
+ acpxNoteElapsed: (note, elapsed) => `${note} (waited ${elapsed}s)`
1506
+ };
1507
+ });
1508
+
1509
+ // src/i18n/messages/en/acpx-note.ts
1510
+ var acpxNote;
1511
+ var init_acpx_note = __esm(() => {
1512
+ acpxNote = {
1513
+ spawnBuiltIn: (name) => `\uD83D\uDD29 Starting built-in agent \`${name}\``,
1514
+ spawnAgent: "\uD83D\uDD29 Starting agent process",
1515
+ downloading: "\uD83D\uDCE5 Downloading agent dependencies…",
1516
+ installing: "\uD83E\uDDE9 Installing agent dependencies…",
1517
+ initializing: "\uD83D\uDD27 Agent initializing…",
1518
+ fallback: (line) => `ℹ️ [acpx] ${line}`
1519
+ };
1520
+ });
1521
+
1522
+ // src/i18n/messages/en/render.ts
1523
+ var render;
1524
+ var init_render = __esm(() => {
1525
+ render = {
1526
+ taskProgress: (taskId, targetAgent, summary) => `⏳ Task "${taskId}" (${targetAgent}): ${summary}`,
1527
+ taskHeartbeat: (taskId, minutes) => `⏳ Task "${taskId}" has been running for ${minutes} minute(s), waiting...`
1528
+ };
1529
+ });
1530
+
1531
+ // src/i18n/messages/en/cli.ts
1532
+ var cli;
1533
+ var init_cli = __esm(() => {
1534
+ cli = {
1535
+ helpLines: [
1536
+ "Usage:",
1537
+ "xacpx login - WeChat login",
1538
+ "xacpx logout - Log out",
1539
+ "xacpx run - Run in the foreground",
1540
+ "xacpx start - Start in the background",
1541
+ "xacpx status - Check daemon status",
1542
+ "xacpx stop - Stop the daemon",
1543
+ "xacpx restart - Restart the background daemon",
1544
+ "xacpx update [--all|<name>] - Update xacpx and installed plugins",
1545
+ "xacpx channel|ch list|show|add|rm|enable|disable [--account <id>] - Manage message channels (use --account for multi-bot)",
1546
+ "xacpx plugin list|add|update|remove|enable|disable|doctor|known - Manage plugins",
1547
+ "xacpx doctor - Run diagnostics",
1548
+ "xacpx version - Show version",
1549
+ "xacpx agent|agents list|add|rm|templates - Manage local agents",
1550
+ "xacpx workspace list|add [name] [--raw]|rm <name> - Manage local workspaces (alias: ws)",
1551
+ "xacpx later|lt list|cancel <id> - Manage local scheduled tasks",
1552
+ "xacpx mcp-stdio [--coordinator-session <session>] [--source-handle <handle>] [--workspace <name>] - Start MCP stdio server"
1553
+ ],
1554
+ alreadyRunning: "xacpx is already running in the background",
1555
+ started: "xacpx started in the background",
1556
+ startFailed: (detail) => `xacpx failed to start: ${detail}`,
1557
+ running: "xacpx is running",
1558
+ notRunning: "xacpx is not running",
1559
+ indeterminate: "xacpx process is still running but status metadata is missing",
1560
+ stopped: "xacpx stopped",
1561
+ restarting: "xacpx restarting...",
1562
+ restartNotRunning: "xacpx is not running, starting...",
1563
+ restartFailed: (detail) => `xacpx failed to restart: ${detail}`,
1564
+ restartIndeterminate: "xacpx process is still running but status metadata is missing",
1565
+ restartIndeterminateHint: "Run `xacpx stop` first, or manually clean up the stale PID/status before retrying.",
1566
+ checkAppLog: (path2) => `Check App Log: ${path2}`,
1567
+ checkStderrLog: (path2) => `Check Stderr: ${path2}`,
1568
+ workspaceEmpty: "No workspaces yet.",
1569
+ workspaceListHeader: "Workspaces:",
1570
+ workspaceNameEmpty: "Workspace name cannot be empty.",
1571
+ workspaceNameSanitized: (sourceLabel, original, saved) => `${sourceLabel} ${JSON.stringify(original)} contains special characters and was saved as "${saved}". Add --raw to keep the original name.`,
1572
+ workspaceSourceLabelDir: "Directory name",
1573
+ workspaceSourceLabelName: "Name",
1574
+ workspaceAlreadyExists: (name, cwd) => `Workspace "${name}" already exists: ${cwd}`,
1575
+ workspaceConflictPath: (name, cwd) => `Workspace "${name}" already exists with a different path: ${cwd}`,
1576
+ workspaceConflictHint: (name) => `Choose a different name, or run: xacpx workspace rm ${name}`,
1577
+ workspaceSaved: (name, cwd) => `Workspace "${name}" saved: ${cwd}`,
1578
+ workspaceNotFound: (name) => `Workspace "${name}" not found.`,
1579
+ workspaceRemoved: (name) => `Workspace "${name}" removed`,
1580
+ agentEmpty: "No agents yet.",
1581
+ agentListHeader: "Agent list:",
1582
+ agentTemplatesHeader: "Available agent templates:",
1583
+ agentNameEmpty: "Agent name cannot be empty.",
1584
+ agentUnsupportedTemplate: (templates) => `This agent template is not supported. Available: ${templates.join(", ")}`,
1585
+ agentAlreadyExists: (name) => `Agent "${name}" already exists`,
1586
+ agentAlreadyExistsDifferent: (name) => `Agent "${name}" already exists with a different configuration. Run: xacpx agent rm ${name}`,
1587
+ agentSaved: (name) => `Agent "${name}" saved`,
1588
+ agentNotFound: (name) => `Agent "${name}" not found.`,
1589
+ agentRemoved: (name) => `Agent "${name}" removed`,
1590
+ laterIdEmpty: "Scheduled task ID cannot be empty.",
1591
+ laterNotFound: (id) => `Pending scheduled task #${id} not found.`,
1592
+ laterNotFoundHint: "Run xacpx later list to see current pending tasks.",
1593
+ laterCancelled: (id) => `Scheduled task #${id} cancelled`
1594
+ };
1595
+ });
1596
+
1597
+ // src/i18n/messages/en/cli-update.ts
1598
+ var cliUpdate;
1599
+ var init_cli_update = __esm(() => {
1600
+ cliUpdate = {
1601
+ updatesAvailable: "Available updates:",
1602
+ unavailableAborted: (names) => `Cannot check the latest version for the following items; update cancelled: ${names}`,
1603
+ nothingToUpdate: "Nothing to update.",
1604
+ selfUpdateNeedsConfirmNonInteractive: (name) => `Updating the ${name} core requires confirmation; in non-interactive mode use \`${name} update --all\` or \`${name} update ${name}\`.`,
1605
+ renameNeedsConfirmNonInteractive: (successor) => `weacpx has been renamed to ${successor}; in non-interactive mode use \`weacpx update --all\` or \`weacpx update weacpx\` to confirm the migration.`,
1606
+ selfUpdateConfirmPrompt: (name) => `Confirm update of ${name} core? [y/N] `,
1607
+ renameConfirmPrompt: (successor) => `weacpx has been renamed to ${successor}. Confirm migration to ${successor}? [y/N] `,
1608
+ selfUpdateCancelled: (name) => `Update of ${name} core cancelled.`,
1609
+ renameCancelled: (successor) => `Migration to ${successor} cancelled.`,
1610
+ selfUpdated: (name, version) => `${name} updated: ${version}`,
1611
+ renameMigrated: (successor, version) => `weacpx has been renamed to ${successor}. Migrated to ${successor} ${version}. Use the \`${successor}\` command going forward; if it was running in the background, restart with \`${successor} start\`.`,
1612
+ pluginUpdated: (name, version) => `Plugin ${name} updated: ${version}`,
1613
+ pluginRollbackFailed: (name, version, error) => `Failed to roll back ${name} to ${version}: ${error}`,
1614
+ pluginNotInConfig: (name) => `Plugin ${name} not found in config`,
1615
+ updateFailed: (name, error) => `${name} update failed: ${error}`,
1616
+ targetNotFound: (name) => `Update target not found: ${name}`,
1617
+ targetVersionUnknown: (name) => `${name}: cannot check latest version; skipped.`,
1618
+ targetNotPinned: (name) => `${name} has no recorded version; use \`xacpx plugin update ${name}\` or specify a version explicitly.`,
1619
+ multiTargetNonInteractive: "Installed plugins detected; in non-interactive mode use `xacpx update --all` or `xacpx update <name>`.",
1620
+ selectionPrompt: "Select items to update (numbers, comma-separated; a=all; Enter to cancel): ",
1621
+ selectionInvalid: (part) => `Invalid selection: ${part}`,
1622
+ formatSelf: (name, current, latest) => `${name} (${current} -> ${latest})`,
1623
+ formatRename: (successor, current, latest) => `weacpx → ${successor} (${current} -> ${latest}, rename)`,
1624
+ formatPlugin: (name, current, latest) => `Plugin ${name} (${current} -> ${latest})`,
1625
+ versionUnlocked: "unpinned",
1626
+ versionUnknown: "unknown"
1627
+ };
1628
+ });
1629
+
1630
+ // src/i18n/messages/en/channel-cli.ts
1631
+ var channelCli;
1632
+ var init_channel_cli = __esm(() => {
1633
+ channelCli = {
1634
+ noChannels: "No message channels configured yet.",
1635
+ channelListHeader: "Message channels:",
1636
+ channelNotFound: (type) => `Channel not found: ${type}`,
1637
+ channelHeader: (id) => `Channel ${id}:`,
1638
+ channelNoMultiAccount: (type) => `Channel ${type} does not support --account (multi-account CLI).`,
1639
+ channelAccountNotFound: (type, accountId) => `Account ${accountId} does not exist on channel ${type}.`,
1640
+ channelAccountHeader: (id, accountId) => `Channel ${id} / account ${accountId}:`,
1641
+ missingRequiredFlags: (flags) => `Missing required flags: ${flags}`,
1642
+ channelAlreadyExistsSame: (type) => `Channel ${type} already exists with the same config.`,
1643
+ channelAlreadyExistsDifferent: (type) => `Channel ${type} already exists with a different config; run: xacpx channel rm ${type}, then re-add.`,
1644
+ channelAdded: (type) => `Channel ${type} added`,
1645
+ cannotRemoveLastEnabled: "Cannot remove the last enabled channel.",
1646
+ channelRemoved: (id) => `Channel ${id} removed`,
1647
+ cannotDisableLastEnabled: "Cannot disable the last enabled channel.",
1648
+ channelEnabledToggled: (id, enabled) => `Channel ${id} ${enabled ? "enabled" : "disabled"}`,
1649
+ channelAccountAlreadyExists: (type, accountId) => `Account ${accountId} already exists on channel ${type}; run xacpx channel rm ${type} --account ${accountId} first`,
1650
+ channelAccountAdded: (type, accountId) => `Channel ${type} account ${accountId} added`,
1651
+ channelReEnabled: (type) => `Channel ${type} was disabled; it has been automatically re-enabled.`,
1652
+ channelAccountRemoveBlockedLast: (accountId, type) => `Account ${accountId} is the last account on channel ${type}; removing it would leave the channel empty. Use xacpx channel rm ${type} instead (make sure another enabled channel exists).`,
1653
+ channelAccountRemovedWithChannel: (type, accountId) => `Account ${accountId} removed from channel ${type}; it was the last account, so channel ${type} was also removed.`,
1654
+ channelAccountRemoveBlockedAllDisabled: (type, accountId, remainingIds) => `Cannot remove ${accountId} from ${type}: remaining accounts (${remainingIds}) are all disabled. First enable one with xacpx channel enable ${type} --account <id>, or disable the whole channel with xacpx channel disable ${type}.`,
1655
+ channelAccountDefaultSwitched: (newDefault) => `Default account switched to ${newDefault}`,
1656
+ channelAccountRemoved: (type, accountId) => `Channel ${type} account ${accountId} removed`,
1657
+ channelAccountIncomplete: (accountId, issues) => `Account ${accountId} config is incomplete: ${issues}`,
1658
+ channelAccountCannotDisableLast: (type) => `Cannot disable the last enabled account on ${type}.`,
1659
+ channelAccountEnabledToggled: (type, accountId, enabled) => `Channel ${type} account ${accountId} ${enabled ? "enabled" : "disabled"}`,
1660
+ unknownChannelType: (type) => `Unknown channel type: ${type}`,
1661
+ supportedBuiltinChannels: (types) => `Supported built-in channels: ${types}`,
1662
+ savedNoRestart: "Config saved; changes will take effect after the next `xacpx restart`.",
1663
+ savedDaemonIndeterminate: "Config saved; daemon state is indeterminate, skipped auto-restart. Resolve the stale PID/status first.",
1664
+ savedDaemonRunning: "Config saved; daemon is running, run `xacpx restart` to apply changes.",
1665
+ restartPrompt: "Restart xacpx now to apply changes? [y/N] ",
1666
+ savedRestartPending: "Config saved; changes will take effect after the next `xacpx restart`.",
1667
+ savedDaemonStopped: "Config saved; daemon is not running, changes will take effect after the next `xacpx start`.",
1668
+ savedRestartFailed: (message) => `Config saved, but restart failed: ${message}`,
1669
+ checkLog: (path2) => `Check the log: ${path2}`,
1670
+ orRunLater: "Or run later: xacpx start"
1671
+ };
1672
+ });
1673
+
1674
+ // src/i18n/messages/en/plugin-cli.ts
1675
+ var pluginCli;
1676
+ var init_plugin_cli = __esm(() => {
1677
+ pluginCli = {
1678
+ noPlugins: "No plugins installed yet.",
1679
+ pluginListHeader: "Plugins:",
1680
+ unrecognizedArgs: (args) => `Unrecognized arguments: ${args}`,
1681
+ pluginInstallFailed: (packageSpec, error) => `Plugin ${packageSpec} install failed: ${error}`,
1682
+ pluginValidateFailed: (recordedName, error) => `Plugin ${recordedName} validation failed: ${error}`,
1683
+ pluginInstalled: (recordedName) => `Plugin ${recordedName} installed`,
1684
+ providesChannels: (channels) => `Provides channels: ${channels}`,
1685
+ pluginNotFound: (packageName) => `Plugin not found: ${packageName}`,
1686
+ pluginUninstallFailed: (packageName, error) => `Plugin ${packageName} uninstall failed: ${error}`,
1687
+ pluginRemoved: (packageName) => `Plugin ${packageName} removed`,
1688
+ pluginUpdateFailed: (name, error) => `Plugin ${name} update failed: ${error}`,
1689
+ pluginUpdateValidateFailed: (name, message) => `Plugin ${name} validation failed after update: ${message}`,
1690
+ pluginRolledBack: (version) => `Rolled back to ${version}`,
1691
+ pluginRollbackFailed: (name, version, message) => `Rollback of ${name} to ${version} failed: ${message}`,
1692
+ pluginRollbackUnavailable: (name) => `Cannot auto-rollback (${name} has no pinned previous version); manually run xacpx plugin add ${name} to reinstall.`,
1693
+ pluginUpdated: (name) => `Plugin ${name} updated`,
1694
+ pluginEnabledToggled: (packageName, enabled) => `Plugin ${packageName} ${enabled ? "enabled" : "disabled"}`,
1695
+ dependencyGuardBlocked: (ids) => `Channels depending on this plugin: ${ids}. Run xacpx channel rm <id> (or channel disable) first.`,
1696
+ dependencyGuardBlockedUnknown: (pluginName, ids) => `Cannot determine the channel types provided by plugin ${pluginName}, and non-built-in channels are still configured: ${ids}. Run xacpx channel rm on them or fix the plugin first.`,
1697
+ pluginDoctorOk: "All plugins OK.",
1698
+ noKnownPlugins: "No official plugins in this version.",
1699
+ knownPluginsHeader: "Official plugins:",
1700
+ knownPluginsInstallLabel: "Install:",
1701
+ knownPluginsInstallCmd: " xacpx plugin add <package>",
1702
+ cannotResolveLocalPluginName: (installSpec) => `Cannot resolve local plugin package name: ${installSpec}`,
1703
+ savedNoRestart: "Config saved; changes will take effect after the next `xacpx restart`.",
1704
+ savedDaemonIndeterminate: "Config saved; daemon state is indeterminate, skipped auto-restart. Resolve the stale PID/status first.",
1705
+ savedDaemonRunning: "Config saved; daemon is running, run `xacpx restart` to apply changes.",
1706
+ restartPrompt: "Restart xacpx now to apply changes? [y/N] ",
1707
+ savedRestartPending: "Config saved; changes will take effect after the next `xacpx restart`.",
1708
+ savedDaemonStopped: "Config saved; daemon is not running, changes will take effect after the next `xacpx start`.",
1709
+ savedRestartFailed: (message) => `Config saved, but restart failed: ${message}`,
1710
+ checkLog: (path2) => `Check the log: ${path2}`,
1711
+ orRunLater: "Or run later: xacpx start",
1712
+ pluginNoDefaultExport: (packageName) => `Plugin ${packageName} has no default export as an xacpx plugin definition`,
1713
+ pluginNameMismatch: (packageName, name) => `Plugin ${packageName} declared name does not match the installed package name: ${name}`,
1714
+ pluginChannelsNotArray: (packageName) => `Plugin ${packageName} channels must be an array`,
1715
+ pluginIllegalChannelType: (packageName, type) => `Plugin ${packageName} registered an illegal channel type: ${type}`,
1716
+ pluginIllegalChannelTypeNoType: (packageName) => `Plugin ${packageName} registered an illegal channel type`,
1717
+ pluginDuplicateChannelType: (packageName, type) => `Plugin ${packageName} registered duplicate channel type: ${type}`,
1718
+ pluginMissingFactory: (packageName, type) => `Plugin ${packageName} channel ${type} is missing a factory`,
1719
+ pluginInvalidCliProvider: (packageName, type) => `Plugin ${packageName} channel ${type} cliProvider.type must equal the channel type`,
1720
+ compatMissingApiVersion: (packageName) => `Plugin ${packageName} is missing the required apiVersion field`,
1721
+ compatUnsupportedApiVersion: (packageName, apiVersion, supported) => `Plugin ${packageName} uses unsupported apiVersion ${apiVersion}; supported: ${supported}; install a compatible plugin version`,
1722
+ compatInvalidMinVersion: (packageName, field) => `Plugin ${packageName} invalid metadata: ${field} must be a string (invalid plugin metadata)`,
1723
+ compatInvalidMinVersionDetail: (packageName, field, detail) => `Plugin ${packageName} invalid metadata: ${field} (${detail}) (invalid plugin metadata)`,
1724
+ compatMinVersionNotSatisfied: (packageName, minVersion, currentVersion) => `Plugin ${packageName} requires xacpx >=${minVersion}; current is ${currentVersion}; upgrade xacpx`,
1725
+ compatInvalidCompatibleVersions: (packageName, field) => `Plugin ${packageName} invalid metadata: ${field} must be a string (invalid plugin metadata)`,
1726
+ compatInvalidCompatibleVersionsDetail: (packageName, field, detail) => `Plugin ${packageName} invalid metadata: ${field} (${detail}) (invalid plugin metadata)`,
1727
+ compatCompatibleVersionsNotSatisfied: (packageName, requirement, currentVersion) => `Plugin ${packageName} requires xacpx ${requirement}; current is ${currentVersion}; upgrade xacpx`
1728
+ };
1729
+ });
1730
+
1731
+ // src/i18n/messages/en/login.ts
1732
+ var login;
1733
+ var init_login = __esm(() => {
1734
+ login = {
1735
+ qrReady: "QR code is ready. Please scan it with WeChat.",
1736
+ qrScanToConnect: "Scan the QR code below with WeChat to complete the connection.",
1737
+ noActiveLogin: "No login in progress. Please initiate login first.",
1738
+ qrExpiredBeforeStart: "QR code has expired. Please generate a new one.",
1739
+ loginTimeoutTooManyExpiries: "Login timed out: the QR code expired too many times. Please restart the login flow.",
1740
+ newQrGenerated: `\uD83D\uDD04 New QR code generated. Please scan again.
1741
+
1742
+ `,
1743
+ qrBrowserFallback: `If the QR code is not displayed correctly, open the following link in a browser to scan:
1744
+ `,
1745
+ qrLoadFailed: `QR code failed to load. Open the following link in a browser to scan:
1746
+ `,
1747
+ qrRefreshFailed: (detail) => `Failed to refresh QR code: ${detail}`,
1748
+ scanned: `
1749
+ \uD83D\uDC40 QR code scanned. Continue in WeChat...
1750
+ `,
1751
+ qrExpiringRefresh: (current, max) => `
1752
+ ⏳ QR code expired, refreshing... (${current}/${max})
1753
+ `,
1754
+ verifyCodeMismatch: "❌ The number you entered does not match. Please try again: ",
1755
+ verifyCodePrompt: "Enter the number shown on your WeChat mobile app to continue: ",
1756
+ verifyCodeNoTty: "A pairing code is required but no interactive terminal is available. Run `xacpx login` in the foreground to complete login.",
1757
+ verifyCodeBlocked: `
1758
+ ⛔ Too many incorrect attempts. Please try again later.
1759
+ `,
1760
+ verifyCodeBlockedStop: "Too many incorrect attempts. The connection flow has been stopped. Please try again later.",
1761
+ loginMissingBotId: "Login failed: the server did not return ilink_bot_id.",
1762
+ loginSuccess: "✅ Connected to WeChat successfully!",
1763
+ loginTimeout: "Login timed out. Please try again.",
1764
+ startingLogin: "Starting WeChat QR code login...",
1765
+ scanInstruction: `
1766
+ Scan the QR code below with WeChat to complete the connection:
1767
+ `,
1768
+ qrLinkFallback: (url) => `QR code URL: ${url}`,
1769
+ waitingForScan: `
1770
+ Waiting for scan...
1771
+ `,
1772
+ loginSuccessLine: `
1773
+ ✅ Connected to WeChat successfully!`,
1774
+ noAccountsLoggedIn: "No accounts are currently logged in.",
1775
+ logoutSuccess: "✅ Logged out.",
1776
+ noAccountsError: "No logged-in accounts. Please run login first.",
1777
+ accountNotConfigured: (accountId) => `Account ${accountId} is not configured (missing token). Please run login first.`
1778
+ };
1779
+ });
1780
+
1781
+ // src/i18n/messages/en/weixin.ts
1782
+ var weixin;
1783
+ var init_weixin = __esm(() => {
1784
+ weixin = {
1785
+ echoTimingHeader: "⏱ Channel latency",
1786
+ echoTimingEventTime: (iso) => `├ Event time: ${iso}`,
1787
+ echoTimingPlatformDelay: (delay) => `├ Platform→plugin: ${delay}`,
1788
+ echoTimingPluginDelay: (ms) => `└ Plugin processing: ${ms}ms`,
1789
+ debugEnabled: "Debug mode enabled",
1790
+ debugDisabled: "Debug mode disabled",
1791
+ sessionCleared: "✅ Session cleared. Starting a fresh conversation.",
1792
+ noAccountsLoggedIn: "No accounts are currently logged in.",
1793
+ logoutSuccess: "✅ Logged out. All account credentials cleared.",
1794
+ commandFailed: (detail) => `❌ Command failed: ${detail}`
1795
+ };
1796
+ });
1797
+
1798
+ // src/i18n/messages/en/migrate.ts
1799
+ var migrate;
1800
+ var init_migrate = __esm(() => {
1801
+ migrate = {
1802
+ daemonRunning: (pid, legacy, primary) => `A legacy daemon is still running (pid ${pid}). Skipping migration ${legacy} → ${primary}. ` + `Stop the daemon first (weacpx stop / xacpx stop) and retry. The legacy directory will be used in the meantime.`,
1803
+ copied: (legacy, primary) => `State directory copied from ${legacy} to ${primary} (the old directory is kept as a backup and can be deleted manually).`,
1804
+ failed: (legacy, primary, detail) => `Failed to migrate state directory ${legacy} → ${primary}. Continuing with the old directory: ${detail}`,
1805
+ supplementFailed: (from, to, detail) => `Failed to supplement ${from} → ${to}; skipped: ${detail}`,
1806
+ supplemented: (files, primary) => `Supplemented ${files} from the old directory into ${primary} (no existing files were overwritten).`
1807
+ };
1808
+ });
1809
+
1810
+ // src/i18n/messages/en/misc.ts
1811
+ var misc;
1812
+ var init_misc = __esm(() => {
1813
+ misc = {
1814
+ emptyMessage: "Message is empty.",
1815
+ defaultHomeWorkspaceDescription: "Home directory",
1816
+ pluginChannelFeishu: "Feishu channel",
1817
+ pluginChannelYuanbao: "Tencent Yuanbao channel",
1818
+ pluginChannelInstallHint: (channelType, packageName) => `Channel ${channelType} requires a plugin: xacpx plugin add ${packageName}`,
1819
+ orchestrationSuggestion1: "Run /tasks --stuck to locate stuck tasks",
1820
+ orchestrationSuggestion2: "/task <id> shows the full timeline to locate errors",
1821
+ orchestrationSuggestion3: "Use /task cancel or /tasks clean to recover",
1822
+ startupWaitLine: (frame, elapsed, timeout) => `${frame} Creating initial session... ${elapsed}s / ${timeout}s, press Ctrl+B to skip`,
1823
+ startupWaitLineFirstBoot: (frame, elapsed, timeout) => `${frame} Creating initial session (first boot may need to prepare dependencies) ${elapsed}s / ${timeout}s, press Ctrl+B to skip`,
1824
+ workspaceNotRegistered: (workspace2) => `Workspace "${workspace2}" is not registered`,
1825
+ agentNotRegistered: (agent2) => `Agent "${agent2}" is not registered`,
1826
+ quotaHeadsUp: `—
1827
+ ⏳ Push limit reached. Reply /jx to continue watching, or wait for the final result.`,
1828
+ quotaOverflowSummary: (count) => `(${count} progress updates omitted due to message limit; see final result below)`,
1829
+ finalHeadsUp: (total, sentSoFar, remaining) => `—
1830
+ \uD83D\uDCC4 Result: ${total} parts total, ${sentSoFar} sent. Reply /jx to see the next ${remaining} parts.`,
1831
+ quotedMessagePrefix: (parts) => `[Quote: ${parts}]`,
1832
+ scheduledTaskFailed: (message) => `Scheduled task failed: ${message}`,
1833
+ orchestrationTaskCompleted: (taskId, workerSession, result) => `Delegation task "${taskId}" completed
1834
+ - worker: ${workerSession}
1835
+ - result: ${result}`,
1836
+ orchestrationTaskFailed: (taskId, workerSession, reason) => `Delegation task "${taskId}" failed
1837
+ - worker: ${workerSession}
1838
+ - reason: ${reason}`,
1839
+ workerUnassigned: "unassigned",
1840
+ bgSessionDone: (display) => `✅ ${display} finished, /use ${display} to view result`,
1841
+ bgSessionError: (display) => `⚠️ ${display} failed, /use ${display} to view details`,
1842
+ executionError: (message) => `⚠️ Execution error: ${message}`,
1843
+ onboardingFirstUsePrompt: (workspaceName) => `First use detected. Create current directory as workspace "${workspaceName}"? [Y/n] `,
1844
+ onboardingSelectAgent: "Select an agent to add and create the initial session:",
1845
+ onboardingEnterChoice: "Enter number or name (default 1): ",
1846
+ onboardingNoValidAgent: "No valid agent selected, skipping first-time setup.",
1847
+ onboardingCreatedWorkspace: (workspaceName, alias) => `Created workspace "${workspaceName}", creating initial session "${alias}"...`,
1848
+ humanQuestionQueued: (count) => `
1849
+
1850
+ (${count} more new questions have been queued; they will be handled after this round.)`,
1851
+ humanQuestionResumed: (taskId, summary) => `${taskId}: resumed (${summary})`,
1852
+ humanQuestionUnresolved: (taskId, summary) => `${taskId}: still pending (${summary})`,
1853
+ humanQuestionQueuedLine: (count) => `${count} more new questions queued; they will be handled after this round.`,
1854
+ delegateQPackageInstr1: "First assess which questions you can answer directly",
1855
+ delegateQPackageInstr2: "For those you cannot answer, compile them into a human question package",
1856
+ delegateQPackageInstr3: "Do not forward the human's exact words to the worker",
1857
+ commandAccessDeniedSuffix: " is restricted to group owner only.",
1858
+ commandAccessDeniedHint: "To perform control operations, have the owner send them in the group, or use a private chat.",
1859
+ commandLabelThisMessage: "This message",
1860
+ sessionResetNoCurrentSession: "No session is currently selected. Run /session new ... or /use <alias> first.",
1861
+ sessionResetFailed: (alias) => `Session "${alias}" reset failed. The new backend session was not created, please try again later.`,
1862
+ sessionResetSuccess: (alias) => `Session "${alias}" has been reset`,
1863
+ scheduledDispatchNoticeBound: (taskId, sessionDisplay, preview) => `Running scheduled task #${taskId}
1864
+ Session: ${sessionDisplay}
1865
+ Content: ${preview}`,
1866
+ scheduledDispatchNoticeTemp: (taskId, workspace2, agent2, preview) => `Running scheduled task #${taskId}
1867
+ Session: temporary (${workspace2} · ${agent2})
1868
+ Content: ${preview}`,
1869
+ weixinNoCredentials: "[xacpx] No login credentials detected, starting QR code login...",
1870
+ weixinMultipleAccounts: (accountId) => `[weixin] Multiple accounts detected, using first: ${accountId}`,
1871
+ weixinBotStarting: (accountId) => `[weixin] Starting bot, account=${accountId}`
1872
+ };
1873
+ });
1874
+
1875
+ // src/i18n/messages/en/index.ts
1876
+ var en;
1877
+ var init_en = __esm(() => {
1878
+ init_common();
1879
+ init_session();
1880
+ init_native_session();
1881
+ init_recovery();
1882
+ init_shortcut();
1883
+ init_workspace();
1884
+ init_agent();
1885
+ init_later();
1886
+ init_scheduled_render();
1887
+ init_orchestration();
1888
+ init_coordinator_prompt();
1889
+ init_worker_prompt();
1890
+ init_config();
1891
+ init_permission();
1892
+ init_help();
1893
+ init_hints();
1894
+ init_router();
1895
+ init_acpx_note();
1896
+ init_render();
1897
+ init_cli();
1898
+ init_cli_update();
1899
+ init_channel_cli();
1900
+ init_plugin_cli();
1901
+ init_login();
1902
+ init_weixin();
1903
+ init_migrate();
1904
+ init_misc();
1905
+ en = { common, session, nativeSession, recovery, shortcut, workspace, agent, later, scheduledRender, orchestration, coordinatorPrompt, workerPrompt, config, permission, help, hints, router, acpxNote, render, cli, cliUpdate, channelCli, pluginCli, login, weixin, migrate, misc };
1906
+ });
1907
+
1908
+ // src/i18n/messages/zh/common.ts
1909
+ var common2;
1910
+ var init_common2 = __esm(() => {
1911
+ common2 = {
1912
+ localeName: "中文"
1913
+ };
1914
+ });
1915
+
1916
+ // src/i18n/messages/zh/session.ts
1917
+ var session2;
1918
+ var init_session2 = __esm(() => {
1919
+ session2 = {
1920
+ noCurrent: "当前还没有选中的会话。请先执行 /session new ... 或 /use <alias>。",
1921
+ noSessions: "还没有会话。",
1922
+ crossChannelHint: "提示:检测到其他渠道已有会话记录;不同渠道的会话相互隔离,请在当前渠道重新创建或绑定。",
1923
+ createSessionHint: "创建会话:/ss <agent> -d /path/to/the/project",
1924
+ createSessionExample: "例如:/ss claude -d /path/to/the/project",
1925
+ sessionListHeader: "会话列表:",
1926
+ currentLabel: "[当前]",
1927
+ sessionListItem: (alias, agent2, workspace2) => `- ${alias} (${agent2} @ ${workspace2})`,
1928
+ sessionCreated: (alias) => `会话「${alias}」已创建并切换`,
1929
+ sessionAttachNotFound: (alias, agent2, workspace2) => [
1930
+ "没有找到可绑定的已有会话。",
1931
+ `请确认会话名是否正确,然后重新执行:/session attach ${alias} --agent ${agent2} --ws ${workspace2} --name <会话名>`
1932
+ ].join(`
1933
+ `),
1934
+ sessionAttached: (alias) => `会话「${alias}」已绑定并切换`,
1935
+ switched: (alias, agent2, workspace2) => `已切到 ${alias} · ${agent2} · ${workspace2}`,
1936
+ switchedWithPrev: (alias, agent2, workspace2, previousAlias) => `已切到 ${alias} · ${agent2} · ${workspace2}(上一个:${previousAlias})`,
1937
+ stillRunning: (alias) => `⏳ ${alias} 仍在执行中…`,
1938
+ noMatchingSession: (input) => `没有匹配「${input}」的会话。发 /sessions 看看有哪些。`,
1939
+ ambiguousSession: (input) => `「${input}」匹配到多个会话,请指定:`,
1940
+ noPreviousSession: "还没有上一个会话,发 /sessions 看看有哪些。",
1941
+ modeHeader: "当前 mode:",
1942
+ modeSessionLabel: (alias) => `- 会话:${alias}`,
1943
+ modeModeLabel: (modeId) => `- mode:${modeId}`,
1944
+ modeNotSet: "未设置",
1945
+ modeSet: (modeId) => `已设置当前会话 mode:${modeId}`,
1946
+ replyModeHeader: "当前 reply mode:",
1947
+ replyModeSessionLabel: (alias) => `- 会话:${alias}`,
1948
+ replyModeGlobalDefault: (value) => `- 全局默认:${value}`,
1949
+ replyModeSessionOverride: (value) => `- 当前会话覆盖:${value}`,
1950
+ replyModeEffective: (value) => `- 当前生效:${value}`,
1951
+ replyModeSet: (replyMode) => `已设置当前会话 reply mode:${replyMode}`,
1952
+ replyModeReset: (globalDefault) => `已重置当前会话 reply mode,当前回退到全局默认:${globalDefault}`,
1953
+ statusHeader: "当前会话:",
1954
+ statusNameLabel: (alias) => `- 名称:${alias}`,
1955
+ statusAgentLabel: (agent2) => `- Agent:${agent2}`,
1956
+ statusWorkspaceLabel: (workspace2) => `- 工作区:${workspace2}`,
1957
+ orchestrationRouteError: "无法记录当前会话路由,已取消本次发送。",
1958
+ orchestrationRouteRetry: "请稍后重试;如果问题持续存在,请检查 xacpx 运行日志和 state.json 写入权限。",
1959
+ sessionNotFound: (alias) => `会话「${alias}」不存在。`,
1960
+ sessionBlockedByTasks: (alias, count) => `会话「${alias}」下还有 ${count} 个未结束的任务,请先取消或等待完成。`,
1961
+ sessionBlockedByTasksHint: "使用 /tasks 查看任务列表,或 /task cancel <id> 取消任务。",
1962
+ sessionRemoved: (alias) => `已删除会话「${alias}」。`,
1963
+ sessionRemovedWasActive: "该会话是当前活跃会话,已自动清除相关聊天上下文。",
1964
+ sessionTransportShared: (transportSession, count) => `提示:后端会话「${transportSession}」仍被其他 ${count} 个会话引用,未关闭。`,
1965
+ sessionOrchestrationPurgeFailed: (warning) => `提示:清理任务编排引用失败(${warning}),请稍后执行 /tasks clean 手动清理。`,
1966
+ sessionTransportTeardownFailed: (warning) => `提示:后端会话未能自动关闭(${warning}),如有残留请手动执行 acpx sessions close。`,
1967
+ sessionHelpSummary: "创建、复用、切换和重置 xacpx 逻辑会话。",
1968
+ sessionHelpCmdSsList: "/sessions",
1969
+ sessionHelpCmdSsListDesc: "查看当前会话列表",
1970
+ sessionHelpCmdSsOrSlash: "/session 或 /ss",
1971
+ sessionHelpCmdSsOrSlashDesc: "查看会话列表",
1972
+ sessionHelpCmdSsQuick: "/ss <agent> (-d <path> | --ws <name>)",
1973
+ sessionHelpCmdSsQuickDesc: "快速新建或复用一个会话",
1974
+ sessionHelpCmdSsNew: "/ss new <agent> (-d <path> | --ws <name>)",
1975
+ sessionHelpCmdSsNewDesc: "强制新建会话",
1976
+ sessionHelpCmdSsNewAlias: "/ss new <alias> -a <name> --ws <name>",
1977
+ sessionHelpCmdSsNewAliasDesc: "按指定配置新建会话",
1978
+ sessionHelpCmdSsAttach: "/ss attach <alias> -a <name> --ws <name> --name <transport-session>",
1979
+ sessionHelpCmdSsAttachDesc: "绑定已有会话",
1980
+ sessionHelpCmdSsn: "/ssn 或 /help ssn",
1981
+ sessionHelpCmdSsnDesc: "接入本地 native 会话(Codex 等 Agent 原生会话)",
1982
+ sessionHelpCmdTail: "/session tail [N]",
1983
+ sessionHelpCmdTailDesc: "补拉当前会话的历史输出(默认 50 行)",
1984
+ sessionHelpCmdRm: "/session rm <alias>",
1985
+ sessionHelpCmdRmDesc: "删除逻辑会话",
1986
+ sessionHelpCmdUse: "/use <alias>",
1987
+ sessionHelpCmdUseDesc: "切换当前会话",
1988
+ sessionHelpCmdUseFuzzy: "/use <片段>",
1989
+ sessionHelpCmdUseFuzzyDesc: "按别名片段切换(精确>前缀>子串;多命中会列候选)",
1990
+ sessionHelpCmdUsePrev: "/use -",
1991
+ sessionHelpCmdUsePrevDesc: "切回上一个会话(像 shell 的 cd -)",
1992
+ sessionHelpCmdReset: "/session reset 或 /clear",
1993
+ sessionHelpCmdResetDesc: "重置当前会话上下文",
1994
+ nativeHelpSummary: "接入 Codex 等 Agent 的本地原生会话。",
1995
+ nativeHelpCmdSsn: "/ssn",
1996
+ nativeHelpCmdSsnDesc: "按当前 xacpx 会话上下文查看本地 native 会话",
1997
+ nativeHelpCmdSsnAgentWs: "/ssn <agent> --ws <workspace>",
1998
+ nativeHelpCmdSsnAgentWsDesc: "查询指定工作区的本地 native 会话;只有一个候选时自动接入",
1999
+ nativeHelpCmdSsnAgentDir: "/ssn <agent> -d <path>",
2000
+ nativeHelpCmdSsnAgentDirDesc: "按本机绝对路径查询;只有一个候选时自动接入",
2001
+ nativeHelpCmdSsnAgentAll: "/ssn <agent> --ws <workspace> --all",
2002
+ nativeHelpCmdSsnAgentAllDesc: "跨 cwd 查看该 agent 的 native 会话",
2003
+ nativeHelpCmdSsnNumber: "/ssn 1",
2004
+ nativeHelpCmdSsnNumberDesc: "接入或切换到最近一次列表里的第 1 个候选",
2005
+ nativeHelpCmdSsnNumberAlias: "/ssn 1 -a <alias>",
2006
+ nativeHelpCmdSsnNumberAliasDesc: "接入第 1 个候选并指定 xacpx 别名(推荐,无需完整 sessionId)",
2007
+ nativeHelpCmdSsnAttach: "/ssn attach <sessionId> -a <alias>",
2008
+ nativeHelpCmdSsnAttachDesc: "按原生 sessionId 接入(适合已知完整 id),并指定 xacpx 别名",
2009
+ nativeHelpCmdSsnAttachLong: "/ss attach native <sessionId> -a <alias>",
2010
+ nativeHelpCmdSsnAttachLongDesc: "/ssn attach 的长写法",
2011
+ nativeHelpNote1: "/ss 管 xacpx 逻辑会话;/ssn 只负责查询和接入 Agent 原生会话。",
2012
+ nativeHelpNote2: "接入后继续发普通消息,会继续同一个 Agent 原生会话,不是复制一份新上下文。",
2013
+ nativeHelpNote3: "如果当前 acpx 或 Agent 不支持 native 会话,请继续使用 /ss。",
2014
+ nativeHelpNote4: "完整说明见 docs/native-sessions.md。",
2015
+ modeHelpSummary: "查看或设置当前会话 mode。",
2016
+ modeHelpCmdShow: "/mode",
2017
+ modeHelpCmdShowDesc: "查看当前会话已保存的 mode",
2018
+ modeHelpCmdSet: "/mode <id>",
2019
+ modeHelpCmdSetDesc: "设置当前会话 mode",
2020
+ replyModeHelpSummary: "查看或设置当前逻辑会话的回复输出模式。",
2021
+ replyModeHelpCmdShow: "/replymode",
2022
+ replyModeHelpCmdShowDesc: "查看全局默认、当前覆盖和实际生效值",
2023
+ replyModeHelpCmdStream: "/replymode stream",
2024
+ replyModeHelpCmdStreamDesc: "当前会话使用流式回复",
2025
+ replyModeHelpCmdVerbose: "/replymode verbose",
2026
+ replyModeHelpCmdVerboseDesc: "当前会话流式回复并显示工具调用",
2027
+ replyModeHelpCmdFinal: "/replymode final",
2028
+ replyModeHelpCmdFinalDesc: "当前会话只发送最终文本",
2029
+ replyModeHelpCmdReset: "/replymode reset",
2030
+ replyModeHelpCmdResetDesc: "清除当前会话覆盖并回退到全局默认",
2031
+ statusHelpSummary: "查看当前选中会话的状态。",
2032
+ statusHelpCmdShow: "/status",
2033
+ statusHelpCmdShowDesc: "查看当前会话状态",
2034
+ cancelHelpSummary: "取消会话里正在执行的任务。",
2035
+ cancelHelpCmdCancel: "/cancel",
2036
+ cancelHelpCmdCancelDesc: "取消当前前台会话的任务",
2037
+ cancelHelpCmdCancelAlias: "/cancel <alias>",
2038
+ cancelHelpCmdCancelAliasDesc: "取消指定(含后台)会话的任务",
2039
+ cancelHelpCmdStop: "/stop",
2040
+ cancelHelpCmdStopDesc: "取消当前任务(/cancel 别名)",
2041
+ cancelHelpCmdStopAlias: "/stop <alias>",
2042
+ cancelHelpCmdStopAliasDesc: "取消指定会话的任务(/cancel <alias> 别名)"
2043
+ };
2044
+ });
2045
+
2046
+ // src/i18n/messages/zh/native-session.ts
2047
+ var nativeSession2;
2048
+ var init_native_session2 = __esm(() => {
2049
+ nativeSession2 = {
2050
+ transportNotSupported: `当前 transport 不支持列出本地会话,请继续使用 /ss。
2051
+ 说明:/help ssn`,
2052
+ noSessionsFound: (agentDisplayName, workspaceLabel) => `没有找到本地 ${agentDisplayName} 会话(${workspaceLabel})。`,
2053
+ noSessionsFoundHint: "你可以稍后再试,或先通过 /ss 保持当前逻辑会话。",
2054
+ selectPrompt: `请选择要切换的 native 会话编号或 sessionId。
2055
+ 说明:/help ssn`,
2056
+ noCachedList: `当前没有可用的 native 会话列表,请先执行 /ssn 再选择。
2057
+ 说明:/help ssn`,
2058
+ indexOutOfRange: "编号超出范围,请先执行 /ssn 重新获取列表。",
2059
+ attachNotSupported: "当前 transport 不支持接入本地会话,请继续使用 /ss。",
2060
+ alreadySwitched: (agentDisplayName, displayAlias) => `已切换到已接入的本地会话:${agentDisplayName} · ${displayAlias}`,
2061
+ attachVerificationFailed: (agentDisplayName) => `本地 ${agentDisplayName} 会话接入失败:未检测到已恢复的后端会话。`,
2062
+ attachedAndSwitched: (agentDisplayName, displayAlias) => `已接入本地 ${agentDisplayName} 会话并切换:${displayAlias}`,
2063
+ noContextHint: `请先选择上下文,例如:
2064
+ /ssn codex --ws project
2065
+ /ssn codex -d /Users/me/project
2066
+ 说明:/help ssn`,
2067
+ agentNotRegistered: (agent2) => `Agent「${agent2}」未注册。`,
2068
+ workspaceNotRegistered: (workspace2) => `工作区「${workspace2}」未注册。`,
2069
+ workspacePathNotFound: (cwd) => `工作区路径不存在:${cwd}`,
2070
+ noWritableConfig: "当前没有加载可写入的配置,无法根据路径创建工作区。",
2071
+ tableHeader: (agentDisplayName, workspaceLabel) => `本地 ${agentDisplayName} 会话(${workspaceLabel}):`,
2072
+ tableColNum: "#",
2073
+ tableColTitle: "标题",
2074
+ tableColUpdatedAt: "更新时间",
2075
+ tableColId: "ID",
2076
+ tableAttachedLabel: (displayAlias) => `已接入:${displayAlias}`,
2077
+ tableAttachedCurrent: " [当前]",
2078
+ tableActions: "操作:",
2079
+ tableActionAttach: "接入:/ssn 1",
2080
+ tableActionAlias: "指定别名:/ssn 1 -a fix-ci",
2081
+ tableActionHelp: "说明:/help ssn",
2082
+ tableMore: (cmd) => `更多:${cmd}`,
2083
+ cardHeader: (agentDisplayName, workspaceLabel) => `本地 ${agentDisplayName} 会话(${workspaceLabel}):`,
2084
+ cardReplyHint: "回复编号接入,ID 尾号用于区分。",
2085
+ cardTimeLabel: (updatedAt) => `时间:${updatedAt}`,
2086
+ cardIdLabel: (idTail) => `ID:${idTail}`,
2087
+ cardAttachedLabel: (displayAlias) => `已接入:${displayAlias}`,
2088
+ cardAttachedCurrent: " [当前]",
2089
+ cardActions: "操作:",
2090
+ cardActionAttach: "接入:/ssn 1",
2091
+ cardActionAlias: "指定别名:/ssn 1 -a fix-ci",
2092
+ cardActionHelp: "说明:/help ssn",
2093
+ cardMore: (cmd) => `更多:${cmd}`,
2094
+ listError: (agentDisplayName, errorMessage) => `本地 ${agentDisplayName} 会话查询失败:${errorMessage}`,
2095
+ listErrorHint: "请确认 acpx/Agent 支持 native 会话查询,或继续使用 /ss。",
2096
+ listErrorHelp: "说明:/help ssn",
2097
+ resumeError: (agentDisplayName, errorMessage) => `本地 ${agentDisplayName} 会话接入失败:${errorMessage}`,
2098
+ resumeErrorHint: "请确认 acpx/Agent 支持 native 会话恢复,或继续使用 /ss。",
2099
+ resumeErrorHelp: "说明:/help ssn"
2100
+ };
2101
+ });
2102
+
2103
+ // src/i18n/messages/zh/recovery.ts
2104
+ var recovery2;
2105
+ var init_recovery2 = __esm(() => {
2106
+ recovery2 = {
2107
+ transientSessionFailed: "定时任务的临时会话启动失败,本次任务未能执行。",
2108
+ transientSessionHint: "临时会话由系统在执行时自动创建,无需手动操作;如需重排,请用 /lt 重新安排。",
2109
+ sessionUnavailable: (alias) => `当前会话「${alias}」暂时不可用。`,
2110
+ sessionUnavailableRenewHint: (alias, agent2, quotedWorkspace) => `请先在微信里重新执行:/session new ${alias} --agent ${agent2} --ws ${quotedWorkspace}`,
2111
+ sessionUnavailableAttachHint: (alias, agent2, quotedWorkspace) => `如果你要绑定一个已有会话,再执行:/session attach ${alias} --agent ${agent2} --ws ${quotedWorkspace} --name <会话名>`,
2112
+ sessionInterrupted: (alias) => `当前会话「${alias}」执行中断,未收到最终回复。`,
2113
+ sessionInterruptedHint: "请直接重试;如果长时间无响应,可先发送 /cancel 后再重试。",
2114
+ sessionInterruptedError: (summary) => `错误信息:${summary}`,
2115
+ autoInstallHeadlineFixed: "⚠️ 自动安装已执行但未能修复会话启动问题",
2116
+ autoInstallHeadlineFailed: "❌ 自动安装失败",
2117
+ autoInstallOriginalError: "原始错误:",
2118
+ autoInstallStepVerifyFailed: (label) => `安装已执行但验证失败(${label}):会话仍抛出缺失依赖错误`,
2119
+ autoInstallStepError: (label, stderrTail) => `安装错误(${label}):
2120
+ ${stderrTail}`,
2121
+ autoInstallManual: (pkg) => `请手动执行:npm install -g ${pkg}`,
2122
+ autoInstallLog: (logPath) => `详细日志:${logPath}`,
2123
+ autoInstallScopePrecise: (manager, path2) => {
2124
+ const parts = ["精确"];
2125
+ if (manager)
2126
+ parts.push(manager);
2127
+ if (path2)
2128
+ parts.push(path2);
2129
+ return parts.join(" / ");
2130
+ },
2131
+ autoInstallScopeGlobal: "全局",
2132
+ sessionCreationFailed: "会话创建失败。",
2133
+ sessionCreationVerificationDetail: "未检测到可用的后端会话。",
2134
+ sessionCreationError: (summary) => `错误信息:${summary}`,
2135
+ sessionCreationAttachHint: (alias, agent2, quotedWorkspace) => `如果你要先绑定一个已有会话,可以执行:/session attach ${alias} --agent ${agent2} --ws ${quotedWorkspace} --name <会话名>`
2136
+ };
2137
+ });
2138
+
2139
+ // src/i18n/messages/zh/shortcut.ts
2140
+ var shortcut2;
2141
+ var init_shortcut2 = __esm(() => {
2142
+ shortcut2 = {
2143
+ noConfig: "当前没有加载可写入的配置。",
2144
+ agentNotRegistered: (agent2, hint) => `Agent「${agent2}」未注册。${hint}`,
2145
+ agentNotRegisteredAvailable: (names) => `当前可用:${names}`,
2146
+ agentNotRegisteredNone: "当前没有已注册的 Agent,请先执行 /agent add <模板>",
2147
+ reuseHeader: (display) => `已切换到会话「${display}」`,
2148
+ reuseWorkspace: (name) => `- 复用工作区:${name}`,
2149
+ reuseSession: (display) => `- 复用会话:${display}`,
2150
+ createdHeader: (display) => `已创建并切换到会话「${display}」`,
2151
+ createdNewWorkspace: (name, cwd) => `- 新增工作区:${name} -> ${cwd}`,
2152
+ createdReusedWorkspace: (name) => `- 复用工作区:${name}`,
2153
+ createdNewSession: (display) => `- 新增会话:${display}`,
2154
+ creationFailed: (alias) => `会话「${alias}」创建失败。`,
2155
+ creationFailedNewWorkspace: (name, cwd) => `- 已新增工作区:${name} -> ${cwd}`,
2156
+ creationFailedReusedWorkspace: (name) => `- 复用工作区:${name}`,
2157
+ creationFailedSession: "- 会话未创建,请重试。",
2158
+ workspaceNotRegistered: (workspace2, hint) => `工作区「${workspace2}」未注册。${hint}`,
2159
+ workspaceAvailable: (names) => `当前可用:${names}`,
2160
+ workspaceNone: "当前没有已注册的工作区,请先执行 /ws new <名称> -d <路径>",
2161
+ workspacePathNotFound: (cwd) => `工作区路径不存在:${cwd}`
2162
+ };
2163
+ });
2164
+
2165
+ // src/i18n/messages/zh/workspace.ts
2166
+ var workspace2;
2167
+ var init_workspace2 = __esm(() => {
2168
+ workspace2 = {
2169
+ workspacesEmpty: "还没有注册任何工作区。",
2170
+ workspacesHeader: "已注册的工作区:",
2171
+ noWritableConfig: "当前没有加载可写入的配置。",
2172
+ pathNotFound: (cwd) => `工作区路径不存在:${cwd}`,
2173
+ nameSanitized: (original, saved) => `名称 ${JSON.stringify(original)} 含有特殊字符,已保存为「${saved}」。如需保留原名请加 --raw。`,
2174
+ saved: (name) => `工作区「${name}」已保存`,
2175
+ removed: (name) => `工作区「${name}」已删除`,
2176
+ helpSummary: "管理已注册的工作区。",
2177
+ helpCmdList: "/workspaces",
2178
+ helpCmdListDesc: "查看当前已注册的工作区",
2179
+ helpCmdListOrAlias: "/workspace 或 /ws",
2180
+ helpCmdListOrAliasDesc: "查看工作区列表",
2181
+ helpCmdNew: "/ws new <name> -d <path> [--raw]",
2182
+ helpCmdNewDesc: "添加工作区;含特殊字符的名称会被自动规范化,--raw 保留原名",
2183
+ helpCmdRm: "/workspace rm <name>",
2184
+ helpCmdRmDesc: "删除工作区"
2185
+ };
2186
+ });
2187
+
2188
+ // src/i18n/messages/zh/agent.ts
2189
+ var agent2;
2190
+ var init_agent2 = __esm(() => {
2191
+ agent2 = {
2192
+ agentsEmpty: "还没有注册任何 Agent。",
2193
+ agentsHeader: "已注册的 Agent:",
2194
+ noWritableConfig: "当前没有加载可写入的配置。",
2195
+ unsupportedTemplate: (available) => `暂不支持这个 Agent 模板。当前可用:${available}`,
2196
+ alreadyExists: (name) => `Agent「${name}」已存在`,
2197
+ alreadyExistsDifferent: (name) => `Agent「${name}」已存在且配置不同。请先执行 /agent rm ${name}`,
2198
+ saved: (name) => `Agent「${name}」已保存`,
2199
+ notFound: "没有找到这个 Agent。",
2200
+ removed: (name) => `Agent「${name}」已删除`,
2201
+ helpSummary: "管理已注册的 Agent。",
2202
+ helpCmdList: "/agents",
2203
+ helpCmdListDesc: "查看当前已注册的 Agent",
2204
+ helpCmdAdd: (templates) => `/agent add <${templates}>`,
2205
+ helpCmdAddDesc: "添加内置 Agent 模板",
2206
+ helpCmdRm: "/agent rm <name>",
2207
+ helpCmdRmDesc: "删除一个 Agent"
2208
+ };
2209
+ });
2210
+
2211
+ // src/i18n/messages/zh/later.ts
2212
+ var later2;
2213
+ var init_later2 = __esm(() => {
2214
+ later2 = {
2215
+ serviceNotEnabled: "定时任务服务未启用。",
2216
+ bindAndTempMutuallyExclusive: "定时任务的 --bind 与 --temp 不能同时使用。",
2217
+ noSession: "当前没有会话,无法创建定时任务。",
2218
+ noSessionHint: "请先创建或切换到一个会话:",
2219
+ noSessionExampleNew: "- /ss codex --ws backend(新建并切换)",
2220
+ noSessionExampleUse: "- /use backend-codex(切换到已有会话)",
2221
+ slashMessageRejected: "不支持延迟执行 / 开头的命令。",
2222
+ slashMessageHint: "如果需要让 agent 解释命令,可以用自然语言描述:",
2223
+ slashMessageExample: "例如:/lt in 1h 请解释 /status 的作用",
2224
+ cancelSuccess: (id) => `已取消定时任务 #${id}`,
2225
+ cancelNotFound: (id) => `未找到待执行的定时任务 #${id}。`,
2226
+ cancelNotFoundHint: "可以用 /lt list 查看当前待执行任务。",
2227
+ missingMessage: "定时任务需要消息内容,请在时间后附上要发送的内容。",
2228
+ tooSoon: "定时任务执行时间必须在 10 秒之后。",
2229
+ outOfRange: "定时任务执行时间不能超过 7 天。",
2230
+ pastTodayTime: (value) => `今天 ${value} 已经过了,请指定一个未来的时间,或使用「明天」。`,
2231
+ unrecognizedTime: "无法识别时间格式。",
2232
+ unrecognizedTimeFormats: "支持的格式:",
2233
+ unrecognizedTimeExample1: "- /lt in 2h 消息(2小时后)",
2234
+ unrecognizedTimeExample2: "- /lt 30分钟后 消息",
2235
+ unrecognizedTimeExample3: "- /lt tomorrow 09:00 消息",
2236
+ unrecognizedTimeExample4: "- /lt 周五 09:00 消息",
2237
+ helpSummary: "定时任务:到点在临时会话执行(或 --bind 发到当前会话)",
2238
+ helpCmdCreate: "/lt <时间> <消息>",
2239
+ helpCmdCreateDesc: "创建定时任务",
2240
+ helpCmdBind: "/lt --bind <时间> <消息>",
2241
+ helpCmdBindDesc: "改为发送到当前会话",
2242
+ helpCmdTemp: "/lt --temp <时间> <消息>",
2243
+ helpCmdTempDesc: "强制使用临时会话",
2244
+ helpCmdList: "/lt list",
2245
+ helpCmdListDesc: "查看待执行定时任务",
2246
+ helpCmdCancel: "/lt cancel <id>",
2247
+ helpCmdCancelDesc: "取消定时任务",
2248
+ helpExample1: "/lt in 2h 检查 CI",
2249
+ helpExample2: "/lt 30分钟后 总结进展",
2250
+ helpExample3: "/lt tomorrow 09:00 看 PR",
2251
+ helpExample4: "/lt 今天 21:30 继续处理",
2252
+ helpExample5: "/lt 周五 09:00 继续处理",
2253
+ helpNote1: "只支持一次性任务,不支持重复执行",
2254
+ helpNote2: "时间必须在 10 秒之后、7 天之内",
2255
+ helpNote3: "默认在为本次任务新建的临时会话里执行,跑完即销毁",
2256
+ helpNote4: "加 --bind 改为发送到创建时绑定的当前会话(默认模式可用 later.defaultMode 配置)",
2257
+ helpNote5: "/lt list 显示全局待执行任务;群聊中只有群主可取消",
2258
+ helpNote6: "不支持延迟执行 / 开头的 xacpx 命令",
2259
+ helpNote7: "完整时间格式与说明见 docs/later-command.md"
2260
+ };
2261
+ });
2262
+
2263
+ // src/i18n/messages/zh/scheduled-render.ts
2264
+ var scheduledRender2;
2265
+ var init_scheduled_render2 = __esm(() => {
2266
+ scheduledRender2 = {
2267
+ tempSession: (workspace3, agent3) => `临时会话(${workspace3} · ${agent3})`,
2268
+ boundSession: (displaySession) => `会话:${displaySession}`,
2269
+ helpUsage: "定时任务用法:",
2270
+ helpCreate: "创建:",
2271
+ helpCreateEx1: "/lt in 2h 检查 CI",
2272
+ helpCreateEx2: "/lt 30分钟后 总结进展",
2273
+ helpCreateEx3: "/lt tomorrow 09:00 看 PR",
2274
+ helpCreateEx4: "/lt 周五 09:00 继续处理",
2275
+ helpView: "查看:",
2276
+ helpViewCmd: "/lt list",
2277
+ helpCancel: "取消:",
2278
+ helpCancelCmd: "/lt cancel <id>",
2279
+ helpNotes: "说明:",
2280
+ helpNote1: "- 只支持一次性任务",
2281
+ helpNote2: "- 时间必须在 10 秒之后、7 天之内",
2282
+ helpNote3: "- 默认在为本次任务新建的临时会话里执行(跑完即销毁)",
2283
+ helpNote4: "- 加 --bind 改为发送到创建时绑定的当前会话",
2284
+ helpNote5: "- 触发通知和 agent 回复复用现有频道路由;微信回复额度由现有路由控制",
2285
+ helpNote6: "- 不支持延迟执行 / 开头的 xacpx 命令",
2286
+ helpNote7: "- 完整时间格式与说明见 docs/later-command.md",
2287
+ unsupportedChannel: "当前频道暂不支持定时任务,未创建任务。",
2288
+ unsupportedChannelReason: "原因:这个频道还没有实现定时消息投递能力,任务到点后无法把结果发回原聊天。",
2289
+ unsupportedChannelHint: "请切换到支持定时任务的频道后再使用 /lt。",
2290
+ taskCreated: (id) => `已创建定时任务 #${id}`,
2291
+ taskExecuteAt: (datetime) => `执行时间:${datetime}`,
2292
+ taskContent: (preview) => `内容:${preview}`,
2293
+ listEmpty: "当前没有待执行定时任务。",
2294
+ listHeader: "待执行定时任务:",
2295
+ weekdaySun: "周日",
2296
+ weekdayMon: "周一",
2297
+ weekdayTue: "周二",
2298
+ weekdayWed: "周三",
2299
+ weekdayThu: "周四",
2300
+ weekdayFri: "周五",
2301
+ weekdaySat: "周六"
2302
+ };
2303
+ });
2304
+
2305
+ // src/i18n/messages/zh/orchestration.ts
2306
+ var orchestration2;
2307
+ var init_orchestration2 = __esm(() => {
2308
+ orchestration2 = {
2309
+ noCurrentSession: "当前还没有选中的会话。请先执行 /session new ... 或 /use <alias>。",
2310
+ serviceUnavailable: "当前未启用任务编排服务。",
2311
+ taskNotFound: "没有找到对应任务。",
2312
+ groupNotFound: "没有找到对应任务组。",
2313
+ delegateSuccessCreated: (taskId) => `已创建委派任务「${taskId}」`,
2314
+ delegateSuccessWorker: (workerSession) => `worker 会话:${workerSession}`,
2315
+ groupCreatedId: (groupId) => `已创建任务组「${groupId}」`,
2316
+ groupCreatedTitle: (title) => `- 标题:${title}`,
2317
+ groupListEmpty: "当前协调会话下还没有任务组。",
2318
+ groupListHeader: "当前协调会话的任务组:",
2319
+ groupSummaryId: (groupId) => `任务组「${groupId}」`,
2320
+ groupSummaryTitle: (title) => `- 标题:${title}`,
2321
+ groupSummaryCoordinator: (coordinatorSession) => `- 协调会话:${coordinatorSession}`,
2322
+ groupSummaryTotal: (count) => `- 总任务数:${count}`,
2323
+ groupSummaryPending: (count) => `- 待确认:${count}`,
2324
+ groupSummaryRunning: (count) => `- 运行中:${count}`,
2325
+ groupSummaryCompleted: (count) => `- 已完成:${count}`,
2326
+ groupSummaryFailed: (count) => `- 已失败:${count}`,
2327
+ groupSummaryCancelled: (count) => `- 已取消:${count}`,
2328
+ groupSummaryTerminal: (isTerminal) => `- 是否终态:${isTerminal ? "是" : "否"}`,
2329
+ groupSummaryTerminalYes: "是",
2330
+ groupSummaryTerminalNo: "否",
2331
+ groupSummaryInjectionPending: (pending) => `- 注入待处理:${pending ? "是" : "否"}`,
2332
+ groupSummaryInjectionAppliedAt: (time) => `- 注入完成时间:${time}`,
2333
+ groupSummaryLastInjectionError: (error) => `- 最近注入错误:${error}`,
2334
+ groupSummaryMembersHeader: "- 成员:",
2335
+ groupCancelSuccessId: (groupId) => `任务组「${groupId}」已发起取消`,
2336
+ groupCancelSuccessCancelledCount: (count) => `- 已请求取消:${count}`,
2337
+ groupCancelSuccessSkippedCount: (count) => `- 已跳过终态任务:${count}`,
2338
+ taskListEmpty: "当前协调会话下还没有任务。",
2339
+ taskListHeader: "当前协调会话的任务:",
2340
+ taskSummaryId: (taskId) => `任务「${taskId}」`,
2341
+ taskSummaryStatus: (status) => `- 状态:${status}`,
2342
+ taskSummaryCoordinator: (coordinatorSession) => `- 协调会话:${coordinatorSession}`,
2343
+ taskSummaryWorker: (workerSession) => `- worker 会话:${workerSession}`,
2344
+ taskSummaryWorkerUnassigned: "未分配",
2345
+ taskSummaryTargetAgent: (agent3) => `- 目标 Agent:${agent3}`,
2346
+ taskSummaryRole: (role) => `- 角色:${role}`,
2347
+ taskSummaryGroup: (groupId) => `- 任务组:${groupId}`,
2348
+ taskSummarySource: (sourceKind, sourceHandle, roleSuffix) => `- 来源:${sourceKind} / ${sourceHandle}${roleSuffix}`,
2349
+ taskSummaryTask: (task) => `- 任务:${task}`,
2350
+ taskSummarySummary: (summary) => `- 摘要:${summary}`,
2351
+ taskSummaryLatestProgress: (progress) => `- 最新进展:${progress}`,
2352
+ taskSummaryResult: (result) => `- 结果:${result}`,
2353
+ taskSummaryTimelineHeader: "- 时间线:",
2354
+ taskCancelAlreadyDone: (taskId) => `任务「${taskId}」已结束。`,
2355
+ taskCancelRequested: (taskId) => `已请求取消任务「${taskId}」。`,
2356
+ taskCancelled: (taskId) => `任务「${taskId}」已取消。`,
2357
+ taskCurrentStatus: (status) => `- 当前状态:${status}`,
2358
+ taskApproved: (taskId) => `已批准任务「${taskId}」。`,
2359
+ taskRejected: (taskId) => `已拒绝任务「${taskId}」。`,
2360
+ taskConfirmationUnavailable: (taskId) => `任务「${taskId}」当前不是待确认状态。`,
2361
+ tasksCleanEmpty: "当前协调会话下没有可清理的任务。",
2362
+ tasksCleanRemovedTasks: (count) => `已清理 ${count} 个已结束的任务。`,
2363
+ tasksCleanRemovedBindings: (count) => `已释放 ${count} 个无效的 worker 绑定。`,
2364
+ taskListItemGroup: (groupId) => `;组:${groupId}`,
2365
+ taskListItemSource: (sourceKind, sourceHandle, roleSuffix) => `;来源:${sourceKind} / ${sourceHandle}${roleSuffix}`,
2366
+ taskListItemNoticePending: "通知待重试",
2367
+ taskListItemInjectionPending: "注入待重试",
2368
+ taskListItemCancelling: "取消中",
2369
+ groupListItemInjectionPending: "注入待重试",
2370
+ groupListItemTotal: (count) => `总计 ${count}`,
2371
+ groupListItemPending: (count) => `待确认 ${count}`,
2372
+ groupListItemRunning: (count) => `运行中 ${count}`,
2373
+ groupListItemCompleted: (count) => `完成 ${count}`,
2374
+ groupListItemFailed: (count) => `失败 ${count}`,
2375
+ groupListItemCancelled: (count) => `取消 ${count}`,
2376
+ truncatedResult: (taskId) => `
2377
+ ... (结果已截断,完整内容请执行 /task ${taskId})`,
2378
+ nextActionNoMembers: "本组没有任何成员,可忽略此聚合结果。",
2379
+ nextActionMixed: "优先分析 failures 段的失败原因,并决定是否基于 successes 结果继续推进。",
2380
+ nextActionAllFailed: "本组全部失败,请先诊断 failures 段后再决定下一步。",
2381
+ nextActionOtherOnly: "本组尚未产出结果,其余成员仍在进行或已取消。",
2382
+ nextActionMostlySuccess: "可基于 successes 段继续推进,其余成员仍在进行或已取消。",
2383
+ nextActionAllSuccess: "可基于 successes 段继续推进。",
2384
+ helpSummary: "委派子任务、组织任务组、查看任务状态,并处理待确认的编排请求。",
2385
+ helpCmdDg: "/dg <agent> <task>",
2386
+ helpCmdDgDesc: "把当前主线中的子任务快速委派给目标 agent",
2387
+ helpCmdDelegate: "/delegate <agent> <task>",
2388
+ helpCmdDelegateDesc: "把当前主线中的子任务委派给目标 agent",
2389
+ helpCmdDelegateRole: "/delegate <agent> --role <role> <task>",
2390
+ helpCmdDelegateRoleDesc: "按指定角色模板委派子任务",
2391
+ helpCmdDelegateGroup: "/delegate <agent> --group <groupId> <task>",
2392
+ helpCmdDelegateGroupDesc: "把委派任务附加到指定任务组",
2393
+ helpCmdGroupNew: "/group new <title>",
2394
+ helpCmdGroupNewDesc: "在当前主线下创建一个任务组",
2395
+ helpCmdGroupGet: "/group <id>",
2396
+ helpCmdGroupGetDesc: "查看单个任务组详情",
2397
+ helpCmdGroupAdd: "/group add <groupId> <agent> <task>",
2398
+ helpCmdGroupAddDesc: "把子任务加入已有任务组(等价于 /delegate --group)",
2399
+ helpCmdGroupAddRole: "/group add <groupId> <agent> --role <role> <task>",
2400
+ helpCmdGroupAddRoleDesc: "按角色模板把子任务加入已有任务组",
2401
+ helpCmdGroupCancel: "/group cancel <groupId>",
2402
+ helpCmdGroupCancelDesc: "取消指定任务组下所有未结束任务",
2403
+ helpCmdGroups: "/groups",
2404
+ helpCmdGroupsDesc: "查看当前主线下的任务组列表",
2405
+ helpCmdTasks: "/tasks",
2406
+ helpCmdTasksDesc: "查看当前主线下的任务列表",
2407
+ helpCmdTasksStatus: "/tasks --status <state>",
2408
+ helpCmdTasksStatusDesc: "按状态过滤任务(running/completed/failed/cancelled/needs_confirmation)",
2409
+ helpCmdTasksStuck: "/tasks --stuck",
2410
+ helpCmdTasksStuckDesc: "只看心跳超时的 running 任务",
2411
+ helpCmdTasksClean: "/tasks clean",
2412
+ helpCmdTasksCleanDesc: "清理当前主线下的已结束任务和无效绑定",
2413
+ helpCmdTaskGet: "/task <id>",
2414
+ helpCmdTaskGetDesc: "查看单个任务详情",
2415
+ helpCmdTaskApprove: "/task approve <id>",
2416
+ helpCmdTaskApproveDesc: "批准一个 needs_confirmation 任务并开始派发",
2417
+ helpCmdTaskReject: "/task reject <id>",
2418
+ helpCmdTaskRejectDesc: "拒绝一个 needs_confirmation 任务",
2419
+ helpCmdTaskCancel: "/task cancel <id>",
2420
+ helpCmdTaskCancelDesc: "取消当前主线下的任务",
2421
+ helpExample1: "/dg claude 审查当前方案的 3 个最高风险点",
2422
+ helpExample2: "/dg claude --group review-batch 审查接口设计",
2423
+ helpExample3: "/dg codex --role planner 把这个需求拆成最小实现步骤",
2424
+ helpExample4: "/group new parallel review",
2425
+ helpExample5: "/group add review-batch claude --role reviewer 审查接口设计",
2426
+ helpExample6: "/groups",
2427
+ helpExample7: "/group cancel review-batch",
2428
+ helpExample8: "/tasks",
2429
+ helpExample9: "/tasks clean",
2430
+ helpExample10: "/task approve task_123"
2431
+ };
2432
+ });
2433
+
2434
+ // src/i18n/messages/zh/coordinator-prompt.ts
2435
+ var coordinatorPrompt2;
2436
+ var init_coordinator_prompt2 = __esm(() => {
2437
+ coordinatorPrompt2 = {
2438
+ pendingResultsHeader: "以下是自上次以来完成的委派任务结果,请先吸收这些结果再回答用户问题。",
2439
+ humanReplyBindingHeader: "当前存在一个等待 human 回复的问题包,请先判断这条回复解决了哪些 task。",
2440
+ reopenedOutsideSnapshotLabel: "reopened_tasks_outside_snapshot: 以下 task 不属于当前待解释消息,只能作为后续 follow-up 参考,不要用本次 human 回复直接解决。",
2441
+ activePackageAwaitingReply: "当前仍有一个 active human package 等待回复。",
2442
+ packageNotDelivered: "当前问题包尚未成功送达 human,请先按普通主线对话处理,并提醒该问题包仍待送达或继续。",
2443
+ activePackageNotClosed: "当前 active human package 仍未收口,请先继续 follow-up,不要新开问题包。",
2444
+ recentHumanPackageLabel: "最近一次发给 human 的问题包:",
2445
+ userMessageLabel: "用户最新消息:"
2446
+ };
2447
+ });
2448
+
2449
+ // src/i18n/messages/zh/worker-prompt.ts
2450
+ var workerPrompt2;
2451
+ var init_worker_prompt2 = __esm(() => {
2452
+ workerPrompt2 = {
2453
+ taskHeader: "这是来自 xacpx 的委派任务。",
2454
+ taskIdLabel: (taskId) => `任务 ID: ${taskId}`,
2455
+ taskWorkerSessionLabel: (workerSession) => `当前 worker 会话: ${workerSession}`,
2456
+ taskRoleLabel: (role) => `角色: ${role}`,
2457
+ taskInstruction: "请直接完成下面的任务;xacpx 会记录你的最终回复。",
2458
+ taskBlockerInstruction: "如果你因为关键上下文缺失、权限边界或业务决策而无法继续,请不要猜测;调用 worker_raise_question 提交 question / whyBlocked / whatIsNeeded,让 coordinator 决定下一步。",
2459
+ taskProgressInstruction: "当你完成一个重要步骤时,单独输出一行 [PROGRESS] 加简要进度说明,例如:[PROGRESS] 已完成代码审查。",
2460
+ taskProgressNote: "不需要每个动作都汇报,只在关键里程碑时输出。",
2461
+ taskContentLabel: (task) => `任务内容: ${task}`,
2462
+ answerHeader: "以下是 coordinator 对你 blocker 的整理后答复,请基于这些明确指令继续当前任务。",
2463
+ answerInstruction: "不要把原始 human 对话当成上下文来源;只执行下面的答案。",
2464
+ answerLabel: "答案:"
2465
+ };
2466
+ });
2467
+
2468
+ // src/i18n/messages/zh/config.ts
2469
+ var config2;
2470
+ var init_config2 = __esm(() => {
2471
+ config2 = {
2472
+ helpSummary: "查看和修改受支持的配置字段。",
2473
+ helpCmdShow: "/config",
2474
+ helpCmdShowDesc: "查看当前支持修改的配置路径",
2475
+ helpCmdSet: "/config set <path> <value>",
2476
+ helpCmdSetDesc: "修改一个受支持的配置值",
2477
+ showSupportedHeader: "支持修改的配置字段:",
2478
+ showLegacyHeader: "兼容旧配置:",
2479
+ showExamplesHeader: "示例:",
2480
+ legacyWechatReplyMode: "wechat.replyMode(已弃用,请使用 channel.replyMode)",
2481
+ legacyChannelType: "channel.type(已禁用写入;请使用 xacpx channel ... 管理 channels[])",
2482
+ legacyChannels: "channels[](多频道运行配置,请编辑 JSON)",
2483
+ noWritableConfig: "当前没有加载可写入的配置。",
2484
+ updated: (path2, value) => `配置已更新:${path2} = ${value}`,
2485
+ languageInvalid: "language 只支持:en、zh",
2486
+ transportTypeInvalid: "transport.type 只支持:acpx-cli、acpx-bridge",
2487
+ transportCommandEmpty: "transport.command 不能为空。",
2488
+ transportPermissionModeInvalid: "transport.permissionMode 只支持:approve-all、approve-reads、deny-all",
2489
+ transportNonInteractiveInvalid: "transport.nonInteractivePermissions 只支持:deny、fail",
2490
+ transportPermissionPolicyEmpty: "transport.permissionPolicy 不能为空。",
2491
+ loggingLevelInvalid: "logging.level 只支持:error、info、debug",
2492
+ mustBePositiveNumber: (path2) => `${path2} 必须是正数。`,
2493
+ channelTypeDisabled: "channel.type 是旧单频道字段,/config set 已禁用写入;请使用 `xacpx channel ...` 管理 channels[],然后重启 xacpx。",
2494
+ channelReplyModeInvalid: "channel.replyMode 只支持:stream、final、verbose",
2495
+ wechatReplyModeInvalid: "wechat.replyMode 只支持:stream、final、verbose",
2496
+ wechatReplyModeMapped: (value) => `${value}(已映射到 channel.replyMode)`,
2497
+ agentNotFound: (name) => `Agent「${name}」不存在,请先创建。`,
2498
+ fieldEmpty: (path2) => `${path2} 不能为空。`,
2499
+ workspaceNotFound: (name) => `工作区「${name}」不存在,请先创建。`,
2500
+ pathNotSupported: (path2) => `不支持修改这个配置路径:${path2}`
2501
+ };
2502
+ });
2503
+
2504
+ // src/i18n/messages/zh/permission.ts
2505
+ var permission2;
2506
+ var init_permission2 = __esm(() => {
2507
+ permission2 = {
2508
+ helpSummary: "查看和修改 transport 权限策略。",
2509
+ helpCmdShow: "/pm 或 /permission",
2510
+ helpCmdShowDesc: "查看当前权限模式",
2511
+ helpCmdSet: "/pm set <allow|read|deny>",
2512
+ helpCmdSetDesc: "设置审批级别",
2513
+ helpCmdAuto: "/pm auto",
2514
+ helpCmdAutoDesc: "查看当前非交互策略",
2515
+ helpCmdAutoSet: "/pm auto <deny|fail>",
2516
+ helpCmdAutoSetDesc: "设置非交互策略",
2517
+ noWritableConfig: "当前没有加载可写入的配置。",
2518
+ statusTitleCurrent: "当前权限模式:",
2519
+ statusTitleAutoStatus: "当前非交互策略:",
2520
+ statusTitleModeUpdated: "权限模式已更新:",
2521
+ statusTitleAutoUpdated: "非交互策略已更新:"
2522
+ };
2523
+ });
2524
+
2525
+ // src/i18n/messages/zh/help.ts
2526
+ var help2;
2527
+ var init_help2 = __esm(() => {
2528
+ help2 = {
2529
+ invalidCommandPrefix: "命令格式不正确,请参考下面的用法:",
2530
+ invalidCommandFallbackHeader: "无法识别的命令格式。",
2531
+ invalidCommandFallbackFormat: `正确的会话创建格式:
2532
+ /session new <别名> --agent <Agent名> --ws <工作区名>`,
2533
+ invalidCommandFallbackExample: `例如:
2534
+ /session new demo --agent claude --ws weacpx`,
2535
+ indexCommonHeader: "常用入口:",
2536
+ indexEntryShortcut: "- /ss <agent> (-d <path> | --ws <name>) - 快速新建或切到会话",
2537
+ indexEntryNative: "- /ssn <agent> (-d <path> | --ws <name>) - 接入本地 Agent 原生会话",
2538
+ indexEntryUse: "- /use <alias> - 切换当前会话",
2539
+ indexEntryStatus: "- /status - 查看当前会话状态",
2540
+ indexTopicsHeader: "顶级命令:",
2541
+ indexViewTopicHeader: "查看专题说明:",
2542
+ indexViewTopicExample: "- 例如:/help ss、/help ssn、/help ws、/help pm",
2543
+ topicHeader: (name) => `帮助主题:${name}`,
2544
+ topicSummary: (summary) => `说明:${summary}`,
2545
+ topicAliases: (aliases) => `别名:${aliases}`,
2546
+ topicCommandsHeader: "命令:",
2547
+ topicExamplesHeader: "示例:",
2548
+ topicNotesHeader: "注意:",
2549
+ unknownTopicHeader: (name) => `未知帮助主题:${name}`,
2550
+ unknownTopicAvailableHeader: "可用主题:"
2551
+ };
2552
+ });
2553
+
2554
+ // src/i18n/messages/zh/hints.ts
2555
+ var hints2;
2556
+ var init_hints2 = __esm(() => {
2557
+ hints2 = {
2558
+ helpDescription: "查看命令帮助。"
2559
+ };
2560
+ });
2561
+
2562
+ // src/i18n/messages/zh/router.ts
2563
+ var router2;
2564
+ var init_router2 = __esm(() => {
2565
+ router2 = {
2566
+ depMissing: (pkg) => `\uD83D\uDCE6 检测到缺失依赖 \`${pkg}\`,正在自动安装…`,
2567
+ depInstallVerifying: "\uD83D\uDD04 安装完成,正在验证会话启动…",
2568
+ agentHeartbeat: (agent3, elapsed) => `⏳ \`${agent3}\` 仍在准备中…(已等待 ${elapsed}s)`,
2569
+ agentSpawning: (agent3) => `\uD83D\uDE80 正在启动 \`${agent3}\`…`,
2570
+ agentInitializing: (agent3, elapsed) => `\uD83D\uDD27 \`${agent3}\` 初始化中…(已等待 ${elapsed}s)`,
2571
+ acpxNoteElapsed: (note, elapsed) => `${note}(已等待 ${elapsed}s)`
2572
+ };
2573
+ });
2574
+
2575
+ // src/i18n/messages/zh/acpx-note.ts
2576
+ var acpxNote2;
2577
+ var init_acpx_note2 = __esm(() => {
2578
+ acpxNote2 = {
2579
+ spawnBuiltIn: (name) => `\uD83D\uDD29 正在启动内置 agent \`${name}\``,
2580
+ spawnAgent: "\uD83D\uDD29 正在启动 agent 进程",
2581
+ downloading: "\uD83D\uDCE5 正在下载 agent 依赖…",
2582
+ installing: "\uD83E\uDDE9 正在安装 agent 依赖…",
2583
+ initializing: "\uD83D\uDD27 agent 初始化中…",
2584
+ fallback: (line) => `ℹ️ ${line}`
2585
+ };
2586
+ });
2587
+
2588
+ // src/i18n/messages/zh/render.ts
2589
+ var render2;
2590
+ var init_render2 = __esm(() => {
2591
+ render2 = {
2592
+ taskProgress: (taskId, targetAgent, summary) => `⏳ 任务「${taskId}」(${targetAgent}):${summary}`,
2593
+ taskHeartbeat: (taskId, minutes) => `⏳ 任务「${taskId}」已运行 ${minutes} 分钟,等待中...`
2594
+ };
2595
+ });
2596
+
2597
+ // src/i18n/messages/zh/cli.ts
2598
+ var cli2;
2599
+ var init_cli2 = __esm(() => {
2600
+ cli2 = {
2601
+ helpLines: [
2602
+ "用法:",
2603
+ "xacpx login - 微信登录",
2604
+ "xacpx logout - 退出登录",
2605
+ "xacpx run - 前台运行",
2606
+ "xacpx start - 后台启动",
2607
+ "xacpx status - 查看状态",
2608
+ "xacpx stop - 停止服务",
2609
+ "xacpx restart - 重启后台服务",
2610
+ "xacpx update [--all|<name>] - 更新 xacpx 和已安装插件",
2611
+ "xacpx channel|ch list|show|add|rm|enable|disable [--account <id>] - 管理消息频道(多 bot 用 --account)",
2612
+ "xacpx plugin list|add|update|remove|enable|disable|doctor|known - 管理插件",
2613
+ "xacpx doctor - 运行诊断",
2614
+ "xacpx version - 查看版本",
2615
+ "xacpx agent|agents list|add|rm|templates - 管理本机 Agent",
2616
+ "xacpx workspace list|add [name] [--raw]|rm <name> - 管理本机工作区(别名:ws)",
2617
+ "xacpx later|lt list|cancel <id> - 管理本机待执行定时任务",
2618
+ "xacpx mcp-stdio [--coordinator-session <session>] [--source-handle <handle>] [--workspace <name>] - 启动 MCP stdio 服务"
2619
+ ],
2620
+ alreadyRunning: "xacpx 已在后台运行",
2621
+ started: "xacpx 已在后台启动",
2622
+ startFailed: (detail) => `xacpx 启动失败:${detail}`,
2623
+ running: "xacpx 正在运行",
2624
+ notRunning: "xacpx 未运行",
2625
+ indeterminate: "xacpx 进程仍在运行,但状态元数据缺失",
2626
+ stopped: "xacpx 已停止",
2627
+ restarting: "xacpx 正在重启...",
2628
+ restartNotRunning: "xacpx 未运行,正在启动...",
2629
+ restartFailed: (detail) => `xacpx 重启失败:${detail}`,
2630
+ restartIndeterminate: "xacpx 进程仍在运行,但状态元数据缺失",
2631
+ restartIndeterminateHint: "请先执行 `xacpx stop`,或手动清理 stale PID/status 后再重试。",
2632
+ checkAppLog: (path2) => `请查看 App Log: ${path2}`,
2633
+ checkStderrLog: (path2) => `请查看 Stderr: ${path2}`,
2634
+ workspaceEmpty: "还没有工作区。",
2635
+ workspaceListHeader: "工作区列表:",
2636
+ workspaceNameEmpty: "工作区名称不能为空。",
2637
+ workspaceNameSanitized: (sourceLabel, original, saved) => `${sourceLabel} ${JSON.stringify(original)} 含有特殊字符,已保存为「${saved}」。如需保留原名请加 --raw。`,
2638
+ workspaceSourceLabelDir: "目录名",
2639
+ workspaceSourceLabelName: "名称",
2640
+ workspaceAlreadyExists: (name, cwd) => `工作区「${name}」已存在:${cwd}`,
2641
+ workspaceConflictPath: (name, cwd) => `工作区「${name}」已存在,但路径不同:${cwd}`,
2642
+ workspaceConflictHint: (name) => `请换一个名称,或先执行:xacpx workspace rm ${name}`,
2643
+ workspaceSaved: (name, cwd) => `工作区「${name}」已保存:${cwd}`,
2644
+ workspaceNotFound: (name) => `没有找到工作区「${name}」。`,
2645
+ workspaceRemoved: (name) => `工作区「${name}」已删除`,
2646
+ agentEmpty: "还没有 Agent。",
2647
+ agentListHeader: "Agent 列表:",
2648
+ agentTemplatesHeader: "可用 Agent 模板:",
2649
+ agentNameEmpty: "Agent 名称不能为空。",
2650
+ agentUnsupportedTemplate: (templates) => `暂不支持这个 Agent 模板。当前可用:${templates.join("、")}`,
2651
+ agentAlreadyExists: (name) => `Agent「${name}」已存在`,
2652
+ agentAlreadyExistsDifferent: (name) => `Agent「${name}」已存在且配置不同。请先执行:xacpx agent rm ${name}`,
2653
+ agentSaved: (name) => `Agent「${name}」已保存`,
2654
+ agentNotFound: (name) => `没有找到 Agent「${name}」。`,
2655
+ agentRemoved: (name) => `Agent「${name}」已删除`,
2656
+ laterIdEmpty: "定时任务 ID 不能为空。",
2657
+ laterNotFound: (id) => `未找到待执行的定时任务 #${id}。`,
2658
+ laterNotFoundHint: "可以用 xacpx later list 查看当前待执行任务。",
2659
+ laterCancelled: (id) => `已取消定时任务 #${id}`
2660
+ };
2661
+ });
2662
+
2663
+ // src/i18n/messages/zh/cli-update.ts
2664
+ var cliUpdate2;
2665
+ var init_cli_update2 = __esm(() => {
2666
+ cliUpdate2 = {
2667
+ updatesAvailable: "可更新项:",
2668
+ unavailableAborted: (names) => `以下项目无法检查最新版本,已取消更新:${names}`,
2669
+ nothingToUpdate: "没有需要更新的项目。",
2670
+ selfUpdateNeedsConfirmNonInteractive: (name) => `更新 ${name} 本体需要确认;非交互模式请使用 \`${name} update --all\` 或 \`${name} update ${name}\`。`,
2671
+ renameNeedsConfirmNonInteractive: (successor) => `weacpx 已更名为 ${successor};非交互模式请使用 \`weacpx update --all\` 或 \`weacpx update weacpx\` 确认迁移。`,
2672
+ selfUpdateConfirmPrompt: (name) => `确认更新 ${name} 本体?[y/N] `,
2673
+ renameConfirmPrompt: (successor) => `weacpx 已更名为 ${successor},确认迁移到 ${successor}?[y/N] `,
2674
+ selfUpdateCancelled: (name) => `已取消更新 ${name} 本体。`,
2675
+ renameCancelled: (successor) => `已取消迁移到 ${successor}。`,
2676
+ selfUpdated: (name, version) => `${name} 已更新:${version}`,
2677
+ renameMigrated: (successor, version) => `weacpx 已更名为 ${successor},已迁移至 ${successor} ${version}。今后请使用 \`${successor}\` 命令;若此前在后台运行,请用 \`${successor} start\` 重新启动。`,
2678
+ pluginUpdated: (name, version) => `插件 ${name} 已更新:${version}`,
2679
+ pluginRollbackFailed: (name, version, error) => `回滚 ${name} 到 ${version} 失败:${error}`,
2680
+ pluginNotInConfig: (name) => `配置中没有找到插件 ${name}`,
2681
+ updateFailed: (name, error) => `${name} 更新失败:${error}`,
2682
+ targetNotFound: (name) => `没有找到更新项:${name}`,
2683
+ targetVersionUnknown: (name) => `${name} 无法检查最新版本,已跳过。`,
2684
+ targetNotPinned: (name) => `${name} 未记录当前版本;请先使用 \`xacpx plugin update ${name}\` 或显式选择版本。`,
2685
+ multiTargetNonInteractive: "检测到已安装插件;非交互模式请使用 `xacpx update --all` 或 `xacpx update <name>`。",
2686
+ selectionPrompt: "请选择要更新的项目(数字,逗号分隔,a=全部,回车取消):",
2687
+ selectionInvalid: (part) => `无效选择:${part}`,
2688
+ formatSelf: (name, current, latest) => `${name} (${current} -> ${latest})`,
2689
+ formatRename: (successor, current, latest) => `weacpx → ${successor} (${current} -> ${latest},改名)`,
2690
+ formatPlugin: (name, current, latest) => `插件 ${name} (${current} -> ${latest})`,
2691
+ versionUnlocked: "未锁定",
2692
+ versionUnknown: "无法检查"
2693
+ };
2694
+ });
2695
+
2696
+ // src/i18n/messages/zh/channel-cli.ts
2697
+ var channelCli2;
2698
+ var init_channel_cli2 = __esm(() => {
2699
+ channelCli2 = {
2700
+ noChannels: "还没有配置消息频道。",
2701
+ channelListHeader: "消息频道:",
2702
+ channelNotFound: (type) => `没有找到频道:${type}`,
2703
+ channelHeader: (id) => `频道 ${id}:`,
2704
+ channelNoMultiAccount: (type) => `频道 ${type} 不支持 --account(多账号 CLI)。`,
2705
+ channelAccountNotFound: (type, accountId) => `频道 ${type} 的账号 ${accountId} 不存在。`,
2706
+ channelAccountHeader: (id, accountId) => `频道 ${id} / 账号 ${accountId}:`,
2707
+ missingRequiredFlags: (flags) => `缺少必填参数:${flags}`,
2708
+ channelAlreadyExistsSame: (type) => `频道 ${type} 已存在,配置相同。`,
2709
+ channelAlreadyExistsDifferent: (type) => `频道 ${type} 已存在但配置不同;请先执行:xacpx channel rm ${type},然后重新 add。`,
2710
+ channelAdded: (type) => `频道 ${type} 已添加`,
2711
+ cannotRemoveLastEnabled: "不能删除最后一个启用的频道。",
2712
+ channelRemoved: (id) => `频道 ${id} 已删除`,
2713
+ cannotDisableLastEnabled: "不能禁用最后一个启用的频道。",
2714
+ channelEnabledToggled: (id, enabled) => `频道 ${id} 已${enabled ? "启用" : "禁用"}`,
2715
+ channelAccountAlreadyExists: (type, accountId) => `频道 ${type} 的账号 ${accountId} 已存在;先 xacpx channel rm ${type} --account ${accountId}`,
2716
+ channelAccountAdded: (type, accountId) => `频道 ${type} 账号 ${accountId} 已添加`,
2717
+ channelReEnabled: (type) => `频道 ${type} 此前是 disabled 状态,已自动启用。`,
2718
+ channelAccountRemoveBlockedLast: (accountId, type) => `账号 ${accountId} 是频道 ${type} 的最后一个账号;删除会导致频道空配置。请改用 xacpx channel rm ${type}(先确认还有别的启用频道)。`,
2719
+ channelAccountRemovedWithChannel: (type, accountId) => `频道 ${type} 的账号 ${accountId} 已移除;该账号是最后一个,频道 ${type} 也已删除。`,
2720
+ channelAccountRemoveBlockedAllDisabled: (type, accountId, remainingIds) => `不能移除 ${type} 的 ${accountId}:剩余账号 (${remainingIds}) 都已 disabled。先 xacpx channel enable ${type} --account <id> 一个,或 xacpx channel disable ${type} 整个频道。`,
2721
+ channelAccountDefaultSwitched: (newDefault) => `默认账号已切换到 ${newDefault}`,
2722
+ channelAccountRemoved: (type, accountId) => `频道 ${type} 账号 ${accountId} 已移除`,
2723
+ channelAccountIncomplete: (accountId, issues) => `账号 ${accountId} 配置不完整:${issues}`,
2724
+ channelAccountCannotDisableLast: (type) => `不能禁用 ${type} 的最后一个启用账号。`,
2725
+ channelAccountEnabledToggled: (type, accountId, enabled) => `频道 ${type} 账号 ${accountId} 已${enabled ? "启用" : "禁用"}`,
2726
+ unknownChannelType: (type) => `未知频道类型:${type}`,
2727
+ supportedBuiltinChannels: (types) => `支持的内置频道:${types}`,
2728
+ savedNoRestart: "配置已保存;变更会在下次 `xacpx restart` 后生效。",
2729
+ savedDaemonIndeterminate: "配置已保存;daemon 状态异常,已跳过自动重启。请先处理 stale PID/status。",
2730
+ savedDaemonRunning: "配置已保存;daemon 正在运行,请执行 `xacpx restart` 使变更生效。",
2731
+ restartPrompt: "现在重启 xacpx 使变更生效?[y/N] ",
2732
+ savedRestartPending: "配置已保存;变更会在下次 `xacpx restart` 后生效。",
2733
+ savedDaemonStopped: "配置已保存;daemon 未运行,变更会在下次 `xacpx start` 后生效。",
2734
+ savedRestartFailed: (message) => `配置已保存,但重启失败:${message}`,
2735
+ checkLog: (path2) => `请查看日志:${path2}`,
2736
+ orRunLater: "也可以稍后执行:xacpx start"
2737
+ };
2738
+ });
2739
+
2740
+ // src/i18n/messages/zh/plugin-cli.ts
2741
+ var pluginCli2;
2742
+ var init_plugin_cli2 = __esm(() => {
2743
+ pluginCli2 = {
2744
+ noPlugins: "还没有安装插件。",
2745
+ pluginListHeader: "插件:",
2746
+ unrecognizedArgs: (args) => `未识别的参数:${args}`,
2747
+ pluginInstallFailed: (packageSpec, error) => `插件 ${packageSpec} 安装失败:${error}`,
2748
+ pluginValidateFailed: (recordedName, error) => `插件 ${recordedName} 校验失败:${error}`,
2749
+ pluginInstalled: (recordedName) => `插件 ${recordedName} 已安装`,
2750
+ providesChannels: (channels) => `提供频道:${channels}`,
2751
+ pluginNotFound: (packageName) => `没有找到插件:${packageName}`,
2752
+ pluginUninstallFailed: (packageName, error) => `插件 ${packageName} 卸载失败:${error}`,
2753
+ pluginRemoved: (packageName) => `插件 ${packageName} 已移除`,
2754
+ pluginUpdateFailed: (name, error) => `插件 ${name} 更新失败:${error}`,
2755
+ pluginUpdateValidateFailed: (name, message) => `插件 ${name} 更新后校验失败:${message}`,
2756
+ pluginRolledBack: (version) => `已回滚到 ${version}`,
2757
+ pluginRollbackFailed: (name, version, message) => `回滚 ${name} 到 ${version} 失败:${message}`,
2758
+ pluginRollbackUnavailable: (name) => `无法自动回滚(${name} 未锁定先前版本);请手动 xacpx plugin add ${name} 重装。`,
2759
+ pluginUpdated: (name) => `插件 ${name} 已更新`,
2760
+ pluginEnabledToggled: (packageName, enabled) => `插件 ${packageName} 已${enabled ? "启用" : "禁用"}`,
2761
+ dependencyGuardBlocked: (ids) => `存在依赖该插件的频道:${ids}。请先执行 xacpx channel rm <id>(或 channel disable)后再操作。`,
2762
+ dependencyGuardBlockedUnknown: (pluginName, ids) => `无法确定插件 ${pluginName} 提供的频道类型,且当前仍配置了非内置频道:${ids}。请先 xacpx channel rm 它们或修复插件后再试。`,
2763
+ pluginDoctorOk: "插件检查通过。",
2764
+ noKnownPlugins: "当前版本没有官方插件。",
2765
+ knownPluginsHeader: "官方插件:",
2766
+ knownPluginsInstallLabel: "安装:",
2767
+ knownPluginsInstallCmd: " xacpx plugin add <package>",
2768
+ cannotResolveLocalPluginName: (installSpec) => `无法识别本地插件包名:${installSpec}`,
2769
+ savedNoRestart: "配置已保存;变更会在下次 `xacpx restart` 后生效。",
2770
+ savedDaemonIndeterminate: "配置已保存;daemon 状态异常,已跳过自动重启。请先处理 stale PID/status。",
2771
+ savedDaemonRunning: "配置已保存;daemon 正在运行,请执行 `xacpx restart` 使变更生效。",
2772
+ restartPrompt: "现在重启 xacpx 使变更生效?[y/N] ",
2773
+ savedRestartPending: "配置已保存;变更会在下次 `xacpx restart` 后生效。",
2774
+ savedDaemonStopped: "配置已保存;daemon 未运行,变更会在下次 `xacpx start` 后生效。",
2775
+ savedRestartFailed: (message) => `配置已保存,但重启失败:${message}`,
2776
+ checkLog: (path2) => `请查看日志:${path2}`,
2777
+ orRunLater: "也可以稍后执行:xacpx start",
2778
+ pluginNoDefaultExport: (packageName) => `插件 ${packageName} 没有默认导出 xacpx plugin definition`,
2779
+ pluginNameMismatch: (packageName, name) => `插件 ${packageName} 声明的 name 与安装包名不一致:${name}`,
2780
+ pluginChannelsNotArray: (packageName) => `插件 ${packageName} 的 channels 必须是数组`,
2781
+ pluginIllegalChannelType: (packageName, type) => `插件 ${packageName} 注册了非法频道类型:${type}`,
2782
+ pluginIllegalChannelTypeNoType: (packageName) => `插件 ${packageName} 注册了非法频道类型`,
2783
+ pluginDuplicateChannelType: (packageName, type) => `插件 ${packageName} 重复注册频道类型:${type}`,
2784
+ pluginMissingFactory: (packageName, type) => `插件 ${packageName} 的频道 ${type} 缺少 factory`,
2785
+ pluginInvalidCliProvider: (packageName, type) => `插件 ${packageName} 的频道 ${type} cliProvider.type 必须等于频道 type`,
2786
+ compatMissingApiVersion: (packageName) => `插件 ${packageName} 缺少必需字段 apiVersion`,
2787
+ compatUnsupportedApiVersion: (packageName, apiVersion, supported) => `插件 ${packageName} 使用不支持的 apiVersion ${apiVersion}; supported: ${supported}; 请安装与当前 xacpx 兼容的插件版本 (install a compatible plugin)`,
2788
+ compatInvalidMinVersion: (packageName, field) => `插件 ${packageName} 元数据非法:${field} 必须是字符串 (invalid plugin metadata)`,
2789
+ compatInvalidMinVersionDetail: (packageName, field, detail) => `插件 ${packageName} 元数据非法:${field} (${detail}) (invalid plugin metadata)`,
2790
+ compatMinVersionNotSatisfied: (packageName, minVersion, currentVersion) => `插件 ${packageName} requires xacpx >=${minVersion}; current is ${currentVersion}; upgrade xacpx`,
2791
+ compatInvalidCompatibleVersions: (packageName, field) => `插件 ${packageName} 元数据非法:${field} 必须是字符串 (invalid plugin metadata)`,
2792
+ compatInvalidCompatibleVersionsDetail: (packageName, field, detail) => `插件 ${packageName} 元数据非法:${field} (${detail}) (invalid plugin metadata)`,
2793
+ compatCompatibleVersionsNotSatisfied: (packageName, requirement, currentVersion) => `插件 ${packageName} requires xacpx ${requirement}; current is ${currentVersion}; upgrade xacpx`
2794
+ };
2795
+ });
2796
+
2797
+ // src/i18n/messages/zh/login.ts
2798
+ var login2;
2799
+ var init_login2 = __esm(() => {
2800
+ login2 = {
2801
+ qrReady: "二维码已就绪,请使用微信扫描。",
2802
+ qrScanToConnect: "使用微信扫描以下二维码,以完成连接。",
2803
+ noActiveLogin: "当前没有进行中的登录,请先发起登录。",
2804
+ qrExpiredBeforeStart: "二维码已过期,请重新生成。",
2805
+ loginTimeoutTooManyExpiries: "登录超时:二维码多次过期,请重新开始登录流程。",
2806
+ newQrGenerated: `\uD83D\uDD04 新二维码已生成,请重新扫描
2807
+
2808
+ `,
2809
+ qrBrowserFallback: `如果二维码未能成功展示,请用浏览器打开以下链接扫码:
2810
+ `,
2811
+ qrLoadFailed: `二维码未加载成功,请用浏览器打开以下链接扫码:
2812
+ `,
2813
+ qrRefreshFailed: (detail) => `刷新二维码失败: ${detail}`,
2814
+ scanned: `
2815
+ \uD83D\uDC40 已扫码,在微信继续操作...
2816
+ `,
2817
+ qrExpiringRefresh: (current, max) => `
2818
+ ⏳ 二维码已过期,正在刷新...(${current}/${max})
2819
+ `,
2820
+ verifyCodeMismatch: "❌ 你输入的数字不匹配,请重新输入:",
2821
+ verifyCodePrompt: "输入手机微信显示的数字,以继续连接:",
2822
+ verifyCodeNoTty: "需要输入配对码,但当前环境没有交互式终端。请在前台运行 `xacpx login` 完成登录。",
2823
+ verifyCodeBlocked: `
2824
+ ⛔ 多次输入错误,请稍后再试。
2825
+ `,
2826
+ verifyCodeBlockedStop: "多次输入错误,连接流程已停止。请稍后再试。",
2827
+ loginMissingBotId: "登录失败:服务器未返回 ilink_bot_id。",
2828
+ loginSuccess: "✅ 与微信连接成功!",
2829
+ loginTimeout: "登录超时,请重试。",
2830
+ startingLogin: "正在启动微信扫码登录...",
2831
+ scanInstruction: `
2832
+ 使用微信扫描以下二维码,以完成连接:
2833
+ `,
2834
+ qrLinkFallback: (url) => `二维码链接: ${url}`,
2835
+ waitingForScan: `
2836
+ 等待扫码...
2837
+ `,
2838
+ loginSuccessLine: `
2839
+ ✅ 与微信连接成功!`,
2840
+ noAccountsLoggedIn: "当前没有已登录的账号",
2841
+ logoutSuccess: "✅ 已退出登录",
2842
+ noAccountsError: "没有已登录的账号,请先运行 login",
2843
+ accountNotConfigured: (accountId) => `账号 ${accountId} 未配置 (缺少 token),请先运行 login`
2844
+ };
2845
+ });
2846
+
2847
+ // src/i18n/messages/zh/weixin.ts
2848
+ var weixin2;
2849
+ var init_weixin2 = __esm(() => {
2850
+ weixin2 = {
2851
+ echoTimingHeader: "⏱ 通道耗时",
2852
+ echoTimingEventTime: (iso) => `├ 事件时间: ${iso}`,
2853
+ echoTimingPlatformDelay: (delay) => `├ 平台→插件: ${delay}`,
2854
+ echoTimingPluginDelay: (ms) => `└ 插件处理: ${ms}ms`,
2855
+ debugEnabled: "Debug 模式已开启",
2856
+ debugDisabled: "Debug 模式已关闭",
2857
+ sessionCleared: "✅ 会话已清除,重新开始对话",
2858
+ noAccountsLoggedIn: "当前没有已登录的账号",
2859
+ logoutSuccess: "✅ 已退出登录,清除所有账号凭证",
2860
+ commandFailed: (detail) => `❌ 指令执行失败: ${detail}`
2861
+ };
2862
+ });
2863
+
2864
+ // src/i18n/messages/zh/migrate.ts
2865
+ var migrate2;
2866
+ var init_migrate2 = __esm(() => {
2867
+ migrate2 = {
2868
+ daemonRunning: (pid, legacy, primary) => `检测到运行中的旧守护进程 (pid ${pid}),暂不迁移 ${legacy} → ${primary};` + `请先停止守护进程(weacpx stop / xacpx stop)后重试,期间仍使用旧目录。`,
2869
+ copied: (legacy, primary) => `已将状态目录从 ${legacy} 复制到 ${primary}(旧目录保留为备份,可手动删除)。`,
2870
+ failed: (legacy, primary, detail) => `迁移状态目录 ${legacy} → ${primary} 失败,继续使用旧目录:${detail}`,
2871
+ supplementFailed: (from, to, detail) => `补迁移 ${from} → ${to} 失败,已跳过:${detail}`,
2872
+ supplemented: (files, primary) => `已从旧目录补迁移 ${files} 到 ${primary}(未覆盖任何现有文件)。`
2873
+ };
2874
+ });
2875
+
2876
+ // src/i18n/messages/zh/misc.ts
2877
+ var misc2;
2878
+ var init_misc2 = __esm(() => {
2879
+ misc2 = {
2880
+ emptyMessage: "消息内容为空。",
2881
+ defaultHomeWorkspaceDescription: "用户主目录",
2882
+ pluginChannelFeishu: "飞书频道",
2883
+ pluginChannelYuanbao: "腾讯元宝频道",
2884
+ pluginChannelInstallHint: (channelType, packageName) => `频道 ${channelType} 需要安装插件:xacpx plugin add ${packageName}`,
2885
+ orchestrationSuggestion1: "查看 /tasks --stuck 定位卡住的任务",
2886
+ orchestrationSuggestion2: "/task <id> 可看完整时间线定位错误点",
2887
+ orchestrationSuggestion3: "必要时用 /task cancel 或 /tasks clean 恢复",
2888
+ startupWaitLine: (frame, elapsed, timeout) => `${frame} 正在创建初始会话 ${elapsed}s / ${timeout}s,按 Ctrl+B 跳过等待`,
2889
+ startupWaitLineFirstBoot: (frame, elapsed, timeout) => `${frame} 正在创建初始会话,首次启动可能需要准备依赖和运行环境 ${elapsed}s / ${timeout}s,按 Ctrl+B 跳过等待`,
2890
+ workspaceNotRegistered: (workspace3) => `工作区「${workspace3}」未注册`,
2891
+ agentNotRegistered: (agent3) => `Agent「${agent3}」未注册`,
2892
+ quotaHeadsUp: `—
2893
+ ⏳ 推送已达上限。回复 /jx 续看进度,或等待最终结果。`,
2894
+ quotaOverflowSummary: (count) => `(因消息次数限制省略 ${count} 条进度,请继续查看下方最终结果)`,
2895
+ finalHeadsUp: (total, sentSoFar, remaining) => `—
2896
+ \uD83D\uDCC4 结果共 ${total} 段,已发 ${sentSoFar} 段。回复 /jx 续看后 ${remaining} 段。`,
2897
+ quotedMessagePrefix: (parts) => `[引用: ${parts}]`,
2898
+ scheduledTaskFailed: (message) => `定时任务执行失败:${message}`,
2899
+ orchestrationTaskCompleted: (taskId, workerSession, result) => `委派任务「${taskId}」已完成
2900
+ - worker:${workerSession}
2901
+ - 结果:${result}`,
2902
+ orchestrationTaskFailed: (taskId, workerSession, reason) => `委派任务「${taskId}」执行失败
2903
+ - worker:${workerSession}
2904
+ - 原因:${reason}`,
2905
+ workerUnassigned: "未分配",
2906
+ bgSessionDone: (display) => `✅ ${display} 已完成,/use ${display} 查看结果`,
2907
+ bgSessionError: (display) => `⚠️ ${display} 失败,/use ${display} 查看详情`,
2908
+ executionError: (message) => `⚠️ 执行出错:${message}`,
2909
+ onboardingFirstUsePrompt: (workspaceName) => `检测到首次使用 xacpx。是否将当前目录创建为工作区「${workspaceName}」?[Y/n] `,
2910
+ onboardingSelectAgent: "请选择要添加并创建初始会话的 Agent:",
2911
+ onboardingEnterChoice: "输入数字或名称(默认 1):",
2912
+ onboardingNoValidAgent: "未选择有效 Agent,已跳过首次初始化。",
2913
+ onboardingCreatedWorkspace: (workspaceName, alias) => `已创建工作区「${workspaceName}」,正在创建初始会话「${alias}」...`,
2914
+ humanQuestionQueued: (count) => `
2915
+
2916
+ (另外还有 ${count} 个新问题已排队,等这一轮处理完再继续。)`,
2917
+ humanQuestionResumed: (taskId, summary) => `${taskId}:已恢复(${summary})`,
2918
+ humanQuestionUnresolved: (taskId, summary) => `${taskId}:仍待补充(${summary})`,
2919
+ humanQuestionQueuedLine: (count) => `还有 ${count} 个新问题已排队,等这一轮处理完再继续。`,
2920
+ delegateQPackageInstr1: "先判断哪些问题你能直接回答",
2921
+ delegateQPackageInstr2: "不能直接回答的,整理成一个面向 human 的问题包",
2922
+ delegateQPackageInstr3: "不要直接把 human 原话转发给 worker",
2923
+ commandAccessDeniedSuffix: " 仅限群创建者/频道 owner 使用。",
2924
+ commandAccessDeniedHint: "如果需要执行控制类操作,请由 owner 在群内发送,或改用私聊。",
2925
+ commandLabelThisMessage: "该消息",
2926
+ sessionResetNoCurrentSession: "当前还没有选中的会话。请先执行 /session new ... 或 /use <alias>。",
2927
+ sessionResetFailed: (alias) => `会话「${alias}」重置失败。
2928
+ 新的后端会话未创建成功,请稍后重试。`,
2929
+ sessionResetSuccess: (alias) => `会话「${alias}」已重置`,
2930
+ scheduledDispatchNoticeBound: (taskId, sessionDisplay, preview) => `执行定时任务 #${taskId}
2931
+ 会话:${sessionDisplay}
2932
+ 内容:${preview}`,
2933
+ scheduledDispatchNoticeTemp: (taskId, workspace3, agent3, preview) => `执行定时任务 #${taskId}
2934
+ 会话:临时会话(${workspace3} · ${agent3})
2935
+ 内容:${preview}`,
2936
+ weixinNoCredentials: "[xacpx] 未检测到登录凭证,正在启动扫码登录...",
2937
+ weixinMultipleAccounts: (accountId) => `[weixin] Multiple accounts detected, using first: ${accountId}`,
2938
+ weixinBotStarting: (accountId) => `[weixin] Starting bot, account=${accountId}`
2939
+ };
2940
+ });
2941
+
2942
+ // src/i18n/messages/zh/index.ts
2943
+ var zh;
2944
+ var init_zh = __esm(() => {
2945
+ init_common2();
2946
+ init_session2();
2947
+ init_native_session2();
2948
+ init_recovery2();
2949
+ init_shortcut2();
2950
+ init_workspace2();
2951
+ init_agent2();
2952
+ init_later2();
2953
+ init_scheduled_render2();
2954
+ init_orchestration2();
2955
+ init_coordinator_prompt2();
2956
+ init_worker_prompt2();
2957
+ init_config2();
2958
+ init_permission2();
2959
+ init_help2();
2960
+ init_hints2();
2961
+ init_router2();
2962
+ init_acpx_note2();
2963
+ init_render2();
2964
+ init_cli2();
2965
+ init_cli_update2();
2966
+ init_channel_cli2();
2967
+ init_plugin_cli2();
2968
+ init_login2();
2969
+ init_weixin2();
2970
+ init_migrate2();
2971
+ init_misc2();
2972
+ zh = { common: common2, session: session2, nativeSession: nativeSession2, recovery: recovery2, shortcut: shortcut2, workspace: workspace2, agent: agent2, later: later2, scheduledRender: scheduledRender2, orchestration: orchestration2, coordinatorPrompt: coordinatorPrompt2, workerPrompt: workerPrompt2, config: config2, permission: permission2, help: help2, hints: hints2, router: router2, acpxNote: acpxNote2, render: render2, cli: cli2, cliUpdate: cliUpdate2, channelCli: channelCli2, pluginCli: pluginCli2, login: login2, weixin: weixin2, migrate: migrate2, misc: misc2 };
2973
+ });
2974
+
2975
+ // src/i18n/resolve-locale.ts
2976
+ function isLocale(value) {
2977
+ return typeof value === "string" && VALID.includes(value);
2978
+ }
2979
+ function resolveLocale(input = {}) {
2980
+ const { configLanguage, env = process.env } = input;
2981
+ if (isLocale(configLanguage))
2982
+ return configLanguage;
2983
+ const raw = env.LC_ALL || env.LC_MESSAGES || env.LANG || "";
2984
+ return /^zh/i.test(raw) ? "zh" : "en";
2985
+ }
2986
+ var VALID;
2987
+ var init_resolve_locale = __esm(() => {
2988
+ VALID = ["en", "zh"];
2989
+ });
2990
+
2991
+ // src/i18n/index.ts
2992
+ function setLocale(locale) {
2993
+ activeLocale = locale;
2994
+ active = LOCALE_MAP[locale];
2995
+ }
2996
+ function getLocale() {
2997
+ return activeLocale;
2998
+ }
2999
+ function t() {
3000
+ return active;
3001
+ }
3002
+ var LOCALE_MAP, active, activeLocale = "en";
3003
+ var init_i18n = __esm(() => {
3004
+ init_en();
3005
+ init_zh();
3006
+ init_resolve_locale();
3007
+ LOCALE_MAP = { en, zh };
3008
+ active = en;
3009
+ });
3010
+
842
3011
  // src/runtime/core-env.ts
843
3012
  function coreEnv(suffix, env = process.env) {
844
3013
  return env[`${PRIMARY_PREFIX}${suffix}`] ?? env[`${LEGACY_PREFIX}${suffix}`];
@@ -928,6 +3097,7 @@ class AcpxQueueOwnerLauncher {
928
3097
  await this.spawnOwner(spawnSpec.command, spawnSpec.args, {
929
3098
  env: {
930
3099
  ...stringEnv(this.baseEnv),
3100
+ XACPX_LANG: getLocale(),
931
3101
  ACPX_QUEUE_OWNER_PAYLOAD: JSON.stringify(payload)
932
3102
  }
933
3103
  });
@@ -1045,6 +3215,7 @@ function quoteCommandPart(value) {
1045
3215
  var init_acpx_queue_owner_launcher = __esm(() => {
1046
3216
  init_spawn_command();
1047
3217
  init_terminate_process_tree();
3218
+ init_i18n();
1048
3219
  });
1049
3220
 
1050
3221
  // src/transport/permission-mode-flag.ts
@@ -1135,17 +3306,17 @@ function isAgentSessionListResult(value) {
1135
3306
  const record = value;
1136
3307
  if (record.source !== "agent" || !Array.isArray(record.sessions))
1137
3308
  return false;
1138
- return record.sessions.every((session) => {
1139
- if (!session || typeof session !== "object" || Array.isArray(session))
3309
+ return record.sessions.every((session3) => {
3310
+ if (!session3 || typeof session3 !== "object" || Array.isArray(session3))
1140
3311
  return false;
1141
- const item = session;
3312
+ const item = session3;
1142
3313
  return typeof item.sessionId === "string";
1143
3314
  });
1144
3315
  }
1145
3316
  function filterAgentSessionListByCwd(result, cwd) {
1146
3317
  return {
1147
3318
  ...result,
1148
- sessions: result.sessions.filter((session) => session.cwd && isSamePath(session.cwd, cwd))
3319
+ sessions: result.sessions.filter((session3) => session3.cwd && isSamePath(session3.cwd, cwd))
1149
3320
  };
1150
3321
  }
1151
3322
  var init_agent_session_list = __esm(() => {
@@ -2079,7 +4250,9 @@ function asOptionalToolEventMode(value) {
2079
4250
  }
2080
4251
  return value;
2081
4252
  }
4253
+
2082
4254
  // src/bridge/bridge-main.ts
4255
+ init_i18n();
2083
4256
  async function processBridgeInput(options) {
2084
4257
  const pendingWrites = new Set;
2085
4258
  let firstError;
@@ -2125,6 +4298,7 @@ async function runBridgeMain() {
2125
4298
  });
2126
4299
  }
2127
4300
  if (__require.main == __require.module) {
4301
+ setLocale(resolveLocale({ configLanguage: process.env.XACPX_LANG }));
2128
4302
  await runBridgeMain();
2129
4303
  }
2130
4304
  export {