fix(lint): fix all pre-existing lint warnings (unused vars/imports/params)
- Prefix unused params/vars with _ in db-writer.js, system-context.js, record-promoter.js, a2a-transport.js - Remove unused imports: createServer (a2a-agent-server.js), dirname/join/resolve (a2a-transport.js), KNOWN_PREFERENCE_KEYS (preferences.js) - Remove unused private field _lastInputAt from pty-chat-parser.ts - Prefix unused test variable currentProject in uok-metrics-exposition.test.mjs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
64ddbd950f
commit
96d751555f
8 changed files with 16 additions and 25 deletions
|
|
@ -390,7 +390,7 @@ const TACIT_SECTION_MAX_BYTES = 4096;
|
|||
// (#sf-moobj36p-ko6snt)
|
||||
const SELF_FEEDBACK_MAX_ENTRIES = 20;
|
||||
const SELF_FEEDBACK_MAX_CHARS = 4000;
|
||||
function loadSelfFeedbackBlock(cwd) {
|
||||
function loadSelfFeedbackBlock(_cwd) {
|
||||
let entries = [];
|
||||
if (isDbAvailable()) {
|
||||
const rows = listSelfFeedbackEntries();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export function isDecisionsTableFormat(content) {
|
|||
* Generate a minimal decisions table section (header + rows) for appending
|
||||
* to a freeform DECISIONS.md file.
|
||||
*/
|
||||
function generateDecisionsAppendBlock(decisions) {
|
||||
function _generateDecisionsAppendBlock(decisions) {
|
||||
const lines = [];
|
||||
lines.push("");
|
||||
lines.push("---");
|
||||
|
|
@ -250,7 +250,7 @@ export async function nextRequirementId() {
|
|||
*
|
||||
* Returns the assigned ID.
|
||||
*/
|
||||
export async function saveRequirementToDb(fields, basePath) {
|
||||
export async function saveRequirementToDb(fields, _basePath) {
|
||||
try {
|
||||
const db = await import("./sf-db.js");
|
||||
// Atomic ID assignment + insert inside a transaction.
|
||||
|
|
@ -287,12 +287,12 @@ export async function saveRequirementToDb(fields, basePath) {
|
|||
});
|
||||
// Fetch all requirements for full file regeneration
|
||||
const adapter = db._getAdapter();
|
||||
let allRequirements = [];
|
||||
let _allRequirements = [];
|
||||
if (adapter) {
|
||||
const rows = adapter
|
||||
.prepare("SELECT * FROM requirements ORDER BY id")
|
||||
.all();
|
||||
allRequirements = rows.map((row) => ({
|
||||
_allRequirements = rows.map((row) => ({
|
||||
id: row["id"],
|
||||
class: row["class"],
|
||||
status: row["status"],
|
||||
|
|
@ -329,7 +329,7 @@ export async function saveRequirementToDb(fields, basePath) {
|
|||
*
|
||||
* Returns the assigned ID.
|
||||
*/
|
||||
export async function saveDecisionToDb(fields, basePath) {
|
||||
export async function saveDecisionToDb(fields, _basePath) {
|
||||
try {
|
||||
const db = await import("./sf-db.js");
|
||||
// Atomic ID assignment + insert inside a transaction to prevent
|
||||
|
|
@ -363,12 +363,12 @@ export async function saveDecisionToDb(fields, basePath) {
|
|||
});
|
||||
// Fetch all decisions (including superseded for the full register)
|
||||
const adapter = db._getAdapter();
|
||||
let allDecisions = [];
|
||||
let _allDecisions = [];
|
||||
if (adapter) {
|
||||
const rows = adapter
|
||||
.prepare("SELECT * FROM decisions ORDER BY seq")
|
||||
.all();
|
||||
allDecisions = rows.map((row) => ({
|
||||
_allDecisions = rows.map((row) => ({
|
||||
seq: row["seq"],
|
||||
id: row["id"],
|
||||
when_context: row["when_context"],
|
||||
|
|
@ -504,12 +504,12 @@ export async function updateRequirementInDb(id, updates, basePath) {
|
|||
db.upsertRequirement(merged);
|
||||
// Fetch ALL requirements (including superseded) for full file regeneration
|
||||
const adapter = db._getAdapter();
|
||||
let allRequirements = [];
|
||||
let _allRequirements = [];
|
||||
if (adapter) {
|
||||
const rows = adapter
|
||||
.prepare("SELECT * FROM requirements ORDER BY id")
|
||||
.all();
|
||||
allRequirements = rows.map((row) => ({
|
||||
_allRequirements = rows.map((row) => ({
|
||||
id: row["id"],
|
||||
class: row["class"],
|
||||
status: row["status"],
|
||||
|
|
|
|||
|
|
@ -20,11 +20,7 @@ import {
|
|||
resolveProfileDefaults as _resolveProfileDefaults,
|
||||
} from "./preferences-models.js";
|
||||
import { upgradePreferencesFileIfDrifted } from "./preferences-template-upgrade.js";
|
||||
import {
|
||||
formatSkillRef,
|
||||
KNOWN_PREFERENCE_KEYS,
|
||||
MODE_DEFAULTS,
|
||||
} from "./preferences-types.js";
|
||||
import { formatSkillRef, MODE_DEFAULTS } from "./preferences-types.js";
|
||||
import { validatePreferences } from "./preferences-validation.js";
|
||||
import { logWarning } from "./workflow-logger.js";
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ function stampRecordPromoted(filePath, milestoneId) {
|
|||
writeFileSync(filePath, `---${newBlock}${after}`, "utf-8");
|
||||
}
|
||||
/** Append a milestone ID to .sf/QUEUE.md, creating the file if absent. */
|
||||
function appendToQueue(sfRootPath, milestoneId) {
|
||||
function _appendToQueue(sfRootPath, milestoneId) {
|
||||
const queuePath = join(sfRootPath, "QUEUE.md");
|
||||
if (existsSync(queuePath)) {
|
||||
const existing = readFileSync(queuePath, "utf-8");
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ import {
|
|||
import { appendTraceEvent } from "../uok/trace-writer.js";
|
||||
|
||||
const tmpDirs = [];
|
||||
let currentProject = null;
|
||||
let _currentProject = null;
|
||||
|
||||
afterEach(() => {
|
||||
closeDatabase();
|
||||
invalidateMetricsCache();
|
||||
currentProject = null;
|
||||
_currentProject = null;
|
||||
while (tmpDirs.length > 0) {
|
||||
const dir = tmpDirs.pop();
|
||||
if (dir) rmSync(dir, { recursive: true, force: true });
|
||||
|
|
@ -37,7 +37,7 @@ function makeProject() {
|
|||
tmpDirs.push(dir);
|
||||
// Open DB at the real project path so currentPath derives correct basePath
|
||||
openDatabase(join(dir, ".sf", "sf.db"));
|
||||
currentProject = dir;
|
||||
_currentProject = dir;
|
||||
return dir;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { createServer } from "node:http";
|
||||
import { AGENT_CARD_PATH } from "@a2a-js/sdk";
|
||||
import { DefaultRequestHandler, InMemoryTaskStore } from "@a2a-js/sdk/server";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
import { spawn } from "node:child_process";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { dirname, join, resolve } from "node:path";
|
||||
|
||||
const A2A_AGENT_SERVER_PATH = new URL("./a2a-agent-server.js", import.meta.url)
|
||||
.pathname;
|
||||
|
|
@ -284,7 +283,7 @@ export class A2ATransport {
|
|||
* Consumer: process exit handlers and test teardown.
|
||||
*/
|
||||
shutdown() {
|
||||
for (const [name, entry] of this._registry) {
|
||||
for (const [_name, entry] of this._registry) {
|
||||
try {
|
||||
entry.process.kill("SIGTERM");
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -300,9 +300,6 @@ export class PtyChatParser {
|
|||
*/
|
||||
private _completionEmitted = false;
|
||||
|
||||
/** Timestamp of last received input chunk, used for completion debounce */
|
||||
private _lastInputAt = 0;
|
||||
|
||||
/**
|
||||
* True when the parser has seen a prompt boundary and is waiting for user
|
||||
* input. The next non-system, non-prompt, non-TUI content line after the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue