diff --git a/package-lock.json b/package-lock.json index 8473005..a516936 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ssntpl/openclaw-otper", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ssntpl/openclaw-otper", - "version": "0.1.2", + "version": "0.1.3", "license": "MIT", "dependencies": { - "@ssntpl/otper-cli": "^0.1.5" + "@ssntpl/otper-cli": "^0.1.7" }, "devDependencies": { "@types/node": "^20.16.10", @@ -446,9 +446,9 @@ } }, "node_modules/@ssntpl/otper-cli": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@ssntpl/otper-cli/-/otper-cli-0.1.5.tgz", - "integrity": "sha512-LOcUU4VxzadXAhAwCJXysW2aGzWPDEDeMr0+9YklhV+T0BaLLZeB91VHB/XRunA94FZJxH5BHQZxefv0n1hw7Q==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@ssntpl/otper-cli/-/otper-cli-0.1.7.tgz", + "integrity": "sha512-cPT4Z0MA6vdbYVxghRUaT9FSWqVc3iImBXnd8fpa9u6CqRKojfE3tZPrSFTfY4qbPrwSyJFA7WnK3KM/lALH9A==", "license": "MIT", "dependencies": { "@oclif/core": "^4.0.30", diff --git a/package.json b/package.json index fd6d3a8..e1ba26b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ssntpl/openclaw-otper", - "version": "0.1.2", + "version": "0.1.3", "description": "OpenClaw plugin for Otper boards (https://otper.com) — exposes Otper boards, lists, cards, labels, comments, and today's priorities as agent tools.", "author": "SSNTPL ", "license": "MIT", @@ -39,7 +39,7 @@ ] }, "dependencies": { - "@ssntpl/otper-cli": "^0.1.5" + "@ssntpl/otper-cli": "^0.1.7" }, "devDependencies": { "@types/node": "^20.16.10", diff --git a/tools/shared.ts b/tools/shared.ts index e4fa9e9..889d7fe 100644 --- a/tools/shared.ts +++ b/tools/shared.ts @@ -1,4 +1,4 @@ -import { OtperClient, resolveConfig } from "@ssntpl/otper-cli"; +import { OtperClient, resolveConfig, toOtperDateTime } from "@ssntpl/otper-cli"; export interface PluginConfig { token?: string; @@ -52,7 +52,11 @@ export function fmtDate(iso: string | null | undefined): string { return iso.replace("T", " ").replace(/\.\d+Z?$/, "").replace(/Z$/, " UTC"); } -/** Today's date as YYYY-MM-DD HH:MM:SS, used as default `assigned_at`. */ +/** + * Otper-formatted "now" (YYYY-MM-DD HH:MM:SS UTC). Otper rejects ISO-8601 + * strings with milliseconds; this helper matches what its DateTime scalar + * accepts. + */ export function nowIso(): string { - return new Date().toISOString(); + return toOtperDateTime(); }