@routinecrew/routinecode 2.31.86 → 2.31.88

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 (90) hide show
  1. package/bin/cli.sh +10 -0
  2. package/bin/prompt-vault.dat +1 -1
  3. package/bin/rc-login.js +5 -4
  4. package/bin/rc-savings.js +808 -0
  5. package/bin/rc-skills.js +1 -1
  6. package/bin/rc-suggestions.js +100 -0
  7. package/bin/rc-team.js +1 -1
  8. package/hooks/hooks-config.json +9 -0
  9. package/hooks/lib/attest_reader.py +16 -1
  10. package/hooks/lib/calibration.json +89 -0
  11. package/hooks/lib/card_gate.py +735 -0
  12. package/hooks/lib/cc-surface.json +1 -1
  13. package/hooks/lib/command_fix.py +209 -0
  14. package/hooks/lib/delegate_nudge.py +179 -0
  15. package/hooks/lib/deploy_suggest.py +312 -0
  16. package/hooks/lib/design_pick_nudge.py +86 -0
  17. package/hooks/lib/emit_raw.py +4 -0
  18. package/hooks/lib/i18n.py +48 -20
  19. package/hooks/lib/knowledge_items.py +189 -19
  20. package/hooks/lib/knowledge_stock.py +604 -0
  21. package/hooks/lib/ops_guard.py +549 -0
  22. package/hooks/lib/prices.json +8 -0
  23. package/hooks/lib/route_ledger.py +622 -0
  24. package/hooks/lib/route_rules.json +88 -0
  25. package/hooks/lib/savings_emit.py +93 -0
  26. package/hooks/lib/secret_filter.py +11 -0
  27. package/hooks/lib/sync_manager.py +4 -1
  28. package/hooks/post-bash-verify.sh +14 -0
  29. package/hooks/post-edit-track.sh +9 -0
  30. package/hooks/pre-agent-spawn.mjs +1 -1
  31. package/hooks/pre-agent-spawn.sh +34 -2
  32. package/hooks/pre-bash-guard.sh +22 -0
  33. package/hooks/pre-bash-knowledge.sh +12 -2
  34. package/hooks/pre-credit-guard.sh +1 -1
  35. package/hooks/pre-edit-delegate.sh +15 -0
  36. package/hooks/pre-edit-guard.sh +10 -0
  37. package/hooks/pre-mark-complete.sh +54 -12
  38. package/hooks/pre-read-guard.sh +10 -0
  39. package/hooks/session-start.sh +15 -10
  40. package/hooks/stop-usage-metrics.sh +6 -0
  41. package/hooks/subagent-stop-usage.sh +36 -4
  42. package/hooks/user-prompt-submit.sh +9 -0
  43. package/mcp-intelligence/dist/knowledge-handlers.js +1 -1
  44. package/mcp-intelligence/dist/knowledge-record.js +1 -1
  45. package/mcp-plan-manager/dist/file-ops.js +1 -1
  46. package/mcp-routinecode/dist/criteria-card.js +1 -0
  47. package/mcp-routinecode/dist/design-judge.js +1 -0
  48. package/mcp-routinecode/dist/edit-tracker.js +1 -1
  49. package/mcp-routinecode/dist/explorer-advisor.js +1 -1
  50. package/mcp-routinecode/dist/failure-tracker.js +1 -1
  51. package/mcp-routinecode/dist/file-risk-scorer.js +1 -1
  52. package/mcp-routinecode/dist/index.js +1 -1
  53. package/mcp-routinecode/dist/known-solutions.js +1 -1
  54. package/mcp-routinecode/dist/ledger-miner.js +1 -1
  55. package/mcp-routinecode/dist/normalize-sig.js +1 -1
  56. package/mcp-routinecode/dist/observed-draft.js +1 -1
  57. package/mcp-routinecode/dist/observed-escalation.js +1 -1
  58. package/mcp-routinecode/dist/pattern-matcher.js +1 -1
  59. package/mcp-routinecode/dist/route-match.js +1 -1
  60. package/mcp-routinecode/dist/routines.js +1 -1
  61. package/mcp-routinecode/dist/rule-engine.js +1 -1
  62. package/mcp-routinecode/dist/rule-promoter.js +1 -1
  63. package/mcp-routinecode/dist/session-registry.js +1 -1
  64. package/mcp-routinecode/dist/skill-pack/sync.js +40 -14
  65. package/mcp-routinecode/dist/test-runner.js +1 -1
  66. package/mcp-routinecode/dist/thinking-judge.js +1 -0
  67. package/mcp-routinecode/dist/verification.js +1 -1
  68. package/package.json +1 -1
  69. package/plugin/.claude-plugin/plugin.json +1 -1
  70. package/plugin/agents/analyzer.md.sealed +1 -1
  71. package/plugin/agents/architect.md.sealed +1 -1
  72. package/plugin/agents/crawler.md.sealed +1 -1
  73. package/plugin/agents/explorer.md.sealed +1 -1
  74. package/plugin/agents/implementor-lite.md.sealed +1 -0
  75. package/plugin/agents/implementor.md.sealed +1 -1
  76. package/plugin/agents/looker.md.sealed +1 -1
  77. package/plugin/agents/ops-lite.md.sealed +1 -0
  78. package/plugin/agents/planner.md.sealed +1 -1
  79. package/plugin/agents/recorder.md.sealed +1 -1
  80. package/plugin/agents/reviewer.md.sealed +1 -1
  81. package/plugin/agents/runner-lite.md.sealed +1 -0
  82. package/plugin/agents/verifier.md.sealed +1 -1
  83. package/plugin/commands/analyze.md.sealed +1 -1
  84. package/plugin/commands/plan.md.sealed +1 -1
  85. package/plugin/commands/rc.md.sealed +1 -1
  86. package/plugin/commands/receipt.md.sealed +1 -1
  87. package/plugin/commands/recharge.md.sealed +1 -1
  88. package/plugin/commands/routines.md.sealed +1 -1
  89. package/plugin/commands/share.md.sealed +1 -1
  90. package/plugin/routinecode-prompt.md.sealed +1 -1
package/bin/rc-login.js CHANGED
@@ -22,7 +22,7 @@ import { writeFileSync, mkdirSync, existsSync, readFileSync } from 'node:fs';
22
22
  import { join } from 'node:path';
23
23
  import { homedir } from 'node:os';
24
24
  import { exec } from 'node:child_process';
25
- import { selectTeamForLogin, provisionKnowledgeKey } from './rc-team.js';
25
+ import { resolveTeamForLogin, provisionKnowledgeKey } from './rc-team.js';
26
26
 
27
27
  // cli-oauth.ts:9 와 동일한 auth 기본값/우선순위.
28
28
  // ROUTINECODE_AUTH_URL 은 session-start.sh:605 가 쓰는 정본 키와 통일.
@@ -128,9 +128,10 @@ async function apiKeyAcceptedByServer(serverUrl, apiKey) {
128
128
  // 기존 키가 서버에서 유효하고 선택한 팀이 현재 config 팀과 같으면 재발급하지 않는다(기존 skip 동작 보존).
129
129
  async function provisionKnowledgeConfig(accessToken, userId) {
130
130
  let team = null;
131
+ let hasPersonal = true;
131
132
  try {
132
- team = await selectTeamForLogin(accessToken);
133
- } catch { team = null; /* 팀 조회 실패는 개인으로 — 로그인을 막지 않는다 */ }
133
+ ({ team, hasPersonal } = await resolveTeamForLogin(accessToken));
134
+ } catch { team = null; /* 팀 조회 실패여도 로그인을 막지 않는다(토큰의 현재 공간으로 발급) */ }
134
135
 
135
136
  try {
136
137
  if (existsSync(CONFIG_PATH)) {
@@ -146,7 +147,7 @@ async function provisionKnowledgeConfig(accessToken, userId) {
146
147
 
147
148
  try {
148
149
  // provision(allowMultiple:true)은 항상 새 apiKey를 반환한다. 팀이면 body.tenantId 로 issuedTenantId 지정.
149
- const out = await provisionKnowledgeKey({ accessToken, userId, team });
150
+ const out = await provisionKnowledgeKey({ accessToken, userId, team, hasPersonal });
150
151
  if (out.ok) console.log(' Knowledge sync enabled.');
151
152
  } catch { /* non-critical — session-start.sh will retry */ }
152
153
  }