@boboddy/sdk 0.0.13-alpha → 0.1.0-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.
Files changed (43) hide show
  1. package/dist/boboddy-config-parser.d.ts +34 -0
  2. package/dist/boboddy-config-parser.js +510 -0
  3. package/dist/client.d.ts +3 -1
  4. package/dist/client.js +1327 -45
  5. package/dist/definitions/advancement-policies/define-advancement-policy.d.ts +218 -0
  6. package/dist/definitions/advancement-policies/index.d.ts +1 -0
  7. package/dist/definitions/advancement-policies/index.js +95 -0
  8. package/dist/definitions/pipelines/define-pipeline.d.ts +112 -0
  9. package/dist/definitions/pipelines/index.d.ts +1 -0
  10. package/dist/definitions/pipelines/index.js +141 -0
  11. package/dist/{define-step.d.ts → definitions/steps/define-step.d.ts} +37 -4
  12. package/dist/definitions/steps/index.d.ts +2 -0
  13. package/dist/definitions/steps/index.js +13302 -0
  14. package/dist/definitions/steps/step-definitions-client.d.ts +197 -0
  15. package/dist/generated/client/client.gen.d.ts +2 -0
  16. package/dist/generated/client/index.d.ts +8 -0
  17. package/dist/generated/client/types.gen.d.ts +117 -0
  18. package/dist/generated/client/utils.gen.d.ts +33 -0
  19. package/dist/generated/client.gen.d.ts +12 -0
  20. package/dist/generated/core/auth.gen.d.ts +18 -0
  21. package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
  22. package/dist/generated/core/params.gen.d.ts +43 -0
  23. package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
  24. package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
  25. package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
  26. package/dist/generated/core/types.gen.d.ts +78 -0
  27. package/dist/generated/core/utils.gen.d.ts +19 -0
  28. package/dist/generated/index.d.ts +2 -0
  29. package/dist/generated/sdk.gen.d.ts +140 -0
  30. package/dist/generated/types.gen.d.ts +7842 -0
  31. package/dist/index.d.ts +5 -1
  32. package/dist/index.js +16380 -956
  33. package/dist/jsonc.d.ts +3 -0
  34. package/dist/jsonc.js +133 -0
  35. package/dist/opencode-mcp.d.ts +73 -0
  36. package/dist/opencode-mcp.js +14332 -0
  37. package/dist/step-execution-plane-client.d.ts +107 -287
  38. package/package.json +45 -19
  39. package/dist/define-step.js +0 -1018
  40. package/dist/step-definitions-client.d.ts +0 -202
  41. package/dist/step-definitions-client.js +0 -47
  42. package/dist/treaty.d.ts +0 -13
  43. package/dist/treaty.js +0 -34
@@ -1,202 +0,0 @@
1
- import type { App } from "@boboddy/api/app";
2
- import type { CreateStepDefinitionInput, UpdateStepDefinitionInput } from "@boboddy/core/pipeline-definitions/step-definition/contracts/step-definition-contracts";
3
- import { createBoboddyTreaty } from "./treaty";
4
- type RequestOptions = {
5
- headers?: Record<string, unknown> | undefined;
6
- };
7
- export declare function createStepDefinitionsClient(baseUrlOrApp: string | App): ReturnType<typeof buildStepDefinitionsClient>;
8
- declare const buildStepDefinitionsClient: (apiClient: ReturnType<typeof createBoboddyTreaty>) => {
9
- listByProjectId: (projectId: string, options?: RequestOptions) => Promise<{
10
- id: string & {
11
- readonly __brand: "uuidv7";
12
- };
13
- projectId: string & {
14
- readonly __brand: "uuidv7";
15
- };
16
- key: string;
17
- name: string;
18
- description: string | null;
19
- prompt: string | null;
20
- version: number;
21
- kind: "built_in" | "user_defined";
22
- inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
23
- resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
24
- opencodeMcpJson: Record<string, {
25
- type: "local";
26
- command: string[];
27
- environment?: Record<string, string> | undefined;
28
- enabled?: boolean | undefined;
29
- timeout?: number | undefined;
30
- } | {
31
- type: "remote";
32
- url: string;
33
- enabled?: boolean | undefined;
34
- headers?: Record<string, string> | undefined;
35
- oauth?: false | {
36
- clientId?: string | undefined;
37
- clientSecret?: string | undefined;
38
- scope?: string | undefined;
39
- redirectUri?: string | undefined;
40
- } | undefined;
41
- timeout?: number | undefined;
42
- } | {
43
- enabled: boolean;
44
- }> | null;
45
- status: "draft" | "active" | "archived";
46
- signalExtractorDefinitions: {
47
- id: string & {
48
- readonly __brand: "uuidv7";
49
- };
50
- key: string;
51
- sourcePath: string;
52
- type: "string" | "number" | "boolean" | "object" | "array";
53
- required: boolean;
54
- availableWhenResultStatusIn: string[] | null;
55
- createdAt: string;
56
- updatedAt: string;
57
- }[];
58
- computedSignalDefinitions: {
59
- id: string & {
60
- readonly __brand: "uuidv7";
61
- };
62
- key: string;
63
- type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
64
- inputSignalKeys: string[];
65
- configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
66
- availableWhenResultStatusIn: string[] | null;
67
- createdAt: string;
68
- updatedAt: string;
69
- }[];
70
- createdAt: string;
71
- updatedAt: string;
72
- }[]>;
73
- create: (body: CreateStepDefinitionInput, options?: RequestOptions) => Promise<{
74
- id: string & {
75
- readonly __brand: "uuidv7";
76
- };
77
- projectId: string & {
78
- readonly __brand: "uuidv7";
79
- };
80
- key: string;
81
- name: string;
82
- description: string | null;
83
- prompt: string | null;
84
- version: number;
85
- kind: "built_in" | "user_defined";
86
- inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
87
- resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
88
- opencodeMcpJson: Record<string, {
89
- type: "local";
90
- command: string[];
91
- environment?: Record<string, string> | undefined;
92
- enabled?: boolean | undefined;
93
- timeout?: number | undefined;
94
- } | {
95
- type: "remote";
96
- url: string;
97
- enabled?: boolean | undefined;
98
- headers?: Record<string, string> | undefined;
99
- oauth?: false | {
100
- clientId?: string | undefined;
101
- clientSecret?: string | undefined;
102
- scope?: string | undefined;
103
- redirectUri?: string | undefined;
104
- } | undefined;
105
- timeout?: number | undefined;
106
- } | {
107
- enabled: boolean;
108
- }> | null;
109
- status: "draft" | "active" | "archived";
110
- signalExtractorDefinitions: {
111
- id: string & {
112
- readonly __brand: "uuidv7";
113
- };
114
- key: string;
115
- sourcePath: string;
116
- type: "string" | "number" | "boolean" | "object" | "array";
117
- required: boolean;
118
- availableWhenResultStatusIn: string[] | null;
119
- createdAt: string;
120
- updatedAt: string;
121
- }[];
122
- computedSignalDefinitions: {
123
- id: string & {
124
- readonly __brand: "uuidv7";
125
- };
126
- key: string;
127
- type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
128
- inputSignalKeys: string[];
129
- configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
130
- availableWhenResultStatusIn: string[] | null;
131
- createdAt: string;
132
- updatedAt: string;
133
- }[];
134
- createdAt: string;
135
- updatedAt: string;
136
- }>;
137
- update: (stepDefinitionId: string, body: UpdateStepDefinitionInput, options?: RequestOptions) => Promise<{
138
- id: string & {
139
- readonly __brand: "uuidv7";
140
- };
141
- projectId: string & {
142
- readonly __brand: "uuidv7";
143
- };
144
- key: string;
145
- name: string;
146
- description: string | null;
147
- prompt: string | null;
148
- version: number;
149
- kind: "built_in" | "user_defined";
150
- inputSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
151
- resultSchemaJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
152
- opencodeMcpJson: Record<string, {
153
- type: "local";
154
- command: string[];
155
- environment?: Record<string, string> | undefined;
156
- enabled?: boolean | undefined;
157
- timeout?: number | undefined;
158
- } | {
159
- type: "remote";
160
- url: string;
161
- enabled?: boolean | undefined;
162
- headers?: Record<string, string> | undefined;
163
- oauth?: false | {
164
- clientId?: string | undefined;
165
- clientSecret?: string | undefined;
166
- scope?: string | undefined;
167
- redirectUri?: string | undefined;
168
- } | undefined;
169
- timeout?: number | undefined;
170
- } | {
171
- enabled: boolean;
172
- }> | null;
173
- status: "draft" | "active" | "archived";
174
- signalExtractorDefinitions: {
175
- id: string & {
176
- readonly __brand: "uuidv7";
177
- };
178
- key: string;
179
- sourcePath: string;
180
- type: "string" | "number" | "boolean" | "object" | "array";
181
- required: boolean;
182
- availableWhenResultStatusIn: string[] | null;
183
- createdAt: string;
184
- updatedAt: string;
185
- }[];
186
- computedSignalDefinitions: {
187
- id: string & {
188
- readonly __brand: "uuidv7";
189
- };
190
- key: string;
191
- type: "custom" | "average" | "weighted_average" | "sum" | "min" | "max";
192
- inputSignalKeys: string[];
193
- configJson: import("@boboddy/core/common/contracts/json").AnyJsonObject | null;
194
- availableWhenResultStatusIn: string[] | null;
195
- createdAt: string;
196
- updatedAt: string;
197
- }[];
198
- createdAt: string;
199
- updatedAt: string;
200
- }>;
201
- };
202
- export {};
@@ -1,47 +0,0 @@
1
- // src/treaty.ts
2
- import { treaty } from "@elysiajs/eden";
3
- var TRAILING_SLASHES_PATTERN = /\/+$/u;
4
- var API_SUFFIX_PATTERN = /\/api$/u;
5
- var normalizeBoboddyBaseUrl = (baseUrl) => {
6
- const trimmedBaseUrl = baseUrl.trim();
7
- if (trimmedBaseUrl.length === 0) {
8
- return "";
9
- }
10
- return trimmedBaseUrl.replace(TRAILING_SLASHES_PATTERN, "").replace(API_SUFFIX_PATTERN, "");
11
- };
12
- function createBoboddyTreaty(baseUrlOrApp) {
13
- if (typeof baseUrlOrApp === "string") {
14
- return treaty(normalizeBoboddyBaseUrl(baseUrlOrApp), {
15
- parseDate: false
16
- });
17
- }
18
- return treaty(baseUrlOrApp, {
19
- parseDate: false
20
- });
21
- }
22
- var unwrapTreatyResponse = async (promise) => {
23
- const { data, error } = await promise;
24
- if (error) {
25
- throw error.value;
26
- }
27
- return data;
28
- };
29
- var createBoboddyApiClient = createBoboddyTreaty;
30
-
31
- // src/step-definitions-client.ts
32
- function createStepDefinitionsClient(baseUrlOrApp) {
33
- return buildStepDefinitionsClient(createBoboddyTreaty(baseUrlOrApp));
34
- }
35
- var buildStepDefinitionsClient = (apiClient) => {
36
- return {
37
- listByProjectId: async (projectId, options) => await unwrapTreatyResponse(apiClient.api["step-definitions"].get({
38
- query: { projectId },
39
- headers: options?.headers
40
- })),
41
- create: async (body, options) => await unwrapTreatyResponse(apiClient.api["step-definitions"].post(body, options)),
42
- update: async (stepDefinitionId, body, options) => await unwrapTreatyResponse(apiClient.api["step-definitions"]({ stepDefinitionId }).put(body, options))
43
- };
44
- };
45
- export {
46
- createStepDefinitionsClient
47
- };
package/dist/treaty.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { treaty } from "@elysiajs/eden";
2
- import type { App } from "@boboddy/api/app";
3
- export declare function createBoboddyTreaty(baseUrlOrApp: string | App): ReturnType<typeof treaty<App>>;
4
- export type BoboddyTreaty = ReturnType<typeof createBoboddyTreaty>;
5
- type EdenResult<T> = {
6
- data: T | null | undefined;
7
- error: {
8
- value: unknown;
9
- } | null | undefined;
10
- };
11
- export declare const unwrapTreatyResponse: <T>(promise: Promise<EdenResult<T>>) => Promise<T>;
12
- export declare const createBoboddyApiClient: typeof createBoboddyTreaty;
13
- export {};
package/dist/treaty.js DELETED
@@ -1,34 +0,0 @@
1
- // src/treaty.ts
2
- import { treaty } from "@elysiajs/eden";
3
- var TRAILING_SLASHES_PATTERN = /\/+$/u;
4
- var API_SUFFIX_PATTERN = /\/api$/u;
5
- var normalizeBoboddyBaseUrl = (baseUrl) => {
6
- const trimmedBaseUrl = baseUrl.trim();
7
- if (trimmedBaseUrl.length === 0) {
8
- return "";
9
- }
10
- return trimmedBaseUrl.replace(TRAILING_SLASHES_PATTERN, "").replace(API_SUFFIX_PATTERN, "");
11
- };
12
- function createBoboddyTreaty(baseUrlOrApp) {
13
- if (typeof baseUrlOrApp === "string") {
14
- return treaty(normalizeBoboddyBaseUrl(baseUrlOrApp), {
15
- parseDate: false
16
- });
17
- }
18
- return treaty(baseUrlOrApp, {
19
- parseDate: false
20
- });
21
- }
22
- var unwrapTreatyResponse = async (promise) => {
23
- const { data, error } = await promise;
24
- if (error) {
25
- throw error.value;
26
- }
27
- return data;
28
- };
29
- var createBoboddyApiClient = createBoboddyTreaty;
30
- export {
31
- unwrapTreatyResponse,
32
- createBoboddyTreaty,
33
- createBoboddyApiClient
34
- };