@rebon/cli-win32-x64 1.2.0 → 1.4.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.
Files changed (98) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +10 -0
  3. package/README.md +203 -144
  4. package/THIRD_PARTY_NOTICES.txt +1232 -128
  5. package/bin/rebon.js +22 -22
  6. package/lib/windows-managed.js +390 -390
  7. package/package.json +9 -2
  8. package/payload/compose-runtime/package.json +17 -17
  9. package/payload/compose-runtime/payload/compose/shims/dsh-anonymous-user-id.js +10 -10
  10. package/payload/compose-runtime/payload/compose/shims/dsh-credentials.js +13 -13
  11. package/payload/compose-runtime/payload/compose/shims/dsh-launch-environment.js +21 -21
  12. package/payload/compose-runtime/payload/compose/shims/dsh-llm.js +313 -313
  13. package/payload/compose-runtime/payload/compose/shims/dsh-settings.js +43 -43
  14. package/payload/compose-runtime/payload/compose/shims/dsh-tools.js +20 -20
  15. package/payload/compose-runtime/payload/compose/shims/dsh-web.js +10 -10
  16. package/payload/compose-runtime/payload/compose/shims/llm-adapter.js +32 -32
  17. package/payload/compose-runtime/payload/compose/shims/zod-lite.js +49 -49
  18. package/payload/compose-runtime/payload/vendor/cordis/LICENSE +21 -0
  19. package/payload/compose-runtime/payload/vendor/cordis/index.js +1530 -1530
  20. package/payload/compose-runtime/payload/vendor/cosmokit/LICENSE +21 -21
  21. package/payload/compose-runtime/payload/vendor/cosmokit/index.mjs +357 -357
  22. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-agent +21 -21
  23. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-agent-loop +21 -21
  24. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-llm-core +21 -21
  25. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-llm-deepseek +21 -21
  26. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-logger-console +21 -21
  27. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-scope +21 -21
  28. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-session +21 -21
  29. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-system-prompt +21 -21
  30. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-timeout +21 -21
  31. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-timer +21 -21
  32. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tool-todo +21 -21
  33. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tool-web +21 -21
  34. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-tools-schema +21 -21
  35. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-turndown +21 -0
  36. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-turndown-plugin-gfm +21 -0
  37. package/payload/compose-runtime/payload/vendor/dsh/LICENSE-web-search-exa +21 -21
  38. package/payload/compose-runtime/payload/vendor/dsh/agent-loop.js +1193 -1193
  39. package/payload/compose-runtime/payload/vendor/dsh/agent.js +714 -714
  40. package/payload/compose-runtime/payload/vendor/dsh/llm-core.js +269 -269
  41. package/payload/compose-runtime/payload/vendor/dsh/llm-deepseek.js +672 -672
  42. package/payload/compose-runtime/payload/vendor/dsh/logger-console.js +83 -83
  43. package/payload/compose-runtime/payload/vendor/dsh/scope.js +287 -287
  44. package/payload/compose-runtime/payload/vendor/dsh/session.js +1668 -1668
  45. package/payload/compose-runtime/payload/vendor/dsh/system-prompt.js +309 -309
  46. package/payload/compose-runtime/payload/vendor/dsh/timeout.js +100 -100
  47. package/payload/compose-runtime/payload/vendor/dsh/timer.js +128 -128
  48. package/payload/compose-runtime/payload/vendor/dsh/tool-todo.js +143 -143
  49. package/payload/compose-runtime/payload/vendor/dsh/tool-web.js +1527 -1527
  50. package/payload/compose-runtime/payload/vendor/dsh/tools-schema.js +849 -849
  51. package/payload/compose-runtime/payload/vendor/dsh/web-search-exa.js +122 -122
  52. package/payload/compose-runtime/payload/vendor/eventsource-parser/LICENSE +21 -21
  53. package/payload/compose-runtime/payload/vendor/eventsource-parser/index.js +177 -177
  54. package/payload/compose-runtime/payload/vendor/eventsource-parser/stream.js +48 -48
  55. package/payload/compose-runtime/payload/vendor/schemastery/LICENSE +21 -0
  56. package/payload/compose-runtime/payload/vendor/schemastery/index.mjs +656 -656
  57. package/payload/compose-runtime/payload-manifests.json +48 -48
  58. package/payload/compose-runtime/src/bridge.mjs +193 -195
  59. package/payload/compose-runtime/src/credentials-runtime.mjs +50 -50
  60. package/payload/compose-runtime/src/eventsource-stream.mjs +48 -48
  61. package/payload/compose-runtime/src/index.mjs +7 -7
  62. package/payload/compose-runtime/src/llm-runtime.mjs +326 -326
  63. package/payload/compose-runtime/src/loader.mjs +78 -78
  64. package/payload/compose-runtime/src/loop-assembly.mjs +237 -237
  65. package/payload/compose-runtime/src/payload.mjs +49 -49
  66. package/payload/compose-runtime/src/plugin.mjs +59 -59
  67. package/payload/compose-runtime/src/realm.mjs +223 -223
  68. package/payload/compose-runtime/src/registry.mjs +191 -191
  69. package/payload/compose-runtime/src/resolve.mjs +115 -115
  70. package/payload/compose-runtime/src/systemprompt-runtime.mjs +67 -67
  71. package/payload/compose-runtime/src/tools-runtime.mjs +239 -239
  72. package/payload/compose-runtime/src/web-runtime.mjs +209 -209
  73. package/payload/plugin-host/package.json +11 -11
  74. package/payload/plugin-host/src/bridge.mjs +64 -64
  75. package/payload/plugin-host/src/cli.mjs +147 -147
  76. package/payload/plugin-host/src/framing.mjs +113 -113
  77. package/payload/plugin-host/src/host.mjs +691 -691
  78. package/payload/plugin-host/src/json.mjs +208 -208
  79. package/payload/plugin-host/src/lifecycle.mjs +114 -114
  80. package/payload/plugin-host/src/loader.mjs +183 -183
  81. package/payload/plugin-host/src/methods.mjs +377 -377
  82. package/payload/plugin-host/src/ownership.mjs +57 -57
  83. package/payload/plugin-host/src/protocol.mjs +129 -129
  84. package/payload/plugin-host/src/sdk.mjs +7 -7
  85. package/payload/rebon-boa-helper.exe +0 -0
  86. package/payload/rebon-browser-mcp.exe +0 -0
  87. package/payload/rebon-computer-use.exe +0 -0
  88. package/payload/rebon-lsp-mcp.exe +0 -0
  89. package/payload/rebon.exe +2 -2
  90. package/payload/sandbox-win.exe +0 -0
  91. package/scripts/postinstall.js +112 -112
  92. package/payload/compose-runtime/payload/compose/credentials-runtime.js +0 -38
  93. package/payload/compose-runtime/payload/compose/llm-runtime.js +0 -330
  94. package/payload/compose-runtime/payload/compose/loop-assembly.js +0 -149
  95. package/payload/compose-runtime/payload/compose/serve-dispatch.js +0 -82
  96. package/payload/compose-runtime/payload/compose/systemprompt-runtime.js +0 -74
  97. package/payload/compose-runtime/payload/compose/tools-runtime.js +0 -228
  98. package/payload/compose-runtime/payload/compose/web-runtime.js +0 -204
@@ -1,49 +1,49 @@
1
- // Where the vendored JS payload lives.
2
- //
3
- // The payload — Cordis, cosmokit, schemastery and the dsh package set — is this
4
- // package's own, in `payload/`. It used to be owned by `crates/rebon-kernel-js`
5
- // and pointed at from here, because the deno_core host was what shipped and two
6
- // copies of a 600KB vendored tree would diverge. V8 is gone, so the tree moved
7
- // next to its runtime and this file is the only one that changed.
8
- //
9
- // `vendor/cordis/index.js` is the sentinel, for the same reason `bridge.js`
10
- // is on the Rust side: every consumer loads it, so a directory without it is
11
- // not a payload.
12
- import fs from 'node:fs';
13
- import path from 'node:path';
14
- import { fileURLToPath } from 'node:url';
15
-
16
- const SENTINEL = path.join('vendor', 'cordis', 'index.js');
17
- const here = path.dirname(fileURLToPath(import.meta.url));
18
-
19
- const holdsPayload = (dir) => fs.existsSync(path.join(dir, SENTINEL));
20
-
21
- /// The payload directory, or a refusal naming what was tried.
22
- ///
23
- /// A ladder, not a search — the same rule `REBON_PLUGIN_NODE` follows on the
24
- /// Rust side. `REBON_KERNEL_JS_DIR` is an explicit demand: if what it names
25
- /// does not hold a payload, that is the answer, not a reason to go looking
26
- /// somewhere else. Falling back would run the composition against a payload
27
- /// the operator did not choose and never told them.
28
- ///
29
- /// Without the override there is one place it can be: `payload/` inside this
30
- /// package, in a checkout and in a deployment alike.
31
- ///
32
- /// Throws rather than returning a guess, because every module specifier the
33
- /// composition resolves is built from this path — a wrong one surfaces later
34
- /// as two dozen unrelated "cannot find module" errors.
35
- export function payloadDir() {
36
- const override = process.env.REBON_KERNEL_JS_DIR;
37
- if (override) {
38
- if (holdsPayload(override)) return path.resolve(override);
39
- throw new Error(
40
- `[NO_PAYLOAD] REBON_KERNEL_JS_DIR names ${override}, which does not hold ${SENTINEL}`,
41
- );
42
- }
43
- const beside = path.join(here, '..', 'payload');
44
- if (holdsPayload(beside)) return path.resolve(beside);
45
- throw new Error(
46
- `[NO_PAYLOAD] no vendored JS payload found (looked for ${SENTINEL} under ${beside}); `
47
- + 'set REBON_KERNEL_JS_DIR to the directory holding it',
48
- );
49
- }
1
+ // Where the vendored JS payload lives.
2
+ //
3
+ // The payload — Cordis, cosmokit, schemastery and the dsh package set — is this
4
+ // package's own, in `payload/`. It used to be owned by `crates/rebon-kernel-js`
5
+ // and pointed at from here, because the deno_core host was what shipped and two
6
+ // copies of a 600KB vendored tree would diverge. V8 is gone, so the tree moved
7
+ // next to its runtime and this file is the only one that changed.
8
+ //
9
+ // `vendor/cordis/index.js` is the sentinel, for the same reason `bridge.js`
10
+ // is on the Rust side: every consumer loads it, so a directory without it is
11
+ // not a payload.
12
+ import fs from 'node:fs';
13
+ import path from 'node:path';
14
+ import { fileURLToPath } from 'node:url';
15
+
16
+ const SENTINEL = path.join('vendor', 'cordis', 'index.js');
17
+ const here = path.dirname(fileURLToPath(import.meta.url));
18
+
19
+ const holdsPayload = (dir) => fs.existsSync(path.join(dir, SENTINEL));
20
+
21
+ /// The payload directory, or a refusal naming what was tried.
22
+ ///
23
+ /// A ladder, not a search — the same rule `REBON_PLUGIN_NODE` follows on the
24
+ /// Rust side. `REBON_KERNEL_JS_DIR` is an explicit demand: if what it names
25
+ /// does not hold a payload, that is the answer, not a reason to go looking
26
+ /// somewhere else. Falling back would run the composition against a payload
27
+ /// the operator did not choose and never told them.
28
+ ///
29
+ /// Without the override there is one place it can be: `payload/` inside this
30
+ /// package, in a checkout and in a deployment alike.
31
+ ///
32
+ /// Throws rather than returning a guess, because every module specifier the
33
+ /// composition resolves is built from this path — a wrong one surfaces later
34
+ /// as two dozen unrelated "cannot find module" errors.
35
+ export function payloadDir() {
36
+ const override = process.env.REBON_KERNEL_JS_DIR;
37
+ if (override) {
38
+ if (holdsPayload(override)) return path.resolve(override);
39
+ throw new Error(
40
+ `[NO_PAYLOAD] REBON_KERNEL_JS_DIR names ${override}, which does not hold ${SENTINEL}`,
41
+ );
42
+ }
43
+ const beside = path.join(here, '..', 'payload');
44
+ if (holdsPayload(beside)) return path.resolve(beside);
45
+ throw new Error(
46
+ `[NO_PAYLOAD] no vendored JS payload found (looked for ${SENTINEL} under ${beside}); `
47
+ + 'set REBON_KERNEL_JS_DIR to the directory holding it',
48
+ );
49
+ }
@@ -1,59 +1,59 @@
1
- // The composition control plugin.
2
- //
3
- // rebon loads this one first, and everything else the composition contains is
4
- // loaded after it, as an ordinary `plugin/load` each. What this one does is
5
- // make that possible: install module resolution for the vendored payload,
6
- // create the shared Cordis realm the entries mount into, and answer for the
7
- // facts the protocol has no field for.
8
- //
9
- // **Why the structure lives in this plugin's config.** Groups and `isolate` are
10
- // composition structure, not plugin facts: a group is a container that is not a
11
- // module, and an isolated realm is a relationship between entries. Neither can
12
- // be said in one entry's own load request, so rebon says it once, here, naming
13
- // only ids and placement. Each entry's `plugin/load` then carries its module
14
- // and its own configuration.
15
- //
16
- // Module resolution has to be installed before Cordis is imported, and static
17
- // imports are linked before a module body runs — which is why everything below
18
- // is imported dynamically. Only Node's own builtins, which need no resolution,
19
- // could be static, and none are needed.
20
- export async function activate(api, config = {}) {
21
- const { installModuleResolution } = await import('./resolve.mjs');
22
- installModuleResolution({
23
- ...(config.payloadDir ? { dir: config.payloadDir } : {}),
24
- extraModules: config.modules ?? {},
25
- });
26
-
27
- const { withCall } = await import('./bridge.mjs');
28
- const { builtinSeats, createRealm, mounted, reportFor } = await import('./realm.mjs');
29
- await createRealm({ web: config.web ?? null, entries: config.entries ?? [] });
30
-
31
- // Registered before any entry is loaded, so an entry claiming the same
32
- // service name hits the registrar's refusal rather than replacing this.
33
- //
34
- // What it answers is the part of a load report the protocol cannot carry: a
35
- // route's model catalog, a prompt section, a web provider. Those belong to
36
- // one plugin kind, and the ready report is a shape every plugin shares — so
37
- // they are asked for rather than bolted on.
38
- api.service('compose', async (request, ctx) => withCall(ctx, async () => {
39
- const kind = request?.kind;
40
- if (kind === 'list') {
41
- return { plugins: mounted(), builtin: builtinSeats() };
42
- }
43
- if (kind === 'report') {
44
- const pluginId = String(request?.pluginId ?? '');
45
- const report = reportFor(pluginId);
46
- if (report === undefined) {
47
- const error = new Error(`no composition entry ${JSON.stringify(pluginId)} is mounted`);
48
- error.code = '[UNKNOWN_PLUGIN]';
49
- throw error;
50
- }
51
- return report;
52
- }
53
- const error = new Error(`compose does not answer kind ${JSON.stringify(kind ?? null)}`);
54
- error.code = '[UNKNOWN_CONTROL]';
55
- throw error;
56
- }));
57
- }
58
-
59
- export default activate;
1
+ // The composition control plugin.
2
+ //
3
+ // rebon loads this one first, and everything else the composition contains is
4
+ // loaded after it, as an ordinary `plugin/load` each. What this one does is
5
+ // make that possible: install module resolution for the vendored payload,
6
+ // create the shared Cordis realm the entries mount into, and answer for the
7
+ // facts the protocol has no field for.
8
+ //
9
+ // **Why the structure lives in this plugin's config.** Groups and `isolate` are
10
+ // composition structure, not plugin facts: a group is a container that is not a
11
+ // module, and an isolated realm is a relationship between entries. Neither can
12
+ // be said in one entry's own load request, so rebon says it once, here, naming
13
+ // only ids and placement. Each entry's `plugin/load` then carries its module
14
+ // and its own configuration.
15
+ //
16
+ // Module resolution has to be installed before Cordis is imported, and static
17
+ // imports are linked before a module body runs — which is why everything below
18
+ // is imported dynamically. Only Node's own builtins, which need no resolution,
19
+ // could be static, and none are needed.
20
+ export async function activate(api, config = {}) {
21
+ const { installModuleResolution } = await import('./resolve.mjs');
22
+ installModuleResolution({
23
+ ...(config.payloadDir ? { dir: config.payloadDir } : {}),
24
+ extraModules: config.modules ?? {},
25
+ });
26
+
27
+ const { withCall } = await import('./bridge.mjs');
28
+ const { builtinSeats, createRealm, mounted, reportFor } = await import('./realm.mjs');
29
+ await createRealm({ web: config.web ?? null, entries: config.entries ?? [] });
30
+
31
+ // Registered before any entry is loaded, so an entry claiming the same
32
+ // service name hits the registrar's refusal rather than replacing this.
33
+ //
34
+ // What it answers is the part of a load report the protocol cannot carry: a
35
+ // route's model catalog, a prompt section, a web provider. Those belong to
36
+ // one plugin kind, and the ready report is a shape every plugin shares — so
37
+ // they are asked for rather than bolted on.
38
+ api.service('compose', async (request, ctx) => withCall(ctx, async () => {
39
+ const kind = request?.kind;
40
+ if (kind === 'list') {
41
+ return { plugins: mounted(), builtin: builtinSeats() };
42
+ }
43
+ if (kind === 'report') {
44
+ const pluginId = String(request?.pluginId ?? '');
45
+ const report = reportFor(pluginId);
46
+ if (report === undefined) {
47
+ const error = new Error(`no composition entry ${JSON.stringify(pluginId)} is mounted`);
48
+ error.code = '[UNKNOWN_PLUGIN]';
49
+ throw error;
50
+ }
51
+ return report;
52
+ }
53
+ const error = new Error(`compose does not answer kind ${JSON.stringify(kind ?? null)}`);
54
+ error.code = '[UNKNOWN_CONTROL]';
55
+ throw error;
56
+ }));
57
+ }
58
+
59
+ export default activate;