@joshski/dust 0.1.62 → 0.1.64

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.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Filesystem abstraction types used across the codebase.
3
+ */
4
+ export interface WriteOptions {
5
+ flag?: 'w' | 'wx';
6
+ }
7
+ export interface ReadableFileSystem {
8
+ exists: (path: string) => boolean;
9
+ readFile: (path: string) => Promise<string>;
10
+ readdir: (path: string) => Promise<string[]>;
11
+ isDirectory: (path: string) => boolean;
12
+ }
13
+ export interface FileSystem extends ReadableFileSystem {
14
+ writeFile: (path: string, content: string, options?: WriteOptions) => Promise<void>;
15
+ mkdir: (path: string, options?: {
16
+ recursive?: boolean;
17
+ }) => Promise<void>;
18
+ chmod: (path: string, mode: number) => Promise<void>;
19
+ getFileCreationTime: (path: string) => number;
20
+ rename: (oldPath: string, newPath: string) => Promise<void>;
21
+ }
22
+ export interface GlobScanner {
23
+ scan: (dir: string) => AsyncIterable<string>;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshski/dust",
3
- "version": "0.1.62",
3
+ "version": "0.1.64",
4
4
  "description": "Flow state for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,6 +22,13 @@
22
22
  "import": "./dist/artifacts.js",
23
23
  "types": "./dist/artifacts/index.d.ts"
24
24
  },
25
+ "./audits": {
26
+ "import": "./dist/audits.js",
27
+ "types": "./dist/audits/index.d.ts"
28
+ },
29
+ "./filesystem": {
30
+ "types": "./dist/filesystem/types.d.ts"
31
+ },
25
32
  "./istanbul/minimal-reporter": "./lib/istanbul/minimal-reporter.cjs"
26
33
  },
27
34
  "files": [
@@ -42,7 +49,7 @@
42
49
  "author": "joshski",
43
50
  "license": "MIT",
44
51
  "scripts": {
45
- "build": "bun build lib/cli/run.ts --target node --outfile dist/dust.js && printf '%s\\n%s' '#!/usr/bin/env node' \"$(cat dist/dust.js)\" > dist/dust.js && bun build lib/logging/index.ts --target node --outfile dist/logging.js && bun build lib/agents/detection.ts --target node --outfile dist/agents.js && bun build lib/artifacts/index.ts --target node --outfile dist/artifacts.js && bunx tsc --project tsconfig.build.json",
52
+ "build": "bun run scripts/build.ts",
46
53
  "test": "vitest run",
47
54
  "test:coverage": "vitest run --coverage",
48
55
  "eval": "bun run ./evals/run.ts"