@poncho-ai/harness 0.20.7 → 0.20.9
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 +4 -4
- package/CHANGELOG.md +12 -0
- package/dist/index.js +29 -1
- package/package.json +1 -1
- package/src/agent-parser.ts +26 -1
- package/src/harness.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.20.
|
|
2
|
+
> @poncho-ai/harness@0.20.9 build /Users/cesar/Dev/latitude/poncho-ai/packages/harness
|
|
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[32m200.32 KB[39m
|
|
11
|
+
[32mESM[39m ⚡️ Build success in 94ms
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 3212ms
|
|
14
14
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m24.36 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.20.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`29cc075`](https://github.com/cesr/poncho-ai/commit/29cc075554077db177f93fd07af031da4a69ac51) Thanks [@cesr](https://github.com/cesr)! - Strip provider prefix from model names in AGENT.md (e.g. `anthropic/claude-sonnet-4-5` → `claude-sonnet-4-5`). The provider is extracted and used for routing; only the bare model name is sent to the API.
|
|
8
|
+
|
|
9
|
+
## 0.20.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`0ec1f69`](https://github.com/cesr/poncho-ai/commit/0ec1f69a56b6424967d994663294adbbde1b9257) Thanks [@cesr](https://github.com/cesr)! - Support flat string `model: claude-opus-4-6` shorthand in AGENT.md frontmatter (in addition to nested `model: { name: ... }`). Log the resolved model name on first step for deployment debugging.
|
|
14
|
+
|
|
3
15
|
## 0.20.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -132,7 +132,32 @@ var parseAgentMarkdown = (content) => {
|
|
|
132
132
|
if (typeof parsed.name !== "string" || parsed.name.trim() === "") {
|
|
133
133
|
throw new Error("Invalid AGENT.md: frontmatter requires a non-empty `name`.");
|
|
134
134
|
}
|
|
135
|
-
const
|
|
135
|
+
const KNOWN_PROVIDERS = /* @__PURE__ */ new Set(["anthropic", "openai"]);
|
|
136
|
+
const splitProviderPrefix = (raw) => {
|
|
137
|
+
const slashIdx = raw.indexOf("/");
|
|
138
|
+
if (slashIdx > 0) {
|
|
139
|
+
const prefix = raw.slice(0, slashIdx).toLowerCase();
|
|
140
|
+
if (KNOWN_PROVIDERS.has(prefix)) {
|
|
141
|
+
return { provider: prefix, name: raw.slice(slashIdx + 1) };
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return { name: raw };
|
|
145
|
+
};
|
|
146
|
+
const modelValue = (() => {
|
|
147
|
+
if (typeof parsed.model === "string") {
|
|
148
|
+
const { provider, name } = splitProviderPrefix(parsed.model);
|
|
149
|
+
return provider ? { provider, name } : { name };
|
|
150
|
+
}
|
|
151
|
+
const rec = asRecord(parsed.model);
|
|
152
|
+
if (typeof rec.name === "string") {
|
|
153
|
+
const { provider, name } = splitProviderPrefix(rec.name);
|
|
154
|
+
rec.name = name;
|
|
155
|
+
if (provider && typeof rec.provider !== "string") {
|
|
156
|
+
rec.provider = provider;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return rec;
|
|
160
|
+
})();
|
|
136
161
|
const limitsValue = asRecord(parsed.limits);
|
|
137
162
|
const parseTools = (key) => {
|
|
138
163
|
const entries = Array.isArray(parsed[key]) ? parsed[key].filter((item) => typeof item === "string") : [];
|
|
@@ -4095,6 +4120,9 @@ ${textContent}` };
|
|
|
4095
4120
|
const modelName = agent.frontmatter.model?.name ?? "claude-opus-4-5";
|
|
4096
4121
|
const temperature = agent.frontmatter.model?.temperature ?? 0.2;
|
|
4097
4122
|
const maxTokens = agent.frontmatter.model?.maxTokens;
|
|
4123
|
+
if (step === 1) {
|
|
4124
|
+
console.info(`[poncho] model="${modelName}" provider="${agent.frontmatter.model?.provider ?? "anthropic"}"`);
|
|
4125
|
+
}
|
|
4098
4126
|
const modelInstance = this.modelProvider(modelName);
|
|
4099
4127
|
const cachedMessages = addPromptCacheBreakpoints(coreMessages, modelInstance);
|
|
4100
4128
|
const telemetryEnabled = this.loadedConfig?.telemetry?.enabled !== false;
|
package/package.json
CHANGED
package/src/agent-parser.ts
CHANGED
|
@@ -155,7 +155,32 @@ export const parseAgentMarkdown = (content: string): ParsedAgent => {
|
|
|
155
155
|
throw new Error("Invalid AGENT.md: frontmatter requires a non-empty `name`.");
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
const
|
|
158
|
+
const KNOWN_PROVIDERS = new Set(["anthropic", "openai"]);
|
|
159
|
+
const splitProviderPrefix = (raw: string): { provider?: string; name: string } => {
|
|
160
|
+
const slashIdx = raw.indexOf("/");
|
|
161
|
+
if (slashIdx > 0) {
|
|
162
|
+
const prefix = raw.slice(0, slashIdx).toLowerCase();
|
|
163
|
+
if (KNOWN_PROVIDERS.has(prefix)) {
|
|
164
|
+
return { provider: prefix, name: raw.slice(slashIdx + 1) };
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return { name: raw };
|
|
168
|
+
};
|
|
169
|
+
const modelValue: Record<string, unknown> = (() => {
|
|
170
|
+
if (typeof parsed.model === "string") {
|
|
171
|
+
const { provider, name } = splitProviderPrefix(parsed.model);
|
|
172
|
+
return provider ? { provider, name } : { name };
|
|
173
|
+
}
|
|
174
|
+
const rec = asRecord(parsed.model);
|
|
175
|
+
if (typeof rec.name === "string") {
|
|
176
|
+
const { provider, name } = splitProviderPrefix(rec.name);
|
|
177
|
+
rec.name = name;
|
|
178
|
+
if (provider && typeof rec.provider !== "string") {
|
|
179
|
+
rec.provider = provider;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return rec;
|
|
183
|
+
})();
|
|
159
184
|
const limitsValue = asRecord(parsed.limits);
|
|
160
185
|
const parseTools = (
|
|
161
186
|
key: "allowed-tools" | "approval-required",
|
package/src/harness.ts
CHANGED
|
@@ -1665,6 +1665,9 @@ ${boundedMainMemory.trim()}`
|
|
|
1665
1665
|
const modelName = agent.frontmatter.model?.name ?? "claude-opus-4-5";
|
|
1666
1666
|
const temperature = agent.frontmatter.model?.temperature ?? 0.2;
|
|
1667
1667
|
const maxTokens = agent.frontmatter.model?.maxTokens;
|
|
1668
|
+
if (step === 1) {
|
|
1669
|
+
console.info(`[poncho] model="${modelName}" provider="${agent.frontmatter.model?.provider ?? "anthropic"}"`);
|
|
1670
|
+
}
|
|
1668
1671
|
|
|
1669
1672
|
const modelInstance = this.modelProvider(modelName);
|
|
1670
1673
|
const cachedMessages = addPromptCacheBreakpoints(coreMessages, modelInstance);
|