@odyssey365/cli 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -71,7 +71,7 @@ odyssey agent-guide --watch-agent # 세션이 읽고 따르는 듣기
71
71
 
72
72
  ### B. 활동 자동 기록기
73
73
 
74
- 게임·앱 세션 감시기 → `create_record` 한 번 + 세션마다 `add_record_trace`(+`dedupeKey`).
74
+ 게임·앱 세션 감시기 → `save_record`(기록 만들기) 한 번 + 세션마다 `add_record_trace`(+`dedupeKey`).
75
75
  네트워크 실패(종료 4)만 같은 키로 재전송.
76
76
 
77
77
  ### C. 저장소에 Odyssey를 도구로 심기
package/README.md CHANGED
@@ -62,10 +62,10 @@ node ../odyssey-listen/listen.mjs --dry-run # 밀린 것 중 무엇이 깨울
62
62
  ### 2) 활동 자동 기록기 — 게임·앱 세션을 타임라인에 남기기
63
63
 
64
64
  사람 없이 도는 프로그램이 “언제부터 언제까지 무엇을 했다”를 남긴다.
65
- 한 번 `odyssey login` + `create_record` 한 뒤, 세션마다 `add_record_trace`(+`dedupeKey`).
65
+ 한 번 `odyssey login` + `save_record`(기록 만들기 — `recordId` 없이) 한 뒤, 세션마다 `add_record_trace`(+`dedupeKey`).
66
66
 
67
67
  ```bash
68
- odyssey create_record --title "리그 오브 레전드" --emoji 🎮 --numType time --numUnit min --categoryName "게임"
68
+ odyssey save_record --title "리그 오브 레전드" --emoji 🎮 --numType time --numUnit min --categoryName "게임"
69
69
  # → recordId 를 프로그램 설정에 저장
70
70
  echo '{"recordId":"…","value":133,"time":"…+09:00","endTime":"…+09:00","dedupeKey":"lol-…"}' \
71
71
  | odyssey add_record_trace --input -
@@ -169,12 +169,13 @@ cat input.json | odyssey create_memo --input -
169
169
 
170
170
  ```bash
171
171
  # 에셋(보드에 사진·파일) — files → uploads
172
- odyssey create_asset --json '{"files":["./shot1.png","./회의록.pdf","./녹음.m4a"],"title":"회의 자료","projectUid":"…","attachToComponentId":"…"}'
173
- odyssey add_asset_images <assetId> --json '{"files":["./more.png","./정리.docx"]}'
172
+ odyssey save_asset --json '{"files":["./shot1.png","./회의록.pdf","./녹음.m4a"],"title":"회의 자료","projectUid":"…","attachToComponentId":"…"}'
173
+ # 있는 에셋에 더하기 — 같은 도구에 assetId 를 준다
174
+ odyssey save_asset --json '{"assetId":"<assetId>","files":["./more.png","./정리.docx"]}'
174
175
  # 할일·메모 본문 끝 — uploadImages[].file
175
176
  odyssey create_memo --json '{"title":"버그 재현","text":"…","uploadImages":[{"file":"./bug.png"}]}'
176
177
  # 페이지 사진 칸 — image.file (상대 경로는 --input 파일 옆 기준)
177
- odyssey create_snapshot --input page.json
178
+ odyssey create_page --input page.json
178
179
  ```
179
180
 
180
181
  CLI 없이 MCP 로 쓰는 AI 는 `create_upload_url` 로 주소를 받아 curl 로 보내거나, 그 주소를 링크로 사람에게 건네 브라우저에서 고르게 한다
@@ -227,7 +228,7 @@ odyssey agent-guide --watch-agent # 세션 듣기 규칙 — 일하는 세션
227
228
  ```bash
228
229
  odyssey login # 브라우저 로그인 한 번 — 이후 토큰은 알아서 갱신된다
229
230
  odyssey list_categories # 카테고리 이름 확인
230
- odyssey create_record --title "리그 오브 레전드" --emoji 🎮 --numType time --numUnit min --tags 게임 --categoryName "게임"
231
+ odyssey save_record --title "리그 오브 레전드" --emoji 🎮 --numType time --numUnit min --tags 게임 --categoryName "게임"
231
232
  # 기록의 카테고리가 타임라인 카드에도 붙는다 — 앱 타임라인의 카테고리 필터·기록장 묶기가 이 값으로 거른다
232
233
  # → {"recordId":"…"} 를 프로그램 설정에 저장
233
234
  ```
@@ -265,7 +266,7 @@ odyssey add_record_trace --input - # 위 JSON 을 표준입력으로
265
266
  ```
266
267
 
267
268
  ```bash
268
- odyssey create_record --input - # 위 JSON — 운동이면 parts 를 무게(kg)·횟수(회)·세트(세트), joiner "times", calc "product"(볼륨)
269
+ odyssey save_record --input - # 위 JSON — 운동이면 parts 를 무게(kg)·횟수(회)·세트(세트), joiner "times", calc "product"(볼륨)
269
270
  ```
270
271
 
271
272
  측정값은 칸 **이름**으로 적는다. 묶음 값은 `"12/3/8"` 글·`[12, 3, 8]` 목록·`{"킬": 12, …}` 맵 어느 것이든 된다. 구간 칸은 `time`·`endTime` 이 값이다.
@@ -280,7 +281,7 @@ odyssey create_record --input - # 위 JSON — 운동이면 parts 를 무
280
281
  }
281
282
  ```
282
283
 
283
- 기록 없이 타임라인 카드만 원하면 `create_timeline_event` 에 `title`·`startTime`·`endTime`(+`dedupeKey`·`categoryName`)을 준다 —
284
+ 기록 없이 타임라인 카드만 원하면 `save_timeline_event`(`timelineEventId` 없이) 에 `title`·`startTime`·`endTime`(+`dedupeKey`·`categoryName`)을 준다 —
284
285
  시작·끝이 둘 다 있으면 다른 내용 없이도 만들어진다.
285
286
 
286
287
  **지켜야 할 것**
@@ -390,7 +391,7 @@ AI 가 댓글을 남긴 스레드에 사람(공유 보드 멤버 포함)이 답
390
391
  | 갈래 | 오는 댓글 | 붙는 법 | 빠지는 때 |
391
392
  |---|---|---|---|
392
393
  | 내 댓글 | 모든 스레드의 내 계정 댓글 | 늘 온다 | 빠지지 않는다(`--no-comments` 로 끔) |
393
- | **관심 스레드** `followed:true` | 그 방의 남의 댓글까지(공유 보드 멤버 · 앱 「답글」) | 자동 — AI 가 `comment_on_item`·`comment_on_project`(CLI·MCP 커넥터 어느 쪽이든)로 댓글을 남기면 `source:"auto"` · 수동 — `threads follow` `source:"manual"` | 마지막 **AI 활동**(댓글·follow) 뒤 `ttlDays`(기본 14일) 조용하면 · `threads unfollow` |
394
+ | **관심 스레드** `followed:true` | 그 방의 남의 댓글까지(공유 보드 멤버 · 앱 「답글」) | 자동 — AI 가 `comment_on_item`(보드 전체는 `itemType project`)(CLI·MCP 커넥터 어느 쪽이든)로 댓글을 남기면 `source:"auto"` · 수동 — `threads follow` `source:"manual"` | 마지막 **AI 활동**(댓글·follow) 뒤 `ttlDays`(기본 14일) 조용하면 · `threads unfollow` |
394
395
  | 태그 항목 스레드 `tagged:true` | `--tag` 가 걸린 항목의 방 | 태그가 곧 등록 | 태그를 떼면 바로(`reason:"untagged"`) — 만료 없음 |
395
396
 
396
397
  ```bash
package/dist/files.js CHANGED
@@ -7,9 +7,9 @@
7
7
  * 할일·메모 본문에 사진을 붙이는 운영 흐름이 이 한 단계로 열린다.
8
8
  *
9
9
  * 바꾸는 자리(앱에서 사람이 사진을 넣는 세 곳과 같다):
10
- * - `image: { file }` — 스냅샷 사진 칸(create_snapshot · update_snapshot · create_snapshot_draft).
10
+ * - `image: { file }` — 페이지 사진 칸(create_page · update_page · create_page_draft — 옛 이름 *_snapshot*).
11
11
  * - `uploadImages: [{ file }]` — 할일·메모 본문 끝(create_todo · update_todo · create_memo · update_memo).
12
- * - `files: ["경로", …]` — 에셋(create_asset · add_asset_images) → `uploads: [{ uploadId, index }]`.
12
+ * - `files: ["경로", …]` — 에셋(save_asset — 옛 create_asset · add_asset_images) → `uploads: [{ uploadId, index }]`.
13
13
  * 에셋은 사진뿐 아니라 PDF·문서·소리도 담으므로, 이 자리가 있으면 주소를 `accept:'files'` 로 받는다(서버가 내용으로 판정한다).
14
14
  * 이름이 다른 키의 `file` 은 손대지 않는다 — 다른 도구의 문자열을 파일로 오인해 읽어 보내면 안 된다.
15
15
  * 상대 경로는 `--input` 파일이 있는 폴더 기준(원고 JSON 옆에 그림을 두는 흐름), 없으면 지금 폴더.
package/dist/guide.js CHANGED
@@ -21,7 +21,7 @@
21
21
  * 이력: document/90-process/work-log/261101 Odyssey CLI 0.2.2 설계 사례집 agent-guide design 관심 스레드 안내.md
22
22
  */
23
23
  const CORE_RULES = `- **사용자의 데이터다.** 쓰기는 사용자 앱 화면·알림에 그대로 나타난다. 요청 범위를 넘는 생성·수정을 하지 않는다.
24
- - \`[쓰기·덮어씀]\` 도구와 \`delete_*\` 는 사용자가 그 변경을 분명히 원할 때만 부른다(삭제는 휴지통으로 가지만 그래도 먼저 확인).
24
+ - \`[쓰기·덮어씀]\` 도구와 \`delete_*\`(항목 지우기는 \`delete_item\` — type + id) 는 사용자가 그 변경을 분명히 원할 때만 부른다(삭제는 휴지통으로 가지만 그래도 먼저 확인).
25
25
  - 없는 UID·도구·파라미터를 추측하지 않는다 — \`odyssey search\`·\`list_*\` 로 찾는다. 이름으로 찾을 땐 \`search\` 가 먼저다.
26
26
  - 쓰기 뒤에는 \`get_*\`/\`list_*\` 로 다시 읽어 결과를 확인하고, 실제로 한 일만 보고한다.
27
27
  - 로그인(\`odyssey login\`)은 브라우저 인증이 필요한 **사람의 일**이다. 종료 코드 3 이면 사용자에게 부탁하고, 비밀번호·토큰을 직접 다루지 않는다.`;
@@ -29,7 +29,7 @@ const CORE_RULES = `- **사용자의 데이터다.** 쓰기는 사용자 앱 화
29
29
  * 관심 스레드 — 전문·짧은 절이 함께 쓰는 한 벌. 서버(functions_v2 followed-threads)의 계약을 옮긴 것이라
30
30
  * 기본 기간·한도를 바꾸면 여기도 같이 바꾼다. 전문에 없고 짧은 절에만 있던 것을 261101 에 한 곳으로 모았다.
31
31
  */
32
- const FOLLOW_RULES = `- **붙는 법** — 에이전트가 \`comment_on_item\`·\`comment_on_project\` 로 댓글을 남긴 스레드는 **자동으로** 관심 스레드가 된다. 아직 댓글을 안 단 스레드는 \`odyssey threads follow --itemType <타입> --itemUid <uid>\`(보드 카드면 \`--projectId <보드>\`)로 미리 올린다.
32
+ const FOLLOW_RULES = `- **붙는 법** — 에이전트가 \`comment_on_item\`(보드 전체 스레드는 \`itemType project\`) 로 댓글을 남긴 스레드는 **자동으로** 관심 스레드가 된다. 아직 댓글을 안 단 스레드는 \`odyssey threads follow --itemType <타입> --itemUid <uid>\`(보드 카드면 \`--projectId <보드>\`)로 미리 올린다.
33
33
  - **받는 것** — \`odyssey watch\` 가 그 방의 새 댓글을 누가 썼든 낸다(\`followed:true\`, 남의 글은 \`author:"other"\`). 내 댓글은 관심 스레드가 아니어도 늘 온다.
34
34
  - **기간** — 마지막 **에이전트 활동**(댓글·follow) 뒤 기본 14일 조용하면 빠진다. 사람 댓글로는 늘지 않는다. 사용자가 기간을 말했을 때만 \`--days N\`(1~365) — 뒤의 자동 등록도 그 기간으로 다시 센다. 만료 없이 볼 항목은 태그 감시(\`odyssey watch --tag\`).
35
35
  - **빼는 법** — 일이 끝나 더 받을 필요가 없으면 \`odyssey threads unfollow --roomUid <방>\`(또는 \`--itemType\`·\`--itemUid\`). **마지막 답글 뒤에** 뺀다 — 뺀 뒤 댓글을 달면 다시 올라온다. 할일 완료만으로는 빠지지 않는다(일부러).
@@ -81,7 +81,7 @@ export function renderAgentGuide(input) {
81
81
  | 만들고 싶은 것 | 쓰는 것 | 한 줄 |
82
82
  |---|---|---|
83
83
  | **감시 에이전트** — 앱 태그/멘션 → 일하는 세션이 직접 듣기 | \`odyssey watch-agent init <새폴더>\` → 세션이 \`odyssey agent-guide --watch-agent\` 를 읽고 듣는다 | 듣기는 **깨우기만**(오래 = 백그라운드 종료 · 잠깐 = Monitor). 답글·판단은 그 세션+MCP. 에이전트 댓글엔 반응 금지 |
84
- | **활동 기록기** — 게임/앱 세션 → 타임라인 | \`create_record\` 1회 + \`add_record_trace\`(+\`dedupeKey\`) | 종료 4만 같은 키로 재전송. JSON은 \`--input -\` |
84
+ | **활동 기록기** — 게임/앱 세션 → 타임라인 | \`save_record\`(만들기) 1회 + \`add_record_trace\`(+\`dedupeKey\`) | 종료 4만 같은 키로 재전송. JSON은 \`--input -\` |
85
85
  | **저장소 코딩 에이전트**에 Odyssey 도구 심기 | \`odyssey agent-guide --snippet\` → AGENTS.md | 시작 시 \`agent-guide\` 전문을 읽게 한다 |
86
86
  | **운영**(공지·사용법) | \`-p admin\` / \`-p support\` | 쓰기 전 \`whoami -p …\` 로 uid 확인 |
87
87
 
@@ -107,7 +107,7 @@ ${profileSection(input)}
107
107
  - 필수 파라미터가 하나뿐이면 위치 인자: \`odyssey get_todo <todoId>\`
108
108
  - 여러 값·특수 문자가 섞이면 \`--input -\` 에 JSON 객체를 넣는 편이 안전하다(셸 따옴표 문제 없음)
109
109
  - 시각은 오프셋을 붙인 ISO 8601(\`+09:00\` 또는 \`Z\`)
110
- - 같은 일을 다시 보낼 수 있는 자동화면 \`dedupeKey\` 를 준다(\`create_timeline_event\`·\`add_record_trace\` — 같은 키 = 한 번만 기록)
110
+ - 같은 일을 다시 보낼 수 있는 자동화면 \`dedupeKey\` 를 준다(\`save_timeline_event\`·\`add_record_trace\` — 같은 키 = 한 번만 기록)
111
111
 
112
112
  ## 출력과 종료 코드
113
113
 
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  * odyssey login # 개인 계정 → 프로필 default
9
9
  * odyssey login -p admin # 운영 계정 → 프로필 admin
10
10
  * odyssey list_todos --status inProgress
11
- * odyssey -p admin list_snapshots
11
+ * odyssey -p admin list_pages
12
12
  *
13
13
  * 도구 정의는 서버가 정본이다(tools/list). CLI 는 이름·스키마를 받아 플래그를 맞출 뿐이라
14
14
  * 서버에 도구가 늘면 CLI 배포 없이 바로 쓸 수 있다.
@@ -24,7 +24,7 @@ import { extractGlobals, parseToolArgs, takeFlag, takeIntOption } from './args.j
24
24
  import { discover, fetchUserInfo, interactiveLogin, registerClient, revokeTokenRemote } from './oauth.js';
25
25
  import { NetworkError } from './rpc.js';
26
26
  import { envServer, OdysseyClient, resolveTarget, selectedProfileName } from './session.js';
27
- import { findTool, getTools, renderToolDetail, renderToolList, toolListJson } from './tools.js';
27
+ import { findTool, getTools, isUnknownToolResult, lookupTool, normalizeToolName, renderToolDetail, renderToolList, toolListJson, unknownToolError, } from './tools.js';
28
28
  import { printToolResult, writeJson } from './output.js';
29
29
  import { collectLocalFiles, inlineImageFiles, uploadLocalFiles } from './files.js';
30
30
  import { renderAgentGuide, renderSkill, renderSnippet } from './guide.js';
@@ -462,7 +462,9 @@ async function cmdCall(g, toolName, tokens,
462
462
  /** 명령이 미리 형을 맞춘 파라미터(threads follow --days) — 플래그 해석 뒤에 덮는다. */
463
463
  extra = {}) {
464
464
  const client = new OdysseyClient(resolveTarget(g), VERSION);
465
- const tool = await findTool(client, toolName, { refresh: g.refreshTools });
465
+ const { tool, names } = await lookupTool(client, toolName, { refresh: g.refreshTools });
466
+ if (!tool)
467
+ return cmdCallUnlisted(g, client, toolName, tokens, extra, names);
466
468
  const base = await readInputObject(g);
467
469
  const { args, positionals } = parseToolArgs(tokens, tool.inputSchema, base);
468
470
  Object.assign(args, extra);
@@ -485,6 +487,30 @@ extra = {}) {
485
487
  const result = await client.callTool(tool.name, args);
486
488
  return printToolResult(result, g.output ?? 'json', tool.name);
487
489
  }
490
+ /**
491
+ * 목록에 없는 이름 — 서버가 옛 이름(별칭)으로 받을 수 있으니 스키마 없이 그대로 보낸다(60-backend D880: 옛 이름 ·
492
+ * 옛 인자는 서버가 지금 이름으로 옮긴다). 스키마를 몰라 값은 문자열(`{` · `[` 로 시작하면 JSON)이고 위치 인자는 둘 자리를
493
+ * 모른다 — 숫자 · 참거짓은 `--json` 으로. 서버도 모르는 이름이면 예전처럼 비슷한 이름을 알려 준다.
494
+ * 이력: document/90-process/work-log/261110 MCP 도구 100 이하 지우기 저장 합치기 fetch 상세 페이지 시트 개명.md
495
+ */
496
+ async function cmdCallUnlisted(g, client, toolName, tokens, extra, names) {
497
+ const name = normalizeToolName(toolName);
498
+ const base = await readInputObject(g);
499
+ const { args, positionals } = parseToolArgs(tokens, undefined, base);
500
+ Object.assign(args, extra);
501
+ if (positionals.length) {
502
+ const hint = unknownToolError(toolName, names).message.split('\n')[0];
503
+ throw new UsageError(`${hint} — 목록에 없는 이름(옛 이름일 수 있다)은 위치 인자를 둘 자리를 모릅니다. --키 값 또는 --json 으로 주세요.` +
504
+ '\n도구 목록: odyssey tools');
505
+ }
506
+ const baseDir = g.inputFile && g.inputFile !== '-' ? dirname(resolvePath(g.inputFile)) : process.cwd();
507
+ await attachLocalFiles(client, args, baseDir);
508
+ const result = await client.callTool(name, args);
509
+ if (isUnknownToolResult(result))
510
+ throw unknownToolError(toolName, names);
511
+ process.stderr.write(`참고: ${name} 은 지금 도구 목록에 없는 이름이라 서버에 그대로 보냈습니다(옛 이름이면 서버가 지금 이름으로 옮깁니다).\n`);
512
+ return printToolResult(result, g.output ?? 'json', name);
513
+ }
488
514
  // ── 진입 ─────────────────────────────────────────────────────────────────────
489
515
  const ACCOUNT_COMMANDS = new Set(['login', 'logout', 'whoami', 'profiles', 'use', 'agent-guide', 'watch', 'watch-agent']);
490
516
  /**
package/dist/tools.js CHANGED
@@ -49,8 +49,8 @@ export async function getTools(client, opts = {}) {
49
49
  }
50
50
  return fetchTools(client);
51
51
  }
52
- /** 이름으로 도구를 찾는다. 케밥(list-todos)도 받는다. 캐시에 없으면 한 번 새로 받아 본다. */
53
- export async function findTool(client, rawName, opts = {}) {
52
+ /** 이름으로 도구를 찾는다. 케밥(list-todos)도 받는다. 캐시에 없으면 한 번 새로 받아 본다. 없으면 tool 은 undefined. */
53
+ export async function lookupTool(client, rawName, opts = {}) {
54
54
  const name = normalizeToolName(rawName);
55
55
  let tools = await getTools(client, opts);
56
56
  let tool = tools.find((t) => t.name === name);
@@ -58,14 +58,29 @@ export async function findTool(client, rawName, opts = {}) {
58
58
  tools = await fetchTools(client);
59
59
  tool = tools.find((t) => t.name === name);
60
60
  }
61
- if (!tool) {
62
- const near = suggestNames(name, tools.map((t) => t.name));
63
- throw new UsageError(`알 수 없는 명령·도구 "${rawName}".` +
64
- (near.length ? ` 혹시: ${near.join(', ')}` : '') +
65
- '\n도구 목록: odyssey tools');
66
- }
61
+ return { tool, names: tools.map((t) => t.name) };
62
+ }
63
+ /** [lookupTool] 의 없음을 오류로 — describe 처럼 스키마가 꼭 있어야 하는 자리. */
64
+ export async function findTool(client, rawName, opts = {}) {
65
+ const { tool, names } = await lookupTool(client, rawName, opts);
66
+ if (!tool)
67
+ throw unknownToolError(rawName, names);
67
68
  return tool;
68
69
  }
70
+ export function unknownToolError(rawName, names) {
71
+ const near = suggestNames(normalizeToolName(rawName), names);
72
+ return new UsageError(`알 수 없는 명령·도구 "${rawName}".` +
73
+ (near.length ? ` 혹시: ${near.join(', ')}` : '') +
74
+ '\n도구 목록: odyssey tools');
75
+ }
76
+ /**
77
+ * 서버도 모르는 이름이라는 답인가 — 목록에 없는 이름을 서버에 그대로 보냈을 때(옛 이름 별칭 시도) 가른다.
78
+ * 서버 문구: `mcp_streamable` 의 tools/call 「오류: 알 수 없는 도구 "…"」.
79
+ */
80
+ export function isUnknownToolResult(result) {
81
+ const r = result;
82
+ return r?.isError === true && (r.content?.[0]?.text ?? '').startsWith('오류: 알 수 없는 도구');
83
+ }
69
84
  export function normalizeToolName(name) {
70
85
  return name.trim().replace(/-/g, '_');
71
86
  }
@@ -80,7 +80,7 @@ export function validateConfig(cfg) {
80
80
  const SEEN_KEEP = 500; // 기억하는 댓글 uid 수(파일이 끝없이 커지지 않게)
81
81
  const TAGGED_KEEP = 2000;
82
82
 
83
- /** 세션이 답글을 달 수 있는 항목 종류 — comment_on_item 의 itemType + 보드 전체(comment_on_project). */
83
+ /** 세션이 답글을 달 수 있는 항목 종류 — comment_on_item 의 itemType(보드 전체 project 포함 — 옛 comment_on_project). */
84
84
  export const COMMENT_ITEM_TYPES = Object.freeze([
85
85
  'todo', 'memo', 'asset', 'event', 'routine', 'routineInstance', 'locationMap', 'record', 'companionReport', 'projectComponent', 'project',
86
86
  ]);
@@ -54,7 +54,7 @@
54
54
  - `odyssey -p <프로필> watch --tag "<감시 태그>" --since <상태 파일의 커서>` 를 자식 프로세스로 띄우고 **stdout 을 줄 단위로** JSON 파싱한다. stderr 는 로그로만.
55
55
  에이전트 댓글(일꾼 답글의 메아리)은 기본으로 오지 않는다. 내 댓글이 일꾼 댓글에 단 「답글」인지는 감시가 `replyTo.author` 로 알려 준다
56
56
  (예전엔 `--include-agent` 로 에이전트 댓글 uid 를 적어 두고 대조했다 — CLI 0.2.2+ 에선 필요 없다).
57
- - **관심 스레드**: 일꾼이 `comment_on_item`·`comment_on_project` 로 답글을 단 스레드(받았다 표시 포함)는 서버가 자동으로 관심 스레드에 올리고,
57
+ - **관심 스레드**: 일꾼이 `comment_on_item`(보드 전체 포함 — 디스패처의 받았다 표시도 `itemType project`) 으로 답글을 단 스레드(받았다 표시 포함)는 서버가 자동으로 관심 스레드에 올리고,
58
58
  감시는 그 방의 새 댓글을 누가 썼든 `followed:true` 로 낸다. 마지막 에이전트 활동 뒤 기간(기본 14일 · `follow_thread` 의 `days` 로 1~365일,
59
59
  뒤의 자동 등록도 그 기간으로 다시 센다) 조용하면 빠진다. 일꾼은 일이 끝나 더 받을 필요가
60
60
  없으면 `follow_thread(follow:false)` 로 뺄 수 있다(할일 완료만으로는 빼지 않는다).
@@ -84,7 +84,7 @@
84
84
 
85
85
  **멘션** = 댓글 본문에서 공백을 지우고 소문자로 바꾼 글에 설정의 멘션(같은 방식으로 바꾼 것)이 들어 있다. `@클로드 코드`·`@클로드코드님` 도 걸린다.
86
86
 
87
- **댓글 도구가 받는 종류** = `comment_on_item` 의 itemType(todo · memo · asset · event · routine · routineInstance · locationMap · record · companionReport · projectComponent) + 보드 전체 `project`(`comment_on_project`).
87
+ **댓글 도구가 받는 종류** = `comment_on_item` 의 itemType(todo · memo · asset · event · routine · routineInstance · locationMap · record · companionReport · projectComponent) + 보드 전체 `project`(일꾼은 `comment_on_item(itemType "project")`, 디스패처 CLI 는 옛 이름 `comment_on_project` — 서버가 같은 도구로 옮긴다).
88
88
  페이지·컬렉션 같은 그 밖의 종류는 일꾼이 답글을 달 수 없으니 받지 않는다.
89
89
 
90
90
  | 이벤트 | 조건 | 배달 |
@@ -165,7 +165,8 @@
165
165
  ### 6. 디스패처가 쓰는 것 — 받았다 표시와 실패 알림뿐
166
166
 
167
167
  - **답글 자리**(받았다 표시·실패 알림 공통) — 항목 종류로 고른다:
168
- - 보드 전체(`project`): `comment_on_project --projectId <uid>` — 이 도구엔 `notifyMe` 가 없다. `--notify false` 로 단다(알림 없이 스레드에만).
168
+ - 보드 전체(`project`): `comment_on_item --itemType project --itemUid <uid>` — 보드 전체 스레드엔 `notifyMe` 가 없다. `--notify false` 로 단다(알림 없이 스레드에만).
169
+ 옛 이름이다(지금 이름은 `comment_on_item --itemType project --itemUid <uid>`) — 서버가 옛 이름도 받아 옛 서버 · 새 서버 어디서나 돈다.
169
170
  - 보드 카드(`projectComponent`): `comment_on_item --itemType projectComponent --itemUid <카드 id> --projectId <보드 uid>`
170
171
  - 그 밖: `comment_on_item --itemType <종류> --itemUid <uid>`
171
172
  - **받았다 표시**(멘션으로 배달할 때만, 설정이 비어 있지 않으면): 큐에 넣는 그 자리에서 바로 단다 — `--notify false`(알림 없음).
@@ -205,8 +206,8 @@ Odyssey 는 MCP 도구(mcp__{Odyssey 손}__*)로 읽고 쓴다. 너는 디스패
205
206
  **7-2. 멘션으로 맡은 항목**(`origin:"mention"`)
206
207
 
207
208
  `{스레드 인자}` = 2절 항목(보드 카드면 `itemType "projectComponent", itemUid {카드 id}, projectId {보드 uid}`, 보드 전체면 `itemType "project"`) ·
208
- `{답글 도구}` = 6절 답글 자리 · `{읽기 도구}` = 종류에 맞는 것(할일 get_todo · 메모 get_memo · 일정 get_event · 기록 get_record · 루틴 get_routine ·
209
- 에셋 get_asset · 리포트 get_report · 보드 get_project · 카드 get_project_components · 그 밖은 스레드만) · `{질문 알림}` = `notifyMe true`(보드 전체는 `notify false` — 나만 알림이 없다).
209
+ `{답글 도구}` = 6절 답글 자리(일꾼에겐 지금 이름 — 보드 전체도 `comment_on_item(itemType "project", itemUid {보드 uid}, …)`) · `{읽기 도구}` = 종류에 맞는 것(할일 get_todo · 메모 get_memo · 일정 get_event ·
210
+ 기록 fetch("record:<uid>") · 루틴 fetch("routine:<uid>") · 에셋 fetch("asset:<uid>") · 리포트 get_report · 보드 get_project · 카드 get_project_components · 그 밖은 스레드만) · `{질문 알림}` = `notifyMe true`(보드 전체는 `notify false` — 나만 알림이 없다).
210
211
 
211
212
  ```
212
213
  너는 Odyssey {항목}의 댓글 스레드에서 「{멘션}」으로 불려 온 일꾼이다. 작업 폴더({작업 폴더}) 밖은 건드리지 않는다.
@@ -119,7 +119,7 @@ export const PHASES = ['running', 'idle', 'done', 'blocked', 'cancelled'];
119
119
  const DELIVERED_KEEP = 1000; // 항목당 기억하는 배달 댓글 수(파일이 끝없이 커지지 않게)
120
120
  const AGENT_KEEP = 300; // 항목당 기억하는 에이전트 댓글 uid 수 — 옛 감시(--include-agent)용. 이제 답글 대상은 감시가 replyTo 로 알려 준다
121
121
 
122
- /** 일꾼이 답글을 달 수 있는 항목 종류 — comment_on_item 의 itemType + 보드 전체(comment_on_project). */
122
+ /** 일꾼이 답글을 달 수 있는 항목 종류 — comment_on_item 의 itemType(보드 전체 project 포함 — 옛 comment_on_project). */
123
123
  export const COMMENT_ITEM_TYPES = Object.freeze([
124
124
  'todo', 'memo', 'asset', 'event', 'routine', 'routineInstance', 'locationMap', 'record', 'companionReport', 'projectComponent', 'project',
125
125
  ]);
@@ -320,9 +320,10 @@ function tagWorkerRules(cfg, { title, todoUid, ref, myUid }) {
320
320
  ].join('\n');
321
321
  }
322
322
 
323
+ // 루틴 · 기록 · 에셋 상세는 fetch("타입:uid") — get_routine · get_record · get_asset 은 MCP 목록에서 숨었다(부르면 돌지만 일꾼의 도구 목록엔 없다).
323
324
  const READ_TOOL = {
324
- todo: 'get_todo', memo: 'get_memo', event: 'get_event', record: 'get_record', routine: 'get_routine',
325
- asset: 'get_asset', companionReport: 'get_report', project: 'get_project', projectComponent: 'get_project_components',
325
+ todo: 'get_todo', memo: 'get_memo', event: 'get_event', record: 'fetch("record:<uid>")', routine: 'fetch("routine:<uid>")',
326
+ asset: 'fetch("asset:<uid>")', companionReport: 'get_report', project: 'get_project', projectComponent: 'get_project_components',
326
327
  };
327
328
 
328
329
  /** list_item_comments·comment_on_item 에 넘길 대상 인자(사람이 읽는 글로). */
@@ -338,7 +339,8 @@ function mentionWorkerRules(cfg, { ref }) {
338
339
  const read = READ_TOOL[r.itemType];
339
340
  const board = r.itemType === 'project';
340
341
  const who = `authorName "${cfg.authorName}", authorEmoji "${cfg.authorEmoji}", notify false`;
341
- const reply = board ? `comment_on_project(projectId "${r.itemUid}", ${who})` : `comment_on_item(${threadArgsText(r)}, ${who})`;
342
+ // 보드 전체도 comment_on_item(itemType "project") — 옛 comment_on_project 는 MCP 목록에서 빠졌다(서버가 옛 이름도 받는다).
343
+ const reply = board ? `comment_on_item(itemType "project", itemUid "${r.itemUid}", ${who})` : `comment_on_item(${threadArgsText(r)}, ${who})`;
342
344
  const ask = board ? 'notify false 그대로 — 보드 전체 댓글엔 나만 알림이 없다' : 'notifyMe true — 나한테만 알림';
343
345
  const mention = cfg.mentions[0];
344
346
  return [
@@ -398,10 +400,14 @@ export function ackContent(cfg, busy) {
398
400
  return busy ? `${base.replace(/[.。\s]+$/u, '')} — 앞의 일을 마치면 이어서 볼게요.` : base;
399
401
  }
400
402
 
401
- /** 6절 답글 자리 — 보드 전체는 comment_on_project(나만 알림 없음), 카드는 보드(projectId)까지, 그 밖은 comment_on_item. */
403
+ /**
404
+ * 6절 답글 자리 — 보드 전체는 comment_on_item(itemType "project" · 나만 알림 없음), 카드는 보드(projectId)까지, 그 밖도 comment_on_item.
405
+ * 디스패처가 CLI 로 직접 다는 댓글(받았다 표시 · 실패 알림)도 지금 이름을 쓴다 — CLI 는 목록에 없는 옛 이름(comment_on_project)을
406
+ * 서버에 보내기 전에 막는다(261110 MCP 100개 판 배포 뒤).
407
+ */
402
408
  export function replyTarget(ref) {
403
409
  const r = asRef(ref);
404
- if (r.itemType === 'project') return { tool: 'comment_on_project', params: { projectId: r.itemUid }, canNotifyMe: false };
410
+ if (r.itemType === 'project') return { tool: 'comment_on_item', params: { itemType: 'project', itemUid: r.itemUid }, canNotifyMe: false };
405
411
  if (r.itemType === 'projectComponent') {
406
412
  return { tool: 'comment_on_item', params: { itemType: 'projectComponent', itemUid: r.itemUid, projectId: r.projectId }, canNotifyMe: true };
407
413
  }
@@ -578,7 +584,7 @@ export function createWorkerRunner(cfg, log) {
578
584
  };
579
585
  }
580
586
 
581
- /** 실제 댓글(받았다 표시·실패 알림) — odyssey comment_on_item / comment_on_project. */
587
+ /** 실제 댓글(받았다 표시·실패 알림) — odyssey comment_on_item(보드 전체는 itemType project). */
582
588
  export function createCommentPoster(cfg, log) {
583
589
  return async ({ ref, todoUid, content, notifyMe = true }) => {
584
590
  const args = buildCommentArgs(cfg, ref ?? todoUid, content, { notifyMe });
@@ -680,14 +680,16 @@ test('보드 카드 멘션 — 키와 답글 자리에 보드(projectId)까지
680
680
  assert.deepEqual(h.comments[0].ref, { itemType: 'projectComponent', itemUid: 'K1', projectId: 'B1' });
681
681
  });
682
682
 
683
- test('보드 전체 멘션 — comment_on_project · 나만 알림이 없어 notify false 로만', async () => {
683
+ test('보드 전체 멘션 — comment_on_item(itemType project) · 나만 알림이 없어 notify false 로만', async () => {
684
684
  const h = harness();
685
685
  await h.send(ready(), comment('C1', 'B1', { itemType: 'project', text: MENTION_TEXT }));
686
- assert.match(h.calls[0].systemPrompt, /comment_on_project\(projectId "B1", authorName "Claude", authorEmoji "✨", notify false\)/);
686
+ // 일꾼(MCP)에겐 지금 이름 — 옛 comment_on_project 는 MCP 목록에 없다. 디스패처 자신의 CLI 호출(받았다 표시)도 지금 이름(CLI 가 옛 이름을 막는다).
687
+ assert.match(h.calls[0].systemPrompt, /comment_on_item\(itemType "project", itemUid "B1", authorName "Claude", authorEmoji "✨", notify false\)/);
688
+ assert.doesNotMatch(h.calls[0].systemPrompt, /comment_on_project/);
687
689
  assert.match(h.calls[0].systemPrompt, /보드 전체 댓글엔 나만 알림이 없다/);
688
690
  const ack = buildCommentArgs(DEFAULT_CONFIG, { itemType: 'project', itemUid: 'B1' }, '👀 받았어요.', { notifyMe: true });
689
- assert.deepEqual(ack.slice(0, 4), ['-p', 'default', 'comment_on_project', '--json']);
690
- assert.deepEqual(JSON.parse(ack[4]), { projectId: 'B1', content: '👀 받았어요.', authorName: 'Claude', authorEmoji: '✨', notify: false });
691
+ assert.deepEqual(ack.slice(0, 4), ['-p', 'default', 'comment_on_item', '--json']);
692
+ assert.deepEqual(JSON.parse(ack[4]), { itemType: 'project', itemUid: 'B1', content: '👀 받았어요.', authorName: 'Claude', authorEmoji: '✨', notify: false });
691
693
  });
692
694
 
693
695
  test('받지 않는 종류(스냅샷 등)의 멘션 · 멘션 없는 남의 항목 댓글 → 무시', async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odyssey365/cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Odyssey365 / Odyssey60 / Odyssey30 CLI — 터미널·AI 에이전트에서 할일·메모·루틴·기록·보드·페이지를 다룬다 (OdysseyCLI)",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,7 +66,7 @@
66
66
  | 갈래 | 오는 댓글 | 어떻게 붙나 | 언제 빠지나 |
67
67
  |---|---|---|---|
68
68
  | **내 댓글** | 모든 스레드의 내 계정 댓글 | 늘 온다(등록 불필요) | 빠지지 않는다(`--no-comments` 로만 끔) |
69
- | **관심 스레드** (`followed:true`) | 그 방의 **남의** 댓글까지(공유 보드 멤버 · 앱 「답글」) | 자동 — 에이전트가 `comment_on_item`·`comment_on_project` 로 댓글을 남기면(`source:"auto"`) · 수동 — `odyssey threads follow`(`source:"manual"`) | 마지막 **에이전트 활동**(댓글·follow) 뒤 `ttlDays`(기본 14일, 1~365) 조용하면. 사람 댓글로는 늘지 않는다 · `odyssey threads unfollow` |
69
+ | **관심 스레드** (`followed:true`) | 그 방의 **남의** 댓글까지(공유 보드 멤버 · 앱 「답글」) | 자동 — 에이전트가 `comment_on_item`(보드 전체는 `itemType "project"`) 로 댓글을 남기면(`source:"auto"`) · 수동 — `odyssey threads follow`(`source:"manual"`) | 마지막 **에이전트 활동**(댓글·follow) 뒤 `ttlDays`(기본 14일, 1~365) 조용하면. 사람 댓글로는 늘지 않는다 · `odyssey threads unfollow` |
70
70
  | **태그 항목 스레드** (`tagged:true`) | `--tag` 가 걸린 내 할일·메모·프로젝트(+그 보드의 카드)·리포트의 방 | 태그가 곧 등록 | 태그를 떼면 바로(`reason:"untagged"`) — 만료 없음 |
71
71
 
72
72
  감시에서 갈래째 끄기: `--no-comments`(내 댓글) · `--no-threads`(관심 스레드) · `--no-tag-threads`(태그 항목 스레드).
@@ -139,7 +139,7 @@ odyssey threads unfollow --roomUid <방> # 또는 --it
139
139
 
140
140
  ### D. 활동 기록기 — 모델이 아예 없는 일
141
141
 
142
- - **입구**: 게임·앱 프로세스의 시작·끝. **일**: `create_record` 한 번 → 세션마다 `add_record_trace`(time·endTime·`dedupeKey`).
142
+ - **입구**: 게임·앱 프로세스의 시작·끝. **일**: `save_record`(기록 만들기) 한 번 → 세션마다 `add_record_trace`(time·endTime·`dedupeKey`).
143
143
  - **멱등**: `dedupeKey` = 같은 키는 한 번만. 종료 코드 `4`(네트워크)만 같은 키로 재전송, `1`(도구 오류)은 고치기 전엔 다시 보내지 않는다.
144
144
  - 자세한 호출법(Windows·Python): README 「프로그램에서 쓰기」.
145
145
 
@@ -102,7 +102,7 @@
102
102
  - **mention** — 오래 걸릴 일이면 받았다 표시부터 단다 → `list_item_comments` 로 스레드를, 필요하면 종류에 맞는 읽기 도구(`get_memo`·`get_event`·`get_project` …)로 항목을 읽는다 → 요청한 일 → 결과 답글.
103
103
  작업 기록용 할일을 새로 만들지 않는다 — 그 스레드가 기록이다(내가 할일을 만들어 달라고 하면 그건 일이니 만든다).
104
104
  - **tagged · reply** — 스레드를 읽고 이어 처리한다. 깨운 댓글이 너에게 한 말이 아니면(같은 보드 사람에게 단 답 · 혼잣말 메모) **답글 없이** 넘긴다.
105
- 4. **답글 자리**: `comment_on_item(itemType, itemUid, authorName, authorEmoji, notify false)` · 보드 카드는 `itemType "projectComponent"` + `projectId`(보드 uid = `parentItemUid`) · 보드 전체는 `comment_on_project`.
105
+ 4. **답글 자리**: `comment_on_item(itemType, itemUid, authorName, authorEmoji, notify false)` · 보드 카드는 `itemType "projectComponent"` + `projectId`(보드 uid = `parentItemUid`) · 보드 전체는 `itemType "project"` + `itemUid`(보드 uid — `notifyMe` 없이).
106
106
  - 판단이 필요하거나 막히면 추측하지 말고 질문을 답글로 남기고 `notifyMe true`(나한테만 알림 · 보드 전체는 `notify false`) — 끝에 "답글로 답해 주시면 이어서 할게요." 를 붙인다. 내 답이 이 세션을 다시 깨운다.
107
107
  - 끝났으면 결과 답글은 알림 없이. `notify true` 는 공유 보드 참여자 전원에게 간다 — 쓰지 않는다.
108
108
  - 권한에 막혔으면 무엇이 막혔는지 답글로 말한다.
@@ -110,7 +110,7 @@
110
110
  6. **큰 일은 하위 에이전트로** — 코딩이 길면 서브에이전트에 맡겨 이 세션의 맥락을 지킨다. 깨어난 턴은 사람이 없는 자동 턴이다 — 사람의 승인이 필요한 일(배포·게시·삭제)은 하지 말고 답글로 묻는다.
111
111
  7. 끝나면 **같은 명령으로 다시 띄운다**(백그라운드 종료). Monitor 는 걸어 둔 채 다음 줄을 기다린다.
112
112
 
113
- 관심 스레드: 네가 `comment_on_item`·`comment_on_project` 로 답글을 단 스레드는 서버가 자동으로 관심 스레드에 올린다(기본 14일). 이 듣기는 기본으로 그 방을 듣지 않으니 손댈 것 없다 —
113
+ 관심 스레드: 네가 `comment_on_item` 으로 답글을 단 스레드(보드 전체 포함)는 서버가 자동으로 관심 스레드에 올린다(기본 14일). 이 듣기는 기본으로 그 방을 듣지 않으니 손댈 것 없다 —
114
114
  남의 답까지 받아야 하는 설계일 때만 켠다(`odyssey agent-guide --design` 2절).
115
115
 
116
116
  ---