@poncho-ai/cli 0.40.3 → 0.40.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/cli@0.40.3 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
2
+ > @poncho-ai/cli@0.40.5 build /home/runner/work/poncho-ai/poncho-ai/packages/cli
3
3
  > tsup src/index.ts src/cli.ts --format esm --dts
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es2022
9
9
  ESM Build start
10
10
  ESM dist/cli.js 528.00 B
11
+ ESM dist/run-interactive-ink-3BKXJ5SX.js 23.38 KB
11
12
  ESM dist/index.js 3.10 KB
12
- ESM dist/run-interactive-ink-JWYEHJZH.js 23.38 KB
13
- ESM dist/chunk-7YEM6KJS.js 665.12 KB
14
- ESM ⚡️ Build success in 73ms
13
+ ESM dist/chunk-4XGZI7KU.js 664.72 KB
14
+ ESM ⚡️ Build success in 77ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 4142ms
16
+ DTS ⚡️ Build success in 4259ms
17
17
  DTS dist/cli.d.ts 20.00 B
18
- DTS dist/index.d.ts 13.25 KB
18
+ DTS dist/index.d.ts 13.56 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @poncho-ai/cli
2
2
 
3
+ ## 0.40.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`134fae7`](https://github.com/cesr/poncho-ai/commit/134fae7eb4f3658b8d2dc0a5e560b0bcad094679)]:
8
+ - @poncho-ai/harness@0.43.1
9
+
10
+ ## 0.40.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`ff89631`](https://github.com/cesr/poncho-ai/commit/ff89631715e54d6fdce174943e6e0fc9e4ce5d1e) Thanks [@cesr](https://github.com/cesr)! - harness: export `defaultAgentDefinition` so SDK consumers can match `poncho init` exactly
15
+
16
+ Lifts the `AGENT_TEMPLATE` markdown body from `@poncho-ai/cli` (where it lived
17
+ inside the `init` scaffolding) into a public helper on `@poncho-ai/harness`.
18
+ SDK consumers (PonchOS, custom servers, anyone calling
19
+ `new AgentHarness({ agentDefinition })` directly) can now do:
20
+
21
+ ```ts
22
+ import { defaultAgentDefinition } from "@poncho-ai/harness";
23
+
24
+ const harness = new AgentHarness({
25
+ agentDefinition: defaultAgentDefinition({
26
+ name: "poncho",
27
+ modelName: "claude-sonnet-4-6",
28
+ }),
29
+ // ... storageEngine, config, etc.
30
+ });
31
+ ```
32
+
33
+ This eliminates hand-copying the template — drift between consumers and
34
+ `poncho init` is no longer possible.
35
+
36
+ The CLI's `AGENT_TEMPLATE` export is preserved as a thin back-compat
37
+ wrapper that delegates to `defaultAgentDefinition`. No behavior change.
38
+
39
+ API additions (harness):
40
+ - `defaultAgentDefinition(opts?: DefaultAgentDefinitionOptions): string`
41
+ - `DefaultAgentDefinitionOptions`
42
+ - `DEFAULT_AGENT_NAME`, `DEFAULT_AGENT_DESCRIPTION`,
43
+ `DEFAULT_MODEL_PROVIDER`, `DEFAULT_MODEL_NAME`, `DEFAULT_TEMPERATURE`,
44
+ `DEFAULT_MAX_STEPS`, `DEFAULT_TIMEOUT` constants
45
+
46
+ - Updated dependencies [[`ff89631`](https://github.com/cesr/poncho-ai/commit/ff89631715e54d6fdce174943e6e0fc9e4ce5d1e)]:
47
+ - @poncho-ai/harness@0.43.0
48
+
3
49
  ## 0.40.3
4
50
 
5
51
  ### Patch Changes
@@ -12028,6 +12028,7 @@ import { readFile as readFile4 } from "fs/promises";
12028
12028
  import { existsSync } from "fs";
12029
12029
  import { dirname as dirname4, relative, resolve as resolve3 } from "path";
12030
12030
  import { fileURLToPath } from "url";
12031
+ import { defaultAgentDefinition } from "@poncho-ai/harness";
12031
12032
  var __dirname = dirname4(fileURLToPath(import.meta.url));
12032
12033
  var packageRoot = resolve3(__dirname, "..");
12033
12034
  var readCliVersion = async () => {
@@ -12043,33 +12044,12 @@ var readCliVersion = async () => {
12043
12044
  }
12044
12045
  return fallback;
12045
12046
  };
12046
- var AGENT_TEMPLATE = (name, id, options) => `---
12047
- name: ${name}
12048
- id: ${id}
12049
- description: A helpful Poncho assistant
12050
- model:
12051
- provider: ${options.modelProvider}
12052
- name: ${options.modelName}
12053
- temperature: 0.2
12054
- limits:
12055
- maxSteps: 20
12056
- timeout: 300
12057
- ---
12058
-
12059
- # {{name}}
12060
-
12061
- You are **{{name}}**, a helpful assistant built with Poncho.
12062
-
12063
- Working directory: {{runtime.workingDir}}
12064
- Environment: {{runtime.environment}}
12065
-
12066
- ## Task Guidance
12067
-
12068
- - Use tools when needed
12069
- - Explain your reasoning clearly
12070
- - Ask clarifying questions when requirements are ambiguous
12071
- - Never claim a file/tool change unless the corresponding tool call actually succeeded
12072
- `;
12047
+ var AGENT_TEMPLATE = (name, id, options) => defaultAgentDefinition({
12048
+ name,
12049
+ id,
12050
+ modelProvider: options.modelProvider,
12051
+ modelName: options.modelName
12052
+ });
12073
12053
  var resolveLocalPackagesRoot = () => {
12074
12054
  const candidate = resolve3(__dirname, "..", "..", "harness", "package.json");
12075
12055
  if (existsSync(candidate)) {
@@ -14261,7 +14241,7 @@ var runInteractive = async (workingDir, params) => {
14261
14241
  await harness.initialize();
14262
14242
  const identity = await ensureAgentIdentity2(workingDir);
14263
14243
  try {
14264
- const { runInteractiveInk } = await import("./run-interactive-ink-JWYEHJZH.js");
14244
+ const { runInteractiveInk } = await import("./run-interactive-ink-3BKXJ5SX.js");
14265
14245
  await runInteractiveInk({
14266
14246
  harness,
14267
14247
  params,
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  main
4
- } from "./chunk-7YEM6KJS.js";
4
+ } from "./chunk-4XGZI7KU.js";
5
5
 
6
6
  // src/cli.ts
7
7
  var _originalEmitWarning = process.emitWarning.bind(process);
package/dist/index.d.ts CHANGED
@@ -54,6 +54,13 @@ declare const MAX_PRUNE_PER_RUN = 25;
54
54
  /** Delete old cron conversations beyond `maxRuns`, capped to avoid API storms on catch-up. */
55
55
  declare const pruneCronConversations: (store: ConversationStore, ownerId: string, jobName: string, maxRuns: number) => Promise<number>;
56
56
 
57
+ /**
58
+ * Thin back-compat wrapper around `defaultAgentDefinition` from the harness
59
+ * package. The canonical template now lives in
60
+ * `@poncho-ai/harness/src/default-agent.ts` so SDK consumers can pass the
61
+ * exact same default to `new AgentHarness({ agentDefinition })` without
62
+ * hand-copying the template.
63
+ */
57
64
  declare const AGENT_TEMPLATE: (name: string, id: string, options: {
58
65
  modelProvider: "anthropic" | "openai" | "openai-codex";
59
66
  modelName: string;
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ import {
77
77
  writeHtml,
78
78
  writeJson,
79
79
  writeScaffoldFile
80
- } from "./chunk-7YEM6KJS.js";
80
+ } from "./chunk-4XGZI7KU.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-7YEM6KJS.js";
6
+ } from "./chunk-4XGZI7KU.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.40.3",
3
+ "version": "0.40.5",
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.42.0",
32
- "@poncho-ai/messaging": "0.8.5",
33
- "@poncho-ai/sdk": "1.10.0"
31
+ "@poncho-ai/harness": "0.43.1",
32
+ "@poncho-ai/sdk": "1.10.0",
33
+ "@poncho-ai/messaging": "0.8.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/busboy": "^1.5.4",
package/src/templates.ts CHANGED
@@ -2,6 +2,7 @@ import { readFile } from "node:fs/promises";
2
2
  import { existsSync } from "node:fs";
3
3
  import { dirname, relative, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
+ import { defaultAgentDefinition } from "@poncho-ai/harness";
5
6
 
6
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
7
8
  const packageRoot = resolve(__dirname, "..");
@@ -21,37 +22,24 @@ const readCliVersion = async (): Promise<string> => {
21
22
  return fallback;
22
23
  };
23
24
 
25
+ /**
26
+ * Thin back-compat wrapper around `defaultAgentDefinition` from the harness
27
+ * package. The canonical template now lives in
28
+ * `@poncho-ai/harness/src/default-agent.ts` so SDK consumers can pass the
29
+ * exact same default to `new AgentHarness({ agentDefinition })` without
30
+ * hand-copying the template.
31
+ */
24
32
  export const AGENT_TEMPLATE = (
25
33
  name: string,
26
34
  id: string,
27
35
  options: { modelProvider: "anthropic" | "openai" | "openai-codex"; modelName: string },
28
- ): string => `---
29
- name: ${name}
30
- id: ${id}
31
- description: A helpful Poncho assistant
32
- model:
33
- provider: ${options.modelProvider}
34
- name: ${options.modelName}
35
- temperature: 0.2
36
- limits:
37
- maxSteps: 20
38
- timeout: 300
39
- ---
40
-
41
- # {{name}}
42
-
43
- You are **{{name}}**, a helpful assistant built with Poncho.
44
-
45
- Working directory: {{runtime.workingDir}}
46
- Environment: {{runtime.environment}}
47
-
48
- ## Task Guidance
49
-
50
- - Use tools when needed
51
- - Explain your reasoning clearly
52
- - Ask clarifying questions when requirements are ambiguous
53
- - Never claim a file/tool change unless the corresponding tool call actually succeeded
54
- `;
36
+ ): string =>
37
+ defaultAgentDefinition({
38
+ name,
39
+ id,
40
+ modelProvider: options.modelProvider,
41
+ modelName: options.modelName,
42
+ });
55
43
 
56
44
  /**
57
45
  * Resolve the monorepo packages root if we're running from a local dev build.