@promptbook/documents 0.112.0-12 → 0.112.0-13

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/esm/index.es.js CHANGED
@@ -26,7 +26,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
26
26
  * @generated
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-12';
29
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-13';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,7 +2,7 @@ import type { ToolFunction } from '../../_packages/types.index';
2
2
  /**
3
3
  * Resolves the server-side implementation of the `run_browser` tool for Node.js environments.
4
4
  *
5
- * This uses lazy `require` to keep the core package decoupled from Agents Server internals.
5
+ * This uses fully lazy resolution to keep CLI startup independent from optional browser tooling.
6
6
  * When the server tool cannot be resolved, the fallback implementation throws a helpful error.
7
7
  *
8
8
  * @private internal utility for USE BROWSER commitment
@@ -6,4 +6,5 @@
6
6
  export declare const TimeoutToolNames: {
7
7
  readonly set: string;
8
8
  readonly cancel: string;
9
+ readonly list: string;
9
10
  };
@@ -18,6 +18,16 @@ export type CancelTimeoutToolArgs = {
18
18
  timeoutId?: string;
19
19
  [key: string]: TODO_any;
20
20
  };
21
+ /**
22
+ * Tool arguments for listing scoped timeouts.
23
+ *
24
+ * @private type of UseTimeoutCommitmentDefinition
25
+ */
26
+ export type ListTimeoutsToolArgs = {
27
+ includeFinished?: boolean;
28
+ limit?: number;
29
+ [key: string]: TODO_any;
30
+ };
21
31
  /**
22
32
  * Runtime context available to `USE TIMEOUT` tools.
23
33
  *
@@ -31,6 +41,26 @@ export type TimeoutToolRuntimeContext = {
31
41
  readonly agentName?: string;
32
42
  readonly promptParameters: Record<string, string>;
33
43
  };
44
+ /**
45
+ * Lifecycle status exposed by `list_timeouts`.
46
+ *
47
+ * @private type of UseTimeoutCommitmentDefinition
48
+ */
49
+ export type TimeoutToolListItemStatus = 'QUEUED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
50
+ /**
51
+ * One timeout row exposed by `list_timeouts`.
52
+ *
53
+ * @private type of UseTimeoutCommitmentDefinition
54
+ */
55
+ export type TimeoutToolListItem = {
56
+ timeoutId: string;
57
+ chatId: string;
58
+ status: TimeoutToolListItemStatus;
59
+ dueAt: string;
60
+ paused: boolean;
61
+ message?: string | null;
62
+ recurrenceIntervalMs?: number | null;
63
+ };
34
64
  /**
35
65
  * Result payload returned by `set_timeout`.
36
66
  *
@@ -55,18 +85,30 @@ export type CancelTimeoutToolResult = {
55
85
  dueAt?: string;
56
86
  message?: string;
57
87
  };
88
+ /**
89
+ * Result payload returned by `list_timeouts`.
90
+ *
91
+ * @private type of UseTimeoutCommitmentDefinition
92
+ */
93
+ export type ListTimeoutsToolResult = {
94
+ action: 'list';
95
+ status: 'listed' | 'disabled' | 'error';
96
+ items?: Array<TimeoutToolListItem>;
97
+ total?: number;
98
+ message?: string;
99
+ };
58
100
  /**
59
101
  * Union of all `USE TIMEOUT` tool actions.
60
102
  *
61
103
  * @private type of UseTimeoutCommitmentDefinition
62
104
  */
63
- export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'];
105
+ export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'];
64
106
  /**
65
107
  * Union of all `USE TIMEOUT` tool results.
66
108
  *
67
109
  * @private type of UseTimeoutCommitmentDefinition
68
110
  */
69
- export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult;
111
+ export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult;
70
112
  /**
71
113
  * Runtime adapter used by `USE TIMEOUT` tools.
72
114
  *
@@ -87,4 +129,11 @@ export type TimeoutToolRuntimeAdapter = {
87
129
  dueAt?: string;
88
130
  status: 'cancelled' | 'not_found';
89
131
  }>;
132
+ listTimeouts(args: {
133
+ includeFinished: boolean;
134
+ limit: number;
135
+ }, runtimeContext: TimeoutToolRuntimeContext): Promise<{
136
+ items: Array<TimeoutToolListItem>;
137
+ total: number;
138
+ }>;
90
139
  };
@@ -3,11 +3,11 @@ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentMo
3
3
  import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
4
4
  import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
5
5
  export { setTimeoutToolRuntimeAdapter } from './setTimeoutToolRuntimeAdapter';
6
- export type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
6
+ export type { CancelTimeoutToolResult, ListTimeoutsToolResult, SetTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
7
7
  /**
8
8
  * `USE TIMEOUT` commitment definition.
9
9
  *
10
- * The `USE TIMEOUT` commitment enables thread-scoped timers that wake the same chat later.
10
+ * The `USE TIMEOUT` commitment enables timeout wake-ups and scoped timeout management.
11
11
  *
12
12
  * @private [🪔] Maybe export the commitments through some package
13
13
  */
@@ -1,4 +1,4 @@
1
- import type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolAction, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext } from './TimeoutToolRuntimeAdapter';
1
+ import type { TimeoutToolAction, TimeoutToolResult, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext } from './TimeoutToolRuntimeAdapter';
2
2
  /**
3
3
  * Return type of timeout adapter resolution helper.
4
4
  *
@@ -6,7 +6,7 @@ import type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolAction,
6
6
  */
7
7
  type TimeoutToolRuntimeAdapterResolution = {
8
8
  adapter: TimeoutToolRuntimeAdapter | null;
9
- disabledResult: SetTimeoutToolResult | CancelTimeoutToolResult | null;
9
+ disabledResult: TimeoutToolResult | null;
10
10
  };
11
11
  /**
12
12
  * Resolves the runtime adapter for timeout tools or returns disabled payload when unavailable.
@@ -1,4 +1,4 @@
1
- import type { CancelTimeoutToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
1
+ import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
2
2
  /**
3
3
  * Parsed arguments for `set_timeout`.
4
4
  *
@@ -16,6 +16,15 @@ type ParsedSetTimeoutToolArgs = {
16
16
  type ParsedCancelTimeoutToolArgs = {
17
17
  timeoutId: string;
18
18
  };
19
+ /**
20
+ * Parsed arguments for `list_timeouts`.
21
+ *
22
+ * @private type of UseTimeoutCommitmentDefinition
23
+ */
24
+ type ParsedListTimeoutsToolArgs = {
25
+ includeFinished: boolean;
26
+ limit: number;
27
+ };
19
28
  /**
20
29
  * Parses and validates `USE TIMEOUT` tool arguments.
21
30
  *
@@ -30,5 +39,9 @@ export declare const parseTimeoutToolArgs: {
30
39
  * Parses `cancel_timeout` input.
31
40
  */
32
41
  cancel(args: CancelTimeoutToolArgs): ParsedCancelTimeoutToolArgs;
42
+ /**
43
+ * Parses `list_timeouts` input.
44
+ */
45
+ list(args: ListTimeoutsToolArgs): ParsedListTimeoutsToolArgs;
33
46
  };
34
47
  export {};
@@ -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.112.0-11`).
18
+ * It follows semantic versioning (e.g., `0.112.0-12`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/documents",
3
- "version": "0.112.0-12",
3
+ "version": "0.112.0-13",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -98,7 +98,7 @@
98
98
  "module": "./esm/index.es.js",
99
99
  "typings": "./esm/typings/src/_packages/documents.index.d.ts",
100
100
  "peerDependencies": {
101
- "@promptbook/core": "0.112.0-12"
101
+ "@promptbook/core": "0.112.0-13"
102
102
  },
103
103
  "dependencies": {
104
104
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * @generated
26
26
  * @see https://github.com/webgptorg/promptbook
27
27
  */
28
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-12';
28
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-13';
29
29
  /**
30
30
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
31
31
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2,7 +2,7 @@ import type { ToolFunction } from '../../_packages/types.index';
2
2
  /**
3
3
  * Resolves the server-side implementation of the `run_browser` tool for Node.js environments.
4
4
  *
5
- * This uses lazy `require` to keep the core package decoupled from Agents Server internals.
5
+ * This uses fully lazy resolution to keep CLI startup independent from optional browser tooling.
6
6
  * When the server tool cannot be resolved, the fallback implementation throws a helpful error.
7
7
  *
8
8
  * @private internal utility for USE BROWSER commitment
@@ -6,4 +6,5 @@
6
6
  export declare const TimeoutToolNames: {
7
7
  readonly set: string;
8
8
  readonly cancel: string;
9
+ readonly list: string;
9
10
  };
@@ -18,6 +18,16 @@ export type CancelTimeoutToolArgs = {
18
18
  timeoutId?: string;
19
19
  [key: string]: TODO_any;
20
20
  };
21
+ /**
22
+ * Tool arguments for listing scoped timeouts.
23
+ *
24
+ * @private type of UseTimeoutCommitmentDefinition
25
+ */
26
+ export type ListTimeoutsToolArgs = {
27
+ includeFinished?: boolean;
28
+ limit?: number;
29
+ [key: string]: TODO_any;
30
+ };
21
31
  /**
22
32
  * Runtime context available to `USE TIMEOUT` tools.
23
33
  *
@@ -31,6 +41,26 @@ export type TimeoutToolRuntimeContext = {
31
41
  readonly agentName?: string;
32
42
  readonly promptParameters: Record<string, string>;
33
43
  };
44
+ /**
45
+ * Lifecycle status exposed by `list_timeouts`.
46
+ *
47
+ * @private type of UseTimeoutCommitmentDefinition
48
+ */
49
+ export type TimeoutToolListItemStatus = 'QUEUED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
50
+ /**
51
+ * One timeout row exposed by `list_timeouts`.
52
+ *
53
+ * @private type of UseTimeoutCommitmentDefinition
54
+ */
55
+ export type TimeoutToolListItem = {
56
+ timeoutId: string;
57
+ chatId: string;
58
+ status: TimeoutToolListItemStatus;
59
+ dueAt: string;
60
+ paused: boolean;
61
+ message?: string | null;
62
+ recurrenceIntervalMs?: number | null;
63
+ };
34
64
  /**
35
65
  * Result payload returned by `set_timeout`.
36
66
  *
@@ -55,18 +85,30 @@ export type CancelTimeoutToolResult = {
55
85
  dueAt?: string;
56
86
  message?: string;
57
87
  };
88
+ /**
89
+ * Result payload returned by `list_timeouts`.
90
+ *
91
+ * @private type of UseTimeoutCommitmentDefinition
92
+ */
93
+ export type ListTimeoutsToolResult = {
94
+ action: 'list';
95
+ status: 'listed' | 'disabled' | 'error';
96
+ items?: Array<TimeoutToolListItem>;
97
+ total?: number;
98
+ message?: string;
99
+ };
58
100
  /**
59
101
  * Union of all `USE TIMEOUT` tool actions.
60
102
  *
61
103
  * @private type of UseTimeoutCommitmentDefinition
62
104
  */
63
- export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'];
105
+ export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'];
64
106
  /**
65
107
  * Union of all `USE TIMEOUT` tool results.
66
108
  *
67
109
  * @private type of UseTimeoutCommitmentDefinition
68
110
  */
69
- export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult;
111
+ export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult;
70
112
  /**
71
113
  * Runtime adapter used by `USE TIMEOUT` tools.
72
114
  *
@@ -87,4 +129,11 @@ export type TimeoutToolRuntimeAdapter = {
87
129
  dueAt?: string;
88
130
  status: 'cancelled' | 'not_found';
89
131
  }>;
132
+ listTimeouts(args: {
133
+ includeFinished: boolean;
134
+ limit: number;
135
+ }, runtimeContext: TimeoutToolRuntimeContext): Promise<{
136
+ items: Array<TimeoutToolListItem>;
137
+ total: number;
138
+ }>;
90
139
  };
@@ -3,11 +3,11 @@ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentMo
3
3
  import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
4
4
  import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
5
5
  export { setTimeoutToolRuntimeAdapter } from './setTimeoutToolRuntimeAdapter';
6
- export type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
6
+ export type { CancelTimeoutToolResult, ListTimeoutsToolResult, SetTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
7
7
  /**
8
8
  * `USE TIMEOUT` commitment definition.
9
9
  *
10
- * The `USE TIMEOUT` commitment enables thread-scoped timers that wake the same chat later.
10
+ * The `USE TIMEOUT` commitment enables timeout wake-ups and scoped timeout management.
11
11
  *
12
12
  * @private [🪔] Maybe export the commitments through some package
13
13
  */
@@ -1,4 +1,4 @@
1
- import type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolAction, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext } from './TimeoutToolRuntimeAdapter';
1
+ import type { TimeoutToolAction, TimeoutToolResult, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext } from './TimeoutToolRuntimeAdapter';
2
2
  /**
3
3
  * Return type of timeout adapter resolution helper.
4
4
  *
@@ -6,7 +6,7 @@ import type { CancelTimeoutToolResult, SetTimeoutToolResult, TimeoutToolAction,
6
6
  */
7
7
  type TimeoutToolRuntimeAdapterResolution = {
8
8
  adapter: TimeoutToolRuntimeAdapter | null;
9
- disabledResult: SetTimeoutToolResult | CancelTimeoutToolResult | null;
9
+ disabledResult: TimeoutToolResult | null;
10
10
  };
11
11
  /**
12
12
  * Resolves the runtime adapter for timeout tools or returns disabled payload when unavailable.
@@ -1,4 +1,4 @@
1
- import type { CancelTimeoutToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
1
+ import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
2
2
  /**
3
3
  * Parsed arguments for `set_timeout`.
4
4
  *
@@ -16,6 +16,15 @@ type ParsedSetTimeoutToolArgs = {
16
16
  type ParsedCancelTimeoutToolArgs = {
17
17
  timeoutId: string;
18
18
  };
19
+ /**
20
+ * Parsed arguments for `list_timeouts`.
21
+ *
22
+ * @private type of UseTimeoutCommitmentDefinition
23
+ */
24
+ type ParsedListTimeoutsToolArgs = {
25
+ includeFinished: boolean;
26
+ limit: number;
27
+ };
19
28
  /**
20
29
  * Parses and validates `USE TIMEOUT` tool arguments.
21
30
  *
@@ -30,5 +39,9 @@ export declare const parseTimeoutToolArgs: {
30
39
  * Parses `cancel_timeout` input.
31
40
  */
32
41
  cancel(args: CancelTimeoutToolArgs): ParsedCancelTimeoutToolArgs;
42
+ /**
43
+ * Parses `list_timeouts` input.
44
+ */
45
+ list(args: ListTimeoutsToolArgs): ParsedListTimeoutsToolArgs;
33
46
  };
34
47
  export {};
@@ -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.112.0-11`).
18
+ * It follows semantic versioning (e.g., `0.112.0-12`).
19
19
  *
20
20
  * @generated
21
21
  */