@boboddy/sdk 0.5.0 → 0.5.2
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 +2 -2
- package/dist/client.js +20 -20
- package/dist/contracts/artifacts.js +948 -948
- package/dist/defaults/index.js +11 -11
- package/dist/definitions/advancement-policies/index.js +11 -11
- package/dist/definitions/pipelines/chain-graph.d.ts +29 -0
- package/dist/definitions/pipelines/compile-node-definitions.d.ts +0 -8
- package/dist/definitions/pipelines/define-pipeline.d.ts +2 -0
- package/dist/definitions/pipelines/index.js +943 -962
- package/dist/definitions/steps/define-code-step.d.ts +17 -5
- package/dist/definitions/steps/define-step.d.ts +1 -1
- package/dist/definitions/steps/index.js +13861 -13796
- package/dist/definitions/steps/step-features.d.ts +92 -31
- package/dist/definitions/validation/index.d.ts +2 -0
- package/dist/definitions/validation/index.js +1287 -925
- package/dist/definitions/validation/json-schema-paths.d.ts +29 -0
- package/dist/definitions/validation/validate-definition-specs.d.ts +12 -23
- package/dist/definitions/validation/validate-input-bindings.d.ts +7 -0
- package/dist/definitions/validation/validation-issue.d.ts +52 -0
- package/dist/generated/types.gen.d.ts +2 -0
- package/dist/health-checks.js +950 -950
- package/dist/index.js +1294 -1248
- package/dist/jsonc.js +2 -2
- package/dist/opencode-mcp.js +946 -946
- package/dist/opencode-plugin.js +950 -950
- package/dist/push/index.js +14298 -13878
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ZodType } from "zod";
|
|
2
|
-
import type { SignalKeysOf, SignalTypeMapOf, TypedStepDefinitionSpec } from "./define-step";
|
|
2
|
+
import type { EffectiveResult, SignalKeysOf, SignalTypeMapOf, TypedStepDefinitionSpec } from "./define-step";
|
|
3
|
+
import type { AnyStepFeature, FeatureSignalKeys } from "./step-features";
|
|
3
4
|
/**
|
|
4
5
|
* `codeStep()`'s own signal spec shape — unlike `defineStep()`'s
|
|
5
6
|
* `SignalSpecInput`, `type` is required rather than inferred from the
|
|
@@ -17,7 +18,7 @@ export type CodeStepSignalSpec = {
|
|
|
17
18
|
availableWhenResultStatusIn?: string[] | null;
|
|
18
19
|
};
|
|
19
20
|
export type CodeStepFn<TInput, TResult> = (input: TInput) => TResult | Promise<TResult>;
|
|
20
|
-
export type DefineCodeStepInput<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType> = {
|
|
21
|
+
export type DefineCodeStepInput<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType, TFeatures extends ReadonlyArray<AnyStepFeature> = never[]> = {
|
|
21
22
|
key: string;
|
|
22
23
|
name: string;
|
|
23
24
|
description?: string | null;
|
|
@@ -30,11 +31,22 @@ export type DefineCodeStepInput<TInput extends ZodType = ZodType, TResult extend
|
|
|
30
31
|
* Must be a plain named export of the same module `codeStep()` is
|
|
31
32
|
* called from (see docs/research/flat-pipeline-sdk-and-visual-designer.md
|
|
32
33
|
* §7.7/§8's "code-step entrypoints resolve against the target repo").
|
|
34
|
+
*
|
|
35
|
+
* Typed against `EffectiveResult`, not the bare `resultSchema` output, so
|
|
36
|
+
* a step with `features: [Features.notifications()]` can return the
|
|
37
|
+
* `$boboddy_notifications_v1` field (e.g. via `Notify.inApp(...)`)
|
|
38
|
+
* without a type error.
|
|
33
39
|
*/
|
|
34
|
-
fn: CodeStepFn<TInput["_output"], TResult["_output"]
|
|
40
|
+
fn: CodeStepFn<TInput["_output"], EffectiveResult<TResult["_output"], TFeatures>>;
|
|
35
41
|
inputSchema?: TInput;
|
|
36
42
|
resultSchema?: TResult;
|
|
37
43
|
signals?: readonly CodeStepSignalSpec[];
|
|
44
|
+
/**
|
|
45
|
+
* Step features to attach — unlike `defineStep()`, only each feature's
|
|
46
|
+
* `_resultExtension`/`_signals` apply here (there is no prompt to append
|
|
47
|
+
* to on a `kind: "code"` step).
|
|
48
|
+
*/
|
|
49
|
+
features?: TFeatures;
|
|
38
50
|
status?: "draft" | "active";
|
|
39
51
|
};
|
|
40
52
|
/**
|
|
@@ -45,6 +57,6 @@ export type DefineCodeStepInput<TInput extends ZodType = ZodType, TResult extend
|
|
|
45
57
|
* `entrypoint.fn` reference attached instead — see `StepDefinitionSpec`'s
|
|
46
58
|
* own doc comment for what happens to it during collection.
|
|
47
59
|
*/
|
|
48
|
-
export declare function codeStep<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType, const TSignals extends ReadonlyArray<CodeStepSignalSpec> = never[]>(config: DefineCodeStepInput<TInput, TResult> & {
|
|
60
|
+
export declare function codeStep<TInput extends ZodType = ZodType, TResult extends ZodType = ZodType, const TSignals extends ReadonlyArray<CodeStepSignalSpec> = never[], const TFeatures extends ReadonlyArray<AnyStepFeature> = never[]>(config: DefineCodeStepInput<TInput, TResult, TFeatures> & {
|
|
49
61
|
signals?: TSignals;
|
|
50
|
-
}): TypedStepDefinitionSpec<TInput["_output"], TResult["_output"], SignalKeysOf<TSignals>, SignalTypeMapOf<TSignals, TResult["_output"]>>;
|
|
62
|
+
}): TypedStepDefinitionSpec<TInput["_output"], EffectiveResult<TResult["_output"], TFeatures>, SignalKeysOf<TSignals> | FeatureSignalKeys<TFeatures>, SignalTypeMapOf<TSignals, TResult["_output"]>>;
|
|
@@ -159,7 +159,7 @@ export type SignalTypeMapOf<TSignals extends readonly unknown[], TResult> = Pret
|
|
|
159
159
|
sourcePath: infer P extends string;
|
|
160
160
|
} ? TypeAtPath<TResult, P> : unknown;
|
|
161
161
|
}>;
|
|
162
|
-
type EffectiveResult<TResult, TFeatures extends ReadonlyArray<AnyStepFeature>> = Prettify<TResult & FeatureResultExtensions<TFeatures>>;
|
|
162
|
+
export type EffectiveResult<TResult, TFeatures extends ReadonlyArray<AnyStepFeature>> = Prettify<TResult & FeatureResultExtensions<TFeatures>>;
|
|
163
163
|
type HasAdditionalInput<T> = 0 extends 1 & T ? boolean : [unknown] extends [T] ? false : true;
|
|
164
164
|
export type TypedStepDefinitionSpec<TInput = unknown, TResult = unknown, TSignalKeys extends string = string, TSignalTypeMap extends Partial<Record<string, unknown>> = Record<string, unknown>> = StepDefinitionSpec & {
|
|
165
165
|
readonly __inputType: TInput;
|