@poncho-ai/harness 0.40.0 → 0.40.1
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 +17 -0
- package/dist/index.js +2 -7
- package/package.json +1 -1
- package/src/agent-parser.ts +6 -8
- package/test/agent-parser.test.ts +18 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @poncho-ai/harness@0.40.
|
|
2
|
+
> @poncho-ai/harness@0.40.1 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
|
|
3
3
|
> node scripts/embed-docs.js && tsup src/index.ts --format esm --dts
|
|
4
4
|
|
|
5
5
|
[embed-docs] Generated poncho-docs.ts with 4 topics
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
[34mCLI[39m tsup v8.5.1
|
|
9
9
|
[34mCLI[39m Target: es2022
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.js [22m[32m489.
|
|
11
|
+
[32mESM[39m [1mdist/index.js [22m[32m489.88 KB[39m
|
|
12
12
|
[32mESM[39m [1mdist/isolate-VY35DGLM.js [22m[32m49.43 KB[39m
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 205ms
|
|
14
14
|
[34mDTS[39m Build start
|
|
15
|
-
[32mDTS[39m ⚡️ Build success in
|
|
15
|
+
[32mDTS[39m ⚡️ Build success in 7664ms
|
|
16
16
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m75.12 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @poncho-ai/harness
|
|
2
2
|
|
|
3
|
+
## 0.40.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8dec90d`](https://github.com/cesr/poncho-ai/commit/8dec90d4df246b0cc16adc9fae61a568db67cbfe) Thanks [@cesr](https://github.com/cesr)! - fix(harness): accept "UTC" (and "GMT") as valid cron timezones
|
|
8
|
+
|
|
9
|
+
`AGENT.md` cron jobs with `timezone: "UTC"` were rejected at parse time
|
|
10
|
+
with `Invalid timezone at AGENT.md frontmatter cron.<job>: "UTC"`. The
|
|
11
|
+
validator was matching against `Intl.supportedValuesOf("timeZone")`,
|
|
12
|
+
which returns canonical IANA names only (`"Etc/UTC"`) and excludes
|
|
13
|
+
common aliases like `"UTC"` and `"GMT"`, even though `Intl.DateTimeFormat`
|
|
14
|
+
accepts them everywhere. The error message ironically cited `"UTC"`
|
|
15
|
+
itself as a valid example.
|
|
16
|
+
|
|
17
|
+
Now delegates to `Intl.DateTimeFormat` directly, which accepts `"UTC"`,
|
|
18
|
+
`"GMT"`, every IANA name, and any platform alias the runtime knows about.
|
|
19
|
+
|
|
3
20
|
## 0.40.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -75,15 +75,10 @@ var validateCronExpression = (expr, path) => {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
var
|
|
78
|
+
var validateTimezone = (tz, path) => {
|
|
79
79
|
try {
|
|
80
|
-
|
|
80
|
+
new Intl.DateTimeFormat("en", { timeZone: tz });
|
|
81
81
|
} catch {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
})();
|
|
85
|
-
var validateTimezone = (tz, path) => {
|
|
86
|
-
if (KNOWN_TIMEZONES && !KNOWN_TIMEZONES.has(tz)) {
|
|
87
82
|
throw new Error(
|
|
88
83
|
`Invalid timezone at ${path}: "${tz}". Expected an IANA timezone string (e.g. "America/New_York", "UTC").`
|
|
89
84
|
);
|
package/package.json
CHANGED
package/src/agent-parser.ts
CHANGED
|
@@ -91,16 +91,14 @@ const validateCronExpression = (expr: string, path: string): void => {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
const
|
|
94
|
+
const validateTimezone = (tz: string, path: string): void => {
|
|
95
|
+
// Delegate to the runtime's Intl resolver rather than checking against
|
|
96
|
+
// `Intl.supportedValuesOf("timeZone")`. The latter returns only canonical
|
|
97
|
+
// IANA names (e.g. "Etc/UTC") and rejects common aliases like "UTC" and
|
|
98
|
+
// "GMT", even though `Intl.DateTimeFormat` accepts them everywhere.
|
|
95
99
|
try {
|
|
96
|
-
|
|
100
|
+
new Intl.DateTimeFormat("en", { timeZone: tz });
|
|
97
101
|
} catch {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
})();
|
|
101
|
-
|
|
102
|
-
const validateTimezone = (tz: string, path: string): void => {
|
|
103
|
-
if (KNOWN_TIMEZONES && !KNOWN_TIMEZONES.has(tz)) {
|
|
104
102
|
throw new Error(
|
|
105
103
|
`Invalid timezone at ${path}: "${tz}". Expected an IANA timezone string (e.g. "America/New_York", "UTC").`,
|
|
106
104
|
);
|
|
@@ -166,6 +166,24 @@ cron:
|
|
|
166
166
|
expect(parsed.frontmatter.cron!["job"]!.timezone).toBe("Europe/London");
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
+
it.each(["UTC", "GMT", "Etc/UTC"])(
|
|
170
|
+
"accepts %s as a timezone",
|
|
171
|
+
(tz) => {
|
|
172
|
+
const parsed = parseAgentMarkdown(`---
|
|
173
|
+
name: test-agent
|
|
174
|
+
cron:
|
|
175
|
+
job:
|
|
176
|
+
schedule: "0 9 * * *"
|
|
177
|
+
timezone: "${tz}"
|
|
178
|
+
task: "Do something"
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
# Agent
|
|
182
|
+
`);
|
|
183
|
+
expect(parsed.frontmatter.cron!["job"]!.timezone).toBe(tz);
|
|
184
|
+
},
|
|
185
|
+
);
|
|
186
|
+
|
|
169
187
|
it("parses maxRuns when present", () => {
|
|
170
188
|
const parsed = parseAgentMarkdown(`---
|
|
171
189
|
name: test-agent
|