@dv.nghiem/flowdeck 0.4.4 → 0.4.6
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/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/risk-analyst.d.ts.map +1 -1
- package/dist/dashboard/lib/state-reader.d.ts.map +1 -1
- package/dist/dashboard/server.mjs +22 -73
- package/dist/hooks/approval-hook.d.ts.map +1 -1
- package/dist/hooks/event-log-hook.d.ts +30 -0
- package/dist/hooks/event-log-hook.d.ts.map +1 -0
- package/dist/hooks/notifications.d.ts.map +1 -1
- package/dist/hooks/orchestrator-guard-hook.d.ts.map +1 -1
- package/dist/hooks/patch-trust.d.ts +0 -1
- package/dist/hooks/patch-trust.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +627 -1159
- package/dist/lib/impact-radar.d.ts.map +1 -1
- package/dist/lib/research-gate.d.ts +6 -2
- package/dist/lib/research-gate.d.ts.map +1 -1
- package/dist/services/agent-validator.d.ts +1 -1
- package/dist/services/agent-validator.d.ts.map +1 -1
- package/dist/services/event-logger.d.ts +18 -0
- package/dist/services/event-logger.d.ts.map +1 -0
- package/dist/services/supervisor-binding.d.ts.map +1 -1
- package/dist/services/token-metrics.d.ts +1 -1
- package/dist/services/workflow-scorecard.d.ts.map +1 -1
- package/dist/tools/delegate.d.ts +1 -2
- package/dist/tools/delegate.d.ts.map +1 -1
- package/dist/tools/run-pipeline.d.ts +1 -2
- package/dist/tools/run-pipeline.d.ts.map +1 -1
- package/docs/commands/fd-deploy-check.md +1 -5
- package/docs/commands/fd-reflect.md +8 -9
- package/docs/commands/fd-suggest.md +3 -4
- package/docs/concepts/architecture.md +0 -3
- package/docs/concepts/intelligence.md +2 -36
- package/docs/skills/index.md +0 -2
- package/package.json +2 -2
- package/src/commands/fd-deploy-check.md +1 -5
- package/src/commands/fd-reflect.md +4 -6
- package/src/commands/fd-suggest.md +3 -4
- package/src/skills/change-impact-radar/SKILL.md +3 -4
- package/src/skills/confidence-aware-planning/SKILL.md +0 -1
- package/src/skills/patch-trust-score/SKILL.md +3 -5
- package/dist/dashboard/lib/port-finder.test.d.ts +0 -2
- package/dist/dashboard/lib/port-finder.test.d.ts.map +0 -1
- package/dist/hooks/notifications.test.d.ts +0 -14
- package/dist/hooks/notifications.test.d.ts.map +0 -1
- package/dist/hooks/patch-trust.test.d.ts +0 -2
- package/dist/hooks/patch-trust.test.d.ts.map +0 -1
- package/dist/hooks/telemetry-hook.d.ts +0 -33
- package/dist/hooks/telemetry-hook.d.ts.map +0 -1
- package/dist/hooks/telemetry-hook.test.d.ts +0 -2
- package/dist/hooks/telemetry-hook.test.d.ts.map +0 -1
- package/dist/hooks/tool-guard.test.d.ts +0 -2
- package/dist/hooks/tool-guard.test.d.ts.map +0 -1
- package/dist/lib/research-gate.test.d.ts +0 -2
- package/dist/lib/research-gate.test.d.ts.map +0 -1
- package/dist/services/activity-reporter.d.ts +0 -96
- package/dist/services/activity-reporter.d.ts.map +0 -1
- package/dist/services/activity-reporter.test.d.ts +0 -2
- package/dist/services/activity-reporter.test.d.ts.map +0 -1
- package/dist/services/artifact-store.d.ts +0 -39
- package/dist/services/artifact-store.d.ts.map +0 -1
- package/dist/services/artifact-store.test.d.ts +0 -2
- package/dist/services/artifact-store.test.d.ts.map +0 -1
- package/dist/services/codegraph.test.d.ts +0 -2
- package/dist/services/codegraph.test.d.ts.map +0 -1
- package/dist/services/command-validator.test.d.ts +0 -2
- package/dist/services/command-validator.test.d.ts.map +0 -1
- package/dist/services/context-assembler.d.ts +0 -29
- package/dist/services/context-assembler.d.ts.map +0 -1
- package/dist/services/context-assembler.test.d.ts +0 -2
- package/dist/services/context-assembler.test.d.ts.map +0 -1
- package/dist/services/cost-budget.d.ts +0 -53
- package/dist/services/cost-budget.d.ts.map +0 -1
- package/dist/services/cost-budget.test.d.ts +0 -2
- package/dist/services/cost-budget.test.d.ts.map +0 -1
- package/dist/services/cost-estimator.test.d.ts +0 -2
- package/dist/services/cost-estimator.test.d.ts.map +0 -1
- package/dist/services/draft-verifier.d.ts +0 -48
- package/dist/services/draft-verifier.d.ts.map +0 -1
- package/dist/services/draft-verifier.test.d.ts +0 -2
- package/dist/services/draft-verifier.test.d.ts.map +0 -1
- package/dist/services/governance.test.d.ts +0 -11
- package/dist/services/governance.test.d.ts.map +0 -1
- package/dist/services/index.d.ts +0 -25
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/lazy-rule-loader.test.d.ts +0 -23
- package/dist/services/lazy-rule-loader.test.d.ts.map +0 -1
- package/dist/services/model-router-ext.test.d.ts +0 -2
- package/dist/services/model-router-ext.test.d.ts.map +0 -1
- package/dist/services/model-router.test.d.ts +0 -2
- package/dist/services/model-router.test.d.ts.map +0 -1
- package/dist/services/policy-compiler.d.ts +0 -27
- package/dist/services/policy-compiler.d.ts.map +0 -1
- package/dist/services/preflight-explorer.test.d.ts +0 -25
- package/dist/services/preflight-explorer.test.d.ts.map +0 -1
- package/dist/services/prompt-cache-ext.test.d.ts +0 -2
- package/dist/services/prompt-cache-ext.test.d.ts.map +0 -1
- package/dist/services/prompt-cache.test.d.ts +0 -2
- package/dist/services/prompt-cache.test.d.ts.map +0 -1
- package/dist/services/quick-router.test.d.ts +0 -13
- package/dist/services/quick-router.test.d.ts.map +0 -1
- package/dist/services/recommended-question.test.d.ts +0 -2
- package/dist/services/recommended-question.test.d.ts.map +0 -1
- package/dist/services/rtk-manager.test.d.ts +0 -2
- package/dist/services/rtk-manager.test.d.ts.map +0 -1
- package/dist/services/rtk-policy.test.d.ts +0 -2
- package/dist/services/rtk-policy.test.d.ts.map +0 -1
- package/dist/services/rule-engine.d.ts +0 -29
- package/dist/services/rule-engine.d.ts.map +0 -1
- package/dist/services/rule-engine.test.d.ts +0 -2
- package/dist/services/rule-engine.test.d.ts.map +0 -1
- package/dist/services/services.test.d.ts +0 -2
- package/dist/services/services.test.d.ts.map +0 -1
- package/dist/services/supervisor.test.d.ts +0 -14
- package/dist/services/supervisor.test.d.ts.map +0 -1
- package/dist/services/task-batcher.d.ts +0 -48
- package/dist/services/task-batcher.d.ts.map +0 -1
- package/dist/services/task-batcher.test.d.ts +0 -2
- package/dist/services/task-batcher.test.d.ts.map +0 -1
- package/dist/services/telemetry.d.ts +0 -48
- package/dist/services/telemetry.d.ts.map +0 -1
- package/dist/services/token-budget.d.ts +0 -44
- package/dist/services/token-budget.d.ts.map +0 -1
- package/dist/services/token-budget.test.d.ts +0 -2
- package/dist/services/token-budget.test.d.ts.map +0 -1
- package/dist/services/token-metrics-ext.test.d.ts +0 -2
- package/dist/services/token-metrics-ext.test.d.ts.map +0 -1
- package/dist/services/token-metrics.test.d.ts +0 -2
- package/dist/services/token-metrics.test.d.ts.map +0 -1
- package/dist/tools/agent-dispatch.test.d.ts +0 -2
- package/dist/tools/agent-dispatch.test.d.ts.map +0 -1
- package/dist/tools/codebase-index.test.d.ts +0 -2
- package/dist/tools/codebase-index.test.d.ts.map +0 -1
- package/dist/tools/context-generator.d.ts +0 -3
- package/dist/tools/context-generator.d.ts.map +0 -1
- package/dist/tools/create-skill.d.ts +0 -3
- package/dist/tools/create-skill.d.ts.map +0 -1
- package/dist/tools/dispatch-routing.test.d.ts +0 -2
- package/dist/tools/dispatch-routing.test.d.ts.map +0 -1
- package/dist/tools/failure-replay.test.d.ts +0 -2
- package/dist/tools/failure-replay.test.d.ts.map +0 -1
- package/dist/tools/repo-memory.test.d.ts +0 -2
- package/dist/tools/repo-memory.test.d.ts.map +0 -1
- package/dist/tools/volatility-map.d.ts +0 -18
- package/dist/tools/volatility-map.d.ts.map +0 -1
- package/dist/tools/volatility-map.test.d.ts +0 -2
- package/dist/tools/volatility-map.test.d.ts.map +0 -1
- package/dist/tools/workspace-state.d.ts +0 -3
- package/dist/tools/workspace-state.d.ts.map +0 -1
- package/src/skills/volatility-map/SKILL.md +0 -52
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Activity Reporter
|
|
3
|
-
*
|
|
4
|
-
* Surfaces tool lifecycle events and workflow-stage progress to the user
|
|
5
|
-
* in real-time via two channels:
|
|
6
|
-
* 1. appLog (client.app.log) — persistent server log visible in the log panel
|
|
7
|
-
* 2. toast (client.tui.showToast) — ephemeral in-TUI notifications for key events
|
|
8
|
-
*
|
|
9
|
-
* Design goals:
|
|
10
|
-
* - Every significant tool call emits a concise user-visible log line
|
|
11
|
-
* - Key events (failures, stage transitions, waiting states) also show TUI toasts
|
|
12
|
-
* - Heartbeat toast fires if a tracked tool runs > HEARTBEAT_INTERVAL_MS
|
|
13
|
-
* - Normal mode: short summaries (no raw dumps)
|
|
14
|
-
* - Debug mode (FLOWDECK_DEBUG=true): full inputs/outputs + trace metadata
|
|
15
|
-
* - Retries, fallbacks, cache hits, and skips are all individually logged
|
|
16
|
-
*/
|
|
17
|
-
/** Interval before the first "still running" heartbeat toast (ms) */
|
|
18
|
-
export declare const HEARTBEAT_INTERVAL_MS = 15000;
|
|
19
|
-
export type ToastVariant = "info" | "success" | "warning" | "error";
|
|
20
|
-
/** Injectable toast function — wraps client.tui.showToast in production. */
|
|
21
|
-
export type ToastFn = (msg: string, variant: ToastVariant, duration?: number) => void;
|
|
22
|
-
export declare function isDebugMode(): boolean;
|
|
23
|
-
/** Trim text to maxLen, appending ellipsis when truncated */
|
|
24
|
-
export declare function summarize(text: string, maxLen?: number): string;
|
|
25
|
-
/** Format milliseconds as human-readable "42ms" or "3.2s" */
|
|
26
|
-
export declare function fmtDuration(ms: number): string;
|
|
27
|
-
export interface ActivityMeta {
|
|
28
|
-
session_id?: string;
|
|
29
|
-
run_id?: string;
|
|
30
|
-
command?: string;
|
|
31
|
-
stage?: string;
|
|
32
|
-
agent?: string;
|
|
33
|
-
retry_count?: number;
|
|
34
|
-
workflow_id?: string;
|
|
35
|
-
tool?: string;
|
|
36
|
-
}
|
|
37
|
-
export declare class ActivityReporter {
|
|
38
|
-
private readonly log;
|
|
39
|
-
private readonly toastFn?;
|
|
40
|
-
/** correlationKey → start epoch ms */
|
|
41
|
-
private readonly startTimes;
|
|
42
|
-
/** correlationKey → heartbeat interval handle */
|
|
43
|
-
private readonly heartbeats;
|
|
44
|
-
constructor(log: (msg: string) => void, toast?: ToastFn);
|
|
45
|
-
private emit;
|
|
46
|
-
/** Send an ephemeral toast to the TUI. Duration is in milliseconds. */
|
|
47
|
-
private toastNow;
|
|
48
|
-
/**
|
|
49
|
-
* Record start time against a correlation key and start a heartbeat interval.
|
|
50
|
-
* If the tracked operation hasn't finished within HEARTBEAT_INTERVAL_MS, a
|
|
51
|
-
* "still running" log line and toast are emitted to prevent the TUI from
|
|
52
|
-
* looking frozen during long-running tools.
|
|
53
|
-
*/
|
|
54
|
-
trackStart(key: string): void;
|
|
55
|
-
/**
|
|
56
|
-
* Consume the start time for key, cancel its heartbeat, and return elapsed ms.
|
|
57
|
-
* Returns undefined if key was never tracked.
|
|
58
|
-
*/
|
|
59
|
-
elapsedMs(key: string): number | undefined;
|
|
60
|
-
/** Emitted when a tool call begins. */
|
|
61
|
-
reportToolStarted(tool: string, inputSummary: string, meta?: ActivityMeta): void;
|
|
62
|
-
/** Emitted when a tool call completes successfully. */
|
|
63
|
-
reportToolCompleted(tool: string, durationMs: number | undefined, resultSummary: string, meta?: ActivityMeta): void;
|
|
64
|
-
/** Emitted when a tool call fails (after all retries are exhausted). */
|
|
65
|
-
reportToolFailed(tool: string, durationMs: number | undefined, error: string, meta?: ActivityMeta): void;
|
|
66
|
-
/** Emitted each time a tool call is retried. */
|
|
67
|
-
reportToolRetried(tool: string, attempt: number, reason: string, meta?: ActivityMeta): void;
|
|
68
|
-
/** Emitted when the system falls back from one tool/strategy to another. */
|
|
69
|
-
reportToolFallback(fromTool: string, toTool: string, reason: string, meta?: ActivityMeta): void;
|
|
70
|
-
/** Emitted when a tool call is satisfied from the prompt cache. */
|
|
71
|
-
reportCacheHit(tool: string, agent: string, meta?: ActivityMeta): void;
|
|
72
|
-
/** Emitted when a tool or step is intentionally skipped. */
|
|
73
|
-
reportSkipped(tool: string, reason: string, meta?: ActivityMeta): void;
|
|
74
|
-
/**
|
|
75
|
-
* Report high-level workflow stage transitions so users can see
|
|
76
|
-
* which phase of a long-running workflow is currently active.
|
|
77
|
-
* Key status values (started/complete/failed/waiting) also emit TUI toasts.
|
|
78
|
-
*/
|
|
79
|
-
reportStageProgress(stage: string, status: "started" | "running" | "complete" | "failed" | "waiting", detail?: string, meta?: ActivityMeta): void;
|
|
80
|
-
/**
|
|
81
|
-
* Emitted when the permission.ask hook fires — the system is blocked
|
|
82
|
-
* on user approval. Shows a prominent warning toast.
|
|
83
|
-
*/
|
|
84
|
-
reportWaitingForApproval(tool: string, _meta?: ActivityMeta): void;
|
|
85
|
-
/**
|
|
86
|
-
* Emitted when a user command begins execution.
|
|
87
|
-
* Shows a brief info toast so the user knows the system heard them.
|
|
88
|
-
*/
|
|
89
|
-
reportCommandStarted(command: string): void;
|
|
90
|
-
/**
|
|
91
|
-
* Emitted when a user command completes (session.idle fires after it).
|
|
92
|
-
* Shows a success toast with a note about file modifications.
|
|
93
|
-
*/
|
|
94
|
-
reportCommandCompleted(command: string, hasEdits: boolean): void;
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=activity-reporter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-reporter.d.ts","sourceRoot":"","sources":["../../src/services/activity-reporter.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-reporter.test.d.ts","sourceRoot":"","sources":["../../src/services/activity-reporter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare const ARTIFACT_SUMMARY_MAX_CHARS = 500;
|
|
2
|
-
export interface Artifact {
|
|
3
|
-
id: string;
|
|
4
|
-
agent: string;
|
|
5
|
-
stage: string;
|
|
6
|
-
summary: string;
|
|
7
|
-
content: string;
|
|
8
|
-
content_chars: number;
|
|
9
|
-
state_version: number;
|
|
10
|
-
index_version: number;
|
|
11
|
-
created_at: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ArtifactRef {
|
|
14
|
-
id: string;
|
|
15
|
-
summary: string;
|
|
16
|
-
}
|
|
17
|
-
/** Content-hash of the output text (24-char hex prefix). */
|
|
18
|
-
export declare function contentHash(content: string): string;
|
|
19
|
-
/** Auto-generate a short summary from content (first ARTIFACT_SUMMARY_MAX_CHARS chars, stripped). */
|
|
20
|
-
export declare function summarizeContent(content: string): string;
|
|
21
|
-
/**
|
|
22
|
-
* Store an artifact and return a ref (id + summary) for carry-forward.
|
|
23
|
-
* On storage failure, returns a ref with the summary only (id may be recomputed later).
|
|
24
|
-
*/
|
|
25
|
-
export declare function storeArtifact(dir: string, agent: string, stage: string, content: string, stateVersion: number, indexVersion: number): ArtifactRef;
|
|
26
|
-
/**
|
|
27
|
-
* Retrieve an artifact by ID, enforcing version consistency.
|
|
28
|
-
* Returns null when: not found, stateVersion/indexVersion mismatch, or corrupt file.
|
|
29
|
-
*/
|
|
30
|
-
export declare function getArtifact(dir: string, id: string, stateVersion: number, indexVersion: number): Artifact | null;
|
|
31
|
-
/**
|
|
32
|
-
* Resolve `artifact:<id>` tokens in a text string, replacing each with the
|
|
33
|
-
* artifact's full content. Tokens whose artifact is not found or stale are
|
|
34
|
-
* replaced with a `[artifact:<id> not found]` placeholder.
|
|
35
|
-
*/
|
|
36
|
-
export declare function resolveArtifactRefs(dir: string, text: string, stateVersion: number, indexVersion: number): string;
|
|
37
|
-
/** Format an ArtifactRef for carry-forward in pipeline prompts. */
|
|
38
|
-
export declare function formatArtifactRef(ref: ArtifactRef): string;
|
|
39
|
-
//# sourceMappingURL=artifact-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-store.d.ts","sourceRoot":"","sources":["../../src/services/artifact-store.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAE7C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;CAChB;AAUD,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,WAAW,CAsBb;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,QAAQ,GAAG,IAAI,CAUjB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,MAAM,CAKR;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CAE1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-store.test.d.ts","sourceRoot":"","sources":["../../src/services/artifact-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codegraph.test.d.ts","sourceRoot":"","sources":["../../src/services/codegraph.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command-validator.test.d.ts","sourceRoot":"","sources":["../../src/services/command-validator.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface StageContext {
|
|
2
|
-
stage: string;
|
|
3
|
-
/** Concise human-readable summary for injection into model prompts */
|
|
4
|
-
compact_summary: string;
|
|
5
|
-
/** Current state version — for cache invalidation */
|
|
6
|
-
state_version: number;
|
|
7
|
-
/** Current codebase index version — for cache invalidation */
|
|
8
|
-
index_version: number;
|
|
9
|
-
/** Structured fields relevant to this stage */
|
|
10
|
-
fields: Record<string, unknown>;
|
|
11
|
-
/** Was this loaded from cache (same summaryVersions as last call)? */
|
|
12
|
-
from_cache: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Assembles a minimal, stage-specific context for prompt injection.
|
|
16
|
-
*
|
|
17
|
-
* Uses in-memory cache keyed by (stage, dir) + (stateVersion, indexVersion).
|
|
18
|
-
* Safe for concurrent readers — no file writes.
|
|
19
|
-
*
|
|
20
|
-
* @param dir - project root directory
|
|
21
|
-
* @param stage - current workflow stage
|
|
22
|
-
* @returns StageContext with compact_summary and fields
|
|
23
|
-
*/
|
|
24
|
-
export declare function assembleStageContext(dir: string, stage: string): StageContext;
|
|
25
|
-
/** Explicitly invalidate the context cache for a directory (call after state writes). */
|
|
26
|
-
export declare function invalidateContextCache(dir: string): void;
|
|
27
|
-
/** Return current cache entry count (for tests/telemetry). */
|
|
28
|
-
export declare function getContextCacheSize(): number;
|
|
29
|
-
//# sourceMappingURL=context-assembler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-assembler.d.ts","sourceRoot":"","sources":["../../src/services/context-assembler.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAA;IACvB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAA;IACrB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAA;IACrB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,sEAAsE;IACtE,UAAU,EAAE,OAAO,CAAA;CACpB;AAuGD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAmC7E;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAIxD;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-assembler.test.d.ts","sourceRoot":"","sources":["../../src/services/context-assembler.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cost Budget Service
|
|
3
|
-
*
|
|
4
|
-
* Enforces per-workflow cost and token ceilings.
|
|
5
|
-
* Complements delegation-budget.ts (which counts calls/retries/depth) by tracking
|
|
6
|
-
* estimated USD spend and token consumption across a workflow run.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* const result = checkCostBudget(dir, workflowId, { inputTokensDelta: 5000, costUSDDelta: 0.015 }, cfg)
|
|
10
|
-
* if (result.status === "exhausted") throw new Error(result.message)
|
|
11
|
-
*/
|
|
12
|
-
import { loadFlowDeckConfig } from "../config";
|
|
13
|
-
export interface CostBudgetState {
|
|
14
|
-
workflow_id: string;
|
|
15
|
-
run_id: string;
|
|
16
|
-
started_at: string;
|
|
17
|
-
total_input_tokens: number;
|
|
18
|
-
total_output_tokens: number;
|
|
19
|
-
total_est_cost_usd: number;
|
|
20
|
-
call_count: number;
|
|
21
|
-
}
|
|
22
|
-
export type CostBudgetStatus = "ok" | "warned" | "exhausted";
|
|
23
|
-
export interface CostBudgetCheckResult {
|
|
24
|
-
status: CostBudgetStatus;
|
|
25
|
-
message: string;
|
|
26
|
-
state: CostBudgetState;
|
|
27
|
-
}
|
|
28
|
-
export interface CostDelta {
|
|
29
|
-
inputTokensDelta?: number;
|
|
30
|
-
outputTokensDelta?: number;
|
|
31
|
-
costUSDDelta?: number;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Apply a delta to the running budget state and check against configured limits.
|
|
35
|
-
* If no governance.costBudget is configured, always returns "ok".
|
|
36
|
-
*
|
|
37
|
-
* @param dir - project directory (for loading config and persisting state)
|
|
38
|
-
* @param workflowId - e.g. the GSD run id or workflow name
|
|
39
|
-
* @param runId - a unique id for this invocation (e.g. sessionID)
|
|
40
|
-
* @param delta - tokens/cost consumed by the current call
|
|
41
|
-
* @param cfg - optional pre-loaded budget config (avoids re-reading flowdeck.json)
|
|
42
|
-
*/
|
|
43
|
-
export declare function checkCostBudget(dir: string, workflowId: string, runId: string, delta: CostDelta, cfg?: ReturnType<typeof loadFlowDeckConfig>): CostBudgetCheckResult;
|
|
44
|
-
/**
|
|
45
|
-
* Read the current accumulated state for a workflow run without applying a delta.
|
|
46
|
-
* Returns null if no state exists yet.
|
|
47
|
-
*/
|
|
48
|
-
export declare function getCostBudgetState(dir: string, workflowId: string, runId: string): CostBudgetState | null;
|
|
49
|
-
/**
|
|
50
|
-
* Reset the budget state for a workflow run (e.g. at start of a new run).
|
|
51
|
-
*/
|
|
52
|
-
export declare function resetCostBudget(dir: string, workflowId: string, runId: string): void;
|
|
53
|
-
//# sourceMappingURL=cost-budget.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cost-budget.d.ts","sourceRoot":"","sources":["../../src/services/cost-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAI9C,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAA;AAE5D,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,gBAAgB,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;CACvB;AAED,MAAM,WAAW,SAAS;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AA8CD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,EAChB,GAAG,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,GAC1C,qBAAqB,CAwDvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,eAAe,GAAG,IAAI,CAGxB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAIpF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cost-budget.test.d.ts","sourceRoot":"","sources":["../../src/services/cost-budget.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cost-estimator.test.d.ts","sourceRoot":"","sources":["../../src/services/cost-estimator.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Draft Verifier
|
|
3
|
-
*
|
|
4
|
-
* Implements draft-then-verify for agent calls. A cheap draft is checked
|
|
5
|
-
* against deterministic verifiers before deciding whether to escalate to
|
|
6
|
-
* an expensive model call.
|
|
7
|
-
*
|
|
8
|
-
* PHASE 1: Only rule-based (deterministic) verifiers are supported.
|
|
9
|
-
* Model-based verification is explicitly excluded to avoid turning 1 call into 2.
|
|
10
|
-
*
|
|
11
|
-
* Usage pattern:
|
|
12
|
-
* 1. Run cheap/draft agent → get draft response
|
|
13
|
-
* 2. Call verifyDraft(draft, verifiers)
|
|
14
|
-
* 3. If decision.accepted → return draft, skip expensive agent
|
|
15
|
-
* 4. If !decision.accepted → call expensive agent
|
|
16
|
-
*/
|
|
17
|
-
export type BuiltinVerifierType = "min_length" | "is_json" | "contains_key" | "matches_regex" | "is_nonempty" | "no_error_markers";
|
|
18
|
-
export interface BuiltinVerifier {
|
|
19
|
-
type: BuiltinVerifierType;
|
|
20
|
-
/** min_length: minimum character count after trimming */
|
|
21
|
-
min_chars?: number;
|
|
22
|
-
/** contains_key: substring that must appear in the response */
|
|
23
|
-
required_key?: string;
|
|
24
|
-
/** matches_regex: regex pattern string */
|
|
25
|
-
pattern?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface VerificationResult {
|
|
28
|
-
passed: boolean;
|
|
29
|
-
verifier: BuiltinVerifierType;
|
|
30
|
-
reason: string;
|
|
31
|
-
}
|
|
32
|
-
export interface DraftVerifyDecision {
|
|
33
|
-
/** True if all verifiers passed and the draft is acceptable. */
|
|
34
|
-
accepted: boolean;
|
|
35
|
-
verifications: VerificationResult[];
|
|
36
|
-
failures: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Run all verifiers against a draft response.
|
|
40
|
-
* ALL verifiers must pass for the draft to be accepted.
|
|
41
|
-
*/
|
|
42
|
-
export declare function verifyDraft(draft: string, verifiers: BuiltinVerifier[]): DraftVerifyDecision;
|
|
43
|
-
/**
|
|
44
|
-
* Return a default set of verifiers for a given task output type.
|
|
45
|
-
* Use as a starting point — callers can extend or replace.
|
|
46
|
-
*/
|
|
47
|
-
export declare function defaultVerifiers(taskType: "json_response" | "prose_response" | "classification"): BuiltinVerifier[];
|
|
48
|
-
//# sourceMappingURL=draft-verifier.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"draft-verifier.d.ts","sourceRoot":"","sources":["../../src/services/draft-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,mBAAmB,GAC3B,YAAY,GACZ,SAAS,GACT,cAAc,GACd,eAAe,GACf,aAAa,GACb,kBAAkB,CAAA;AAEtB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAA;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,kBAAkB,EAAE,CAAA;IACnC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAiBD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,mBAAmB,CAI5F;AAkFD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAC9D,eAAe,EAAE,CAsBnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"draft-verifier.test.d.ts","sourceRoot":"","sources":["../../src/services/draft-verifier.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"governance.test.d.ts","sourceRoot":"","sources":["../../src/services/governance.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
package/dist/services/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export * from "./telemetry";
|
|
2
|
-
export * from "./run-trace";
|
|
3
|
-
export * from "./approval-manager";
|
|
4
|
-
export * from "./agent-performance";
|
|
5
|
-
export * from "./policy-compiler";
|
|
6
|
-
export * from "./agent-contract-registry";
|
|
7
|
-
export * from "./agent-validator";
|
|
8
|
-
export * from "./agent-trace-graph";
|
|
9
|
-
export * from "./delegation-budget";
|
|
10
|
-
export * from "./deadlock-detector";
|
|
11
|
-
export * from "./workflow-scorecard";
|
|
12
|
-
export * from "./token-metrics";
|
|
13
|
-
export * from "./model-router";
|
|
14
|
-
export * from "./context-assembler";
|
|
15
|
-
export * from "./prompt-cache";
|
|
16
|
-
export * from "./rule-engine";
|
|
17
|
-
export * from "./artifact-store";
|
|
18
|
-
export * from "./task-batcher";
|
|
19
|
-
export * from "./draft-verifier";
|
|
20
|
-
export * from "./token-budget";
|
|
21
|
-
export * from "./cost-estimator";
|
|
22
|
-
export * from "./cost-budget";
|
|
23
|
-
export * from "./rtk-manager";
|
|
24
|
-
export * from "./rtk-policy";
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lazy Rule Loader Tests
|
|
3
|
-
*
|
|
4
|
-
* Covers:
|
|
5
|
-
* - parseFrontmatter: correctly parses always_on, stages, languages arrays, and description
|
|
6
|
-
* - discoverRules: finds all .md files, caches results, skips README.md
|
|
7
|
-
* - selectRulePaths: always_on rules always included
|
|
8
|
-
* - selectRulePaths: language-mismatched rules skipped
|
|
9
|
-
* - selectRulePaths: language-matched rules included
|
|
10
|
-
* - selectRulePaths: stage filtering when stage is provided
|
|
11
|
-
* - selectRulePaths: stage-restricted rules still included when stage is absent
|
|
12
|
-
* - selectRulePaths: rules without frontmatter treated as always_on (fail-safe)
|
|
13
|
-
* - getStartupRulePaths: returns paths only for selected rules
|
|
14
|
-
* - detectProjectLanguages: detects TypeScript via tsconfig.json
|
|
15
|
-
* - detectProjectLanguages: detects Python via requirements.txt
|
|
16
|
-
* - detectProjectLanguages: detects Go via go.mod
|
|
17
|
-
* - detectProjectLanguages: detects Rust via Cargo.toml
|
|
18
|
-
* - buildSelectionDiagnostics: includes discovered/selected/skipped counts
|
|
19
|
-
* - invalidateRuleCache: clears cached discovery results
|
|
20
|
-
* - repeated loading suppressed (same dir returns cached metadata)
|
|
21
|
-
*/
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=lazy-rule-loader.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-rule-loader.test.d.ts","sourceRoot":"","sources":["../../src/services/lazy-rule-loader.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-router-ext.test.d.ts","sourceRoot":"","sources":["../../src/services/model-router-ext.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-router.test.d.ts","sourceRoot":"","sources":["../../src/services/model-router.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface PolicyContext {
|
|
2
|
-
command?: string;
|
|
3
|
-
file_path?: string;
|
|
4
|
-
change_description?: string;
|
|
5
|
-
tool?: string;
|
|
6
|
-
risk_score?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface PolicyViolation {
|
|
9
|
-
policy_id: string;
|
|
10
|
-
policy_name: string;
|
|
11
|
-
rule: string;
|
|
12
|
-
trigger: string;
|
|
13
|
-
severity: "block" | "warn";
|
|
14
|
-
}
|
|
15
|
-
export declare function evaluatePolicies(dir: string, ctx: PolicyContext): PolicyViolation[];
|
|
16
|
-
export interface ProposedPolicy {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
trigger: string;
|
|
20
|
-
rule: string;
|
|
21
|
-
source: "learned";
|
|
22
|
-
failure_count: number;
|
|
23
|
-
rationale: string;
|
|
24
|
-
}
|
|
25
|
-
export declare function learnFromFailure(failure_type: string, affected_paths: string[], root_cause?: string): ProposedPolicy | null;
|
|
26
|
-
export declare function formatViolations(violations: PolicyViolation[]): string;
|
|
27
|
-
//# sourceMappingURL=policy-compiler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"policy-compiler.d.ts","sourceRoot":"","sources":["../../src/services/policy-compiler.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAA;CAC3B;AAiCD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,eAAe,EAAE,CA8BnF;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;CAClB;AA+FD,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,MAAM,EAAE,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,cAAc,GAAG,IAAI,CAmBvB;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,MAAM,CAUtE"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preflight Explorer Tests
|
|
3
|
-
*
|
|
4
|
-
* Covers:
|
|
5
|
-
* - exploreRepo: discovers commands, agents, skills, tech stack from filesystem
|
|
6
|
-
* - canAnswerFromEvidence: correctly identifies suppressible questions
|
|
7
|
-
* - shouldSuppressQuestion: suppresses answered / duplicate questions
|
|
8
|
-
* - deriveTaskContext: narrows findings to task-relevant context
|
|
9
|
-
* - refineClassification: resolves ambiguous classification via evidence
|
|
10
|
-
* - createQuestionGuard: tracks asked questions and prevents duplicates
|
|
11
|
-
* - filterQuestions: returns only questions that pass the guard
|
|
12
|
-
* - needsSupervisorClarification: returns false when all questions are answered
|
|
13
|
-
* - classifyTaskWithContext: uses exploration to resolve ambiguity
|
|
14
|
-
* - createQuickRunState: persists exploration snapshot
|
|
15
|
-
* - /fd-quick performs codebase exploration before asking questions
|
|
16
|
-
* - /fd-discuss performs codebase exploration before asking questions
|
|
17
|
-
* - repo evidence prevents unnecessary human questions
|
|
18
|
-
* - supervisor-agent receives only genuine ambiguity
|
|
19
|
-
* - worker agents do not ask ad hoc questions
|
|
20
|
-
* - feature/bug/UI/docs tasks route correctly after preflight
|
|
21
|
-
* - exploration results are stored and reused
|
|
22
|
-
* - repeated question suppression works
|
|
23
|
-
*/
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=preflight-explorer.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preflight-explorer.test.d.ts","sourceRoot":"","sources":["../../src/services/preflight-explorer.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-cache-ext.test.d.ts","sourceRoot":"","sources":["../../src/services/prompt-cache-ext.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-cache.test.d.ts","sourceRoot":"","sources":["../../src/services/prompt-cache.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quick Router Tests
|
|
3
|
-
*
|
|
4
|
-
* Covers:
|
|
5
|
-
* - classifyTask: correctly classifies feature, bugfix, ui-feature, docs, simple, ambiguous
|
|
6
|
-
* - buildStageSequence: returns correct ordered stages for each task type
|
|
7
|
-
* - getNextStage: returns correct next stage and handles completed / blocked states
|
|
8
|
-
* - createQuickRunState: initialises state correctly
|
|
9
|
-
* - /fd-quick routing contracts (supervisor integration points are tested as
|
|
10
|
-
* integration-level expectations on the returned stage sequences)
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=quick-router.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-router.test.d.ts","sourceRoot":"","sources":["../../src/services/quick-router.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recommended-question.test.d.ts","sourceRoot":"","sources":["../../src/services/recommended-question.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rtk-manager.test.d.ts","sourceRoot":"","sources":["../../src/services/rtk-manager.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rtk-policy.test.d.ts","sourceRoot":"","sources":["../../src/services/rtk-policy.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type CheckType = "file_exists" | "json_valid" | "detect_language" | "classify_command" | "is_nonempty" | "contains_keyword";
|
|
2
|
-
export interface CheckResult<T> {
|
|
3
|
-
type: CheckType;
|
|
4
|
-
value: T;
|
|
5
|
-
/** Always true — signals this result came from deterministic code, not a model. */
|
|
6
|
-
deterministic: true;
|
|
7
|
-
}
|
|
8
|
-
/** Check whether a file path exists on disk. */
|
|
9
|
-
export declare function checkFileExists(filePath: string): CheckResult<boolean>;
|
|
10
|
-
export interface JSONValidResult {
|
|
11
|
-
valid: boolean;
|
|
12
|
-
error?: string;
|
|
13
|
-
}
|
|
14
|
-
/** Check whether a string is valid JSON. */
|
|
15
|
-
export declare function checkJSONValid(text: string): CheckResult<JSONValidResult>;
|
|
16
|
-
/** Detect programming language from file extension. Returns null for unknown extensions. */
|
|
17
|
-
export declare function detectLanguage(filename: string): CheckResult<string | null>;
|
|
18
|
-
export type CommandClass = "read" | "write" | "delete" | "run" | "navigate" | "unknown";
|
|
19
|
-
/** Classify a tool/command name into its operational class. */
|
|
20
|
-
export declare function classifyCommandType(command: string): CheckResult<CommandClass>;
|
|
21
|
-
/** Check whether a string is non-empty after trimming. */
|
|
22
|
-
export declare function checkIsNonEmpty(text: string): CheckResult<boolean>;
|
|
23
|
-
export interface KeywordSearchResult {
|
|
24
|
-
found: boolean;
|
|
25
|
-
matched?: string;
|
|
26
|
-
}
|
|
27
|
-
/** Check whether a string contains any of the given keywords (case-insensitive). */
|
|
28
|
-
export declare function checkContainsKeyword(text: string, keywords: string[]): CheckResult<KeywordSearchResult>;
|
|
29
|
-
//# sourceMappingURL=rule-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-engine.d.ts","sourceRoot":"","sources":["../../src/services/rule-engine.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,SAAS,GACjB,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,GACb,kBAAkB,CAAA;AAEtB,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAA;IACf,KAAK,EAAE,CAAC,CAAA;IACR,mFAAmF;IACnF,aAAa,EAAE,IAAI,CAAA;CACpB;AAID,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAEtE;AAID,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,4CAA4C;AAC5C,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,eAAe,CAAC,CAWzE;AA4BD,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAG3E;AAID,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,UAAU,GACV,SAAS,CAAA;AAUb,+DAA+D;AAC/D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAQ9E;AAID,0DAA0D;AAC1D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAElE;AAID,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAAE,GACjB,WAAW,CAAC,mBAAmB,CAAC,CAQlC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-engine.test.d.ts","sourceRoot":"","sources":["../../src/services/rule-engine.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"services.test.d.ts","sourceRoot":"","sources":["../../src/services/services.test.ts"],"names":[],"mappings":""}
|