@plotday/twister 0.61.0 → 0.62.0
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/dist/connector.d.ts +14 -0
- package/dist/connector.d.ts.map +1 -1
- package/dist/connector.js +14 -0
- package/dist/connector.js.map +1 -1
- package/dist/docs/assets/hierarchy.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/classes/index.Connector.html +47 -26
- package/dist/docs/classes/index.FileNotFoundError.html +1 -1
- package/dist/docs/classes/index.Files.html +1 -1
- package/dist/docs/classes/index.Imap.html +1 -1
- package/dist/docs/classes/index.Options.html +1 -1
- package/dist/docs/classes/index.Smtp.html +1 -1
- package/dist/docs/classes/tool.ITool.html +1 -1
- package/dist/docs/classes/tool.Tool.html +17 -7
- package/dist/docs/classes/tools_ai.AI.html +1 -1
- package/dist/docs/classes/tools_callbacks.Callbacks.html +1 -1
- package/dist/docs/classes/tools_integrations.Integrations.html +1 -1
- package/dist/docs/classes/tools_network.Network.html +1 -1
- package/dist/docs/classes/tools_plot.Plot.html +1 -1
- package/dist/docs/classes/tools_store.Store.html +1 -1
- package/dist/docs/classes/tools_tasks.Tasks.html +40 -14
- package/dist/docs/classes/tools_twists.Twists.html +1 -1
- package/dist/docs/classes/twist.Twist.html +21 -11
- package/dist/docs/documents/Built-in_Tools.html +15 -13
- package/dist/docs/documents/Runtime_Environment.html +7 -5
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/media/AGENTS.md +23 -19
- package/dist/llm-docs/connector.d.ts +1 -1
- package/dist/llm-docs/connector.d.ts.map +1 -1
- package/dist/llm-docs/connector.js +1 -1
- package/dist/llm-docs/connector.js.map +1 -1
- package/dist/llm-docs/tool.d.ts +1 -1
- package/dist/llm-docs/tool.d.ts.map +1 -1
- package/dist/llm-docs/tool.js +1 -1
- package/dist/llm-docs/tool.js.map +1 -1
- package/dist/llm-docs/tools/tasks.d.ts +1 -1
- package/dist/llm-docs/tools/tasks.d.ts.map +1 -1
- package/dist/llm-docs/tools/tasks.js +1 -1
- package/dist/llm-docs/tools/tasks.js.map +1 -1
- package/dist/llm-docs/twist.d.ts +1 -1
- package/dist/llm-docs/twist.d.ts.map +1 -1
- package/dist/llm-docs/twist.js +1 -1
- package/dist/llm-docs/twist.js.map +1 -1
- package/dist/tool.d.ts +16 -0
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +15 -0
- package/dist/tool.js.map +1 -1
- package/dist/tools/tasks.d.ts +58 -12
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js.map +1 -1
- package/dist/twist.d.ts +16 -0
- package/dist/twist.d.ts.map +1 -1
- package/dist/twist.js +15 -0
- package/dist/twist.js.map +1 -1
- package/package.json +1 -1
- package/src/connector.ts +15 -0
- package/src/llm-docs/connector.ts +1 -1
- package/src/llm-docs/tool.ts +1 -1
- package/src/llm-docs/tools/tasks.ts +1 -1
- package/src/llm-docs/twist.ts +1 -1
- package/src/tool.ts +20 -0
- package/src/tools/tasks.ts +61 -12
- package/src/twist.ts +20 -0
package/src/twist.ts
CHANGED
|
@@ -327,6 +327,26 @@ export abstract class Twist<TSelf> {
|
|
|
327
327
|
return this.tools.tasks.cancelScheduledTask(key);
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Schedules a durable recurring task under a stable key. The platform
|
|
332
|
+
* re-arms the task every `intervalMs` automatically — the callback does NOT
|
|
333
|
+
* need to reschedule itself. Re-scheduling under the same key atomically
|
|
334
|
+
* replaces the pending occurrence (at most one live task per key). Tear down
|
|
335
|
+
* with {@link cancelScheduledTask}. See {@link Tasks.scheduleRecurring}.
|
|
336
|
+
*
|
|
337
|
+
* @param key - Stable identifier, e.g. `"mailbox-self-heal"`
|
|
338
|
+
* @param callback - Callback token created with `this.callback()`
|
|
339
|
+
* @param options.intervalMs - Safety-ceiling cadence in milliseconds
|
|
340
|
+
* @param options.firstRunAt - Optional precise time for the next fire
|
|
341
|
+
*/
|
|
342
|
+
protected async scheduleRecurring(
|
|
343
|
+
key: string,
|
|
344
|
+
callback: Callback,
|
|
345
|
+
options: { intervalMs: number; firstRunAt?: Date }
|
|
346
|
+
): Promise<void> {
|
|
347
|
+
return this.tools.tasks.scheduleRecurring(key, callback, options);
|
|
348
|
+
}
|
|
349
|
+
|
|
330
350
|
/**
|
|
331
351
|
* Called when the twist is installed by a user.
|
|
332
352
|
*
|