@minionry/sdk 0.4.23
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/LICENSE +14 -0
- package/README.md +8 -0
- package/dist/base64.d.ts +2 -0
- package/dist/base64.js +15 -0
- package/dist/cache.d.ts +22 -0
- package/dist/cache.js +79 -0
- package/dist/cdn/v1.js +16 -0
- package/dist/detect.d.ts +8 -0
- package/dist/detect.js +73 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +11 -0
- package/dist/keyboard.d.ts +6 -0
- package/dist/keyboard.js +39 -0
- package/dist/protocol.d.ts +61 -0
- package/dist/protocol.js +15 -0
- package/dist/provider.d.ts +3 -0
- package/dist/provider.js +1503 -0
- package/dist/transport.d.ts +73 -0
- package/dist/transport.js +1 -0
- package/dist/transports/mock.d.ts +29 -0
- package/dist/transports/mock.js +4286 -0
- package/dist/transports/post-message.d.ts +11 -0
- package/dist/transports/post-message.js +294 -0
- package/dist/types.d.ts +1967 -0
- package/dist/types.js +85 -0
- package/package.json +27 -0
package/dist/types.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export const SCOPES = [
|
|
2
|
+
'identity',
|
|
3
|
+
'storage',
|
|
4
|
+
'files:app',
|
|
5
|
+
'pm:read',
|
|
6
|
+
'agents:run',
|
|
7
|
+
'pm:write',
|
|
8
|
+
'files:workspace:read',
|
|
9
|
+
'files:workspace:write',
|
|
10
|
+
'notifications',
|
|
11
|
+
'pm:execute',
|
|
12
|
+
'pm:schedule',
|
|
13
|
+
'agents:sessions',
|
|
14
|
+
'browser:read',
|
|
15
|
+
'browser:control',
|
|
16
|
+
'settings:read',
|
|
17
|
+
'git:read',
|
|
18
|
+
'git:write',
|
|
19
|
+
'git:remote',
|
|
20
|
+
'terminal:read',
|
|
21
|
+
'terminal:exec',
|
|
22
|
+
'tools:serve',
|
|
23
|
+
'quality:read',
|
|
24
|
+
'quality:run',
|
|
25
|
+
'inference:run',
|
|
26
|
+
'endpoints:register',
|
|
27
|
+
];
|
|
28
|
+
export const SCOPE_RISK_TIERS = {
|
|
29
|
+
identity: 'low',
|
|
30
|
+
storage: 'low',
|
|
31
|
+
'files:app': 'low',
|
|
32
|
+
'pm:read': 'medium',
|
|
33
|
+
'agents:run': 'high',
|
|
34
|
+
'pm:write': 'high',
|
|
35
|
+
'files:workspace:read': 'high',
|
|
36
|
+
'files:workspace:write': 'critical',
|
|
37
|
+
notifications: 'medium',
|
|
38
|
+
'pm:execute': 'critical',
|
|
39
|
+
'pm:schedule': 'critical',
|
|
40
|
+
'agents:sessions': 'high',
|
|
41
|
+
'browser:read': 'high',
|
|
42
|
+
'browser:control': 'critical',
|
|
43
|
+
'settings:read': 'low',
|
|
44
|
+
'git:read': 'medium',
|
|
45
|
+
'git:write': 'high',
|
|
46
|
+
'git:remote': 'critical',
|
|
47
|
+
'terminal:read': 'high',
|
|
48
|
+
'terminal:exec': 'critical',
|
|
49
|
+
'tools:serve': 'medium',
|
|
50
|
+
'quality:read': 'low',
|
|
51
|
+
'quality:run': 'high',
|
|
52
|
+
'inference:run': 'high',
|
|
53
|
+
'endpoints:register': 'high',
|
|
54
|
+
};
|
|
55
|
+
export const MINIONRY_ERROR_CODES = [
|
|
56
|
+
'USER_REJECTED',
|
|
57
|
+
'SCOPE_DENIED',
|
|
58
|
+
'RATE_LIMITED',
|
|
59
|
+
'SPACE_DISCONNECTED',
|
|
60
|
+
'QUOTA_EXCEEDED',
|
|
61
|
+
'UNSUPPORTED',
|
|
62
|
+
'CANCELLED',
|
|
63
|
+
];
|
|
64
|
+
export class MinionryError extends Error {
|
|
65
|
+
code;
|
|
66
|
+
constructor(code, message) {
|
|
67
|
+
super(message ?? code);
|
|
68
|
+
this.name = 'MinionryError';
|
|
69
|
+
this.code = code;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export const AGENT_RUN_LIMITS = {
|
|
73
|
+
maxSystemPromptChars: 32_000,
|
|
74
|
+
maxTurns: 50,
|
|
75
|
+
maxSeconds: 1_800,
|
|
76
|
+
endpointsPerApp: 8,
|
|
77
|
+
maxTtlMs: 86_400_000,
|
|
78
|
+
};
|
|
79
|
+
export const AGENT_RUN_MODEL_SELECTIONS = ['quality'];
|
|
80
|
+
export const BROWSER_INPUT_MODIFIERS = {
|
|
81
|
+
alt: 1,
|
|
82
|
+
ctrl: 2,
|
|
83
|
+
meta: 4,
|
|
84
|
+
shift: 8,
|
|
85
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@minionry/sdk",
|
|
3
|
+
"version": "0.4.23",
|
|
4
|
+
"description": "Client library for apps that run inside Minionry.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/",
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"gitHead": "893155a8c2ffaa5fb372e615a3b13ccf53171e0e"
|
|
27
|
+
}
|