@skillcdn/console 0.6.2 → 0.6.4

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 (253) hide show
  1. package/README.md +16 -9
  2. package/SKILLCDN.md +3 -2
  3. package/dist/agent-page.d.ts +2 -0
  4. package/dist/agent-page.d.ts.map +1 -1
  5. package/dist/agent-page.js +46 -5
  6. package/dist/agent-page.js.map +1 -1
  7. package/dist/agent-state.d.ts +9 -0
  8. package/dist/agent-state.d.ts.map +1 -0
  9. package/dist/agent-state.js +28 -0
  10. package/dist/agent-state.js.map +1 -0
  11. package/dist/api.d.ts +6 -4
  12. package/dist/api.d.ts.map +1 -1
  13. package/dist/api.js +6 -4
  14. package/dist/api.js.map +1 -1
  15. package/dist/cli/cli.d.ts +2 -0
  16. package/dist/cli/cli.d.ts.map +1 -1
  17. package/dist/cli/cli.js +948 -252
  18. package/dist/cli/cli.js.map +1 -1
  19. package/dist/cli/format.d.ts +44 -7
  20. package/dist/cli/format.d.ts.map +1 -1
  21. package/dist/cli/format.js +168 -13
  22. package/dist/cli/format.js.map +1 -1
  23. package/dist/cli/help.d.ts +82 -9
  24. package/dist/cli/help.d.ts.map +1 -1
  25. package/dist/cli/help.js +855 -331
  26. package/dist/cli/help.js.map +1 -1
  27. package/dist/cli/pack.d.ts +13 -12
  28. package/dist/cli/pack.d.ts.map +1 -1
  29. package/dist/cli/pack.js +33 -45
  30. package/dist/cli/pack.js.map +1 -1
  31. package/dist/cli/plugin-cli.d.ts.map +1 -1
  32. package/dist/cli/plugin-cli.js +8 -5
  33. package/dist/cli/plugin-cli.js.map +1 -1
  34. package/dist/cli/runner-files.d.ts +16 -0
  35. package/dist/cli/runner-files.d.ts.map +1 -0
  36. package/dist/cli/runner-files.js +125 -0
  37. package/dist/cli/runner-files.js.map +1 -0
  38. package/dist/cli/runner-host.d.ts +7 -0
  39. package/dist/cli/runner-host.d.ts.map +1 -1
  40. package/dist/cli/runner-host.js +40 -2
  41. package/dist/cli/runner-host.js.map +1 -1
  42. package/dist/cli/skill-path.d.ts +11 -0
  43. package/dist/cli/skill-path.d.ts.map +1 -0
  44. package/dist/cli/skill-path.js +44 -0
  45. package/dist/cli/skill-path.js.map +1 -0
  46. package/dist/client.d.ts +32 -1
  47. package/dist/client.d.ts.map +1 -1
  48. package/dist/client.js +15 -1
  49. package/dist/client.js.map +1 -1
  50. package/dist/components/agent-page.d.ts +93 -6
  51. package/dist/components/agent-page.d.ts.map +1 -1
  52. package/dist/components/agent-page.js +202 -10
  53. package/dist/components/agent-page.js.map +1 -1
  54. package/dist/components/agents.d.ts +6 -6
  55. package/dist/components/agents.d.ts.map +1 -1
  56. package/dist/components/agents.js +16 -9
  57. package/dist/components/agents.js.map +1 -1
  58. package/dist/components/people.d.ts.map +1 -1
  59. package/dist/components/people.js +7 -2
  60. package/dist/components/people.js.map +1 -1
  61. package/dist/components/picker.d.ts +16 -0
  62. package/dist/components/picker.d.ts.map +1 -1
  63. package/dist/components/picker.js +69 -4
  64. package/dist/components/picker.js.map +1 -1
  65. package/dist/console.css +40 -0
  66. package/dist/console.js +2 -2
  67. package/dist/console.js.map +1 -1
  68. package/dist/feed-words.d.ts.map +1 -1
  69. package/dist/feed-words.js +12 -1
  70. package/dist/feed-words.js.map +1 -1
  71. package/dist/i18n/en.d.ts +64 -6
  72. package/dist/i18n/en.d.ts.map +1 -1
  73. package/dist/i18n/en.js +59 -10
  74. package/dist/i18n/en.js.map +1 -1
  75. package/dist/i18n/ko.d.ts.map +1 -1
  76. package/dist/i18n/ko.js +49 -9
  77. package/dist/i18n/ko.js.map +1 -1
  78. package/dist/limits.d.ts +26 -0
  79. package/dist/limits.d.ts.map +1 -1
  80. package/dist/limits.js +26 -0
  81. package/dist/limits.js.map +1 -1
  82. package/dist/onboarding.d.ts +18 -6
  83. package/dist/onboarding.d.ts.map +1 -1
  84. package/dist/onboarding.js +42 -7
  85. package/dist/onboarding.js.map +1 -1
  86. package/dist/plugin/args.d.ts +24 -2
  87. package/dist/plugin/args.d.ts.map +1 -1
  88. package/dist/plugin/args.js +20 -2
  89. package/dist/plugin/args.js.map +1 -1
  90. package/dist/plugin/context.d.ts +39 -7
  91. package/dist/plugin/context.d.ts.map +1 -1
  92. package/dist/plugin/define.d.ts.map +1 -1
  93. package/dist/plugin/define.js +12 -3
  94. package/dist/plugin/define.js.map +1 -1
  95. package/dist/plugin/rest-schemas.d.ts +2 -0
  96. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  97. package/dist/plugin/rest-schemas.js +1 -0
  98. package/dist/plugin/rest-schemas.js.map +1 -1
  99. package/dist/routes.d.ts +2 -0
  100. package/dist/routes.d.ts.map +1 -1
  101. package/dist/routes.js +2 -0
  102. package/dist/routes.js.map +1 -1
  103. package/dist/rules.d.ts +4 -1
  104. package/dist/rules.d.ts.map +1 -1
  105. package/dist/rules.js +5 -2
  106. package/dist/rules.js.map +1 -1
  107. package/dist/runner/acp.d.ts.map +1 -1
  108. package/dist/runner/acp.js +9 -3
  109. package/dist/runner/acp.js.map +1 -1
  110. package/dist/runner/claude.d.ts.map +1 -1
  111. package/dist/runner/claude.js +53 -1
  112. package/dist/runner/claude.js.map +1 -1
  113. package/dist/runner/codex.d.ts.map +1 -1
  114. package/dist/runner/codex.js +18 -3
  115. package/dist/runner/codex.js.map +1 -1
  116. package/dist/runner/config.d.ts +18 -0
  117. package/dist/runner/config.d.ts.map +1 -1
  118. package/dist/runner/config.js +77 -1
  119. package/dist/runner/config.js.map +1 -1
  120. package/dist/runner/desk.d.ts +7 -0
  121. package/dist/runner/desk.d.ts.map +1 -1
  122. package/dist/runner/desk.js +14 -4
  123. package/dist/runner/desk.js.map +1 -1
  124. package/dist/runner/message.d.ts +16 -22
  125. package/dist/runner/message.d.ts.map +1 -1
  126. package/dist/runner/message.js +72 -120
  127. package/dist/runner/message.js.map +1 -1
  128. package/dist/runner/runner.d.ts +41 -1
  129. package/dist/runner/runner.d.ts.map +1 -1
  130. package/dist/runner/runner.js +557 -23
  131. package/dist/runner/runner.js.map +1 -1
  132. package/dist/runner/slack-status.d.ts +19 -0
  133. package/dist/runner/slack-status.d.ts.map +1 -0
  134. package/dist/runner/slack-status.js +332 -0
  135. package/dist/runner/slack-status.js.map +1 -0
  136. package/dist/runner/slack.d.ts.map +1 -1
  137. package/dist/runner/slack.js +258 -59
  138. package/dist/runner/slack.js.map +1 -1
  139. package/dist/runner/types.d.ts +128 -15
  140. package/dist/runner/types.d.ts.map +1 -1
  141. package/dist/runner/types.js.map +1 -1
  142. package/dist/runner/usage.d.ts +6 -1
  143. package/dist/runner/usage.d.ts.map +1 -1
  144. package/dist/runner/usage.js +9 -2
  145. package/dist/runner/usage.js.map +1 -1
  146. package/dist/runner.d.ts +2 -2
  147. package/dist/runner.d.ts.map +1 -1
  148. package/dist/runner.js.map +1 -1
  149. package/dist/schemas.d.ts +635 -6
  150. package/dist/schemas.d.ts.map +1 -1
  151. package/dist/schemas.js +197 -15
  152. package/dist/schemas.js.map +1 -1
  153. package/dist/secret-file.d.ts +21 -0
  154. package/dist/secret-file.d.ts.map +1 -0
  155. package/dist/secret-file.js +59 -0
  156. package/dist/secret-file.js.map +1 -0
  157. package/dist/services.d.ts.map +1 -1
  158. package/dist/services.js +3 -2
  159. package/dist/services.js.map +1 -1
  160. package/dist/setup-guide.d.ts +2 -2
  161. package/dist/setup-guide.d.ts.map +1 -1
  162. package/dist/setup-guide.js +6 -5
  163. package/dist/setup-guide.js.map +1 -1
  164. package/dist/vocabulary.d.ts +17 -2
  165. package/dist/vocabulary.d.ts.map +1 -1
  166. package/dist/vocabulary.js +15 -2
  167. package/dist/vocabulary.js.map +1 -1
  168. package/dist/wake-text.d.ts +43 -0
  169. package/dist/wake-text.d.ts.map +1 -0
  170. package/dist/wake-text.js +115 -0
  171. package/dist/wake-text.js.map +1 -0
  172. package/docs/specs/cli.md +39 -25
  173. package/docs/specs/plugins.md +10 -9
  174. package/docs/specs/rest.md +34 -15
  175. package/docs/specs/runner.md +108 -25
  176. package/docs/start.md +28 -6
  177. package/package.json +3 -3
  178. package/skills/building-a-plugin/SKILL.md +2 -2
  179. package/skills/deploying-a-console/SKILL.md +3 -3
  180. package/skills/deploying-a-console/references/access.md +15 -1
  181. package/skills/deploying-a-console/references/resources.md +2 -2
  182. package/skills/deploying-a-console/scripts/github-app.mjs +593 -0
  183. package/skills/keeping-the-pack/SKILL.md +87 -0
  184. package/skills/planning-the-board/SKILL.md +6 -6
  185. package/skills/planning-the-board/references/a-task.md +1 -1
  186. package/skills/planning-the-board/references/setting-up.md +9 -5
  187. package/skills/running-an-agent/SKILL.md +21 -17
  188. package/skills/running-an-agent/references/preparing-the-machine.md +4 -3
  189. package/skills/running-an-agent/references/several-tasks.md +8 -2
  190. package/skills/running-an-agent/references/slack-app.md +31 -8
  191. package/skills/running-an-agent/references/the-account-and-the-invitation.md +1 -1
  192. package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -1
  193. package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +4 -4
  194. package/skills/running-an-agent/references/your-first-task.md +11 -5
  195. package/skills/trying-a-console/SKILL.md +136 -0
  196. package/skills/trying-a-console/references/when-it-does-not-go.md +30 -0
  197. package/skills/working-the-board/SKILL.md +6 -6
  198. package/skills/working-the-board/references/terms.md +3 -1
  199. package/skills/working-the-board/references/the-pack.md +14 -7
  200. package/skills/working-the-board/references/what-they-were-told.md +1 -1
  201. package/src/agent-page.tsx +111 -4
  202. package/src/agent-state.ts +33 -0
  203. package/src/api.ts +43 -0
  204. package/src/cli/cli.ts +1190 -313
  205. package/src/cli/format.ts +207 -13
  206. package/src/cli/help.ts +991 -372
  207. package/src/cli/pack.ts +55 -62
  208. package/src/cli/plugin-cli.ts +8 -5
  209. package/src/cli/runner-files.ts +137 -0
  210. package/src/cli/runner-host.ts +48 -2
  211. package/src/cli/skill-path.ts +51 -0
  212. package/src/client.ts +103 -0
  213. package/src/components/agent-page.tsx +446 -20
  214. package/src/components/agents.tsx +27 -28
  215. package/src/components/people.tsx +7 -3
  216. package/src/components/picker.tsx +79 -5
  217. package/src/console.tsx +1 -1
  218. package/src/feed-words.ts +14 -1
  219. package/src/i18n/en.ts +64 -11
  220. package/src/i18n/ko.ts +55 -9
  221. package/src/limits.ts +26 -0
  222. package/src/onboarding.ts +60 -21
  223. package/src/plugin/args.ts +29 -3
  224. package/src/plugin/context.ts +40 -7
  225. package/src/plugin/define.ts +18 -3
  226. package/src/plugin/rest-schemas.ts +3 -0
  227. package/src/routes.ts +2 -0
  228. package/src/rules.ts +5 -2
  229. package/src/runner/acp.ts +9 -3
  230. package/src/runner/claude.ts +58 -1
  231. package/src/runner/codex.ts +18 -3
  232. package/src/runner/config.ts +114 -1
  233. package/src/runner/desk.ts +15 -4
  234. package/src/runner/message.ts +88 -126
  235. package/src/runner/runner.ts +682 -27
  236. package/src/runner/slack-status.ts +423 -0
  237. package/src/runner/slack.ts +310 -67
  238. package/src/runner/types.ts +124 -13
  239. package/src/runner/usage.ts +16 -3
  240. package/src/runner.ts +4 -0
  241. package/src/schemas.ts +245 -13
  242. package/src/secret-file.ts +76 -0
  243. package/src/services.ts +3 -2
  244. package/src/setup-guide.ts +6 -5
  245. package/src/styles/README.md +1 -1
  246. package/src/styles/pages/agents.css +40 -0
  247. package/src/vocabulary.ts +21 -2
  248. package/src/wake-text.ts +133 -0
  249. package/dist/cli/command-words.d.ts +0 -20
  250. package/dist/cli/command-words.d.ts.map +0 -1
  251. package/dist/cli/command-words.js +0 -51
  252. package/dist/cli/command-words.js.map +0 -1
  253. package/src/cli/command-words.ts +0 -56
package/src/i18n/ko.ts CHANGED
@@ -59,6 +59,7 @@ export const ko: Messages = {
59
59
  cancel: "취소",
60
60
  save: "저장",
61
61
  remove: "제거",
62
+ change: "변경",
62
63
  edit: "편집",
63
64
  done: "확인",
64
65
  loading: "불러오는 중",
@@ -175,8 +176,7 @@ export const ko: Messages = {
175
176
  "team.invalid_member": "활성 상태인 워크스페이스의 사람만 팀에 넣을 수 있습니다.",
176
177
  "team.not_a_member": "그 사람은 이 팀에 없습니다.",
177
178
  "person.invalid_manager": "본인, 본인의 팀원, 비활성화된 사람은 매니저로 지정할 수 없습니다.",
178
- "person.last_admin": "관리자가 한 명은 있어야 합니다.",
179
- "person.agent_admin": "에이전트 계정은 관리자가 될 수 없습니다.",
179
+ "person.last_admin": "사람인 관리자가 한 명은 있어야 합니다.",
180
180
  "person.manager_required":
181
181
  "에이전트 계정에는 매니저가 꼭 있어야 합니다. 비울 수 없으니 다른 사람을 지정하세요.",
182
182
  "agent.too_many_accounts":
@@ -189,6 +189,12 @@ export const ko: Messages = {
189
189
  "secret.unreadable": "이 배포의 키로 값을 열 수 없습니다. 값을 가진 사람이 다시 넣어야 합니다.",
190
190
  "secret.own_session":
191
191
  "시크릿 저장소는 계정 자신이 로그인해서 읽습니다. 계정이 만든 토큰으로는 읽을 수 없습니다.",
192
+ "secret.exists":
193
+ "계정에 같은 이름의 시크릿이 이미 있습니다. 계정이 다른 이름으로 받거나, 바꾸겠다고 한 경우에만 그 자리에 받습니다.",
194
+ "secret.offer_not_found": "계정에 대기 중인 그런 제안이 없습니다.",
195
+ "secret.too_many_offers":
196
+ "이 계정에 대기할 수 있는 만큼의 제안이 이미 있습니다. 하나를 받거나, 받지 않거나, 기한이 지나야 합니다.",
197
+ "secret.offer_own": "계정 자신의 시크릿은 계정이 직접 넣습니다.",
192
198
  "agent.own_command":
193
199
  "계정 자신만 할 수 있는 요청입니다. 계정으로 로그인한 명령의 러너가 요청합니다.",
194
200
  "signal.not_offered": "에이전트의 제품이 제공하지 않는 모델 또는 추론 강도입니다.",
@@ -210,13 +216,15 @@ export const ko: Messages = {
210
216
  "agent.not_found": "에이전트 계정을 찾을 수 없습니다.",
211
217
  "agent.handle_taken": "이미 다른 에이전트 계정이 쓰는 핸들입니다.",
212
218
  "agent.exists": "이미 에이전트 계정인 로그인입니다.",
213
- "agent.administrator": "관리자는 에이전트 계정으로 바꿀 수 없습니다. 먼저 멤버로 바꾸세요.",
214
219
  "agent.login_is_member":
215
220
  "이미 멤버가 쓰는 로그인입니다. 바뀐 것은 없습니다. 에이전트가 쓸 계정의 로그인을 적거나, 이 멤버를 에이전트 계정으로 바꾼다고 표시하세요.",
216
221
  "agent.invalid_manager":
217
222
  "매니저는 활성 상태인 다른 구성원이어야 하고, 이 계정에게 보고하는 구성원은 될 수 없습니다.",
218
- "agent.invalid_project": "시작할 프로젝트를 찾을 수 없습니다.",
219
223
  "agent.unknown_host": "이 콘솔에서는 그 제공자로 로그인하지 않습니다.",
224
+ "note.closed": "이미 닫힌 메모입니다.",
225
+ "note.not_found": "메모를 찾을 수 없습니다.",
226
+ "note.too_many":
227
+ "스킬에 남긴 열린 메모가 한도에 도달했거나, 한 시간 동안 남길 수 있는 수를 채웠습니다. 열린 메모는 스킬 관리자가 일부를 닫아야 하고, 시간 한도는 한 시간 뒤에 풀립니다.",
220
228
  "person.not_found": "사람을 찾을 수 없습니다.",
221
229
  "person.of_organization": "조직 설정으로 정해지는 사람이라 여기서 바꿀 수 없습니다.",
222
230
  "picture.refused": "표시할 수 없는 이미지입니다.",
@@ -268,6 +276,8 @@ export const ko: Messages = {
268
276
  "token.not_found": "토큰을 찾을 수 없습니다.",
269
277
  "session.not_found": "세션을 찾을 수 없습니다.",
270
278
  "token.too_many": "만들 수 있는 토큰 수를 다 채웠습니다. 먼저 하나를 삭제하세요.",
279
+ "workspace.keeper_not_found":
280
+ "그 id의 구성원이 없습니다. 스킬 관리자는 구성원 가운데 한 명입니다.",
271
281
  "workspace.pack_connect_refused": "SkillCDN이 연결을 거부했습니다.",
272
282
  "workspace.pack_connect_unsupported": "이 콘솔에서는 팩을 연결할 수 없습니다.",
273
283
  "workspace.identity_unavailable":
@@ -1963,6 +1973,36 @@ export const ko: Messages = {
1963
1973
  title: "그런 에이전트 계정이 없습니다",
1964
1974
  body: "없는 계정이거나, 볼 수 없는 계정입니다.",
1965
1975
  },
1976
+ offers: {
1977
+ title: "제안된 시크릿",
1978
+ offerTitle: "시크릿 제안",
1979
+ offerAria: "시크릿 제안",
1980
+ intro: (name: string, days: number) =>
1981
+ `${name}에게 알려지며, 받을지 말지는 계정이 직접 정합니다. 값은 여기에 한 번 입력하거나 파일의 내용으로 넣으며, 누구에게도 보이지 않습니다. 받지 않은 제안은 ${days}일 뒤 사라집니다.`,
1982
+ waits: (name: string) =>
1983
+ `받을지 말지는 ${name} 계정이 직접 정합니다. 값은 보이지 않습니다.`,
1984
+ own: "명령으로 받거나 받지 않습니다: console secrets --offered",
1985
+ name: "이름",
1986
+ namePlaceholder: "mail.password",
1987
+ value: "값",
1988
+ note: "용도",
1989
+ offer: "제안",
1990
+ someone: "지금은 없는 사람",
1991
+ takenAs: (name: string) => `받은 이름: ${name}`,
1992
+ state: { waiting: "대기 중", taken: "받음", left: "받지 않음", lapsed: "기한 지남" },
1993
+ },
1994
+ secretFile: {
1995
+ choose: "파일 선택",
1996
+ remove: (name) => `${name} 빼기`,
1997
+ ends: "값 만료",
1998
+ endsNever: "만료 없음",
1999
+ endsOnDay: "날짜 지정",
2000
+ expiresOn: "값 만료일",
2001
+ tooLarge: (most) => `파일 내용이 너무 깁니다. 시크릿 값은 ${most}까지입니다.`,
2002
+ notText: "텍스트 파일이 아닙니다. 시크릿 값은 .env 파일처럼 텍스트여야 합니다.",
2003
+ empty: "빈 파일입니다.",
2004
+ unread: "파일을 읽지 못했습니다. 다시 선택해 주세요.",
2005
+ },
1966
2006
  notSupervised: {
1967
2007
  title: "감독자만 볼 수 있습니다",
1968
2008
  body: "에이전트가 하는 일은 매니저와 그 위의 매니저들, 그리고 관리자만 볼 수 있습니다.",
@@ -1976,6 +2016,8 @@ export const ko: Messages = {
1976
2016
  failed: "실패",
1977
2017
  unheard: "응답 없음",
1978
2018
  since: { before: "", after: "부터" },
2019
+ sinceAs: (state) => ({ before: "", after: `부터 ${state}` }),
2020
+ reasonAt: { before: " (", after: ")" },
1979
2021
  until: { before: "", after: "까지" },
1980
2022
  heard: "러너의 마지막 응답",
1981
2023
  reasons: {
@@ -2154,7 +2196,6 @@ export const ko: Messages = {
2154
2196
  user: "OS 계정",
2155
2197
  version: "러너",
2156
2198
  product: "제품",
2157
- untried: "드라이버가 시험되지 않은 버전",
2158
2199
  signals: "신호",
2159
2200
  delivered: (delivered: number, latest: number) => `${latest}개 중 ${delivered}개 전달됨`,
2160
2201
  sources: "깨움 소스",
@@ -2191,7 +2232,7 @@ export const ko: Messages = {
2191
2232
  secrets: {
2192
2233
  title: "시크릿",
2193
2234
  intro:
2194
- "이름으로만 보입니다. 값은 여기에 한 번 입력하면 다시 보이지 않으며, 계정만 값을 읽습니다.",
2235
+ "이름으로만 보입니다. 값은 여기에 한 번 입력하거나 파일의 내용으로 넣으며, 다시 보이지 않습니다. 계정만 값을 읽습니다.",
2195
2236
  empty: "아직 보관된 시크릿이 없습니다.",
2196
2237
  seedAria: "시크릿 넣기",
2197
2238
  seeded: "감독자가 넣음",
@@ -2311,15 +2352,20 @@ export const ko: Messages = {
2311
2352
  },
2312
2353
  loginDerived:
2313
2354
  "워크스페이스 설정의 서비스에서 만든 이름입니다. 계정 이름이 다르면 바꾸세요.",
2314
- reports: "보고할 사람과 시작할 곳",
2355
+ reports: "보고할 사람",
2315
2356
  next: "추가한 뒤에는 계정의 페이지에서 머신으로 이어지는 초대를 만듭니다.",
2316
2357
  manager: "매니저",
2317
2358
  managerHint:
2318
- "매니저는 에이전트가 먼저 찾는 사람이자 이 계정을 책임지는 사람입니다. 관리자가 언제든 바꿀 수 있습니다. 고른 프로젝트에서 멤버로 시작합니다.",
2319
- project: "시작 프로젝트",
2359
+ "매니저는 에이전트가 먼저 찾는 사람이자 이 계정을 책임지는 사람입니다. 관리자가 언제든 바꿀 수 있습니다. 비공개 프로젝트에는 다른 멤버처럼 추가합니다.",
2320
2360
  submit: "에이전트 계정 추가",
2321
2361
  },
2322
2362
  },
2363
+ status: {
2364
+ thinking: "생각 중",
2365
+ working: "작업 중 · 답이 조금 늦어요",
2366
+ limited: "충전 중",
2367
+ back: "{time}에 돌아와요",
2368
+ },
2323
2369
  },
2324
2370
 
2325
2371
  sessions: {
package/src/limits.ts CHANGED
@@ -61,6 +61,16 @@ export const MAX_PERSON_NAME_LENGTH = 80;
61
61
  export const MAX_AGENT_SECRET_NAME_LENGTH = 64;
62
62
  export const MAX_AGENT_SECRET_BYTES = 8 * 1024;
63
63
  export const MAX_AGENT_SECRETS = 200;
64
+ /**
65
+ * A secret a member offers an agent account (ADR-0169): what it is for, in a line; how many
66
+ * offers wait for one account at once, and how many of them one member's; how long one waits
67
+ * before it is gone; and how many the account's record of them keeps once they no longer wait.
68
+ */
69
+ export const MAX_SECRET_OFFER_NOTE_LENGTH = 200;
70
+ export const MAX_SECRET_OFFERS_WAITING = 20;
71
+ export const MAX_SECRET_OFFERS_BY_ONE = 5;
72
+ export const SECRET_OFFER_DAYS = 7;
73
+ export const MAX_SECRET_OFFERS_KEPT = 200;
64
74
  /** What a signal says to an agent (ADR-0085): a few paragraphs. */
65
75
  export const MAX_SIGNAL_LENGTH = 8000;
66
76
  /** What a wake a runner raises itself is about, in a line: a thread at a messenger, say. */
@@ -128,6 +138,22 @@ export const MAX_AGENT_ELSEWHERE = 20;
128
138
  export const MAX_ELSEWHERE_NAME_LENGTH = 200;
129
139
  /** When an agent account's day starts, in the workspace's time zone, where the account says no other hour (ADR-0085). */
130
140
  export const DEFAULT_DAY_START = "09:00";
141
+ /**
142
+ * A note a member leaves on the pack (ADR-0178): what it says, in a few sentences; what is said
143
+ * of what became of it; the path it is on; how many one member has open at once, and how many
144
+ * they leave within an hour, whatever became of them, which is the bound a script that leaves
145
+ * and takes back in a loop meets; and how many a page of the list carries when none is asked
146
+ * for, and the most it may.
147
+ */
148
+ export const MAX_PACK_NOTE_LENGTH = 1200;
149
+ export const MAX_PACK_NOTE_OUTCOME_LENGTH = 600;
150
+ export const MAX_PACK_NOTE_PATH_LENGTH = 300;
151
+ export const MAX_PACK_NOTES_OPEN_BY_ONE = 50;
152
+ export const MAX_PACK_NOTES_PER_HOUR = 60;
153
+ export const PACK_NOTES_PAGE_LIMIT = 50;
154
+ export const MAX_PACK_NOTES_PAGE_LIMIT = 200;
155
+ /** The hour of the round of whoever keeps the pack, in the workspace's time zone, where the workspace says no other (ADR-0178). */
156
+ export const DEFAULT_PACK_ROUND = "03:00";
131
157
  /** A service a workspace names (ADR-0089): how many parameters one has beside its kind, and how long one is. */
132
158
  export const MAX_SERVICE_PARAMETERS = 8;
133
159
  export const MAX_SERVICE_VALUE_LENGTH = 200;
package/src/onboarding.ts CHANGED
@@ -1,43 +1,64 @@
1
+ import { MAX_SIGNAL_LENGTH } from "./limits.js";
2
+ import { agentHref } from "./router.js";
1
3
  import type { RestWorkspace } from "./schemas.js";
2
4
  import { BROWSER_OF_AN_AGENT, guideServicesOf } from "./setup-guide.js";
3
5
 
4
- // The onboarding of an agent account (ADR-0088, points 4 to 6): its first task, which the
5
- // console makes when the account is made, with the agent as its worker. The agent works it as
6
- // any task, with a run, reports and decisions; what only a person can do it asks for as a
7
- // decision, of whoever can do it; the board wakes the agent with it as with any ready task it
8
- // is at work on, which is its first wake. Its run stays open while a decision of it waits, which
9
- // the console never ends, and the task is finished when nothing of it waits on anyone: a run
10
- // finished with decisions waiting could ask no more. The task's words are made here, for one account and the
11
- // services of its workspace, in the words of their modules: English, as a skill is, for the
12
- // agent to read as they are. Every task says how help is asked, whatever the services are
13
- // (ADR-0152): the agent does everything it can itself, and what it cannot is its own to judge.
6
+ // The onboarding of an agent account (ADR-0181, in place of ADR-0088's points 4 to 6): the
7
+ // console's first message to it, left on the account's record when the account is made and
8
+ // delivered when a runner first connects, which is its first wake. It is no task of a board: an
9
+ // account is made in no project, and is put in one later as any member is. The agent does what
10
+ // the message lists in its own sessions; what only a person can do it asks for as a decision,
11
+ // of whoever can do it, on a task it writes for its setup in a project it is in, and where it
12
+ // is in none yet it says what it needs in its answer, which its supervisors read on its page.
13
+ // The words are made here, for one account and the services of its workspace, in the words of
14
+ // their modules: English, as a skill is, for the agent to read as they are. Every message says
15
+ // how help is asked, whatever the services are (ADR-0152): the agent does everything it can
16
+ // itself, and what it cannot is its own to judge.
14
17
 
15
18
  export interface OnboardingInput {
16
- /** The account's handle: what the task and its commands name it by. */
19
+ /** The account's handle: what the message and its commands name it by. */
17
20
  readonly handle: string;
18
21
  /** The workspace's names and services (ADR-0089). */
19
22
  readonly workspace: Pick<RestWorkspace, "handle" | "domain" | "services">;
20
23
  /**
21
- * The login the account signs in to the console with, where whoever makes the task knows it:
22
- * an address there is the account's own address, which the task then names. Left out, what
23
- * the workspace's identity service makes of its names.
24
+ * The login the account signs in to the console with, where whoever makes the account knows
25
+ * it: an address there is the account's own address, which the message then names. Left out,
26
+ * what the workspace's identity service makes of its names.
24
27
  */
25
28
  readonly login?: string | undefined;
26
29
  }
27
30
 
28
- /** What the onboarding task of an account is called. */
31
+ /**
32
+ * What the onboarding is called on the account's record: the reference of the wake that
33
+ * carries it, which its header names (`console: onboarding`).
34
+ */
35
+ export const ONBOARDING_KEY = "onboarding";
36
+
37
+ /**
38
+ * What a task for an account's setup is called: the one the account writes where it has
39
+ * something to ask of a person, and the one a console of before made with the account, which
40
+ * such an account keeps.
41
+ */
29
42
  export function onboardingTitle(handle: string): string {
30
43
  return `Set up @${handle}`;
31
44
  }
32
45
 
33
46
  const item = (title: string, body: string): string => `- **${title}.** ${body}`;
34
47
 
35
- /** The onboarding task of one account: its title, and its body as Markdown. */
48
+ /** What the words end with where they were cut at the bound of a signal, which names of an unusual length alone reach. */
49
+ const CUT =
50
+ "\n\n(Cut here at the length one message carries. Ask your manager for what is missing.)\n";
51
+
52
+ /**
53
+ * The onboarding of one account: the words of the console's first message to it, as Markdown,
54
+ * within what a signal carries, and what a task for it is called.
55
+ */
36
56
  export function onboardingOf(input: OnboardingInput): {
37
57
  readonly title: string;
38
58
  readonly body: string;
39
59
  } {
40
60
  const { handle } = input;
61
+ const title = onboardingTitle(handle);
41
62
  const services = guideServicesOf(input.workspace, handle, input.login);
42
63
  const own = [
43
64
  ...services.flatMap((one) => one.onboarding.map((step) => item(step.title, step.body))),
@@ -55,12 +76,22 @@ export function onboardingOf(input: OnboardingInput): {
55
76
  ),
56
77
  item(
57
78
  "Introduce yourself to your manager",
58
- "`console manager` says who it is. Say who you are, what you do and how to reach you: on the messenger where you have one, else as a comment on this task.",
79
+ "`console manager` says who it is. Say who you are, what you do and how to reach you: on the messenger where you have one, else in your answer to this message, which your supervisors read on your page.",
59
80
  ),
60
81
  ];
61
82
  const asked = services.flatMap((one) => one.asks.map((ask) => item(ask.title, ask.body)));
83
+ // How help is asked, a sentence a line here, so that a change to one is a change to that line.
84
+ const asking = [
85
+ "Do everything you can yourself, and ask for help only with what you cannot do. Ask for that as a decision, of whoever can do it, and of your manager where you do not know who.",
86
+ `A decision is asked on a task, in a project you are in (\`console projects\` lists them): write one for your setup there and take it in one command, \`console task new "${title}" --project <key> --take\`, and ask on its run.`,
87
+ 'Ask it in a line, and say the exact values, what to hand back and how, in its body; offer "Done" and "Not now": `console ask "<question>" --body "<the values, what to hand back>" --option "Done" --option "Not now"`, with `--to <login>` for whom it is asked of and `--project <key>`.',
88
+ "The run stays open while a decision waits: the answer wakes you, and you go on with that run (`--run <id>`).",
89
+ "Where you are in no project yet, say what you need in your answer to this message, which your supervisors read on your page, and ask it as a decision once you are in one.",
90
+ `A secret that is handed back is put in where only you read it, by whoever has it, on your page of the console: give them its address, the console's own and then \`${agentHref(handle, "settings")}\`, with the name to put it in under.`,
91
+ "Go on with the rest meanwhile.",
92
+ ].join(" ");
62
93
  const body = [
63
- `This is your first task, @${handle}: making your account ready to work. Work it as any task: take it, and report as you go. What waits on a person you ask for as a decision, and a run that waits for a decision stays open: the answer wakes you, and you go on with that run (\`--run <id>\`). The task is finished when nothing of it waits on anyone. \`console help\` and the skill \`working-the-board\` say how.`,
94
+ `This is the console's first message to you, @${handle}: making your account ready to work. It is no task of a board, and you take none to begin: do what it lists in this session and the ones after, until nothing of it waits on anyone. It stays on your record, where \`console agent signals me --json\` reads it whole.`,
64
95
  "",
65
96
  "## What you do yourself",
66
97
  "",
@@ -68,13 +99,21 @@ export function onboardingOf(input: OnboardingInput): {
68
99
  "",
69
100
  "## What you ask for",
70
101
  "",
71
- `Do everything you can yourself, and ask for help only with what you cannot do. Ask for that as a decision, of whoever can do it, and of your manager where you do not know who. Say the exact values, what to hand back and how, and offer "Done" and "Not now": \`console ask "<question>" --option "Done" --option "Not now"\`. A secret that is handed back is seeded where only you read it, by whoever has it: \`console agent secret ${handle} <name>\`. Go on with the rest meanwhile: the answer wakes you.`,
102
+ asking,
72
103
  ...(asked.length === 0 ? [] : ["", ...asked]),
73
104
  "",
74
105
  "## When you are done",
75
106
  "",
76
- "When nothing of this task waits on anyone, every item set up or answered as not to be done now, report what is set up and, item by item, what is not done and who said so, and finish the task.",
107
+ "When nothing of this waits on anyone, every item set up or answered as not to be done now, say to your manager what is set up and, item by item, what is not done and who said so: on the messenger where you have one, else in your answer here. Finish the task you wrote for it, where you wrote one.",
77
108
  "",
78
109
  ].join("\n");
79
- return { title: onboardingTitle(handle), body };
110
+ // A signal is bounded where it is sent, and this one is sent by the console itself: words
111
+ // that names at the far end of what a workspace may hold would carry past the bound end at
112
+ // the last whole line within it, with a line that says so.
113
+ if (body.length <= MAX_SIGNAL_LENGTH) {
114
+ return { title, body };
115
+ }
116
+ const kept = body.slice(0, MAX_SIGNAL_LENGTH - CUT.length);
117
+ const whole = kept.lastIndexOf("\n");
118
+ return { title, body: `${kept.slice(0, whole < 0 ? kept.length : whole).trimEnd()}${CUT}` };
80
119
  }
@@ -43,6 +43,12 @@ export interface ArgDescription {
43
43
  readonly options?: readonly string[];
44
44
  /** The collection a `record` names an id of. */
45
45
  readonly collection?: string;
46
+ /**
47
+ * A `person` that may be anyone of the workspace (ADR-0185), for whoever holds a role the
48
+ * command names, by a grant of their own or by the reporting line, in a plugin that holds
49
+ * `people:read:all`; for everyone else, one the caller may see.
50
+ */
51
+ readonly anyone?: boolean;
46
52
  /** What each item of a `list` is. */
47
53
  readonly of?: ArgDescription;
48
54
  }
@@ -218,9 +224,29 @@ export const arg = {
218
224
  }
219
225
  return { type: "enum", ...common(options), options: [...values] };
220
226
  },
221
- /** A person: a login or `me` on the command line, resolved by the console to one the caller may see. */
222
- person<O extends boolean = false>(options?: CommonOptions<O>): ArgDefinition<PluginPersonRef, O> {
223
- return { type: "person", ...common(options) };
227
+ /**
228
+ * A person: a login or `me` on the command line, resolved by the console to one the caller may
229
+ * see (ADR-0035), and refused where it is none, in the same words whether nobody has the login
230
+ * or the caller may not see who has.
231
+ *
232
+ * `anyone: true` is for a command a role of the plugin works the whole directory with, an
233
+ * enrolment say (ADR-0185): the console then resolves the login among everyone of the
234
+ * workspace, where the plugin holds `people:read:all` and the caller holds a role the command
235
+ * names by more than every member does: granted to them by name, to a team they are in or to
236
+ * the members of a private project that lists them, held by the reporting line, or as an
237
+ * administrator. For anyone else it changes nothing: whoever runs the command by the default
238
+ * role, by a grant to everyone, or where the command names no roles, names whom they may see,
239
+ * so that no member learns by a refusal whether a login they may not see exists. A console
240
+ * older than 0.6.4 reads past the option and resolves in the caller's view.
241
+ */
242
+ person<O extends boolean = false>(
243
+ options?: CommonOptions<O> & { readonly anyone?: boolean },
244
+ ): ArgDefinition<PluginPersonRef, O> {
245
+ return {
246
+ type: "person",
247
+ ...common(options),
248
+ ...(options?.anyone === true ? { anyone: true } : {}),
249
+ };
224
250
  },
225
251
  /** A project: a key the caller may see. */
226
252
  project<O extends boolean = false>(
@@ -18,7 +18,7 @@ import type {
18
18
  RestTaskPatch,
19
19
  RestTeam,
20
20
  } from "../schemas.js";
21
- import type { WeekStart } from "../vocabulary.js";
21
+ import type { PeopleVisibility, WeekStart } from "../vocabulary.js";
22
22
  import type { PluginFileHandle } from "./args.js";
23
23
 
24
24
  /** A schema as the Standard Schema interface spells one: what every build of zod implements, so that a plugin's own copy validates its records. */
@@ -308,6 +308,15 @@ export interface PluginWorkspace {
308
308
  readonly timeZoneSet: boolean;
309
309
  /** The day the week begins on (ADR-0035): `auto` leaves it to the language of whoever reads. */
310
310
  readonly weekStart: WeekStart;
311
+ /**
312
+ * Whether the console shows every member to every member (ADR-0035): `everyone`, or
313
+ * `shared_projects`, where a member sees those they share a project with, themselves and the
314
+ * administrators. Where it is `shared_projects`, "everyone" is more than any one member sees:
315
+ * a plugin that holds the whole directory reads the people its caller may see with
316
+ * `seenByCaller` (ADR-0168), and says to an administrator whom a notice to everyone reaches.
317
+ * Left out by a console older than 0.6.3.
318
+ */
319
+ readonly peopleVisibility?: PeopleVisibility;
311
320
  /**
312
321
  * The console's public origin (`PUBLIC_URL`), for a link to the console in what a plugin
313
322
  * writes elsewhere; `null` where the deployment names none.
@@ -358,19 +367,39 @@ export interface PluginMessengerAccount {
358
367
  readonly since: string;
359
368
  }
360
369
 
370
+ /**
371
+ * What a read of people, or of the teams' members, takes beside what it names (ADR-0168).
372
+ *
373
+ * `seenByCaller: true` answers among the people the caller may see, as the console's own
374
+ * listing of people shows that member (ADR-0035), whatever the plugin holds. A plugin with
375
+ * `people:read` alone reads so already; one with `people:read:all`, which opens the whole
376
+ * directory to its hooks and jobs, reads everyone in a person's call too unless it asks for
377
+ * this, and so shows a member people the console keeps from them where its people are kept
378
+ * apart (`peopleVisibility` of the workspace). The view is a person's: the caller's own, their
379
+ * agent's, an agent account's, or that of the person a plugin acts for, as a member. A hook, a
380
+ * job and a plugin calling as itself have no caller, and the read is refused
381
+ * (`plugin.forbidden`), never answered with everyone. Refused as `plugin.invalid_args` where it
382
+ * is neither `true` nor `false`; a console older than 0.6.3 reads past it and answers everyone
383
+ * with `people:read:all`, so a plugin that relies on it names 0.6.3 as the oldest console it
384
+ * runs on.
385
+ */
386
+ export interface PeopleReadOptions {
387
+ readonly seenByCaller?: boolean;
388
+ }
389
+
361
390
  /** The console's board, as a plugin reaches it with the `board:*` capabilities, each read the caller's own. */
362
391
  export interface PluginConsole {
363
392
  workspace(): Promise<PluginWorkspace>;
364
393
  people: {
365
- list(options?: { readonly q?: string }): Promise<readonly RestPerson[]>;
366
- get(id: string): Promise<RestPerson | null>;
394
+ list(options?: { readonly q?: string } & PeopleReadOptions): Promise<readonly RestPerson[]>;
395
+ get(id: string, options?: PeopleReadOptions): Promise<RestPerson | null>;
367
396
  /**
368
397
  * The active people a role of the plugin was granted to, by name, through a project or with
369
398
  * everyone, and everyone for `defaultRole` (ADR-0063); for a role that follows the reporting
370
399
  * line, whoever manages someone besides (ADR-0068). An administrator holds every role, and is
371
400
  * listed only where they were granted it or manage someone.
372
401
  */
373
- granted(role: string): Promise<readonly RestPerson[]>;
402
+ granted(role: string, options?: PeopleReadOptions): Promise<readonly RestPerson[]>;
374
403
  };
375
404
  /**
376
405
  * Which account at a messenger is a member's (ADR-0164), with `people:accounts`: said by a
@@ -422,11 +451,15 @@ export interface PluginConsole {
422
451
  notifications: {
423
452
  settings(): Promise<RestNotificationSettings>;
424
453
  };
425
- /** The teams of the workspace (ADR-0073): a name and its members, among the people the caller may see. */
454
+ /**
455
+ * The teams of the workspace (ADR-0073): a name and its members, among the people the caller
456
+ * may see; among everyone with `people:read:all`, unless `seenByCaller` asks for the caller's
457
+ * own view (ADR-0168).
458
+ */
426
459
  teams: {
427
- list(): Promise<readonly RestTeam[]>;
460
+ list(options?: PeopleReadOptions): Promise<readonly RestTeam[]>;
428
461
  /** One team by its key (ADR-0074), what a grant and a person's `teams` name it by. */
429
- get(key: string): Promise<RestTeam | null>;
462
+ get(key: string, options?: PeopleReadOptions): Promise<RestTeam | null>;
430
463
  };
431
464
  projects: {
432
465
  list(): Promise<readonly RestProject[]>;
@@ -677,6 +677,7 @@ function describeArg(description: ArgDescription): ArgDescription {
677
677
  "integer",
678
678
  "options",
679
679
  "collection",
680
+ "anyone",
680
681
  ] as const) {
681
682
  if (description[field] !== undefined) {
682
683
  copy[field] = description[field];
@@ -784,9 +785,23 @@ export function descriptionProblems(
784
785
  undeclared(`the collection ${collection.name}'s read`, collection.read);
785
786
  undeclared(`the collection ${collection.name}'s readOwn`, collection.readOwn);
786
787
  }
787
- const checkArgs = (where: string, args: Readonly<Record<string, ArgDescription>>) => {
788
+ const checkArgs = (
789
+ where: string,
790
+ args: Readonly<Record<string, ArgDescription>>,
791
+ named: readonly string[] | null,
792
+ ) => {
788
793
  for (const [name, description] of Object.entries(args)) {
789
794
  const inner = description.type === "list" ? description.of : description;
795
+ // A person who may be anyone (ADR-0185) is one only for a role the operation names, in a
796
+ // plugin that holds the whole directory: said here, since elsewhere it changes nothing.
797
+ if (inner?.type === "person" && inner.anyone === true) {
798
+ needs(`${where}'s argument ${name}, a person who may be anyone,`, "people:read:all");
799
+ if (named === null) {
800
+ problems.push(
801
+ `${where}'s argument ${name} is a person who may be anyone, and ${where} names no roles: every member runs it, and names whom they may see`,
802
+ );
803
+ }
804
+ }
790
805
  if (
791
806
  inner?.type === "record" &&
792
807
  inner.collection !== undefined &&
@@ -803,11 +818,11 @@ export function descriptionProblems(
803
818
  };
804
819
  for (const [name, command] of Object.entries(description.commands)) {
805
820
  undeclared(`the command ${name}`, command.roles);
806
- checkArgs(`the command ${name}`, command.args);
821
+ checkArgs(`the command ${name}`, command.args, command.roles);
807
822
  }
808
823
  for (const [name, query] of Object.entries(description.queries)) {
809
824
  undeclared(`the query ${name}`, query.roles);
810
- checkArgs(`the query ${name}`, query.args);
825
+ checkArgs(`the query ${name}`, query.args, query.roles);
811
826
  }
812
827
  for (const [name, endpoint] of Object.entries(description.endpoints)) {
813
828
  needs(`the endpoint ${name}`, "endpoints");
@@ -53,6 +53,7 @@ export const restPluginArgSchema: z.ZodMiniType<RestPluginArg> = z.object({
53
53
  integer: z.optional(z.boolean()),
54
54
  options: z.optional(z.array(z.string())),
55
55
  collection: z.optional(z.string()),
56
+ anyone: z.optional(z.boolean()),
56
57
  get of() {
57
58
  return z.optional(restPluginArgSchema);
58
59
  },
@@ -68,6 +69,8 @@ export interface RestPluginArg {
68
69
  readonly integer?: boolean | undefined;
69
70
  readonly options?: readonly string[] | undefined;
70
71
  readonly collection?: string | undefined;
72
+ /** A person who may be anyone of the workspace, for whoever holds a role the operation names (ADR-0185). */
73
+ readonly anyone?: boolean | undefined;
71
74
  readonly of?: RestPluginArg | undefined;
72
75
  }
73
76
 
package/src/routes.ts CHANGED
@@ -19,6 +19,8 @@ export const REST_ROUTES = {
19
19
  workspacePackToken: "/api/v1/workspace/pack-token",
20
20
  /** The organization's pack, read where no project is named (ADR-0113): the reads of a project's pack, under it. */
21
21
  workspaceSkills: "/api/v1/workspace/skills",
22
+ /** The notes members leave on the pack's skills (ADR-0178): left by anyone, read and closed by whoever keeps the pack and by an administrator; `/<id>/close` under it closes one. */
23
+ packNotes: "/api/v1/pack-notes",
22
24
  /** The people of the workspace: everyone who has signed in, and the logins let in that have not. */
23
25
  people: "/api/v1/people",
24
26
  /** The teams of the workspace (ADR-0073): a name and its members, kept by an administrator. */
package/src/rules.ts CHANGED
@@ -18,7 +18,10 @@ export const RULES_TITLE = "Rules";
18
18
  * while working, asking, reporting, and what never happens, which nothing added takes back.
19
19
  * How the board is worked is the skill working-the-board's and a command's use is its help's,
20
20
  * so a command is named here only where it is what the rule is about. Short, a line a rule:
21
- * they are printed with a take.
21
+ * they are printed with a take. That a job begins with its skill stands before the work
22
+ * (ADR-0176), and the commands that find and load one are the take's own to say, at every
23
+ * take: the rule is said once in a session, and names none. A job no skill fit is noted, with
24
+ * the command a skill's load and the skill working-the-board name (ADR-0178).
22
25
  */
23
26
  export const CONSOLE_RULES = [
24
27
  "# Rules for agents on this board",
@@ -30,13 +33,13 @@ export const CONSOLE_RULES = [
30
33
  "- A project's work has a task before it is done. Given work with no task, look for it on the board; where none is there, write it and take it in one command (`console task new` with `--take`, its category, and its goal where it has one) and tell the person its number, without asking whether to.",
31
34
  "- What a member does in their own desk for themselves is on no board unless they put it there: write no task for it, and do not ask whether to.",
32
35
  "- Act as the member the command is signed in as, and no further: what the console refuses them goes back to them, never around them.",
36
+ "- A job of a kind the pack has skills for begins with its skill: the one the task names, else the one a search finds, loaded no other way. If none fits, go on, and note a job that will come again. Read every part of a long skill before acting on any, a plan too. What is read of a private pack stays in the work.",
33
37
  "",
34
38
  "## While working",
35
39
  "",
36
40
  "- The task says where the work lives. In a project several repositories share it names the repository, and is worked in a checkout of that one.",
37
41
  "- A repository's own agreement (AGENTS.md) says how a change is committed and pushed there. The board is not asked.",
38
42
  "- Work found on the way that the task does not cover is a new task, named in the report.",
39
- "- Before a job is done by hand, look for a skill of the pack by search (`console skills --search <words> --limit 5`) and load the one the task names, else the one that fits, never another way. A long skill comes in parts: read every part before acting on any, a plan included. What is read of a private pack stays in the work.",
40
43
  "",
41
44
  "## Asking",
42
45
  "",
package/src/runner/acp.ts CHANGED
@@ -804,8 +804,11 @@ function sessionOf(
804
804
  }
805
805
  // A turn refused on the product's usage limit: nothing goes better before a window
806
806
  // resets, and the protocol has no word for when that is. The session stays open; the
807
- // runner waits, tries again by itself, and hands over again what was not answered.
808
- // Read by pattern, of the agent's own error alone: not seen with an agent yet.
807
+ // runner waits, tries again by itself, and says again, whole, what was not answered:
808
+ // a message is said taken here as it is handed over, and nothing says that an agent
809
+ // keeps a prompt it refused, so the driver vouches for no conversation that holds it
810
+ // (`can.holdsTaken` is left out). Read by pattern, of the agent's own error alone:
811
+ // not seen with an agent yet.
809
812
  if (saysUsageLimit(words)) {
810
813
  waiting = [];
811
814
  emit({ type: "cannot_go_on", state: "failed", reason: "usage_limit" });
@@ -935,6 +938,9 @@ function sessionOf(
935
938
  text: "This agent goes on with no conversation from one session to the next: a new one begins.",
936
939
  });
937
940
  }
941
+ // A conversation begun where another was to be gone on with is said as that (ADR-0166):
942
+ // the runner counts nothing the agent was handed before as held by it.
943
+ const anew = session === undefined && options.resume !== undefined;
938
944
  if (session === undefined) {
939
945
  opened = await connection.request("session/new", place);
940
946
  session = isObject(opened) ? textOf(opened.sessionId) : undefined;
@@ -951,7 +957,7 @@ function sessionOf(
951
957
  const agent = agentOf(initialized);
952
958
  await stand(standingOf(opened), agent.name);
953
959
  product = agent.version ?? null;
954
- emit({ type: "conversation", id: session });
960
+ emit({ type: "conversation", id: session, ...(anew ? { anew: true } : {}) });
955
961
  runs();
956
962
  ready = true;
957
963
  if (waiting.length > 0) {