@capstone-nomos/cli 0.1.6 → 0.1.7
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.
|
@@ -37,6 +37,9 @@ export const DENY_SELF_OWNED = {
|
|
|
37
37
|
message: 'NOMOS: this decision belongs to your own role, so it was not sent to anyone. Decide it yourself based on the spec and existing code, ' +
|
|
38
38
|
'continue the task, and record the decision with publish_note (kind DECIDED) so others follow it.',
|
|
39
39
|
};
|
|
40
|
+
// 답을 기다리는 동안 서버에 묻는 간격. 사람이 답하는 데 몇십 초~몇 분이 걸려 2초는 지나치게 잦았다(대표 결정 5초).
|
|
41
|
+
// MCP 서버는 Claude Code가 띄운 별도 프로세스라 웹소켓을 따로 붙이는 이득이 작다 — 실행 안에서 기다리는 3분 동안 최대 36회.
|
|
42
|
+
export const QUESTION_POLL_MS = 5_000;
|
|
40
43
|
// AskUserQuestion 하나를 처리한다: 서버에 올리고 답(또는 만료)까지 기다려 Claude Code에 돌려줄 결과를 만든다.
|
|
41
44
|
// 답은 원래 입력에 answers만 붙여 돌려준다 — 다른 필드는 손대지 않는다.
|
|
42
45
|
export async function handleAskUserQuestion(input, deps) {
|
|
@@ -57,7 +60,7 @@ export async function handleAskUserQuestion(input, deps) {
|
|
|
57
60
|
if (now() - started >= deps.maxWaitMs)
|
|
58
61
|
return denyUnanswered('No answer arrived in time.', texts);
|
|
59
62
|
await deps.onWaiting?.(now() - started);
|
|
60
|
-
await deps.sleep(deps.pollMs ??
|
|
63
|
+
await deps.sleep(deps.pollMs ?? QUESTION_POLL_MS);
|
|
61
64
|
state = await deps.get(asked.id);
|
|
62
65
|
}
|
|
63
66
|
if ((state.status === 'answered' || state.status === 'agent_answered') && state.answers) {
|