@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/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "./chunk-U643TWFX.js";
4
+ } from "./chunk-XCDN62XL.js";
5
5
 
6
6
  // src/cli.ts
7
7
  void main();
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>) => Promise<CronRunResult>;
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
@@ -77,7 +77,7 @@ import {
77
77
  writeHtml,
78
78
  writeJson,
79
79
  writeScaffoldFile
80
- } from "./chunk-U643TWFX.js";
80
+ } from "./chunk-XCDN62XL.js";
81
81
  export {
82
82
  AGENT_TEMPLATE,
83
83
  ENV_TEMPLATE,
@@ -3,7 +3,7 @@ import {
3
3
  getMascotLines,
4
4
  inferConversationTitle,
5
5
  resolveHarnessEnvironment
6
- } from "./chunk-U643TWFX.js";
6
+ } from "./chunk-XCDN62XL.js";
7
7
 
8
8
  // src/run-interactive-ink.ts
9
9
  import * as readline from "readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/cli",
3
- "version": "0.38.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.39.0",
32
- "@poncho-ai/messaging": "0.8.4",
33
- "@poncho-ai/sdk": "1.9.0"
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",
@@ -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
- parameters: {
89
- __activeConversationId: conversationId,
90
- [TOOL_RESULT_ARCHIVE_PARAM]: toolResultArchive ?? {},
91
- },
99
+ tenantId: tenantId ?? undefined,
100
+ parameters: finalParameters,
92
101
  messages: historyMessages,
93
102
  },
94
103
  onEvent,