@boboddy/sdk 0.1.13-alpha → 0.1.15-alpha
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/boboddy-config-parser.js +4 -325
- package/dist/client.js +7 -6
- package/dist/defaults/auth-file.d.ts +14 -0
- package/dist/defaults/base-url.d.ts +1 -0
- package/dist/defaults/index.d.ts +7 -0
- package/dist/defaults/index.js +312 -0
- package/dist/defaults/load-push-defaults.d.ts +21 -0
- package/dist/defaults/project-config.d.ts +5 -0
- package/dist/definitions/advancement-policies/define-advancement-policy.d.ts +4 -0
- package/dist/definitions/advancement-policies/fluent-rules.d.ts +82 -0
- package/dist/definitions/advancement-policies/index.d.ts +1 -0
- package/dist/definitions/advancement-policies/index.js +87 -0
- package/dist/definitions/pipelines/builder.d.ts +85 -0
- package/dist/definitions/pipelines/define-pipeline.d.ts +16 -52
- package/dist/definitions/pipelines/index.d.ts +2 -0
- package/dist/definitions/pipelines/index.js +16069 -202
- package/dist/definitions/pipelines/input-accessor.d.ts +25 -0
- package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +231 -44
- package/dist/definitions/steps/define-step.d.ts +17 -4
- package/dist/definitions/steps/index.d.ts +1 -0
- package/dist/definitions/steps/index.js +1616 -1586
- package/dist/definitions/steps/prompt-template.d.ts +16 -0
- package/dist/definitions/steps/step-definitions-client.d.ts +9 -3
- package/dist/definitions/steps/step-features.d.ts +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +2 -2
- package/dist/generated/types.gen.d.ts +154 -174
- package/dist/index.js +1979 -1989
- package/dist/jsonc.js +1 -0
- package/dist/opencode-mcp.js +1573 -1572
- package/dist/push/index.d.ts +2 -0
- package/dist/push/index.js +16423 -0
- package/dist/push/push-from-directory.d.ts +21 -0
- package/package.json +9 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
1
|
+
import { type ZodType } from "zod";
|
|
2
|
+
import type { StepDefinitionSpec, TypedStepDefinitionSpec } from "../steps/define-step";
|
|
3
3
|
import { type AdvancementPolicy, type SerializedAdvancementPolicy, type SerializedComputedSignalDefinition } from "../advancement-policies/define-advancement-policy";
|
|
4
4
|
export type { AdvancementPolicy, PipelineStepComputedSignalType, } from "../advancement-policies/define-advancement-policy";
|
|
5
5
|
export { Computed, Rule, } from "../advancement-policies/define-advancement-policy";
|
|
6
|
-
type AnyTypedStep = TypedStepDefinitionSpec<any, any, any>;
|
|
6
|
+
type AnyTypedStep = TypedStepDefinitionSpec<any, any, any, any>;
|
|
7
7
|
export type PipelineInputBinding = {
|
|
8
8
|
source: "pipeline_input";
|
|
9
9
|
path: string;
|
|
10
10
|
};
|
|
11
|
+
export type WorkItemBinding = {
|
|
12
|
+
source: "work_item";
|
|
13
|
+
field: "title" | "description";
|
|
14
|
+
};
|
|
11
15
|
export type StepSignalBinding = {
|
|
12
16
|
source: "step_signal";
|
|
13
17
|
step: AnyTypedStep;
|
|
@@ -17,23 +21,7 @@ export type StepOutputBinding = {
|
|
|
17
21
|
source: "step_output";
|
|
18
22
|
step: AnyTypedStep;
|
|
19
23
|
};
|
|
20
|
-
export type AnyBinding = PipelineInputBinding | StepSignalBinding | StepOutputBinding;
|
|
21
|
-
/**
|
|
22
|
-
* Binds a step input field to a field of the pipeline's top-level input.
|
|
23
|
-
* The `path` is validated against the pipeline input schema at compile time.
|
|
24
|
-
*/
|
|
25
|
-
export declare function fromPipelineInput<T extends ZodType>(_schema: T, path: DotPaths<T["_output"]>): PipelineInputBinding;
|
|
26
|
-
/**
|
|
27
|
-
* Binds a step input field to a named signal from a prior step.
|
|
28
|
-
* `signalKey` is validated against the prior step's declared signal keys.
|
|
29
|
-
*/
|
|
30
|
-
export declare function fromSignal<TStep extends AnyTypedStep>(step: TStep, signalKey: TStep["__signalKeys"]): StepSignalBinding;
|
|
31
|
-
/**
|
|
32
|
-
* Binds a step input field to the entire agent output of a prior step.
|
|
33
|
-
* Use this when your consumer handles the full output object directly.
|
|
34
|
-
* For a stable contract, prefer fromSignal() instead.
|
|
35
|
-
*/
|
|
36
|
-
export declare function stepOutput(step: AnyTypedStep): StepOutputBinding;
|
|
24
|
+
export type AnyBinding = PipelineInputBinding | WorkItemBinding | StepSignalBinding | StepOutputBinding;
|
|
37
25
|
export type PipelineStepConfig<TStep extends AnyTypedStep = AnyTypedStep> = {
|
|
38
26
|
step: TStep;
|
|
39
27
|
/** Maps each step input field to an input source. Extra keys are ignored at runtime. */
|
|
@@ -54,6 +42,9 @@ export type PipelineStepConfig<TStep extends AnyTypedStep = AnyTypedStep> = {
|
|
|
54
42
|
type SerializedBinding = {
|
|
55
43
|
source: "pipeline_input";
|
|
56
44
|
path: string;
|
|
45
|
+
} | {
|
|
46
|
+
source: "work_item";
|
|
47
|
+
field: "title" | "description";
|
|
57
48
|
} | {
|
|
58
49
|
source: "step_signal";
|
|
59
50
|
stepKey: string;
|
|
@@ -68,6 +59,7 @@ export type PipelineDefinitionSpec = {
|
|
|
68
59
|
description: string | null;
|
|
69
60
|
version: number;
|
|
70
61
|
status: "draft" | "active" | "archived";
|
|
62
|
+
inputSchemaJson?: Record<string, unknown> | null;
|
|
71
63
|
steps: Array<{
|
|
72
64
|
stepKey: string;
|
|
73
65
|
stepName: string;
|
|
@@ -78,44 +70,16 @@ export type PipelineDefinitionSpec = {
|
|
|
78
70
|
advancementPolicyDefinition: SerializedAdvancementPolicy;
|
|
79
71
|
computedSignalDefinitions: SerializedComputedSignalDefinition[];
|
|
80
72
|
}>;
|
|
81
|
-
/** Step specs referenced by this pipeline.
|
|
73
|
+
/** Step specs referenced by this pipeline. Used by the push command to auto-push steps that aren't explicitly exported. */
|
|
82
74
|
_stepDefinitions?: StepDefinitionSpec[];
|
|
83
75
|
};
|
|
84
|
-
/**
|
|
85
|
-
* Untyped input shape used for documentation and as the internal implementation
|
|
86
|
-
* target. Call sites use the generic overload below which provides per-step
|
|
87
|
-
* signal key validation.
|
|
88
|
-
*/
|
|
89
76
|
export type DefinePipelineInput = {
|
|
90
77
|
key: string;
|
|
91
78
|
name: string;
|
|
92
79
|
description?: string | null;
|
|
93
80
|
version?: number;
|
|
94
81
|
status?: "draft" | "active";
|
|
95
|
-
|
|
82
|
+
input?: ZodType | null;
|
|
83
|
+
steps: ReadonlyArray<PipelineStepConfig>;
|
|
96
84
|
};
|
|
97
|
-
|
|
98
|
-
* Defines a pipeline from an ordered list of step configs.
|
|
99
|
-
*
|
|
100
|
-
* Each step's `advancement` policy is typed against that step's declared signal
|
|
101
|
-
* keys — passing an unknown signal key to `Rule.signal()` / `Rule.when()` is a
|
|
102
|
-
* compile-time error. Inline `Computed.X(...)` tokens can also be used in the
|
|
103
|
-
* signal position; they're walked out of the rules tree at serialization time
|
|
104
|
-
* and emitted as the step's `computedSignalDefinitions`.
|
|
105
|
-
*
|
|
106
|
-
* TypeScript achieves per-element signal key checking by constraining `TSteps`
|
|
107
|
-
* to a tuple of step instances (`AnyTypedStep[]`), not step configs. Each element
|
|
108
|
-
* of `steps` is then typed as `PipelineStepConfig<TSteps[K]>`, giving TypeScript
|
|
109
|
-
* a direct inference site: `step: TSteps[K]` matches the concrete step instance,
|
|
110
|
-
* which carries the signal key union via `__signalKeys`.
|
|
111
|
-
*/
|
|
112
|
-
export declare function definePipeline<const TSteps extends ReadonlyArray<AnyTypedStep>>(config: {
|
|
113
|
-
key: string;
|
|
114
|
-
name: string;
|
|
115
|
-
description?: string | null;
|
|
116
|
-
version?: number;
|
|
117
|
-
status?: "draft" | "active";
|
|
118
|
-
steps: {
|
|
119
|
-
[K in keyof TSteps]: PipelineStepConfig<TSteps[K]>;
|
|
120
|
-
};
|
|
121
|
-
}): PipelineDefinitionSpec;
|
|
85
|
+
export declare function buildPipelineSpec(config: DefinePipelineInput): PipelineDefinitionSpec;
|