@flovialabs/sdk 0.1.23 → 0.1.25
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/CHANGELOG.md +26 -0
- package/README.md +27 -14
- package/dist/account.d.ts +12 -0
- package/dist/account.js +110 -0
- package/dist/accountcommands.d.ts +17 -0
- package/dist/accountcommands.js +124 -0
- package/dist/args.d.ts +19 -0
- package/dist/args.js +91 -0
- package/dist/cli.d.ts +11 -36
- package/dist/cli.js +31 -993
- package/dist/client.d.ts +4 -5
- package/dist/client.js +29 -294
- package/dist/commandhelp.d.ts +7 -0
- package/dist/commandhelp.js +52 -0
- package/dist/doctor.d.ts +11 -7
- package/dist/doctor.js +50 -23
- package/dist/doctorcommand.d.ts +9 -0
- package/dist/doctorcommand.js +125 -0
- package/dist/examples.d.ts +2 -0
- package/dist/examples.js +29 -0
- package/dist/generatecommand.d.ts +15 -0
- package/dist/generatecommand.js +64 -0
- package/dist/generation.d.ts +6 -0
- package/dist/generation.js +30 -0
- package/dist/install.d.ts +15 -2
- package/dist/install.js +77 -12
- package/dist/installcommand.d.ts +4 -0
- package/dist/installcommand.js +251 -0
- package/dist/keyfile.d.ts +6 -0
- package/dist/keyfile.js +33 -0
- package/dist/nodeio.d.ts +7 -0
- package/dist/nodeio.js +62 -0
- package/dist/output.d.ts +26 -0
- package/dist/output.js +196 -0
- package/dist/reply.d.ts +9 -0
- package/dist/reply.js +36 -0
- package/dist/runwayoutput.d.ts +5 -0
- package/dist/runwayoutput.js +44 -0
- package/dist/sandbox.d.ts +13 -0
- package/dist/sandbox.js +80 -0
- package/dist/sandboxcommands.d.ts +14 -0
- package/dist/sandboxcommands.js +90 -0
- package/dist/toolcommands.d.ts +14 -0
- package/dist/toolcommands.js +65 -0
- package/dist/transport.d.ts +11 -0
- package/dist/transport.js +2 -0
- package/dist/types.d.ts +20 -7
- package/dist/types.js +3 -2
- package/package.json +5 -2
package/dist/cli.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
export { plain } from "./output.js";
|
|
3
|
+
export { exampleCall } from "./examples.js";
|
|
4
|
+
export { readStdin, writePrivateOutput } from "./nodeio.js";
|
|
5
5
|
export interface Io {
|
|
6
6
|
env: Record<string, string | undefined>;
|
|
7
7
|
out: (s: string) => void;
|
|
@@ -19,40 +19,15 @@ export interface Io {
|
|
|
19
19
|
now?: () => number;
|
|
20
20
|
/** TTY-only waiting feedback on stderr; returns a cleanup function. Never used with --json. */
|
|
21
21
|
waiting?: () => () => void;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Runs a client's own CLI (install); resolves its exit code, or "timeout" after stopping it at timeoutMs.
|
|
24
|
+
* Rejects with code ENOENT when it is not installed. showOutput passes its output to stderr (a sign-in URL); otherwise it is dropped.
|
|
25
|
+
*/
|
|
26
|
+
exec?: (command: string, args: string[], o?: {
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
showOutput?: boolean;
|
|
29
|
+
}) => Promise<number | "timeout">;
|
|
24
30
|
/** Writes a client's settings file (install), creating its directory. */
|
|
25
31
|
writeFile?: (path: string, text: string) => Promise<void>;
|
|
26
32
|
}
|
|
27
|
-
export declare const AGENTS_MD = "## Flovia\n- Flovia is available through the `flovia` CLI. The key is in the FLOVIA_KEY environment variable; never paste, print or commit it.\n- Run `flovia status` first: it shows allowances, services and any consent the person must answer.\n- Find a tool with `flovia tools`, and its arguments with `flovia tools <tool> --json`.\n- Write the arguments to request.json, then run `flovia call <tool> - < request.json`.\n- Before a data lookup, save request.json with its operation_id. To recover a lost reply, send the same file with the same id; never a new id.\n- On an error, read `next_step` (and `retry_after_seconds`) and follow it. With `--json`, errors are one JSON object on stdout.\n";
|
|
28
|
-
/** Required properties plus Exa/Firecrawl's default-operation inputs, which are conditional in the schema. */
|
|
29
|
-
export declare function exampleCall(tool: string, schema: unknown): string;
|
|
30
|
-
export declare function help(command?: string): string;
|
|
31
|
-
export interface Parsed {
|
|
32
|
-
command: string;
|
|
33
|
-
flags: Map<string, string | true>;
|
|
34
|
-
positional: string[];
|
|
35
|
-
}
|
|
36
|
-
export declare function parse(argv: string[]): Parsed;
|
|
37
|
-
/** "Oct 18 07:21 UTC", with the year when it is not this UTC year; anything that is not a time is shown as it came. */
|
|
38
|
-
export declare function when(v: unknown, now?: number): string;
|
|
39
|
-
export declare function renderStatus(s: StatusReply, expected: string | null, now?: number): string;
|
|
40
|
-
export declare function renderUsage(u: UsageTodayReply, today?: boolean, now?: number): string;
|
|
41
|
-
export declare function renderResets(r: BankedResets, s: StatusReply, now?: number): string;
|
|
42
|
-
export declare function renderConsent(c: ConsentState): string;
|
|
43
|
-
/**
|
|
44
|
-
* Text for a terminal: a run's stdout, labels and notices come from code (for a Team task, another member's code), so escape sequences (CSI, OSC and
|
|
45
|
-
* the rest) and control characters are removed; only newline and tab stay. --json output is not passed through here.
|
|
46
|
-
*/
|
|
47
|
-
export declare const plain: (s: string) => string;
|
|
48
|
-
export declare function renderSandboxRuns(r: SandboxRunsReply, now?: number): string;
|
|
49
|
-
/** stdout is the user's own code's output, printed without control characters (plain); the status lines go after it. */
|
|
50
|
-
export declare function renderSandboxResult(r: SandboxResultReply, now?: number): string;
|
|
51
|
-
export declare function renderSandboxSchedules(r: SandboxSchedulesReply, now?: number): string;
|
|
52
|
-
export declare function renderWorkspace(r: WorkspaceListReply, now?: number): string;
|
|
53
|
-
export declare function renderWorkspaceRead(r: WorkspaceReadReply, now?: number): string;
|
|
54
|
-
/** A refusal or failure: code, next_step, executed; a handshake's notice or question is shown for the person, never answered here. */
|
|
55
|
-
export declare function renderError(e: FloviaError): string;
|
|
56
33
|
export declare function run(argv: string[], io: Io): Promise<number>;
|
|
57
|
-
/** Decode UTF-8 once over all bytes (a character split between reads survives); invalid bytes throw instead of becoming U+FFFD. */
|
|
58
|
-
export declare function readStdin(input: NodeJS.ReadableStream): Promise<string>;
|