@poncho-ai/sdk 0.3.0 → 0.5.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +32 -1
- package/dist/index.js +19 -0
- package/package.json +1 -1
- package/src/config-registry.ts +20 -0
- package/src/index.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/sdk@0.
|
|
2
|
+
> @poncho-ai/sdk@0.5.0 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
|
|
3
3
|
> tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Target: es2022
|
|
9
9
|
[34mESM[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
11
|
-
[32mESM[39m ⚡️ Build success in
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m6.16 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 49ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 1221ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m12.51 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @poncho-ai/sdk
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Improve deployment scaffolding and init onboarding for production targets.
|
|
8
|
+
|
|
9
|
+
The CLI now scaffolds deployment files directly in project roots (including Vercel `api/index.mjs` + `vercel.json`), adds safer overwrite behavior with `--force`, and normalizes runtime dependencies for deployable projects. Onboarding now captures `deploy.target` so new projects can scaffold the selected platform during `poncho init`.
|
|
10
|
+
|
|
3
11
|
## 0.2.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type OnboardingScope = "light" | "full";
|
|
2
|
-
type FeatureDomain = "model" | "storage" | "memory" | "auth" | "telemetry" | "mcp";
|
|
2
|
+
type FeatureDomain = "model" | "deploy" | "storage" | "memory" | "auth" | "telemetry" | "mcp";
|
|
3
3
|
type OnboardingFieldTarget = "agent" | "config" | "env";
|
|
4
4
|
type OnboardingFieldKind = "select" | "boolean" | "string" | "number";
|
|
5
5
|
type OnboardingFieldCondition = {
|
|
@@ -80,6 +80,32 @@ declare const ONBOARDING_FIELDS: readonly [{
|
|
|
80
80
|
readonly fieldId: "model.provider";
|
|
81
81
|
readonly equals: "openai";
|
|
82
82
|
};
|
|
83
|
+
}, {
|
|
84
|
+
readonly id: "deploy.target";
|
|
85
|
+
readonly domain: "deploy";
|
|
86
|
+
readonly target: "agent";
|
|
87
|
+
readonly path: "deploy.target";
|
|
88
|
+
readonly kind: "select";
|
|
89
|
+
readonly scopes: ["light", "full"];
|
|
90
|
+
readonly label: "Deploy target";
|
|
91
|
+
readonly prompt: "Choose a deploy target (optional)";
|
|
92
|
+
readonly defaultValue: "none";
|
|
93
|
+
readonly options: [{
|
|
94
|
+
readonly value: "none";
|
|
95
|
+
readonly label: "None (local dev only)";
|
|
96
|
+
}, {
|
|
97
|
+
readonly value: "vercel";
|
|
98
|
+
readonly label: "Vercel";
|
|
99
|
+
}, {
|
|
100
|
+
readonly value: "docker";
|
|
101
|
+
readonly label: "Docker";
|
|
102
|
+
}, {
|
|
103
|
+
readonly value: "fly";
|
|
104
|
+
readonly label: "Fly.io";
|
|
105
|
+
}, {
|
|
106
|
+
readonly value: "lambda";
|
|
107
|
+
readonly label: "AWS Lambda";
|
|
108
|
+
}];
|
|
83
109
|
}, {
|
|
84
110
|
readonly id: "storage.provider";
|
|
85
111
|
readonly domain: "storage";
|
|
@@ -297,6 +323,7 @@ interface ToolContext {
|
|
|
297
323
|
step: number;
|
|
298
324
|
workingDir: string;
|
|
299
325
|
parameters: Record<string, unknown>;
|
|
326
|
+
abortSignal?: AbortSignal;
|
|
300
327
|
}
|
|
301
328
|
type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (input: TInput, context: ToolContext) => Promise<TOutput> | TOutput;
|
|
302
329
|
interface ToolDefinition<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> {
|
|
@@ -315,6 +342,7 @@ interface RunInput {
|
|
|
315
342
|
task: string;
|
|
316
343
|
parameters?: Record<string, unknown>;
|
|
317
344
|
messages?: Message[];
|
|
345
|
+
abortSignal?: AbortSignal;
|
|
318
346
|
}
|
|
319
347
|
interface TokenUsage {
|
|
320
348
|
input: number;
|
|
@@ -341,6 +369,9 @@ type AgentEvent = {
|
|
|
341
369
|
type: "run:completed";
|
|
342
370
|
runId: string;
|
|
343
371
|
result: RunResult;
|
|
372
|
+
} | {
|
|
373
|
+
type: "run:cancelled";
|
|
374
|
+
runId: string;
|
|
344
375
|
} | {
|
|
345
376
|
type: "run:error";
|
|
346
377
|
runId: string;
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,24 @@ var ONBOARDING_FIELDS = [
|
|
|
43
43
|
secret: true,
|
|
44
44
|
dependsOn: { fieldId: "model.provider", equals: "openai" }
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
id: "deploy.target",
|
|
48
|
+
domain: "deploy",
|
|
49
|
+
target: "agent",
|
|
50
|
+
path: "deploy.target",
|
|
51
|
+
kind: "select",
|
|
52
|
+
scopes: ["light", "full"],
|
|
53
|
+
label: "Deploy target",
|
|
54
|
+
prompt: "Choose a deploy target (optional)",
|
|
55
|
+
defaultValue: "none",
|
|
56
|
+
options: [
|
|
57
|
+
{ value: "none", label: "None (local dev only)" },
|
|
58
|
+
{ value: "vercel", label: "Vercel" },
|
|
59
|
+
{ value: "docker", label: "Docker" },
|
|
60
|
+
{ value: "fly", label: "Fly.io" },
|
|
61
|
+
{ value: "lambda", label: "AWS Lambda" }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
46
64
|
{
|
|
47
65
|
id: "storage.provider",
|
|
48
66
|
domain: "storage",
|
|
@@ -206,6 +224,7 @@ var ONBOARDING_FIELDS = [
|
|
|
206
224
|
];
|
|
207
225
|
var FEATURE_DOMAIN_ORDER = [
|
|
208
226
|
"model",
|
|
227
|
+
"deploy",
|
|
209
228
|
"storage",
|
|
210
229
|
"memory",
|
|
211
230
|
"auth",
|
package/package.json
CHANGED
package/src/config-registry.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type OnboardingScope = "light" | "full";
|
|
|
2
2
|
|
|
3
3
|
export type FeatureDomain =
|
|
4
4
|
| "model"
|
|
5
|
+
| "deploy"
|
|
5
6
|
| "storage"
|
|
6
7
|
| "memory"
|
|
7
8
|
| "auth"
|
|
@@ -86,6 +87,24 @@ export const ONBOARDING_FIELDS = [
|
|
|
86
87
|
secret: true,
|
|
87
88
|
dependsOn: { fieldId: "model.provider", equals: "openai" },
|
|
88
89
|
},
|
|
90
|
+
{
|
|
91
|
+
id: "deploy.target",
|
|
92
|
+
domain: "deploy",
|
|
93
|
+
target: "agent",
|
|
94
|
+
path: "deploy.target",
|
|
95
|
+
kind: "select",
|
|
96
|
+
scopes: ["light", "full"],
|
|
97
|
+
label: "Deploy target",
|
|
98
|
+
prompt: "Choose a deploy target (optional)",
|
|
99
|
+
defaultValue: "none",
|
|
100
|
+
options: [
|
|
101
|
+
{ value: "none", label: "None (local dev only)" },
|
|
102
|
+
{ value: "vercel", label: "Vercel" },
|
|
103
|
+
{ value: "docker", label: "Docker" },
|
|
104
|
+
{ value: "fly", label: "Fly.io" },
|
|
105
|
+
{ value: "lambda", label: "AWS Lambda" },
|
|
106
|
+
],
|
|
107
|
+
},
|
|
89
108
|
{
|
|
90
109
|
id: "storage.provider",
|
|
91
110
|
domain: "storage",
|
|
@@ -250,6 +269,7 @@ export const ONBOARDING_FIELDS = [
|
|
|
250
269
|
|
|
251
270
|
export const FEATURE_DOMAIN_ORDER: readonly FeatureDomain[] = [
|
|
252
271
|
"model",
|
|
272
|
+
"deploy",
|
|
253
273
|
"storage",
|
|
254
274
|
"memory",
|
|
255
275
|
"auth",
|
package/src/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ export interface ToolContext {
|
|
|
30
30
|
step: number;
|
|
31
31
|
workingDir: string;
|
|
32
32
|
parameters: Record<string, unknown>;
|
|
33
|
+
abortSignal?: AbortSignal;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (
|
|
@@ -64,6 +65,7 @@ export interface RunInput {
|
|
|
64
65
|
task: string;
|
|
65
66
|
parameters?: Record<string, unknown>;
|
|
66
67
|
messages?: Message[];
|
|
68
|
+
abortSignal?: AbortSignal;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
export interface TokenUsage {
|
|
@@ -89,6 +91,7 @@ export interface AgentFailure {
|
|
|
89
91
|
export type AgentEvent =
|
|
90
92
|
| { type: "run:started"; runId: string; agentId: string }
|
|
91
93
|
| { type: "run:completed"; runId: string; result: RunResult }
|
|
94
|
+
| { type: "run:cancelled"; runId: string }
|
|
92
95
|
| { type: "run:error"; runId: string; error: AgentFailure }
|
|
93
96
|
| { type: "step:started"; step: number }
|
|
94
97
|
| { type: "step:completed"; step: number; duration: number }
|