@otto-code/cli 0.8.18 → 0.9.0
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/bin/otto +2 -2
- package/dist/cli.js +13 -0
- package/dist/commands/architectural-view/deliver.d.ts +18 -0
- package/dist/commands/architectural-view/deliver.js +60 -0
- package/dist/commands/architectural-view/draft.d.ts +33 -0
- package/dist/commands/architectural-view/draft.js +128 -0
- package/dist/commands/architectural-view/index.d.ts +3 -0
- package/dist/commands/architectural-view/index.js +48 -0
- package/dist/commands/architectural-view/shared.d.ts +7 -0
- package/dist/commands/architectural-view/shared.js +27 -0
- package/dist/commands/artifact/cancel.d.ts +13 -0
- package/dist/commands/artifact/cancel.js +38 -0
- package/dist/commands/artifact/create.d.ts +21 -0
- package/dist/commands/artifact/create.js +56 -0
- package/dist/commands/artifact/get-data.d.ts +5 -0
- package/dist/commands/artifact/get-data.js +24 -0
- package/dist/commands/artifact/index.d.ts +3 -0
- package/dist/commands/artifact/index.js +55 -0
- package/dist/commands/artifact/ls.d.ts +20 -0
- package/dist/commands/artifact/ls.js +72 -0
- package/dist/commands/artifact/move.d.ts +15 -0
- package/dist/commands/artifact/move.js +41 -0
- package/dist/commands/artifact/regenerate.d.ts +12 -0
- package/dist/commands/artifact/regenerate.js +32 -0
- package/dist/commands/artifact/repair.d.ts +13 -0
- package/dist/commands/artifact/repair.js +38 -0
- package/dist/commands/artifact/shared.d.ts +10 -0
- package/dist/commands/artifact/shared.js +62 -0
- package/dist/commands/artifact/update-data.d.ts +13 -0
- package/dist/commands/artifact/update-data.js +43 -0
- package/dist/commands/daemon/index.js +3 -1
- package/dist/commands/daemon/reload.d.ts +10 -0
- package/dist/commands/daemon/reload.js +36 -0
- package/dist/commands/hub/daemon-client.d.ts +7 -0
- package/dist/commands/hub/hub-client/index.d.ts +3 -2
- package/dist/commands/hub/hub-client/index.js +12 -1
- package/dist/commands/hub/hub-client/internal/contracts.d.ts +17 -0
- package/dist/commands/hub/hub-client/internal/contracts.js +14 -0
- package/dist/commands/hub/index.js +3 -1
- package/dist/commands/hub/init-plan.d.ts +3 -0
- package/dist/commands/hub/init-plan.js +8 -4
- package/dist/commands/hub/init.d.ts +18 -3
- package/dist/commands/hub/init.js +218 -78
- package/dist/commands/hub/login.d.ts +2 -0
- package/dist/commands/hub/login.js +8 -2
- package/dist/commands/hub/starter-agent-runtime.d.ts +37 -0
- package/dist/commands/hub/starter-agent-runtime.js +49 -0
- package/dist/commands/hub/starter-trigger.d.ts +10 -0
- package/dist/commands/hub/starter-trigger.js +28 -0
- package/dist/commands/plugin/index.d.ts +14 -0
- package/dist/commands/plugin/index.js +84 -0
- package/dist/commands/plugin/scaffold.d.ts +6 -0
- package/dist/commands/plugin/scaffold.js +329 -0
- package/dist/commands/plugin/shared.d.ts +4 -0
- package/dist/commands/plugin/shared.js +26 -0
- package/dist/commands/project/create.d.ts +10 -0
- package/dist/commands/project/create.js +41 -0
- package/dist/commands/project/delete.d.ts +9 -0
- package/dist/commands/project/delete.js +33 -0
- package/dist/commands/project/index.d.ts +3 -0
- package/dist/commands/project/index.js +28 -0
- package/dist/commands/project/ls.d.ts +5 -0
- package/dist/commands/project/ls.js +19 -0
- package/dist/commands/project/rename.d.ts +15 -0
- package/dist/commands/project/rename.js +50 -0
- package/dist/commands/project/shared.d.ts +11 -0
- package/dist/commands/project/shared.js +18 -0
- package/dist/commands/schedule/shared.js +3 -0
- package/dist/commands/schedule/types.d.ts +4 -0
- package/dist/commands/workflow/graph.d.ts +85 -0
- package/dist/commands/workflow/graph.js +462 -0
- package/dist/commands/workflow/index.d.ts +3 -0
- package/dist/commands/workflow/index.js +43 -0
- package/dist/output/index.d.ts +1 -1
- package/dist/output/pairing.js +1 -1
- package/dist/output/render.js +6 -0
- package/dist/output/types.d.ts +14 -0
- package/package.json +5 -5
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { withOutput } from "../../output/index.js";
|
|
3
|
+
import { addJsonAndDaemonHostOptions, addJsonOption } from "../../utils/command-options.js";
|
|
4
|
+
import { runWorkflowGraphInspectCommand, runWorkflowGraphExportCommand, runWorkflowGraphImportCommand, runWorkflowGraphListCommand, runWorkflowGraphRunCommand, runWorkflowGraphValidateCommand, } from "./graph.js";
|
|
5
|
+
export function createWorkflowCommand() {
|
|
6
|
+
const workflow = new Command("workflow").description("Manage Workflow definitions and runs");
|
|
7
|
+
const graph = workflow.command("graph").description("Inspect, validate, and run Graph Workflows");
|
|
8
|
+
addJsonAndDaemonHostOptions(graph.command("ls").description("List saved Graphs")).action(withOutput(runWorkflowGraphListCommand));
|
|
9
|
+
addJsonAndDaemonHostOptions(graph.command("inspect").description("Inspect a saved Graph").argument("<id>", "Graph ID")).action(withOutput(runWorkflowGraphInspectCommand));
|
|
10
|
+
addJsonAndDaemonHostOptions(graph
|
|
11
|
+
.command("export")
|
|
12
|
+
.description("Export a saved Graph for explicit sharing")
|
|
13
|
+
.argument("<id>", "Graph ID")
|
|
14
|
+
.requiredOption("--output <file>", "Portable Graph export path")).action(withOutput(runWorkflowGraphExportCommand));
|
|
15
|
+
addJsonAndDaemonHostOptions(graph
|
|
16
|
+
.command("import")
|
|
17
|
+
.description("Review or confirm a Graph copy into a project Workflow store")
|
|
18
|
+
.argument("<file>", "Portable Graph export path")
|
|
19
|
+
.requiredOption("--cwd <path>", "Destination project or workspace path")
|
|
20
|
+
.option("--confirm", "Confirm review and write the Graph copy")).action(withOutput(runWorkflowGraphImportCommand));
|
|
21
|
+
addJsonOption(graph
|
|
22
|
+
.command("validate")
|
|
23
|
+
.description("Validate a local Graph JSON document without importing or running it")
|
|
24
|
+
.argument("<file>", "Path to a Graph JSON document")).action(withOutput(runWorkflowGraphValidateCommand));
|
|
25
|
+
addJsonAndDaemonHostOptions(graph
|
|
26
|
+
.command("run")
|
|
27
|
+
.description("Run a saved Graph Workflow")
|
|
28
|
+
.argument("<id>", "Saved Graph ID")
|
|
29
|
+
.option("--cwd <path>", "Workspace directory (default: current; required with --host)")
|
|
30
|
+
.option("--workspace <id>", "Existing workspace ID")
|
|
31
|
+
.option("--title <title>", "Workflow title (default: Graph name)")
|
|
32
|
+
.option("--description <text>", "Workflow description")
|
|
33
|
+
.option("--input <key=value>", "Graph input; repeat for each value", collectGraphInput, [])
|
|
34
|
+
.option("--orchestrator-profile <id>", "Agent profile for the orchestrator")
|
|
35
|
+
.option("--orchestrator-provider <provider>", "Provider for the orchestrator")
|
|
36
|
+
.option("--orchestrator-model <model>", "Model for --orchestrator-provider")
|
|
37
|
+
.option("--orchestrator-thinking <id>", "Thinking option for the orchestrator")).action(withOutput(runWorkflowGraphRunCommand));
|
|
38
|
+
return workflow;
|
|
39
|
+
}
|
|
40
|
+
function collectGraphInput(value, previous) {
|
|
41
|
+
return [...previous, value];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
package/dist/output/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* const output = render(result, { format: 'json' })
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
export type { OutputFormat, OutputOptions, ColumnDef, OutputSchema, CommandResult, SingleResult, ListResult, AnyCommandResult, CommandError, } from "./types.js";
|
|
38
|
+
export type { OutputFormat, OutputOptions, ColumnDef, OutputSchema, CommandResult, SingleResult, ListResult, AnyCommandResult, CommandDiagnostic, CommandError, } from "./types.js";
|
|
39
39
|
export { renderTable, renderTableHeader, renderTableRow } from "./table.js";
|
|
40
40
|
export { renderJson, renderJsonLine } from "./json.js";
|
|
41
41
|
export { renderYaml, renderYamlDoc } from "./yaml.js";
|
package/dist/output/pairing.js
CHANGED
|
@@ -19,6 +19,6 @@ function formatQr(qr, columns) {
|
|
|
19
19
|
return qr;
|
|
20
20
|
}
|
|
21
21
|
export function formatPairingInstructions({ url, qr, columns }) {
|
|
22
|
-
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n`;
|
|
22
|
+
return `\nScan to pair:\n${formatQr(qr, columns)}\n\nPairing link:\n${url}\n\nTreat this pairing link like a password. Anyone with it can access this daemon.\n`;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=pairing.js.map
|
package/dist/output/render.js
CHANGED
|
@@ -78,6 +78,12 @@ export function renderError(error, options = {}) {
|
|
|
78
78
|
if (error.details && typeof error.details === "string") {
|
|
79
79
|
return `${prefix}${message}\n${error.details}`;
|
|
80
80
|
}
|
|
81
|
+
if (error.diagnostics?.length) {
|
|
82
|
+
const diagnostics = error.diagnostics
|
|
83
|
+
.map((diagnostic) => `${diagnostic.path || "document"}: ${diagnostic.message}\nRecovery: ${diagnostic.recovery}`)
|
|
84
|
+
.join("\n");
|
|
85
|
+
return `${prefix}${message}\n${diagnostics}`;
|
|
86
|
+
}
|
|
81
87
|
return `${prefix}${message}`;
|
|
82
88
|
}
|
|
83
89
|
//# sourceMappingURL=render.js.map
|
package/dist/output/types.d.ts
CHANGED
|
@@ -62,6 +62,18 @@ export type AnyCommandResult<T> = T extends unknown ? SingleResult<T> | ListResu
|
|
|
62
62
|
/** Base interface for command results (deprecated, use SingleResult or ListResult) */
|
|
63
63
|
export type CommandResult<T> = SingleResult<T> | ListResult<T>;
|
|
64
64
|
/** Structured error for command failures */
|
|
65
|
+
export interface CommandDiagnostic {
|
|
66
|
+
/** Stable category for filtering and recovery automation. */
|
|
67
|
+
code: string;
|
|
68
|
+
/** Whether this diagnostic prevents the requested operation. */
|
|
69
|
+
severity: "error" | "warning";
|
|
70
|
+
/** JSON Pointer or another source location, when available. */
|
|
71
|
+
path: string;
|
|
72
|
+
/** Human-readable explanation. */
|
|
73
|
+
message: string;
|
|
74
|
+
/** Concrete next action the caller can take. */
|
|
75
|
+
recovery: string;
|
|
76
|
+
}
|
|
65
77
|
export interface CommandError {
|
|
66
78
|
/** Machine-readable error code */
|
|
67
79
|
code: string;
|
|
@@ -69,5 +81,7 @@ export interface CommandError {
|
|
|
69
81
|
message: string;
|
|
70
82
|
/** Additional context */
|
|
71
83
|
details?: unknown;
|
|
84
|
+
/** Stable, source-located diagnostics for validation failures. */
|
|
85
|
+
diagnostics?: CommandDiagnostic[];
|
|
72
86
|
}
|
|
73
87
|
//# sourceMappingURL=types.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@otto-code/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Otto CLI - control your AI coding agents from the command line",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"bin": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@clack/prompts": "^1.0.0",
|
|
32
|
-
"@otto-code/brain": "0.
|
|
33
|
-
"@otto-code/client": "0.
|
|
34
|
-
"@otto-code/protocol": "0.
|
|
35
|
-
"@otto-code/server": "0.
|
|
32
|
+
"@otto-code/brain": "0.9.0",
|
|
33
|
+
"@otto-code/client": "0.9.0",
|
|
34
|
+
"@otto-code/protocol": "0.9.0",
|
|
35
|
+
"@otto-code/server": "0.9.0",
|
|
36
36
|
"chalk": "^5.3.0",
|
|
37
37
|
"commander": "^12.0.0",
|
|
38
38
|
"mime-types": "^2.1.35",
|