@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @poncho-ai/harness@0.40.0 build /home/runner/work/poncho-ai/poncho-ai/packages/harness
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
  CLI tsup v8.5.1
9
9
  CLI Target: es2022
10
10
  ESM Build start
11
- ESM dist/index.js 489.99 KB
11
+ ESM dist/index.js 489.88 KB
12
12
  ESM dist/isolate-VY35DGLM.js 49.43 KB
13
- ESM ⚡️ Build success in 173ms
13
+ ESM ⚡️ Build success in 205ms
14
14
  DTS Build start
15
- DTS ⚡️ Build success in 7364ms
15
+ DTS ⚡️ Build success in 7664ms
16
16
  DTS dist/index.d.ts 75.12 KB
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 KNOWN_TIMEZONES = (() => {
78
+ var validateTimezone = (tz, path) => {
79
79
  try {
80
- return new Set(Intl.supportedValuesOf("timeZone"));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/harness",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "description": "Agent execution runtime - conversation loop, tool dispatch, streaming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -91,16 +91,14 @@ const validateCronExpression = (expr: string, path: string): void => {
91
91
  }
92
92
  };
93
93
 
94
- const KNOWN_TIMEZONES: Set<string> | null = (() => {
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
- return new Set(Intl.supportedValuesOf("timeZone"));
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