@promptbook/remote-server 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/remote-server",
|
|
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,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"module": "./esm/index.es.js",
|
|
96
96
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.105.0-
|
|
98
|
+
"@promptbook/core": "0.105.0-4"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* @generated
|
|
48
48
|
* @see https://github.com/webgptorg/promptbook
|
|
49
49
|
*/
|
|
50
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-
|
|
50
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.105.0-4';
|
|
51
51
|
/**
|
|
52
52
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
53
53
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -11730,7 +11730,12 @@
|
|
|
11730
11730
|
description: 'Get the current date and time in ISO 8601 format.',
|
|
11731
11731
|
parameters: {
|
|
11732
11732
|
type: 'object',
|
|
11733
|
-
properties: {
|
|
11733
|
+
properties: {
|
|
11734
|
+
timezone: {
|
|
11735
|
+
type: 'string',
|
|
11736
|
+
description: 'Optional timezone name (e.g. "Europe/Prague", "UTC", "America/New_York").',
|
|
11737
|
+
},
|
|
11738
|
+
},
|
|
11734
11739
|
required: [],
|
|
11735
11740
|
},
|
|
11736
11741
|
},
|
|
@@ -11750,9 +11755,36 @@
|
|
|
11750
11755
|
*/
|
|
11751
11756
|
getToolFunctions() {
|
|
11752
11757
|
return {
|
|
11753
|
-
async get_current_time() {
|
|
11754
|
-
|
|
11755
|
-
|
|
11758
|
+
async get_current_time(args) {
|
|
11759
|
+
var _a;
|
|
11760
|
+
console.log('!!!! [Tool] get_current_time called', { args });
|
|
11761
|
+
const { timezone } = args;
|
|
11762
|
+
if (!timezone) {
|
|
11763
|
+
return new Date().toISOString();
|
|
11764
|
+
}
|
|
11765
|
+
try {
|
|
11766
|
+
// Note: Returning ISO 8601 string but in the requested timezone
|
|
11767
|
+
const formatter = new Intl.DateTimeFormat('en-CA', {
|
|
11768
|
+
timeZone: timezone,
|
|
11769
|
+
year: 'numeric',
|
|
11770
|
+
month: '2-digit',
|
|
11771
|
+
day: '2-digit',
|
|
11772
|
+
hour: '2-digit',
|
|
11773
|
+
minute: '2-digit',
|
|
11774
|
+
second: '2-digit',
|
|
11775
|
+
hour12: false,
|
|
11776
|
+
timeZoneName: 'shortOffset',
|
|
11777
|
+
});
|
|
11778
|
+
const parts = formatter.formatToParts(new Date());
|
|
11779
|
+
const part = (type) => { var _a; return (_a = parts.find((p) => p.type === type)) === null || _a === void 0 ? void 0 : _a.value; };
|
|
11780
|
+
// en-CA format is YYYY-MM-DD
|
|
11781
|
+
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', '')}`;
|
|
11782
|
+
return isoString;
|
|
11783
|
+
}
|
|
11784
|
+
catch (error) {
|
|
11785
|
+
// Fallback to UTC if timezone is invalid
|
|
11786
|
+
return new Date().toISOString();
|
|
11787
|
+
}
|
|
11756
11788
|
},
|
|
11757
11789
|
};
|
|
11758
11790
|
}
|