sim 2.2.33-preview.318.1 → 2.2.33-preview.319.1
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/commands/protocol/local-errors.d.ts +35 -0
- package/dist/commands/protocol/source-check.d.ts +76 -0
- package/dist/commands/protocol/source-dir/command-lock.d.ts +49 -0
- package/dist/commands/protocol/source-dir/dir-kind.d.ts +43 -0
- package/dist/commands/protocol/source-dir/files.d.ts +63 -0
- package/dist/commands/protocol/source-dir/index.d.ts +12 -0
- package/dist/commands/protocol/source-dir/layout.d.ts +72 -0
- package/dist/commands/protocol/source-dir/write-back.d.ts +13 -0
- package/dist/commands/protocol/source-dir/written.d.ts +82 -0
- package/dist/commands/protocol/source-exit-codes.d.ts +14 -3
- package/dist/commands/protocol/source-status.d.ts +5 -0
- package/dist/commands/protocol/source-ui.d.ts +5 -1
- package/dist/commands/protocol/source-write.d.ts +58 -0
- package/dist/commands/protocol/workflow-dir.d.ts +52 -0
- package/dist/commands/protocol/workflow-source-apply.d.ts +0 -19
- package/dist/commands/protocol/workflow-source-check.d.ts +0 -63
- package/dist/commands/protocol/workflow-source-get.d.ts +0 -28
- package/dist/commands/protocol/workspace-source-apply.d.ts +0 -6
- package/dist/commands/protocol/workspace-source-dir.d.ts +4 -0
- package/dist/commands/protocol/workspace-source-get.d.ts +0 -5
- package/dist/exit-codes.d.ts +2 -2
- package/dist/generated/v2-api.d.ts +9 -9
- package/dist/index.js +11093 -10889
- package/dist/runtime.js +11093 -10889
- package/package.json +1 -1
- package/dist/commands/protocol/source-dir.d.ts +0 -284
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refusals a source command raises itself, with no request behind them. They render and exit
|
|
3
|
+
* through the same path as an API error (`status` 0: no server answered), so a script sees the
|
|
4
|
+
* same message, code and exit status, while the code that raises one says it is local.
|
|
5
|
+
*/
|
|
6
|
+
import { SimApiError } from '../../http/client';
|
|
7
|
+
/** What a local refusal carries beside its message: a machine-readable code and the exit status. */
|
|
8
|
+
interface LocalErrorOptions {
|
|
9
|
+
/** The code a script branches on (`SOURCE_SYMLINK`, `SOURCE_DIR_BUSY`); none by default. */
|
|
10
|
+
code?: string;
|
|
11
|
+
/** The process exit status; 1 by default. */
|
|
12
|
+
exitCode?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A refusal the CLI raised itself. Its `status` 0 and possibly null `code` read like a request
|
|
16
|
+
* that got no answer, so a check for an unreachable server or a lost answer excludes this class.
|
|
17
|
+
*/
|
|
18
|
+
export declare abstract class LocalRefusal extends SimApiError {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A source directory, its records or a file it would send or write refused by the CLI: a missing
|
|
22
|
+
* or unreadable file, a symbolic link, another kind of directory, a busy or unwritable directory,
|
|
23
|
+
* or a server answer naming a path the CLI never writes.
|
|
24
|
+
*/
|
|
25
|
+
export declare class SourceDirError extends LocalRefusal {
|
|
26
|
+
constructor(message: string, options?: LocalErrorOptions);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Flags or arguments a source command cannot act on: an unknown kind or path filter, flags that
|
|
30
|
+
* contradict each other, or a missing `--workspace`. Refused before any request is sent.
|
|
31
|
+
*/
|
|
32
|
+
export declare class CliUsageError extends LocalRefusal {
|
|
33
|
+
constructor(message: string, options?: Pick<LocalErrorOptions, 'code'>);
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The local check of a workflow source directory, shared by `workflows source check` and
|
|
3
|
+
* `workspaces source check`: compiling a workflow directory against the cached catalog and the
|
|
4
|
+
* workspace's declarations, the `--strict` rule, and how a check reports.
|
|
5
|
+
*/
|
|
6
|
+
import { type BlockCatalog, type WorkflowInput } from '@sim/workflow-code';
|
|
7
|
+
import { type AnswerBound } from '@sim/workflow-code/diagnostics';
|
|
8
|
+
import type { Command } from 'commander';
|
|
9
|
+
import { printProtocolResult } from './result';
|
|
10
|
+
import { type LocalDeclarations } from './source-tree';
|
|
11
|
+
import { type Diagnostic } from './source-ui';
|
|
12
|
+
import { type WorkspaceDeclarations } from './workspace-source-dir';
|
|
13
|
+
/**
|
|
14
|
+
* Which {@link STRICT_CODES} warnings fail a check: `new` those on a block the lock does not bind
|
|
15
|
+
* (one added since the get, or every block of a workflow that has no lock yet), `all` every one,
|
|
16
|
+
* `off` none. Printed source can hold such a warning on a block nobody edited (a field left empty
|
|
17
|
+
* in the editor), so the default fails only on blocks the edit wrote.
|
|
18
|
+
*/
|
|
19
|
+
type StrictMode = 'new' | 'all' | 'off';
|
|
20
|
+
/** One finding of a check, as the write commands print theirs. */
|
|
21
|
+
export type CheckFinding = Diagnostic;
|
|
22
|
+
/** The `--strict` / `--no-strict` pair: absent selects the default, {@link StrictMode} `new`. */
|
|
23
|
+
export interface StrictOptions {
|
|
24
|
+
strict?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** The strict mode the `--strict` / `--no-strict` pair selects. */
|
|
27
|
+
export declare function strictMode(options: StrictOptions): StrictMode;
|
|
28
|
+
/** Help shared by both check commands: what fails, and the strict flags. */
|
|
29
|
+
export declare const STRICT_HELP: string;
|
|
30
|
+
/** Adds the `--strict` / `--no-strict` pair to a check command. */
|
|
31
|
+
export declare function strictFlags(command: Command): Command;
|
|
32
|
+
/** Every workflow key of the workspace directory `root` that has a `workflow.ts`. */
|
|
33
|
+
export declare function workspaceWorkflowKeys(root: string): Promise<string[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Points the workspace directory's tsconfig files at the blocks its workflows now use, keeping the
|
|
36
|
+
* blocks they include.
|
|
37
|
+
*/
|
|
38
|
+
export declare function refreshWorkspaceTsconfigs(root: string, workspaceId: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* The inputs of each workflow of the workspace directory `root` that compiles (`startInputs`,
|
|
41
|
+
* `null` for one without a Start trigger), by key: what a child workflow call is checked against
|
|
42
|
+
* and what `workspace.d.ts` types its `inputMapping` with.
|
|
43
|
+
*/
|
|
44
|
+
export declare function workspaceWorkflowInputs(root: string, catalog: BlockCatalog): Promise<Map<string, WorkflowInput[] | null>>;
|
|
45
|
+
/**
|
|
46
|
+
* The workflows of `local` typed with the inputs each declares (`inputs`), for `workspace.d.ts`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function withWorkflowInputs(local: LocalDeclarations, inputs: ReadonlyMap<string, readonly WorkflowInput[] | null>): LocalDeclarations;
|
|
49
|
+
/**
|
|
50
|
+
* Compiles one workflow source directory offline against `catalog`, with the workspace's
|
|
51
|
+
* declarations when the directory sits in a workspace directory, and returns its findings with
|
|
52
|
+
* the {@link STRICT_CODES} the strict mode fails on raised to errors, and the `workflow.ts` text.
|
|
53
|
+
* `prefix` goes before each file path (`workflows/<key>/` in a workspace check).
|
|
54
|
+
*/
|
|
55
|
+
export declare function checkWorkflowDir(dir: string, catalog: BlockCatalog, options: {
|
|
56
|
+
declarations?: WorkspaceDeclarations;
|
|
57
|
+
strict: StrictMode;
|
|
58
|
+
prefix?: string;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
findings: CheckFinding[];
|
|
61
|
+
entry: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Prints a check's findings and result, and exits 1 on any error. The findings are bounded as the
|
|
65
|
+
* server bounds an answer of the same source (`bound`, the workflow answer's by default), while
|
|
66
|
+
* `errors` and `warnings` count every one. `verbose` keeps info findings in a machine result.
|
|
67
|
+
*/
|
|
68
|
+
export declare function reportCheck(output: Parameters<typeof printProtocolResult>[0], findings: CheckFinding[], result: Record<string, unknown>, options?: {
|
|
69
|
+
verbose?: boolean;
|
|
70
|
+
bound?: AnswerBound;
|
|
71
|
+
}): void;
|
|
72
|
+
/** The catalog a cache read found, or a refusal naming `get`, the command that caches one. */
|
|
73
|
+
export declare function cachedOrRefuse(catalog: BlockCatalog | null, workspaceId: string, get: string): BlockCatalog;
|
|
74
|
+
/** The cached catalog of `workspaceId`, or a refusal naming `get`, the command that caches one. */
|
|
75
|
+
export declare function requireCachedCatalog(workspaceId: string, get: string): BlockCatalog;
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The command lock of a source directory (`.sim/command.lock`): held while a command reads and
|
|
3
|
+
* rewrites the directory, so two commands on it never interleave their writes.
|
|
4
|
+
*/
|
|
5
|
+
import type { Stats } from 'node:fs';
|
|
6
|
+
/**
|
|
7
|
+
* Held while a command reads and rewrites a source directory, so two commands on one directory
|
|
8
|
+
* (an agent and a person, two terminals) never interleave their writes: each file moves into
|
|
9
|
+
* place atomically, but a set of them does not, and records from one command beside text from
|
|
10
|
+
* another would send stale text as an edit. A folder, since creating one is atomic everywhere.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SOURCE_DIR_LOCK = ".sim/command.lock";
|
|
13
|
+
/** The help line every command that holds {@link SOURCE_DIR_LOCK} adds to its exit codes. */
|
|
14
|
+
export declare const SOURCE_DIR_BUSY_HELP = "\nExit 10 (busy, retry): another sim workspaces source command is using this directory\n(SOURCE_DIR_BUSY); nothing was read or written. Run this one again once it finished.";
|
|
15
|
+
/** The lock folder a command found, as it found it: which folder, and when it last changed. */
|
|
16
|
+
type LockSighting = Pick<Stats, 'dev' | 'ino' | 'mtimeMs'>;
|
|
17
|
+
/**
|
|
18
|
+
* Removes the lock at `lock`, which the caller found stale as `seen`, unless another command took
|
|
19
|
+
* it over first. Two commands can find one lock stale at once: one removes it and takes the lock,
|
|
20
|
+
* and the other, acting on what it saw before, must not remove the live lock that replaced it. So
|
|
21
|
+
* a takeover first claims the lock folder it means to remove (creating {@link LOCK_TAKEOVER_DIR}
|
|
22
|
+
* in it, which only one command can), then removes it only while it is still the folder it saw
|
|
23
|
+
* and still stale; a lock that replaced the stale one is another folder or records a live owner,
|
|
24
|
+
* so the late command leaves it. A command that died mid-takeover leaves its claim in a stale
|
|
25
|
+
* lock, which the busy message says to remove.
|
|
26
|
+
*/
|
|
27
|
+
export declare function takeOverStaleLock(lock: string, seen: LockSighting): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Runs `run` holding the directory's command lock ({@link SOURCE_DIR_LOCK}). A second command on
|
|
30
|
+
* the directory meanwhile is refused (`SOURCE_DIR_BUSY`, exit 10) with nothing read or written; a
|
|
31
|
+
* lock its command left behind when it died is taken over ({@link takeOverStaleLock}). Like every
|
|
32
|
+
* other source path, `.sim` and the lock are never followed through a symbolic link
|
|
33
|
+
* (`SOURCE_SYMLINK`). An embedded run has no local directory to lock.
|
|
34
|
+
*/
|
|
35
|
+
export declare function withSourceDirLock<T>(dir: string, run: () => Promise<T>, options?: {
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
}): Promise<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Runs a single-workflow command on `dir` holding the command lock it shares with every command
|
|
40
|
+
* that may rewrite the same records: for a workflow folder of a workspace directory, the workspace
|
|
41
|
+
* directory's lock (such a command rewrites the workspace's own records, see {@link writeBack}, so
|
|
42
|
+
* it must not interleave with a workspace command, or with a workflow command in a sibling
|
|
43
|
+
* folder); for any other directory, its own. Refused like a workspace command (`SOURCE_DIR_BUSY`,
|
|
44
|
+
* exit 10), with nothing read or written. `readOnly` as {@link withSourceDirLock} takes it.
|
|
45
|
+
*/
|
|
46
|
+
export declare function withSourceCommandLock<T>(dir: string, run: () => Promise<T>, options?: {
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
}): Promise<T>;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a source directory is: one workflow's, a whole workspace's, or a workflow folder of a
|
|
3
|
+
* workspace directory, and which workspace a command on it acts on.
|
|
4
|
+
*/
|
|
5
|
+
import type { Command } from 'commander';
|
|
6
|
+
import type { ResolvedProfile } from '../../../config/index';
|
|
7
|
+
/**
|
|
8
|
+
* Makes `command`'s `--dir` (given or defaulted) an absolute path before its action runs, so every
|
|
9
|
+
* message names the directory it read wherever the CLI ran: a wrapper that changes directory
|
|
10
|
+
* first made `.` name a folder its caller never meant. An embedded run keeps its host's path.
|
|
11
|
+
*/
|
|
12
|
+
export declare function absoluteDirOption(command: Command): Command;
|
|
13
|
+
/**
|
|
14
|
+
* The workspace a source command acts on for a directory read from `readFrom`: that workspace,
|
|
15
|
+
* whatever the profile's default, so a directory stays bound to where it came from. Only a
|
|
16
|
+
* `--workspace` naming another one is refused, with `next` saying what to run instead (given the
|
|
17
|
+
* workspace the directory was read from and the one named). A directory that records no workspace
|
|
18
|
+
* takes the profile's (`null` when none is selected).
|
|
19
|
+
*/
|
|
20
|
+
export declare function directoryWorkspace(dir: string, readFrom: string | null, profile: Pick<ResolvedProfile, 'workspaceId' | 'sources'>, next: (readFrom: string, named: string) => string): string | null;
|
|
21
|
+
/** Which source command family a directory belongs to: one workflow's, or a whole workspace's. */
|
|
22
|
+
export type SourceDirKind = 'workflow' | 'workspace';
|
|
23
|
+
/**
|
|
24
|
+
* Refuses a `kind` command on a directory of the other kind, whatever `--force` says: a workflow
|
|
25
|
+
* get into a workspace directory (or the reverse) would replace its base, so staleness could no
|
|
26
|
+
* longer be detected and its unapplied edits would sit in a directory neither command reads.
|
|
27
|
+
*/
|
|
28
|
+
export declare function assertSourceDirKind(dir: string, kind: SourceDirKind): Promise<void>;
|
|
29
|
+
/** The workspace {@link SOURCE_STARTER_FILE} names, or `null` when the directory holds no starter. */
|
|
30
|
+
export declare function readStarterWorkspace(dir: string): Promise<string | null>;
|
|
31
|
+
/**
|
|
32
|
+
* A `workflows/<key>` folder of a workspace directory: `root` holds a workspace `.sim/base.json`.
|
|
33
|
+
* The workspace's `.sim/written.json` and base are the folder's records too, so a single-workflow
|
|
34
|
+
* write keeps them instead of writing a record of its own the workspace commands never read.
|
|
35
|
+
*/
|
|
36
|
+
export interface WorkspaceFolder {
|
|
37
|
+
root: string;
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
/** The folder's key under `workflows/`. */
|
|
40
|
+
key: string;
|
|
41
|
+
}
|
|
42
|
+
/** The workspace directory `dir` is a workflow folder of, or `null`. */
|
|
43
|
+
export declare function workspaceFolderOf(dir: string): Promise<WorkspaceFolder | null>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading and writing the source directory's files. Every path is relative to `realpath(--dir)`
|
|
3
|
+
* and no component below it may be a symbolic link, so nothing is read from or written to outside
|
|
4
|
+
* the directory, whatever a link in it points at. Writes are staged in the directory first and
|
|
5
|
+
* moved into place, so a failed write leaves the files it did not reach as they were. An embedded
|
|
6
|
+
* run reads and writes through its host instead.
|
|
7
|
+
*/
|
|
8
|
+
/** Files read or written at once on a local disk; a catalog's declarations run to hundreds of small files. */
|
|
9
|
+
export declare const FILE_CONCURRENCY = 32;
|
|
10
|
+
/**
|
|
11
|
+
* The lock an earlier get, apply or create left, read leniently (missing or invalid is `null`):
|
|
12
|
+
* it names the function files the CLI wrote, which is all a prune needs from it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readPreviousLock(dir: string): Promise<unknown>;
|
|
15
|
+
/** A JSON file in the source directory, read leniently: `null` when it is missing or invalid. */
|
|
16
|
+
export declare function readSourceJson(dir: string, path: string): Promise<unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* A line file (`.gitattributes`, `.gitignore`) with `lines` appended where missing, or `null`
|
|
19
|
+
* when it has them all.
|
|
20
|
+
*/
|
|
21
|
+
export declare function withMissingLines(existing: string | null, lines?: readonly string[]): string | null;
|
|
22
|
+
/** Whether a file-system error means the path does not exist (`ENOENT`, or a file as a folder). */
|
|
23
|
+
export declare function isMissing(error: unknown): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The absolute path of `path` under `root` (already a realpath), refusing a symbolic link at any
|
|
26
|
+
* component that exists. `verified` caches directories already checked across one operation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function checkedPath(root: string, path: string, verified: Set<string>): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Source text as the CLI reads and compares it: no leading byte-order mark and LF line endings, so
|
|
31
|
+
* a Windows editor or checkout never turns an unchanged source into an edit, or hides its
|
|
32
|
+
* `// @sim-sdk` header.
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeSourceText(text: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* The text of `path` in the source directory, normalized by `normalizeSourceText`, or `null` when
|
|
37
|
+
* it does not exist. A symbolic link anywhere below the directory is refused rather than followed.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readSourceText(dir: string, path: string): Promise<string | null>;
|
|
40
|
+
/** What one write does to the source directory: files to remove first, then files to write. */
|
|
41
|
+
export interface SourceDirChange {
|
|
42
|
+
write: ReadonlyArray<readonly [path: string, text: string]>;
|
|
43
|
+
/**
|
|
44
|
+
* Files whose bytes `stage` writes into the staged file it is handed (a download), before
|
|
45
|
+
* anything is moved into place: one that throws leaves the directory as it was.
|
|
46
|
+
*/
|
|
47
|
+
fetch?: ReadonlyArray<readonly [path: string, stage: (stagedFile: string) => Promise<void>]>;
|
|
48
|
+
/** Files or directories (removed recursively); an embedded run cannot remove, so skips these. */
|
|
49
|
+
remove?: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Applies a change to the source directory, creating it when absent. Every target is checked
|
|
53
|
+
* before anything is touched; the files are written to a staging directory inside it, then the
|
|
54
|
+
* removals run and each file is renamed into place, never through a link, the record files last.
|
|
55
|
+
*/
|
|
56
|
+
export declare function updateSourceDir(dir: string, change: SourceDirChange): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Every plain file under `folder` in the source directory, as source-relative paths. A symbolic
|
|
59
|
+
* link anywhere is refused rather than followed; a missing folder lists nothing.
|
|
60
|
+
*/
|
|
61
|
+
export declare function listSourceFiles(dir: string, folder: string): Promise<string[]>;
|
|
62
|
+
/** A file-system or process error's code (`EEXIST`, `ESRCH`), if it has one. */
|
|
63
|
+
export declare function errorCode(error: unknown): string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The source directory on disk, for `workflows source` (one workflow's directory) and
|
|
3
|
+
* `workspaces source` (whose `workflows/<key>/` folders are each one): its layout beside the
|
|
4
|
+
* printed files, and the only code that reads or writes it. One definition, so the commands
|
|
5
|
+
* cannot drift apart.
|
|
6
|
+
*/
|
|
7
|
+
export { SOURCE_DIR_BUSY_HELP, SOURCE_DIR_LOCK, takeOverStaleLock, withSourceCommandLock, withSourceDirLock, } from './command-lock';
|
|
8
|
+
export { absoluteDirOption, assertSourceDirKind, directoryWorkspace, readStarterWorkspace, workspaceFolderOf, } from './dir-kind';
|
|
9
|
+
export { checkedPath, FILE_CONCURRENCY, isMissing, listSourceFiles, readPreviousLock, readSourceJson, readSourceText, type SourceDirChange, updateSourceDir, withMissingLines, } from './files';
|
|
10
|
+
export { assertPrintedSourcePaths, assertSendableCodeFiles, lockCodeFiles, orphanedCodeFiles, SOURCE_AGENTS_FILE, SOURCE_DOWNLOADS_DIR, SOURCE_EXAMPLES_DIR, SOURCE_GITATTRIBUTES_FILE, SOURCE_GITIGNORE_FILE, SOURCE_SDK_DIR, SOURCE_STAGING_PREFIX, SOURCE_STARTER_FILE, SOURCE_STORED_EDGES_FILE, SOURCE_WRITTEN_FILE, sourceRelativePath, } from './layout';
|
|
11
|
+
export { writeBack } from './write-back';
|
|
12
|
+
export { digest, editedFiles, type FileStat, fileStatOf, locallyEditedFiles, readFolderWritten, readWritten, recordedStats, type StatDigest, sameFileStat, type Written, writtenFiles, writtenRecord, } from './written';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The source directory's layout beside the printed files: the CLI's own record and cache paths,
|
|
3
|
+
* which paths a server answer may write, and the function files a lock names.
|
|
4
|
+
*/
|
|
5
|
+
/** Generated SDK declarations: the blocks the source uses (every block's are cached), plus `workspace.d.ts`. */
|
|
6
|
+
export declare const SOURCE_SDK_DIR = ".sim/sdk";
|
|
7
|
+
/** A short guide for an agent working in the directory; never a top-level `AGENTS.md`. */
|
|
8
|
+
export declare const SOURCE_AGENTS_FILE = ".sim/AGENTS.md";
|
|
9
|
+
/**
|
|
10
|
+
* Example workflows (`cookbook.ts`, `integrations.ts`, `agents.ts`): together one correct example
|
|
11
|
+
* of each common block, rewritten on every get like the agent guide. They name example resources
|
|
12
|
+
* the workspace may lack, so the written `tsconfig.json` never includes them.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SOURCE_EXAMPLES_DIR = ".sim/examples";
|
|
15
|
+
/** Pins the source files to LF, merged into whatever the directory already holds. */
|
|
16
|
+
export declare const SOURCE_GITATTRIBUTES_FILE = ".gitattributes";
|
|
17
|
+
/** Keeps a command's transient files out of a repository, merged like `.gitattributes`. */
|
|
18
|
+
export declare const SOURCE_GITIGNORE_FILE = ".gitignore";
|
|
19
|
+
/**
|
|
20
|
+
* A digest of each source file as the CLI last wrote it, so a later get can tell an unapplied
|
|
21
|
+
* edit from a file it may replace. The CLI's own record: never sent to the server.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SOURCE_WRITTEN_FILE = ".sim/written.json";
|
|
24
|
+
/**
|
|
25
|
+
* The workspace a starter written by `workflows source create` was typed for, so the create that
|
|
26
|
+
* follows targets that workspace. The CLI's own record: never sent, and removed once the workflow
|
|
27
|
+
* exists.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SOURCE_STARTER_FILE = ".sim/starter.json";
|
|
30
|
+
/**
|
|
31
|
+
* The edges of the workflow a get or apply printed, by lock key, with the base fingerprint they
|
|
32
|
+
* belong to, so an offline check tells an edge the stored workflow holds from one the source
|
|
33
|
+
* adds. The CLI's own record: never sent to the server.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SOURCE_STORED_EDGES_FILE = ".sim/stored-edges.json";
|
|
36
|
+
/**
|
|
37
|
+
* Where a workspace get keeps the blobs it verified until they move into place. A get that fails
|
|
38
|
+
* leaves them there, so the next one downloads only the rest; the one that completes removes the
|
|
39
|
+
* folder.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SOURCE_DOWNLOADS_DIR = ".sim/downloads";
|
|
42
|
+
/** The folder a write stages its files in before moving them into place; removed when it ends. */
|
|
43
|
+
export declare const SOURCE_STAGING_PREFIX = ".sim-staging-";
|
|
44
|
+
/** Refuses a server answer naming a file the printer never writes, before anything is written. */
|
|
45
|
+
export declare function assertPrintedSourcePaths(files: Record<string, string>): void;
|
|
46
|
+
/**
|
|
47
|
+
* Refuses, before a write is sent, a code file the server would store but the CLI could never
|
|
48
|
+
* write back: one rule ({@link isCodeFilePath}) for both, so an apply is never stored and then
|
|
49
|
+
* reported as failed.
|
|
50
|
+
*/
|
|
51
|
+
export declare function assertSendableCodeFiles(files: Record<string, string>): void;
|
|
52
|
+
/**
|
|
53
|
+
* A path inside the source directory, normalized (`./functions/x.js` → `functions/x.js`), or
|
|
54
|
+
* `null` for an absolute path, a drive letter or a `..` escape.
|
|
55
|
+
*/
|
|
56
|
+
export declare function sourceRelativePath(path: string): string | null;
|
|
57
|
+
/** Every `codeFile` a lock records, as source-relative paths. */
|
|
58
|
+
export declare function lockCodeFiles(lock: unknown): Set<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The function files a write leaves behind: named by the lock the directory held (so the CLI
|
|
61
|
+
* wrote them), no longer named by the new lock, and not being written now. A file the person
|
|
62
|
+
* added and no lock ever named is never pruned, nor is an entry that is no code file (such as
|
|
63
|
+
* `functions/`), whose removal would take the whole folder.
|
|
64
|
+
*/
|
|
65
|
+
export declare function orphanedCodeFiles(previousLock: unknown, nextLock: unknown, written: Iterable<string>): string[];
|
|
66
|
+
/**
|
|
67
|
+
* The files of a stored write's answer the CLI may write: every one {@link isPrintedSourcePath}
|
|
68
|
+
* accepts. The write is already stored, so a path refused here is left as it is on disk (it is
|
|
69
|
+
* the author's own file, which the server echoed) with a warning, never thrown: the lock and base
|
|
70
|
+
* are still written, so the directory matches the stored workflow.
|
|
71
|
+
*/
|
|
72
|
+
export declare function writableFiles(files: Record<string, string>): Record<string, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saving a server answer (a get's, or a stored write's) into a workflow source directory: its
|
|
3
|
+
* files, lock and base in one staged update, and the records that say the CLI wrote them.
|
|
4
|
+
*/
|
|
5
|
+
import { type SourceDirChange } from './files';
|
|
6
|
+
import { type PrintedSourceAnswer } from './written';
|
|
7
|
+
/**
|
|
8
|
+
* Writes a server answer into the source directory in one staged update: its files, lock and base,
|
|
9
|
+
* plus `extra`, pruning the function files the previous lock named and the new one no longer does.
|
|
10
|
+
* Returns how many files it wrote. A get refuses an unsafe path first
|
|
11
|
+
* ({@link assertPrintedSourcePaths}); after a stored write one is skipped ({@link writableFiles}).
|
|
12
|
+
*/
|
|
13
|
+
export declare function writeBack(dir: string, answer: PrintedSourceAnswer, previousLock: unknown, extra?: SourceDirChange): Promise<number>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's record of what it last wrote into a source directory (`.sim/written.json`, and the
|
|
3
|
+
* machine-local stat cache beside it), and the edits on disk that record tells apart from its own
|
|
4
|
+
* writes.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* What identifies a file's bytes without reading them, taken when its digest was: the file (device
|
|
8
|
+
* and inode), its size, and its modification and change times. The change time is the one a user
|
|
9
|
+
* tool cannot set back (`cp -p`, `rsync -t` and `touch -d` restore only the modification time), so
|
|
10
|
+
* any write since the digest moves it even when the size and modification time match.
|
|
11
|
+
*/
|
|
12
|
+
export interface FileStat {
|
|
13
|
+
dev: number;
|
|
14
|
+
ino: number;
|
|
15
|
+
size: number;
|
|
16
|
+
mtimeMs: number;
|
|
17
|
+
ctimeMs: number;
|
|
18
|
+
}
|
|
19
|
+
/** The {@link FileStat} of a `stat` result. */
|
|
20
|
+
export declare function fileStatOf(stats: FileStat): FileStat;
|
|
21
|
+
/** Whether two stats name the same, unchanged bytes. */
|
|
22
|
+
export declare function sameFileStat(a: FileStat, b: FileStat): boolean;
|
|
23
|
+
/** A blob's SHA-256 with the stat of the file it was read from. */
|
|
24
|
+
export interface StatDigest extends FileStat {
|
|
25
|
+
sha256: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* What the CLI last wrote, as one command reads it, once: the digests from `.sim/written.json`
|
|
29
|
+
* and the stats from `.sim/cache/stats.json` that still match them.
|
|
30
|
+
*/
|
|
31
|
+
export interface Written {
|
|
32
|
+
digests: Record<string, string>;
|
|
33
|
+
stats: Record<string, FileStat>;
|
|
34
|
+
}
|
|
35
|
+
/** The digest of `text` as `readSourceText` would read it back. */
|
|
36
|
+
export declare function digest(text: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* What `.sim/written.json` records for `files` as they are about to be written, keeping the `kept`
|
|
39
|
+
* digests of files this write leaves as they are. A blob's stat is recorded only beside the digest
|
|
40
|
+
* it was taken with.
|
|
41
|
+
*/
|
|
42
|
+
export declare function writtenRecord(files: Record<string, string>, kept?: Record<string, string>, stats?: ReadonlyMap<string, StatDigest>): Written;
|
|
43
|
+
/**
|
|
44
|
+
* The files that record `written`: `.sim/written.json` (committed) and, when a blob stat is
|
|
45
|
+
* recorded, the machine-local `.sim/cache/stats.json` with the cache folder's own `.gitignore`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function writtenFiles(written: Written): Array<readonly [string, string]>;
|
|
48
|
+
/** What the CLI recorded for its last write, empty when it recorded nothing. */
|
|
49
|
+
export declare function readWritten(dir: string): Promise<Written>;
|
|
50
|
+
/** The blob digests `written` holds with their stats, to carry into the next record. */
|
|
51
|
+
export declare function recordedStats(written: Written): Map<string, StatDigest>;
|
|
52
|
+
/**
|
|
53
|
+
* The files among `touched` (path → the text about to be written, or `null` for a removal) whose
|
|
54
|
+
* text on disk is neither what the CLI last wrote there nor what it is about to write: a write
|
|
55
|
+
* would destroy an edit no apply has saved. A file the CLI has no record of counts as edited, so a
|
|
56
|
+
* hand-written file is never replaced silently either; so does one the CLI wrote that is missing
|
|
57
|
+
* now and would be written again, a delete no apply has sent.
|
|
58
|
+
*/
|
|
59
|
+
export declare function editedFiles(dir: string, touched: ReadonlyMap<string, string | null>, written: Written['digests']): Promise<string[]>;
|
|
60
|
+
/**
|
|
61
|
+
* The source files a write of `answer` would destroy edits in: a file it replaces or prunes whose
|
|
62
|
+
* text on disk is neither what the CLI last wrote there nor what it is about to write.
|
|
63
|
+
*/
|
|
64
|
+
export declare function locallyEditedFiles(dir: string, answer: Pick<PrintedSourceAnswer, 'files' | 'lock'>, previousLock: unknown): Promise<string[]>;
|
|
65
|
+
/** `path` of the workflow folder `key`, relative to its workspace directory. */
|
|
66
|
+
export declare function inWorkspace(key: string, path: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* What the CLI last wrote into the workflow directory `dir`: its own `.sim/written.json`, or for a
|
|
69
|
+
* workflow folder of a workspace directory, the workspace record's entries for the folder (its
|
|
70
|
+
* `.sim/` records left out). A write into such a folder records there and never in the folder, but
|
|
71
|
+
* a CLI from before that left a record of the folder's own. That record wins only when it is the
|
|
72
|
+
* later one: when the workspace record's digest of the folder's `.sim/base.json` is not the base on
|
|
73
|
+
* disk, a single-workflow write replaced the base after the workspace record was taken. Otherwise
|
|
74
|
+
* the folder's own record is stale and ignored.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readFolderWritten(dir: string): Promise<Written>;
|
|
77
|
+
/** What the server answers a get, apply or create with: the printed files, lock and base. */
|
|
78
|
+
export interface PrintedSourceAnswer {
|
|
79
|
+
files: Record<string, string>;
|
|
80
|
+
lock: unknown;
|
|
81
|
+
base: unknown;
|
|
82
|
+
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
/** The command group a directory guide's exit-code table is for. */
|
|
2
|
+
type SourceCommandGroup = 'sim workflows source' | 'sim workspaces source';
|
|
3
|
+
/** A source command whose `--help` lists its exit codes from {@link sourceExitCodeRows}. */
|
|
4
|
+
export type SourceHelpCommand = 'workflows source apply' | 'workflows source create' | 'workflows source get' | 'workspaces source apply' | 'workspaces source get';
|
|
1
5
|
/**
|
|
2
6
|
* Every exit code of the `workflows source` and `workspaces source` commands, as the Markdown
|
|
3
|
-
* table both directory guides (`.sim/AGENTS.md`) print
|
|
4
|
-
*
|
|
7
|
+
* table both directory guides (`.sim/AGENTS.md`) print. `prefix` is the command group the guide
|
|
8
|
+
* is for.
|
|
5
9
|
*/
|
|
6
|
-
export declare function sourceExitCodesTable(prefix:
|
|
10
|
+
export declare function sourceExitCodesTable(prefix: SourceCommandGroup): string;
|
|
11
|
+
/**
|
|
12
|
+
* The exit-code section of `command`'s `--help`: the codes it exits with, in code order, each in
|
|
13
|
+
* the command's own words, from the same rows as {@link sourceExitCodesTable}. `lead` names the
|
|
14
|
+
* section (a get's codes apply only with `--dir`).
|
|
15
|
+
*/
|
|
16
|
+
export declare function sourceExitCodesHelp(command: SourceHelpCommand, lead?: string): string;
|
|
7
17
|
/** The exit codes every source write (apply, create) shares, appended to its help. */
|
|
8
18
|
export declare const SOURCE_WRITE_EXIT_CODES_HELP = "\nExit 13: not logged in, or the server refused the credential (AUTH_REQUIRED); nothing was sent.\nRun `sim login`, or fix or unset SIM_API_KEY when the key comes from it. Exit 130: interrupted\n(Ctrl-C). A write already sent is finished and saved into the directory first, waiting up to\n60s for its answer; a second Ctrl-C, or no answer by then, stops at once and prints that it may\nhave been written and how to check.";
|
|
19
|
+
export {};
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { FileChange, SourceStatus } from '@sim/workspace-code/status';
|
|
8
8
|
import type { OutputFormat } from '../../config/index';
|
|
9
|
+
import type { ApplyWorkspaceSourceResponse } from '../../generated/v2-api';
|
|
9
10
|
import { type Diagnostic } from './source-ui';
|
|
11
|
+
/** One change of a workspace apply's plan. */
|
|
12
|
+
type WorkspacePlanChange = ApplyWorkspaceSourceResponse['data']['plan'][number];
|
|
10
13
|
/** Whether the server was asked: `checked`, `unreachable` (degraded to local), or `offline`. */
|
|
11
14
|
export type ServerCheck = 'checked' | 'unreachable' | 'offline';
|
|
12
15
|
/**
|
|
@@ -157,4 +160,6 @@ export declare function nextStep(status: SourceStatus, input: NextStepInput): Ne
|
|
|
157
160
|
* answers is the resource's own, and is thrown.
|
|
158
161
|
*/
|
|
159
162
|
export declare function readPlan<T>(plan: () => Promise<T>, dryRun: () => Promise<T>): Promise<T>;
|
|
163
|
+
/** The changes that delete something (a resource, rows, documents, columns, a deployment). */
|
|
164
|
+
export declare function destructiveChanges(changes: ReadonlyArray<Pick<WorkspacePlanChange, 'action' | 'destructive'>>): number;
|
|
160
165
|
export {};
|
|
@@ -39,7 +39,11 @@ export interface FindingsOutput {
|
|
|
39
39
|
diagnostics?: ResultDiagnostic[];
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The {@link FindingsOutput} of `format`; `verbose` keeps info findings in a machine result. It is
|
|
44
|
+
* the CLI's output edge, where each finding's message and hint are cut (`boundFindingText`): a
|
|
45
|
+
* finding an offline check made is as long as its source made it until here.
|
|
46
|
+
*/
|
|
43
47
|
export declare function findingsOutput(format: OutputFormat, verbose?: boolean): FindingsOutput;
|
|
44
48
|
/** A resource a source write created, as its result lists it; `id` once it is written. */
|
|
45
49
|
export interface CreatedResource {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one consent-and-write flow of every source write (`workflows source apply` and `create`,
|
|
3
|
+
* `workspaces source apply`): preview, refuse on errors, stop at the plan or ask, then send and
|
|
4
|
+
* save the write with interrupts held, so the commands cannot drift in what they print, ask or
|
|
5
|
+
* exit with.
|
|
6
|
+
*/
|
|
7
|
+
import { type Diagnostic, type WriteMode } from './source-ui';
|
|
8
|
+
/** The next step a result names: a command and why to run it. */
|
|
9
|
+
export interface NextStep {
|
|
10
|
+
command: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
}
|
|
13
|
+
/** What a write answers with, as far as the flow reads it: its findings. */
|
|
14
|
+
interface WriteAnswer {
|
|
15
|
+
diagnostics: ReadonlyArray<Pick<Diagnostic, 'code' | 'severity'>>;
|
|
16
|
+
}
|
|
17
|
+
/** One source write as {@link runSourceWrite} drives it. */
|
|
18
|
+
export interface SourceWriteFlow<D extends WriteAnswer> {
|
|
19
|
+
mode: WriteMode;
|
|
20
|
+
/** The dry run that previews the write, and is the whole of a `--dry-run`. */
|
|
21
|
+
preview(): Promise<D>;
|
|
22
|
+
/** Prints a preview: its findings (and a workspace's plan). */
|
|
23
|
+
show(preview: D): void;
|
|
24
|
+
/** Whether a preview's errors refuse the write, which is then reported and goes no further. */
|
|
25
|
+
refuses(preview: D): boolean;
|
|
26
|
+
/** Prints what a preview that refuses nothing would write, before the plan stop or the question. */
|
|
27
|
+
explain?(preview: D): void;
|
|
28
|
+
/** Runs once the write may go ahead, before it is sent (the preview, or `null` with `--yes`). */
|
|
29
|
+
beforeCommit?(preview: D | null): Promise<void>;
|
|
30
|
+
/** Sends the write and prints its findings. */
|
|
31
|
+
commit(): Promise<D>;
|
|
32
|
+
/** Saves a committed write's answer into the directory, when it stored anything. */
|
|
33
|
+
save(answer: D): Promise<void>;
|
|
34
|
+
/** Prints `answer` as the result, with the next step a plan names. */
|
|
35
|
+
report(answer: D, next?: NextStep): void;
|
|
36
|
+
/** The confirmation question a person at a terminal answers. */
|
|
37
|
+
question: string;
|
|
38
|
+
/** This write as a command, without `--yes`: what a `plan` run names next with it. */
|
|
39
|
+
command: string;
|
|
40
|
+
/** What an interrupt during the send and save prints. */
|
|
41
|
+
interrupt: {
|
|
42
|
+
verb: string;
|
|
43
|
+
dir: string;
|
|
44
|
+
noun: 'workflow' | 'workspace';
|
|
45
|
+
/** The next step when the write's answer never came back, so it may have been stored. */
|
|
46
|
+
ifAnswerLost: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Runs `flow`: in every mode but `write`, previews it and prints the preview, exiting with the
|
|
51
|
+
* refusal's status on errors; a `dry-run` or a refused preview is reported there, a `plan` stops
|
|
52
|
+
* with {@link stopAtPlan}, and `ask` asks. Then sends the write and saves its answer with Ctrl-C
|
|
53
|
+
* held ({@link deferInterrupts}), so an interrupt never strands a stored write the directory did
|
|
54
|
+
* not record. Returns the committed answer for the caller to finish and report, or `null` when
|
|
55
|
+
* the flow ended at the preview, already reported.
|
|
56
|
+
*/
|
|
57
|
+
export declare function runSourceWrite<D extends WriteAnswer>(flow: SourceWriteFlow<D>): Promise<D | null>;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A workflow source directory (`workflow.ts`, its function files, `.sim/lock.json` and
|
|
3
|
+
* `.sim/base.json`): what an apply, status or check reads from it, and what a get or create writes
|
|
4
|
+
* into it, so no command reads another's directory through that command's file.
|
|
5
|
+
*/
|
|
6
|
+
import { type WorkflowLockV1 } from '@sim/workflow-code';
|
|
7
|
+
import type { ApplyWorkflowSourceBody, GetWorkflowSourceResponse } from '../../generated/v2-api';
|
|
8
|
+
import type { OperationClient } from '../../runtime/called-operations';
|
|
9
|
+
import { type SourceTree, type SourceTreeProfile } from './source-tree';
|
|
10
|
+
type SourceBase = ApplyWorkflowSourceBody['base'];
|
|
11
|
+
/**
|
|
12
|
+
* The base an apply sends, refused when it is not the named workflow's: a directory written for
|
|
13
|
+
* one workflow and applied to another would replace that workflow's draft with a stranger's
|
|
14
|
+
* source. Without a `workflowId` the apply targets the workflow the base names.
|
|
15
|
+
*/
|
|
16
|
+
export declare function readBase(directory: string, workflowId: string | undefined): Promise<SourceBase>;
|
|
17
|
+
/** The directory's lock, refused with every problem the lock parser finds. */
|
|
18
|
+
export declare function readLock(directory: string): Promise<WorkflowLockV1>;
|
|
19
|
+
/** The directory's `workflow.ts`, or a refusal naming the command that writes one. */
|
|
20
|
+
export declare function requireEntry(directory: string): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* The files a write sends: the entry file and the code files it or the lock references. A
|
|
23
|
+
* referenced file that is missing is left out, and the server reports it with its source line.
|
|
24
|
+
*/
|
|
25
|
+
export declare function readSourceFiles(directory: string, lock: WorkflowLockV1 | null): Promise<Record<string, string>>;
|
|
26
|
+
/** The create command for `dir` in `workspaceId`, as the next step a starter prints. */
|
|
27
|
+
export declare function createCommand(dir: string, workspaceId: string): string;
|
|
28
|
+
type WorkflowSource = GetWorkflowSourceResponse['data'];
|
|
29
|
+
/** The printed source a tree write saves: a get's answer, or an applied create's. */
|
|
30
|
+
export type PrintedSource = Pick<WorkflowSource, 'workflowId' | 'workspaceId' | 'files' | 'lock' | 'base'>;
|
|
31
|
+
/** The workflow directory's tree beside the printed source. */
|
|
32
|
+
export declare const WORKFLOW_TREE: SourceTreeProfile;
|
|
33
|
+
/**
|
|
34
|
+
* Starts a new source directory: a starter `workflow.ts` plus the tree a get writes (the
|
|
35
|
+
* declarations for the workspace catalog and its resources, `tsconfig.json`, the agent guide),
|
|
36
|
+
* with no lock or base, since no workflow exists yet, and {@link SOURCE_STARTER_FILE} naming the
|
|
37
|
+
* workspace those declarations are for. Only for a directory with no `workflow.ts`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function writeSourceScaffold(client: OperationClient<'getSourceCatalog' | 'getSourceResources'>, dir: string, workspaceId: string): Promise<SourceTree>;
|
|
40
|
+
/**
|
|
41
|
+
* Writes a printed source with everything that makes the directory editable: the declarations
|
|
42
|
+
* for the workspace catalog and its resources, `tsconfig.json`, the agent guide and the LF lines.
|
|
43
|
+
* Shared by `get --dir` and `create --dir`, so a created workflow's directory is the one a get
|
|
44
|
+
* would have written.
|
|
45
|
+
*/
|
|
46
|
+
export declare function writeSourceDirectory(client: OperationClient<'getSourceCatalog' | 'getSourceResources'>, dir: string, source: PrintedSource, blockTypes: readonly string[]): Promise<SourceTree>;
|
|
47
|
+
/**
|
|
48
|
+
* After an apply, points the CLI's tsconfig files at the blocks the applied source uses, so a
|
|
49
|
+
* block the edit added is type-checked by `tsconfig.json` from then on.
|
|
50
|
+
*/
|
|
51
|
+
export declare function refreshWorkflowTsconfigs(dir: string, source: Pick<PrintedSource, 'workspaceId' | 'files'>): Promise<void>;
|
|
52
|
+
export {};
|