copilot-liku-cli 0.0.4 → 0.0.9
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/QUICKSTART.md +24 -0
- package/README.md +85 -33
- package/package.json +23 -14
- package/scripts/postinstall.js +63 -0
- package/src/cli/commands/window.js +66 -0
- package/src/main/agents/base-agent.js +15 -7
- package/src/main/agents/builder.js +211 -0
- package/src/main/agents/index.js +12 -4
- package/src/main/agents/orchestrator.js +40 -0
- package/src/main/agents/producer.js +891 -0
- package/src/main/agents/researcher.js +78 -0
- package/src/main/agents/state-manager.js +134 -2
- package/src/main/agents/trace-writer.js +83 -0
- package/src/main/agents/verifier.js +201 -0
- package/src/main/ai-service.js +673 -66
- package/src/main/index.js +682 -110
- package/src/main/inspect-service.js +24 -1
- package/src/main/python-bridge.js +395 -0
- package/src/main/system-automation.js +934 -133
- package/src/main/ui-automation/core/ui-provider.js +99 -0
- package/src/main/ui-automation/core/uia-host.js +214 -0
- package/src/main/ui-automation/index.js +30 -0
- package/src/main/ui-automation/interactions/element-click.js +6 -6
- package/src/main/ui-automation/interactions/high-level.js +28 -6
- package/src/main/ui-automation/interactions/index.js +21 -0
- package/src/main/ui-automation/interactions/pattern-actions.js +236 -0
- package/src/main/ui-automation/window/index.js +6 -0
- package/src/main/ui-automation/window/manager.js +173 -26
- package/src/main/ui-watcher.js +420 -56
- package/src/main/visual-awareness.js +18 -1
- package/src/native/windows-uia/Program.cs +89 -0
- package/src/native/windows-uia/build.ps1 +24 -0
- package/src/native/windows-uia-dotnet/Program.cs +920 -0
- package/src/native/windows-uia-dotnet/WindowsUIA.csproj +11 -0
- package/src/native/windows-uia-dotnet/build.ps1 +24 -0
- package/src/renderer/chat/chat.js +943 -671
- package/src/renderer/chat/index.html +39 -4
- package/src/renderer/chat/preload.js +8 -1
- package/src/renderer/overlay/overlay.js +157 -8
- package/src/renderer/overlay/preload.js +4 -0
- package/src/shared/inspect-types.js +82 -6
- package/ARCHITECTURE.md +0 -411
- package/CONFIGURATION.md +0 -302
- package/CONTRIBUTING.md +0 -225
- package/ELECTRON_README.md +0 -121
- package/PROJECT_STATUS.md +0 -229
- package/TESTING.md +0 -274
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Runtime.InteropServices;
|
|
4
|
+
using System.Text.Json;
|
|
5
|
+
using System.Windows.Automation;
|
|
6
|
+
|
|
7
|
+
namespace UIAWrapper
|
|
8
|
+
{
|
|
9
|
+
class Program
|
|
10
|
+
{
|
|
11
|
+
[DllImport("user32.dll")]
|
|
12
|
+
static extern IntPtr GetForegroundWindow();
|
|
13
|
+
|
|
14
|
+
static void Main(string[] args)
|
|
15
|
+
{
|
|
16
|
+
IntPtr handle = GetForegroundWindow();
|
|
17
|
+
if (handle == IntPtr.Zero) return;
|
|
18
|
+
|
|
19
|
+
AutomationElement root = AutomationElement.FromHandle(handle);
|
|
20
|
+
var node = BuildTree(root);
|
|
21
|
+
|
|
22
|
+
string json = JsonSerializer.Serialize(node, new JsonSerializerOptions { WriteIndented = true });
|
|
23
|
+
Console.WriteLine(json);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static UIANode BuildTree(AutomationElement element)
|
|
27
|
+
{
|
|
28
|
+
var rectangle = element.Current.BoundingRectangle;
|
|
29
|
+
var node = new UIANode
|
|
30
|
+
{
|
|
31
|
+
id = element.Current.AutomationId,
|
|
32
|
+
name = element.Current.Name,
|
|
33
|
+
role = element.Current.ControlType.ProgrammaticName.Replace("ControlType.", ""),
|
|
34
|
+
bounds = new Bounds
|
|
35
|
+
{
|
|
36
|
+
x = SafeNumber(rectangle.X),
|
|
37
|
+
y = SafeNumber(rectangle.Y),
|
|
38
|
+
width = SafeNumber(rectangle.Width),
|
|
39
|
+
height = SafeNumber(rectangle.Height)
|
|
40
|
+
},
|
|
41
|
+
isClickable = (bool)element.GetCurrentPropertyValue(AutomationElement.IsInvokePatternAvailableProperty) || element.Current.IsKeyboardFocusable,
|
|
42
|
+
isFocusable = element.Current.IsKeyboardFocusable,
|
|
43
|
+
children = new List<UIANode>()
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var walker = TreeWalker.ControlViewWalker;
|
|
47
|
+
var child = walker.GetFirstChild(element);
|
|
48
|
+
while (child != null)
|
|
49
|
+
{
|
|
50
|
+
try
|
|
51
|
+
{
|
|
52
|
+
if (!child.Current.IsOffscreen)
|
|
53
|
+
{
|
|
54
|
+
node.children.Add(BuildTree(child));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (ElementNotAvailableException) { }
|
|
58
|
+
|
|
59
|
+
child = walker.GetNextSibling(child);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return node;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static double SafeNumber(double value)
|
|
66
|
+
{
|
|
67
|
+
return double.IsFinite(value) ? value : 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class UIANode
|
|
72
|
+
{
|
|
73
|
+
public string id { get; set; }
|
|
74
|
+
public string name { get; set; }
|
|
75
|
+
public string role { get; set; }
|
|
76
|
+
public Bounds bounds { get; set; }
|
|
77
|
+
public bool isClickable { get; set; }
|
|
78
|
+
public bool isFocusable { get; set; }
|
|
79
|
+
public List<UIANode> children { get; set; }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
class Bounds
|
|
83
|
+
{
|
|
84
|
+
public double x { get; set; }
|
|
85
|
+
public double y { get; set; }
|
|
86
|
+
public double width { get; set; }
|
|
87
|
+
public double height { get; set; }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
|
4
|
+
$projectRoot = Resolve-Path "$scriptDir\..\..\.."
|
|
5
|
+
$csproj = "$projectRoot\src\native\windows-uia-dotnet\WindowsUIA.csproj"
|
|
6
|
+
$binDir = "$projectRoot\bin"
|
|
7
|
+
|
|
8
|
+
if (-not (Get-Command dotnet -ErrorAction SilentlyContinue)) {
|
|
9
|
+
Write-Error "dotnet SDK not found. Install .NET SDK 9+ and re-run this script."
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (-not (Test-Path $binDir)) {
|
|
14
|
+
New-Item -ItemType Directory -Path $binDir | Out-Null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Write-Host "Publishing $csproj to $binDir..."
|
|
18
|
+
dotnet publish $csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o $binDir
|
|
19
|
+
|
|
20
|
+
if ($LASTEXITCODE -eq 0) {
|
|
21
|
+
Write-Host "Build successful: $binDir\WindowsUIA.exe"
|
|
22
|
+
} else {
|
|
23
|
+
Write-Error "Build failed with exit code $LASTEXITCODE"
|
|
24
|
+
}
|