@promptbook/cli 0.112.0-11 → 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 +2295 -2859
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +1 -1
- package/esm/src/book-components/Chat/Chat/ChatToolCallModal.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +4 -0
- package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.timeout.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +123 -0
- package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.test.d.ts +1 -0
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
- package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +42 -0
- package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.test.d.ts +1 -0
- package/esm/src/commitments/USE_CALENDAR/UseCalendarToolNames.d.ts +13 -0
- package/esm/src/commitments/USE_CALENDAR/UseCalendarWallet.d.ts +9 -0
- package/esm/src/commitments/USE_CALENDAR/calendarReference.d.ts +68 -0
- package/esm/src/commitments/USE_CALENDAR/callGoogleCalendarApi.d.ts +19 -0
- package/esm/src/commitments/USE_CALENDAR/createUseCalendarToolFunctions.d.ts +8 -0
- package/esm/src/commitments/USE_CALENDAR/createUseCalendarTools.d.ts +7 -0
- package/esm/src/commitments/USE_CALENDAR/getUseCalendarToolTitles.d.ts +7 -0
- package/esm/src/commitments/USE_CALENDAR/normalizeConfiguredCalendars.d.ts +19 -0
- package/esm/src/commitments/USE_CALENDAR/resolveUseCalendarToolRuntimeOrWalletCredentialResult.d.ts +34 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +51 -2
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +2 -2
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +14 -1
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +9 -0
- package/esm/src/commitments/index.d.ts +2 -1
- package/esm/src/executables/apps/locateVscode.d.ts +7 -0
- package/esm/src/executables/apps/locateVscode.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateBrowser.d.ts +10 -0
- package/esm/src/executables/browsers/locateBrowser.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateChrome.d.ts +7 -0
- package/esm/src/executables/browsers/locateChrome.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +10 -0
- package/esm/src/executables/browsers/locateDefaultSystemBrowser.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateEdge.d.ts +7 -0
- package/esm/src/executables/browsers/locateEdge.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateFirefox.d.ts +7 -0
- package/esm/src/executables/browsers/locateFirefox.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateInternetExplorer.d.ts +7 -0
- package/esm/src/executables/browsers/locateInternetExplorer.test.d.ts +1 -0
- package/esm/src/executables/browsers/locateSafari.d.ts +7 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -2
- package/umd/index.umd.js +2296 -2856
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +1 -1
- package/umd/src/book-components/Chat/Chat/ChatToolCallModal.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +4 -0
- package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.timeout.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +123 -0
- package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.test.d.ts +1 -0
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +1 -1
- package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +42 -0
- package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.test.d.ts +1 -0
- package/umd/src/commitments/USE_CALENDAR/UseCalendarToolNames.d.ts +13 -0
- package/umd/src/commitments/USE_CALENDAR/UseCalendarWallet.d.ts +9 -0
- package/umd/src/commitments/USE_CALENDAR/calendarReference.d.ts +68 -0
- package/umd/src/commitments/USE_CALENDAR/callGoogleCalendarApi.d.ts +19 -0
- package/umd/src/commitments/USE_CALENDAR/createUseCalendarToolFunctions.d.ts +8 -0
- package/umd/src/commitments/USE_CALENDAR/createUseCalendarTools.d.ts +7 -0
- package/umd/src/commitments/USE_CALENDAR/getUseCalendarToolTitles.d.ts +7 -0
- package/umd/src/commitments/USE_CALENDAR/normalizeConfiguredCalendars.d.ts +19 -0
- package/umd/src/commitments/USE_CALENDAR/resolveUseCalendarToolRuntimeOrWalletCredentialResult.d.ts +34 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +1 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +51 -2
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +2 -2
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +2 -2
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +14 -1
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +9 -0
- package/umd/src/commitments/index.d.ts +2 -1
- package/umd/src/executables/apps/locateVscode.d.ts +7 -0
- package/umd/src/executables/apps/locateVscode.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateBrowser.d.ts +10 -0
- package/umd/src/executables/browsers/locateBrowser.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateChrome.d.ts +7 -0
- package/umd/src/executables/browsers/locateChrome.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +10 -0
- package/umd/src/executables/browsers/locateDefaultSystemBrowser.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateEdge.d.ts +7 -0
- package/umd/src/executables/browsers/locateEdge.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateFirefox.d.ts +7 -0
- package/umd/src/executables/browsers/locateFirefox.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateInternetExplorer.d.ts +7 -0
- package/umd/src/executables/browsers/locateInternetExplorer.test.d.ts +1 -0
- package/umd/src/executables/browsers/locateSafari.d.ts +7 -0
- package/umd/src/version.d.ts +1 -1
- package/esm/apps/agents-server/config.d.ts +0 -86
- package/esm/apps/agents-server/src/tools/$provideBrowserForServer.d.ts +0 -28
- package/esm/apps/agents-server/src/tools/BrowserConnectionProvider.d.ts +0 -142
- package/esm/apps/agents-server/src/tools/runBrowserArtifacts.d.ts +0 -25
- package/esm/apps/agents-server/src/tools/runBrowserConstants.d.ts +0 -21
- package/esm/apps/agents-server/src/tools/runBrowserErrorHandling.d.ts +0 -60
- package/esm/apps/agents-server/src/tools/runBrowserErrors.d.ts +0 -73
- package/esm/apps/agents-server/src/tools/runBrowserObservability.d.ts +0 -36
- package/esm/apps/agents-server/src/tools/runBrowserResultFormatting.d.ts +0 -47
- package/esm/apps/agents-server/src/tools/runBrowserRuntime.d.ts +0 -24
- package/esm/apps/agents-server/src/tools/runBrowserWorkflow.d.ts +0 -36
- package/esm/apps/agents-server/src/tools/run_browser.d.ts +0 -11
- package/esm/apps/agents-server/src/utils/retryWithBackoff.d.ts +0 -95
- package/esm/apps/agents-server/src/utils/runBrowserArtifactStorage.d.ts +0 -26
- package/umd/apps/agents-server/config.d.ts +0 -86
- package/umd/apps/agents-server/src/tools/$provideBrowserForServer.d.ts +0 -28
- package/umd/apps/agents-server/src/tools/BrowserConnectionProvider.d.ts +0 -142
- package/umd/apps/agents-server/src/tools/runBrowserArtifacts.d.ts +0 -25
- package/umd/apps/agents-server/src/tools/runBrowserConstants.d.ts +0 -21
- package/umd/apps/agents-server/src/tools/runBrowserErrorHandling.d.ts +0 -60
- package/umd/apps/agents-server/src/tools/runBrowserErrors.d.ts +0 -73
- package/umd/apps/agents-server/src/tools/runBrowserObservability.d.ts +0 -36
- package/umd/apps/agents-server/src/tools/runBrowserResultFormatting.d.ts +0 -47
- package/umd/apps/agents-server/src/tools/runBrowserRuntime.d.ts +0 -24
- package/umd/apps/agents-server/src/tools/runBrowserWorkflow.d.ts +0 -36
- package/umd/apps/agents-server/src/tools/run_browser.d.ts +0 -11
- package/umd/apps/agents-server/src/utils/retryWithBackoff.d.ts +0 -95
- package/umd/apps/agents-server/src/utils/runBrowserArtifactStorage.d.ts +0 -26
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Page } from 'playwright';
|
|
2
|
-
import type { NormalizedRunBrowserAction, OpenPageWithUrlResult, RunBrowserAction, RunBrowserTimeoutConfiguration } from './RunBrowserArgs';
|
|
3
|
-
/**
|
|
4
|
-
* Page open, action normalization and action execution helpers for `run_browser`.
|
|
5
|
-
*
|
|
6
|
-
* @private function of `run_browser`
|
|
7
|
-
*/
|
|
8
|
-
export declare const runBrowserWorkflow: {
|
|
9
|
-
/**
|
|
10
|
-
* Opens a new browser page and navigates to the requested URL.
|
|
11
|
-
*/
|
|
12
|
-
openPageWithUrl(options: {
|
|
13
|
-
readonly url: string;
|
|
14
|
-
readonly sessionId: string;
|
|
15
|
-
readonly timeouts: RunBrowserTimeoutConfiguration;
|
|
16
|
-
readonly signal?: AbortSignal;
|
|
17
|
-
}): Promise<OpenPageWithUrlResult>;
|
|
18
|
-
/**
|
|
19
|
-
* Validates and normalizes browser actions received from the model.
|
|
20
|
-
*/
|
|
21
|
-
normalizeActions(actions: ReadonlyArray<RunBrowserAction> | undefined): Array<NormalizedRunBrowserAction>;
|
|
22
|
-
/**
|
|
23
|
-
* Validates and normalizes a single action.
|
|
24
|
-
*/
|
|
25
|
-
normalizeAction(action: RunBrowserAction, index: number): NormalizedRunBrowserAction;
|
|
26
|
-
/**
|
|
27
|
-
* Executes one normalized browser action on a Playwright page.
|
|
28
|
-
*/
|
|
29
|
-
executeAction(options: {
|
|
30
|
-
readonly page: Page;
|
|
31
|
-
readonly action: NormalizedRunBrowserAction;
|
|
32
|
-
readonly actionIndex: number;
|
|
33
|
-
readonly timeouts: RunBrowserTimeoutConfiguration;
|
|
34
|
-
readonly signal?: AbortSignal;
|
|
35
|
-
}): Promise<void>;
|
|
36
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RunBrowserInternalOptions } from './RunBrowserArgs';
|
|
2
|
-
export type { RunBrowserActionType, RunBrowserAction, RunBrowserArgs } from './RunBrowserArgs';
|
|
3
|
-
import type { RunBrowserArgs } from './RunBrowserArgs';
|
|
4
|
-
/**
|
|
5
|
-
* Runs interactive browser automation through Playwright.
|
|
6
|
-
*
|
|
7
|
-
* @param args Tool arguments provided by the model.
|
|
8
|
-
* @param internalOptions Optional runtime options for cancellation.
|
|
9
|
-
* @returns Markdown summary with structured playback payload.
|
|
10
|
-
*/
|
|
11
|
-
export declare function run_browser(args: RunBrowserArgs, internalOptions?: RunBrowserInternalOptions): Promise<string>;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Callback invoked before one retry wait.
|
|
3
|
-
*
|
|
4
|
-
* @private utility for Agents Server runtime retries
|
|
5
|
-
*/
|
|
6
|
-
export type RetryWithBackoffAttempt = {
|
|
7
|
-
/**
|
|
8
|
-
* Number of failed attempts completed so far (1-based).
|
|
9
|
-
*/
|
|
10
|
-
readonly attempt: number;
|
|
11
|
-
/**
|
|
12
|
-
* Configured number of retries after the first attempt.
|
|
13
|
-
*/
|
|
14
|
-
readonly retries: number;
|
|
15
|
-
/**
|
|
16
|
-
* Delay scheduled before the next attempt.
|
|
17
|
-
*/
|
|
18
|
-
readonly delayMs: number;
|
|
19
|
-
/**
|
|
20
|
-
* Error from the attempt that just failed.
|
|
21
|
-
*/
|
|
22
|
-
readonly error: unknown;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Result metadata returned from a retry operation.
|
|
26
|
-
*
|
|
27
|
-
* @private utility for Agents Server runtime retries
|
|
28
|
-
*/
|
|
29
|
-
export type RetryWithBackoffResult<TValue> = {
|
|
30
|
-
/**
|
|
31
|
-
* Value returned from the successful attempt.
|
|
32
|
-
*/
|
|
33
|
-
readonly value: TValue;
|
|
34
|
-
/**
|
|
35
|
-
* Number of attempts used (first try + retries).
|
|
36
|
-
*/
|
|
37
|
-
readonly attempts: number;
|
|
38
|
-
/**
|
|
39
|
-
* Total elapsed time in milliseconds across attempts and waits.
|
|
40
|
-
*/
|
|
41
|
-
readonly durationMs: number;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Configurable options for retrying one asynchronous operation with backoff.
|
|
45
|
-
*
|
|
46
|
-
* @private utility for Agents Server runtime retries
|
|
47
|
-
*/
|
|
48
|
-
export type RetryWithBackoffOptions = {
|
|
49
|
-
/**
|
|
50
|
-
* Number of retries after the initial attempt.
|
|
51
|
-
*/
|
|
52
|
-
readonly retries: number;
|
|
53
|
-
/**
|
|
54
|
-
* Initial backoff delay before retry #1.
|
|
55
|
-
*/
|
|
56
|
-
readonly initialDelayMs: number;
|
|
57
|
-
/**
|
|
58
|
-
* Upper bound for one backoff delay.
|
|
59
|
-
*/
|
|
60
|
-
readonly maxDelayMs: number;
|
|
61
|
-
/**
|
|
62
|
-
* Multiplier used for exponential growth between retry delays.
|
|
63
|
-
*/
|
|
64
|
-
readonly backoffFactor: number;
|
|
65
|
-
/**
|
|
66
|
-
* Randomized extra delay ratio relative to the exponential delay.
|
|
67
|
-
*/
|
|
68
|
-
readonly jitterRatio: number;
|
|
69
|
-
/**
|
|
70
|
-
* Optional cancellation signal.
|
|
71
|
-
*/
|
|
72
|
-
readonly signal?: AbortSignal;
|
|
73
|
-
/**
|
|
74
|
-
* Optional predicate deciding if the thrown error can be retried.
|
|
75
|
-
*/
|
|
76
|
-
readonly shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Optional callback called before waiting for one retry.
|
|
79
|
-
*/
|
|
80
|
-
readonly onRetry?: (attempt: RetryWithBackoffAttempt) => void;
|
|
81
|
-
/**
|
|
82
|
-
* Random provider used for jitter; defaults to `Math.random`.
|
|
83
|
-
*/
|
|
84
|
-
readonly random?: () => number;
|
|
85
|
-
/**
|
|
86
|
-
* Sleep implementation used during backoff; defaults to an abort-aware timeout.
|
|
87
|
-
*/
|
|
88
|
-
readonly sleep?: (delayMs: number, signal?: AbortSignal) => Promise<void>;
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Retries one async operation with exponential backoff and jitter.
|
|
92
|
-
*
|
|
93
|
-
* @private utility for Agents Server runtime retries
|
|
94
|
-
*/
|
|
95
|
-
export declare function retryWithBackoff<TValue>(operation: (attempt: number) => Promise<TValue>, options: RetryWithBackoffOptions): Promise<RetryWithBackoffResult<TValue>>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logical public directory marker used in `run_browser` payload paths.
|
|
3
|
-
*
|
|
4
|
-
* This value is kept stable for UI parsing and `/api/browser-artifacts/*` URL mapping.
|
|
5
|
-
*/
|
|
6
|
-
export declare const RUN_BROWSER_ARTIFACT_PUBLIC_DIRECTORY = ".playwright-cli";
|
|
7
|
-
/**
|
|
8
|
-
* Whitelist pattern for browser artifact filenames produced by `run_browser`.
|
|
9
|
-
*/
|
|
10
|
-
export declare const RUN_BROWSER_ARTIFACT_FILENAME_PATTERN: RegExp;
|
|
11
|
-
/**
|
|
12
|
-
* Resolves writable filesystem directory used for artifact persistence.
|
|
13
|
-
*/
|
|
14
|
-
export declare function resolveRunBrowserArtifactStorageDirectory(): string;
|
|
15
|
-
/**
|
|
16
|
-
* Resolves absolute filesystem path of one artifact filename.
|
|
17
|
-
*/
|
|
18
|
-
export declare function resolveRunBrowserArtifactFilesystemPath(artifactFilename: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Resolves payload path of one artifact filename used by replay renderers.
|
|
21
|
-
*/
|
|
22
|
-
export declare function resolveRunBrowserArtifactPublicPath(artifactFilename: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Validates whether one filename belongs to the supported browser artifact set.
|
|
25
|
-
*/
|
|
26
|
-
export declare function isRunBrowserArtifactFilename(artifactFilename: string): boolean;
|