openbroker 1.9.3 → 1.9.5
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/CHANGELOG.md +17 -0
- package/README.md +31 -0
- package/SKILL.md +21 -4
- package/bin/cli.ts +4 -2
- package/dist/auto/cli.js +1 -1
- package/dist/auto/examples/price-alert.js +1 -1
- package/dist/auto/realtime.d.ts +45 -0
- package/dist/auto/realtime.d.ts.map +1 -0
- package/dist/auto/realtime.js +177 -0
- package/dist/auto/realtime.test.d.ts +2 -0
- package/dist/auto/realtime.test.d.ts.map +1 -0
- package/dist/auto/realtime.test.js +73 -0
- package/dist/auto/runtime.d.ts +3 -3
- package/dist/auto/runtime.d.ts.map +1 -1
- package/dist/auto/runtime.js +117 -45
- package/dist/auto/types.d.ts +2 -1
- package/dist/auto/types.d.ts.map +1 -1
- package/dist/core/client.d.ts +66 -1
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +141 -4
- package/dist/core/ws.d.ts +14 -2
- package/dist/core/ws.d.ts.map +1 -1
- package/dist/core/ws.js +53 -7
- package/dist/setup/install.js +100 -3
- package/dist/setup/package-catalog.d.ts +12 -0
- package/dist/setup/package-catalog.d.ts.map +1 -0
- package/dist/setup/package-catalog.js +36 -0
- package/dist/setup/package-catalog.test.d.ts +2 -0
- package/dist/setup/package-catalog.test.d.ts.map +1 -0
- package/dist/setup/package-catalog.test.js +31 -0
- package/package.json +5 -3
- package/scripts/auto/cli.ts +1 -1
- package/scripts/auto/examples/price-alert.ts +1 -1
- package/scripts/auto/realtime.test.ts +84 -0
- package/scripts/auto/realtime.ts +194 -0
- package/scripts/auto/runtime.ts +125 -47
- package/scripts/auto/types.ts +2 -1
- package/scripts/core/client.ts +175 -4
- package/scripts/core/ws.ts +57 -8
- package/scripts/setup/install.ts +110 -3
- package/scripts/setup/package-catalog.test.ts +50 -0
- package/scripts/setup/package-catalog.ts +49 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface InstallablePackage {
|
|
2
|
+
key: string;
|
|
3
|
+
aliases: string[];
|
|
4
|
+
packageName: string;
|
|
5
|
+
command: string;
|
|
6
|
+
description: string;
|
|
7
|
+
nextSteps: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const INSTALLABLE_PACKAGES: InstallablePackage[] = [
|
|
11
|
+
{
|
|
12
|
+
key: 'monitoring',
|
|
13
|
+
aliases: ['openbroker-monitoring'],
|
|
14
|
+
packageName: 'openbroker-monitoring',
|
|
15
|
+
command: 'openbroker-monitoring',
|
|
16
|
+
description: 'Local automation dashboard and optional audit observer',
|
|
17
|
+
nextSteps: [
|
|
18
|
+
'openbroker-monitoring serve --host 127.0.0.1 --port 3001',
|
|
19
|
+
'Open http://127.0.0.1:3001',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: 'extended',
|
|
24
|
+
aliases: ['openbroker-extended'],
|
|
25
|
+
packageName: 'openbroker-extended',
|
|
26
|
+
command: 'openbroker-ex',
|
|
27
|
+
description: 'Extended Exchange trading CLI and library',
|
|
28
|
+
nextSteps: [
|
|
29
|
+
'openbroker-ex --help',
|
|
30
|
+
'openbroker-ex setup',
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export function resolveInstallablePackage(input: string): InstallablePackage | null {
|
|
36
|
+
const normalized = input.trim().toLowerCase();
|
|
37
|
+
return INSTALLABLE_PACKAGES.find((entry) => (
|
|
38
|
+
entry.key === normalized
|
|
39
|
+
|| entry.packageName === normalized
|
|
40
|
+
|| entry.aliases.includes(normalized)
|
|
41
|
+
)) ?? null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function packageSpec(entry: InstallablePackage, tag = 'latest'): string {
|
|
45
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(tag)) {
|
|
46
|
+
throw new Error(`invalid package tag or version: ${tag}`);
|
|
47
|
+
}
|
|
48
|
+
return `${entry.packageName}@${tag}`;
|
|
49
|
+
}
|