@parallelworks/code 0.1.0 → 0.2.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 (70) hide show
  1. package/README.md +138 -24
  2. package/dist/api.d.ts +3469 -0
  3. package/dist/apiClient.d.ts +26 -0
  4. package/dist/apiClient.js +5 -0
  5. package/dist/claudeApi.d.ts +27 -0
  6. package/dist/claudeApi.js +250 -0
  7. package/dist/command.d.ts +47 -0
  8. package/dist/command.js +64 -0
  9. package/dist/commandsApi.d.ts +64 -0
  10. package/dist/commandsApi.js +267 -0
  11. package/dist/createPwCodeApi.d.ts +688 -0
  12. package/dist/createPwCodeApi.js +31 -0
  13. package/dist/index.d.ts +16 -3
  14. package/dist/index.js +16 -3
  15. package/dist/locales/en/agentTranscript.js +170 -0
  16. package/dist/locales/en/agents.js +380 -0
  17. package/dist/locales/en.d.ts +531 -0
  18. package/dist/locales/en.js +8 -0
  19. package/dist/locales/es/agentTranscript.js +170 -0
  20. package/dist/locales/es/agents.js +380 -0
  21. package/dist/locales/es.d.ts +3 -0
  22. package/dist/locales/es.js +8 -0
  23. package/dist/locales/ja/agentTranscript.js +170 -0
  24. package/dist/locales/ja/agents.js +380 -0
  25. package/dist/locales/ja.d.ts +3 -0
  26. package/dist/locales/ja.js +8 -0
  27. package/dist/locales/ko/agentTranscript.js +170 -0
  28. package/dist/locales/ko/agents.js +380 -0
  29. package/dist/locales/ko.d.ts +3 -0
  30. package/dist/locales/ko.js +8 -0
  31. package/dist/locales/zh/agentTranscript.js +170 -0
  32. package/dist/locales/zh/agents.js +380 -0
  33. package/dist/locales/zh.d.ts +3 -0
  34. package/dist/locales/zh.js +8 -0
  35. package/dist/machine.d.ts +49 -0
  36. package/dist/machine.js +60 -0
  37. package/dist/messages.d.ts +17 -0
  38. package/dist/messages.js +31 -0
  39. package/dist/notices.d.ts +11 -0
  40. package/dist/notices.js +94 -0
  41. package/dist/pullRequest.d.ts +8 -0
  42. package/dist/pullRequest.js +29 -0
  43. package/dist/query.d.ts +28 -0
  44. package/dist/query.js +25 -0
  45. package/dist/session.d.ts +70 -1
  46. package/dist/session.js +101 -1
  47. package/dist/sessionEvents.d.ts +27 -0
  48. package/dist/sessionEvents.js +212 -0
  49. package/dist/sessionsApi.d.ts +105 -0
  50. package/dist/sessionsApi.js +513 -0
  51. package/dist/toolStrings.d.ts +4 -0
  52. package/dist/toolStrings.js +95 -0
  53. package/dist/transcript.d.ts +12 -1
  54. package/dist/transcript.js +40 -2
  55. package/dist/types.d.ts +20 -1
  56. package/dist/useTranscript.d.ts +4 -1
  57. package/dist/useTranscript.js +54 -11
  58. package/dist/wording.d.ts +43 -0
  59. package/dist/wording.js +101 -0
  60. package/locales/en/agentTranscript.json +162 -0
  61. package/locales/en/agents.json +366 -0
  62. package/locales/es/agentTranscript.json +162 -0
  63. package/locales/es/agents.json +366 -0
  64. package/locales/ja/agentTranscript.json +162 -0
  65. package/locales/ja/agents.json +366 -0
  66. package/locales/ko/agentTranscript.json +162 -0
  67. package/locales/ko/agents.json +366 -0
  68. package/locales/zh/agentTranscript.json +162 -0
  69. package/locales/zh/agents.json +366 -0
  70. package/package.json +23 -8
@@ -0,0 +1,170 @@
1
+ // locales/zh/agentTranscript.json
2
+ var transcript = {
3
+ "running": "运行中…",
4
+ "done": "完成",
5
+ "failed": "失败",
6
+ "failedWith": "失败:{reason}",
7
+ "callGroup": "运行了 {tool} {count} 次",
8
+ "editGroup": "进行了 {count, plural, other {# 次编辑}}",
9
+ "writeGroup": "写入了 {count, plural, other {# 个文件}}",
10
+ "failedGroup": "{tool} 失败了 {count} 次",
11
+ "failedCount": "{count} 个失败",
12
+ "interrupted": "已中断",
13
+ "noOutput": "(无输出)",
14
+ "diffTruncated": "差异已截断",
15
+ "moreLines": "+{count, plural, other {另外 # 行}}",
16
+ "allowOnce": "是,允许此命令",
17
+ "allowDirectory": "是,并在本次会话中允许此目录",
18
+ "allowDirectoryTree": "是,并在本次会话中允许 {path} 及其下的所有内容",
19
+ "allowDirectoryOnly": "是,并在本次会话中允许 {path}",
20
+ "deny": "否,拒绝此命令",
21
+ "allowCode": "是,运行此代码",
22
+ "denyCode": "否,不运行此代码",
23
+ "allowPath": "是,仅允许这一次",
24
+ "denyPath": "否,拒绝",
25
+ "allowCall": "是,允许此调用",
26
+ "denyCall": "否,拒绝此调用",
27
+ "denyWithFeedback": "否,并向代理提供反馈",
28
+ "feedbackPlaceholder": "告诉代理改为做什么…",
29
+ "answered": "已回答",
30
+ "allowedBy": "{name} 已允许",
31
+ "deniedBy": "{name} 已拒绝",
32
+ "allowed": "已允许",
33
+ "denied": "已拒绝",
34
+ "allowedByReviewer": "自动审核已允许",
35
+ "deniedByReviewer": "自动审核已拒绝",
36
+ "approvalExpired": "已过期,未获答复",
37
+ "approvalTimedOut": "已拒绝:未及时答复",
38
+ "reviewTimedOut": "已拒绝:自动审核超时",
39
+ "reviewFailed": "已拒绝:自动审核失败",
40
+ "writeOwnAnswer": "自己写答案…",
41
+ "subagent": "任务",
42
+ "tasks": "任务",
43
+ "planPending": "计划正在终端中等待批准",
44
+ "approvalPending": "正在终端中等待答复",
45
+ "approvalOptions": "提供的选项",
46
+ "approvalLabel": "正在等待你的答复",
47
+ "approvalAllowed": "已允许",
48
+ "approvalDenied": "已拒绝",
49
+ "approvalRequestExpired": "此请求已过期。请重新请求以运行。",
50
+ "approvalWaitingOn": "正在等待 {name} 答复",
51
+ "feedbackLabel": "给代理的反馈",
52
+ "ownAnswerLabel": "你的答案",
53
+ "typeYourAnswer": "输入你的答案…",
54
+ "questionsLabel": "问题",
55
+ "questionTab": "问题 {n}",
56
+ "answeredCount": "已回答 {answered}/{total}",
57
+ "submitAnswers": "提交答案",
58
+ "chatAboutThis": "就此讨论",
59
+ "noAnswer": "未回答",
60
+ "noPreview": "此选项没有预览",
61
+ "previewOf": "预览:{label}",
62
+ "notesLabel": "备注",
63
+ "notesPlaceholder": "为此设计添加备注…",
64
+ "notesOnly": "(仅备注)",
65
+ "todoPending": "待办",
66
+ "todoInProgress": "进行中",
67
+ "todoCompleted": "完成",
68
+ "argsRewritten": "(钩子改写了参数)",
69
+ "interruptedReason": "已中断",
70
+ "reviewing": "{count, plural, =1 {正在审核批准请求} other {正在审核 # 个批准请求}}",
71
+ "backgroundLaunched": "已启动 {count, plural, other {# 个后台代理}}"
72
+ };
73
+ var tools = {
74
+ "noOutput": "(无输出)",
75
+ "firstLineMore": "{line} (+{more, plural, other {# 行}})",
76
+ "emptyFile": "空文件",
77
+ "readImage": "已读取图片",
78
+ "readLines": "已读取 {lines, plural, other {# 行}}",
79
+ "readLinesMore": "已读取 {lines, plural, other {# 行}}(还有 {more, number} 行)",
80
+ "noMatches": "无匹配",
81
+ "foundMatches": "在 {files, plural, other {# 个文件}}中找到 {matches, plural, other {# 处匹配}}",
82
+ "foundFiles": "找到 {files, plural, other {# 个文件}}",
83
+ "noFilesMatched": "没有匹配的文件",
84
+ "truncated": "{summary}(已截断)",
85
+ "exitCode": "退出码 {code}",
86
+ "exitCodeLines": "退出码 {code} · {lines, plural, other {# 行}}",
87
+ "httpStatus": "HTTP {status} · {lines, plural, other {# 行}}",
88
+ "outputTruncated": "{summary}(输出已截断)",
89
+ "addedRemoved": "添加 {added, plural, other {# 行}},删除 {removed, plural, other {# 行}}",
90
+ "added": "添加 {added, plural, other {# 行}}",
91
+ "removed": "删除 {removed, plural, other {# 行}}",
92
+ "wrote": "写入 {lines, plural, other {# 行}}",
93
+ "wroteTo": "向 {path} 写入 {lines, plural, other {# 行}}",
94
+ "rollupSearched": "搜索了 {count, plural, other {# 个模式}}",
95
+ "rollupRead": "读取了 {count, plural, other {# 个文件}}",
96
+ "rollupRanCommands": "运行了 {count, plural, other {# 条 shell 命令}}",
97
+ "rollupFetched": "获取了 {count, plural, other {# 个 URL}}",
98
+ "rollupLoadedSkills": "加载了 {count, plural, other {# 个技能}}",
99
+ "rollupSentMessages": "发送了 {count, plural, other {# 条消息}}",
100
+ "rollupCalledMcpTools": "调用了 {count, plural, other {# 个 MCP 工具}}",
101
+ "rollupRanTools": "运行了 {count, plural, other {# 个工具}}",
102
+ "rollupSearching": "正在搜索 {count, plural, other {# 个模式}}",
103
+ "rollupReading": "正在读取 {count, plural, other {# 个文件}}",
104
+ "rollupRunningCommands": "正在运行 {count, plural, other {# 条 shell 命令}}",
105
+ "rollupFetching": "正在获取 {count, plural, other {# 个 URL}}",
106
+ "rollupLoadingSkills": "正在加载 {count, plural, other {# 个技能}}",
107
+ "rollupSendingMessages": "正在发送 {count, plural, other {# 条消息}}",
108
+ "rollupRunningTools": "正在运行 {count, plural, other {# 个工具}}",
109
+ "rollupCalledServer": "调用了 {server} {count, plural, other {# 次}}",
110
+ "rollupCallingServer": "正在调用 {server} {count, plural, other {# 次}}",
111
+ "rollupSeparator": ",",
112
+ "rejected": "工具使用被拒绝",
113
+ "rejectedWith": "工具使用被拒绝:{feedback}",
114
+ "rejectedUpdate": "用户拒绝更新 {path}",
115
+ "rejectedUpdateWith": "用户拒绝更新 {path}:{feedback}",
116
+ "rejectedWrite": "用户拒绝写入 {path}",
117
+ "rejectedWriteWith": "用户拒绝写入 {path}:{feedback}",
118
+ "unattended": "已拒绝:此会话无法请求批准",
119
+ "userInterrupted": "用户在 {tool} 完成前中断了它。"
120
+ };
121
+ var queue = {
122
+ "remove": "移除排队的消息",
123
+ "waiting": "排队中 · 此回复结束后发送",
124
+ "waitingNextStep": "排队中 · 在当前步骤后送达代理",
125
+ "handedOver": "已发送到正在进行的轮次"
126
+ };
127
+ var paste = {
128
+ "title": "粘贴的文本",
129
+ "lines": "{count, plural, other {# 行}}",
130
+ "saving": "保存中…",
131
+ "remove": "移除粘贴内容"
132
+ };
133
+ var thinking = { "thoughtProcess": "思考过程" };
134
+ var modelPicker = {
135
+ "choose": "模型",
136
+ "select": "选择模型",
137
+ "search": "搜索模型…",
138
+ "loading": "正在加载模型…",
139
+ "failed": "无法加载模型",
140
+ "none": "没有可用的模型",
141
+ "sharedBy": "由 {owner} 共享",
142
+ "connecting": "正在连接…",
143
+ "notResponding": "无响应",
144
+ "manageProvider": "管理提供商",
145
+ "selectFirst": "请先选择模型"
146
+ };
147
+ var allocationPicker = {
148
+ "choose": "配额",
149
+ "placeholder": "选择配额",
150
+ "search": "搜索配额…"
151
+ };
152
+ var providerIssue = {
153
+ "keyRejected": "API 密钥被拒绝",
154
+ "unreachable": "无法访问端点",
155
+ "keyRejectedHint": "提供商拒绝了此连接的 API 密钥。请在提供商设置中更新密钥以继续。",
156
+ "unreachableHint": "提供商的端点没有响应。请检查端点 URL 和网络访问。",
157
+ "bannerKeyRejected": "“{provider}”的 API 密钥被拒绝",
158
+ "bannerUnreachable": "无法访问“{provider}”"
159
+ };
160
+ var agentTranscript_default = {
161
+ transcript,
162
+ tools,
163
+ queue,
164
+ paste,
165
+ thinking,
166
+ modelPicker,
167
+ allocationPicker,
168
+ providerIssue
169
+ };
170
+ export { allocationPicker, agentTranscript_default as default, modelPicker, paste, providerIssue, queue, thinking, tools, transcript };
@@ -0,0 +1,380 @@
1
+ // locales/zh/agents.json
2
+ var title = "pw code";
3
+ var sidebar = {
4
+ "label": "会话",
5
+ "listNoun": "会话",
6
+ "newSession": "新会话",
7
+ "search": "搜索会话",
8
+ "find": "在此会话中查找",
9
+ "noSessions": "还没有打开的会话",
10
+ "open": "打开侧边栏",
11
+ "close": "关闭侧边栏",
12
+ "untitled": "未命名",
13
+ "deleteTitle": "删除会话",
14
+ "deleteBody": "“{name}”及其记录将从 {machine} 中删除。此操作无法撤销。",
15
+ "deleteAction": "删除",
16
+ "worktree": "工作树",
17
+ "worktreeBranch": "分支 {branch}",
18
+ "worktreeChoice": "如何处理工作树",
19
+ "keepWorktree": "保留工作树",
20
+ "keepWorktreeBody": "它会连同其分支留在电脑上,可以继续在其中工作,或以后再移除。",
21
+ "removeWorktree": "移除工作树",
22
+ "removeWorktreeBody": "删除工作树及其分支,以及其中的所有内容。",
23
+ "worktreeStays": "此工作树会留在电脑上。如果不再需要,请在电脑上移除它。",
24
+ "worktreeUnchecked": "git 无法检查工作树中的工作,因此移除它可能会删除更改。",
25
+ "worktreeFiles": "移除它会删除 {count, plural, other {# 个}}未提交的文件:",
26
+ "worktreeCommits": "移除它会删除其分支上的 {count, plural, other {# 个}}提交:",
27
+ "worktreeMore": "{count, plural, other {… 还有 # 个}}",
28
+ "renameTitle": "重命名会话",
29
+ "renameLabel": "会话名称",
30
+ "renamePlaceholder": "输入新名称",
31
+ "renameAction": "重命名",
32
+ "moreOptions": "更多选项",
33
+ "groupNeedsYou": "需要你处理",
34
+ "groupActive": "活跃",
35
+ "groupInactive": "非活跃",
36
+ "groupArchived": "已归档",
37
+ "moveToGroup": "移至分组",
38
+ "newGroup": "新建分组…",
39
+ "newGroupName": "新分组",
40
+ "renameGroup": "重命名分组",
41
+ "deleteGroup": "删除分组",
42
+ "renameGroupTitle": "命名分组",
43
+ "groupNameLabel": "分组名称",
44
+ "groupNamePlaceholder": "输入名称",
45
+ "deleteGroupTitle": "删除分组",
46
+ "deleteGroupBody": "将删除“{name}”。其中的会话仍保留在列表中。",
47
+ "groupActions": "{name} 的操作",
48
+ "groupsNeedUpdate": "请更新 {machine} 上的 pw,才能将其会话放入分组",
49
+ "groupWaiting": "{count, plural, other {# 个会话需要你处理}}",
50
+ "groupRunning": "{count, plural, other {# 个会话正在运行}}",
51
+ "pin": "固定",
52
+ "unpin": "取消固定",
53
+ "pinned": "已固定",
54
+ "fork": "派生",
55
+ "forkMidTurn": "当前轮次结束后可用",
56
+ "leaveWorktree": "离开工作树",
57
+ "leaveWorktreeTitle": "离开工作树?",
58
+ "leaveWorktreeBody": "会话将回到 {workspace} 中工作。其对话保持不变。",
59
+ "leaveWorktreeKept": "会话已离开工作树,但无法移除该工作树,它仍留在电脑上。",
60
+ "stop": "停止",
61
+ "archive": "归档",
62
+ "restore": "恢复",
63
+ "archiveTitle": "归档“{name}”?",
64
+ "archiveBody": "此会话及其子智能体正在运行的工作将停止,其计划任务也会暂停。要再次使用,请从“已归档”分组中恢复。",
65
+ "resize": "调整会话列表大小",
66
+ "resizeHint": "拖动以调整大小;双击以重置",
67
+ "moreActions": "更多操作"
68
+ };
69
+ var start = {
70
+ "heading": "启动 pw code 会话",
71
+ "subheading": "选择机器和目录,然后描述任务。",
72
+ "workspaceLabel": "工作目录",
73
+ "workspacePlaceholder": "/home/you/your-repo",
74
+ "startButton": "启动会话",
75
+ "chooseMachine": "选择机器",
76
+ "notAnswering": "无响应({count})",
77
+ "chooseDirectory": "选择目录",
78
+ "otherPath": "使用其他路径…",
79
+ "composerPlaceholder": "描述任务或提出问题",
80
+ "choosePermission": "选择代理可以执行的操作",
81
+ "howTitle": "你打开的会话会显示在这里",
82
+ "howLabel": "会话如何显示在这里",
83
+ "howRemoteBefore": "在运行中的 pw code 会话里执行",
84
+ "howRemoteAfter": ",几秒钟内它就会列在这里。",
85
+ "howNewBefore": "要启动一个从第一轮起就打开的新会话,运行",
86
+ "howAllBefore": "要打开某台机器上的每个新会话,在那里运行",
87
+ "howAllAfter": "并开启 Remote control for new sessions。",
88
+ "linkResolving": "正在查找会话 {id}…",
89
+ "linkMissing": "会话 {id} 的远程控制已关闭。在该会话中运行 /rc,它就会列在这里。",
90
+ "startHereNone": "目前还没有机器允许远程启动会话。在你使用的机器上的 pw code 中运行 /settings 并开启 Allow remote session start,它就会列在这里。",
91
+ "handoffCard": "以聊天“{title}”开始",
92
+ "handoffUntitled": "未命名",
93
+ "handoffLoading": "正在加载聊天…",
94
+ "handoffPlaceholder": "智能体应如何处理这段聊天?",
95
+ "handoffDefaultTask": "继续下面对话中讨论的工作。",
96
+ "handoffIntro": "这是 AI 聊天“{title}”的延续。目前的对话:",
97
+ "handoffOmitted": "为保持简短,省略了前 {count} 条消息。",
98
+ "handoffUser": "用户",
99
+ "handoffAssistant": "助手"
100
+ };
101
+ var status = {
102
+ "idle": "空闲",
103
+ "running": "运行中",
104
+ "awaiting_approval": "需要批准",
105
+ "awaiting_answer": "需要回答",
106
+ "live_elsewhere": "在 {host} 上运行"
107
+ };
108
+ var machine = {
109
+ "connected": "已连接",
110
+ "no_daemon": "pw code 未运行",
111
+ "no_agent": "无代理",
112
+ "unreachable": "无法连接",
113
+ "unsupported_agent": "代理版本过旧",
114
+ "noDaemonHint": "这台机器上没有运行 pw code。请在该机器的终端中运行 pw code 来启动它。",
115
+ "noAgentHint": "这台机器没有连接 pw 代理。",
116
+ "unreachableHint": "无响应。在恢复之前无法读取其会话。",
117
+ "unsupportedHint": "该机器上的代理版本过旧。无法从中读取会话。",
118
+ "unsupportedHintVersion": "代理 {version} 版本过旧。无法从中读取会话。",
119
+ "computer": "电脑",
120
+ "resource": "资源"
121
+ };
122
+ var detail = {
123
+ "commandsLabel": "命令",
124
+ "archiveCommand": "归档此会话;之后可以恢复",
125
+ "planOnMachine": "计划保存在该机器的 {path}。请在该机器的终端中通过 pw code 打开。",
126
+ "shellWhileRunning": "请等待本轮结束后再运行 ! 命令。",
127
+ "archiveWhileRunning": "请等待本轮结束后再运行 /archive。",
128
+ "archived": "已归档“{name}”。要再次使用,请从“已归档”分组中恢复。",
129
+ "steerUncertain": "没有收到回应,这条消息可能已送达智能体。再次发送前请先查看记录。",
130
+ "shellStopped": "钩子阻止了智能体作出回应:{reason}",
131
+ "background": "在后台运行",
132
+ "backgroundTitle": "命令继续运行,智能体无需等待它即可继续工作",
133
+ "liveOn": "在 {host} 上运行",
134
+ "pullRequest": "此会话创建的{kind, select, mergeRequest {合并请求} other {拉取请求}} {pr}",
135
+ "pullRequestOpen": "此会话的{kind, select, mergeRequest {合并请求} other {拉取请求}} {pr} 处于开启状态",
136
+ "pullRequestDraft": "此会话的{kind, select, mergeRequest {合并请求} other {拉取请求}} {pr} 是草稿",
137
+ "pullRequestMerged": "此会话的{kind, select, mergeRequest {合并请求} other {拉取请求}} {pr} 已合并",
138
+ "pullRequestClosed": "此会话的{kind, select, mergeRequest {合并请求} other {拉取请求}} {pr} 已关闭",
139
+ "pullRequestsMore": "+{count}",
140
+ "pullRequestsShowMoreOpen": "{count, plural, other {再显示 # 个开启的拉取请求}}",
141
+ "pullRequestsShowMoreDone": "{count, plural, other {再显示 # 个已合并或已关闭的拉取请求}}",
142
+ "pullRequestsMoreOpenTitle": "{count, plural, other {另外 # 个开启的拉取请求}}",
143
+ "pullRequestsMoreDoneTitle": "{count, plural, other {另外 # 个已合并或已关闭的拉取请求}}",
144
+ "pullRequestsMoreAllTitle": "{count, plural, other {另外 # 个拉取请求}}",
145
+ "pullRequestState": {
146
+ "open": "开启",
147
+ "draft": "草稿",
148
+ "merged": "已合并",
149
+ "closed": "已关闭"
150
+ },
151
+ "liveElsewhereBody": "该会话正在 {host} 上的 pw code 中运行。你可以阅读,但此处的记录是快照,不会被更新。",
152
+ "refresh": "刷新",
153
+ "unreachableTitle": "{machine} 已有 {when} 无响应",
154
+ "unreachableBody": "会话是从机器实时读取的,在恢复连接前无法显示新内容。",
155
+ "checkAgain": "再次检查",
156
+ "transcriptEnds": "记录结束。这是从 {machine} 读取的最后状态。",
157
+ "untrusted": "此工作区尚未受信任,因此未加载设置、技能和钩子。请在机器上通过 pw code 信任它,然后继续。",
158
+ "reconnecting": "实时更新已断开,正在重新连接…",
159
+ "waitingForUsageLimit": "正在等待用量上限重置",
160
+ "waitingForUsageLimitUntil": "正在等待用量上限于 {time} 重置",
161
+ "switchClaudeAccount": "切换账户",
162
+ "loading": "正在加载记录…",
163
+ "cleared": "会话已清空,正在显示新会话。",
164
+ "dismiss": "关闭",
165
+ "transcriptLabel": "会话记录",
166
+ "transcriptNoun": "记录",
167
+ "retry": "重试",
168
+ "composerPlaceholder": "向此会话发送消息",
169
+ "composerLabel": "向此会话发消息",
170
+ "composerAwaiting": "回复审批请求以继续",
171
+ "composerAwaitingAnswer": "回答问题以继续",
172
+ "composerLiveElsewhere": "正在 {host} 上的 pw code 中运行",
173
+ "composerArchived": "此会话已归档",
174
+ "footerArchived": "归档期间为只读。要再次使用,请从“已归档”分组中恢复",
175
+ "composerUnreachable": "无法连接 {machine},消息无法送达",
176
+ "footerAwaiting": "在你批准或拒绝前,会话处于暂停状态",
177
+ "footerAwaitingAnswer": "在你回答前,会话处于暂停状态",
178
+ "composerShellRunning": "请等待 ! 命令完成",
179
+ "footerShellRunning": "正在机器上运行 ! {command}…",
180
+ "footerLiveElsewhere": "此会话在其他机器上运行时为只读",
181
+ "footerUnreachable": "只读,最后读取于{when}",
182
+ "send": "发送",
183
+ "imagesLabel": "要发送的图片",
184
+ "removeImage": "移除 {placeholder}",
185
+ "imageTooLarge": "此图片太大,无法附加。",
186
+ "imageUnsupported": "只能附加 PNG、JPEG、GIF 和 WebP 图片。",
187
+ "savingSettings": "保存中…",
188
+ "goalAchieved": "✓ 目标已达成({elapsed} · {turns, plural, other {# 轮}} · {tokens} 个令牌)",
189
+ "goalContinuing": "○ 目标尚未达成……继续中",
190
+ "goalCheckFailed": "目标检查失败:{error}。目标仍然有效,将在下一轮结束后再次检查。",
191
+ "goalUsageLimit": "已达到用量上限。将在 {time} 再次检查目标。",
192
+ "goalActive": "目标进行中",
193
+ "goalPaused": "目标已暂停",
194
+ "addedDirectory": "已添加的工作目录:{path}",
195
+ "addedDirectoryAndMore": "{path} 及{count, plural, other {另外 # 个工作目录}}",
196
+ "workingDirectory": "工作目录:{path}",
197
+ "directoriesMore": "+{count}",
198
+ "directoriesTitle": "工作目录",
199
+ "originalDirectory": "原始工作目录",
200
+ "directoryScope": {
201
+ "session": "本次会话",
202
+ "local": "已保存在本地设置中",
203
+ "project": "已保存在项目设置中",
204
+ "user": "已保存在用户设置中"
205
+ },
206
+ "removeDirectory": "从本次会话中移除 {path}",
207
+ "savedDirectoriesNote": "保存在设置中的目录需在运行此会话的电脑上用 /permissions 移除。",
208
+ "allowedDirectoriesTitle": "本次会话已允许",
209
+ "allowedAccess": {
210
+ "read": "读取",
211
+ "edit": "读取和编辑",
212
+ "readFolder": "读取,仅此文件夹",
213
+ "editFolder": "读取和编辑,仅此文件夹"
214
+ },
215
+ "checkingGoal": "正在检查目标",
216
+ "compacted": "已压缩",
217
+ "compactedAutomatically": "✻ 已压缩对话",
218
+ "recap": "回顾:{recap}",
219
+ "goalDetail": "目标:{condition}\n\n原因:{reason}",
220
+ "turnEnd": "✻ {verb, select, baked {烘焙了} brewed {酝酿了} churned {搅拌了} cogitated {思考了} cooked {烹饪了} crunched {嚼碎了} sauteed {翻炒了} other {工作了}} {duration} · {time} 完成",
221
+ "turnEndWaiting": "✻ 正在等待 {count, plural, other {# 个后台代理}}完成",
222
+ "turnSeconds": "{seconds} 秒",
223
+ "turnMinutes": "{minutes} 分 {seconds} 秒",
224
+ "turnHours": "{hours} 小时 {minutes} 分",
225
+ "planOpened": "已在编辑器中打开计划:{path}",
226
+ "subagentMessage": "来自 {name} 的消息",
227
+ "commandCompleted": "后台命令“{name}”已完成(退出码 0)",
228
+ "commandFailed": "后台命令“{name}”失败,退出码 {code}",
229
+ "agentEnded": "代理“{name}”{outcome, select, failed {失败} other {已完成}}",
230
+ "agentEndedAfter": "代理“{name}”{outcome, select, failed {失败} other {已完成}} · {elapsed}",
231
+ "expandAll": "全部展开",
232
+ "collapseAll": "全部折叠"
233
+ };
234
+ var switcher = {
235
+ "title": "代理",
236
+ "main": "主对话",
237
+ "runningOf": "{total} 个中 {running} 个运行中",
238
+ "earlierOnly": "{count} 个较早的代理",
239
+ "approvals": "{count} 项待批准",
240
+ "failedCount": "{count} 个失败",
241
+ "stopAll": "全部停止",
242
+ "show": "显示代理",
243
+ "hide": "隐藏代理",
244
+ "showEarlier": "显示 {count} 个较早的代理",
245
+ "hideEarlier": "隐藏 {count} 个较早的代理",
246
+ "agentName": "{type}: {description}",
247
+ "stop": "停止 {name}",
248
+ "stopThis": "停止",
249
+ "back": "返回主对话",
250
+ "tokens": "{tokens} 个令牌",
251
+ "approval": "需要批准",
252
+ "running": "运行中",
253
+ "failed": "失败",
254
+ "stopped": "已停止",
255
+ "done": "已完成",
256
+ "idle": "空闲",
257
+ "composer": "向 {name} 发消息",
258
+ "steerHint": "代理运行期间,消息会作为指示发送。",
259
+ "commandsOnMain": "命令和 ! 在主对话中运行。请返回主对话后使用。",
260
+ "transcriptLabel": "代理记录"
261
+ };
262
+ var effort = {
263
+ "label": "推理强度",
264
+ "low": "低",
265
+ "medium": "中",
266
+ "high": "高",
267
+ "xhigh": "超高",
268
+ "max": "最高",
269
+ "faster": "更快",
270
+ "smarter": "更智能"
271
+ };
272
+ var permission = {
273
+ "read-only": "只读",
274
+ "accept-edits": "接受编辑",
275
+ "auto": "自动",
276
+ "bypass-permissions": "绕过权限",
277
+ "plan": "计划",
278
+ "hint": {
279
+ "read-only": "工作区可以被读取,但不能被更改。",
280
+ "accept-edits": "文件编辑会在不询问的情况下被应用。工作区可能在未经你审查的情况下被更改。",
281
+ "auto": "文件编辑会在不询问的情况下被应用。大多数需要询问你的操作都由自动审查器批准或拒绝。",
282
+ "bypass-permissions": "所有操作都会在不询问的情况下执行,包括会更改系统的命令。",
283
+ "plan": "在制定计划期间,工作区不会被更改。"
284
+ }
285
+ };
286
+ var dash = {
287
+ "needsYou": "需要你处理",
288
+ "waitingFor": "已等待 {when}",
289
+ "answerInSession": "正在等待回答。打开会话进行回复。"
290
+ };
291
+ var claude = {
292
+ "disabled": "您的组织已禁用 Claude Code。请使用获批的平台模型或推理端点模型。",
293
+ "notInstalled": "此代理主机未安装 Claude Code。要使用 /claude-code,请用官方安装程序安装它,或将 claude 添加到 pw code 运行时使用的 PATH 中。",
294
+ "models": "Claude 订阅",
295
+ "loadingModels": "正在加载 Claude 模型…",
296
+ "refreshModels": "刷新模型",
297
+ "accounts": "Claude Code 账户",
298
+ "close": "关闭 Claude Code 账户",
299
+ "noAccounts": "此机器上尚未配置 Claude Code 账户。",
300
+ "selected": "Claude Code · {account}",
301
+ "choose": "Claude Code 账户",
302
+ "hostAccounts": "{host} 上的账户",
303
+ "loadingAccounts": "正在加载账户…",
304
+ "loadingUsage": "正在加载用量…",
305
+ "signedOut": "未登录",
306
+ "usageUnavailable": "用量不可用",
307
+ "current": "已选择的账户",
308
+ "loginOnHost": "如需登录,请在此主机的 pw code 中运行 /claude-code。",
309
+ "fiveHour": "5 小时已使用 {percent}",
310
+ "week": "本周已使用 {percent}",
311
+ "resets": "于 {time} 重置",
312
+ "platformModels": "平台模型",
313
+ "shortAccount": "账户",
314
+ "fiveHourColumn": "5 小时用量",
315
+ "weekColumn": "本周用量",
316
+ "resetsIn": "{time}后重置",
317
+ "resetsInShort": "{time}后",
318
+ "addAccount": "添加账号",
319
+ "signIn": "登录",
320
+ "signInAgain": "重新登录",
321
+ "signInTitle": "登录 Claude Code",
322
+ "profileOnHost": "{host} 上的 {account}",
323
+ "accountName": "账号名称",
324
+ "accountNameHelp": "使用 1–64 个字母、数字、点、@、连字符或下划线。这是账号的本地标签。",
325
+ "invalidAccountName": "名称应为 1–64 个字母、数字、点、@、连字符或下划线,不能仅包含一个点或两个点,也不能以 .lock 结尾。",
326
+ "continueSignIn": "继续登录",
327
+ "backToAccounts": "返回账号列表",
328
+ "loginStaysOnHost": "您的 Claude Code 登录信息保存在 {host} 上。",
329
+ "loadingTerminal": "正在加载登录终端…",
330
+ "signInTerminal": "Claude Code 登录终端",
331
+ "startingSignIn": "正在开始登录…",
332
+ "signInInstructions": "打开登录页面并按照 Claude 的提示操作。如果 Claude 给出代码,请将其粘贴到终端中。你的登录信息保留在 {host} 上。",
333
+ "openSignInPage": "打开登录页面",
334
+ "inputTooLong": "粘贴内容过长。请仅粘贴验证码。",
335
+ "terminalTruncated": "较早的终端输出已不可用。",
336
+ "reconnectSignIn": "重新连接",
337
+ "retrySignIn": "重试",
338
+ "cancelSignIn": "取消登录",
339
+ "useThisAccount": "使用此账号",
340
+ "remove": "移除",
341
+ "removeAccount": "移除账号",
342
+ "removeBody": "将 {account} 退出登录并从 {host} 上移除?",
343
+ "signInStatus": {
344
+ "running": "请按终端提示操作。",
345
+ "checking": "正在验证登录…",
346
+ "signed_in": "已登录为 {email}。",
347
+ "failed": "无法验证登录。请检查终端输出并重试。",
348
+ "canceled": "登录已取消。",
349
+ "expired": "登录已过期。请重试。"
350
+ },
351
+ "useAccount": "使用",
352
+ "accountActions": "{account} 的操作"
353
+ };
354
+ var terminal = {
355
+ "title": "在终端中继续",
356
+ "resourceBody": "在 pw code 中接续此对话。会话继续在 {machine} 上运行,此页面会同步更新。",
357
+ "computerBody": "此会话在 {host} 上运行。在那台机器的终端中运行此命令,即可在 pw code 中接续。此页面会同步更新。",
358
+ "anyTerminal": "可在任何已登录 pw 的终端中运行。",
359
+ "archived": "接续后,它会从已归档中恢复。",
360
+ "open": "在终端中打开",
361
+ "offline": "工作区终端未连接。请复制命令,在其他终端中运行。",
362
+ "commandLabel": "终端命令",
363
+ "machineLoading": "正在查找此会话所在的机器…",
364
+ "machineMissing": "此会话所在的机器目前未列出,因此暂时无法提供命令。"
365
+ };
366
+ var agents_default = {
367
+ title,
368
+ sidebar,
369
+ start,
370
+ status,
371
+ machine,
372
+ detail,
373
+ switcher,
374
+ effort,
375
+ permission,
376
+ dash,
377
+ claude,
378
+ terminal
379
+ };
380
+ export { claude, dash, agents_default as default, detail, effort, machine, permission, sidebar, start, status, switcher, terminal, title };
@@ -0,0 +1,3 @@
1
+ import type { PwCodeMessages } from '../messages.js';
2
+ declare const messages: PwCodeMessages;
3
+ export default messages;
@@ -0,0 +1,8 @@
1
+ import agentTranscript_default from "./zh/agentTranscript.js";
2
+ import agents_default from "./zh/agents.js";
3
+ // src/locales/zh.ts
4
+ var messages = {
5
+ agentTranscript: agentTranscript_default,
6
+ agents: agents_default
7
+ };
8
+ export { messages as default };
@@ -0,0 +1,49 @@
1
+ /** A machine as the sessions listing has it, as far as the shared logic reads
2
+ * it. A host that types its API from a spec asserts its type extends this. */
3
+ export interface PwCodeMachine {
4
+ id: string;
5
+ name: string;
6
+ /** `local` for a computer; anything else is a resource. */
7
+ kind: string;
8
+ /** `connected`, or why the machine cannot be reached. */
9
+ status: string;
10
+ /** What reaching the machine failed with, in its own words. */
11
+ error?: string | undefined;
12
+ /** The version of the pw agent the machine runs. */
13
+ agentVersion?: string | undefined;
14
+ owner?: string | undefined;
15
+ hostname?: string | undefined;
16
+ daemonId?: string | undefined;
17
+ storeId?: string | undefined;
18
+ remoteStart?: boolean | undefined;
19
+ }
20
+ /** A computer's daemon connected itself; every other machine is a resource
21
+ * reached through its pw agent. */
22
+ export declare function isComputer(machine: Pick<PwCodeMachine, 'kind'>): boolean;
23
+ export type TerminalHandoff = {
24
+ on: 'resource';
25
+ command: string;
26
+ args: string[];
27
+ resource: string;
28
+ } | {
29
+ on: 'computer';
30
+ command: string;
31
+ host: string;
32
+ };
33
+ /** The pw code command that picks a session up. A resource's daemon answers
34
+ * any terminal signed in to pw; a computer's only that computer. */
35
+ export declare function terminalHandoff(machine: PwCodeMachine, sessionId: string, username: string | undefined): TerminalHandoff;
36
+ export declare function splitMachines<M extends Pick<PwCodeMachine, 'kind'>>(machines: readonly M[]): {
37
+ computers: M[];
38
+ resources: M[];
39
+ };
40
+ export declare function isConnected(machine: Pick<PwCodeMachine, 'status'> | undefined): boolean;
41
+ /** A machine the listing does not know is not down: only one that reports a
42
+ * status other than connected is. */
43
+ export declare function isMachineDown<M extends Pick<PwCodeMachine, 'status'>>(machine: M | undefined): machine is M;
44
+ /** A request that failed because pw code on the machine could not be reached. */
45
+ export declare function isUnreachableError(error: unknown): boolean;
46
+ export declare function machinesById<M extends Pick<PwCodeMachine, 'id'>>(machines: readonly M[]): Map<string, M>;
47
+ /** Only a machine whose owner turned on starting from another client lets one
48
+ * start a session; every other machine only shows what its owner opened. */
49
+ export declare function canStartHere(machine: Pick<PwCodeMachine, 'status' | 'remoteStart'>): boolean;