@promptbook/cli 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.
Files changed (47) hide show
  1. package/esm/index.es.js +260 -2072
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
  4. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
  5. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +51 -2
  6. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
  7. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +2 -2
  8. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +14 -1
  9. package/esm/src/version.d.ts +1 -1
  10. package/package.json +1 -2
  11. package/umd/index.umd.js +263 -2072
  12. package/umd/index.umd.js.map +1 -1
  13. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
  14. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
  15. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +51 -2
  16. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
  17. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +2 -2
  18. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +14 -1
  19. package/umd/src/version.d.ts +1 -1
  20. package/esm/apps/agents-server/config.d.ts +0 -86
  21. package/esm/apps/agents-server/src/tools/$provideBrowserForServer.d.ts +0 -28
  22. package/esm/apps/agents-server/src/tools/BrowserConnectionProvider.d.ts +0 -142
  23. package/esm/apps/agents-server/src/tools/runBrowserArtifacts.d.ts +0 -25
  24. package/esm/apps/agents-server/src/tools/runBrowserConstants.d.ts +0 -21
  25. package/esm/apps/agents-server/src/tools/runBrowserErrorHandling.d.ts +0 -60
  26. package/esm/apps/agents-server/src/tools/runBrowserErrors.d.ts +0 -73
  27. package/esm/apps/agents-server/src/tools/runBrowserObservability.d.ts +0 -36
  28. package/esm/apps/agents-server/src/tools/runBrowserResultFormatting.d.ts +0 -47
  29. package/esm/apps/agents-server/src/tools/runBrowserRuntime.d.ts +0 -24
  30. package/esm/apps/agents-server/src/tools/runBrowserWorkflow.d.ts +0 -36
  31. package/esm/apps/agents-server/src/tools/run_browser.d.ts +0 -11
  32. package/esm/apps/agents-server/src/utils/retryWithBackoff.d.ts +0 -95
  33. package/esm/apps/agents-server/src/utils/runBrowserArtifactStorage.d.ts +0 -26
  34. package/umd/apps/agents-server/config.d.ts +0 -86
  35. package/umd/apps/agents-server/src/tools/$provideBrowserForServer.d.ts +0 -28
  36. package/umd/apps/agents-server/src/tools/BrowserConnectionProvider.d.ts +0 -142
  37. package/umd/apps/agents-server/src/tools/runBrowserArtifacts.d.ts +0 -25
  38. package/umd/apps/agents-server/src/tools/runBrowserConstants.d.ts +0 -21
  39. package/umd/apps/agents-server/src/tools/runBrowserErrorHandling.d.ts +0 -60
  40. package/umd/apps/agents-server/src/tools/runBrowserErrors.d.ts +0 -73
  41. package/umd/apps/agents-server/src/tools/runBrowserObservability.d.ts +0 -36
  42. package/umd/apps/agents-server/src/tools/runBrowserResultFormatting.d.ts +0 -47
  43. package/umd/apps/agents-server/src/tools/runBrowserRuntime.d.ts +0 -24
  44. package/umd/apps/agents-server/src/tools/runBrowserWorkflow.d.ts +0 -36
  45. package/umd/apps/agents-server/src/tools/run_browser.d.ts +0 -11
  46. package/umd/apps/agents-server/src/utils/retryWithBackoff.d.ts +0 -95
  47. package/umd/apps/agents-server/src/utils/runBrowserArtifactStorage.d.ts +0 -26
@@ -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/cli",
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,
@@ -105,7 +105,6 @@
105
105
  "bottleneck": "2.19.5",
106
106
  "colors": "1.4.0",
107
107
  "commander": "12.0.0",
108
- "configchecker": "1.5.132",
109
108
  "crypto": "1.0.1",
110
109
  "crypto-js": "4.2.0",
111
110
  "dotenv": "16.3.2",