mthds 0.1.2 → 0.2.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/dist/agent/commands/build.d.ts +0 -3
- package/dist/agent/commands/build.js +3 -46
- package/dist/agent/commands/build.js.map +1 -1
- package/dist/agent/commands/runner-commands.d.ts +20 -0
- package/dist/agent/commands/runner-commands.js +800 -0
- package/dist/agent/commands/runner-commands.js.map +1 -0
- package/dist/agent/commands/validate.js +1 -1
- package/dist/agent/commands/validate.js.map +1 -1
- package/dist/agent-cli.js +6 -107
- package/dist/agent-cli.js.map +1 -1
- package/dist/cli/commands/build.d.ts +0 -3
- package/dist/cli/commands/build.js +3 -50
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/index.js +0 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/run.js +1 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/validate.js +1 -1
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli.js +2 -13
- package/dist/cli.js.map +1 -1
- package/dist/client/client.js +6 -6
- package/dist/client/client.js.map +1 -1
- package/dist/client/pipeline.d.ts +2 -2
- package/dist/runners/api-runner.d.ts +5 -2
- package/dist/runners/api-runner.js +20 -3
- package/dist/runners/api-runner.js.map +1 -1
- package/dist/runners/pipelex-runner.d.ts +5 -2
- package/dist/runners/pipelex-runner.js +108 -57
- package/dist/runners/pipelex-runner.js.map +1 -1
- package/dist/runners/types.d.ts +56 -18
- package/package.json +1 -1
- package/dist/agent/commands/pipelex.d.ts +0 -7
- package/dist/agent/commands/pipelex.js +0 -79
- package/dist/agent/commands/pipelex.js.map +0 -1
package/dist/runners/types.d.ts
CHANGED
|
@@ -8,25 +8,21 @@ export declare const RUNNER_NAMES: RunnerType[];
|
|
|
8
8
|
export type PipelineState = "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ERROR" | "STARTED";
|
|
9
9
|
export type ConceptRepresentationFormat = "json" | "python" | "schema";
|
|
10
10
|
export interface BuildInputsRequest {
|
|
11
|
-
|
|
11
|
+
mthds_contents: string[];
|
|
12
12
|
pipe_code: string;
|
|
13
13
|
}
|
|
14
14
|
export interface BuildOutputRequest {
|
|
15
|
-
|
|
15
|
+
mthds_contents: string[];
|
|
16
16
|
pipe_code: string;
|
|
17
17
|
format?: ConceptRepresentationFormat;
|
|
18
18
|
}
|
|
19
|
-
export interface BuildPipeRequest {
|
|
20
|
-
brief: string;
|
|
21
|
-
output?: string;
|
|
22
|
-
}
|
|
23
19
|
export interface BuildRunnerRequest {
|
|
24
|
-
|
|
20
|
+
mthds_contents: string[];
|
|
25
21
|
pipe_code: string;
|
|
26
22
|
}
|
|
27
23
|
export interface ExecuteRequest {
|
|
28
|
-
/** MTHDS bundle content to validate, load, and execute. Omit to run an already-loaded pipe. */
|
|
29
|
-
|
|
24
|
+
/** MTHDS bundle content(s) to validate, load, and execute. Omit to run an already-loaded pipe. */
|
|
25
|
+
mthds_contents?: string[];
|
|
30
26
|
pipe_code?: string;
|
|
31
27
|
inputs?: Record<string, unknown>;
|
|
32
28
|
}
|
|
@@ -35,14 +31,23 @@ export interface ValidateRequest {
|
|
|
35
31
|
method_url?: string;
|
|
36
32
|
/** Pipe code to validate (optional — validates a specific pipe). */
|
|
37
33
|
pipe_code?: string;
|
|
38
|
-
/** Raw .mthds file content
|
|
39
|
-
|
|
34
|
+
/** Raw .mthds file content(s). */
|
|
35
|
+
mthds_contents?: string[];
|
|
40
36
|
}
|
|
41
|
-
export interface
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
export interface ConceptRequest {
|
|
38
|
+
spec: Record<string, unknown>;
|
|
39
|
+
}
|
|
40
|
+
export interface PipeSpecRequest {
|
|
41
|
+
pipe_type: string;
|
|
42
|
+
spec: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
export interface AssembleRequest {
|
|
45
|
+
domain: string;
|
|
46
|
+
main_pipe: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
system_prompt?: string;
|
|
49
|
+
concepts?: string[];
|
|
50
|
+
pipes?: string[];
|
|
46
51
|
}
|
|
47
52
|
export interface BuildRunnerResponse {
|
|
48
53
|
python_code: string;
|
|
@@ -81,19 +86,52 @@ export interface PipelexBundleBlueprint {
|
|
|
81
86
|
pipe?: Record<string, unknown> | null;
|
|
82
87
|
}
|
|
83
88
|
export interface ValidateResponse {
|
|
84
|
-
|
|
89
|
+
mthds_contents: string[];
|
|
85
90
|
pipelex_bundle_blueprint: PipelexBundleBlueprint;
|
|
86
91
|
success: boolean;
|
|
87
92
|
message: string;
|
|
88
93
|
}
|
|
94
|
+
export interface ConceptResponse {
|
|
95
|
+
success: boolean;
|
|
96
|
+
concept_code: string;
|
|
97
|
+
toml: string;
|
|
98
|
+
}
|
|
99
|
+
export interface PipeSpecResponse {
|
|
100
|
+
success: boolean;
|
|
101
|
+
pipe_code: string;
|
|
102
|
+
pipe_type: string;
|
|
103
|
+
toml: string;
|
|
104
|
+
}
|
|
105
|
+
export interface AssembleResponse {
|
|
106
|
+
success: boolean;
|
|
107
|
+
toml: string;
|
|
108
|
+
domain: string;
|
|
109
|
+
main_pipe: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ModelsRequest {
|
|
112
|
+
type?: string[];
|
|
113
|
+
}
|
|
114
|
+
export interface ModelsResponse {
|
|
115
|
+
success: boolean;
|
|
116
|
+
presets: Record<string, Array<{
|
|
117
|
+
name: string;
|
|
118
|
+
description?: string;
|
|
119
|
+
}>>;
|
|
120
|
+
aliases: Record<string, Record<string, string>>;
|
|
121
|
+
waterfalls: Record<string, Record<string, string[]>>;
|
|
122
|
+
talent_mappings: Record<string, Record<string, string>>;
|
|
123
|
+
}
|
|
89
124
|
export interface Runner extends RunnerProtocol {
|
|
90
125
|
readonly type: RunnerType;
|
|
91
126
|
health(): Promise<Record<string, unknown>>;
|
|
92
127
|
version(): Promise<Record<string, string>>;
|
|
93
128
|
buildInputs(request: BuildInputsRequest): Promise<unknown>;
|
|
94
129
|
buildOutput(request: BuildOutputRequest): Promise<unknown>;
|
|
95
|
-
buildPipe(request: BuildPipeRequest): Promise<BuildPipeResponse>;
|
|
96
130
|
buildRunner(request: BuildRunnerRequest): Promise<BuildRunnerResponse>;
|
|
97
131
|
execute(request: ExecuteRequest): Promise<PipelineResponse>;
|
|
98
132
|
validate(request: ValidateRequest): Promise<ValidateResponse>;
|
|
133
|
+
concept(request: ConceptRequest): Promise<ConceptResponse>;
|
|
134
|
+
pipeSpec(request: PipeSpecRequest): Promise<PipeSpecResponse>;
|
|
135
|
+
assemble(request: AssembleRequest): Promise<AssembleResponse>;
|
|
136
|
+
models(request?: ModelsRequest): Promise<ModelsResponse>;
|
|
99
137
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Passthrough command group that forwards to pipelex-agent.
|
|
3
|
-
*
|
|
4
|
-
* mthds-agent pipelex <cmd> [args...] -> pipelex-agent <cmd> [args...]
|
|
5
|
-
*/
|
|
6
|
-
import { Command } from "commander";
|
|
7
|
-
export declare function registerPipelexCommands(program: Command, logLevelArgs: () => string[], autoInstall: () => boolean): void;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Passthrough command group that forwards to pipelex-agent.
|
|
3
|
-
*
|
|
4
|
-
* mthds-agent pipelex <cmd> [args...] -> pipelex-agent <cmd> [args...]
|
|
5
|
-
*/
|
|
6
|
-
import { passthrough } from "../passthrough.js";
|
|
7
|
-
const PIPELEX_COMMANDS = [
|
|
8
|
-
"init",
|
|
9
|
-
"validate",
|
|
10
|
-
"inputs",
|
|
11
|
-
"concept",
|
|
12
|
-
"pipe",
|
|
13
|
-
"assemble",
|
|
14
|
-
"models",
|
|
15
|
-
"doctor",
|
|
16
|
-
];
|
|
17
|
-
/** Commands forwarded to `pipelex` (interactive CLI) instead of `pipelex-agent`. */
|
|
18
|
-
const PIPELEX_INTERACTIVE_COMMANDS = ["login"];
|
|
19
|
-
const PIPELEX_RUN_SUBCOMMANDS = ["pipe", "bundle", "method"];
|
|
20
|
-
export function registerPipelexCommands(program, logLevelArgs, autoInstall) {
|
|
21
|
-
const pipelexGroup = program
|
|
22
|
-
.command("pipelex")
|
|
23
|
-
.description("Forward commands to pipelex-agent")
|
|
24
|
-
.passThroughOptions()
|
|
25
|
-
.allowUnknownOption();
|
|
26
|
-
// Interactive commands go to `pipelex` (not pipelex-agent) because they
|
|
27
|
-
// require browser interaction (e.g. login opens the browser for OAuth).
|
|
28
|
-
for (const subcmd of PIPELEX_INTERACTIVE_COMMANDS) {
|
|
29
|
-
pipelexGroup
|
|
30
|
-
.command(subcmd)
|
|
31
|
-
.description(`Forward to pipelex ${subcmd}`)
|
|
32
|
-
.allowUnknownOption()
|
|
33
|
-
.allowExcessArguments(true)
|
|
34
|
-
.passThroughOptions()
|
|
35
|
-
.action((_options, cmd) => {
|
|
36
|
-
const remaining = cmd.args;
|
|
37
|
-
passthrough("pipelex", [subcmd, "--no-logo", ...remaining], {
|
|
38
|
-
autoInstall: autoInstall(),
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
for (const subcmd of PIPELEX_COMMANDS) {
|
|
43
|
-
pipelexGroup
|
|
44
|
-
.command(subcmd)
|
|
45
|
-
.description(`Forward to pipelex-agent ${subcmd}`)
|
|
46
|
-
.allowUnknownOption()
|
|
47
|
-
.allowExcessArguments(true)
|
|
48
|
-
.passThroughOptions()
|
|
49
|
-
.action((_options, cmd) => {
|
|
50
|
-
const remaining = cmd.args;
|
|
51
|
-
passthrough("pipelex-agent", [...logLevelArgs(), subcmd, ...remaining], {
|
|
52
|
-
autoInstall: autoInstall(),
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
// Register `run` as a sub-group with `pipe` and `method` subcommands:
|
|
57
|
-
// mthds-agent pipelex run pipe <args> -> pipelex-agent run pipe <args>
|
|
58
|
-
// mthds-agent pipelex run method <args> -> pipelex-agent run method <args>
|
|
59
|
-
const runGroup = pipelexGroup
|
|
60
|
-
.command("run")
|
|
61
|
-
.description("Forward to pipelex-agent run (pipe, bundle, or method)")
|
|
62
|
-
.passThroughOptions()
|
|
63
|
-
.allowUnknownOption();
|
|
64
|
-
for (const runSub of PIPELEX_RUN_SUBCOMMANDS) {
|
|
65
|
-
runGroup
|
|
66
|
-
.command(runSub)
|
|
67
|
-
.description(`Forward to pipelex-agent run ${runSub}`)
|
|
68
|
-
.allowUnknownOption()
|
|
69
|
-
.allowExcessArguments(true)
|
|
70
|
-
.passThroughOptions()
|
|
71
|
-
.action((_options, cmd) => {
|
|
72
|
-
const remaining = cmd.args;
|
|
73
|
-
passthrough("pipelex-agent", [...logLevelArgs(), "run", runSub, ...remaining], {
|
|
74
|
-
autoInstall: autoInstall(),
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=pipelex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pipelex.js","sourceRoot":"","sources":["../../../src/agent/commands/pipelex.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,gBAAgB,GAAG;IACvB,MAAM;IACN,UAAU;IACV,QAAQ;IACR,SAAS;IACT,MAAM;IACN,UAAU;IACV,QAAQ;IACR,QAAQ;CACA,CAAC;AAEX,oFAAoF;AACpF,MAAM,4BAA4B,GAAG,CAAC,OAAO,CAAU,CAAC;AAExD,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAEtE,MAAM,UAAU,uBAAuB,CACrC,OAAgB,EAChB,YAA4B,EAC5B,WAA0B;IAE1B,MAAM,YAAY,GAAG,OAAO;SACzB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,mCA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