@routinecrew/routinecode 2.31.63 → 2.31.67
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 +7 -0
- package/bin/prompt-vault.js +1 -1
- package/bin/rc-config.js +2 -0
- package/bin/rc-credit-turn.js +1 -218
- package/bin/rc-grant.js +1 -78
- package/bin/rc-team.js +1 -591
- package/bin/seal-open.js +1 -1
- package/hooks/architect-runner.sh +159 -0
- package/hooks/cc-compat-watch.js +1 -70
- package/hooks/hooks-config.json +18 -0
- package/hooks/lib/cc-surface.json +2 -2
- package/hooks/lib/config_bash_track.py +390 -0
- package/hooks/lib/config_guard.py +103 -0
- package/hooks/lib/emit_raw.py +11 -1
- package/hooks/lib/known_solution.py +1 -1
- package/hooks/lib/sync_manager.py +96 -1
- package/hooks/lib/tests/test_config_bash_track.py +189 -0
- package/hooks/lib/tests/test_maintenance_sync.py +190 -0
- package/hooks/maintenance-runner.sh +450 -0
- package/hooks/pending-drainer.sh +12 -7
- package/hooks/post-agent-return.sh +1 -1
- package/hooks/post-bash-knowledge.sh +2 -2
- package/hooks/post-bash-verify.sh +28 -3
- package/hooks/post-build-check.sh +5 -5
- package/hooks/post-delegation-nudge.sh +1 -1
- package/hooks/post-domain-knowledge-record.sh +1 -1
- package/hooks/post-edit-track.sh +26 -1
- package/hooks/post-knowledge-query.sh +2 -2
- package/hooks/pre-agent-briefing.sh +16 -0
- package/hooks/pre-agent-spawn.mjs +1 -1
- package/hooks/pre-bash-guard.sh +19 -0
- package/hooks/pre-edit-config-gate.sh +16 -0
- package/hooks/pre-edit-domain-gate.sh +5 -5
- package/hooks/pre-edit-guard.sh +9 -0
- package/hooks/pre-edit-knowledge-gate.sh +2 -2
- package/hooks/pre-maintenance-guard.sh +48 -0
- package/hooks/pre-read-knowledge-inject.sh +1 -1
- package/hooks/pre-secret-guard.sh +1 -1
- package/hooks/recorder-runner.sh +16 -1
- package/hooks/save-user-message.sh +1 -1
- package/hooks/session-start.sh +69 -7
- package/hooks/stop-claim-check.sh +1 -1
- package/hooks/stop-claim-check.v3.sh +107 -1
- package/hooks/stop-knowledge-remind.sh +2 -2
- package/hooks/user-prompt-submit.sh +23 -7
- package/mcp-db-manager/dist/analyzers/duplicate-detector.js +1 -1
- package/mcp-db-manager/dist/core/model-parser.js +1 -1
- package/mcp-db-manager/dist/core/schema-reader.js +1 -1
- package/mcp-db-manager/dist/executors/migration-executor.js +1 -1
- package/mcp-db-manager/dist/generators/migration-generator.js +1 -1
- package/mcp-db-manager/dist/index.js +1 -1
- package/mcp-db-manager/dist/validators/schema-validator.js +1 -1
- package/mcp-dev-tester/dist/analyzers/auth-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/backend-analyzer.js +1 -1
- package/mcp-dev-tester/dist/analyzers/endpoint-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/frontend-analyzer.js +1 -1
- package/mcp-dev-tester/dist/analyzers/runtime-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/analyzers/type-comparator.js +1 -1
- package/mcp-dev-tester/dist/analyzers/validation-diagnoser.js +1 -1
- package/mcp-dev-tester/dist/attestation.js +1 -1
- package/mcp-dev-tester/dist/browser/playwright-manager.js +1 -1
- package/mcp-dev-tester/dist/browser/ui-tester.js +1 -1
- package/mcp-dev-tester/dist/config/project-config.js +1 -1
- package/mcp-dev-tester/dist/index.js +1 -1
- package/mcp-dev-tester/dist/testers/api-tester.js +1 -1
- package/mcp-doc-fetcher/dist/index.js +1 -1
- package/mcp-html-renderer/dist/index.js +1 -1
- package/mcp-html-renderer/dist/preview.js +1 -1
- package/mcp-html-renderer/dist/template-engine.js +1 -1
- package/mcp-intelligence/dist/concept-catalog.js +1 -1
- package/mcp-intelligence/dist/concept-server-proxy.js +1 -1
- package/mcp-intelligence/dist/config-auth.js +1 -1
- package/mcp-intelligence/dist/contracts.generated.js +1 -1
- package/mcp-intelligence/dist/domain-templates.js +1 -1
- package/mcp-intelligence/dist/grounding.js +1 -1
- package/mcp-intelligence/dist/handlers.js +1 -1
- package/mcp-intelligence/dist/index.js +1 -1
- package/mcp-intelligence/dist/intelligence-file.js +1 -1
- package/mcp-intelligence/dist/knowledge-critic.js +1 -1
- package/mcp-intelligence/dist/knowledge-handlers.js +1 -1
- package/mcp-intelligence/dist/mention-extractor.js +1 -1
- package/mcp-intelligence/dist/provenance.js +1 -1
- package/mcp-intelligence/dist/semantic-embedder.js +1 -1
- package/mcp-log-watcher/dist/config-auth.js +1 -1
- package/mcp-log-watcher/dist/file-watcher.js +1 -1
- package/mcp-log-watcher/dist/index.js +1 -1
- package/mcp-log-watcher/dist/known-solutions.js +1 -1
- package/mcp-log-watcher/dist/log-store.js +1 -1
- package/mcp-log-watcher/dist/websocket-server.js +1 -1
- package/mcp-plan-manager/dist/__tests__/file-ops-knowledge-dir.test.js +1 -0
- package/mcp-plan-manager/dist/__tests__/plan-parser.test.js +1 -1
- package/mcp-plan-manager/dist/file-ops.js +1 -1
- package/mcp-plan-manager/dist/index.js +1 -1
- package/mcp-plan-manager/dist/plan-parser.js +1 -1
- package/mcp-project-context/dist/git-ops.js +1 -1
- package/mcp-project-context/dist/index.js +1 -1
- package/mcp-project-context/dist/project-analysis.js +1 -1
- package/mcp-routinecode/dist/agent-tracker.js +1 -1
- package/mcp-routinecode/dist/attestation.js +1 -1
- package/mcp-routinecode/dist/blast-radius.js +1 -1
- package/mcp-routinecode/dist/changeset.js +1 -1
- package/mcp-routinecode/dist/config-auth.js +1 -1
- package/mcp-routinecode/dist/config-map/arch-graph.js +1 -0
- package/mcp-routinecode/dist/config-map/architect-store.js +1 -0
- package/mcp-routinecode/dist/config-map/assign.js +1 -0
- package/mcp-routinecode/dist/config-map/audit-cli.js +1 -0
- package/mcp-routinecode/dist/config-map/audit.js +1 -0
- package/mcp-routinecode/dist/config-map/briefing.js +1 -0
- package/mcp-routinecode/dist/config-map/decisions.js +1 -0
- package/mcp-routinecode/dist/config-map/decls.js +1 -0
- package/mcp-routinecode/dist/config-map/extract.js +1 -0
- package/mcp-routinecode/dist/config-map/gate.js +1 -0
- package/mcp-routinecode/dist/config-map/hash.js +1 -0
- package/mcp-routinecode/dist/config-map/ident-norm.js +1 -0
- package/mcp-routinecode/dist/config-map/index-store.js +1 -0
- package/mcp-routinecode/dist/config-map/light-eval.js +1 -0
- package/mcp-routinecode/dist/config-map/link.js +1 -0
- package/mcp-routinecode/dist/config-map/lookup.js +1 -0
- package/mcp-routinecode/dist/config-map/louvain.js +1 -0
- package/mcp-routinecode/dist/config-map/maintenance-cli.js +1 -0
- package/mcp-routinecode/dist/config-map/names.js +1 -0
- package/mcp-routinecode/dist/config-map/proposals.js +1 -0
- package/mcp-routinecode/dist/config-map/recheck.js +1 -0
- package/mcp-routinecode/dist/config-map/repo-id.js +1 -0
- package/mcp-routinecode/dist/config-map/rule-import.js +1 -0
- package/mcp-routinecode/dist/config-map/scc.js +1 -0
- package/mcp-routinecode/dist/config-map/shape-eval.js +1 -0
- package/mcp-routinecode/dist/config-map/shape.js +1 -0
- package/mcp-routinecode/dist/config-map/snapshot.js +1 -0
- package/mcp-routinecode/dist/config-map/stable-id.js +1 -0
- package/mcp-routinecode/dist/config-map/store.js +1 -0
- package/mcp-routinecode/dist/config-map/task-eval.js +1 -0
- package/mcp-routinecode/dist/config-map/templates.js +1 -0
- package/mcp-routinecode/dist/config-map/types.js +1 -0
- package/mcp-routinecode/dist/contracts.generated.js +1 -1
- package/mcp-routinecode/dist/coverage.js +1 -1
- package/mcp-routinecode/dist/explorer-advisor.js +1 -1
- package/mcp-routinecode/dist/failure-tracker.js +1 -1
- package/mcp-routinecode/dist/file-lock-registry.js +1 -1
- package/mcp-routinecode/dist/file-risk-scorer.js +1 -1
- package/mcp-routinecode/dist/index.js +1 -1
- package/mcp-routinecode/dist/known-solutions.js +1 -1
- package/mcp-routinecode/dist/ledger-miner.js +1 -1
- package/mcp-routinecode/dist/observed-draft.js +1 -1
- package/mcp-routinecode/dist/pattern-matcher.js +1 -1
- package/mcp-routinecode/dist/route-match.js +1 -1
- package/mcp-routinecode/dist/routines.js +1 -1
- package/mcp-routinecode/dist/rule-engine.js +1 -1
- package/mcp-routinecode/dist/rule-promoter.js +1 -1
- package/mcp-routinecode/dist/telemetry-analyzer.js +1 -1
- package/mcp-routinecode/dist/test-runner.js +1 -1
- package/mcp-routinecode/dist/verification.js +0 -0
- package/mcp-routinecode/dist/viral-loop.js +1 -1
- package/mcp-routinecode/package.json +3 -1
- package/package.json +3 -2
- package/plugin/agents/analyzer.md.sealed +1 -0
- package/plugin/agents/architect.md.sealed +1 -0
- package/plugin/agents/crawler.md.sealed +1 -0
- package/plugin/agents/explorer.md.sealed +1 -0
- package/plugin/agents/implementor.md.sealed +1 -0
- package/plugin/agents/looker.md.sealed +1 -0
- package/plugin/agents/planner.md.sealed +1 -0
- package/plugin/agents/recorder.md.sealed +1 -0
- package/plugin/agents/reviewer.md.sealed +1 -0
- package/plugin/agents/verifier.md.sealed +1 -0
- package/plugin/commands/analyze.md.sealed +1 -0
- package/plugin/commands/plan.md.sealed +1 -0
- package/plugin/commands/rc.md.sealed +1 -0
- package/plugin/commands/receipt.md.sealed +1 -0
- package/plugin/commands/recharge.md.sealed +1 -0
- package/plugin/commands/routines.md.sealed +1 -0
- package/plugin/commands/share.md.sealed +1 -0
- package/plugin/routinecode-prompt.md.sealed +1 -0
- package/hooks/tests/cd-bypass.test.py +0 -57
- package/hooks/tests/design09-client.test.py +0 -471
- package/hooks/tests/dev-mode.test.py +0 -62
- package/hooks/tests/gate-integration.test.sh +0 -300
- package/hooks/tests/in-project-relax.test.py +0 -106
- package/hooks/tests/knowledge-loop.test.sh +0 -89
- package/hooks/tests/ledger-bench.sh +0 -115
- package/hooks/tests/ledger-chaos.test.sh +0 -185
- package/hooks/tests/ledger-compat.test.sh +0 -138
- package/hooks/tests/ledger-integration.test.sh +0 -200
- package/hooks/tests/ledger-unit.test.sh +0 -300
- package/hooks/tests/mcp-name-wiring.test.sh +0 -64
- package/hooks/tests/rm-guard.test.py +0 -108
- package/hooks/tests/secret-guard-bypass.test.sh +0 -107
- package/hooks/tests/secret-guard.test.sh +0 -604
- package/hooks/tests/secret-premask.test.py +0 -179
- package/hooks/tests/stop-autoproceed.test.sh +0 -60
- package/hooks/tests/stop-claim-check-v3-sim.sh +0 -224
- package/hooks/tests/stop-claim-check-v3.test.sh +0 -373
- package/hooks/tests/stop-claim-check.test.sh +0 -224
- package/mcp-db-manager/dist/analyzers/duplicate-detector.d.ts +0 -48
- package/mcp-db-manager/dist/analyzers/duplicate-detector.d.ts.map +0 -1
- package/mcp-db-manager/dist/core/model-parser.d.ts +0 -71
- package/mcp-db-manager/dist/core/model-parser.d.ts.map +0 -1
- package/mcp-db-manager/dist/core/schema-reader.d.ts +0 -69
- package/mcp-db-manager/dist/core/schema-reader.d.ts.map +0 -1
- package/mcp-db-manager/dist/executors/migration-executor.d.ts +0 -14
- package/mcp-db-manager/dist/executors/migration-executor.d.ts.map +0 -1
- package/mcp-db-manager/dist/generators/migration-generator.d.ts +0 -69
- package/mcp-db-manager/dist/generators/migration-generator.d.ts.map +0 -1
- package/mcp-db-manager/dist/index.d.ts +0 -7
- package/mcp-db-manager/dist/index.d.ts.map +0 -1
- package/mcp-db-manager/dist/types.d.ts +0 -382
- package/mcp-db-manager/dist/types.d.ts.map +0 -1
- package/mcp-db-manager/dist/validators/schema-validator.d.ts +0 -56
- package/mcp-db-manager/dist/validators/schema-validator.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/auth-diagnoser.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/auth-diagnoser.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/backend-analyzer.d.ts +0 -18
- package/mcp-dev-tester/dist/analyzers/backend-analyzer.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/endpoint-diagnoser.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/endpoint-diagnoser.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/frontend-analyzer.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/frontend-analyzer.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/runtime-diagnoser.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/runtime-diagnoser.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/type-comparator.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/type-comparator.d.ts.map +0 -1
- package/mcp-dev-tester/dist/analyzers/validation-diagnoser.d.ts +0 -15
- package/mcp-dev-tester/dist/analyzers/validation-diagnoser.d.ts.map +0 -1
- package/mcp-dev-tester/dist/attestation.d.ts +0 -36
- package/mcp-dev-tester/dist/attestation.d.ts.map +0 -1
- package/mcp-dev-tester/dist/browser/playwright-manager.d.ts +0 -148
- package/mcp-dev-tester/dist/browser/playwright-manager.d.ts.map +0 -1
- package/mcp-dev-tester/dist/browser/ui-tester.d.ts +0 -28
- package/mcp-dev-tester/dist/browser/ui-tester.d.ts.map +0 -1
- package/mcp-dev-tester/dist/config/project-config.d.ts +0 -94
- package/mcp-dev-tester/dist/config/project-config.d.ts.map +0 -1
- package/mcp-dev-tester/dist/index.d.ts +0 -3
- package/mcp-dev-tester/dist/index.d.ts.map +0 -1
- package/mcp-dev-tester/dist/testers/api-tester.d.ts +0 -77
- package/mcp-dev-tester/dist/testers/api-tester.d.ts.map +0 -1
- package/mcp-dev-tester/dist/types.d.ts +0 -423
- package/mcp-dev-tester/dist/types.d.ts.map +0 -1
- package/mcp-doc-fetcher/dist/index.d.ts +0 -17
- package/mcp-doc-fetcher/dist/index.d.ts.map +0 -1
- package/mcp-html-renderer/dist/index.d.ts +0 -3
- package/mcp-html-renderer/dist/index.d.ts.map +0 -1
- package/mcp-html-renderer/dist/preview.d.ts +0 -15
- package/mcp-html-renderer/dist/preview.d.ts.map +0 -1
- package/mcp-html-renderer/dist/template-engine.d.ts +0 -46
- package/mcp-html-renderer/dist/template-engine.d.ts.map +0 -1
- package/mcp-intelligence/dist/concept-catalog.d.ts +0 -142
- package/mcp-intelligence/dist/concept-catalog.d.ts.map +0 -1
- package/mcp-intelligence/dist/concept-server-proxy.d.ts +0 -38
- package/mcp-intelligence/dist/concept-server-proxy.d.ts.map +0 -1
- package/mcp-intelligence/dist/config-auth.d.ts +0 -18
- package/mcp-intelligence/dist/config-auth.d.ts.map +0 -1
- package/mcp-intelligence/dist/contracts.generated.d.ts +0 -58
- package/mcp-intelligence/dist/contracts.generated.d.ts.map +0 -1
- package/mcp-intelligence/dist/domain-templates.d.ts +0 -25
- package/mcp-intelligence/dist/domain-templates.d.ts.map +0 -1
- package/mcp-intelligence/dist/grounding.d.ts +0 -77
- package/mcp-intelligence/dist/grounding.d.ts.map +0 -1
- package/mcp-intelligence/dist/handlers.d.ts +0 -72
- package/mcp-intelligence/dist/handlers.d.ts.map +0 -1
- package/mcp-intelligence/dist/index.d.ts +0 -3
- package/mcp-intelligence/dist/index.d.ts.map +0 -1
- package/mcp-intelligence/dist/intelligence-file.d.ts +0 -82
- package/mcp-intelligence/dist/intelligence-file.d.ts.map +0 -1
- package/mcp-intelligence/dist/knowledge-critic.d.ts +0 -28
- package/mcp-intelligence/dist/knowledge-critic.d.ts.map +0 -1
- package/mcp-intelligence/dist/knowledge-handlers.d.ts +0 -358
- package/mcp-intelligence/dist/knowledge-handlers.d.ts.map +0 -1
- package/mcp-intelligence/dist/mention-extractor.d.ts +0 -13
- package/mcp-intelligence/dist/mention-extractor.d.ts.map +0 -1
- package/mcp-intelligence/dist/provenance.d.ts +0 -28
- package/mcp-intelligence/dist/provenance.d.ts.map +0 -1
- package/mcp-intelligence/dist/semantic-embedder.d.ts +0 -25
- package/mcp-intelligence/dist/semantic-embedder.d.ts.map +0 -1
- package/mcp-log-watcher/dist/config-auth.d.ts +0 -16
- package/mcp-log-watcher/dist/config-auth.d.ts.map +0 -1
- package/mcp-log-watcher/dist/file-watcher.d.ts +0 -36
- package/mcp-log-watcher/dist/file-watcher.d.ts.map +0 -1
- package/mcp-log-watcher/dist/index.d.ts +0 -3
- package/mcp-log-watcher/dist/index.d.ts.map +0 -1
- package/mcp-log-watcher/dist/known-solutions.d.ts +0 -60
- package/mcp-log-watcher/dist/known-solutions.d.ts.map +0 -1
- package/mcp-log-watcher/dist/log-store.d.ts +0 -72
- package/mcp-log-watcher/dist/log-store.d.ts.map +0 -1
- package/mcp-log-watcher/dist/types.d.ts +0 -52
- package/mcp-log-watcher/dist/types.d.ts.map +0 -1
- package/mcp-log-watcher/dist/websocket-server.d.ts +0 -44
- package/mcp-log-watcher/dist/websocket-server.d.ts.map +0 -1
- package/mcp-plan-manager/dist/__tests__/plan-parser.test.d.ts +0 -7
- package/mcp-plan-manager/dist/__tests__/plan-parser.test.d.ts.map +0 -1
- package/mcp-plan-manager/dist/file-ops.d.ts +0 -39
- package/mcp-plan-manager/dist/file-ops.d.ts.map +0 -1
- package/mcp-plan-manager/dist/index.d.ts +0 -23
- package/mcp-plan-manager/dist/index.d.ts.map +0 -1
- package/mcp-plan-manager/dist/plan-parser.d.ts +0 -76
- package/mcp-plan-manager/dist/plan-parser.d.ts.map +0 -1
- package/mcp-project-context/dist/git-ops.d.ts +0 -40
- package/mcp-project-context/dist/git-ops.d.ts.map +0 -1
- package/mcp-project-context/dist/index.d.ts +0 -20
- package/mcp-project-context/dist/index.d.ts.map +0 -1
- package/mcp-project-context/dist/project-analysis.d.ts +0 -50
- package/mcp-project-context/dist/project-analysis.d.ts.map +0 -1
- package/mcp-routinecode/dist/agent-tracker.d.ts +0 -68
- package/mcp-routinecode/dist/attestation.d.ts +0 -37
- package/mcp-routinecode/dist/blast-radius.d.ts +0 -83
- package/mcp-routinecode/dist/changeset.d.ts +0 -86
- package/mcp-routinecode/dist/config-auth.d.ts +0 -15
- package/mcp-routinecode/dist/contracts.generated.d.ts +0 -57
- package/mcp-routinecode/dist/coverage.d.ts +0 -49
- package/mcp-routinecode/dist/explorer-advisor.d.ts +0 -34
- package/mcp-routinecode/dist/failure-tracker.d.ts +0 -32
- package/mcp-routinecode/dist/file-lock-registry.d.ts +0 -31
- package/mcp-routinecode/dist/file-risk-scorer.d.ts +0 -27
- package/mcp-routinecode/dist/index.d.ts +0 -13
- package/mcp-routinecode/dist/known-solutions.d.ts +0 -57
- package/mcp-routinecode/dist/ledger-miner.d.ts +0 -19
- package/mcp-routinecode/dist/observed-draft.d.ts +0 -42
- package/mcp-routinecode/dist/pattern-matcher.d.ts +0 -14
- package/mcp-routinecode/dist/route-match.d.ts +0 -24
- package/mcp-routinecode/dist/routines.d.ts +0 -59
- package/mcp-routinecode/dist/rule-engine.d.ts +0 -53
- package/mcp-routinecode/dist/rule-promoter.d.ts +0 -22
- package/mcp-routinecode/dist/telemetry-analyzer.d.ts +0 -56
- package/mcp-routinecode/dist/test-runner.d.ts +0 -66
- package/mcp-routinecode/dist/verification.d.ts +0 -173
- package/mcp-routinecode/dist/viral-loop.d.ts +0 -227
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Telemetry Analyzer — agent-telemetry.jsonl 누적 데이터에서 패턴 추출.
|
|
3
|
-
*
|
|
4
|
-
* 주요 지표:
|
|
5
|
-
* - Overdelegation rate: explorer 호출 중 tool call ≤2 비율
|
|
6
|
-
* - Repeat prompt count: 동일 promptHash가 N회+ 반복된 경우
|
|
7
|
-
* - Per-agentType avg tokens/tool calls
|
|
8
|
-
* - Block rate: 전체 spawn 중 result='blocked' 비율
|
|
9
|
-
* - Per-project-hash volume
|
|
10
|
-
*
|
|
11
|
-
* window_hours 파라미터로 최근 기간만 조회 가능.
|
|
12
|
-
*/
|
|
13
|
-
interface OverdelegationRow {
|
|
14
|
-
agentType: string;
|
|
15
|
-
totalCompletedSuccess: number;
|
|
16
|
-
lightCalls: number;
|
|
17
|
-
overdelegationRate: number;
|
|
18
|
-
avgToolCalls: number;
|
|
19
|
-
avgTokens: number;
|
|
20
|
-
}
|
|
21
|
-
interface RepeatPrompt {
|
|
22
|
-
promptHash: string;
|
|
23
|
-
promptSnippet: string;
|
|
24
|
-
occurrences: number;
|
|
25
|
-
agentTypes: string[];
|
|
26
|
-
blockedOccurrences: number;
|
|
27
|
-
}
|
|
28
|
-
interface BlockStats {
|
|
29
|
-
total: number;
|
|
30
|
-
blocked: number;
|
|
31
|
-
blockRate: number;
|
|
32
|
-
blockedByAgentType: Record<string, number>;
|
|
33
|
-
}
|
|
34
|
-
interface ProjectBreakdown {
|
|
35
|
-
projectHash: string;
|
|
36
|
-
spawnCount: number;
|
|
37
|
-
totalTokens: number;
|
|
38
|
-
byAgentType: Record<string, number>;
|
|
39
|
-
}
|
|
40
|
-
export interface AnalysisResult {
|
|
41
|
-
windowHours: number;
|
|
42
|
-
totalEntries: number;
|
|
43
|
-
timeRange: {
|
|
44
|
-
earliest: string;
|
|
45
|
-
latest: string;
|
|
46
|
-
} | null;
|
|
47
|
-
overdelegation: OverdelegationRow[];
|
|
48
|
-
repeatPrompts: RepeatPrompt[];
|
|
49
|
-
blockStats: BlockStats;
|
|
50
|
-
perProject: ProjectBreakdown[];
|
|
51
|
-
warnings: string[];
|
|
52
|
-
}
|
|
53
|
-
export declare function analyzeAgentUsage(args?: {
|
|
54
|
-
windowHours?: number;
|
|
55
|
-
}): AnalysisResult;
|
|
56
|
-
export {};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* run_tests — 테스트/타입체크를 MCP 서버가 직접 실행하고 결과를 attest 한다.
|
|
3
|
-
*
|
|
4
|
-
* LLM 이 "테스트 통과"를 신고하는 대신 이 도구 호출 자체가 QA 증거가 된다.
|
|
5
|
-
* 임의 명령 실행 도구가 되지 않도록 allowlist + 셸 메타문자 거부.
|
|
6
|
-
*/
|
|
7
|
-
import { type DiffCoverage } from './coverage.js';
|
|
8
|
-
export type TestKind = 'tests' | 'typecheck';
|
|
9
|
-
export interface TestRunResult {
|
|
10
|
-
success: boolean;
|
|
11
|
-
kind: TestKind;
|
|
12
|
-
command: string | null;
|
|
13
|
-
exitCode: number | null;
|
|
14
|
-
passed: number | null;
|
|
15
|
-
failed: number | null;
|
|
16
|
-
noTests: boolean;
|
|
17
|
-
timedOut: boolean;
|
|
18
|
-
outputTail: string;
|
|
19
|
-
attested: boolean;
|
|
20
|
-
/** 변경 코드 실행 커버리지 (JS 계열만 측정) */
|
|
21
|
-
coverage?: DiffCoverage;
|
|
22
|
-
error?: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function isAllowedCommand(cmd: string): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* 스위트 일부만 고른 실행인가 (파일·패턴 지정). 패키지 test 스크립트와 동일하거나
|
|
27
|
-
* 디렉터리 단위 지정(node --test tests/)은 전체 실행으로 본다.
|
|
28
|
-
*/
|
|
29
|
-
export declare function isSelectiveCommand(cmd: string, dir: string): boolean;
|
|
30
|
-
/** 프로젝트의 기본 명령 탐지. null = 해당 kind 의 스위트 부재. */
|
|
31
|
-
export declare function detectCommand(dir: string, kind: TestKind): string | null;
|
|
32
|
-
/** 러너별 통과/실패 카운트. 인식 못하면 null. */
|
|
33
|
-
export declare function parseCounts(output: string): {
|
|
34
|
-
passed: number | null;
|
|
35
|
-
failed: number | null;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* 실패한 테스트 이름 (러너별). 기준선 대비 "같은 테스트가 이미 실패하던 것" 판정에 쓴다 —
|
|
39
|
-
* 개수 차감은 자기가 낸 실패를 기존 실패로 세탁할 수 있다.
|
|
40
|
-
*/
|
|
41
|
-
export declare function parseFailedNames(output: string): string[];
|
|
42
|
-
/**
|
|
43
|
-
* TAP(node --test) 실패 leaf 를 "Suite > sub > test" 전체 경로로. 자식 실패로 인해 not ok 가 된
|
|
44
|
-
* 부모 suite 행은 제외한다 (같은 leaf 이름이 다른 suite 에 있을 때 기준선 세탁 방지).
|
|
45
|
-
*/
|
|
46
|
-
export declare function tapLeafFailures(text: string): string[];
|
|
47
|
-
export interface BaselineResult {
|
|
48
|
-
success: boolean;
|
|
49
|
-
command: string | null;
|
|
50
|
-
headSha: string | null;
|
|
51
|
-
passed: number | null;
|
|
52
|
-
failed: number | null;
|
|
53
|
-
valid: boolean;
|
|
54
|
-
attested: boolean;
|
|
55
|
-
outputTail: string;
|
|
56
|
-
error?: string;
|
|
57
|
-
}
|
|
58
|
-
export declare function runBaseline(opts: {
|
|
59
|
-
projectDir: string;
|
|
60
|
-
command?: string;
|
|
61
|
-
}): Promise<BaselineResult>;
|
|
62
|
-
export declare function runTests(opts: {
|
|
63
|
-
projectDir: string;
|
|
64
|
-
command?: string;
|
|
65
|
-
kind?: TestKind;
|
|
66
|
-
}): Promise<TestRunResult>;
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verification Scoring Engine — Phase-Gated Quality Enforcement
|
|
3
|
-
*
|
|
4
|
-
* Manages scoring iterations for analysis/design/development phases.
|
|
5
|
-
* Supports deterministic auto-scoring from evidence files,
|
|
6
|
-
* retroactive deductions, and bias detection.
|
|
7
|
-
*/
|
|
8
|
-
export type VerificationPhase = 'analysis' | 'design' | 'development';
|
|
9
|
-
export type VerificationTier = 'light' | 'standard' | 'full';
|
|
10
|
-
export interface DimensionScores {
|
|
11
|
-
[key: string]: number;
|
|
12
|
-
}
|
|
13
|
-
export interface ScoreIteration {
|
|
14
|
-
iteration: number;
|
|
15
|
-
score: number;
|
|
16
|
-
dimensions: DimensionScores;
|
|
17
|
-
feedback: string | null;
|
|
18
|
-
tier: VerificationTier;
|
|
19
|
-
autoScored: boolean;
|
|
20
|
-
ts: string;
|
|
21
|
-
}
|
|
22
|
-
export interface RetroactiveDeduction {
|
|
23
|
-
from: string;
|
|
24
|
-
issue: string;
|
|
25
|
-
penalty: number;
|
|
26
|
-
ts: string;
|
|
27
|
-
}
|
|
28
|
-
export interface VerificationState {
|
|
29
|
-
phase: VerificationPhase;
|
|
30
|
-
targetId: string;
|
|
31
|
-
iterations: ScoreIteration[];
|
|
32
|
-
currentScore: number;
|
|
33
|
-
passed: boolean;
|
|
34
|
-
maxIterations: number;
|
|
35
|
-
retroactiveDeductions?: RetroactiveDeduction[];
|
|
36
|
-
adjustedScore?: number;
|
|
37
|
-
/** 반복 상한 도달 후 FORCED_PASS_THRESHOLD 이상으로 통과 — 게이트는 허용하되 부채로 노출 */
|
|
38
|
-
forcedPass?: boolean;
|
|
39
|
-
/** 게이트 점수(currentScore)가 마지막으로 정해진 시각(ms) — 서명 대상 */
|
|
40
|
-
scoredAt?: number;
|
|
41
|
-
/** 채점 시점 변경 지문 (changeset.changeFingerprint) — hook 재계산값과 다르면 stale */
|
|
42
|
-
changeFingerprint?: string;
|
|
43
|
-
mac?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface ScoreVerificationInput {
|
|
46
|
-
phase: VerificationPhase;
|
|
47
|
-
targetId: string;
|
|
48
|
-
score: number;
|
|
49
|
-
dimensions: DimensionScores;
|
|
50
|
-
feedback?: string;
|
|
51
|
-
tier?: VerificationTier;
|
|
52
|
-
autoScored?: boolean;
|
|
53
|
-
/** N/A 차원 제외 후 적용가능 만점 (기본 100). dimensions 합 ≈ score × applicableMax / 100 */
|
|
54
|
-
applicableMax?: number;
|
|
55
|
-
/** 강제통과 금지 (기존 실패 아닌 실패 잔존·빌드 실패 — 반복으로 결함을 통과시키지 않음) */
|
|
56
|
-
noForcedPass?: boolean;
|
|
57
|
-
changeFingerprint?: string;
|
|
58
|
-
evidence?: {
|
|
59
|
-
buildSuccess?: boolean;
|
|
60
|
-
passedScenarios?: number;
|
|
61
|
-
totalScenarios?: number;
|
|
62
|
-
modifiedReferenced?: number;
|
|
63
|
-
totalReferenced?: number;
|
|
64
|
-
statusMatched?: number;
|
|
65
|
-
totalApiTests?: number;
|
|
66
|
-
};
|
|
67
|
-
retroactiveFeedback?: Array<{
|
|
68
|
-
targetPhase: 'analysis' | 'design';
|
|
69
|
-
issue: string;
|
|
70
|
-
impact: 'minor' | 'major' | 'critical';
|
|
71
|
-
}>;
|
|
72
|
-
}
|
|
73
|
-
export interface ScoreVerificationResult {
|
|
74
|
-
recorded: boolean;
|
|
75
|
-
currentScore: number;
|
|
76
|
-
passed: boolean;
|
|
77
|
-
iteration: number;
|
|
78
|
-
shouldEscalate: boolean;
|
|
79
|
-
escalateReason?: string;
|
|
80
|
-
dimensionValidationError?: string;
|
|
81
|
-
warnings?: string[];
|
|
82
|
-
/** development 수동 점수 — 기록만 되고 게이트 점수(currentScore/passed)에 반영되지 않음 */
|
|
83
|
-
advisory?: boolean;
|
|
84
|
-
forcedPass?: boolean;
|
|
85
|
-
applicableMax?: number;
|
|
86
|
-
naDimensions?: string[];
|
|
87
|
-
provenance?: Record<string, unknown>;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* 게이트가 읽는 필드(phase/targetId/currentScore/passed/forcedPass/adjustedScore)를 서명한다.
|
|
91
|
-
* hook(attest_reader.verify_state)이 검증 — 점수 파일 직접 편집으로 게이트 통과 차단.
|
|
92
|
-
*/
|
|
93
|
-
export declare function stateMacPayload(st: Pick<VerificationState, 'phase' | 'targetId' | 'currentScore' | 'passed' | 'forcedPass' | 'adjustedScore' | 'scoredAt' | 'changeFingerprint'>): string;
|
|
94
|
-
/** classification(tier) 서명 — hook 이 light tier 로 점수 게이트를 건너뛰므로 위조 차단 필요 */
|
|
95
|
-
export declare function classificationMacPayload(c: {
|
|
96
|
-
taskId: string;
|
|
97
|
-
tier: string;
|
|
98
|
-
inputsHash: string;
|
|
99
|
-
}): string;
|
|
100
|
-
export declare function saveVerification(input: ScoreVerificationInput): ScoreVerificationResult;
|
|
101
|
-
export declare function getVerificationState(phase: VerificationPhase, targetId: string): VerificationState | null;
|
|
102
|
-
export declare function autoScore(planPath: string, taskId: string, planName: string, projectDir: string, tier?: VerificationTier): ScoreVerificationResult;
|
|
103
|
-
export declare const ROUTE_FILE_RE: RegExp;
|
|
104
|
-
/** test_endpoint 대상이 로컬/사설망(또는 env 허용)인가 — 외부 호스트 호출은 이번 변경 검증이 아니다 */
|
|
105
|
-
export declare function isLocalTestHost(host: unknown): boolean;
|
|
106
|
-
export declare function testConfigTouched(root: string, sinceMs: number): boolean;
|
|
107
|
-
export declare function classifyTask(fileCount: number, hasApiQa: boolean, hasUiQa: boolean, hasApiSequence: boolean, category: string, taskId?: string): {
|
|
108
|
-
tier: VerificationTier;
|
|
109
|
-
reason: string;
|
|
110
|
-
inputsHash?: string;
|
|
111
|
-
persisted?: boolean;
|
|
112
|
-
fileCountCorrected?: boolean;
|
|
113
|
-
};
|
|
114
|
-
export declare function saveEvidence(planName: string, taskId: string, data: {
|
|
115
|
-
buildResult?: {
|
|
116
|
-
success: boolean;
|
|
117
|
-
output?: string;
|
|
118
|
-
};
|
|
119
|
-
apiTests?: {
|
|
120
|
-
results: Array<{
|
|
121
|
-
passed: boolean;
|
|
122
|
-
statusMatched?: boolean;
|
|
123
|
-
name?: string;
|
|
124
|
-
}>;
|
|
125
|
-
};
|
|
126
|
-
modifiedFiles?: string[];
|
|
127
|
-
chainChecks?: {
|
|
128
|
-
checks: Array<{
|
|
129
|
-
itemId: string;
|
|
130
|
-
verified: boolean;
|
|
131
|
-
method: 'grep' | 'read' | 'test_endpoint' | 'manual';
|
|
132
|
-
evidence?: string;
|
|
133
|
-
}>;
|
|
134
|
-
};
|
|
135
|
-
}): void;
|
|
136
|
-
export declare function appendPlannerFeedback(planId: string, feedback: Array<Record<string, unknown>>): void;
|
|
137
|
-
export declare function detectScoringBias(): {
|
|
138
|
-
biased: boolean;
|
|
139
|
-
direction: string;
|
|
140
|
-
evidence: string;
|
|
141
|
-
escapedDefects: EscapedDefectReport;
|
|
142
|
-
};
|
|
143
|
-
interface BandStat {
|
|
144
|
-
n: number;
|
|
145
|
-
escaped: number;
|
|
146
|
-
rate: number | null;
|
|
147
|
-
}
|
|
148
|
-
export interface EscapedDefectReport {
|
|
149
|
-
definition: string;
|
|
150
|
-
total: number;
|
|
151
|
-
matured: number;
|
|
152
|
-
escaped: number;
|
|
153
|
-
pendingEscaped: number;
|
|
154
|
-
/** 유출 신호를 판정할 수 없던 완료 수 (ledger 부재 등 preEditFailure=null) */
|
|
155
|
-
unknownSignal: number;
|
|
156
|
-
rate: number | null;
|
|
157
|
-
byBand: Record<string, BandStat>;
|
|
158
|
-
/** 차원별 평균 점수: 유출 vs 무결 — 유출군이 높은 차원 = 점수가 결함을 못 잡는(노이즈) 차원 */
|
|
159
|
-
dimensionGap: Record<string, {
|
|
160
|
-
escapedAvg: number;
|
|
161
|
-
cleanAvg: number;
|
|
162
|
-
}>;
|
|
163
|
-
thresholdHint: string;
|
|
164
|
-
escapedTasks: string[];
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* 완료 태스크 C 가 "유출"됐다 ⇔ C 이후 7일 안에 완료된 태스크 D 가
|
|
168
|
-
* (1) C 의 변경 파일을 다시 고쳤고 (2) D 의 첫 편집 전에 이미 빌드/테스트 실패가 있었다
|
|
169
|
-
* (= D 는 깨진 상태에서 시작해 C 의 파일을 고친 수정 작업).
|
|
170
|
-
* 성숙(matured) = C 이후 7일 경과 → 비율의 분모·분자. 7일 안 된 확정 유출은 pendingEscaped.
|
|
171
|
-
*/
|
|
172
|
-
export declare function escapedDefectReport(nowMs?: number): EscapedDefectReport;
|
|
173
|
-
export {};
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* mcp-routinecode/viral-loop.ts — local port of engine/src/viral-loop
|
|
3
|
-
* + engine/src/content-generator for use by the MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Duplicated (not imported) because mcp-routinecode is a self-
|
|
6
|
-
* contained npm package without the engine workspace link. Any
|
|
7
|
-
* contract changes must stay in sync with engine/src/viral-loop.
|
|
8
|
-
*
|
|
9
|
-
* M6 unified bucket: single consumable `balance`; no timezone-sensitive
|
|
10
|
-
* resets. Streak bonuses are awarded server-side on consume.
|
|
11
|
-
*/
|
|
12
|
-
export interface CreditState {
|
|
13
|
-
serviceId: 'routinecode';
|
|
14
|
-
balance: number;
|
|
15
|
-
lifetimeGranted: number;
|
|
16
|
-
lifetimeSpent: number;
|
|
17
|
-
currentStreak: number;
|
|
18
|
-
lastSyncedAt: string | null;
|
|
19
|
-
}
|
|
20
|
-
export type SharePlatform = 'x' | 'reddit' | 'linkedin';
|
|
21
|
-
export type ShareCandidateType = 'ErrorFix' | 'Quirk' | 'Pattern';
|
|
22
|
-
export interface ShareCandidate {
|
|
23
|
-
id: string;
|
|
24
|
-
type: ShareCandidateType;
|
|
25
|
-
platform: SharePlatform[];
|
|
26
|
-
title: string;
|
|
27
|
-
body: string;
|
|
28
|
-
markerId: string;
|
|
29
|
-
sourceEventId: string | null;
|
|
30
|
-
}
|
|
31
|
-
export interface PlatformFormat {
|
|
32
|
-
platform: SharePlatform;
|
|
33
|
-
text: string;
|
|
34
|
-
hashtags: string[];
|
|
35
|
-
deepLink: string;
|
|
36
|
-
}
|
|
37
|
-
export interface BlockStatus {
|
|
38
|
-
blocked: boolean;
|
|
39
|
-
reason?: 'insufficient_balance' | 'service_error';
|
|
40
|
-
balance: number;
|
|
41
|
-
cost: number;
|
|
42
|
-
sufficient: boolean;
|
|
43
|
-
message?: string;
|
|
44
|
-
}
|
|
45
|
-
export type BlockScreenLocale = 'en' | 'ko' | 'ja' | 'zh' | 'es';
|
|
46
|
-
type AnyEvent = {
|
|
47
|
-
type?: string;
|
|
48
|
-
[k: string]: unknown;
|
|
49
|
-
};
|
|
50
|
-
export declare const CREDIT_STATE_DIR: string;
|
|
51
|
-
export declare const CREDIT_STATE_PATH: string;
|
|
52
|
-
export declare function readCreditState(): CreditState;
|
|
53
|
-
export declare function writeCreditState(state: Partial<CreditState>): CreditState;
|
|
54
|
-
export declare function isBlocked(state?: CreditState): boolean;
|
|
55
|
-
export declare function grantLocalCredit(platform: SharePlatform, markerId: string, postUrl: string): {
|
|
56
|
-
granted: number;
|
|
57
|
-
balance: number;
|
|
58
|
-
};
|
|
59
|
-
export declare function hasRecentShare(markerId: string): boolean;
|
|
60
|
-
export interface CreditCheckResult {
|
|
61
|
-
cost: number;
|
|
62
|
-
balance: number;
|
|
63
|
-
sufficient: boolean;
|
|
64
|
-
}
|
|
65
|
-
export declare function checkCredit(userId: number, actionType?: string): Promise<BlockStatus>;
|
|
66
|
-
export interface ConsumeResult {
|
|
67
|
-
balanceAfter: number;
|
|
68
|
-
consumed: number;
|
|
69
|
-
streakBonus: number;
|
|
70
|
-
}
|
|
71
|
-
export declare function consumeCredit(userId: number, actionType: string, amount?: number, sourceRef?: string | null): Promise<{
|
|
72
|
-
ok: true;
|
|
73
|
-
data: ConsumeResult;
|
|
74
|
-
} | {
|
|
75
|
-
ok: false;
|
|
76
|
-
blocked: boolean;
|
|
77
|
-
status: number;
|
|
78
|
-
error: string;
|
|
79
|
-
}>;
|
|
80
|
-
export interface ShareIssueResult {
|
|
81
|
-
markerId: string;
|
|
82
|
-
platform: string;
|
|
83
|
-
cooldownUntil?: string | null;
|
|
84
|
-
}
|
|
85
|
-
export interface PublishShareResult {
|
|
86
|
-
markerId: string;
|
|
87
|
-
deepLink: string;
|
|
88
|
-
autoPosted: boolean;
|
|
89
|
-
postUrl?: string;
|
|
90
|
-
formattedContent: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Publish a share via publishing-backend. Internally reserves a markerId from
|
|
94
|
-
* growth /share/issue (quota / cooldown gate), formats + embeds marker, and
|
|
95
|
-
* auto-posts when the tenant has a linked OAuth channel. On any failure the
|
|
96
|
-
* caller can fall back to the deep-link.
|
|
97
|
-
*/
|
|
98
|
-
export declare function publishShare(userId: number, tenantId: number, platform: SharePlatform, content: string, options?: {
|
|
99
|
-
channelId?: number;
|
|
100
|
-
timeoutMs?: number;
|
|
101
|
-
}): Promise<{
|
|
102
|
-
ok: true;
|
|
103
|
-
data: PublishShareResult;
|
|
104
|
-
} | {
|
|
105
|
-
ok: false;
|
|
106
|
-
status: number;
|
|
107
|
-
error: string;
|
|
108
|
-
}>;
|
|
109
|
-
/**
|
|
110
|
-
* Tell publishing-backend the user finished posting manually (deep-link path).
|
|
111
|
-
* publishing-backend verifies immediately and pushes the result to growth so
|
|
112
|
-
* credit is granted without the 10-minute wait.
|
|
113
|
-
*/
|
|
114
|
-
export declare function confirmPost(markerId: string, postUrl: string, timeoutMs?: number): Promise<{
|
|
115
|
-
ok: true;
|
|
116
|
-
data: {
|
|
117
|
-
markerId: string;
|
|
118
|
-
verified: boolean;
|
|
119
|
-
rejectionReason?: string;
|
|
120
|
-
};
|
|
121
|
-
} | {
|
|
122
|
-
ok: false;
|
|
123
|
-
status: number;
|
|
124
|
-
error: string;
|
|
125
|
-
}>;
|
|
126
|
-
/**
|
|
127
|
-
* @deprecated Use `publishShare`. Kept so callers written against the older
|
|
128
|
-
* growth-direct flow still compile; forwards to publishShare with a
|
|
129
|
-
* placeholder body when the caller does not supply one.
|
|
130
|
-
*/
|
|
131
|
-
export declare function issueShare(userId: number, tenantId: number, platform: SharePlatform, postUrl?: string | null): Promise<{
|
|
132
|
-
ok: true;
|
|
133
|
-
data: ShareIssueResult;
|
|
134
|
-
} | {
|
|
135
|
-
ok: false;
|
|
136
|
-
status: number;
|
|
137
|
-
error: string;
|
|
138
|
-
}>;
|
|
139
|
-
/** 서버 충전 사다리 — write(온사이트 3회) → share: 링크 보내기 10회(즉시 +50) → 새 방문자당 +50(무제한). */
|
|
140
|
-
export interface RechargeLadder {
|
|
141
|
-
stage: 'write' | 'share';
|
|
142
|
-
write: {
|
|
143
|
-
used: number;
|
|
144
|
-
cap: number;
|
|
145
|
-
remaining: number;
|
|
146
|
-
reward: number;
|
|
147
|
-
};
|
|
148
|
-
share: {
|
|
149
|
-
mode: 'advance' | 'per_visit';
|
|
150
|
-
reward: number;
|
|
151
|
-
advanceUsed: number;
|
|
152
|
-
advanceCap: number;
|
|
153
|
-
advanceRemaining: number;
|
|
154
|
-
visitLink: {
|
|
155
|
-
markerId: string;
|
|
156
|
-
visitors: number;
|
|
157
|
-
earned: number;
|
|
158
|
-
} | null;
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
export interface RechargeStatus {
|
|
162
|
-
balance: number | null;
|
|
163
|
-
/** 서버가 정한 현재 단계(구버전 서버면 null) — 메뉴는 이 단계를 먼저 권한다 */
|
|
164
|
-
ladder: RechargeLadder | null;
|
|
165
|
-
onsiteWrites: {
|
|
166
|
-
used: number;
|
|
167
|
-
cap: number;
|
|
168
|
-
remaining: number;
|
|
169
|
-
rewardEach: number;
|
|
170
|
-
} | null;
|
|
171
|
-
links: {
|
|
172
|
-
recharge: string;
|
|
173
|
-
creditPack: string;
|
|
174
|
-
pro: string;
|
|
175
|
-
};
|
|
176
|
-
serverReachable: boolean;
|
|
177
|
-
}
|
|
178
|
-
/** 잔액 + 온사이트 작성 남은 횟수 + 결제 링크(결제는 브라우저 필요). */
|
|
179
|
-
export declare function rechargeStatus(): Promise<RechargeStatus>;
|
|
180
|
-
/** 온사이트 인사이트 작성 → 서버 검증 후 +50(평생 3회). 서버가 플랫폼을 온사이트로 고정한다. */
|
|
181
|
-
export declare function submitOnsiteInsight(contentType: 'error_fix' | 'pattern' | 'quirk', title: string, body: string, tags?: string[]): Promise<{
|
|
182
|
-
ok: true;
|
|
183
|
-
creditGranted: number;
|
|
184
|
-
} | {
|
|
185
|
-
ok: false;
|
|
186
|
-
status: number;
|
|
187
|
-
error: string;
|
|
188
|
-
}>;
|
|
189
|
-
/**
|
|
190
|
-
* 개인 공유 링크.
|
|
191
|
-
* - advance: 받을 때마다 서버가 즉시 +reward (평생 10회) — 클릭을 기다리지 않는다.
|
|
192
|
-
* - per_visit: 그 이후 상시 링크 — 새로운 사람이 들어올 때마다 +reward, 무제한.
|
|
193
|
-
*/
|
|
194
|
-
export declare function issueInviteLink(): Promise<{
|
|
195
|
-
ok: true;
|
|
196
|
-
url: string;
|
|
197
|
-
mode: 'advance' | 'per_visit';
|
|
198
|
-
reward: number | null;
|
|
199
|
-
advanceGranted: number;
|
|
200
|
-
advanceRemaining: number;
|
|
201
|
-
visitors: number;
|
|
202
|
-
} | {
|
|
203
|
-
ok: false;
|
|
204
|
-
status: number;
|
|
205
|
-
error: string;
|
|
206
|
-
}>;
|
|
207
|
-
/** Credit-delta based status check (no dedicated GET endpoint yet). */
|
|
208
|
-
export declare function verifyShareStatus(markerId: string, userId: number, baselineBalance: number): Promise<{
|
|
209
|
-
markerId: string;
|
|
210
|
-
verified: boolean;
|
|
211
|
-
pending: boolean;
|
|
212
|
-
balance: number;
|
|
213
|
-
delta: number;
|
|
214
|
-
}>;
|
|
215
|
-
export declare function readEvents(opts?: {
|
|
216
|
-
types?: string[];
|
|
217
|
-
sinceDays?: number;
|
|
218
|
-
limit?: number;
|
|
219
|
-
}): AnyEvent[];
|
|
220
|
-
export declare function generateMarkerId(): string;
|
|
221
|
-
export declare function generateCandidates(count?: number, lookbackDays?: number): ShareCandidate[];
|
|
222
|
-
export declare function formatForPlatform(candidate: ShareCandidate, platform: SharePlatform): PlatformFormat;
|
|
223
|
-
export declare function renderBlockScreen(state: CreditState, opts?: {
|
|
224
|
-
noColor?: boolean;
|
|
225
|
-
locale?: BlockScreenLocale;
|
|
226
|
-
}): string;
|
|
227
|
-
export {};
|