@midscene/computer 1.7.6-beta-20260425023224.0 → 1.7.6
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/es/cli.mjs +8 -16
- package/dist/es/index.mjs +8 -16
- package/dist/es/mcp-server.mjs +8 -16
- package/dist/lib/cli.js +8 -16
- package/dist/lib/index.js +8 -16
- package/dist/lib/mcp-server.js +8 -16
- package/dist/types/index.d.ts +0 -1
- package/dist/types/mcp-server.d.ts +0 -1
- package/package.json +3 -3
package/dist/es/cli.mjs
CHANGED
|
@@ -411,7 +411,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
411
411
|
}
|
|
412
412
|
async healthCheck() {
|
|
413
413
|
console.log('[HealthCheck] Starting health check...');
|
|
414
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
414
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
415
415
|
console.log('[HealthCheck] Taking screenshot...');
|
|
416
416
|
const screenshotTimeout = 15000;
|
|
417
417
|
let timeoutId;
|
|
@@ -863,7 +863,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
863
863
|
}
|
|
864
864
|
if (this.agent) return this.agent;
|
|
865
865
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
866
|
-
const
|
|
866
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
867
867
|
const agentOpts = {
|
|
868
868
|
...displayId ? {
|
|
869
869
|
displayId
|
|
@@ -871,9 +871,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
871
871
|
...void 0 !== headless ? {
|
|
872
872
|
headless
|
|
873
873
|
} : {},
|
|
874
|
-
...
|
|
875
|
-
reportFileName
|
|
876
|
-
} : {}
|
|
874
|
+
...reportOptions ?? {}
|
|
877
875
|
};
|
|
878
876
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
879
877
|
this.agent = agent;
|
|
@@ -888,8 +886,8 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
888
886
|
cli: this.getAgentInitArgCliMetadata(),
|
|
889
887
|
handler: async (args)=>{
|
|
890
888
|
const initArgs = this.extractAgentInitParam(args);
|
|
891
|
-
const reportSession = this.createNewCliReportSession();
|
|
892
|
-
this.
|
|
889
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
890
|
+
this.commitCliReportSession(reportSession);
|
|
893
891
|
if (this.agent) {
|
|
894
892
|
try {
|
|
895
893
|
await this.agent.destroy?.();
|
|
@@ -898,13 +896,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
898
896
|
}
|
|
899
897
|
this.agent = void 0;
|
|
900
898
|
}
|
|
901
|
-
|
|
902
|
-
try {
|
|
903
|
-
agent = await this.ensureAgent(initArgs);
|
|
904
|
-
} finally{
|
|
905
|
-
this.pendingReportFileName = void 0;
|
|
906
|
-
}
|
|
907
|
-
this.commitCliReportSession(reportSession);
|
|
899
|
+
const agent = await this.ensureAgent(initArgs);
|
|
908
900
|
const screenshot = await agent.interface.screenshotBase64();
|
|
909
901
|
return {
|
|
910
902
|
content: [
|
|
@@ -942,7 +934,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
942
934
|
];
|
|
943
935
|
}
|
|
944
936
|
constructor(...args){
|
|
945
|
-
super(...args), mcp_tools_define_property(this, "
|
|
937
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
946
938
|
namespace: 'computer',
|
|
947
939
|
shape: computerInitArgShape,
|
|
948
940
|
cli: {
|
|
@@ -955,7 +947,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
955
947
|
const tools = new ComputerMidsceneTools();
|
|
956
948
|
runToolsCLI(tools, 'midscene-computer', {
|
|
957
949
|
stripPrefix: 'computer_',
|
|
958
|
-
version: "1.7.6
|
|
950
|
+
version: "1.7.6",
|
|
959
951
|
extraCommands: createReportCliCommands()
|
|
960
952
|
}).catch((e)=>{
|
|
961
953
|
process.exit(reportCLIError(e));
|
package/dist/es/index.mjs
CHANGED
|
@@ -411,7 +411,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
411
411
|
}
|
|
412
412
|
async healthCheck() {
|
|
413
413
|
console.log('[HealthCheck] Starting health check...');
|
|
414
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
414
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
415
415
|
console.log('[HealthCheck] Taking screenshot...');
|
|
416
416
|
const screenshotTimeout = 15000;
|
|
417
417
|
let timeoutId;
|
|
@@ -1518,7 +1518,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1518
1518
|
}
|
|
1519
1519
|
if (this.agent) return this.agent;
|
|
1520
1520
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
1521
|
-
const
|
|
1521
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
1522
1522
|
const agentOpts = {
|
|
1523
1523
|
...displayId ? {
|
|
1524
1524
|
displayId
|
|
@@ -1526,9 +1526,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1526
1526
|
...void 0 !== headless ? {
|
|
1527
1527
|
headless
|
|
1528
1528
|
} : {},
|
|
1529
|
-
...
|
|
1530
|
-
reportFileName
|
|
1531
|
-
} : {}
|
|
1529
|
+
...reportOptions ?? {}
|
|
1532
1530
|
};
|
|
1533
1531
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
1534
1532
|
this.agent = agent;
|
|
@@ -1543,8 +1541,8 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1543
1541
|
cli: this.getAgentInitArgCliMetadata(),
|
|
1544
1542
|
handler: async (args)=>{
|
|
1545
1543
|
const initArgs = this.extractAgentInitParam(args);
|
|
1546
|
-
const reportSession = this.createNewCliReportSession();
|
|
1547
|
-
this.
|
|
1544
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
1545
|
+
this.commitCliReportSession(reportSession);
|
|
1548
1546
|
if (this.agent) {
|
|
1549
1547
|
try {
|
|
1550
1548
|
await this.agent.destroy?.();
|
|
@@ -1553,13 +1551,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1553
1551
|
}
|
|
1554
1552
|
this.agent = void 0;
|
|
1555
1553
|
}
|
|
1556
|
-
|
|
1557
|
-
try {
|
|
1558
|
-
agent = await this.ensureAgent(initArgs);
|
|
1559
|
-
} finally{
|
|
1560
|
-
this.pendingReportFileName = void 0;
|
|
1561
|
-
}
|
|
1562
|
-
this.commitCliReportSession(reportSession);
|
|
1554
|
+
const agent = await this.ensureAgent(initArgs);
|
|
1563
1555
|
const screenshot = await agent.interface.screenshotBase64();
|
|
1564
1556
|
return {
|
|
1565
1557
|
content: [
|
|
@@ -1597,7 +1589,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1597
1589
|
];
|
|
1598
1590
|
}
|
|
1599
1591
|
constructor(...args){
|
|
1600
|
-
super(...args), mcp_tools_define_property(this, "
|
|
1592
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
1601
1593
|
namespace: 'computer',
|
|
1602
1594
|
shape: computerInitArgShape,
|
|
1603
1595
|
cli: {
|
|
@@ -1608,7 +1600,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
1608
1600
|
}
|
|
1609
1601
|
}
|
|
1610
1602
|
function version() {
|
|
1611
|
-
const currentVersion = "1.7.6
|
|
1603
|
+
const currentVersion = "1.7.6";
|
|
1612
1604
|
console.log(`@midscene/computer v${currentVersion}`);
|
|
1613
1605
|
return currentVersion;
|
|
1614
1606
|
}
|
package/dist/es/mcp-server.mjs
CHANGED
|
@@ -411,7 +411,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
411
411
|
}
|
|
412
412
|
async healthCheck() {
|
|
413
413
|
console.log('[HealthCheck] Starting health check...');
|
|
414
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
414
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
415
415
|
console.log('[HealthCheck] Taking screenshot...');
|
|
416
416
|
const screenshotTimeout = 15000;
|
|
417
417
|
let timeoutId;
|
|
@@ -863,7 +863,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
863
863
|
}
|
|
864
864
|
if (this.agent) return this.agent;
|
|
865
865
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
866
|
-
const
|
|
866
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
867
867
|
const agentOpts = {
|
|
868
868
|
...displayId ? {
|
|
869
869
|
displayId
|
|
@@ -871,9 +871,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
871
871
|
...void 0 !== headless ? {
|
|
872
872
|
headless
|
|
873
873
|
} : {},
|
|
874
|
-
...
|
|
875
|
-
reportFileName
|
|
876
|
-
} : {}
|
|
874
|
+
...reportOptions ?? {}
|
|
877
875
|
};
|
|
878
876
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
879
877
|
this.agent = agent;
|
|
@@ -888,8 +886,8 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
888
886
|
cli: this.getAgentInitArgCliMetadata(),
|
|
889
887
|
handler: async (args)=>{
|
|
890
888
|
const initArgs = this.extractAgentInitParam(args);
|
|
891
|
-
const reportSession = this.createNewCliReportSession();
|
|
892
|
-
this.
|
|
889
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
890
|
+
this.commitCliReportSession(reportSession);
|
|
893
891
|
if (this.agent) {
|
|
894
892
|
try {
|
|
895
893
|
await this.agent.destroy?.();
|
|
@@ -898,13 +896,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
898
896
|
}
|
|
899
897
|
this.agent = void 0;
|
|
900
898
|
}
|
|
901
|
-
|
|
902
|
-
try {
|
|
903
|
-
agent = await this.ensureAgent(initArgs);
|
|
904
|
-
} finally{
|
|
905
|
-
this.pendingReportFileName = void 0;
|
|
906
|
-
}
|
|
907
|
-
this.commitCliReportSession(reportSession);
|
|
899
|
+
const agent = await this.ensureAgent(initArgs);
|
|
908
900
|
const screenshot = await agent.interface.screenshotBase64();
|
|
909
901
|
return {
|
|
910
902
|
content: [
|
|
@@ -942,7 +934,7 @@ class ComputerMidsceneTools extends BaseMidsceneTools {
|
|
|
942
934
|
];
|
|
943
935
|
}
|
|
944
936
|
constructor(...args){
|
|
945
|
-
super(...args), mcp_tools_define_property(this, "
|
|
937
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
946
938
|
namespace: 'computer',
|
|
947
939
|
shape: computerInitArgShape,
|
|
948
940
|
cli: {
|
|
@@ -959,7 +951,7 @@ class ComputerMCPServer extends BaseMCPServer {
|
|
|
959
951
|
constructor(toolsManager){
|
|
960
952
|
super({
|
|
961
953
|
name: '@midscene/computer-mcp',
|
|
962
|
-
version: "1.7.6
|
|
954
|
+
version: "1.7.6",
|
|
963
955
|
description: 'Control the computer desktop using natural language commands'
|
|
964
956
|
}, toolsManager);
|
|
965
957
|
}
|
package/dist/lib/cli.js
CHANGED
|
@@ -437,7 +437,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
437
437
|
}
|
|
438
438
|
async healthCheck() {
|
|
439
439
|
console.log('[HealthCheck] Starting health check...');
|
|
440
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
440
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
441
441
|
console.log('[HealthCheck] Taking screenshot...');
|
|
442
442
|
const screenshotTimeout = 15000;
|
|
443
443
|
let timeoutId;
|
|
@@ -891,7 +891,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
891
891
|
}
|
|
892
892
|
if (this.agent) return this.agent;
|
|
893
893
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
894
|
-
const
|
|
894
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
895
895
|
const agentOpts = {
|
|
896
896
|
...displayId ? {
|
|
897
897
|
displayId
|
|
@@ -899,9 +899,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
899
899
|
...void 0 !== headless ? {
|
|
900
900
|
headless
|
|
901
901
|
} : {},
|
|
902
|
-
...
|
|
903
|
-
reportFileName
|
|
904
|
-
} : {}
|
|
902
|
+
...reportOptions ?? {}
|
|
905
903
|
};
|
|
906
904
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
907
905
|
this.agent = agent;
|
|
@@ -916,8 +914,8 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
916
914
|
cli: this.getAgentInitArgCliMetadata(),
|
|
917
915
|
handler: async (args)=>{
|
|
918
916
|
const initArgs = this.extractAgentInitParam(args);
|
|
919
|
-
const reportSession = this.createNewCliReportSession();
|
|
920
|
-
this.
|
|
917
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
918
|
+
this.commitCliReportSession(reportSession);
|
|
921
919
|
if (this.agent) {
|
|
922
920
|
try {
|
|
923
921
|
await this.agent.destroy?.();
|
|
@@ -926,13 +924,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
926
924
|
}
|
|
927
925
|
this.agent = void 0;
|
|
928
926
|
}
|
|
929
|
-
|
|
930
|
-
try {
|
|
931
|
-
agent = await this.ensureAgent(initArgs);
|
|
932
|
-
} finally{
|
|
933
|
-
this.pendingReportFileName = void 0;
|
|
934
|
-
}
|
|
935
|
-
this.commitCliReportSession(reportSession);
|
|
927
|
+
const agent = await this.ensureAgent(initArgs);
|
|
936
928
|
const screenshot = await agent.interface.screenshotBase64();
|
|
937
929
|
return {
|
|
938
930
|
content: [
|
|
@@ -970,7 +962,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
970
962
|
];
|
|
971
963
|
}
|
|
972
964
|
constructor(...args){
|
|
973
|
-
super(...args), mcp_tools_define_property(this, "
|
|
965
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
974
966
|
namespace: 'computer',
|
|
975
967
|
shape: computerInitArgShape,
|
|
976
968
|
cli: {
|
|
@@ -983,7 +975,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
983
975
|
const tools = new ComputerMidsceneTools();
|
|
984
976
|
(0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-computer', {
|
|
985
977
|
stripPrefix: 'computer_',
|
|
986
|
-
version: "1.7.6
|
|
978
|
+
version: "1.7.6",
|
|
987
979
|
extraCommands: (0, core_namespaceObject.createReportCliCommands)()
|
|
988
980
|
}).catch((e)=>{
|
|
989
981
|
process.exit((0, cli_namespaceObject.reportCLIError)(e));
|
package/dist/lib/index.js
CHANGED
|
@@ -463,7 +463,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
463
463
|
}
|
|
464
464
|
async healthCheck() {
|
|
465
465
|
console.log('[HealthCheck] Starting health check...');
|
|
466
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
466
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
467
467
|
console.log('[HealthCheck] Taking screenshot...');
|
|
468
468
|
const screenshotTimeout = 15000;
|
|
469
469
|
let timeoutId;
|
|
@@ -1573,7 +1573,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1573
1573
|
}
|
|
1574
1574
|
if (this.agent) return this.agent;
|
|
1575
1575
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
1576
|
-
const
|
|
1576
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
1577
1577
|
const agentOpts = {
|
|
1578
1578
|
...displayId ? {
|
|
1579
1579
|
displayId
|
|
@@ -1581,9 +1581,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1581
1581
|
...void 0 !== headless ? {
|
|
1582
1582
|
headless
|
|
1583
1583
|
} : {},
|
|
1584
|
-
...
|
|
1585
|
-
reportFileName
|
|
1586
|
-
} : {}
|
|
1584
|
+
...reportOptions ?? {}
|
|
1587
1585
|
};
|
|
1588
1586
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
1589
1587
|
this.agent = agent;
|
|
@@ -1598,8 +1596,8 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1598
1596
|
cli: this.getAgentInitArgCliMetadata(),
|
|
1599
1597
|
handler: async (args)=>{
|
|
1600
1598
|
const initArgs = this.extractAgentInitParam(args);
|
|
1601
|
-
const reportSession = this.createNewCliReportSession();
|
|
1602
|
-
this.
|
|
1599
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
1600
|
+
this.commitCliReportSession(reportSession);
|
|
1603
1601
|
if (this.agent) {
|
|
1604
1602
|
try {
|
|
1605
1603
|
await this.agent.destroy?.();
|
|
@@ -1608,13 +1606,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1608
1606
|
}
|
|
1609
1607
|
this.agent = void 0;
|
|
1610
1608
|
}
|
|
1611
|
-
|
|
1612
|
-
try {
|
|
1613
|
-
agent = await this.ensureAgent(initArgs);
|
|
1614
|
-
} finally{
|
|
1615
|
-
this.pendingReportFileName = void 0;
|
|
1616
|
-
}
|
|
1617
|
-
this.commitCliReportSession(reportSession);
|
|
1609
|
+
const agent = await this.ensureAgent(initArgs);
|
|
1618
1610
|
const screenshot = await agent.interface.screenshotBase64();
|
|
1619
1611
|
return {
|
|
1620
1612
|
content: [
|
|
@@ -1652,7 +1644,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1652
1644
|
];
|
|
1653
1645
|
}
|
|
1654
1646
|
constructor(...args){
|
|
1655
|
-
super(...args), mcp_tools_define_property(this, "
|
|
1647
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
1656
1648
|
namespace: 'computer',
|
|
1657
1649
|
shape: computerInitArgShape,
|
|
1658
1650
|
cli: {
|
|
@@ -1664,7 +1656,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
1664
1656
|
}
|
|
1665
1657
|
const env_namespaceObject = require("@midscene/shared/env");
|
|
1666
1658
|
function version() {
|
|
1667
|
-
const currentVersion = "1.7.6
|
|
1659
|
+
const currentVersion = "1.7.6";
|
|
1668
1660
|
console.log(`@midscene/computer v${currentVersion}`);
|
|
1669
1661
|
return currentVersion;
|
|
1670
1662
|
}
|
package/dist/lib/mcp-server.js
CHANGED
|
@@ -452,7 +452,7 @@ Available Displays: ${displays.length > 0 ? displays.map((d)=>d.name).join(', ')
|
|
|
452
452
|
}
|
|
453
453
|
async healthCheck() {
|
|
454
454
|
console.log('[HealthCheck] Starting health check...');
|
|
455
|
-
console.log("[HealthCheck] @midscene/computer v1.7.6
|
|
455
|
+
console.log("[HealthCheck] @midscene/computer v1.7.6");
|
|
456
456
|
console.log('[HealthCheck] Taking screenshot...');
|
|
457
457
|
const screenshotTimeout = 15000;
|
|
458
458
|
let timeoutId;
|
|
@@ -907,7 +907,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
907
907
|
}
|
|
908
908
|
if (this.agent) return this.agent;
|
|
909
909
|
mcp_tools_debug('Creating Computer agent with displayId:', displayId || 'primary');
|
|
910
|
-
const
|
|
910
|
+
const reportOptions = this.readCliReportAgentOptions();
|
|
911
911
|
const agentOpts = {
|
|
912
912
|
...displayId ? {
|
|
913
913
|
displayId
|
|
@@ -915,9 +915,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
915
915
|
...void 0 !== headless ? {
|
|
916
916
|
headless
|
|
917
917
|
} : {},
|
|
918
|
-
...
|
|
919
|
-
reportFileName
|
|
920
|
-
} : {}
|
|
918
|
+
...reportOptions ?? {}
|
|
921
919
|
};
|
|
922
920
|
const agent = await agentFromComputer(Object.keys(agentOpts).length > 0 ? agentOpts : void 0);
|
|
923
921
|
this.agent = agent;
|
|
@@ -932,8 +930,8 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
932
930
|
cli: this.getAgentInitArgCliMetadata(),
|
|
933
931
|
handler: async (args)=>{
|
|
934
932
|
const initArgs = this.extractAgentInitParam(args);
|
|
935
|
-
const reportSession = this.createNewCliReportSession();
|
|
936
|
-
this.
|
|
933
|
+
const reportSession = this.createNewCliReportSession(initArgs?.displayId ?? 'primary');
|
|
934
|
+
this.commitCliReportSession(reportSession);
|
|
937
935
|
if (this.agent) {
|
|
938
936
|
try {
|
|
939
937
|
await this.agent.destroy?.();
|
|
@@ -942,13 +940,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
942
940
|
}
|
|
943
941
|
this.agent = void 0;
|
|
944
942
|
}
|
|
945
|
-
|
|
946
|
-
try {
|
|
947
|
-
agent = await this.ensureAgent(initArgs);
|
|
948
|
-
} finally{
|
|
949
|
-
this.pendingReportFileName = void 0;
|
|
950
|
-
}
|
|
951
|
-
this.commitCliReportSession(reportSession);
|
|
943
|
+
const agent = await this.ensureAgent(initArgs);
|
|
952
944
|
const screenshot = await agent.interface.screenshotBase64();
|
|
953
945
|
return {
|
|
954
946
|
content: [
|
|
@@ -986,7 +978,7 @@ class ComputerMidsceneTools extends base_tools_namespaceObject.BaseMidsceneTools
|
|
|
986
978
|
];
|
|
987
979
|
}
|
|
988
980
|
constructor(...args){
|
|
989
|
-
super(...args), mcp_tools_define_property(this, "
|
|
981
|
+
super(...args), mcp_tools_define_property(this, "initArgSpec", {
|
|
990
982
|
namespace: 'computer',
|
|
991
983
|
shape: computerInitArgShape,
|
|
992
984
|
cli: {
|
|
@@ -1003,7 +995,7 @@ class ComputerMCPServer extends mcp_namespaceObject.BaseMCPServer {
|
|
|
1003
995
|
constructor(toolsManager){
|
|
1004
996
|
super({
|
|
1005
997
|
name: '@midscene/computer-mcp',
|
|
1006
|
-
version: "1.7.6
|
|
998
|
+
version: "1.7.6",
|
|
1007
999
|
description: 'Control the computer desktop using natural language commands'
|
|
1008
1000
|
}, toolsManager);
|
|
1009
1001
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -129,7 +129,6 @@ export declare type ComputerInterface = ComputerDevice | RDPDevice;
|
|
|
129
129
|
*/
|
|
130
130
|
export declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAgent, ComputerInitArgs> {
|
|
131
131
|
protected getCliReportSessionName(): string;
|
|
132
|
-
private pendingReportFileName?;
|
|
133
132
|
protected readonly initArgSpec: InitArgSpec<ComputerInitArgs>;
|
|
134
133
|
protected createTemporaryDevice(): ComputerDevice;
|
|
135
134
|
protected ensureAgent(opts?: ComputerInitArgs): Promise<ComputerAgent>;
|
|
@@ -104,7 +104,6 @@ export declare class ComputerMCPServer extends BaseMCPServer {
|
|
|
104
104
|
*/
|
|
105
105
|
declare class ComputerMidsceneTools extends BaseMidsceneTools<ComputerAgent, ComputerInitArgs> {
|
|
106
106
|
protected getCliReportSessionName(): string;
|
|
107
|
-
private pendingReportFileName?;
|
|
108
107
|
protected readonly initArgSpec: InitArgSpec<ComputerInitArgs>;
|
|
109
108
|
protected createTemporaryDevice(): ComputerDevice;
|
|
110
109
|
protected ensureAgent(opts?: ComputerInitArgs): Promise<ComputerAgent>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/computer",
|
|
3
|
-
"version": "1.7.6
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "Midscene.js Computer Desktop Automation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@computer-use/libnut": "^4.2.0",
|
|
39
39
|
"clipboardy": "^4.0.0",
|
|
40
40
|
"screenshot-desktop": "^1.15.3",
|
|
41
|
-
"@midscene/core": "1.7.6
|
|
42
|
-
"@midscene/shared": "1.7.6
|
|
41
|
+
"@midscene/core": "1.7.6",
|
|
42
|
+
"@midscene/shared": "1.7.6"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
45
|
"node-mac-permissions": "2.5.0"
|