@poncho-ai/cli 0.38.0 → 0.39.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 +7 -7
- package/CHANGELOG.md +167 -0
- package/dist/{chunk-U643TWFX.js → chunk-XCDN62XL.js} +1983 -135
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1 -1
- package/dist/{run-interactive-ink-CE7U47S5.js → run-interactive-ink-W5YJS7UH.js} +1 -1
- package/package.json +4 -4
- package/src/cron-helpers.ts +13 -4
- package/src/index.ts +441 -21
- package/src/vfs-zip.ts +94 -0
- package/src/web-ui-client.ts +1028 -26
- package/src/web-ui-styles.ts +413 -15
- package/src/web-ui.ts +6 -1
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ type CronRunResult = {
|
|
|
46
46
|
/** Timestamp shared by user and assistant messages of this turn. */
|
|
47
47
|
turnTimestamp: number;
|
|
48
48
|
};
|
|
49
|
-
declare const runCronAgent: (harnessRef: AgentHarness, task: string, conversationId: string, historyMessages: Message[], toolResultArchive?: Conversation["_toolResultArchive"], onEvent?: (event: AgentEvent) => void | Promise<void
|
|
49
|
+
declare const runCronAgent: (harnessRef: AgentHarness, task: string, conversationId: string, historyMessages: Message[], toolResultArchive?: Conversation["_toolResultArchive"], onEvent?: (event: AgentEvent) => void | Promise<void>, parameters?: Record<string, unknown>, tenantId?: string | null) => Promise<CronRunResult>;
|
|
50
50
|
declare const buildCronMessages: (task: string, historyMessages: Message[], result: CronRunResult) => Message[];
|
|
51
51
|
/** Append a cron turn to a freshly-fetched conversation (avoids overwriting concurrent writes). */
|
|
52
52
|
declare const appendCronTurn: (conv: Conversation, task: string, result: CronRunResult) => void;
|
|
@@ -224,6 +224,17 @@ type RequestHandler = ((request: IncomingMessage, response: ServerResponse) => P
|
|
|
224
224
|
duration: number;
|
|
225
225
|
}>;
|
|
226
226
|
_reminderPollIntervalMs?: number;
|
|
227
|
+
_buildTurnParameters?: (conversation: Conversation, opts?: {
|
|
228
|
+
bodyParameters?: Record<string, unknown>;
|
|
229
|
+
messagingMetadata?: {
|
|
230
|
+
platform: string;
|
|
231
|
+
sender: {
|
|
232
|
+
id: string;
|
|
233
|
+
name?: string | null;
|
|
234
|
+
};
|
|
235
|
+
threadId?: string;
|
|
236
|
+
};
|
|
237
|
+
}) => Record<string, unknown>;
|
|
227
238
|
};
|
|
228
239
|
declare const createRequestHandler: (options?: {
|
|
229
240
|
workingDir?: string;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poncho-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "CLI for building and deploying AI agents",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"react": "^19.2.4",
|
|
29
29
|
"react-devtools-core": "^6.1.5",
|
|
30
30
|
"yaml": "^2.8.1",
|
|
31
|
-
"@poncho-ai/harness": "0.
|
|
32
|
-
"@poncho-ai/messaging": "0.8.
|
|
33
|
-
"@poncho-ai/sdk": "1.
|
|
31
|
+
"@poncho-ai/harness": "0.40.0",
|
|
32
|
+
"@poncho-ai/messaging": "0.8.5",
|
|
33
|
+
"@poncho-ai/sdk": "1.10.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/busboy": "^1.5.4",
|
package/src/cron-helpers.ts
CHANGED
|
@@ -76,19 +76,28 @@ export const runCronAgent = async (
|
|
|
76
76
|
historyMessages: Message[],
|
|
77
77
|
toolResultArchive?: Conversation["_toolResultArchive"],
|
|
78
78
|
onEvent?: (event: AgentEvent) => void | Promise<void>,
|
|
79
|
+
parameters?: Record<string, unknown>,
|
|
80
|
+
tenantId?: string | null,
|
|
79
81
|
): Promise<CronRunResult> => {
|
|
80
82
|
const turnTimestamp = Date.now();
|
|
81
83
|
const userMessageId = randomUUID();
|
|
82
84
|
const assistantId = randomUUID();
|
|
85
|
+
// Callers normally build `parameters` via buildTurnParameters() which
|
|
86
|
+
// already merges the tool-result archive. The `toolResultArchive` arg is a
|
|
87
|
+
// fallback for callers that don't (legacy / minimal callers).
|
|
88
|
+
const finalParameters = {
|
|
89
|
+
...(parameters ?? {}),
|
|
90
|
+
__activeConversationId: conversationId,
|
|
91
|
+
[TOOL_RESULT_ARCHIVE_PARAM]:
|
|
92
|
+
parameters?.[TOOL_RESULT_ARCHIVE_PARAM] ?? toolResultArchive ?? {},
|
|
93
|
+
};
|
|
83
94
|
const execution = await executeConversationTurn({
|
|
84
95
|
harness: harnessRef,
|
|
85
96
|
runInput: {
|
|
86
97
|
task,
|
|
87
98
|
conversationId,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
[TOOL_RESULT_ARCHIVE_PARAM]: toolResultArchive ?? {},
|
|
91
|
-
},
|
|
99
|
+
tenantId: tenantId ?? undefined,
|
|
100
|
+
parameters: finalParameters,
|
|
92
101
|
messages: historyMessages,
|
|
93
102
|
},
|
|
94
103
|
onEvent,
|