@agimon-ai/doompi-computer-use 0.0.1-alpha.12 → 0.0.1-alpha.2
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/README.md +3 -6
- package/dist/adapters/computerUseApi.cjs +1 -1
- package/dist/adapters/computerUseApi.cjs.map +1 -1
- package/dist/adapters/computerUseApi.d.cts +5 -9
- package/dist/adapters/computerUseApi.d.cts.map +1 -1
- package/dist/adapters/computerUseApi.d.mts +5 -9
- package/dist/adapters/computerUseApi.d.mts.map +1 -1
- package/dist/adapters/computerUseApi.mjs +1 -1
- package/dist/adapters/computerUseApi.mjs.map +1 -1
- package/dist/adapters/pi/extension.cjs +2 -2
- package/dist/adapters/pi/extension.cjs.map +1 -1
- package/dist/adapters/pi/extension.d.cts +4 -4
- package/dist/adapters/pi/extension.d.cts.map +1 -1
- package/dist/adapters/pi/extension.d.mts +4 -4
- package/dist/adapters/pi/extension.d.mts.map +1 -1
- package/dist/adapters/pi/extension.mjs +2 -2
- package/dist/adapters/pi/extension.mjs.map +1 -1
- package/dist/adapters/pi/sessionApiClient.d.cts +4 -3
- package/dist/adapters/pi/sessionApiClient.d.cts.map +1 -1
- package/dist/adapters/pi/sessionApiClient.d.mts +4 -3
- package/dist/adapters/pi/sessionApiClient.d.mts.map +1 -1
- package/dist/adapters/webComputerUseChannel.cjs +1 -1
- package/dist/adapters/webComputerUseChannel.cjs.map +1 -1
- package/dist/adapters/webComputerUseChannel.d.cts +3 -3
- package/dist/adapters/webComputerUseChannel.d.cts.map +1 -1
- package/dist/adapters/webComputerUseChannel.d.mts +3 -3
- package/dist/adapters/webComputerUseChannel.d.mts.map +1 -1
- package/dist/adapters/webComputerUseChannel.mjs +1 -1
- package/dist/adapters/webComputerUseChannel.mjs.map +1 -1
- package/dist/container/index.cjs +1 -1
- package/dist/container/index.cjs.map +1 -1
- package/dist/container/index.d.cts +2 -2
- package/dist/container/index.d.cts.map +1 -1
- package/dist/container/index.d.mts +2 -2
- package/dist/container/index.d.mts.map +1 -1
- package/dist/container/index.mjs +1 -1
- package/dist/container/index.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.mts +2 -4
- package/dist/index.mjs +1 -1
- package/dist/services/extensionService.d.cts +2 -1
- package/dist/services/extensionService.d.cts.map +1 -1
- package/dist/services/extensionService.d.mts +2 -1
- package/dist/services/extensionService.d.mts.map +1 -1
- package/dist/services/sessionController.d.cts +3 -2
- package/dist/services/sessionController.d.cts.map +1 -1
- package/dist/services/sessionController.d.mts +3 -2
- package/dist/services/sessionController.d.mts.map +1 -1
- package/dist/services/traceRedaction.d.cts +4 -3
- package/dist/services/traceRedaction.d.cts.map +1 -1
- package/dist/services/traceRedaction.d.mts +4 -3
- package/dist/services/traceRedaction.d.mts.map +1 -1
- package/dist/types/computerUse.d.cts +14 -14
- package/dist/types/computerUse.d.cts.map +1 -1
- package/dist/types/computerUse.d.mts +14 -14
- package/dist/types/computerUse.d.mts.map +1 -1
- package/dist/types/computerUseApi.cjs.map +1 -1
- package/dist/types/computerUseApi.d.cts +19 -22
- package/dist/types/computerUseApi.d.cts.map +1 -1
- package/dist/types/computerUseApi.d.mts +19 -22
- package/dist/types/computerUseApi.d.mts.map +1 -1
- package/dist/types/computerUseApi.mjs.map +1 -1
- package/dist/types/extension.d.cts +5 -7
- package/dist/types/extension.d.cts.map +1 -1
- package/dist/types/extension.d.mts +5 -7
- package/dist/types/extension.d.mts.map +1 -1
- package/llms.txt +0 -1
- package/package.json +13 -17
- package/src/prompts/doompi-use-computer-use/SKILL.md +1 -1
- package/src/types/computerUse.ts +2 -3
- package/src/types/computerUseApi.ts +0 -1
- package/src/web/{components/ComputerActionToolCard.tsx → ComputerActionToolCard.tsx} +1 -1
- package/src/web/{components/ComputerStateToolCard.tsx → ComputerStateToolCard.tsx} +1 -1
- package/src/web/{components/ComputerUsePanel.tsx → ComputerUsePanel.tsx} +7 -16
- package/src/web/{stores/computerUseStore.ts → computerUseStore.ts} +2 -2
- package/src/web/index.ts +6 -12
- package/dist/adapters/pi/computerScriptRunner.cjs +0 -45
- package/dist/adapters/pi/computerScriptRunner.cjs.map +0 -1
- package/dist/adapters/pi/computerScriptRunner.d.cts +0 -12
- package/dist/adapters/pi/computerScriptRunner.d.cts.map +0 -1
- package/dist/adapters/pi/computerScriptRunner.d.mts +0 -12
- package/dist/adapters/pi/computerScriptRunner.d.mts.map +0 -1
- package/dist/adapters/pi/computerScriptRunner.mjs +0 -45
- package/dist/adapters/pi/computerScriptRunner.mjs.map +0 -1
- package/dist/types/computerScript.d.cts +0 -38
- package/dist/types/computerScript.d.cts.map +0 -1
- package/dist/types/computerScript.d.mts +0 -38
- package/dist/types/computerScript.d.mts.map +0 -1
- package/docs/computer-scripts.md +0 -37
- package/src/web/components/ComputerExecToolCard.tsx +0 -44
- package/src/web/lib/computerExecToolRender.ts +0 -14
- package/src/web/lib/computerUseSettings.ts +0 -17
- /package/src/web/{lib/computerActionToolRender.ts → computerActionToolRender.ts} +0 -0
- /package/src/web/{lib/computerStateToolRender.ts → computerStateToolRender.ts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { API_BASE_PATH, COMPUTER_USE_CONFIRMATION_WINDOW_MS, COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, COMPUTER_USE_MODE_STATUS_KEY, COMPUTER_USE_ROUTES, COMPUTER_USE_STATUS_KEY, COMPUTER_USE_WAKE_LIMIT, ComputerUseActivationRequest, ComputerUseArtifactView, ComputerUseBrokerRequest, ComputerUseBrowserCommand, ComputerUseChannelPayload, ComputerUseSessionView, SESSION_QUERY_PARAM, activationUrl, computerUseChannelType } from "./types/computerUseApi.cjs";
|
|
2
2
|
import { COMPUTER_USE_PHASES, ComputerUseAction, ComputerUseActionKind, ComputerUseElement, ComputerUseFailureCode, ComputerUseGrant, ComputerUseObservation, ComputerUsePhase, ComputerUseSessionIdentity, ComputerUseState, ComputerUseStateEvent, ComputerUseTarget } from "./types/computerUse.cjs";
|
|
3
3
|
import { ComputerUseSessionClient, UnixComputerUseSessionClient, createComputerUseSessionClient } from "./adapters/pi/sessionApiClient.cjs";
|
|
4
|
-
import { ComputerScriptExecutionResult, ComputerScriptExecutor, ComputerScriptLogger, ComputerScriptProgram, ComputerScriptRun, ComputerScriptRunContext, ComputerScriptRunnerOptions } from "./types/computerScript.cjs";
|
|
5
4
|
import { ComputerUseExtensionDependencies, ComputerUseExtensionResult, ComputerUseExtensionService, ComputerUseNotificationLevel } from "./types/extension.cjs";
|
|
6
5
|
import { COMPUTER_USE_GUIDANCE, COMPUTER_USE_TOOL_NAMES, activateComputerUseExtension } from "./adapters/pi/extension.cjs";
|
|
7
|
-
import {
|
|
8
|
-
import { ComputerScriptRunner } from "./adapters/pi/computerScriptRunner.cjs";
|
|
6
|
+
import { createComputerUseContainer } from "./container/index.cjs";
|
|
9
7
|
import { DefaultComputerUseExtensionService } from "./services/extensionService.cjs";
|
|
10
8
|
import { initialComputerUseState, reduceComputerUseState } from "./services/sessionController.cjs";
|
|
11
9
|
import { redactComputerUseTrace } from "./services/traceRedaction.cjs";
|
|
12
|
-
export { type API_BASE_PATH, type COMPUTER_USE_CONFIRMATION_WINDOW_MS, type COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_GUIDANCE, type COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, type COMPUTER_USE_MODE_STATUS_KEY, type COMPUTER_USE_PHASES, type COMPUTER_USE_ROUTES,
|
|
10
|
+
export { type API_BASE_PATH, type COMPUTER_USE_CONFIRMATION_WINDOW_MS, type COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_GUIDANCE, type COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, type COMPUTER_USE_MODE_STATUS_KEY, type COMPUTER_USE_PHASES, type COMPUTER_USE_ROUTES, type COMPUTER_USE_STATUS_KEY, COMPUTER_USE_TOOL_NAMES, type COMPUTER_USE_WAKE_LIMIT, type ComputerUseAction, type ComputerUseActionKind, type ComputerUseActivationRequest, type ComputerUseArtifactView, type ComputerUseBrokerRequest, type ComputerUseBrowserCommand, type ComputerUseChannelPayload, type ComputerUseElement, type ComputerUseExtensionDependencies, type ComputerUseExtensionResult, type ComputerUseExtensionService, type ComputerUseFailureCode, type ComputerUseGrant, type ComputerUseNotificationLevel, type ComputerUseObservation, type ComputerUsePhase, type ComputerUseSessionClient, type ComputerUseSessionIdentity, type ComputerUseSessionView, type ComputerUseState, type ComputerUseStateEvent, type ComputerUseTarget, DefaultComputerUseExtensionService, type SESSION_QUERY_PARAM, UnixComputerUseSessionClient, activateComputerUseExtension, type activationUrl, type computerUseChannelType, createComputerUseContainer, createComputerUseSessionClient, initialComputerUseState, redactComputerUseTrace, reduceComputerUseState };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { API_BASE_PATH, COMPUTER_USE_CONFIRMATION_WINDOW_MS, COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, COMPUTER_USE_MODE_STATUS_KEY, COMPUTER_USE_ROUTES, COMPUTER_USE_STATUS_KEY, COMPUTER_USE_WAKE_LIMIT, ComputerUseActivationRequest, ComputerUseArtifactView, ComputerUseBrokerRequest, ComputerUseBrowserCommand, ComputerUseChannelPayload, ComputerUseSessionView, SESSION_QUERY_PARAM, activationUrl, computerUseChannelType } from "./types/computerUseApi.mjs";
|
|
2
2
|
import { COMPUTER_USE_PHASES, ComputerUseAction, ComputerUseActionKind, ComputerUseElement, ComputerUseFailureCode, ComputerUseGrant, ComputerUseObservation, ComputerUsePhase, ComputerUseSessionIdentity, ComputerUseState, ComputerUseStateEvent, ComputerUseTarget } from "./types/computerUse.mjs";
|
|
3
3
|
import { ComputerUseSessionClient, UnixComputerUseSessionClient, createComputerUseSessionClient } from "./adapters/pi/sessionApiClient.mjs";
|
|
4
|
-
import { ComputerScriptExecutionResult, ComputerScriptExecutor, ComputerScriptLogger, ComputerScriptProgram, ComputerScriptRun, ComputerScriptRunContext, ComputerScriptRunnerOptions } from "./types/computerScript.mjs";
|
|
5
4
|
import { ComputerUseExtensionDependencies, ComputerUseExtensionResult, ComputerUseExtensionService, ComputerUseNotificationLevel } from "./types/extension.mjs";
|
|
6
5
|
import { COMPUTER_USE_GUIDANCE, COMPUTER_USE_TOOL_NAMES, activateComputerUseExtension } from "./adapters/pi/extension.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { ComputerScriptRunner } from "./adapters/pi/computerScriptRunner.mjs";
|
|
6
|
+
import { createComputerUseContainer } from "./container/index.mjs";
|
|
9
7
|
import { DefaultComputerUseExtensionService } from "./services/extensionService.mjs";
|
|
10
8
|
import { initialComputerUseState, reduceComputerUseState } from "./services/sessionController.mjs";
|
|
11
9
|
import { redactComputerUseTrace } from "./services/traceRedaction.mjs";
|
|
12
|
-
export { type API_BASE_PATH, type COMPUTER_USE_CONFIRMATION_WINDOW_MS, type COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_GUIDANCE, type COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, type COMPUTER_USE_MODE_STATUS_KEY, type COMPUTER_USE_PHASES, type COMPUTER_USE_ROUTES,
|
|
10
|
+
export { type API_BASE_PATH, type COMPUTER_USE_CONFIRMATION_WINDOW_MS, type COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_GUIDANCE, type COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, type COMPUTER_USE_MODE_STATUS_KEY, type COMPUTER_USE_PHASES, type COMPUTER_USE_ROUTES, type COMPUTER_USE_STATUS_KEY, COMPUTER_USE_TOOL_NAMES, type COMPUTER_USE_WAKE_LIMIT, type ComputerUseAction, type ComputerUseActionKind, type ComputerUseActivationRequest, type ComputerUseArtifactView, type ComputerUseBrokerRequest, type ComputerUseBrowserCommand, type ComputerUseChannelPayload, type ComputerUseElement, type ComputerUseExtensionDependencies, type ComputerUseExtensionResult, type ComputerUseExtensionService, type ComputerUseFailureCode, type ComputerUseGrant, type ComputerUseNotificationLevel, type ComputerUseObservation, type ComputerUsePhase, type ComputerUseSessionClient, type ComputerUseSessionIdentity, type ComputerUseSessionView, type ComputerUseState, type ComputerUseStateEvent, type ComputerUseTarget, DefaultComputerUseExtensionService, type SESSION_QUERY_PARAM, UnixComputerUseSessionClient, activateComputerUseExtension, type activationUrl, type computerUseChannelType, createComputerUseContainer, createComputerUseSessionClient, initialComputerUseState, redactComputerUseTrace, reduceComputerUseState };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COMPUTER_USE_MODE_ID as e}from"./types/computerUseApi.mjs";import{UnixComputerUseSessionClient as t,createComputerUseSessionClient as n}from"./adapters/pi/sessionApiClient.mjs";import{
|
|
1
|
+
import{COMPUTER_USE_MODE_ID as e}from"./types/computerUseApi.mjs";import{UnixComputerUseSessionClient as t,createComputerUseSessionClient as n}from"./adapters/pi/sessionApiClient.mjs";import{DefaultComputerUseExtensionService as r}from"./services/extensionService.mjs";import{createComputerUseContainer as i}from"./container/index.mjs";import{COMPUTER_USE_GUIDANCE as a,COMPUTER_USE_TOOL_NAMES as o,activateComputerUseExtension as s}from"./adapters/pi/extension.mjs";import{initialComputerUseState as c,reduceComputerUseState as l}from"./services/sessionController.mjs";import{redactComputerUseTrace as u}from"./services/traceRedaction.mjs";export{a as COMPUTER_USE_GUIDANCE,e as COMPUTER_USE_MODE_ID,o as COMPUTER_USE_TOOL_NAMES,r as DefaultComputerUseExtensionService,t as UnixComputerUseSessionClient,s as activateComputerUseExtension,i as createComputerUseContainer,n as createComputerUseSessionClient,c as initialComputerUseState,u as redactComputerUseTrace,l as reduceComputerUseState};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComputerUseSessionClient } from "../adapters/pi/sessionApiClient.cjs";
|
|
2
2
|
import { ComputerUseExtensionResult, ComputerUseExtensionService } from "../types/extension.cjs";
|
|
3
3
|
//#region src/services/extensionService.d.ts
|
|
4
|
-
|
|
4
|
+
declare class DefaultComputerUseExtensionService implements ComputerUseExtensionService {
|
|
5
5
|
private readonly client?;
|
|
6
6
|
constructor(client?: ComputerUseSessionClient | undefined);
|
|
7
7
|
execute(): Promise<ComputerUseExtensionResult>;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
+
export { DefaultComputerUseExtensionService };
|
|
10
11
|
//# sourceMappingURL=extensionService.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionService.d.cts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"extensionService.d.cts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;;cAGa,8CAA8C;mBACrB;EAApC,YAAoC,SAAS;EAEhC,WAAW,QAAQ"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ComputerUseSessionClient } from "../adapters/pi/sessionApiClient.mjs";
|
|
2
2
|
import { ComputerUseExtensionResult, ComputerUseExtensionService } from "../types/extension.mjs";
|
|
3
3
|
//#region src/services/extensionService.d.ts
|
|
4
|
-
|
|
4
|
+
declare class DefaultComputerUseExtensionService implements ComputerUseExtensionService {
|
|
5
5
|
private readonly client?;
|
|
6
6
|
constructor(client?: ComputerUseSessionClient | undefined);
|
|
7
7
|
execute(): Promise<ComputerUseExtensionResult>;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
+
export { DefaultComputerUseExtensionService };
|
|
10
11
|
//# sourceMappingURL=extensionService.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionService.d.mts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"extensionService.d.mts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;;cAGa,8CAA8C;mBACrB;EAApC,YAAoC,SAAS;EAEhC,WAAW,QAAQ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComputerUseState, ComputerUseStateEvent } from "../types/computerUse.cjs";
|
|
2
2
|
//#region src/services/sessionController.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare function initialComputerUseState(identity: ComputerUseState['identity']): ComputerUseState;
|
|
4
|
+
declare function reduceComputerUseState(state: ComputerUseState, event: ComputerUseStateEvent): ComputerUseState;
|
|
5
5
|
//#endregion
|
|
6
|
+
export { initialComputerUseState, reduceComputerUseState };
|
|
6
7
|
//# sourceMappingURL=sessionController.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionController.d.cts","names":[],"sources":["../../src/services/sessionController.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sessionController.d.cts","names":[],"sources":["../../src/services/sessionController.ts"],"mappings":";;iBAcgB,wBAAwB,UAAU,+BAA+B;iBAIjE,uBAAuB,OAAO,kBAAkB,OAAO,wBAAwB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComputerUseState, ComputerUseStateEvent } from "../types/computerUse.mjs";
|
|
2
2
|
//#region src/services/sessionController.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
declare function initialComputerUseState(identity: ComputerUseState['identity']): ComputerUseState;
|
|
4
|
+
declare function reduceComputerUseState(state: ComputerUseState, event: ComputerUseStateEvent): ComputerUseState;
|
|
5
5
|
//#endregion
|
|
6
|
+
export { initialComputerUseState, reduceComputerUseState };
|
|
6
7
|
//# sourceMappingURL=sessionController.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionController.d.mts","names":[],"sources":["../../src/services/sessionController.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sessionController.d.mts","names":[],"sources":["../../src/services/sessionController.ts"],"mappings":";;iBAcgB,wBAAwB,UAAU,+BAA+B;iBAIjE,uBAAuB,OAAO,kBAAkB,OAAO,wBAAwB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputerUseAction, ComputerUseFailureCode } from "../types/computerUse.cjs";
|
|
2
2
|
//#region src/services/traceRedaction.d.ts
|
|
3
|
-
|
|
3
|
+
interface ComputerUseTraceInput {
|
|
4
4
|
readonly sequence: number;
|
|
5
5
|
readonly timestamp: number;
|
|
6
6
|
readonly runId: string;
|
|
@@ -11,7 +11,7 @@ export interface ComputerUseTraceInput {
|
|
|
11
11
|
readonly outcome: 'succeeded' | 'failed' | 'uncertain';
|
|
12
12
|
readonly errorCode?: ComputerUseFailureCode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface ComputerUseTraceRecord {
|
|
15
15
|
readonly sequence: number;
|
|
16
16
|
readonly timestamp: number;
|
|
17
17
|
readonly runId: string;
|
|
@@ -23,6 +23,7 @@ export interface ComputerUseTraceRecord {
|
|
|
23
23
|
readonly outcome: ComputerUseTraceInput['outcome'];
|
|
24
24
|
readonly errorCode?: ComputerUseFailureCode;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
declare function redactComputerUseTrace(input: ComputerUseTraceInput): ComputerUseTraceRecord;
|
|
27
27
|
//#endregion
|
|
28
|
+
export { ComputerUseTraceInput, ComputerUseTraceRecord, redactComputerUseTrace };
|
|
28
29
|
//# sourceMappingURL=traceRedaction.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceRedaction.d.cts","names":[],"sources":["../../src/services/traceRedaction.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"traceRedaction.d.cts","names":[],"sources":["../../src/services/traceRedaction.ts"],"mappings":";;UAEiB;WACN;WACA;WACA;WACA;WACA,QAAQ;WACR;WACA;WACA;WACA,YAAY;;UAGN;WACN;WACA;WACA;WACA;WACA,YAAY;WACZ;WACA;WACA;WACA,SAAS;WACT,YAAY;;iBAGP,uBAAuB,OAAO,wBAAwB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputerUseAction, ComputerUseFailureCode } from "../types/computerUse.mjs";
|
|
2
2
|
//#region src/services/traceRedaction.d.ts
|
|
3
|
-
|
|
3
|
+
interface ComputerUseTraceInput {
|
|
4
4
|
readonly sequence: number;
|
|
5
5
|
readonly timestamp: number;
|
|
6
6
|
readonly runId: string;
|
|
@@ -11,7 +11,7 @@ export interface ComputerUseTraceInput {
|
|
|
11
11
|
readonly outcome: 'succeeded' | 'failed' | 'uncertain';
|
|
12
12
|
readonly errorCode?: ComputerUseFailureCode;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
interface ComputerUseTraceRecord {
|
|
15
15
|
readonly sequence: number;
|
|
16
16
|
readonly timestamp: number;
|
|
17
17
|
readonly runId: string;
|
|
@@ -23,6 +23,7 @@ export interface ComputerUseTraceRecord {
|
|
|
23
23
|
readonly outcome: ComputerUseTraceInput['outcome'];
|
|
24
24
|
readonly errorCode?: ComputerUseFailureCode;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
declare function redactComputerUseTrace(input: ComputerUseTraceInput): ComputerUseTraceRecord;
|
|
27
27
|
//#endregion
|
|
28
|
+
export { ComputerUseTraceInput, ComputerUseTraceRecord, redactComputerUseTrace };
|
|
28
29
|
//# sourceMappingURL=traceRedaction.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceRedaction.d.mts","names":[],"sources":["../../src/services/traceRedaction.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"traceRedaction.d.mts","names":[],"sources":["../../src/services/traceRedaction.ts"],"mappings":";;UAEiB;WACN;WACA;WACA;WACA;WACA,QAAQ;WACR;WACA;WACA;WACA,YAAY;;UAGN;WACN;WACA;WACA;WACA;WACA,YAAY;WACZ;WACA;WACA;WACA,SAAS;WACT,YAAY;;iBAGP,uBAAuB,OAAO,wBAAwB"}
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
//#region src/types/computerUse.d.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const COMPUTER_USE_PHASES: readonly ['inactive', 'requesting', 'awaiting_confirmation', 'activating', 'active', 'stopping', 'failed'];
|
|
3
|
+
type ComputerUsePhase = (typeof COMPUTER_USE_PHASES)[number];
|
|
4
|
+
interface ComputerUseSessionIdentity {
|
|
5
5
|
readonly sessionId: string;
|
|
6
6
|
readonly runtimeId: string;
|
|
7
7
|
readonly modeEpoch: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface ComputerUseTarget {
|
|
10
10
|
readonly bundleId: string;
|
|
11
11
|
readonly applicationName: string;
|
|
12
12
|
readonly processId: number;
|
|
13
13
|
readonly windowId: string;
|
|
14
14
|
readonly windowTitle: string;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
interface ComputerUseGrant {
|
|
17
17
|
readonly runId: string;
|
|
18
18
|
readonly grantId: string;
|
|
19
19
|
readonly hostGeneration: string;
|
|
20
20
|
readonly targetGeneration: string;
|
|
21
21
|
readonly expiresAt: number;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
interface ComputerUseElement {
|
|
24
24
|
readonly ref: string;
|
|
25
25
|
readonly role: string;
|
|
26
26
|
readonly label?: string;
|
|
27
|
-
readonly value?: string;
|
|
28
27
|
readonly enabled: boolean;
|
|
29
28
|
readonly secure: boolean;
|
|
30
29
|
readonly actions: readonly ComputerUseActionKind[];
|
|
31
30
|
}
|
|
32
|
-
|
|
31
|
+
interface ComputerUseObservation {
|
|
33
32
|
readonly runId: string;
|
|
34
33
|
readonly snapshotId: string;
|
|
35
34
|
readonly targetGeneration: string;
|
|
@@ -42,9 +41,9 @@ export interface ComputerUseObservation {
|
|
|
42
41
|
readonly data: string;
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
readonly kind: 'press'
|
|
44
|
+
type ComputerUseActionKind = 'press' | 'set_value' | 'scroll';
|
|
45
|
+
type ComputerUseAction = {
|
|
46
|
+
readonly kind: 'press';
|
|
48
47
|
readonly snapshotId: string;
|
|
49
48
|
readonly elementRef: string;
|
|
50
49
|
} | {
|
|
@@ -59,8 +58,8 @@ export type ComputerUseAction = {
|
|
|
59
58
|
readonly direction: 'up' | 'down' | 'left' | 'right';
|
|
60
59
|
readonly amount: 'line' | 'page';
|
|
61
60
|
};
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
type ComputerUseFailureCode = 'busy_in_another_session' | 'desktop_unavailable' | 'permission_required_on_mac' | 'confirmation_denied' | 'confirmation_expired' | 'target_invalid' | 'target_lost' | 'recording_failed' | 'trace_failed' | 'grant_expired' | 'stale_request' | 'outcome_uncertain' | 'internal_error';
|
|
62
|
+
interface ComputerUseState {
|
|
64
63
|
readonly revision: number;
|
|
65
64
|
readonly phase: ComputerUsePhase;
|
|
66
65
|
readonly identity: ComputerUseSessionIdentity;
|
|
@@ -72,7 +71,7 @@ export interface ComputerUseState {
|
|
|
72
71
|
readonly message: string;
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
|
-
|
|
74
|
+
type ComputerUseStateEvent = {
|
|
76
75
|
readonly type: 'request';
|
|
77
76
|
readonly requestId: string;
|
|
78
77
|
readonly target: ComputerUseTarget;
|
|
@@ -101,4 +100,5 @@ export type ComputerUseStateEvent = {
|
|
|
101
100
|
readonly type: 'reset';
|
|
102
101
|
};
|
|
103
102
|
//#endregion
|
|
103
|
+
export { COMPUTER_USE_PHASES, ComputerUseAction, ComputerUseActionKind, ComputerUseElement, ComputerUseFailureCode, ComputerUseGrant, ComputerUseObservation, ComputerUsePhase, ComputerUseSessionIdentity, ComputerUseState, ComputerUseStateEvent, ComputerUseTarget };
|
|
104
104
|
//# sourceMappingURL=computerUse.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUse.d.cts","names":[],"sources":["../../src/types/computerUse.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"computerUse.d.cts","names":[],"sources":["../../src/types/computerUse.ts"],"mappings":";cAAa;KAUD,2BAA2B;UAEtB;WACN;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;;UAGZ;WACN;WACA;WACA;WACA;WACA;WACA;WACA,mBAAmB;WACnB;aACE;aACA;;;KAID;KAEA;WAEG;WACA;WACA;;WAGA;WACA;WACA;WACA;;WAGA;WACA;WACA;WACA;WACA;;KAGH;UAeK;WACN;WACA,OAAO;WACP,UAAU;WACV;WACA,SAAS;WACT,QAAQ;WACR;aACE,MAAM;aACN;;;KAID;WACG;WAA0B;WAA4B,QAAQ;;WAC9D;WAAqC;;WACrC;WAA0B;;WAC1B;WAAuB;;WACvB;WAA4B;WAA4B,OAAO;;WAC/D;;WACA;;WACA;WAAuB,MAAM;WAAiC;;WAC9D"}
|
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
//#region src/types/computerUse.d.ts
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const COMPUTER_USE_PHASES: readonly ['inactive', 'requesting', 'awaiting_confirmation', 'activating', 'active', 'stopping', 'failed'];
|
|
3
|
+
type ComputerUsePhase = (typeof COMPUTER_USE_PHASES)[number];
|
|
4
|
+
interface ComputerUseSessionIdentity {
|
|
5
5
|
readonly sessionId: string;
|
|
6
6
|
readonly runtimeId: string;
|
|
7
7
|
readonly modeEpoch: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface ComputerUseTarget {
|
|
10
10
|
readonly bundleId: string;
|
|
11
11
|
readonly applicationName: string;
|
|
12
12
|
readonly processId: number;
|
|
13
13
|
readonly windowId: string;
|
|
14
14
|
readonly windowTitle: string;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
interface ComputerUseGrant {
|
|
17
17
|
readonly runId: string;
|
|
18
18
|
readonly grantId: string;
|
|
19
19
|
readonly hostGeneration: string;
|
|
20
20
|
readonly targetGeneration: string;
|
|
21
21
|
readonly expiresAt: number;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
interface ComputerUseElement {
|
|
24
24
|
readonly ref: string;
|
|
25
25
|
readonly role: string;
|
|
26
26
|
readonly label?: string;
|
|
27
|
-
readonly value?: string;
|
|
28
27
|
readonly enabled: boolean;
|
|
29
28
|
readonly secure: boolean;
|
|
30
29
|
readonly actions: readonly ComputerUseActionKind[];
|
|
31
30
|
}
|
|
32
|
-
|
|
31
|
+
interface ComputerUseObservation {
|
|
33
32
|
readonly runId: string;
|
|
34
33
|
readonly snapshotId: string;
|
|
35
34
|
readonly targetGeneration: string;
|
|
@@ -42,9 +41,9 @@ export interface ComputerUseObservation {
|
|
|
42
41
|
readonly data: string;
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
readonly kind: 'press'
|
|
44
|
+
type ComputerUseActionKind = 'press' | 'set_value' | 'scroll';
|
|
45
|
+
type ComputerUseAction = {
|
|
46
|
+
readonly kind: 'press';
|
|
48
47
|
readonly snapshotId: string;
|
|
49
48
|
readonly elementRef: string;
|
|
50
49
|
} | {
|
|
@@ -59,8 +58,8 @@ export type ComputerUseAction = {
|
|
|
59
58
|
readonly direction: 'up' | 'down' | 'left' | 'right';
|
|
60
59
|
readonly amount: 'line' | 'page';
|
|
61
60
|
};
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
type ComputerUseFailureCode = 'busy_in_another_session' | 'desktop_unavailable' | 'permission_required_on_mac' | 'confirmation_denied' | 'confirmation_expired' | 'target_invalid' | 'target_lost' | 'recording_failed' | 'trace_failed' | 'grant_expired' | 'stale_request' | 'outcome_uncertain' | 'internal_error';
|
|
62
|
+
interface ComputerUseState {
|
|
64
63
|
readonly revision: number;
|
|
65
64
|
readonly phase: ComputerUsePhase;
|
|
66
65
|
readonly identity: ComputerUseSessionIdentity;
|
|
@@ -72,7 +71,7 @@ export interface ComputerUseState {
|
|
|
72
71
|
readonly message: string;
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
|
-
|
|
74
|
+
type ComputerUseStateEvent = {
|
|
76
75
|
readonly type: 'request';
|
|
77
76
|
readonly requestId: string;
|
|
78
77
|
readonly target: ComputerUseTarget;
|
|
@@ -101,4 +100,5 @@ export type ComputerUseStateEvent = {
|
|
|
101
100
|
readonly type: 'reset';
|
|
102
101
|
};
|
|
103
102
|
//#endregion
|
|
103
|
+
export { COMPUTER_USE_PHASES, ComputerUseAction, ComputerUseActionKind, ComputerUseElement, ComputerUseFailureCode, ComputerUseGrant, ComputerUseObservation, ComputerUsePhase, ComputerUseSessionIdentity, ComputerUseState, ComputerUseStateEvent, ComputerUseTarget };
|
|
104
104
|
//# sourceMappingURL=computerUse.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUse.d.mts","names":[],"sources":["../../src/types/computerUse.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"computerUse.d.mts","names":[],"sources":["../../src/types/computerUse.ts"],"mappings":";cAAa;KAUD,2BAA2B;UAEtB;WACN;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;;UAGZ;WACN;WACA;WACA;WACA;WACA;WACA;WACA,mBAAmB;WACnB;aACE;aACA;;;KAID;KAEA;WAEG;WACA;WACA;;WAGA;WACA;WACA;WACA;;WAGA;WACA;WACA;WACA;WACA;;KAGH;UAeK;WACN;WACA,OAAO;WACP,UAAU;WACV;WACA,SAAS;WACT,QAAQ;WACR;aACE,MAAM;aACN;;;KAID;WACG;WAA0B;WAA4B,QAAQ;;WAC9D;WAAqC;;WACrC;WAA0B;;WAC1B;WAAuB;;WACvB;WAA4B;WAA4B,OAAO;;WAC/D;;WACA;;WACA;WAAuB,MAAM;WAAiC;;WAC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUseApi.cjs","names":[],"sources":["../../src/types/computerUseApi.ts"],"sourcesContent":["import type { DoomApiCaller } from '@agimon-ai/doompi-extension-contracts/package-api';\n\nexport const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'doom-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'doom-computer-use-mode';\nexport const SESSION_QUERY_PARAM = 'session';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\nexport function activationUrl(sessionId: string): string {\n return `/api/plugin/${API_BASE_PATH}/activate?${SESSION_QUERY_PARAM}=${encodeURIComponent(sessionId)}`;\n}\n\nexport const COMPUTER_USE_ROUTES = {\n activate: '/activate',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n
|
|
1
|
+
{"version":3,"file":"computerUseApi.cjs","names":[],"sources":["../../src/types/computerUseApi.ts"],"sourcesContent":["import type { DoomApiCaller } from '@agimon-ai/doompi-extension-contracts/package-api';\n\nexport const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'doom-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'doom-computer-use-mode';\nexport const SESSION_QUERY_PARAM = 'session';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\nexport function activationUrl(sessionId: string): string {\n return `/api/plugin/${API_BASE_PATH}/activate?${SESSION_QUERY_PARAM}=${encodeURIComponent(sessionId)}`;\n}\n\nexport const COMPUTER_USE_ROUTES = {\n activate: '/activate',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n readonly caller: DoomApiCaller;\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\n"],"mappings":"AAEA,MAca,EAAsB,CACjC,SAAU,YACV,WAAY,eACZ,aAAc,iBACd,YAAa,gBACb,UAAW,cACX,SAAU,aACV,cAAe,kBACf,iBAAkB,qBAClB,QAAS,YACT,YAAa,gBACb,QAAS,WACX"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { DoomApiCaller } from "@agimon-ai/doompi-extension-contracts/package-api";
|
|
2
2
|
//#region src/types/computerUseApi.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
declare const API_BASE_PATH = "computer-use";
|
|
4
|
+
declare const computerUseChannelType = "computer_use_state";
|
|
5
|
+
declare const COMPUTER_USE_MODE_ID = "computer-use";
|
|
6
|
+
declare const COMPUTER_USE_STATUS_KEY = "doom-computer-use";
|
|
7
|
+
declare const COMPUTER_USE_MODE_STATUS_KEY = "doom-computer-use-mode";
|
|
8
|
+
declare const SESSION_QUERY_PARAM = "session";
|
|
9
|
+
declare const COMPUTER_USE_MAX_DURATION_MS: number;
|
|
10
|
+
declare const COMPUTER_USE_DEFAULT_DURATION_MS: number;
|
|
11
|
+
declare const COMPUTER_USE_CONFIRMATION_WINDOW_MS: number;
|
|
12
|
+
declare function activationUrl(sessionId: string): string;
|
|
13
|
+
declare const COMPUTER_USE_ROUTES: {
|
|
14
14
|
readonly activate: '/activate';
|
|
15
15
|
readonly agentState: '/agent/state';
|
|
16
16
|
readonly agentObserve: '/agent/observe';
|
|
@@ -23,20 +23,16 @@ export declare const COMPUTER_USE_ROUTES: {
|
|
|
23
23
|
readonly hubComplete: '/hub/complete';
|
|
24
24
|
readonly hubStop: '/hub/stop';
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
declare const COMPUTER_USE_WAKE_LIMIT = 1000000;
|
|
27
|
+
interface ComputerUseArtifactView {
|
|
28
28
|
readonly artifactId: string;
|
|
29
29
|
readonly status: 'ready' | 'failed';
|
|
30
30
|
readonly downloadUrl?: string;
|
|
31
31
|
readonly previewUrl?: string;
|
|
32
32
|
readonly actionCount?: number;
|
|
33
33
|
readonly completedAt?: string;
|
|
34
|
-
readonly failure?: {
|
|
35
|
-
readonly code: string;
|
|
36
|
-
readonly message: string;
|
|
37
|
-
};
|
|
38
34
|
}
|
|
39
|
-
|
|
35
|
+
interface ComputerUseSessionView {
|
|
40
36
|
readonly sessionId: string;
|
|
41
37
|
readonly revision: number;
|
|
42
38
|
readonly wake: number;
|
|
@@ -51,7 +47,7 @@ export interface ComputerUseSessionView {
|
|
|
51
47
|
};
|
|
52
48
|
readonly artifact?: ComputerUseArtifactView;
|
|
53
49
|
}
|
|
54
|
-
|
|
50
|
+
interface ComputerUseActivationRequest {
|
|
55
51
|
readonly requestId: string;
|
|
56
52
|
readonly target: Record<string, unknown>;
|
|
57
53
|
readonly durationSeconds: number;
|
|
@@ -59,20 +55,21 @@ export interface ComputerUseActivationRequest {
|
|
|
59
55
|
readonly confirmationExpiresAt: number;
|
|
60
56
|
readonly caller: DoomApiCaller;
|
|
61
57
|
}
|
|
62
|
-
|
|
58
|
+
interface ComputerUseBrokerRequest {
|
|
63
59
|
readonly id: string;
|
|
64
60
|
readonly operation: 'observe' | 'act';
|
|
65
61
|
readonly payload?: unknown;
|
|
66
62
|
readonly grantId: string;
|
|
67
63
|
readonly sequence?: number;
|
|
68
64
|
}
|
|
69
|
-
|
|
65
|
+
interface ComputerUseChannelPayload {
|
|
70
66
|
readonly state: ComputerUseSessionView;
|
|
71
67
|
readonly targets: readonly Record<string, unknown>[];
|
|
72
68
|
readonly busy?: true;
|
|
73
69
|
}
|
|
74
|
-
|
|
70
|
+
type ComputerUseBrowserCommand = {
|
|
75
71
|
readonly action: 'status' | 'targets' | 'stop' | 'artifacts';
|
|
76
72
|
};
|
|
77
73
|
//#endregion
|
|
74
|
+
export { API_BASE_PATH, COMPUTER_USE_CONFIRMATION_WINDOW_MS, COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, COMPUTER_USE_MODE_STATUS_KEY, COMPUTER_USE_ROUTES, COMPUTER_USE_STATUS_KEY, COMPUTER_USE_WAKE_LIMIT, ComputerUseActivationRequest, ComputerUseArtifactView, ComputerUseBrokerRequest, ComputerUseBrowserCommand, ComputerUseChannelPayload, ComputerUseSessionView, SESSION_QUERY_PARAM, activationUrl, computerUseChannelType };
|
|
78
75
|
//# sourceMappingURL=computerUseApi.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUseApi.d.cts","names":[],"sources":["../../src/types/computerUseApi.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"computerUseApi.d.cts","names":[],"sources":["../../src/types/computerUseApi.ts"],"mappings":";;cAEa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;iBAEG,cAAc;cAIjB;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW;UAEI;WACN;WACA;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA,SAAS;WACT;WACA;WACA;aAAqB;aAAuB;;WAC5C,WAAW;;UAGL;WACN;WACA,QAAQ;WACR;WACA;WACA;WACA,QAAQ;;UAGF;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN,OAAO;WACP,kBAAkB;WAClB;;KAGC;WAAuC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { DoomApiCaller } from "@agimon-ai/doompi-extension-contracts/package-api";
|
|
2
2
|
//#region src/types/computerUseApi.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
declare const API_BASE_PATH = "computer-use";
|
|
4
|
+
declare const computerUseChannelType = "computer_use_state";
|
|
5
|
+
declare const COMPUTER_USE_MODE_ID = "computer-use";
|
|
6
|
+
declare const COMPUTER_USE_STATUS_KEY = "doom-computer-use";
|
|
7
|
+
declare const COMPUTER_USE_MODE_STATUS_KEY = "doom-computer-use-mode";
|
|
8
|
+
declare const SESSION_QUERY_PARAM = "session";
|
|
9
|
+
declare const COMPUTER_USE_MAX_DURATION_MS: number;
|
|
10
|
+
declare const COMPUTER_USE_DEFAULT_DURATION_MS: number;
|
|
11
|
+
declare const COMPUTER_USE_CONFIRMATION_WINDOW_MS: number;
|
|
12
|
+
declare function activationUrl(sessionId: string): string;
|
|
13
|
+
declare const COMPUTER_USE_ROUTES: {
|
|
14
14
|
readonly activate: '/activate';
|
|
15
15
|
readonly agentState: '/agent/state';
|
|
16
16
|
readonly agentObserve: '/agent/observe';
|
|
@@ -23,20 +23,16 @@ export declare const COMPUTER_USE_ROUTES: {
|
|
|
23
23
|
readonly hubComplete: '/hub/complete';
|
|
24
24
|
readonly hubStop: '/hub/stop';
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
declare const COMPUTER_USE_WAKE_LIMIT = 1000000;
|
|
27
|
+
interface ComputerUseArtifactView {
|
|
28
28
|
readonly artifactId: string;
|
|
29
29
|
readonly status: 'ready' | 'failed';
|
|
30
30
|
readonly downloadUrl?: string;
|
|
31
31
|
readonly previewUrl?: string;
|
|
32
32
|
readonly actionCount?: number;
|
|
33
33
|
readonly completedAt?: string;
|
|
34
|
-
readonly failure?: {
|
|
35
|
-
readonly code: string;
|
|
36
|
-
readonly message: string;
|
|
37
|
-
};
|
|
38
34
|
}
|
|
39
|
-
|
|
35
|
+
interface ComputerUseSessionView {
|
|
40
36
|
readonly sessionId: string;
|
|
41
37
|
readonly revision: number;
|
|
42
38
|
readonly wake: number;
|
|
@@ -51,7 +47,7 @@ export interface ComputerUseSessionView {
|
|
|
51
47
|
};
|
|
52
48
|
readonly artifact?: ComputerUseArtifactView;
|
|
53
49
|
}
|
|
54
|
-
|
|
50
|
+
interface ComputerUseActivationRequest {
|
|
55
51
|
readonly requestId: string;
|
|
56
52
|
readonly target: Record<string, unknown>;
|
|
57
53
|
readonly durationSeconds: number;
|
|
@@ -59,20 +55,21 @@ export interface ComputerUseActivationRequest {
|
|
|
59
55
|
readonly confirmationExpiresAt: number;
|
|
60
56
|
readonly caller: DoomApiCaller;
|
|
61
57
|
}
|
|
62
|
-
|
|
58
|
+
interface ComputerUseBrokerRequest {
|
|
63
59
|
readonly id: string;
|
|
64
60
|
readonly operation: 'observe' | 'act';
|
|
65
61
|
readonly payload?: unknown;
|
|
66
62
|
readonly grantId: string;
|
|
67
63
|
readonly sequence?: number;
|
|
68
64
|
}
|
|
69
|
-
|
|
65
|
+
interface ComputerUseChannelPayload {
|
|
70
66
|
readonly state: ComputerUseSessionView;
|
|
71
67
|
readonly targets: readonly Record<string, unknown>[];
|
|
72
68
|
readonly busy?: true;
|
|
73
69
|
}
|
|
74
|
-
|
|
70
|
+
type ComputerUseBrowserCommand = {
|
|
75
71
|
readonly action: 'status' | 'targets' | 'stop' | 'artifacts';
|
|
76
72
|
};
|
|
77
73
|
//#endregion
|
|
74
|
+
export { API_BASE_PATH, COMPUTER_USE_CONFIRMATION_WINDOW_MS, COMPUTER_USE_DEFAULT_DURATION_MS, COMPUTER_USE_MAX_DURATION_MS, COMPUTER_USE_MODE_ID, COMPUTER_USE_MODE_STATUS_KEY, COMPUTER_USE_ROUTES, COMPUTER_USE_STATUS_KEY, COMPUTER_USE_WAKE_LIMIT, ComputerUseActivationRequest, ComputerUseArtifactView, ComputerUseBrokerRequest, ComputerUseBrowserCommand, ComputerUseChannelPayload, ComputerUseSessionView, SESSION_QUERY_PARAM, activationUrl, computerUseChannelType };
|
|
78
75
|
//# sourceMappingURL=computerUseApi.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUseApi.d.mts","names":[],"sources":["../../src/types/computerUseApi.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"computerUseApi.d.mts","names":[],"sources":["../../src/types/computerUseApi.ts"],"mappings":";;cAEa;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;iBAEG,cAAc;cAIjB;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW;UAEI;WACN;WACA;WACA;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;WACA;WACA,SAAS;WACT;WACA;WACA;aAAqB;aAAuB;;WAC5C,WAAW;;UAGL;WACN;WACA,QAAQ;WACR;WACA;WACA;WACA,QAAQ;;UAGF;WACN;WACA;WACA;WACA;WACA;;UAGM;WACN,OAAO;WACP,kBAAkB;WAClB;;KAGC;WAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computerUseApi.mjs","names":[],"sources":["../../src/types/computerUseApi.ts"],"sourcesContent":["import type { DoomApiCaller } from '@agimon-ai/doompi-extension-contracts/package-api';\n\nexport const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'doom-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'doom-computer-use-mode';\nexport const SESSION_QUERY_PARAM = 'session';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\nexport function activationUrl(sessionId: string): string {\n return `/api/plugin/${API_BASE_PATH}/activate?${SESSION_QUERY_PARAM}=${encodeURIComponent(sessionId)}`;\n}\n\nexport const COMPUTER_USE_ROUTES = {\n activate: '/activate',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n
|
|
1
|
+
{"version":3,"file":"computerUseApi.mjs","names":[],"sources":["../../src/types/computerUseApi.ts"],"sourcesContent":["import type { DoomApiCaller } from '@agimon-ai/doompi-extension-contracts/package-api';\n\nexport const API_BASE_PATH = 'computer-use';\nexport const computerUseChannelType = 'computer_use_state';\nexport const COMPUTER_USE_MODE_ID = 'computer-use';\nexport const COMPUTER_USE_STATUS_KEY = 'doom-computer-use';\nexport const COMPUTER_USE_MODE_STATUS_KEY = 'doom-computer-use-mode';\nexport const SESSION_QUERY_PARAM = 'session';\nexport const COMPUTER_USE_MAX_DURATION_MS = 1_800 * 1_000;\nexport const COMPUTER_USE_DEFAULT_DURATION_MS = 300 * 1_000;\nexport const COMPUTER_USE_CONFIRMATION_WINDOW_MS = 2 * 60 * 1_000;\n\nexport function activationUrl(sessionId: string): string {\n return `/api/plugin/${API_BASE_PATH}/activate?${SESSION_QUERY_PARAM}=${encodeURIComponent(sessionId)}`;\n}\n\nexport const COMPUTER_USE_ROUTES = {\n activate: '/activate',\n agentState: '/agent/state',\n agentObserve: '/agent/observe',\n agentAction: '/agent/action',\n agentStop: '/agent/stop',\n hubState: '/hub/state',\n hubActivation: '/hub/activation',\n hubAuthorization: '/hub/authorization',\n hubNext: '/hub/next',\n hubComplete: '/hub/complete',\n hubStop: '/hub/stop',\n} as const;\n\nexport const COMPUTER_USE_WAKE_LIMIT = 1_000_000;\n\nexport interface ComputerUseArtifactView {\n readonly artifactId: string;\n readonly status: 'ready' | 'failed';\n readonly downloadUrl?: string;\n readonly previewUrl?: string;\n readonly actionCount?: number;\n readonly completedAt?: string;\n}\n\nexport interface ComputerUseSessionView {\n readonly sessionId: string;\n readonly revision: number;\n readonly wake: number;\n readonly phase: 'inactive' | 'awaiting_confirmation' | 'activating' | 'active' | 'stopping' | 'failed';\n readonly requestId?: string;\n readonly target?: Record<string, unknown>;\n readonly durationMs?: number;\n readonly expiresAt?: number;\n readonly failure?: { readonly code: string; readonly message: string };\n readonly artifact?: ComputerUseArtifactView;\n}\n\nexport interface ComputerUseActivationRequest {\n readonly requestId: string;\n readonly target: Record<string, unknown>;\n readonly durationSeconds: number;\n readonly createdAt: number;\n readonly confirmationExpiresAt: number;\n readonly caller: DoomApiCaller;\n}\n\nexport interface ComputerUseBrokerRequest {\n readonly id: string;\n readonly operation: 'observe' | 'act';\n readonly payload?: unknown;\n readonly grantId: string;\n readonly sequence?: number;\n}\n\nexport interface ComputerUseChannelPayload {\n readonly state: ComputerUseSessionView;\n readonly targets: readonly Record<string, unknown>[];\n readonly busy?: true;\n}\n\nexport type ComputerUseBrowserCommand = { readonly action: 'status' | 'targets' | 'stop' | 'artifacts' };\n"],"mappings":"AAEA,MAAa,EAAgB,eAChB,EAAyB,qBACzB,EAAuB,eACvB,EAA0B,oBAC1B,EAA+B,yBAE/B,EAA+B,KAE/B,EAAsC,KAMtC,EAAsB,CACjC,SAAU,YACV,WAAY,eACZ,aAAc,iBACd,YAAa,gBACb,UAAW,cACX,SAAU,aACV,cAAe,kBACf,iBAAkB,qBAClB,QAAS,YACT,YAAa,gBACb,QAAS,WACX,EAEa,EAA0B"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { ComputerUseSessionClient } from "../adapters/pi/sessionApiClient.cjs";
|
|
2
|
-
import { ComputerScriptExecutor } from "./computerScript.cjs";
|
|
3
2
|
//#region src/types/extension.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type ComputerUseNotificationLevel = 'info' | 'error';
|
|
4
|
+
interface ComputerUseExtensionResult {
|
|
6
5
|
message: string;
|
|
7
6
|
level: ComputerUseNotificationLevel;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
interface ComputerUseExtensionService {
|
|
10
9
|
execute(): Promise<ComputerUseExtensionResult>;
|
|
11
10
|
}
|
|
12
|
-
|
|
11
|
+
interface ComputerUseExtensionDependencies {
|
|
13
12
|
service: ComputerUseExtensionService;
|
|
14
13
|
client?: ComputerUseSessionClient;
|
|
15
|
-
scriptRunner?: ComputerScriptExecutor;
|
|
16
|
-
enabled?: () => boolean | Promise<boolean>;
|
|
17
14
|
}
|
|
18
15
|
//#endregion
|
|
16
|
+
export { ComputerUseExtensionDependencies, ComputerUseExtensionResult, ComputerUseExtensionService, ComputerUseNotificationLevel };
|
|
19
17
|
//# sourceMappingURL=extension.d.cts.map
|