@promptbook/documents 0.112.0-20 → 0.112.0-22
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 +1 -1
- package/esm/src/book-components/Chat/MockedChat/MockedChat.d.ts +20 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +78 -5
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +1 -1
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +32 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/src/book-components/Chat/MockedChat/MockedChat.d.ts +20 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +78 -5
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +1 -1
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +32 -1
- package/umd/src/version.d.ts +1 -1
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-
|
|
29
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-22';
|
|
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
|
|
@@ -75,6 +75,26 @@ export type MockedChatProps = Omit<ChatProps, 'onReset' | /*'onMessage' | */ 'on
|
|
|
75
75
|
* @default true
|
|
76
76
|
*/
|
|
77
77
|
isPausable?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Optional absolute offsets (in milliseconds) for each message.
|
|
80
|
+
*
|
|
81
|
+
* When provided, playback waits according to these deterministic offsets
|
|
82
|
+
* instead of random delay heuristics.
|
|
83
|
+
*/
|
|
84
|
+
readonly messageOffsetsMs?: ReadonlyArray<number>;
|
|
85
|
+
/**
|
|
86
|
+
* When true, messages typed in the input are appended only in local UI state.
|
|
87
|
+
*
|
|
88
|
+
* This is useful for demo/recording flows where user interaction should not
|
|
89
|
+
* mutate the persisted mocked-chat preset.
|
|
90
|
+
*
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
readonly appendMessagesLocallyOnSend?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Optional callback invoked whenever one full simulation run completes.
|
|
96
|
+
*/
|
|
97
|
+
onSimulationComplete?(): void;
|
|
78
98
|
};
|
|
79
99
|
/**
|
|
80
100
|
* MockedChat component that shows the same chat as Chat but emulates ongoing discussion
|
|
@@ -16,6 +16,23 @@ export type SetTimeoutToolArgs = {
|
|
|
16
16
|
*/
|
|
17
17
|
export type CancelTimeoutToolArgs = {
|
|
18
18
|
timeoutId?: string;
|
|
19
|
+
allActive?: boolean;
|
|
20
|
+
[key: string]: TODO_any;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Tool arguments for updating one timeout or pausing/resuming all active queued timeouts.
|
|
24
|
+
*
|
|
25
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
26
|
+
*/
|
|
27
|
+
export type UpdateTimeoutToolArgs = {
|
|
28
|
+
timeoutId?: string;
|
|
29
|
+
allActive?: boolean;
|
|
30
|
+
dueAt?: string;
|
|
31
|
+
extendByMs?: number;
|
|
32
|
+
recurrenceIntervalMs?: number | null;
|
|
33
|
+
message?: string | null;
|
|
34
|
+
parameters?: Record<string, unknown>;
|
|
35
|
+
paused?: boolean;
|
|
19
36
|
[key: string]: TODO_any;
|
|
20
37
|
};
|
|
21
38
|
/**
|
|
@@ -80,9 +97,30 @@ export type SetTimeoutToolResult = {
|
|
|
80
97
|
*/
|
|
81
98
|
export type CancelTimeoutToolResult = {
|
|
82
99
|
action: 'cancel';
|
|
83
|
-
status: 'cancelled' | 'not_found' | 'disabled' | 'error';
|
|
100
|
+
status: 'cancelled' | 'cancelled_all' | 'not_found' | 'disabled' | 'error';
|
|
84
101
|
timeoutId?: string;
|
|
85
102
|
dueAt?: string;
|
|
103
|
+
cancelledCount?: number;
|
|
104
|
+
cancelledTimeoutIds?: Array<string>;
|
|
105
|
+
hasMore?: boolean;
|
|
106
|
+
message?: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Result payload returned by `update_timeout`.
|
|
110
|
+
*
|
|
111
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
112
|
+
*/
|
|
113
|
+
export type UpdateTimeoutToolResult = {
|
|
114
|
+
action: 'update';
|
|
115
|
+
status: 'updated' | 'updated_all' | 'not_found' | 'conflict' | 'disabled' | 'error';
|
|
116
|
+
timeoutId?: string;
|
|
117
|
+
dueAt?: string;
|
|
118
|
+
paused?: boolean;
|
|
119
|
+
recurrenceIntervalMs?: number | null;
|
|
120
|
+
updatedCount?: number;
|
|
121
|
+
matchedCount?: number;
|
|
122
|
+
updatedTimeoutIds?: Array<string>;
|
|
123
|
+
hasMore?: boolean;
|
|
86
124
|
message?: string;
|
|
87
125
|
};
|
|
88
126
|
/**
|
|
@@ -102,13 +140,13 @@ export type ListTimeoutsToolResult = {
|
|
|
102
140
|
*
|
|
103
141
|
* @private type of UseTimeoutCommitmentDefinition
|
|
104
142
|
*/
|
|
105
|
-
export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'];
|
|
143
|
+
export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'] | UpdateTimeoutToolResult['action'];
|
|
106
144
|
/**
|
|
107
145
|
* Union of all `USE TIMEOUT` tool results.
|
|
108
146
|
*
|
|
109
147
|
* @private type of UseTimeoutCommitmentDefinition
|
|
110
148
|
*/
|
|
111
|
-
export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult;
|
|
149
|
+
export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult | UpdateTimeoutToolResult;
|
|
112
150
|
/**
|
|
113
151
|
* Runtime adapter used by `USE TIMEOUT` tools.
|
|
114
152
|
*
|
|
@@ -124,10 +162,15 @@ export type TimeoutToolRuntimeAdapter = {
|
|
|
124
162
|
}>;
|
|
125
163
|
cancelTimeout(args: {
|
|
126
164
|
timeoutId: string;
|
|
165
|
+
} | {
|
|
166
|
+
allActive: true;
|
|
127
167
|
}, runtimeContext: TimeoutToolRuntimeContext): Promise<{
|
|
128
|
-
|
|
168
|
+
status: 'cancelled' | 'cancelled_all' | 'not_found';
|
|
169
|
+
timeoutId?: string;
|
|
129
170
|
dueAt?: string;
|
|
130
|
-
|
|
171
|
+
cancelledCount?: number;
|
|
172
|
+
cancelledTimeoutIds?: Array<string>;
|
|
173
|
+
hasMore?: boolean;
|
|
131
174
|
}>;
|
|
132
175
|
listTimeouts(args: {
|
|
133
176
|
includeFinished: boolean;
|
|
@@ -136,4 +179,34 @@ export type TimeoutToolRuntimeAdapter = {
|
|
|
136
179
|
items: Array<TimeoutToolListItem>;
|
|
137
180
|
total: number;
|
|
138
181
|
}>;
|
|
182
|
+
updateTimeout(args: {
|
|
183
|
+
timeoutId: string;
|
|
184
|
+
patch: {
|
|
185
|
+
dueAt?: string;
|
|
186
|
+
extendByMs?: number;
|
|
187
|
+
recurrenceIntervalMs?: number | null;
|
|
188
|
+
message?: string | null;
|
|
189
|
+
parameters?: Record<string, unknown>;
|
|
190
|
+
paused?: boolean;
|
|
191
|
+
};
|
|
192
|
+
} | {
|
|
193
|
+
allActive: true;
|
|
194
|
+
paused: boolean;
|
|
195
|
+
}, runtimeContext: TimeoutToolRuntimeContext): Promise<{
|
|
196
|
+
status: 'updated';
|
|
197
|
+
timeout: TimeoutToolListItem;
|
|
198
|
+
} | {
|
|
199
|
+
status: 'not_found';
|
|
200
|
+
timeoutId: string;
|
|
201
|
+
} | {
|
|
202
|
+
status: 'conflict';
|
|
203
|
+
timeoutId: string;
|
|
204
|
+
reason: 'finished' | 'running';
|
|
205
|
+
} | {
|
|
206
|
+
status: 'updated_all';
|
|
207
|
+
updatedCount: number;
|
|
208
|
+
matchedCount: number;
|
|
209
|
+
updatedTimeoutIds: Array<string>;
|
|
210
|
+
hasMore?: boolean;
|
|
211
|
+
}>;
|
|
139
212
|
};
|
|
@@ -3,7 +3,7 @@ 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, ListTimeoutsToolResult, SetTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
|
|
6
|
+
export type { CancelTimeoutToolResult, ListTimeoutsToolResult, SetTimeoutToolResult, UpdateTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
|
|
7
7
|
/**
|
|
8
8
|
* `USE TIMEOUT` commitment definition.
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
|
|
1
|
+
import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs, UpdateTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
|
|
2
2
|
/**
|
|
3
3
|
* Parsed arguments for `set_timeout`.
|
|
4
4
|
*
|
|
@@ -15,6 +15,8 @@ type ParsedSetTimeoutToolArgs = {
|
|
|
15
15
|
*/
|
|
16
16
|
type ParsedCancelTimeoutToolArgs = {
|
|
17
17
|
timeoutId: string;
|
|
18
|
+
} | {
|
|
19
|
+
allActive: true;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* Parsed arguments for `list_timeouts`.
|
|
@@ -25,6 +27,31 @@ type ParsedListTimeoutsToolArgs = {
|
|
|
25
27
|
includeFinished: boolean;
|
|
26
28
|
limit: number;
|
|
27
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Parsed patch payload for `update_timeout` single-timeout updates.
|
|
32
|
+
*
|
|
33
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
34
|
+
*/
|
|
35
|
+
type ParsedUpdateTimeoutToolPatch = {
|
|
36
|
+
dueAt?: string;
|
|
37
|
+
extendByMs?: number;
|
|
38
|
+
recurrenceIntervalMs?: number | null;
|
|
39
|
+
message?: string | null;
|
|
40
|
+
parameters?: Record<string, unknown>;
|
|
41
|
+
paused?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Parsed arguments for `update_timeout`.
|
|
45
|
+
*
|
|
46
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
47
|
+
*/
|
|
48
|
+
type ParsedUpdateTimeoutToolArgs = {
|
|
49
|
+
timeoutId: string;
|
|
50
|
+
patch: ParsedUpdateTimeoutToolPatch;
|
|
51
|
+
} | {
|
|
52
|
+
allActive: true;
|
|
53
|
+
paused: boolean;
|
|
54
|
+
};
|
|
28
55
|
/**
|
|
29
56
|
* Parses and validates `USE TIMEOUT` tool arguments.
|
|
30
57
|
*
|
|
@@ -43,5 +70,9 @@ export declare const parseTimeoutToolArgs: {
|
|
|
43
70
|
* Parses `list_timeouts` input.
|
|
44
71
|
*/
|
|
45
72
|
list(args: ListTimeoutsToolArgs): ParsedListTimeoutsToolArgs;
|
|
73
|
+
/**
|
|
74
|
+
* Parses `update_timeout` input.
|
|
75
|
+
*/
|
|
76
|
+
update(args: UpdateTimeoutToolArgs): ParsedUpdateTimeoutToolArgs;
|
|
46
77
|
};
|
|
47
78
|
export {};
|
package/esm/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-21`).
|
|
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-
|
|
3
|
+
"version": "0.112.0-22",
|
|
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-
|
|
101
|
+
"@promptbook/core": "0.112.0-22"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"colors": "1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-22';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -75,6 +75,26 @@ export type MockedChatProps = Omit<ChatProps, 'onReset' | /*'onMessage' | */ 'on
|
|
|
75
75
|
* @default true
|
|
76
76
|
*/
|
|
77
77
|
isPausable?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Optional absolute offsets (in milliseconds) for each message.
|
|
80
|
+
*
|
|
81
|
+
* When provided, playback waits according to these deterministic offsets
|
|
82
|
+
* instead of random delay heuristics.
|
|
83
|
+
*/
|
|
84
|
+
readonly messageOffsetsMs?: ReadonlyArray<number>;
|
|
85
|
+
/**
|
|
86
|
+
* When true, messages typed in the input are appended only in local UI state.
|
|
87
|
+
*
|
|
88
|
+
* This is useful for demo/recording flows where user interaction should not
|
|
89
|
+
* mutate the persisted mocked-chat preset.
|
|
90
|
+
*
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
readonly appendMessagesLocallyOnSend?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Optional callback invoked whenever one full simulation run completes.
|
|
96
|
+
*/
|
|
97
|
+
onSimulationComplete?(): void;
|
|
78
98
|
};
|
|
79
99
|
/**
|
|
80
100
|
* MockedChat component that shows the same chat as Chat but emulates ongoing discussion
|
|
@@ -16,6 +16,23 @@ export type SetTimeoutToolArgs = {
|
|
|
16
16
|
*/
|
|
17
17
|
export type CancelTimeoutToolArgs = {
|
|
18
18
|
timeoutId?: string;
|
|
19
|
+
allActive?: boolean;
|
|
20
|
+
[key: string]: TODO_any;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Tool arguments for updating one timeout or pausing/resuming all active queued timeouts.
|
|
24
|
+
*
|
|
25
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
26
|
+
*/
|
|
27
|
+
export type UpdateTimeoutToolArgs = {
|
|
28
|
+
timeoutId?: string;
|
|
29
|
+
allActive?: boolean;
|
|
30
|
+
dueAt?: string;
|
|
31
|
+
extendByMs?: number;
|
|
32
|
+
recurrenceIntervalMs?: number | null;
|
|
33
|
+
message?: string | null;
|
|
34
|
+
parameters?: Record<string, unknown>;
|
|
35
|
+
paused?: boolean;
|
|
19
36
|
[key: string]: TODO_any;
|
|
20
37
|
};
|
|
21
38
|
/**
|
|
@@ -80,9 +97,30 @@ export type SetTimeoutToolResult = {
|
|
|
80
97
|
*/
|
|
81
98
|
export type CancelTimeoutToolResult = {
|
|
82
99
|
action: 'cancel';
|
|
83
|
-
status: 'cancelled' | 'not_found' | 'disabled' | 'error';
|
|
100
|
+
status: 'cancelled' | 'cancelled_all' | 'not_found' | 'disabled' | 'error';
|
|
84
101
|
timeoutId?: string;
|
|
85
102
|
dueAt?: string;
|
|
103
|
+
cancelledCount?: number;
|
|
104
|
+
cancelledTimeoutIds?: Array<string>;
|
|
105
|
+
hasMore?: boolean;
|
|
106
|
+
message?: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Result payload returned by `update_timeout`.
|
|
110
|
+
*
|
|
111
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
112
|
+
*/
|
|
113
|
+
export type UpdateTimeoutToolResult = {
|
|
114
|
+
action: 'update';
|
|
115
|
+
status: 'updated' | 'updated_all' | 'not_found' | 'conflict' | 'disabled' | 'error';
|
|
116
|
+
timeoutId?: string;
|
|
117
|
+
dueAt?: string;
|
|
118
|
+
paused?: boolean;
|
|
119
|
+
recurrenceIntervalMs?: number | null;
|
|
120
|
+
updatedCount?: number;
|
|
121
|
+
matchedCount?: number;
|
|
122
|
+
updatedTimeoutIds?: Array<string>;
|
|
123
|
+
hasMore?: boolean;
|
|
86
124
|
message?: string;
|
|
87
125
|
};
|
|
88
126
|
/**
|
|
@@ -102,13 +140,13 @@ export type ListTimeoutsToolResult = {
|
|
|
102
140
|
*
|
|
103
141
|
* @private type of UseTimeoutCommitmentDefinition
|
|
104
142
|
*/
|
|
105
|
-
export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'];
|
|
143
|
+
export type TimeoutToolAction = SetTimeoutToolResult['action'] | CancelTimeoutToolResult['action'] | ListTimeoutsToolResult['action'] | UpdateTimeoutToolResult['action'];
|
|
106
144
|
/**
|
|
107
145
|
* Union of all `USE TIMEOUT` tool results.
|
|
108
146
|
*
|
|
109
147
|
* @private type of UseTimeoutCommitmentDefinition
|
|
110
148
|
*/
|
|
111
|
-
export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult;
|
|
149
|
+
export type TimeoutToolResult = SetTimeoutToolResult | CancelTimeoutToolResult | ListTimeoutsToolResult | UpdateTimeoutToolResult;
|
|
112
150
|
/**
|
|
113
151
|
* Runtime adapter used by `USE TIMEOUT` tools.
|
|
114
152
|
*
|
|
@@ -124,10 +162,15 @@ export type TimeoutToolRuntimeAdapter = {
|
|
|
124
162
|
}>;
|
|
125
163
|
cancelTimeout(args: {
|
|
126
164
|
timeoutId: string;
|
|
165
|
+
} | {
|
|
166
|
+
allActive: true;
|
|
127
167
|
}, runtimeContext: TimeoutToolRuntimeContext): Promise<{
|
|
128
|
-
|
|
168
|
+
status: 'cancelled' | 'cancelled_all' | 'not_found';
|
|
169
|
+
timeoutId?: string;
|
|
129
170
|
dueAt?: string;
|
|
130
|
-
|
|
171
|
+
cancelledCount?: number;
|
|
172
|
+
cancelledTimeoutIds?: Array<string>;
|
|
173
|
+
hasMore?: boolean;
|
|
131
174
|
}>;
|
|
132
175
|
listTimeouts(args: {
|
|
133
176
|
includeFinished: boolean;
|
|
@@ -136,4 +179,34 @@ export type TimeoutToolRuntimeAdapter = {
|
|
|
136
179
|
items: Array<TimeoutToolListItem>;
|
|
137
180
|
total: number;
|
|
138
181
|
}>;
|
|
182
|
+
updateTimeout(args: {
|
|
183
|
+
timeoutId: string;
|
|
184
|
+
patch: {
|
|
185
|
+
dueAt?: string;
|
|
186
|
+
extendByMs?: number;
|
|
187
|
+
recurrenceIntervalMs?: number | null;
|
|
188
|
+
message?: string | null;
|
|
189
|
+
parameters?: Record<string, unknown>;
|
|
190
|
+
paused?: boolean;
|
|
191
|
+
};
|
|
192
|
+
} | {
|
|
193
|
+
allActive: true;
|
|
194
|
+
paused: boolean;
|
|
195
|
+
}, runtimeContext: TimeoutToolRuntimeContext): Promise<{
|
|
196
|
+
status: 'updated';
|
|
197
|
+
timeout: TimeoutToolListItem;
|
|
198
|
+
} | {
|
|
199
|
+
status: 'not_found';
|
|
200
|
+
timeoutId: string;
|
|
201
|
+
} | {
|
|
202
|
+
status: 'conflict';
|
|
203
|
+
timeoutId: string;
|
|
204
|
+
reason: 'finished' | 'running';
|
|
205
|
+
} | {
|
|
206
|
+
status: 'updated_all';
|
|
207
|
+
updatedCount: number;
|
|
208
|
+
matchedCount: number;
|
|
209
|
+
updatedTimeoutIds: Array<string>;
|
|
210
|
+
hasMore?: boolean;
|
|
211
|
+
}>;
|
|
139
212
|
};
|
|
@@ -3,7 +3,7 @@ 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, ListTimeoutsToolResult, SetTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
|
|
6
|
+
export type { CancelTimeoutToolResult, ListTimeoutsToolResult, SetTimeoutToolResult, UpdateTimeoutToolResult, TimeoutToolListItem, TimeoutToolRuntimeAdapter, TimeoutToolRuntimeContext, } from './TimeoutToolRuntimeAdapter';
|
|
7
7
|
/**
|
|
8
8
|
* `USE TIMEOUT` commitment definition.
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
|
|
1
|
+
import type { CancelTimeoutToolArgs, ListTimeoutsToolArgs, SetTimeoutToolArgs, UpdateTimeoutToolArgs } from './TimeoutToolRuntimeAdapter';
|
|
2
2
|
/**
|
|
3
3
|
* Parsed arguments for `set_timeout`.
|
|
4
4
|
*
|
|
@@ -15,6 +15,8 @@ type ParsedSetTimeoutToolArgs = {
|
|
|
15
15
|
*/
|
|
16
16
|
type ParsedCancelTimeoutToolArgs = {
|
|
17
17
|
timeoutId: string;
|
|
18
|
+
} | {
|
|
19
|
+
allActive: true;
|
|
18
20
|
};
|
|
19
21
|
/**
|
|
20
22
|
* Parsed arguments for `list_timeouts`.
|
|
@@ -25,6 +27,31 @@ type ParsedListTimeoutsToolArgs = {
|
|
|
25
27
|
includeFinished: boolean;
|
|
26
28
|
limit: number;
|
|
27
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Parsed patch payload for `update_timeout` single-timeout updates.
|
|
32
|
+
*
|
|
33
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
34
|
+
*/
|
|
35
|
+
type ParsedUpdateTimeoutToolPatch = {
|
|
36
|
+
dueAt?: string;
|
|
37
|
+
extendByMs?: number;
|
|
38
|
+
recurrenceIntervalMs?: number | null;
|
|
39
|
+
message?: string | null;
|
|
40
|
+
parameters?: Record<string, unknown>;
|
|
41
|
+
paused?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Parsed arguments for `update_timeout`.
|
|
45
|
+
*
|
|
46
|
+
* @private type of UseTimeoutCommitmentDefinition
|
|
47
|
+
*/
|
|
48
|
+
type ParsedUpdateTimeoutToolArgs = {
|
|
49
|
+
timeoutId: string;
|
|
50
|
+
patch: ParsedUpdateTimeoutToolPatch;
|
|
51
|
+
} | {
|
|
52
|
+
allActive: true;
|
|
53
|
+
paused: boolean;
|
|
54
|
+
};
|
|
28
55
|
/**
|
|
29
56
|
* Parses and validates `USE TIMEOUT` tool arguments.
|
|
30
57
|
*
|
|
@@ -43,5 +70,9 @@ export declare const parseTimeoutToolArgs: {
|
|
|
43
70
|
* Parses `list_timeouts` input.
|
|
44
71
|
*/
|
|
45
72
|
list(args: ListTimeoutsToolArgs): ParsedListTimeoutsToolArgs;
|
|
73
|
+
/**
|
|
74
|
+
* Parses `update_timeout` input.
|
|
75
|
+
*/
|
|
76
|
+
update(args: UpdateTimeoutToolArgs): ParsedUpdateTimeoutToolArgs;
|
|
46
77
|
};
|
|
47
78
|
export {};
|
package/umd/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-21`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|