therookie 0.4.21 → 0.4.22
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/package.json +1 -1
- package/src/commands/save.js +29 -13
- package/version.json +1 -1
package/package.json
CHANGED
package/src/commands/save.js
CHANGED
|
@@ -14,6 +14,34 @@ import { readFileSync } from 'node:fs'
|
|
|
14
14
|
import { loadConfig, getHostname } from '../config.js'
|
|
15
15
|
import { apiPost } from '../api.js'
|
|
16
16
|
|
|
17
|
+
// 저장된 층을 **빠짐없이** 화면에 센다. 여기 없는 층은 서버가 저장해도 0건처럼 보인다 —
|
|
18
|
+
// 2026-09-02 저장에서 durable fact 3건이 그렇게 안 보였고, metric·recall 로 따로 확인해야
|
|
19
|
+
// 들어간 걸 알 수 있었다. 어제 닫은 사고("문은 열었는데 아무도 안 본다")와 같은 모양이다.
|
|
20
|
+
//
|
|
21
|
+
// 중복 스킵도 함께 센다. applied 만 보면 "보냈는데 전부 중복이라 0건" 과 "안 보냈다" 가
|
|
22
|
+
// 화면에서 구분되지 않는다(그게 이 결함이 오래 안 보인 이유다).
|
|
23
|
+
export function formatSaveSummary(s) {
|
|
24
|
+
const parts = []
|
|
25
|
+
if (s.working_cards?.ids?.length) parts.push(`카드 ${s.working_cards.ids.length}`)
|
|
26
|
+
const factsApplied = s.facts?.applied ?? 0
|
|
27
|
+
const factsDup = s.facts?.skipped_duplicate ?? 0
|
|
28
|
+
if (factsApplied || factsDup) {
|
|
29
|
+
parts.push(factsDup > 0 ? `사실 ${factsApplied}(중복 ${factsDup})` : `사실 ${factsApplied}`)
|
|
30
|
+
}
|
|
31
|
+
if (s.evidence?.applied) parts.push(`증거 ${s.evidence.applied}`)
|
|
32
|
+
if (s.personal_facts?.applied) parts.push(`취향 ${s.personal_facts.applied}`)
|
|
33
|
+
if (s.self_rules?.applied) {
|
|
34
|
+
const reinforced = s.self_rules.reinforced ?? 0
|
|
35
|
+
parts.push(
|
|
36
|
+
reinforced > 0
|
|
37
|
+
? `자기규칙 ${s.self_rules.applied}(강화 ${reinforced})`
|
|
38
|
+
: `자기규칙 ${s.self_rules.applied}`
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
if (s.verifications?.applied) parts.push(`검증 ${s.verifications.applied}`)
|
|
42
|
+
return parts.length > 0 ? parts.join(' · ') : '0건'
|
|
43
|
+
}
|
|
44
|
+
|
|
17
45
|
function readStdin() {
|
|
18
46
|
// TTY 면 파이프가 없다 — EOF 까지 무한 대기하지 않도록 즉시 빈 값으로 빠진다.
|
|
19
47
|
if (process.stdin.isTTY) return ''
|
|
@@ -119,19 +147,7 @@ export async function runSave(flags) {
|
|
|
119
147
|
'→ 같은 취지가 있으면 reinforces:"<id>"(강화) 또는 supersedes:"<id>"(정정), 없으면 peers_reviewed:true 로 재전송하세요.'
|
|
120
148
|
)
|
|
121
149
|
}
|
|
122
|
-
const
|
|
123
|
-
if (s.working_cards?.ids?.length) parts.push(`카드 ${s.working_cards.ids.length}`)
|
|
124
|
-
if (s.evidence?.applied) parts.push(`증거 ${s.evidence.applied}`)
|
|
125
|
-
if (s.self_rules?.applied) {
|
|
126
|
-
const reinforced = s.self_rules.reinforced ?? 0
|
|
127
|
-
parts.push(
|
|
128
|
-
reinforced > 0
|
|
129
|
-
? `자기규칙 ${s.self_rules.applied}(강화 ${reinforced})`
|
|
130
|
-
: `자기규칙 ${s.self_rules.applied}`
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
if (s.verifications?.applied) parts.push(`검증 ${s.verifications.applied}`)
|
|
134
|
-
const label = parts.length > 0 ? parts.join(' · ') : '0건'
|
|
150
|
+
const label = formatSaveSummary(s)
|
|
135
151
|
|
|
136
152
|
if (res.all_committed === false) {
|
|
137
153
|
// 검토 게이트만 걸린 저장은 "미저장 0건" 이 아니라 다음 행동이 남은 상태다.
|
package/version.json
CHANGED