MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getPlanTimeoutSeconds

Function getPlanTimeoutSeconds

apps/opencode-plugin/index.ts:334–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

332 }
333
334 function getPlanTimeoutSeconds(): number | null {
335 const raw = process.env.PLANNOTATOR_PLAN_TIMEOUT_SECONDS?.trim();
336 if (!raw) return DEFAULT_PLAN_TIMEOUT_SECONDS;
337
338 const parsed = Number.parseInt(raw, 10);
339 if (!Number.isFinite(parsed) || parsed < 0) {
340 console.error(
341 `[Plannotator] Invalid PLANNOTATOR_PLAN_TIMEOUT_SECONDS="${raw}". Using default ${DEFAULT_PLAN_TIMEOUT_SECONDS}s.`
342 );
343 return DEFAULT_PLAN_TIMEOUT_SECONDS;
344 }
345
346 if (parsed === 0) return null;
347 return parsed;
348 }
349
350 function allowSubagents(): boolean {
351 const val = process.env.PLANNOTATOR_ALLOW_SUBAGENTS?.trim();

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected