@promptbook/wizard 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.
@@ -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-2`).
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/wizard",
3
- "version": "0.105.0-3",
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/wizard.index.d.ts",
97
97
  "peerDependencies": {
98
- "@promptbook/core": "0.105.0-3"
98
+ "@promptbook/core": "0.105.0-4"
99
99
  },
100
100
  "dependencies": {
101
101
  "@ai-sdk/deepseek": "0.1.17",
package/umd/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  * @generated
49
49
  * @see https://github.com/webgptorg/promptbook
50
50
  */
51
- const PROMPTBOOK_ENGINE_VERSION = '0.105.0-3';
51
+ const PROMPTBOOK_ENGINE_VERSION = '0.105.0-4';
52
52
  /**
53
53
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
54
54
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -5984,7 +5984,7 @@
5984
5984
  const args = ${functionArgs};
5985
5985
  return await ${functionName}(args);
5986
5986
  `,
5987
- parameters: {}, // <- TODO: [🧠] What parameters to pass?
5987
+ parameters: prompt.parameters,
5988
5988
  });
5989
5989
  }
5990
5990
  catch (error) {
@@ -8249,7 +8249,7 @@
8249
8249
  const args = ${JSON.stringify(functionArgs)};
8250
8250
  return await ${functionName}(args);
8251
8251
  `,
8252
- parameters: {}, // <- TODO: [🧠] What parameters to pass?
8252
+ parameters: prompt.parameters,
8253
8253
  });
8254
8254
  if (this.options.isVerbose) {
8255
8255
  console.info(`✅ Tool ${functionName} executed:`, functionResponse);
@@ -17838,7 +17838,12 @@
17838
17838
  description: 'Get the current date and time in ISO 8601 format.',
17839
17839
  parameters: {
17840
17840
  type: 'object',
17841
- properties: {},
17841
+ properties: {
17842
+ timezone: {
17843
+ type: 'string',
17844
+ description: 'Optional timezone name (e.g. "Europe/Prague", "UTC", "America/New_York").',
17845
+ },
17846
+ },
17842
17847
  required: [],
17843
17848
  },
17844
17849
  },
@@ -17858,9 +17863,36 @@
17858
17863
  */
17859
17864
  getToolFunctions() {
17860
17865
  return {
17861
- async get_current_time() {
17862
- console.log('!!!! [Tool] get_current_time called');
17863
- return new Date().toISOString();
17866
+ async get_current_time(args) {
17867
+ var _a;
17868
+ console.log('!!!! [Tool] get_current_time called', { args });
17869
+ const { timezone } = args;
17870
+ if (!timezone) {
17871
+ return new Date().toISOString();
17872
+ }
17873
+ try {
17874
+ // Note: Returning ISO 8601 string but in the requested timezone
17875
+ const formatter = new Intl.DateTimeFormat('en-CA', {
17876
+ timeZone: timezone,
17877
+ year: 'numeric',
17878
+ month: '2-digit',
17879
+ day: '2-digit',
17880
+ hour: '2-digit',
17881
+ minute: '2-digit',
17882
+ second: '2-digit',
17883
+ hour12: false,
17884
+ timeZoneName: 'shortOffset',
17885
+ });
17886
+ const parts = formatter.formatToParts(new Date());
17887
+ const part = (type) => { var _a; return (_a = parts.find((p) => p.type === type)) === null || _a === void 0 ? void 0 : _a.value; };
17888
+ // en-CA format is YYYY-MM-DD
17889
+ 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', '')}`;
17890
+ return isoString;
17891
+ }
17892
+ catch (error) {
17893
+ // Fallback to UTC if timezone is invalid
17894
+ return new Date().toISOString();
17895
+ }
17864
17896
  },
17865
17897
  };
17866
17898
  }