refactor(cleanup): v0.5.0 Collector 제거 + dead code 정리 + HttpBridgeContext 버그 수정
- DELETE collector.py (523줄) - main.py: BOT_MODE=remote 분기 제거 - gateway.py: Collector REST 6개 endpoint 제거 (311→168줄) - bridge.py: RemoteTransport 제거 (480→270줄) - config.py: REMOTE_BRIDGE_URL 제거 - extension.ts: dead code 4개 + stale module vars 제거 - step-probe.ts: getStepProbeContext() 추가, autoApproveEnabled 제거 - FIX: HttpBridgeContext stale primitive (getter 패턴으로 수정) - ADD: extension.log rotation (10MB→2MB tail) - docs: architecture.md, tech-stack.md, known-issues.md 업데이트
This commit is contained in:
@@ -14,7 +14,6 @@ export interface BridgeContext {
|
||||
projectName: string;
|
||||
sdk: any;
|
||||
wsBridge: WSBridgeClient | null;
|
||||
autoApproveEnabled: boolean;
|
||||
activeSessionId: string;
|
||||
sessionStalled: boolean;
|
||||
lastPendingStepIndex: number;
|
||||
@@ -64,6 +63,18 @@ export function getActiveSessionId(): string {
|
||||
return ctx?.activeSessionId || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get step-probe context values for http-bridge.
|
||||
* Prevents stale primitive copies by reading live ctx values.
|
||||
*/
|
||||
export function getStepProbeContext(): { activeSessionId: string; sessionStalled: boolean; lastPendingStepIndex: number } {
|
||||
return {
|
||||
activeSessionId: ctx?.activeSessionId || '',
|
||||
sessionStalled: ctx?.sessionStalled ?? false,
|
||||
lastPendingStepIndex: ctx?.lastPendingStepIndex ?? -1,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset pending state after successful approval.
|
||||
* Called after WS response triggers approval in extension.ts.
|
||||
|
||||
Reference in New Issue
Block a user