@promptbook/node 0.105.0-3 → 0.105.0-4
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/README.md +36 -77
- package/esm/index.es.js +37 -5
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +37 -5
- package/umd/index.umd.js.map +1 -1
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.105.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.105.0-3`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/node",
|
|
3
|
-
"version": "0.105.0-
|
|
3
|
+
"version": "0.105.0-4",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"module": "./esm/index.es.js",
|
|
94
94
|
"typings": "./esm/typings/src/_packages/node.index.d.ts",
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@promptbook/core": "0.105.0-
|
|
96
|
+
"@promptbook/core": "0.105.0-4"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* @generated
|
|
46
46
|
* @see https://github.com/webgptorg/promptbook
|
|
47
47
|
*/
|
|
48
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
48
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-4';
|
|
49
49
|
/**
|
|
50
50
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
51
51
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -15436,7 +15436,12 @@
|
|
|
15436
15436
|
description: 'Get the current date and time in ISO 8601 format.',
|
|
15437
15437
|
parameters: {
|
|
15438
15438
|
type: 'object',
|
|
15439
|
-
properties: {
|
|
15439
|
+
properties: {
|
|
15440
|
+
timezone: {
|
|
15441
|
+
type: 'string',
|
|
15442
|
+
description: 'Optional timezone name (e.g. "Europe/Prague", "UTC", "America/New_York").',
|
|
15443
|
+
},
|
|
15444
|
+
},
|
|
15440
15445
|
required: [],
|
|
15441
15446
|
},
|
|
15442
15447
|
},
|
|
@@ -15456,9 +15461,36 @@
|
|
|
15456
15461
|
*/
|
|
15457
15462
|
getToolFunctions() {
|
|
15458
15463
|
return {
|
|
15459
|
-
async get_current_time() {
|
|
15460
|
-
|
|
15461
|
-
|
|
15464
|
+
async get_current_time(args) {
|
|
15465
|
+
var _a;
|
|
15466
|
+
console.log('!!!! [Tool] get_current_time called', { args });
|
|
15467
|
+
const { timezone } = args;
|
|
15468
|
+
if (!timezone) {
|
|
15469
|
+
return new Date().toISOString();
|
|
15470
|
+
}
|
|
15471
|
+
try {
|
|
15472
|
+
// Note: Returning ISO 8601 string but in the requested timezone
|
|
15473
|
+
const formatter = new Intl.DateTimeFormat('en-CA', {
|
|
15474
|
+
timeZone: timezone,
|
|
15475
|
+
year: 'numeric',
|
|
15476
|
+
month: '2-digit',
|
|
15477
|
+
day: '2-digit',
|
|
15478
|
+
hour: '2-digit',
|
|
15479
|
+
minute: '2-digit',
|
|
15480
|
+
second: '2-digit',
|
|
15481
|
+
hour12: false,
|
|
15482
|
+
timeZoneName: 'shortOffset',
|
|
15483
|
+
});
|
|
15484
|
+
const parts = formatter.formatToParts(new Date());
|
|
15485
|
+
const part = (type) => { var _a; return (_a = parts.find((p) => p.type === type)) === null || _a === void 0 ? void 0 : _a.value; };
|
|
15486
|
+
// en-CA format is YYYY-MM-DD
|
|
15487
|
+
const isoString = `${part('year')}-${part('month')}-${part('day')}T${part('hour')}:${part('minute')}:${part('second')}${(_a = part('timeZoneName')) === null || _a === void 0 ? void 0 : _a.replace('GMT', '')}`;
|
|
15488
|
+
return isoString;
|
|
15489
|
+
}
|
|
15490
|
+
catch (error) {
|
|
15491
|
+
// Fallback to UTC if timezone is invalid
|
|
15492
|
+
return new Date().toISOString();
|
|
15493
|
+
}
|
|
15462
15494
|
},
|
|
15463
15495
|
};
|
|
15464
15496
|
}
|