@lnar/cli 0.0.1-dev.27db913 → 0.0.1-dev.3982ccb
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/dist/api-client.d.ts +19 -0
- package/dist/api-client.js +40 -0
- package/dist/api-client.js.map +1 -1
- package/dist/auth.d.ts +20 -0
- package/dist/auth.js +74 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli.js +25 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/daemon.js +13 -0
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/record.d.ts +11 -0
- package/dist/commands/record.js +136 -0
- package/dist/commands/record.js.map +1 -0
- package/dist/recording/bundle.d.ts +23 -0
- package/dist/recording/bundle.js +41 -0
- package/dist/recording/bundle.js.map +1 -0
- package/dist/recording/capture.d.ts +33 -0
- package/dist/recording/capture.js +173 -0
- package/dist/recording/capture.js.map +1 -0
- package/dist/recording/session.d.ts +27 -0
- package/dist/recording/session.js +81 -0
- package/dist/recording/session.js.map +1 -0
- package/dist/recording/types.d.ts +59 -0
- package/dist/recording/types.js +8 -0
- package/dist/recording/types.js.map +1 -0
- package/dist/run-client.d.ts +19 -0
- package/dist/run-client.js +44 -0
- package/dist/run-client.js.map +1 -0
- package/dist/run-worker.d.ts +25 -0
- package/dist/run-worker.js +85 -0
- package/dist/run-worker.js.map +1 -0
- package/dist/runtime/actions.d.ts +13 -0
- package/dist/runtime/actions.js +107 -0
- package/dist/runtime/actions.js.map +1 -0
- package/dist/runtime/client.d.ts +3 -0
- package/dist/runtime/client.js +85 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/login.d.ts +20 -0
- package/dist/runtime/login.js +34 -0
- package/dist/runtime/login.js.map +1 -0
- package/dist/runtime/loop.d.ts +28 -0
- package/dist/runtime/loop.js +68 -0
- package/dist/runtime/loop.js.map +1 -0
- package/dist/runtime/playbook.d.ts +49 -0
- package/dist/runtime/playbook.js +73 -0
- package/dist/runtime/playbook.js.map +1 -0
- package/dist/runtime/runner.d.ts +20 -0
- package/dist/runtime/runner.js +54 -0
- package/dist/runtime/runner.js.map +1 -0
- package/dist/runtime/types.d.ts +69 -0
- package/dist/runtime/types.js +10 -0
- package/dist/runtime/types.js.map +1 -0
- package/package.json +9 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini computer use (browser) のランタイム型 (Demo-to-MCP / Phase 4)。
|
|
3
|
+
*
|
|
4
|
+
* Phase 0 スパイクで実 API 検証済みの形を本体へ昇格したもの。
|
|
5
|
+
* `@google/genai` >= 2.0.0 の interactions API (`steps` スキーマ) に対応する。
|
|
6
|
+
*/
|
|
7
|
+
export type ActionName = 'click' | 'double_click' | 'right_click' | 'type' | 'navigate' | 'scroll' | 'press_key' | 'hotkey' | 'drag_and_drop' | 'go_back' | 'go_forward' | 'take_screenshot' | 'wait';
|
|
8
|
+
export interface SafetyDecision {
|
|
9
|
+
readonly decision: 'require_confirmation' | string;
|
|
10
|
+
readonly explanation: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ActionArguments {
|
|
13
|
+
readonly x?: number;
|
|
14
|
+
readonly y?: number;
|
|
15
|
+
readonly start_x?: number;
|
|
16
|
+
readonly start_y?: number;
|
|
17
|
+
readonly end_x?: number;
|
|
18
|
+
readonly end_y?: number;
|
|
19
|
+
readonly text?: string;
|
|
20
|
+
readonly press_enter?: boolean;
|
|
21
|
+
readonly url?: string;
|
|
22
|
+
readonly direction?: 'up' | 'down' | 'left' | 'right';
|
|
23
|
+
readonly magnitude_in_pixels?: number;
|
|
24
|
+
readonly key?: string;
|
|
25
|
+
readonly keys?: ReadonlyArray<string>;
|
|
26
|
+
readonly seconds?: number;
|
|
27
|
+
readonly intent?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FunctionCallStep {
|
|
30
|
+
readonly type: 'function_call';
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly name: ActionName;
|
|
33
|
+
readonly arguments: ActionArguments;
|
|
34
|
+
readonly safety_decision?: SafetyDecision;
|
|
35
|
+
}
|
|
36
|
+
export interface TextStep {
|
|
37
|
+
readonly type: 'text';
|
|
38
|
+
readonly text: string;
|
|
39
|
+
}
|
|
40
|
+
export type InteractionStep = FunctionCallStep | TextStep;
|
|
41
|
+
export interface Interaction {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly steps: ReadonlyArray<InteractionStep>;
|
|
44
|
+
}
|
|
45
|
+
export type InteractionInput = {
|
|
46
|
+
readonly type: 'text';
|
|
47
|
+
readonly text: string;
|
|
48
|
+
} | {
|
|
49
|
+
readonly type: 'image';
|
|
50
|
+
readonly data: string;
|
|
51
|
+
readonly mime_type: 'image/png';
|
|
52
|
+
} | {
|
|
53
|
+
readonly type: 'function_result';
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly call_id: string;
|
|
56
|
+
readonly result: ReadonlyArray<{
|
|
57
|
+
readonly type: 'text';
|
|
58
|
+
readonly text: string;
|
|
59
|
+
} | {
|
|
60
|
+
readonly type: 'image';
|
|
61
|
+
readonly data: string;
|
|
62
|
+
readonly mime_type: 'image/png';
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
export interface ComputerUseClient {
|
|
66
|
+
createInitial(input: ReadonlyArray<InteractionInput>): Promise<Interaction>;
|
|
67
|
+
continueFrom(previousInteractionId: string, input: ReadonlyArray<InteractionInput>): Promise<Interaction>;
|
|
68
|
+
}
|
|
69
|
+
export declare function isFunctionCall(step: InteractionStep): step is FunctionCallStep;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini computer use (browser) のランタイム型 (Demo-to-MCP / Phase 4)。
|
|
3
|
+
*
|
|
4
|
+
* Phase 0 スパイクで実 API 検証済みの形を本体へ昇格したもの。
|
|
5
|
+
* `@google/genai` >= 2.0.0 の interactions API (`steps` スキーマ) に対応する。
|
|
6
|
+
*/
|
|
7
|
+
export function isFunctionCall(step) {
|
|
8
|
+
return step.type === 'function_call';
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/runtime/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiFH,MAAM,UAAU,cAAc,CAAC,IAAqB;IAClD,OAAO,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lnar/cli",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.3982ccb",
|
|
4
4
|
"description": "Lnar CLI — scans local AI agents (Claude / Claude Code, Codex CLI, Cursor, Gemini CLI, ChatGPT) for connected MCP servers and reports them to your lnar account.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"bin": {
|
|
8
8
|
"lnar": "./dist/cli.js"
|
|
9
9
|
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/cli.js"
|
|
12
|
+
},
|
|
10
13
|
"files": [
|
|
11
14
|
"dist",
|
|
12
15
|
"README.md"
|
|
@@ -24,13 +27,18 @@
|
|
|
24
27
|
},
|
|
25
28
|
"lnar:defaultApiBaseUrl": "https://api-dev.lnar.ai",
|
|
26
29
|
"dependencies": {
|
|
30
|
+
"@google/genai": "^2.0.0",
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
27
32
|
"commander": "^12.1.0",
|
|
33
|
+
"playwright": "^1.49.0",
|
|
28
34
|
"smol-toml": "^1.3.1",
|
|
35
|
+
"tar": "^7.4.3",
|
|
29
36
|
"zod": "^4.4.3"
|
|
30
37
|
},
|
|
31
38
|
"devDependencies": {
|
|
32
39
|
"@biomejs/biome": "^2.4.13",
|
|
33
40
|
"@types/node": "^25.5.0",
|
|
41
|
+
"@types/tar": "^6.1.13",
|
|
34
42
|
"tsx": "^4.19.2",
|
|
35
43
|
"typescript": "~5.6.2",
|
|
36
44
|
"vitest": "^4.1.5"
|