@routinecrew/routinecode 2.31.87 → 2.31.90
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/bin/cli.sh +10 -0
- package/bin/prompt-vault.dat +1 -1
- package/bin/rc-login.js +5 -4
- package/bin/rc-savings.js +808 -0
- package/bin/rc-suggestions.js +100 -0
- package/bin/rc-team.js +1 -1
- package/bin/setup.js +1 -1
- package/hooks/hooks-config.json +9 -0
- package/hooks/lib/agent_budget.py +2 -0
- package/hooks/lib/calibration.json +89 -0
- package/hooks/lib/card_gate.py +735 -0
- package/hooks/lib/cc-surface.json +1 -1
- package/hooks/lib/codemode_guard.py +30 -0
- package/hooks/lib/command_fix.py +209 -0
- package/hooks/lib/delegate_nudge.py +179 -0
- package/hooks/lib/deploy_suggest.py +312 -0
- package/hooks/lib/emit_raw.py +4 -0
- package/hooks/lib/knowledge_items.py +281 -22
- package/hooks/lib/knowledge_stock.py +708 -0
- package/hooks/lib/known_solution.py +1 -1
- package/hooks/lib/ops_guard.py +549 -0
- package/hooks/lib/prices.json +8 -0
- package/hooks/lib/route_ledger.py +622 -0
- package/hooks/lib/route_rules.json +88 -0
- package/hooks/lib/savings_emit.py +93 -0
- package/hooks/lib/secret_filter.py +11 -0
- package/hooks/lib/sync_manager.py +4 -1
- package/hooks/post-bash-verify.sh +14 -0
- package/hooks/post-edit-track.sh +9 -0
- package/hooks/pre-agent-spawn.mjs +1 -1
- package/hooks/pre-agent-spawn.sh +22 -2
- package/hooks/pre-bash-guard.sh +31 -0
- package/hooks/pre-bash-knowledge.sh +12 -2
- package/hooks/pre-edit-delegate.sh +15 -0
- package/hooks/pre-edit-guard.sh +10 -0
- package/hooks/pre-read-guard.sh +10 -0
- package/hooks/session-start.sh +6 -0
- package/hooks/stop-usage-metrics.sh +6 -0
- package/hooks/subagent-stop-usage.sh +36 -4
- package/mcp-intelligence/dist/knowledge-handlers.js +1 -1
- package/mcp-intelligence/dist/knowledge-record.js +1 -1
- package/mcp-routinecode/dist/index.js +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/agents/analyzer.md.sealed +1 -1
- package/plugin/agents/architect.md.sealed +1 -1
- package/plugin/agents/crawler.md.sealed +1 -1
- package/plugin/agents/explorer.md.sealed +1 -1
- package/plugin/agents/implementor-lite.md.sealed +1 -0
- package/plugin/agents/implementor.md.sealed +1 -1
- package/plugin/agents/looker.md.sealed +1 -1
- package/plugin/agents/ops-lite.md.sealed +1 -0
- package/plugin/agents/planner.md.sealed +1 -1
- package/plugin/agents/recorder.md.sealed +1 -1
- package/plugin/agents/reviewer.md.sealed +1 -1
- package/plugin/agents/runner-lite.md.sealed +1 -0
- package/plugin/agents/verifier.md.sealed +1 -1
- package/plugin/commands/analyze.md.sealed +1 -1
- package/plugin/commands/plan.md.sealed +1 -1
- package/plugin/commands/rc.md.sealed +1 -1
- package/plugin/commands/receipt.md.sealed +1 -1
- package/plugin/commands/recharge.md.sealed +1 -1
- package/plugin/commands/routines.md.sealed +1 -1
- package/plugin/commands/share.md.sealed +1 -1
- package/plugin/routinecode-prompt.md.sealed +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"""배포 성공 직후 geo 무료 AI 노출 진단 안내 1줄 (설계 35c W5 · 플로우 13).
|
|
2
|
+
|
|
3
|
+
post-bash-verify.sh 가 Bash 결과를 볼 때 호출한다. 배포 명령이 성공했고 처음 보는 공개 도메인이면
|
|
4
|
+
사용자에게만 보이는 systemMessage 1줄을 돌려준다(additionalContext 에는 넣지 않는다 — AI 맥락에 들어가면 안 됨).
|
|
5
|
+
|
|
6
|
+
판정 순서(어느 하나라도 걸리면 None):
|
|
7
|
+
1. 명령이 배포 명령인가: vercel --prod / vercel deploy --prod, netlify deploy --prod, fly deploy,
|
|
8
|
+
railway up, firebase deploy, wrangler deploy · wrangler pages deploy.
|
|
9
|
+
(--prod 없는 vercel 은 미리보기이므로 제외)
|
|
10
|
+
2. 환경변수 CI 가 설정됐는가 → 제외
|
|
11
|
+
3. 대화형 세션인가: CLAUDE_CODE_SESSION_ATTENDED=1 일 때만 (훅은 stdin·stdout 이 파이프라 TTY 판별 불가)
|
|
12
|
+
4. 실패 신호가 있는가(exit_code != 0 또는 출력에 error/failed/fatal 등) → 제외
|
|
13
|
+
5. 출력에서 https:// 주소의 호스트를 골랐을 때 공개 호스트인가
|
|
14
|
+
(localhost·사설 IP·*.local·대시보드 호스트·배포 해시 주소 제외)
|
|
15
|
+
6. ~/.routinecode/config.json 의 suggestions 가 false 가 아닌가
|
|
16
|
+
7. 이 도메인이 ~/.routinecode/suggested-domains.json 에 아직 없는가
|
|
17
|
+
8. auth 관문(POST /api/v1/me/suggestions/gate, 1.5초): allow 가 false 면 침묵.
|
|
18
|
+
토큰 없음·실패·시간 초과는 표시(fail-open).
|
|
19
|
+
|
|
20
|
+
통과하면 도메인을 기록하고, auth 에 event 'shown' 을 보내고, 줄을 돌려준다.
|
|
21
|
+
기록은 줄을 돌려주기 직전에만 한다(suggestions off 면 기록도 안 함).
|
|
22
|
+
모든 실패는 fail-open: 예외가 나면 None.
|
|
23
|
+
|
|
24
|
+
상태 경로: ROUTINECODE_DIR 또는 ~/.routinecode (rc-privacy 와 같은 규칙). 설정 경로: ROUTINECODE_CONFIG_PATH 또는 <dir>/config.json.
|
|
25
|
+
사용자 토큰: <dir>/credentials.json 의 accessToken (rc-login 이 저장). auth 주소: AUTH_API_URL → ROUTINECODE_AUTH_URL → 기본값.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
import html
|
|
29
|
+
import ipaddress
|
|
30
|
+
import json
|
|
31
|
+
import os
|
|
32
|
+
import re
|
|
33
|
+
import urllib.parse
|
|
34
|
+
import urllib.request
|
|
35
|
+
|
|
36
|
+
GEO_START = 'https://geo.routinecrew.net/start?url={domain}&ref=routinecode'
|
|
37
|
+
HINT = ' 이 안내 끄기: routinecode suggestions off'
|
|
38
|
+
GATE_CARD_KEY = 'routinecode.deploy_check'
|
|
39
|
+
GATE_TIMEOUT_S = 1.5
|
|
40
|
+
TITLE_MAX = 80
|
|
41
|
+
DEFAULT_AUTH_URL = 'https://auth.routinecrew.net'
|
|
42
|
+
|
|
43
|
+
DEPLOY_RES = [
|
|
44
|
+
# vercel --prod / vercel deploy --prod (사이 인자는 플래그만 허용 — `vercel env ls --prod` 같은 다른 하위명령 제외)
|
|
45
|
+
re.compile(r'\bvercel(?:\s+deploy)?(?:\s+-{1,2}[^\s;&|]+)*\s+--prod\b'),
|
|
46
|
+
re.compile(r'\bnetlify\s+deploy\b[^\n;&|]*--prod\b'),
|
|
47
|
+
re.compile(r'\bfly\s+deploy\b'),
|
|
48
|
+
re.compile(r'\bflyctl\s+deploy\b'),
|
|
49
|
+
re.compile(r'\brailway\s+up\b'),
|
|
50
|
+
re.compile(r'\bfirebase\s+deploy\b'),
|
|
51
|
+
re.compile(r'\bwrangler\s+(?:pages\s+)?deploy\b'),
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
URL_RE = re.compile(r'https://([A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?)(?::\d+)?(?=[/?#\s"\'<>)\]\],]|$)')
|
|
55
|
+
HOST_RE = re.compile(r'^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$')
|
|
56
|
+
# 주소 줄 선택 우선순위: 별칭 줄 → 운영 주소 줄 → 그 밖 (vercel 은 해시 미리보기 주소와 별칭 주소를 같이 찍는다)
|
|
57
|
+
ALIAS_LINE_RE = re.compile(r'\baliased\b', re.IGNORECASE)
|
|
58
|
+
PREFER_LINE_RE = re.compile(r'production|deployed|live at|hosting url|project url', re.IGNORECASE)
|
|
59
|
+
ERROR_RE = re.compile(r'\berror\b|\bfailed\b|\bfatal\b|\bERR!|\bexception\b', re.IGNORECASE)
|
|
60
|
+
# 주소가 나와도 배포 대상이 아닌 대시보드·문서 호스트
|
|
61
|
+
DASHBOARD_SUFFIXES = (
|
|
62
|
+
'vercel.com', 'netlify.com', 'fly.io', 'railway.app', 'cloudflare.com',
|
|
63
|
+
'firebase.google.com', 'console.cloud.google.com', 'github.com', 'npmjs.com',
|
|
64
|
+
)
|
|
65
|
+
HASH_SEG_RE = re.compile(r'^(?=.*[a-z])(?=.*[0-9])[a-z0-9]{6,12}$')
|
|
66
|
+
PAGES_HASH_RE = re.compile(r'^[a-f0-9]{8}$')
|
|
67
|
+
TITLE_RE = re.compile(r'<title[^>]*>(.*?)</title>', re.IGNORECASE | re.DOTALL)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def rc_dir(env=None):
|
|
71
|
+
env = os.environ if env is None else env
|
|
72
|
+
return env.get('ROUTINECODE_DIR') or os.path.join(os.path.expanduser('~'), '.routinecode')
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def config_path(env=None):
|
|
76
|
+
env = os.environ if env is None else env
|
|
77
|
+
return env.get('ROUTINECODE_CONFIG_PATH') or os.path.join(rc_dir(env), 'config.json')
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def record_path(env=None):
|
|
81
|
+
return os.path.join(rc_dir(env), 'suggested-domains.json')
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def is_deploy_command(command):
|
|
85
|
+
if not isinstance(command, str) or not command:
|
|
86
|
+
return False
|
|
87
|
+
return any(p.search(command) for p in DEPLOY_RES)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _exit_code(tool_response):
|
|
91
|
+
if not isinstance(tool_response, dict):
|
|
92
|
+
return None
|
|
93
|
+
for key in ('exit_code', 'exitCode'):
|
|
94
|
+
v = tool_response.get(key)
|
|
95
|
+
if isinstance(v, int) and not isinstance(v, bool):
|
|
96
|
+
return v
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def has_error_signal(response_text, tool_response=None):
|
|
101
|
+
ec = _exit_code(tool_response)
|
|
102
|
+
if ec is not None and ec != 0:
|
|
103
|
+
return True
|
|
104
|
+
return bool(ERROR_RE.search(response_text or ''))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def is_local_host(host):
|
|
108
|
+
h = host.lower()
|
|
109
|
+
if h == 'localhost' or h.endswith('.localhost') or h.endswith('.local') or '.' not in h:
|
|
110
|
+
return True
|
|
111
|
+
try:
|
|
112
|
+
ip = ipaddress.ip_address(h)
|
|
113
|
+
except ValueError:
|
|
114
|
+
return False
|
|
115
|
+
return ip.is_private or ip.is_loopback or ip.is_link_local or ip.is_unspecified or ip.is_reserved
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def is_dashboard_host(host):
|
|
119
|
+
h = host.lower()
|
|
120
|
+
return any(h == s or h.endswith('.' + s) for s in DASHBOARD_SUFFIXES)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def is_hash_host(host):
|
|
124
|
+
"""배포마다 바뀌는 해시 주소인가. 해시 주소는 안내 링크로 쓰지 않는다(매번 다른 도메인이 되어 재안내가 난다).
|
|
125
|
+
- vercel: <project>-<hash>-<scope>.vercel.app
|
|
126
|
+
- cloudflare pages: <hash8>.<project>.pages.dev
|
|
127
|
+
- netlify deploy preview: deploy-preview-N--<site>.netlify.app
|
|
128
|
+
"""
|
|
129
|
+
h = host.lower()
|
|
130
|
+
labels = h.split('.')
|
|
131
|
+
if h.endswith('.vercel.app') and len(labels) == 3:
|
|
132
|
+
parts = labels[0].split('-')
|
|
133
|
+
return len(parts) >= 3 and any(HASH_SEG_RE.match(p) for p in parts[1:-1])
|
|
134
|
+
if h.endswith('.pages.dev') and len(labels) >= 4:
|
|
135
|
+
return bool(PAGES_HASH_RE.match(labels[0]))
|
|
136
|
+
if h.endswith('.netlify.app'):
|
|
137
|
+
return '--' in labels[0]
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def extract_public_host(response_text):
|
|
142
|
+
"""출력에서 배포된 공개 호스트 하나를 고른다. 없으면 None."""
|
|
143
|
+
text = response_text or ''
|
|
144
|
+
candidates = [] # (tier, host): 0=별칭 줄, 1=운영 주소 줄, 2=그 밖. 같은 tier 는 출현 순
|
|
145
|
+
for line in text.splitlines():
|
|
146
|
+
if ALIAS_LINE_RE.search(line):
|
|
147
|
+
tier = 0
|
|
148
|
+
elif PREFER_LINE_RE.search(line):
|
|
149
|
+
tier = 1
|
|
150
|
+
else:
|
|
151
|
+
tier = 2
|
|
152
|
+
for m in URL_RE.finditer(line):
|
|
153
|
+
candidates.append((tier, m.group(1).lower()))
|
|
154
|
+
for _tier, host in sorted(candidates, key=lambda c: c[0]): # sorted 는 안정 정렬
|
|
155
|
+
if not HOST_RE.match(host):
|
|
156
|
+
continue
|
|
157
|
+
if is_local_host(host) or is_dashboard_host(host) or is_hash_host(host):
|
|
158
|
+
continue
|
|
159
|
+
return host
|
|
160
|
+
return None
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def suggestions_enabled(env=None):
|
|
164
|
+
"""config.json 의 suggestions 가 false 가 아니면 켜짐(기본 켜짐). 읽기 실패는 켜짐으로 본다."""
|
|
165
|
+
try:
|
|
166
|
+
with open(config_path(env), encoding='utf-8') as f:
|
|
167
|
+
cfg = json.load(f)
|
|
168
|
+
except Exception:
|
|
169
|
+
return True
|
|
170
|
+
if not isinstance(cfg, dict):
|
|
171
|
+
return True
|
|
172
|
+
return cfg.get('suggestions') is not False
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def load_recorded(env=None):
|
|
176
|
+
try:
|
|
177
|
+
with open(record_path(env), encoding='utf-8') as f:
|
|
178
|
+
data = json.load(f)
|
|
179
|
+
except Exception:
|
|
180
|
+
return set()
|
|
181
|
+
domains = data.get('domains', []) if isinstance(data, dict) else []
|
|
182
|
+
return {d for d in domains if isinstance(d, str)}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def mark_recorded(host, env=None):
|
|
186
|
+
domains = load_recorded(env)
|
|
187
|
+
domains.add(host)
|
|
188
|
+
path = record_path(env)
|
|
189
|
+
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
190
|
+
tmp = f'{path}.tmp.{os.getpid()}'
|
|
191
|
+
with open(tmp, 'w', encoding='utf-8') as f:
|
|
192
|
+
json.dump({'domains': sorted(domains)}, f, ensure_ascii=False, indent=2)
|
|
193
|
+
os.replace(tmp, path)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def ci_active(env=None):
|
|
197
|
+
env = os.environ if env is None else env
|
|
198
|
+
return str(env.get('CI', '')).strip().lower() not in ('', '0', 'false')
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def is_attended(env=None):
|
|
202
|
+
"""대화형(사람이 보는) 세션인가. Claude Code 가 세션마다 CLAUDE_CODE_SESSION_ATTENDED=1 을 넣는다.
|
|
203
|
+
훅 프로세스는 stdin·stdout 이 파이프라 isatty 로는 판별할 수 없어 이 값만 쓴다. 값이 없으면 침묵."""
|
|
204
|
+
env = os.environ if env is None else env
|
|
205
|
+
return str(env.get('CLAUDE_CODE_SESSION_ATTENDED', '')).strip() == '1'
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def site_title(cwd):
|
|
209
|
+
"""배포한 프로젝트 폴더의 index.html(또는 public/index.html) <title>. 없으면 None. 네트워크를 쓰지 않는다."""
|
|
210
|
+
if not isinstance(cwd, str) or not cwd:
|
|
211
|
+
return None
|
|
212
|
+
for rel in (('index.html',), ('public', 'index.html')):
|
|
213
|
+
try:
|
|
214
|
+
with open(os.path.join(cwd, *rel), encoding='utf-8', errors='replace') as f:
|
|
215
|
+
head = f.read(200000)
|
|
216
|
+
except OSError:
|
|
217
|
+
continue
|
|
218
|
+
m = TITLE_RE.search(head)
|
|
219
|
+
if not m:
|
|
220
|
+
continue
|
|
221
|
+
t = html.unescape(re.sub(r'\s+', ' ', m.group(1))).strip()
|
|
222
|
+
if t:
|
|
223
|
+
return t[:TITLE_MAX]
|
|
224
|
+
return None
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def access_token(env=None):
|
|
228
|
+
"""rc-login 이 저장한 사용자 토큰(credentials.json accessToken). 없거나 깨졌으면 None."""
|
|
229
|
+
try:
|
|
230
|
+
with open(os.path.join(rc_dir(env), 'credentials.json'), encoding='utf-8') as f:
|
|
231
|
+
tok = json.load(f).get('accessToken')
|
|
232
|
+
return tok if isinstance(tok, str) and tok else None
|
|
233
|
+
except Exception:
|
|
234
|
+
return None
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def auth_base(env=None):
|
|
238
|
+
env = os.environ if env is None else env
|
|
239
|
+
base = env.get('AUTH_API_URL') or env.get('ROUTINECODE_AUTH_URL') or DEFAULT_AUTH_URL
|
|
240
|
+
return base.rstrip('/')
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def _auth_post(env, path, body, token):
|
|
244
|
+
req = urllib.request.Request(
|
|
245
|
+
auth_base(env) + path,
|
|
246
|
+
data=json.dumps(body).encode('utf-8'),
|
|
247
|
+
method='POST',
|
|
248
|
+
headers={'Content-Type': 'application/json', 'Authorization': f'Bearer {token}', 'User-Agent': 'routinecode-cli'},
|
|
249
|
+
)
|
|
250
|
+
with urllib.request.urlopen(req, timeout=GATE_TIMEOUT_S) as r:
|
|
251
|
+
return json.loads(r.read().decode('utf-8') or '{}')
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def gate_allows(env=None):
|
|
255
|
+
"""auth 관문. allow 가 false 일 때만 침묵. 토큰 없음·오류·시간 초과·알 수 없는 응답은 표시(fail-open)."""
|
|
256
|
+
token = access_token(env)
|
|
257
|
+
if not token:
|
|
258
|
+
return True
|
|
259
|
+
try:
|
|
260
|
+
d = _auth_post(env, '/api/v1/me/suggestions/gate',
|
|
261
|
+
{'cardKey': GATE_CARD_KEY, 'service': 'routinecode', 'kind': 'term', 'peek': True}, token)
|
|
262
|
+
data = d.get('data', d) if isinstance(d, dict) else None
|
|
263
|
+
allow = data.get('allow') if isinstance(data, dict) else None
|
|
264
|
+
return allow is not False
|
|
265
|
+
except Exception:
|
|
266
|
+
return True
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def record_shown(env=None):
|
|
270
|
+
"""화면에 실제로 띄운 뒤 event 'shown' 을 보낸다. 실패해도 무시한다(fail-open)."""
|
|
271
|
+
token = access_token(env)
|
|
272
|
+
if not token:
|
|
273
|
+
return
|
|
274
|
+
try:
|
|
275
|
+
_auth_post(env, '/api/v1/me/suggestions/event',
|
|
276
|
+
{'cardKey': GATE_CARD_KEY, 'service': 'routinecode', 'kind': 'term', 'event': 'shown'}, token)
|
|
277
|
+
except Exception:
|
|
278
|
+
pass
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def build_line(host, title=None):
|
|
282
|
+
url = GEO_START.format(domain=host)
|
|
283
|
+
if title:
|
|
284
|
+
url += '&title=' + urllib.parse.quote(title, safe='')
|
|
285
|
+
return f'› {host} 이 AI 답변(ChatGPT·Perplexity)에 나오는지 무료로 볼 수 있어요: {url}\n{HINT}'
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def suggest_line(command, response_text, tool_response=None, env=None, cwd=None):
|
|
289
|
+
"""배포 성공 안내 1줄을 돌려준다. 안내하지 않을 때는 None. 예외는 전부 None (fail-open)."""
|
|
290
|
+
try:
|
|
291
|
+
if not is_deploy_command(command):
|
|
292
|
+
return None
|
|
293
|
+
if ci_active(env):
|
|
294
|
+
return None
|
|
295
|
+
if not is_attended(env):
|
|
296
|
+
return None
|
|
297
|
+
if has_error_signal(response_text, tool_response):
|
|
298
|
+
return None
|
|
299
|
+
host = extract_public_host(response_text)
|
|
300
|
+
if not host:
|
|
301
|
+
return None
|
|
302
|
+
if not suggestions_enabled(env):
|
|
303
|
+
return None
|
|
304
|
+
if host in load_recorded(env):
|
|
305
|
+
return None
|
|
306
|
+
if not gate_allows(env):
|
|
307
|
+
return None
|
|
308
|
+
mark_recorded(host, env)
|
|
309
|
+
record_shown(env)
|
|
310
|
+
return build_line(host, site_title(cwd))
|
|
311
|
+
except Exception:
|
|
312
|
+
return None
|
package/hooks/lib/emit_raw.py
CHANGED
|
@@ -35,6 +35,10 @@ METADATA_ALLOWED_KEYS = {
|
|
|
35
35
|
"task": {"task_sig", "area_hint", "cwd_hash"},
|
|
36
36
|
# Prevented Time 적립(초) — raw 스트림, growth 집계 게이트 자동 우회
|
|
37
37
|
"time_saved": {"measured_s", "paired_s", "anchored_s", "c1", "c2"},
|
|
38
|
+
# 설계 35 A13 — 사용자 PC 절감 계산기 주간 숫자(퍼센트·주 시작일·배수표 라벨만)
|
|
39
|
+
"savings_calc": {"calc_week", "actual_pct", "opus_pct", "saving_pct", "multiple", "calc_parts", "calc_origin",
|
|
40
|
+
"calc_length", "calc_version", "cum_actual_pct", "cum_opus_pct", "cum_saving_pct",
|
|
41
|
+
"cum_weeks", "rec_actual_pct", "rec_opus_pct", "rec_saving_pct", "rec_weeks", "calc_history"},
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
EVENT_TYPES = frozenset(METADATA_ALLOWED_KEYS.keys())
|