@joshski/dust 0.1.93 → 0.1.95
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/artifacts/index.d.ts +18 -11
- package/dist/artifacts/workflow-tasks.d.ts +4 -1
- package/dist/artifacts.js +114 -104
- package/dist/audits/checks-audit.d.ts +55 -0
- package/dist/audits.js +1641 -132
- package/dist/bucket/command-events-proxy.d.ts +1 -0
- package/dist/bucket/events.d.ts +7 -9
- package/dist/bucket/paths.d.ts +4 -12
- package/dist/bucket/repository-loop.d.ts +2 -1
- package/dist/bucket/repository.d.ts +8 -0
- package/dist/bucket/server-messages.d.ts +1 -0
- package/dist/bucket/tool-prompt.d.ts +10 -1
- package/dist/cli/commands/next.d.ts +6 -0
- package/dist/cli/types.d.ts +2 -0
- package/dist/config/settings.d.ts +4 -3
- package/dist/dust.js +4429 -2489
- package/dist/env-config.d.ts +103 -0
- package/dist/logging/index.d.ts +20 -1
- package/dist/logging.js +19 -10
- package/dist/loop/events.d.ts +52 -0
- package/dist/loop/git-pull.d.ts +9 -0
- package/dist/loop/iteration.d.ts +42 -0
- package/dist/loop/wire-events.d.ts +5 -0
- package/dist/proxy/claude-api-proxy.d.ts +28 -0
- package/dist/session.d.ts +4 -2
- package/dist/validation/index.d.ts +4 -1
- package/dist/validation.js +61 -33
- package/lib/istanbul/minimal-reporter.cjs +1 -1
- package/package.json +2 -2
- package/dist/cli/commands/loop.d.ts +0 -118
- /package/dist/cli/{commands → shared}/agent-shared.d.ts +0 -0
|
@@ -19,6 +19,7 @@ interface CommandEventsProxyHandlers {
|
|
|
19
19
|
forwardEvent: (event: CommandEventMessage) => void;
|
|
20
20
|
getTools: () => ToolDefinition[];
|
|
21
21
|
forwardToolExecution: (request: ToolExecutionRequest) => Promise<ToolExecutionResult>;
|
|
22
|
+
revealFamily?: (familyName: string) => void;
|
|
22
23
|
}
|
|
23
24
|
export declare function isCommandEventMessage(payload: unknown): payload is CommandEventMessage;
|
|
24
25
|
/**
|
package/dist/bucket/events.d.ts
CHANGED
|
@@ -7,16 +7,14 @@
|
|
|
7
7
|
import type { EventMessage } from '../agent-events';
|
|
8
8
|
export declare const WS_OPEN = 1;
|
|
9
9
|
export declare const WS_CLOSED = 3;
|
|
10
|
+
type WebSocketEventHandler = (() => void) | ((event: {
|
|
11
|
+
code: number;
|
|
12
|
+
reason: string;
|
|
13
|
+
}) => void) | ((error: Error) => void) | ((event: {
|
|
14
|
+
data: string;
|
|
15
|
+
}) => void);
|
|
10
16
|
export interface WebSocketLike {
|
|
11
|
-
|
|
12
|
-
onclose: ((event: {
|
|
13
|
-
code: number;
|
|
14
|
-
reason: string;
|
|
15
|
-
}) => void) | null;
|
|
16
|
-
onerror: ((error: Error) => void) | null;
|
|
17
|
-
onmessage: ((event: {
|
|
18
|
-
data: string;
|
|
19
|
-
}) => void) | null;
|
|
17
|
+
addEventListener(type: 'open' | 'close' | 'error' | 'message', handler: WebSocketEventHandler): void;
|
|
20
18
|
close: () => void;
|
|
21
19
|
send: (data: string) => void;
|
|
22
20
|
readyState: number;
|
package/dist/bucket/paths.d.ts
CHANGED
|
@@ -4,23 +4,15 @@
|
|
|
4
4
|
* Pure functions that compute paths from explicit parameters,
|
|
5
5
|
* following the "functional core, imperative shell" pattern.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
* Environment variables used by getReposDir.
|
|
9
|
-
* Includes an index signature for compatibility with process.env.
|
|
10
|
-
*/
|
|
11
|
-
interface ReposDirEnv {
|
|
12
|
-
DUST_REPOS_DIR?: string;
|
|
13
|
-
[key: string]: string | undefined;
|
|
14
|
-
}
|
|
7
|
+
import type { SessionConfig } from '../env-config';
|
|
15
8
|
/**
|
|
16
9
|
* Compute the repositories directory path.
|
|
17
10
|
*
|
|
18
|
-
* If
|
|
11
|
+
* If session.reposDir is set, returns that value.
|
|
19
12
|
* Otherwise, returns the default path: ~/.dust/repos
|
|
20
13
|
*
|
|
21
|
-
* @param
|
|
14
|
+
* @param session - Session configuration from EnvConfig
|
|
22
15
|
* @param homeDir - User's home directory path
|
|
23
16
|
* @returns The resolved repositories directory path
|
|
24
17
|
*/
|
|
25
|
-
export declare function getReposDir(
|
|
26
|
-
export {};
|
|
18
|
+
export declare function getReposDir(session: SessionConfig, homeDir: string): string;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import type { EventMessage } from '../agent-events';
|
|
8
8
|
import { type run as claudeRun, type RunnerDependencies } from '../claude/run';
|
|
9
9
|
import type { OutputSink } from '../claude/types';
|
|
10
|
-
import { type LoopEmitFn
|
|
10
|
+
import { type LoopEmitFn } from '../loop/events';
|
|
11
|
+
import type { SendAgentEventFn } from '../loop/wire-events';
|
|
11
12
|
import { type RunnerDependencies as CodexRunnerDependencies, run as codexRun } from '../codex/run';
|
|
12
13
|
import type { SendEventFn } from './events';
|
|
13
14
|
import { type LogBuffer } from './log-buffer';
|
|
@@ -8,6 +8,7 @@ import { spawn as nodeSpawn } from 'node:child_process';
|
|
|
8
8
|
import { run as claudeRun } from '../claude/run';
|
|
9
9
|
import type { CommandDependencies, FileSystem } from '../cli/types';
|
|
10
10
|
import type { DockerDependencies } from '../docker/docker-agent';
|
|
11
|
+
import { type AuthConfig, type RuntimeConfig, type SessionConfig } from '../env-config';
|
|
11
12
|
import type { ToolExecutionRequest, ToolExecutionResult } from './command-events-proxy';
|
|
12
13
|
import { type BucketEmitFn, type SendEventFn } from './events';
|
|
13
14
|
import { type LogBuffer } from './log-buffer';
|
|
@@ -50,12 +51,19 @@ export interface RepositoryDependencies {
|
|
|
50
51
|
fileSystem: FileSystem;
|
|
51
52
|
sleep: (ms: number) => Promise<void>;
|
|
52
53
|
getReposDir: () => string;
|
|
54
|
+
session: SessionConfig;
|
|
55
|
+
runtime: RuntimeConfig;
|
|
56
|
+
auth: AuthConfig;
|
|
53
57
|
/** Optional overrides for Docker dependency functions (for testing) */
|
|
54
58
|
dockerDeps?: Partial<DockerDependencies>;
|
|
55
59
|
/** Function to get current tool definitions */
|
|
56
60
|
getTools?: () => ToolDefinition[];
|
|
61
|
+
/** Function to get revealed tool families (for progressive disclosure) */
|
|
62
|
+
getRevealedFamilies?: () => Set<string>;
|
|
57
63
|
/** Forward tool execution requests to the bucket server */
|
|
58
64
|
forwardToolExecution?: (request: ToolExecutionRequest) => Promise<ToolExecutionResult>;
|
|
65
|
+
/** Mark a tool family as revealed (for progressive disclosure) */
|
|
66
|
+
revealFamily?: (familyName: string) => void;
|
|
59
67
|
}
|
|
60
68
|
/**
|
|
61
69
|
* Start (or restart) the per-repository loop and keep loopPromise state accurate.
|
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
* Formats tool definitions for injection into agent prompts.
|
|
3
3
|
*/
|
|
4
4
|
import type { ToolDefinition } from './server-messages';
|
|
5
|
+
/**
|
|
6
|
+
* Format a tool family help text when invoked without a sub-tool.
|
|
7
|
+
* Returns detailed help listing all available sub-tools with their parameters.
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatToolFamilyHelp(family: ToolDefinition): string;
|
|
5
10
|
/**
|
|
6
11
|
* Format tool definitions into a markdown section for agent prompts.
|
|
7
12
|
* Returns an empty string if no tools are defined.
|
|
13
|
+
*
|
|
14
|
+
* @param tools - Array of tool definitions to format
|
|
15
|
+
* @param revealedFamilies - Optional set of family names that have been revealed.
|
|
16
|
+
* Revealed families render with full sub-tool details instead of summaries.
|
|
8
17
|
*/
|
|
9
|
-
export declare function formatToolsSection(tools: ToolDefinition[]): string;
|
|
18
|
+
export declare function formatToolsSection(tools: ToolDefinition[], revealedFamilies?: Set<string>): string;
|
|
@@ -10,6 +10,10 @@ export interface UnblockedTask {
|
|
|
10
10
|
title: string | null;
|
|
11
11
|
openingSentence: string | null;
|
|
12
12
|
}
|
|
13
|
+
export interface InvalidTask {
|
|
14
|
+
path: string;
|
|
15
|
+
messages: string[];
|
|
16
|
+
}
|
|
13
17
|
/**
|
|
14
18
|
* Finds unblocked tasks in .dust/tasks/.
|
|
15
19
|
* Returns null if .dust directory is missing, otherwise an array of unblocked tasks.
|
|
@@ -17,9 +21,11 @@ export interface UnblockedTask {
|
|
|
17
21
|
export declare function findUnblockedTasks(cwd: string, fileSystem: FileSystem, directoryFileSorter?: DirectoryFileSorter): Promise<{
|
|
18
22
|
error?: string;
|
|
19
23
|
tasks: UnblockedTask[];
|
|
24
|
+
invalidTasks: InvalidTask[];
|
|
20
25
|
}>;
|
|
21
26
|
/**
|
|
22
27
|
* Formats unblocked tasks for display.
|
|
23
28
|
*/
|
|
24
29
|
export declare function printTaskList(context: CommandContext, tasks: UnblockedTask[]): void;
|
|
30
|
+
export declare function printSkippedTasks(context: CommandContext, invalidTasks: InvalidTask[]): void;
|
|
25
31
|
export declare function next(dependencies: CommandDependencies): Promise<CommandResult>;
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Common types for CLI commands
|
|
3
3
|
*/
|
|
4
4
|
import type { CommandEvent } from '../command-events';
|
|
5
|
+
import type { RuntimeConfig } from '../env-config';
|
|
5
6
|
import type { FileSystem, GlobScanner } from '../filesystem/types';
|
|
6
7
|
export type { FileSystem, GlobScanner, ReadableFileSystem, } from '../filesystem/types';
|
|
7
8
|
export interface CommandContext {
|
|
@@ -38,4 +39,5 @@ export interface CommandDependencies {
|
|
|
38
39
|
globScanner: GlobScanner;
|
|
39
40
|
settings: DustSettings;
|
|
40
41
|
directoryFileSorter?: DirectoryFileSorter;
|
|
42
|
+
runtime: RuntimeConfig;
|
|
41
43
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Reads optional configuration from .dust/config/settings.json
|
|
5
5
|
*/
|
|
6
6
|
import type { CheckConfig, DustSettings, ReadableFileSystem } from '../cli/types';
|
|
7
|
+
import type { RuntimeConfig } from '../env-config';
|
|
7
8
|
export type { CheckConfig, DustSettings };
|
|
8
9
|
interface SettingsViolation {
|
|
9
10
|
message: string;
|
|
@@ -18,7 +19,7 @@ export declare function validateSettingsJson(content: string): SettingsViolation
|
|
|
18
19
|
* 4. No lockfile + BUN_INSTALL env var set → bunx dust
|
|
19
20
|
* 5. Default → npx dust
|
|
20
21
|
*/
|
|
21
|
-
export declare function detectDustCommand(cwd: string, fileSystem: ReadableFileSystem): string;
|
|
22
|
+
export declare function detectDustCommand(cwd: string, fileSystem: ReadableFileSystem, runtime: RuntimeConfig): string;
|
|
22
23
|
/**
|
|
23
24
|
* Detects the appropriate install command based on lockfiles.
|
|
24
25
|
* Returns null when:
|
|
@@ -39,5 +40,5 @@ export declare function detectInstallCommand(cwd: string, fileSystem: ReadableFi
|
|
|
39
40
|
* 6. package.json exists → npm test
|
|
40
41
|
* 7. Default → null (no test command)
|
|
41
42
|
*/
|
|
42
|
-
export declare function detectTestCommand(cwd: string, fileSystem: ReadableFileSystem): string | null;
|
|
43
|
-
export declare function loadSettings(cwd: string, fileSystem: ReadableFileSystem): Promise<DustSettings>;
|
|
43
|
+
export declare function detectTestCommand(cwd: string, fileSystem: ReadableFileSystem, runtime: RuntimeConfig): string | null;
|
|
44
|
+
export declare function loadSettings(cwd: string, fileSystem: ReadableFileSystem, runtime: RuntimeConfig): Promise<DustSettings>;
|