@poncho-ai/cli 0.32.4 → 0.32.5

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-F6NA3N2R.js";
4
+ } from "./chunk-LVWNWMNE.js";
5
5
 
6
6
  // src/cli.ts
7
7
  void main();
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { IncomingMessage, ServerResponse, Server } from 'node:http';
2
- import { AgentHarness, CronJobConfig, ConversationStore } from '@poncho-ai/harness';
3
- import { AgentEvent } from '@poncho-ai/sdk';
2
+ import { AgentHarness, CronJobConfig, ConversationStore, Conversation } from '@poncho-ai/harness';
3
+ import { AgentEvent, Message } from '@poncho-ai/sdk';
4
4
  import { MessagingAdapter } from '@poncho-ai/messaging';
5
5
  import { Command } from 'commander';
6
6
 
@@ -14,6 +14,84 @@ type InitOnboardingOptions = {
14
14
  * Priority: PONCHO_ENV > platform detection (Vercel, Railway, etc.) > NODE_ENV > "development"
15
15
  */
16
16
  declare const resolveHarnessEnvironment: () => "development" | "staging" | "production";
17
+ type HistorySource = "harness" | "continuation" | "messages";
18
+ type StoredApproval = NonNullable<Conversation["pendingApprovals"]>[number];
19
+ type PendingToolCall = {
20
+ id: string;
21
+ name: string;
22
+ input: Record<string, unknown>;
23
+ };
24
+ type ApprovalEventItem = {
25
+ approvalId: string;
26
+ tool: string;
27
+ toolCallId?: string;
28
+ input: Record<string, unknown>;
29
+ };
30
+ type RunRequest = {
31
+ conversationId: string;
32
+ messages: Message[];
33
+ preferContinuation?: boolean;
34
+ };
35
+ type RunOutcome = {
36
+ source: HistorySource;
37
+ shouldRebuildCanonical: boolean;
38
+ messages: Message[];
39
+ };
40
+ type TurnSection = {
41
+ type: "text" | "tools";
42
+ content: string | string[];
43
+ };
44
+ type TurnDraftState = {
45
+ assistantResponse: string;
46
+ toolTimeline: string[];
47
+ sections: TurnSection[];
48
+ currentTools: string[];
49
+ currentText: string;
50
+ };
51
+ type ExecuteTurnResult = {
52
+ latestRunId: string;
53
+ runCancelled: boolean;
54
+ runContinuation: boolean;
55
+ runContinuationMessages?: Message[];
56
+ runHarnessMessages?: Message[];
57
+ runContextTokens: number;
58
+ runContextWindow: number;
59
+ runSteps: number;
60
+ runMaxSteps?: number;
61
+ draft: TurnDraftState;
62
+ };
63
+ declare const __internalRunOrchestration: {
64
+ isMessageArray: (value: unknown) => value is Message[];
65
+ loadCanonicalHistory: (conversation: Conversation) => {
66
+ messages: Message[];
67
+ source: HistorySource;
68
+ };
69
+ loadRunHistory: (conversation: Conversation, options?: {
70
+ preferContinuation?: boolean;
71
+ }) => {
72
+ messages: Message[];
73
+ source: HistorySource;
74
+ shouldRebuildCanonical: boolean;
75
+ };
76
+ normalizeApprovalCheckpoint: (approval: StoredApproval, fallbackMessages: Message[]) => StoredApproval;
77
+ buildApprovalCheckpoints: ({ approvals, runId, checkpointMessages, baseMessageCount, pendingToolCalls, }: {
78
+ approvals: ApprovalEventItem[];
79
+ runId: string;
80
+ checkpointMessages: Message[];
81
+ baseMessageCount: number;
82
+ pendingToolCalls: PendingToolCall[];
83
+ }) => NonNullable<Conversation["pendingApprovals"]>;
84
+ resolveRunRequest: (conversation: Conversation, request: RunRequest) => RunOutcome;
85
+ createTurnDraftState: () => TurnDraftState;
86
+ recordStandardTurnEvent: (draft: TurnDraftState, event: AgentEvent) => void;
87
+ executeConversationTurn: ({ harness, runInput, initialContextTokens, initialContextWindow, onEvent, }: {
88
+ harness: AgentHarness;
89
+ runInput: Parameters<AgentHarness["runWithTelemetry"]>[0];
90
+ initialContextTokens?: number;
91
+ initialContextWindow?: number;
92
+ onEvent?: (event: AgentEvent, draft: TurnDraftState) => void | Promise<void>;
93
+ }) => Promise<ExecuteTurnResult>;
94
+ };
17
95
  declare const initProject: (projectName: string, options?: {
18
96
  workingDir?: string;
19
97
  onboarding?: InitOnboardingOptions;
@@ -91,4 +169,4 @@ declare const buildCli: () => Command;
91
169
  declare const main: (argv?: string[]) => Promise<void>;
92
170
  declare const packageRoot: string;
93
171
 
94
- export { type RequestHandler, addSkill, buildCli, buildTarget, copySkillsFromPackage, createRequestHandler, initProject, listInstalledSkills, listSkills, listTools, main, mcpAdd, mcpList, mcpRemove, mcpToolsList, mcpToolsSelect, packageRoot, removeSkillPackage, removeSkillsFromPackage, resolveHarnessEnvironment, runInteractive, runOnce, runTests, startDevServer, updateAgentGuidance };
172
+ export { type RequestHandler, __internalRunOrchestration, addSkill, buildCli, buildTarget, copySkillsFromPackage, createRequestHandler, initProject, listInstalledSkills, listSkills, listTools, main, mcpAdd, mcpList, mcpRemove, mcpToolsList, mcpToolsSelect, packageRoot, removeSkillPackage, removeSkillsFromPackage, resolveHarnessEnvironment, runInteractive, runOnce, runTests, startDevServer, updateAgentGuidance };
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ __internalRunOrchestration,
2
3
  addSkill,
3
4
  buildCli,
4
5
  buildTarget,
@@ -23,8 +24,9 @@ import {
23
24
  runTests,
24
25
  startDevServer,
25
26
  updateAgentGuidance
26
- } from "./chunk-F6NA3N2R.js";
27
+ } from "./chunk-LVWNWMNE.js";
27
28
  export {
29
+ __internalRunOrchestration,
28
30
  addSkill,
29
31
  buildCli,
30
32
  buildTarget,
@@ -2,7 +2,7 @@ import {
2
2
  consumeFirstRunIntro,
3
3
  inferConversationTitle,
4
4
  resolveHarnessEnvironment
5
- } from "./chunk-F6NA3N2R.js";
5
+ } from "./chunk-LVWNWMNE.js";
6
6
 
7
7
  // src/run-interactive-ink.ts
8
8
  import * as readline from "readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/cli",
3
- "version": "0.32.4",
3
+ "version": "0.32.5",
4
4
  "description": "CLI for building and deploying AI agents",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  "react-devtools-core": "^6.1.5",
29
29
  "yaml": "^2.8.1",
30
30
  "@poncho-ai/harness": "0.31.3",
31
- "@poncho-ai/sdk": "1.7.1",
32
- "@poncho-ai/messaging": "0.7.6"
31
+ "@poncho-ai/messaging": "0.7.6",
32
+ "@poncho-ai/sdk": "1.7.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/busboy": "^1.5.4",