loopengine 0.1.93 → 0.1.95

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.
@@ -70,6 +70,7 @@ export interface CreatedTemplateAgent {
70
70
  exampleMessage?: string;
71
71
  schedule?: {
72
72
  description: string;
73
+ timeZone?: string;
73
74
  next_run_at?: string;
74
75
  };
75
76
  /** Set when the schedule couldn't be created; the agent still was. */
@@ -9,6 +9,7 @@
9
9
  // rule. Its template's rules are written before its abilities' own, so
10
10
  // they take precedence where both name the same tool.
11
11
  import { createScheduledTask, pauseScheduledTask } from '../core/scheduler.js';
12
+ import { workspaceTimeZone } from '../core/time-zone.js';
12
13
  import { STARTER_TEMPLATES, starterTemplate, templateScheduleStart } from '../core/system-agents/templates.js';
13
14
  import { ActauthRuleExistsError, addActauthRule, setDefaultDecision } from './actauth-admin.js';
14
15
  import { setAgentEnvVar } from './env-admin.js';
@@ -168,7 +169,7 @@ export async function createFromTemplate(id, deps) {
168
169
  task_name: setup.schedule.name,
169
170
  });
170
171
  await pauseScheduledTask(task.task_id);
171
- schedule = { description: describeTemplateSchedule(setup.schedule), ...(startAt ? { next_run_at: startAt } : {}) };
172
+ schedule = { description: describeTemplateSchedule(setup.schedule), timeZone: workspaceTimeZone(), ...(startAt ? { next_run_at: startAt } : {}) };
172
173
  }
173
174
  catch (err) {
174
175
  scheduleError = err instanceof Error ? err.message : String(err);
@@ -210,7 +211,7 @@ async function createFromTemplateLegacy(id, deps) {
210
211
  const startAt = templateScheduleStart(setup.schedule);
211
212
  const task = await createScheduledTask({ agent: name, message: setup.schedule.message, schedule: { every: setup.schedule.every, ...(startAt ? { start_at: startAt } : {}) }, task_name: setup.schedule.name });
212
213
  await pauseScheduledTask(task.task_id);
213
- schedule = { description: describeTemplateSchedule(setup.schedule), ...(startAt ? { next_run_at: startAt } : {}) };
214
+ schedule = { description: describeTemplateSchedule(setup.schedule), timeZone: workspaceTimeZone(), ...(startAt ? { next_run_at: startAt } : {}) };
214
215
  }
215
216
  catch (err) {
216
217
  scheduleError = err instanceof Error ? err.message : String(err);
@@ -136,7 +136,7 @@ ${consoleShellScript}
136
136
  slot.innerHTML = '<div class="tp-preview">' +
137
137
  '<div><strong>Created <code>' + esc(c.name) + '</code>.</strong> Anything its permissions don' + String.fromCharCode(8217) + 't cover asks you first.</div>' +
138
138
  (installed ? '<div>' + CHECK + ' Installed ' + installed + '</div>' : '') +
139
- (c.schedule ? '<div>' + CHECK + ' Schedule created, paused: ' + esc(c.schedule.description) + (c.schedule.next_run_at ? ' (first run ' + esc(new Date(c.schedule.next_run_at).toLocaleString()) + ' once turned on)' : '') + '</div>' : '') +
139
+ (c.schedule ? '<div>' + CHECK + ' Schedule created, paused: ' + esc(c.schedule.description) + (c.schedule.next_run_at ? ' (first run ' + esc(new Date(c.schedule.next_run_at).toLocaleString(undefined, c.schedule.timeZone ? { timeZone: c.schedule.timeZone, timeZoneName: 'short' } : undefined)) + ' once turned on)' : '') + '</div>' : '') +
140
140
  (c.loadError ? '<div class="error">It was written but couldn' + String.fromCharCode(8217) + 't be loaded: ' + esc(c.loadError) + '</div>' : '') +
141
141
  (c.scheduleError ? '<div class="error">Its schedule wasn' + String.fromCharCode(8217) + 't created: ' + esc(c.scheduleError) + '. Add one in its Schedules tab.</div>' : '') +
142
142
  '<div><strong>Finish setup:</strong>' + checklistHtml(c.checklist) + '</div>' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",
@@ -57,6 +57,8 @@
57
57
  "dist/core/messaging",
58
58
  "dist/core/scheduler.js",
59
59
  "dist/core/scheduler.d.ts",
60
+ "dist/core/time-zone.js",
61
+ "dist/core/time-zone.d.ts",
60
62
  "dist/core/session-store.js",
61
63
  "dist/core/session-store.d.ts",
62
64
  "dist/core/vector-index.js",