@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,31 @@
1
+ import { claudeApi } from "./claudeApi.js";
2
+ import { commandsApi } from "./commandsApi.js";
3
+ import { reachedByFeed, sessionEvents } from "./sessionEvents.js";
4
+ import { sessionsApi } from "./sessionsApi.js";
5
+ import { useMemo } from "react";
6
+ // src/createPwCodeApi.ts
7
+ /** The calls and data hooks of pw code sessions over the host's API client,
8
+ * which carries its base URL and signs its requests. Create it once per
9
+ * client: its hooks share SWR cache entries keyed as
10
+ * `@parallelworks/client/swr`'s are, and the open feeds it counts are its own. */
11
+ function createPwCodeApi(client, options = {}) {
12
+ const routes = client;
13
+ const sessions = sessionsApi(routes);
14
+ const { useSessionEvents, useFedMachines } = sessionEvents(options);
15
+ /** The listing's machines. One with a session feed open counts as connected
16
+ * whatever the poll says: the feed is the machine answering, and the polled
17
+ * listing can lose a machine it still reaches. */
18
+ function useMachines() {
19
+ const { data } = sessions.useSessions();
20
+ const fed = useFedMachines();
21
+ return useMemo(() => reachedByFeed(data?.machines ?? [], fed), [data, fed]);
22
+ }
23
+ return {
24
+ ...sessions,
25
+ ...commandsApi(routes),
26
+ ...claudeApi(routes),
27
+ useMachines,
28
+ useSessionEvents
29
+ };
30
+ }
31
+ export { createPwCodeApi };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,18 @@
1
- export type { PwCodeAddedDirectory, PwCodeAllowedDirectory, PwCodeApprovalAnswer, PwCodeApprovalRequest, PwCodeAskOption, PwCodeGoalStatus, PwCodeHistoryItem, PwCodeHistoryKind, PwCodeImage, PwCodeImageRef, PwCodePasteView, PwCodeSessionDetail, PwCodeSessionState, PwCodeSessionStatus, PwCodeStreamEvent, } from './types.js';
1
+ export type { PwCodeAddedDirectory, PwCodeAllowedDirectory, PwCodeApprovalAnswer, PwCodeApprovalRequest, PwCodeAskOption, PwCodeGoalStatus, PwCodeHistoryItem, PwCodeHistoryKind, PwCodeImage, PwCodeImageRef, PwCodePasteView, PwCodeSessionDetail, PwCodeSessionState, PwCodeSessionStatus, PwCodeStreamEvent, PwCodeSubagentDetail, PwCodeSubagentUsage, } from './types.js';
2
+ export { type PwCodeClient, type PwCodeComponents, type PwCodePaths, QUERY_KEY_PREFIX, } from './apiClient.js';
3
+ export { createPwCodeApi, type PwCodeApi, type PwCodeApiOptions, } from './createPwCodeApi.js';
4
+ export { cachedCopyCurrent, pasteRefs, patchPullRequestStates, patchSessionNames, pullRequestsRefreshMs, type PwCodePasteUpload, SESSIONS_REFRESH_MS, useLastReadAt, } from './sessionsApi.js';
5
+ export { backgroundOfferDelayMs, type CommandOutcome, type SlashDeps, } from './commandsApi.js';
6
+ export { type ClaudeLogin, type ClaudeLoginEvent, type ClaudeLoginInput, claudeLoginFinished, } from './claudeApi.js';
7
+ export { changesSubagents, reachedByFeed, sessionEventsPath, } from './sessionEvents.js';
2
8
  export { githubAttachmentAsset, isSessionImageUrl, sessionGitHubImageUrl, sessionImageUrl, } from './images.js';
3
- export { sessionStatusVariant } from './session.js';
4
- export { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, type CompactionNotice, dropMessage, type GoalNotice, historyToMessages, type ImageUrl, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, type RecapNotice, resolveApprovalEverywhere, reviewingCount, resumeCursor, type StreamEffect, type TranscriptState, type TranscriptWords, turnRunning, type TurnVerb, } from './transcript.js';
9
+ export { type PwCodePalette, type PwCodeSlashCommand, paletteOptions, type SlashAction, shellCommand, slashAction, steerMayHaveLanded, } from './command.js';
10
+ export { canStartHere, isComputer, isConnected, isMachineDown, isUnreachableError, machinesById, type PwCodeMachine, splitMachines, type TerminalHandoff, terminalHandoff, } from './machine.js';
11
+ export { isPwCodeLocale, loadPwCodeMessages, type PwCodeLocale, type PwCodeMessages, type PwCodeNamespace, type PwCodeTranslator, pwCodeLocales, pwCodeNamespaces, usePwCodeTranslations, } from './messages.js';
12
+ export { turnDuration, useCompactionNotice, useRecapNotice, useResumeTime, useTranscriptWords, } from './notices.js';
13
+ export { pastedPullRequestLabel, pullRequestKind, pullRequestLabel, pullRequestShortLabel, } from './pullRequest.js';
14
+ export { isActiveSession, isArchived, isMidTurn, isSession, needsYou, newestFirst, pathBasename, type PwCodePendingApprovals, type PwCodeSession, type RecentDirectory, recentDirectories, sessionClock, sessionKey, sessionStatusVariant, sessionVariant, sharedStoreCopy, spansMachines, triageSessions, waitsOnAnswer, } from './session.js';
15
+ export { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, type CompactionNotice, dropMessage, type GoalNotice, historyToMessages, type ImageUrl, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, type RecapNotice, resolveApprovalEverywhere, reviewingCount, resumeCursor, type StreamEffect, subagentFrame, subagentSessionDetail, type TranscriptState, type TranscriptWords, turnRunning, type TurnVerb, } from './transcript.js';
16
+ export { useToolStrings } from './toolStrings.js';
5
17
  export { type PwCodeSendResult, type PwCodeSteerResult, type PwCodeWithdrawResult, usePwCodeTranscript, } from './useTranscript.js';
18
+ export { composerState, IMAGE_PLACEHOLDER, machineHint, rememberSentPrompt, sessionLabel, sessionStateText, sessionStatusText, } from './wording.js';
package/dist/index.js CHANGED
@@ -1,5 +1,18 @@
1
+ import { QUERY_KEY_PREFIX } from "./apiClient.js";
2
+ import { createPwCodeApi } from "./createPwCodeApi.js";
3
+ import { SESSIONS_REFRESH_MS, cachedCopyCurrent, pasteRefs, patchPullRequestStates, patchSessionNames, pullRequestsRefreshMs, useLastReadAt } from "./sessionsApi.js";
4
+ import { backgroundOfferDelayMs } from "./commandsApi.js";
5
+ import { claudeLoginFinished } from "./claudeApi.js";
6
+ import { changesSubagents, reachedByFeed, sessionEventsPath } from "./sessionEvents.js";
1
7
  import { githubAttachmentAsset, isSessionImageUrl, sessionGitHubImageUrl, sessionImageUrl } from "./images.js";
2
- import { sessionStatusVariant } from "./session.js";
3
- import { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, dropMessage, historyToMessages, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, resolveApprovalEverywhere, resumeCursor, reviewingCount, turnRunning } from "./transcript.js";
8
+ import { paletteOptions, shellCommand, slashAction, steerMayHaveLanded } from "./command.js";
9
+ import { canStartHere, isComputer, isConnected, isMachineDown, isUnreachableError, machinesById, splitMachines, terminalHandoff } from "./machine.js";
10
+ import { isPwCodeLocale, loadPwCodeMessages, pwCodeLocales, pwCodeNamespaces, usePwCodeTranslations } from "./messages.js";
11
+ import { turnDuration, useCompactionNotice, useRecapNotice, useResumeTime, useTranscriptWords } from "./notices.js";
12
+ import { pastedPullRequestLabel, pullRequestKind, pullRequestLabel, pullRequestShortLabel } from "./pullRequest.js";
13
+ import { isActiveSession, isArchived, isMidTurn, isSession, needsYou, newestFirst, pathBasename, recentDirectories, sessionClock, sessionKey, sessionStatusVariant, sessionVariant, sharedStoreCopy, spansMachines, triageSessions, waitsOnAnswer } from "./session.js";
14
+ import { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, dropMessage, historyToMessages, initialTranscript, liveSessionStatus, pendingApprovals, pendingMessages, resolveApprovalEverywhere, resumeCursor, reviewingCount, subagentFrame, subagentSessionDetail, turnRunning } from "./transcript.js";
15
+ import { useToolStrings } from "./toolStrings.js";
4
16
  import { usePwCodeTranscript } from "./useTranscript.js";
5
- export { appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, bashRunning, dropMessage, githubAttachmentAsset, historyToMessages, initialTranscript, isSessionImageUrl, liveSessionStatus, pendingApprovals, pendingMessages, resolveApprovalEverywhere, resumeCursor, reviewingCount, sessionGitHubImageUrl, sessionImageUrl, sessionStatusVariant, turnRunning, usePwCodeTranscript };
17
+ import { IMAGE_PLACEHOLDER, composerState, machineHint, rememberSentPrompt, sessionLabel, sessionStateText, sessionStatusText } from "./wording.js";
18
+ export { IMAGE_PLACEHOLDER, QUERY_KEY_PREFIX, SESSIONS_REFRESH_MS, appendOwnMessage, appendSteeredMessage, applyStreamEvent, approvalAnswerBody, approvalToPart, backgroundOfferDelayMs, bashRunning, cachedCopyCurrent, canStartHere, changesSubagents, claudeLoginFinished, composerState, createPwCodeApi, dropMessage, githubAttachmentAsset, historyToMessages, initialTranscript, isActiveSession, isArchived, isComputer, isConnected, isMachineDown, isMidTurn, isPwCodeLocale, isSession, isSessionImageUrl, isUnreachableError, liveSessionStatus, loadPwCodeMessages, machineHint, machinesById, needsYou, newestFirst, paletteOptions, pasteRefs, pastedPullRequestLabel, patchPullRequestStates, patchSessionNames, pathBasename, pendingApprovals, pendingMessages, pullRequestKind, pullRequestLabel, pullRequestShortLabel, pullRequestsRefreshMs, pwCodeLocales, pwCodeNamespaces, reachedByFeed, recentDirectories, rememberSentPrompt, resolveApprovalEverywhere, resumeCursor, reviewingCount, sessionClock, sessionEventsPath, sessionGitHubImageUrl, sessionImageUrl, sessionKey, sessionLabel, sessionStateText, sessionStatusText, sessionStatusVariant, sessionVariant, sharedStoreCopy, shellCommand, slashAction, spansMachines, splitMachines, steerMayHaveLanded, subagentFrame, subagentSessionDetail, terminalHandoff, triageSessions, turnDuration, turnRunning, useCompactionNotice, useLastReadAt, usePwCodeTranscript, usePwCodeTranslations, useRecapNotice, useResumeTime, useToolStrings, useTranscriptWords, waitsOnAnswer };
@@ -0,0 +1,170 @@
1
+ // locales/en/agentTranscript.json
2
+ var transcript = {
3
+ "running": "Running…",
4
+ "done": "Done",
5
+ "failed": "Failed",
6
+ "failedWith": "Failed: {reason}",
7
+ "callGroup": "Ran {tool} {count, plural, one {# time} other {# times}}",
8
+ "editGroup": "Made {count, plural, one {# edit} other {# edits}}",
9
+ "writeGroup": "Wrote {count, plural, one {# file} other {# files}}",
10
+ "failedGroup": "{tool} failed {count, plural, one {# time} other {# times}}",
11
+ "failedCount": "{count} failed",
12
+ "interrupted": "Interrupted",
13
+ "noOutput": "(no output)",
14
+ "diffTruncated": "Diff truncated",
15
+ "moreLines": "+{count, plural, one {# more line} other {# more lines}}",
16
+ "allowOnce": "Yes, allow this command",
17
+ "allowDirectory": "Yes, and allow this directory for the session",
18
+ "allowDirectoryTree": "Yes, and allow {path} and everything under it for the session",
19
+ "allowDirectoryOnly": "Yes, and allow {path} for the session",
20
+ "deny": "No, deny this command",
21
+ "allowCode": "Yes, run this code",
22
+ "denyCode": "No, don't run this code",
23
+ "allowPath": "Yes, allow this once",
24
+ "denyPath": "No, deny",
25
+ "allowCall": "Yes, allow this call",
26
+ "denyCall": "No, deny this call",
27
+ "denyWithFeedback": "No, and provide feedback to the agent",
28
+ "feedbackPlaceholder": "Tell the agent what to do instead…",
29
+ "answered": "Answered",
30
+ "allowedBy": "Allowed by {name}",
31
+ "deniedBy": "Denied by {name}",
32
+ "allowed": "Allowed",
33
+ "denied": "Denied",
34
+ "allowedByReviewer": "Allowed by the auto-reviewer",
35
+ "deniedByReviewer": "Denied by the auto-reviewer",
36
+ "approvalExpired": "Expired without an answer",
37
+ "approvalTimedOut": "Denied: no answer in time",
38
+ "reviewTimedOut": "Denied: the auto-reviewer timed out",
39
+ "reviewFailed": "Denied: the auto-reviewer failed",
40
+ "writeOwnAnswer": "Write my own answer…",
41
+ "subagent": "Task",
42
+ "tasks": "Tasks",
43
+ "planPending": "Plan awaiting approval in the terminal",
44
+ "approvalPending": "Waiting for an answer in the terminal",
45
+ "approvalOptions": "Offered choices",
46
+ "approvalLabel": "Waiting for your answer",
47
+ "approvalAllowed": "Allowed",
48
+ "approvalDenied": "Declined",
49
+ "approvalRequestExpired": "This request expired. Ask again to run it.",
50
+ "approvalWaitingOn": "Waiting for {name} to answer",
51
+ "feedbackLabel": "Feedback for the agent",
52
+ "ownAnswerLabel": "Your answer",
53
+ "typeYourAnswer": "Type your answer…",
54
+ "questionsLabel": "Questions",
55
+ "questionTab": "Q{n}",
56
+ "answeredCount": "{answered} of {total} answered",
57
+ "submitAnswers": "Submit answers",
58
+ "chatAboutThis": "Chat about this",
59
+ "noAnswer": "No answer",
60
+ "noPreview": "No preview for this option",
61
+ "previewOf": "Preview: {label}",
62
+ "notesLabel": "Notes",
63
+ "notesPlaceholder": "Add notes on this design…",
64
+ "notesOnly": "(notes only)",
65
+ "todoPending": "To do",
66
+ "todoInProgress": "In progress",
67
+ "todoCompleted": "Done",
68
+ "argsRewritten": "(args rewritten by hook)",
69
+ "interruptedReason": "interrupted",
70
+ "reviewing": "{count, plural, =1 {Reviewing approval request} other {Reviewing # approval requests}}",
71
+ "backgroundLaunched": "{count, plural, one {# background agent} other {# background agents}} launched"
72
+ };
73
+ var tools = {
74
+ "noOutput": "(no output)",
75
+ "firstLineMore": "{line} (+{more, plural, one {# line} other {# lines}})",
76
+ "emptyFile": "Empty file",
77
+ "readImage": "Read image",
78
+ "readLines": "Read {lines, plural, one {# line} other {# lines}}",
79
+ "readLinesMore": "Read {lines, plural, one {# line} other {# lines}} ({more, number} more)",
80
+ "noMatches": "No matches",
81
+ "foundMatches": "Found {matches, plural, one {# match} other {# matches}} in {files, plural, one {# file} other {# files}}",
82
+ "foundFiles": "Found {files, plural, one {# file} other {# files}}",
83
+ "noFilesMatched": "No files matched",
84
+ "truncated": "{summary} (truncated)",
85
+ "exitCode": "Exit {code}",
86
+ "exitCodeLines": "Exit {code} · {lines, plural, one {# line} other {# lines}}",
87
+ "httpStatus": "HTTP {status} · {lines, plural, one {# line} other {# lines}}",
88
+ "outputTruncated": "{summary} (output truncated)",
89
+ "addedRemoved": "Added {added, plural, one {# line} other {# lines}}, removed {removed, plural, one {# line} other {# lines}}",
90
+ "added": "Added {added, plural, one {# line} other {# lines}}",
91
+ "removed": "Removed {removed, plural, one {# line} other {# lines}}",
92
+ "wrote": "Wrote {lines, plural, one {# line} other {# lines}}",
93
+ "wroteTo": "Wrote {lines, plural, one {# line} other {# lines}} to {path}",
94
+ "rollupSearched": "searched for {count, plural, one {# pattern} other {# patterns}}",
95
+ "rollupRead": "read {count, plural, one {# file} other {# files}}",
96
+ "rollupRanCommands": "ran {count, plural, one {# shell command} other {# shell commands}}",
97
+ "rollupFetched": "fetched {count, plural, one {# URL} other {# URLs}}",
98
+ "rollupLoadedSkills": "loaded {count, plural, one {# skill} other {# skills}}",
99
+ "rollupSentMessages": "sent {count, plural, one {# message} other {# messages}}",
100
+ "rollupCalledMcpTools": "called {count, plural, one {# MCP tool} other {# MCP tools}}",
101
+ "rollupRanTools": "ran {count, plural, one {# tool} other {# tools}}",
102
+ "rollupSearching": "searching for {count, plural, one {# pattern} other {# patterns}}",
103
+ "rollupReading": "reading {count, plural, one {# file} other {# files}}",
104
+ "rollupRunningCommands": "running {count, plural, one {# shell command} other {# shell commands}}",
105
+ "rollupFetching": "fetching {count, plural, one {# URL} other {# URLs}}",
106
+ "rollupLoadingSkills": "loading {count, plural, one {# skill} other {# skills}}",
107
+ "rollupSendingMessages": "sending {count, plural, one {# message} other {# messages}}",
108
+ "rollupRunningTools": "running {count, plural, one {# tool} other {# tools}}",
109
+ "rollupCalledServer": "called {server} {count, plural, one {# time} other {# times}}",
110
+ "rollupCallingServer": "calling {server} {count, plural, one {# time} other {# times}}",
111
+ "rollupSeparator": ", ",
112
+ "rejected": "Tool use rejected",
113
+ "rejectedWith": "Tool use rejected: {feedback}",
114
+ "rejectedUpdate": "User rejected update to {path}",
115
+ "rejectedUpdateWith": "User rejected update to {path}: {feedback}",
116
+ "rejectedWrite": "User rejected write to {path}",
117
+ "rejectedWriteWith": "User rejected write to {path}: {feedback}",
118
+ "unattended": "Denied: this session cannot ask for approval",
119
+ "userInterrupted": "The user interrupted {tool} before it finished."
120
+ };
121
+ var queue = {
122
+ "remove": "Remove queued message",
123
+ "waiting": "Queued · sends when this reply finishes",
124
+ "waitingNextStep": "Queued · reaches the agent after its current step",
125
+ "handedOver": "Sent to the running turn"
126
+ };
127
+ var paste = {
128
+ "title": "Pasted text",
129
+ "lines": "{count, plural, one {# line} other {# lines}}",
130
+ "saving": "Saving…",
131
+ "remove": "Remove paste"
132
+ };
133
+ var thinking = { "thoughtProcess": "Thought process" };
134
+ var modelPicker = {
135
+ "choose": "Model",
136
+ "select": "Select a model",
137
+ "search": "Search models…",
138
+ "loading": "Loading models…",
139
+ "failed": "Failed to load models",
140
+ "none": "No models available",
141
+ "sharedBy": "Shared by {owner}",
142
+ "connecting": "Connecting…",
143
+ "notResponding": "Not responding",
144
+ "manageProvider": "Manage provider",
145
+ "selectFirst": "Select a model first"
146
+ };
147
+ var allocationPicker = {
148
+ "choose": "Allocation",
149
+ "placeholder": "Select allocation",
150
+ "search": "Search allocations…"
151
+ };
152
+ var providerIssue = {
153
+ "keyRejected": "API key rejected",
154
+ "unreachable": "Endpoint unreachable",
155
+ "keyRejectedHint": "The provider rejected this connection's API key. Update the key in the provider settings to resume.",
156
+ "unreachableHint": "The provider's endpoint did not respond. Check the endpoint URL and network access.",
157
+ "bannerKeyRejected": "API key rejected for “{provider}”",
158
+ "bannerUnreachable": "“{provider}” is unreachable"
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/en/agents.json
2
+ var title = "pw code";
3
+ var sidebar = {
4
+ "label": "Sessions",
5
+ "listNoun": "sessions",
6
+ "newSession": "New session",
7
+ "search": "Search sessions",
8
+ "find": "Find in this session",
9
+ "noSessions": "No sessions open yet",
10
+ "open": "Open sidebar",
11
+ "close": "Close sidebar",
12
+ "untitled": "Untitled",
13
+ "deleteTitle": "Delete session",
14
+ "deleteBody": "“{name}” and its transcript will be removed from {machine}. This cannot be undone.",
15
+ "deleteAction": "Delete",
16
+ "worktree": "Worktree",
17
+ "worktreeBranch": "Branch {branch}",
18
+ "worktreeChoice": "What happens to the worktree",
19
+ "keepWorktree": "Keep the worktree",
20
+ "keepWorktreeBody": "It stays on the computer with its branch, to keep working in or remove later.",
21
+ "removeWorktree": "Remove the worktree",
22
+ "removeWorktreeBody": "Deletes the worktree and its branch, with everything in them.",
23
+ "worktreeStays": "This worktree stays on the computer. Remove it there if you no longer need it.",
24
+ "worktreeUnchecked": "git couldn't check the worktree for work, so removing it may delete changes.",
25
+ "worktreeFiles": "Removing it deletes {count, plural, one {# uncommitted file} other {# uncommitted files}}:",
26
+ "worktreeCommits": "Removing it deletes {count, plural, one {# commit} other {# commits}} on its branch:",
27
+ "worktreeMore": "{count, plural, other {… and # more}}",
28
+ "renameTitle": "Rename session",
29
+ "renameLabel": "Session name",
30
+ "renamePlaceholder": "Enter a new name",
31
+ "renameAction": "Rename",
32
+ "moreOptions": "More options",
33
+ "groupNeedsYou": "Needs you",
34
+ "groupActive": "Active",
35
+ "groupInactive": "Inactive",
36
+ "groupArchived": "Archived",
37
+ "moveToGroup": "Move to group",
38
+ "newGroup": "New group…",
39
+ "newGroupName": "New group",
40
+ "renameGroup": "Rename group",
41
+ "deleteGroup": "Delete group",
42
+ "renameGroupTitle": "Name group",
43
+ "groupNameLabel": "Group name",
44
+ "groupNamePlaceholder": "Enter a name",
45
+ "deleteGroupTitle": "Delete group",
46
+ "deleteGroupBody": "“{name}” will be removed. Its sessions stay in the list.",
47
+ "groupActions": "Actions for {name}",
48
+ "groupsNeedUpdate": "Update pw on {machine} to keep its sessions in groups",
49
+ "groupWaiting": "{count, plural, one {# session needs you} other {# sessions need you}}",
50
+ "groupRunning": "{count, plural, one {# session running} other {# sessions running}}",
51
+ "pin": "Pin",
52
+ "unpin": "Unpin",
53
+ "pinned": "Pinned",
54
+ "fork": "Fork",
55
+ "forkMidTurn": "Available once the turn ends",
56
+ "leaveWorktree": "Leave worktree",
57
+ "leaveWorktreeTitle": "Leave the worktree?",
58
+ "leaveWorktreeBody": "The session goes back to working in {workspace}. Its conversation stays as it is.",
59
+ "leaveWorktreeKept": "The session left the worktree, but it couldn't be removed and stays on the computer.",
60
+ "stop": "Stop",
61
+ "archive": "Archive",
62
+ "restore": "Restore",
63
+ "archiveTitle": "Archive “{name}”?",
64
+ "archiveBody": "Running work in this session and its child agents stops, and its schedules pause. Restore it from the Archived group to use it again.",
65
+ "resize": "Resize session list",
66
+ "resizeHint": "Drag to resize; double-click to reset",
67
+ "moreActions": "More actions"
68
+ };
69
+ var start = {
70
+ "heading": "Start a pw code session",
71
+ "subheading": "Choose a machine and directory, then describe the task.",
72
+ "workspaceLabel": "Working directory",
73
+ "workspacePlaceholder": "/home/you/your-repo",
74
+ "startButton": "Start session",
75
+ "chooseMachine": "Choose a machine",
76
+ "notAnswering": "Not answering ({count})",
77
+ "chooseDirectory": "Choose a directory",
78
+ "otherPath": "Use another path…",
79
+ "composerPlaceholder": "Describe a task or ask a question",
80
+ "choosePermission": "Choose what the agent may do",
81
+ "howTitle": "Sessions you open show up here",
82
+ "howLabel": "How sessions show up here",
83
+ "howRemoteBefore": "In a running pw code session, run",
84
+ "howRemoteAfter": "and it is listed here within a few seconds.",
85
+ "howNewBefore": "Start a new session that is open from its first turn with",
86
+ "howAllBefore": "To open every new session on a machine, run",
87
+ "howAllAfter": "there and turn on Remote control for new sessions.",
88
+ "linkResolving": "Looking for session {id}…",
89
+ "linkMissing": "Remote control is off for session {id}. Run /rc in it and it is listed here.",
90
+ "startHereNone": "No machine allows remote session start yet. In pw code on a machine you use, run /settings and turn on Allow remote session start, and it is listed here.",
91
+ "handoffCard": "Starts with the chat “{title}”",
92
+ "handoffUntitled": "Untitled",
93
+ "handoffLoading": "Loading the chat…",
94
+ "handoffPlaceholder": "What should the agent do with this chat?",
95
+ "handoffDefaultTask": "Continue the work discussed in the conversation below.",
96
+ "handoffIntro": "This continues the AI chat “{title}”. The conversation so far:",
97
+ "handoffOmitted": "{count, plural, one {The first message is left out} other {The first # messages are left out}} to keep this short.",
98
+ "handoffUser": "User",
99
+ "handoffAssistant": "Assistant"
100
+ };
101
+ var status = {
102
+ "idle": "idle",
103
+ "running": "running",
104
+ "awaiting_approval": "approval needed",
105
+ "awaiting_answer": "answer needed",
106
+ "live_elsewhere": "live on {host}"
107
+ };
108
+ var machine = {
109
+ "connected": "connected",
110
+ "no_daemon": "pw code not running",
111
+ "no_agent": "no agent",
112
+ "unreachable": "unreachable",
113
+ "unsupported_agent": "agent too old",
114
+ "noDaemonHint": "pw code is not running on this machine. Run pw code in a terminal there to start it.",
115
+ "noAgentHint": "No pw agent is connected from this machine.",
116
+ "unreachableHint": "Not responding. Its sessions cannot be read until it is back.",
117
+ "unsupportedHint": "The agent on this machine is too old. Sessions cannot be read from it.",
118
+ "unsupportedHintVersion": "Agent {version} is too old. Sessions cannot be read from it.",
119
+ "computer": "Computer",
120
+ "resource": "Resource"
121
+ };
122
+ var detail = {
123
+ "commandsLabel": "Commands",
124
+ "archiveCommand": "Archive this session; it can be restored later",
125
+ "planOnMachine": "The plan is saved at {path} on the machine. Open it from pw code in a terminal there.",
126
+ "shellWhileRunning": "Wait for the turn to finish, then run the ! command.",
127
+ "archiveWhileRunning": "Wait for the turn to finish, then run /archive.",
128
+ "archived": "Archived “{name}”. Restore it from the Archived group to use it again.",
129
+ "steerUncertain": "No answer came back, so this may have reached the agent. Check the transcript before you send it again.",
130
+ "shellStopped": "A hook stopped the agent from reacting: {reason}",
131
+ "background": "Run in background",
132
+ "backgroundTitle": "The command keeps running, and the agent carries on without waiting for it",
133
+ "liveOn": "Live on {host}",
134
+ "pullRequest": "{kind, select, mergeRequest {Merge request} other {Pull request}} {pr}, opened by this session",
135
+ "pullRequestOpen": "{kind, select, mergeRequest {Merge request} other {Pull request}} {pr} from this session is open",
136
+ "pullRequestDraft": "{kind, select, mergeRequest {Merge request} other {Pull request}} {pr} from this session is a draft",
137
+ "pullRequestMerged": "{kind, select, mergeRequest {Merge request} other {Pull request}} {pr} from this session is merged",
138
+ "pullRequestClosed": "{kind, select, mergeRequest {Merge request} other {Pull request}} {pr} from this session is closed",
139
+ "pullRequestsMore": "+{count}",
140
+ "pullRequestsShowMoreOpen": "{count, plural, one {Show # more open pull request} other {Show # more open pull requests}}",
141
+ "pullRequestsShowMoreDone": "{count, plural, one {Show # more merged or closed pull request} other {Show # more merged or closed pull requests}}",
142
+ "pullRequestsMoreOpenTitle": "{count, plural, one {# more open pull request} other {# more open pull requests}}",
143
+ "pullRequestsMoreDoneTitle": "{count, plural, one {# more merged or closed pull request} other {# more merged or closed pull requests}}",
144
+ "pullRequestsMoreAllTitle": "{count, plural, one {# more pull request} other {# more pull requests}}",
145
+ "pullRequestState": {
146
+ "open": "Open",
147
+ "draft": "Draft",
148
+ "merged": "Merged",
149
+ "closed": "Closed"
150
+ },
151
+ "liveElsewhereBody": "This session is running in pw code on {host}. You can read along, but the transcript here is a snapshot and is not updated.",
152
+ "refresh": "Refresh",
153
+ "unreachableTitle": "No response from {machine} for {when}",
154
+ "unreachableBody": "Sessions are read live from the machine, so nothing new can be shown until it is reachable again.",
155
+ "checkAgain": "Check again",
156
+ "transcriptEnds": "End of transcript. This is the last state read from {machine}.",
157
+ "untrusted": "Settings, skills, and hooks in this workspace were not loaded because it has not been trusted. Trust it from a local pw code run on the machine, then resume.",
158
+ "reconnecting": "Live updates disconnected. Reconnecting…",
159
+ "waitingForUsageLimit": "Waiting for the usage limit to reset",
160
+ "waitingForUsageLimitUntil": "Waiting for the usage limit to reset at {time}",
161
+ "switchClaudeAccount": "Switch account",
162
+ "loading": "Loading transcript…",
163
+ "cleared": "The session was cleared; showing the new session.",
164
+ "dismiss": "Dismiss",
165
+ "transcriptLabel": "Session transcript",
166
+ "transcriptNoun": "transcript",
167
+ "retry": "Try again",
168
+ "composerPlaceholder": "Send a message to this session",
169
+ "composerLabel": "Message this session",
170
+ "composerAwaiting": "Answer the approval request to keep going",
171
+ "composerAwaitingAnswer": "Answer the question to keep going",
172
+ "composerLiveElsewhere": "Running in pw code on {host}",
173
+ "composerArchived": "This session is archived",
174
+ "footerArchived": "Read-only while archived. Restore it from the Archived group to use it again",
175
+ "composerUnreachable": "{machine} is unreachable, so messages cannot be delivered",
176
+ "footerAwaiting": "The session is paused until you approve or deny",
177
+ "footerAwaitingAnswer": "The session is paused until you answer",
178
+ "composerShellRunning": "Wait for the ! command to finish",
179
+ "footerShellRunning": "Running ! {command} on the machine…",
180
+ "footerLiveElsewhere": "Read-only while this session runs on another machine",
181
+ "footerUnreachable": "Read-only, last read {when}",
182
+ "send": "Send",
183
+ "imagesLabel": "Images to send",
184
+ "removeImage": "Remove {placeholder}",
185
+ "imageTooLarge": "This image is too large to attach.",
186
+ "imageUnsupported": "Only PNG, JPEG, GIF, and WebP images can be attached.",
187
+ "savingSettings": "Saving…",
188
+ "goalAchieved": "✓ Goal achieved ({elapsed} · {turns, plural, one {# turn} other {# turns}} · {tokens} tokens)",
189
+ "goalContinuing": "○ Goal not yet met… continuing",
190
+ "goalCheckFailed": "Goal check failed: {error}. The goal is still set and is checked again after the next turn.",
191
+ "goalUsageLimit": "Usage limit reached. The goal is checked again at {time}.",
192
+ "goalActive": "goal active",
193
+ "goalPaused": "goal paused",
194
+ "addedDirectory": "Added working directory: {path}",
195
+ "addedDirectoryAndMore": "{path} and {count, plural, one {# more working directory} other {# more working directories}}",
196
+ "workingDirectory": "Working directory: {path}",
197
+ "directoriesMore": "+{count}",
198
+ "directoriesTitle": "Working directories",
199
+ "originalDirectory": "Original working directory",
200
+ "directoryScope": {
201
+ "session": "This session",
202
+ "local": "Saved in local settings",
203
+ "project": "Saved in project settings",
204
+ "user": "Saved in user settings"
205
+ },
206
+ "removeDirectory": "Remove {path} from this session",
207
+ "savedDirectoriesNote": "Directories saved in settings are removed on the computer running this session, with /permissions.",
208
+ "allowedDirectoriesTitle": "Allowed this session",
209
+ "allowedAccess": {
210
+ "read": "Read",
211
+ "edit": "Read and edit",
212
+ "readFolder": "Read, this folder only",
213
+ "editFolder": "Read and edit, this folder only"
214
+ },
215
+ "checkingGoal": "Checking the goal",
216
+ "compacted": "Compacted",
217
+ "compactedAutomatically": "✻ Conversation compacted",
218
+ "recap": "Recap: {recap}",
219
+ "goalDetail": "Goal: {condition}\n\nReason: {reason}",
220
+ "turnEnd": "✻ {verb, select, baked {Baked} brewed {Brewed} churned {Churned} cogitated {Cogitated} cooked {Cooked} crunched {Crunched} sauteed {Sautéed} other {Worked}} for {duration} · done {time}",
221
+ "turnEndWaiting": "✻ Waiting for {count, plural, one {# background agent} other {# background agents}} to finish",
222
+ "turnSeconds": "{seconds}s",
223
+ "turnMinutes": "{minutes}m {seconds}s",
224
+ "turnHours": "{hours}h {minutes}m",
225
+ "planOpened": "Opened plan in editor: {path}",
226
+ "subagentMessage": "Message from {name}",
227
+ "commandCompleted": "Background command \"{name}\" completed (exit code 0)",
228
+ "commandFailed": "Background command \"{name}\" failed with exit code {code}",
229
+ "agentEnded": "Agent \"{name}\" {outcome, select, failed {failed} other {finished}}",
230
+ "agentEndedAfter": "Agent \"{name}\" {outcome, select, failed {failed} other {finished}} · {elapsed}",
231
+ "expandAll": "Expand all",
232
+ "collapseAll": "Collapse all"
233
+ };
234
+ var switcher = {
235
+ "title": "Agents",
236
+ "main": "Main conversation",
237
+ "runningOf": "{running} of {total} running",
238
+ "earlierOnly": "{count, plural, one {# earlier agent} other {# earlier agents}}",
239
+ "approvals": "{count, plural, one {# approval needed} other {# approvals needed}}",
240
+ "failedCount": "{count} failed",
241
+ "stopAll": "Stop all",
242
+ "show": "Show agents",
243
+ "hide": "Hide agents",
244
+ "showEarlier": "{count, plural, one {Show # earlier agent} other {Show # earlier agents}}",
245
+ "hideEarlier": "{count, plural, one {Hide # earlier agent} other {Hide # earlier agents}}",
246
+ "agentName": "{type}: {description}",
247
+ "stop": "Stop {name}",
248
+ "stopThis": "Stop",
249
+ "back": "Back to main",
250
+ "tokens": "{tokens} tokens",
251
+ "approval": "Approval needed",
252
+ "running": "Running",
253
+ "failed": "Failed",
254
+ "stopped": "Stopped",
255
+ "done": "Done",
256
+ "idle": "Idle",
257
+ "composer": "Message {name}",
258
+ "steerHint": "Sent as direction while the agent runs.",
259
+ "commandsOnMain": "Commands and ! run in the main conversation. Go back to main to use them.",
260
+ "transcriptLabel": "Agent transcript"
261
+ };
262
+ var effort = {
263
+ "label": "Effort",
264
+ "low": "low",
265
+ "medium": "medium",
266
+ "high": "high",
267
+ "xhigh": "xhigh",
268
+ "max": "max",
269
+ "faster": "Faster",
270
+ "smarter": "Smarter"
271
+ };
272
+ var permission = {
273
+ "read-only": "Read only",
274
+ "accept-edits": "Accept edits",
275
+ "auto": "Auto",
276
+ "bypass-permissions": "Bypass permissions",
277
+ "plan": "Plan",
278
+ "hint": {
279
+ "read-only": "The workspace can be read but not changed.",
280
+ "accept-edits": "File edits are applied without asking. The workspace can be changed without your review.",
281
+ "auto": "File edits are applied without asking. An automatic reviewer approves or denies most actions that would ask you.",
282
+ "bypass-permissions": "Every action is taken without asking, including commands that change the system.",
283
+ "plan": "The workspace is left unchanged while a plan is drafted."
284
+ }
285
+ };
286
+ var dash = {
287
+ "needsYou": "Needs you",
288
+ "waitingFor": "waiting {when}",
289
+ "answerInSession": "Waiting for an answer. Open the session to respond."
290
+ };
291
+ var claude = {
292
+ "disabled": "Claude Code is disabled by your organization. Use an approved platform or inference endpoint model.",
293
+ "notInstalled": "Claude Code is not installed on this agent host. To use /claude-code, install it with the official installer, or add claude to the PATH pw code runs with.",
294
+ "models": "Claude subscription",
295
+ "loadingModels": "Loading Claude models…",
296
+ "refreshModels": "Refresh models",
297
+ "accounts": "Claude Code accounts",
298
+ "close": "Close Claude Code accounts",
299
+ "noAccounts": "No Claude Code accounts are configured on this machine.",
300
+ "selected": "Claude Code · {account}",
301
+ "choose": "Claude Code account",
302
+ "hostAccounts": "Accounts on {host}",
303
+ "loadingAccounts": "Loading accounts…",
304
+ "loadingUsage": "Loading usage…",
305
+ "signedOut": "Not signed in",
306
+ "usageUnavailable": "Usage unavailable",
307
+ "current": "Selected account",
308
+ "loginOnHost": "To sign in, run /claude-code in pw code on this host.",
309
+ "fiveHour": "5h {percent} used",
310
+ "week": "Week {percent} used",
311
+ "resets": "resets {time}",
312
+ "platformModels": "Platform models",
313
+ "shortAccount": "Account",
314
+ "fiveHourColumn": "5h used",
315
+ "weekColumn": "Week used",
316
+ "resetsIn": "Resets in {time}",
317
+ "resetsInShort": "in {time}",
318
+ "addAccount": "Add account",
319
+ "signIn": "Sign in",
320
+ "signInAgain": "Sign in again",
321
+ "signInTitle": "Sign in to Claude Code",
322
+ "profileOnHost": "{account} on {host}",
323
+ "accountName": "Account name",
324
+ "accountNameHelp": "Use 1–64 letters, numbers, dots, @, hyphens or underscores. This is a local label for the account.",
325
+ "invalidAccountName": "Choose a name with 1–64 letters, numbers, dots, @, hyphens or underscores. A single dot or two dots cannot be used as a name, and names cannot end in .lock.",
326
+ "continueSignIn": "Continue to sign in",
327
+ "backToAccounts": "Back to accounts",
328
+ "loginStaysOnHost": "Your Claude Code login stays on {host}.",
329
+ "loadingTerminal": "Loading sign-in terminal…",
330
+ "signInTerminal": "Claude Code sign-in terminal",
331
+ "startingSignIn": "Starting sign-in…",
332
+ "signInInstructions": "Open the sign-in page and follow Claude’s prompts. If Claude gives you a code, paste it into the terminal. Your login stays on {host}.",
333
+ "openSignInPage": "Open sign-in page",
334
+ "inputTooLong": "This paste is too large. Paste only the verification code.",
335
+ "terminalTruncated": "Earlier terminal output is no longer available.",
336
+ "reconnectSignIn": "Reconnect",
337
+ "retrySignIn": "Try again",
338
+ "cancelSignIn": "Cancel sign-in",
339
+ "useThisAccount": "Use this account",
340
+ "remove": "Remove",
341
+ "removeAccount": "Remove account",
342
+ "removeBody": "Sign {account} out and remove it from {host}?",
343
+ "signInStatus": {
344
+ "running": "Follow the prompts in the terminal.",
345
+ "checking": "Verifying sign-in…",
346
+ "signed_in": "Signed in as {email}.",
347
+ "failed": "Sign-in could not be verified. Check the terminal output and try again.",
348
+ "canceled": "Sign-in was canceled.",
349
+ "expired": "Sign-in expired. Try again."
350
+ },
351
+ "useAccount": "Use",
352
+ "accountActions": "Actions for {account}"
353
+ };
354
+ var terminal = {
355
+ "title": "Continue in a terminal",
356
+ "resourceBody": "Picks up this conversation in pw code. It keeps running on {machine}, and this page follows along.",
357
+ "computerBody": "This session runs on {host}. Run this in a terminal there to pick it up in pw code. This page follows along.",
358
+ "anyTerminal": "Works in any terminal signed in to pw.",
359
+ "archived": "Picking it up brings it back from Archived.",
360
+ "open": "Open in terminal",
361
+ "offline": "The workspace terminal is not connected. Copy the command to run it in another terminal.",
362
+ "commandLabel": "terminal command",
363
+ "machineLoading": "Looking up this session’s machine…",
364
+ "machineMissing": "This session’s machine is not listed right now, so there is no command for it yet."
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 };