Skip to content

Commit 21997e5

Browse files
committed
refactor(dashboard-agent): remove unused exports
1 parent 1f76d99 commit 21997e5

14 files changed

Lines changed: 22 additions & 29 deletions

internal-packages/dashboard-agent/src/compaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Write a summary in under 400 words, as notes rather than prose. Keep, in this or
7474
Drop tool mechanics, retries, and anything already superseded. Do not add advice, and do not invent anything that is not in the transcript. Everything you write is a record of what the transcript said, not a claim about the present.`;
7575

7676
/** A summary that reads as a summary, and never as the user's next question. */
77-
export function summaryMessage(summary: string, durableState?: string): ModelMessage {
77+
function summaryMessage(summary: string, durableState?: string): ModelMessage {
7878
return {
7979
role: "user",
8080
content: durableState
@@ -116,7 +116,7 @@ export function shouldCompactConversation(event: {
116116
* The state a summary may not swallow
117117
* ------------------------------------------------------------------ */
118118

119-
export type PinnedInvestigation = {
119+
type PinnedInvestigation = {
120120
id: string;
121121
title: string;
122122
outcome: string;

internal-packages/dashboard-agent/src/eval-policy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const DEFAULT_EVAL_SAMPLE_RATE = 0.1;
2424
export const DEFAULT_CI_EVAL_SAMPLE_RATE = 1;
2525

2626
/** Set to "ci" by the golden harness only. Nothing else selects the CI lane. */
27-
export const EVAL_CONTEXT_ENV = "DASHBOARD_AGENT_EVAL_CONTEXT";
27+
const EVAL_CONTEXT_ENV = "DASHBOARD_AGENT_EVAL_CONTEXT";
2828

2929
/**
3030
* The two lanes read different variables, so a CI run can neither read nor change the
@@ -60,7 +60,7 @@ export function shouldEvalTurn(): boolean {
6060
* would have to be handed the customer's code to check the answer against it, and a
6161
* source-free judgement of a source-grounded answer is not worth the row.
6262
*/
63-
export const SOURCE_TOOLS = ["read_file", "search_code", "list_files", "get_repo_info"];
63+
const SOURCE_TOOLS = ["read_file", "search_code", "list_files", "get_repo_info"];
6464

6565
export function turnReadSource(toolActivity: Array<{ toolName: string }>): boolean {
6666
return toolActivity.some((activity) => SOURCE_TOOLS.includes(activity.toolName));
@@ -369,7 +369,7 @@ export function classifyEvalError(output: unknown): EvalErrorCategory {
369369
* already there. A string `error` is replaced by its shape: the label is what the judge
370370
* gets, never the sentence it came from.
371371
*/
372-
export function annotateEvalErrorCategory(original: unknown, redacted: unknown): unknown {
372+
function annotateEvalErrorCategory(original: unknown, redacted: unknown): unknown {
373373
if (!evalOutputErrored(original)) return redacted;
374374
if (redacted === null || typeof redacted !== "object" || Array.isArray(redacted)) return redacted;
375375

internal-packages/dashboard-agent/src/investigation-sweep.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ const EMPTY_SWEEP_RESULT: InvestigationSweepResult = {
182182
failed: 0,
183183
};
184184

185-
export const dashboardAgentInvestigationSweep = schedules.task({
185+
const dashboardAgentInvestigationSweep = schedules.task({
186186
id: "dashboard-agent-investigation-sweep",
187187
cron: "*/5 * * * *",
188188
retry: { maxAttempts: 3 },

internal-packages/dashboard-agent/src/maintenance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export async function runDashboardAgentRetention(
115115
return result;
116116
}
117117

118-
export const dashboardAgentMaintenance = schedules.task({
118+
const dashboardAgentMaintenance = schedules.task({
119119
id: "dashboard-agent-maintenance",
120120
cron: "0 3 * * *",
121121
retry: { maxAttempts: 3 },

internal-packages/dashboard-agent/src/repo-tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const FETCH_TIMEOUT_MS = 30_000;
4949

5050
// Points at the mechanism the prompt already teaches — the stack-trace line is
5151
// where a truncated read gets resumed.
52-
export const READ_TRUNCATION_NOTICE =
52+
const READ_TRUNCATION_NOTICE =
5353
`Truncated to the first ${MAX_READ_LINES} lines / ${MAX_READ_BYTES / 1024}KB. ` +
5454
"Read the part you need with startLine and endLine — the line from the stack trace or the search match is where to start.";
5555

internal-packages/dashboard-agent/src/tool-api-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const QUERY_TIMEOUT_MS = 30_000;
4545
// "query" is the server rejecting the TRQL, "transport" is the request breaking, "busy" is
4646
// the server too loaded or rate limited to answer — the same query may work shortly. Chart
4747
// validation only fails a render on "query".
48-
export type QueryPostResult =
48+
type QueryPostResult =
4949
| { ok: true; rows: Array<Record<string, unknown>> }
5050
| { ok: false; kind: "query" | "transport" | "busy"; error: string };
5151

internal-packages/dashboard-agent/src/tool-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import type { InvestigationRenderer } from "./tool-investigations";
5353
* environment is stated as one; a failed exchange says the read didn't land, and carries
5454
* its status, so an authorization failure is never reported as an absent environment.
5555
*/
56-
export function envUnavailableError(result: EnvUnavailable, action: string): { error: string } {
56+
function envUnavailableError(result: EnvUnavailable, action: string): { error: string } {
5757
if (result.envUnavailable === "missing") {
5858
return { error: `No current environment is available to ${action}.` };
5959
}

internal-packages/dashboard-agent/src/tool-evidence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type EvidenceScope = { projectRef: string; environmentId: string };
1515
* Builds the canonical `trigger://` URI for a cited ref. A ref that can't be
1616
* canonicalized is returned as a named error, never dropped.
1717
*/
18-
export function canonicalizeEvidence(
18+
function canonicalizeEvidence(
1919
items: EvidenceRef[],
2020
scope: EvidenceScope,
2121
reads: SourceReadLookup

internal-packages/dashboard-agent/src/tool-investigations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const RECURRENCE_WATCH = { checkEveryMinutes: 15, maxHours: WATCH_MAX_HOURS } as
4747
* The card's typed next actions, decided here and never by the model. "Show code"
4848
* needs a concluded card, a cited source line, and a read at that commit this turn.
4949
*/
50-
export function investigationCapabilities(
50+
function investigationCapabilities(
5151
state: InvestigationState,
5252
reads: SourceReadLookup
5353
): InvestigationCapabilities | null {
@@ -119,7 +119,7 @@ export function investigationCapabilities(
119119
return { version: INVESTIGATION_CAPABILITIES_VERSION, actions };
120120
}
121121

122-
export type InvestigationRenderResult =
122+
type InvestigationRenderResult =
123123
| { error: string }
124124
| { blocks: unknown[]; investigationId?: string; revision?: number };
125125

internal-packages/dashboard-agent/src/tools.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import { buildWatchTools } from "./watch-tools";
1010
import type { DashboardAgentToolContext } from "./tool-context";
1111

1212
export type { DashboardAgentToolContext } from "./tool-context";
13-
export type { InvestigationsCapability } from "./tool-investigations";
1413
export { showCodeAskPrompt } from "./tool-investigations";
15-
export { getReportModelOutput, renderViewModelOutput } from "./tool-curation";
1614

1715
/**
1816
* Assembles the ready adapters into one tool set. The key order below is frozen:

0 commit comments

Comments
 (0)