@aitos/bridge-desktop 1.0.0
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/exec.d.ts +25 -0
- package/dist/exec.d.ts.map +1 -0
- package/dist/exec.js +50 -0
- package/dist/exec.js.map +1 -0
- package/dist/file.d.ts +82 -0
- package/dist/file.d.ts.map +1 -0
- package/dist/file.js +126 -0
- package/dist/file.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/dist/exec.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Context, Result } from '@aitos/core';
|
|
2
|
+
import { BridgeAtom } from '@aitos/bridge';
|
|
3
|
+
declare class ExecCommandAtom extends BridgeAtom {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
meta: {
|
|
7
|
+
input: {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}[];
|
|
12
|
+
output: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
execute(input: {
|
|
18
|
+
command: string;
|
|
19
|
+
args?: string[];
|
|
20
|
+
cwd?: string;
|
|
21
|
+
}, context: Context): Promise<Result>;
|
|
22
|
+
}
|
|
23
|
+
export declare const execCommandAtom: ExecCommandAtom;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,cAAM,eAAgB,SAAQ,UAAU;IACtC,IAAI,SAAiB;IACrB,OAAO,SAAW;IAClB,IAAI;;;;;;;;;;MAOF;IAEI,OAAO,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;CA8B5G;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
|
package/dist/exec.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execCommandAtom = void 0;
|
|
4
|
+
const bridge_1 = require("@aitos/bridge");
|
|
5
|
+
class ExecCommandAtom extends bridge_1.BridgeAtom {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'execCommand';
|
|
9
|
+
this.version = '1.0.0';
|
|
10
|
+
this.meta = {
|
|
11
|
+
input: [
|
|
12
|
+
{ name: 'command', type: 'string', description: 'Command to execute on the system' },
|
|
13
|
+
{ name: 'args', type: 'array', description: 'Command arguments (optional)' },
|
|
14
|
+
{ name: 'cwd', type: 'string', description: 'Working directory (optional)' }
|
|
15
|
+
],
|
|
16
|
+
output: { type: 'object', description: 'Execution result with stdout, stderr, and exitCode' }
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
async execute(input, context) {
|
|
20
|
+
if (!this.isAvailable()) {
|
|
21
|
+
return {
|
|
22
|
+
success: false,
|
|
23
|
+
error: 'Bridge not available. This atom requires desktop environment.'
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const result = await this.callBridge('exec', {
|
|
28
|
+
command: input.command,
|
|
29
|
+
args: input.args || [],
|
|
30
|
+
cwd: input.cwd
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
success: true,
|
|
34
|
+
data: {
|
|
35
|
+
stdout: result.stdout || '',
|
|
36
|
+
stderr: result.stderr || '',
|
|
37
|
+
exitCode: result.exitCode ?? 0
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
error: `Failed to execute command: ${error}`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.execCommandAtom = new ExecCommandAtom();
|
|
50
|
+
//# sourceMappingURL=exec.js.map
|
package/dist/exec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec.js","sourceRoot":"","sources":["../exec.ts"],"names":[],"mappings":";;;AACA,0CAA2C;AAE3C,MAAM,eAAgB,SAAQ,mBAAU;IAAxC;;QACE,SAAI,GAAG,aAAa,CAAC;QACrB,YAAO,GAAG,OAAO,CAAC;QAClB,SAAI,GAAG;YACL,KAAK,EAAE;gBACL,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;gBACpF,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE;gBAC5E,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;aAC7E;YACD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oDAAoD,EAAE;SAC9F,CAAC;IAgCJ,CAAC;IA9BC,KAAK,CAAC,OAAO,CAAC,KAAyD,EAAE,OAAgB;QACvF,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,+DAA+D;aACvE,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAC3C,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;gBACtB,GAAG,EAAE,KAAK,CAAC,GAAG;aACf,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE;oBACJ,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;oBAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;oBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;iBAC/B;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,8BAA8B,KAAK,EAAE;aAC7C,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAEY,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
package/dist/file.d.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Context, Result } from '@aitos/core';
|
|
2
|
+
import { BridgeAtom } from '@aitos/bridge';
|
|
3
|
+
declare class ReadLocalAtom extends BridgeAtom {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
meta: {
|
|
7
|
+
input: {
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}[];
|
|
12
|
+
output: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
execute(input: {
|
|
18
|
+
key: string;
|
|
19
|
+
}, context: Context): Promise<Result>;
|
|
20
|
+
}
|
|
21
|
+
declare class WriteLocalAtom extends BridgeAtom {
|
|
22
|
+
name: string;
|
|
23
|
+
version: string;
|
|
24
|
+
meta: {
|
|
25
|
+
input: {
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
}[];
|
|
30
|
+
output: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
execute(input: {
|
|
36
|
+
key: string;
|
|
37
|
+
value: any;
|
|
38
|
+
}, context: Context): Promise<Result>;
|
|
39
|
+
}
|
|
40
|
+
declare class ListLocalAtom extends BridgeAtom {
|
|
41
|
+
name: string;
|
|
42
|
+
version: string;
|
|
43
|
+
meta: {
|
|
44
|
+
input: {
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
optional: boolean;
|
|
49
|
+
}[];
|
|
50
|
+
output: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
execute(input: {
|
|
56
|
+
scope?: string;
|
|
57
|
+
}, context: Context): Promise<Result>;
|
|
58
|
+
}
|
|
59
|
+
declare class RemoveLocalAtom extends BridgeAtom {
|
|
60
|
+
name: string;
|
|
61
|
+
version: string;
|
|
62
|
+
meta: {
|
|
63
|
+
input: {
|
|
64
|
+
name: string;
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
}[];
|
|
68
|
+
output: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
execute(input: {
|
|
74
|
+
key: string;
|
|
75
|
+
}, context: Context): Promise<Result>;
|
|
76
|
+
}
|
|
77
|
+
export declare const readLocalAtom: ReadLocalAtom;
|
|
78
|
+
export declare const writeLocalAtom: WriteLocalAtom;
|
|
79
|
+
export declare const listLocalAtom: ListLocalAtom;
|
|
80
|
+
export declare const removeLocalAtom: RemoveLocalAtom;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../file.ts"],"names":[],"mappings":"AAAA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@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeLocalAtom = exports.listLocalAtom = exports.writeLocalAtom = exports.readLocalAtom = void 0;
|
|
4
|
+
const bridge_1 = require("@aitos/bridge");
|
|
5
|
+
class ReadLocalAtom extends bridge_1.BridgeAtom {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = 'readLocal';
|
|
9
|
+
this.version = '1.0.1';
|
|
10
|
+
this.meta = {
|
|
11
|
+
input: [
|
|
12
|
+
{ name: 'key', type: 'string', description: 'Local data key (path relative to storage)' }
|
|
13
|
+
],
|
|
14
|
+
output: { type: 'any', description: 'Stored data (parsed from JSON if applicable), null if not found' }
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
async execute(input, context) {
|
|
18
|
+
if (!this.isAvailable()) {
|
|
19
|
+
return { success: false, error: 'Bridge not available. This atom requires desktop environment.' };
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const result = await this.callBridge('readLocal', { key: input.key });
|
|
23
|
+
if (!result.success) {
|
|
24
|
+
return { success: true, data: null };
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(result.value);
|
|
28
|
+
return { success: true, data: parsed };
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return { success: true, data: result.value };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return { success: true, data: null };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
class WriteLocalAtom extends bridge_1.BridgeAtom {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.name = 'writeLocal';
|
|
43
|
+
this.version = '1.0.0';
|
|
44
|
+
this.meta = {
|
|
45
|
+
input: [
|
|
46
|
+
{ name: 'key', type: 'string', description: 'Local data key (path relative to storage)' },
|
|
47
|
+
{ name: 'value', type: 'any', description: 'Data to store (object will be JSON stringified)' }
|
|
48
|
+
],
|
|
49
|
+
output: { type: 'boolean', description: 'true if stored successfully' }
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
async execute(input, context) {
|
|
53
|
+
if (!this.isAvailable()) {
|
|
54
|
+
return { success: false, error: 'Bridge not available. This atom requires desktop environment.' };
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
let contentStr;
|
|
58
|
+
if (typeof input.value === 'string') {
|
|
59
|
+
contentStr = input.value;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
contentStr = JSON.stringify(input.value, null, 2);
|
|
63
|
+
}
|
|
64
|
+
await this.callBridge('writeLocal', { key: input.key, value: contentStr });
|
|
65
|
+
return { success: true, data: true };
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
return { success: false, error: `Failed to write local data: ${error}` };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
class ListLocalAtom extends bridge_1.BridgeAtom {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
this.name = 'listLocal';
|
|
76
|
+
this.version = '1.0.0';
|
|
77
|
+
this.meta = {
|
|
78
|
+
input: [
|
|
79
|
+
{ name: 'scope', type: 'string', description: 'Scope to list (empty for all)', optional: true }
|
|
80
|
+
],
|
|
81
|
+
output: { type: 'array', description: 'Array of available keys' }
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
async execute(input, context) {
|
|
85
|
+
if (!this.isAvailable()) {
|
|
86
|
+
return { success: false, error: 'Bridge not available. This atom requires desktop environment.' };
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
const result = await this.callBridge('listLocal', { scope: input.scope || '' });
|
|
90
|
+
return { success: true, data: result.keys || [] };
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return { success: true, data: [] };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class RemoveLocalAtom extends bridge_1.BridgeAtom {
|
|
98
|
+
constructor() {
|
|
99
|
+
super(...arguments);
|
|
100
|
+
this.name = 'removeLocal';
|
|
101
|
+
this.version = '1.0.0';
|
|
102
|
+
this.meta = {
|
|
103
|
+
input: [
|
|
104
|
+
{ name: 'key', type: 'string', description: 'Local data key to remove' }
|
|
105
|
+
],
|
|
106
|
+
output: { type: 'boolean', description: 'true if removed successfully' }
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
async execute(input, context) {
|
|
110
|
+
if (!this.isAvailable()) {
|
|
111
|
+
return { success: false, error: 'Bridge not available. This atom requires desktop environment.' };
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
await this.callBridge('removeLocal', { key: input.key });
|
|
115
|
+
return { success: true, data: true };
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
return { success: false, error: `Failed to remove local data: ${error}` };
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.readLocalAtom = new ReadLocalAtom();
|
|
123
|
+
exports.writeLocalAtom = new WriteLocalAtom();
|
|
124
|
+
exports.listLocalAtom = new ListLocalAtom();
|
|
125
|
+
exports.removeLocalAtom = new RemoveLocalAtom();
|
|
126
|
+
//# sourceMappingURL=file.js.map
|
package/dist/file.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../file.ts"],"names":[],"mappings":";;;AACA,0CAA2C;AAE3C,MAAM,aAAc,SAAQ,mBAAU;IAAtC;;QACE,SAAI,GAAG,WAAW,CAAC;QACnB,YAAO,GAAG,OAAO,CAAC;QAClB,SAAI,GAAG;YACL,KAAK,EAAE;gBACL,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;aAC1F;YACD,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,WA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,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;YACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,gCAAgC,KAAK,EAAE,EAAE,CAAC;QAC5E,CAAC;IACH,CAAC;CACF;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AACpC,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AACtC,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;AACpC,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAInC,cAAc,eAAe,CAAC;AAE9B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAKvB,eAAO,MAAM,YAAY,EAAE,IAAI,EAM9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,IAAI,EAG1B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.allAtoms = exports.desktopAtoms = void 0;
|
|
18
|
+
const bridge_1 = require("@aitos/bridge");
|
|
19
|
+
__exportStar(require("@aitos/bridge"), exports);
|
|
20
|
+
__exportStar(require("./file"), exports);
|
|
21
|
+
__exportStar(require("./exec"), exports);
|
|
22
|
+
const file_1 = require("./file");
|
|
23
|
+
const exec_1 = require("./exec");
|
|
24
|
+
exports.desktopAtoms = [
|
|
25
|
+
file_1.readLocalAtom,
|
|
26
|
+
file_1.writeLocalAtom,
|
|
27
|
+
file_1.listLocalAtom,
|
|
28
|
+
file_1.removeLocalAtom,
|
|
29
|
+
exec_1.execCommandAtom,
|
|
30
|
+
];
|
|
31
|
+
exports.allAtoms = [
|
|
32
|
+
...bridge_1.allAtoms,
|
|
33
|
+
...exports.desktopAtoms,
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,0CAA4D;AAE5D,gDAA8B;AAE9B,yCAAuB;AACvB,yCAAuB;AAEvB,iCAAuF;AACvF,iCAAyC;AAE5B,QAAA,YAAY,GAAW;IAClC,oBAAa;IACb,qBAAc;IACd,oBAAa;IACb,sBAAe;IACf,sBAAe;CAChB,CAAC;AAEW,QAAA,QAAQ,GAAW;IAC9B,GAAG,iBAAe;IAClB,GAAG,oBAAY;CAChB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aitos/bridge-desktop",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AITOS desktop bridge atoms - unified bridge atoms for desktop environment",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"dev": "tsc --watch"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"aitos",
|
|
13
|
+
"bridge",
|
|
14
|
+
"desktop",
|
|
15
|
+
"capability"
|
|
16
|
+
],
|
|
17
|
+
"author": "AITOS Team",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@aitos/core": "^1.0.0",
|
|
24
|
+
"@aitos/bridge": "^1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@aitos/core": "file:../../../aitos",
|
|
28
|
+
"@aitos/bridge": "file:../bridge",
|
|
29
|
+
"typescript": "^5.0.0"
|
|
30
|
+
}
|
|
31
|
+
}
|