@venturewild/workspace 0.6.1 → 0.6.2
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 +21 -21
- package/README.md +112 -112
- package/package.json +85 -85
- package/server/bin/wild-workspace.mjs +1096 -1096
- package/server/src/account.mjs +114 -114
- package/server/src/agent-login.mjs +146 -146
- package/server/src/agent-readiness.mjs +200 -200
- package/server/src/agent.mjs +468 -468
- package/server/src/bazaar/core.mjs +974 -974
- package/server/src/bazaar/index.mjs +88 -88
- package/server/src/bazaar/mcp-server.mjs +429 -429
- package/server/src/bazaar/mock-tickup.mjs +97 -97
- package/server/src/bazaar/preview-server.mjs +95 -95
- package/server/src/bazaar/seed-recipes/customer-feedback-form/know-how.md +23 -23
- package/server/src/bazaar/seed-recipes/customer-feedback-form/recipe.json +24 -24
- package/server/src/bazaar/seed-recipes/landing-page-launch/know-how.md +29 -29
- package/server/src/bazaar/seed-recipes/landing-page-launch/recipe.json +25 -25
- package/server/src/bazaar/seed-recipes/personal-portfolio/know-how.md +21 -21
- package/server/src/bazaar/seed-recipes/personal-portfolio/recipe.json +24 -24
- package/server/src/bazaar/seed-recipes/receipt-sorter/know-how.md +31 -31
- package/server/src/bazaar/seed-recipes/receipt-sorter/recipe.json +25 -25
- package/server/src/bazaar/seed-recipes/tickup-hr-matching/know-how.md +79 -79
- package/server/src/bazaar/seed-recipes/tickup-hr-matching/recipe.json +40 -40
- package/server/src/canvas/core.mjs +446 -446
- package/server/src/canvas/index.mjs +42 -42
- package/server/src/canvas/mcp-server.mjs +253 -253
- package/server/src/canvas-rails.mjs +108 -108
- package/server/src/config.mjs +404 -404
- package/server/src/daemon-bin.mjs +110 -110
- package/server/src/daemon-supervisor.mjs +285 -285
- package/server/src/doctor.mjs +375 -375
- package/server/src/inbox.mjs +86 -86
- package/server/src/index.mjs +3332 -3332
- package/server/src/listings-rails.mjs +156 -156
- package/server/src/logpaths.mjs +98 -98
- package/server/src/observability.mjs +45 -45
- package/server/src/operator.mjs +92 -92
- package/server/src/pairing.mjs +137 -137
- package/server/src/service.mjs +515 -515
- package/server/src/session-reporter.mjs +201 -201
- package/server/src/settings.mjs +145 -145
- package/server/src/share.mjs +182 -182
- package/server/src/skills.mjs +213 -213
- package/server/src/supervisor.mjs +647 -647
- package/server/src/support-consent.mjs +133 -133
- package/server/src/sync.mjs +248 -248
- package/server/src/transcript.mjs +121 -121
- package/server/src/turn-mcp.mjs +46 -46
- package/server/src/usage.mjs +405 -405
- package/server/src/workspace-registry.mjs +295 -295
- package/server/src/workspaces.mjs +145 -145
- package/web/dist/assets/index-BgFan7ls.js +131 -0
- package/web/dist/assets/index-DHts78rO.css +32 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CzUrGoMW.css +0 -32
- package/web/dist/assets/index-ZYLNuQRa.js +0 -131
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
// Locates the bmo-sync-daemon binary for the current platform.
|
|
2
|
-
//
|
|
3
|
-
// wild-workspace ships the daemon as a per-platform npm subpackage
|
|
4
|
-
// (@venturewild/workspace-daemon-<tag>, biome pattern). The resolver walks a
|
|
5
|
-
// lookup chain so it works both in development (a locally built binary in
|
|
6
|
-
// vendor/ or on PATH) and in a published install (the platform subpackage).
|
|
7
|
-
|
|
8
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
import url from 'node:url';
|
|
11
|
-
import { createRequire } from 'node:module';
|
|
12
|
-
|
|
13
|
-
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
14
|
-
const require = createRequire(import.meta.url);
|
|
15
|
-
|
|
16
|
-
/** `<platform>-<arch>` token, e.g. `win32-x64`, `darwin-arm64`, `linux-x64`. */
|
|
17
|
-
export function platformTag() {
|
|
18
|
-
return `${process.platform}-${process.arch}`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Daemon binary file name for the current platform. */
|
|
22
|
-
export function daemonBinaryName() {
|
|
23
|
-
return process.platform === 'win32' ? 'bmo-sync-daemon.exe' : 'bmo-sync-daemon';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Resolve the daemon binary. Lookup order:
|
|
28
|
-
* 1. WILD_WORKSPACE_DAEMON_BIN — explicit override (must exist, or null).
|
|
29
|
-
* 2. the per-platform npm subpackage `@venturewild/workspace-daemon-<tag>`.
|
|
30
|
-
* 3. a local `vendor/bmo-sync-daemon-<tag>/<bin>` dir (dev builds land here).
|
|
31
|
-
* 4. the bare binary name — let the OS resolve it on PATH at spawn time.
|
|
32
|
-
*
|
|
33
|
-
* Returns `{ path, source }`. `source` is one of `env` | `subpackage` |
|
|
34
|
-
* `vendor` | `path`. Returns `null` only when an explicit override is set
|
|
35
|
-
* but missing — every other case falls through to the PATH last resort.
|
|
36
|
-
*
|
|
37
|
-
* @param {{ env?: NodeJS.ProcessEnv, vendorRoot?: string }} [opts]
|
|
38
|
-
*/
|
|
39
|
-
export function resolveDaemonBinary({ env = process.env, vendorRoot, requireResolve } = {}) {
|
|
40
|
-
const binName = daemonBinaryName();
|
|
41
|
-
const tag = platformTag();
|
|
42
|
-
// Injected seam: lets a test simulate "the platform subpackage isn't
|
|
43
|
-
// installed" deterministically, regardless of what's in this machine's
|
|
44
|
-
// node_modules (the win32-x64 subpackage IS present on a Windows dev box).
|
|
45
|
-
const resolvePkg = requireResolve || ((id) => require.resolve(id));
|
|
46
|
-
|
|
47
|
-
// 1. explicit override — if set but missing, that's an error, not a miss.
|
|
48
|
-
const override = env.WILD_WORKSPACE_DAEMON_BIN;
|
|
49
|
-
if (override) {
|
|
50
|
-
return existsSync(override) ? { path: override, source: 'env' } : null;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 2. per-platform npm subpackage — resolve via its package.json so the
|
|
54
|
-
// lookup doesn't depend on an `exports` map for the binary file.
|
|
55
|
-
try {
|
|
56
|
-
const pkgJson = resolvePkg(`@venturewild/workspace-daemon-${tag}/package.json`);
|
|
57
|
-
const candidate = path.join(path.dirname(pkgJson), binName);
|
|
58
|
-
if (existsSync(candidate)) return { path: candidate, source: 'subpackage' };
|
|
59
|
-
} catch {
|
|
60
|
-
// subpackage not installed — fall through
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// 3. local vendor dir (a dev build of the daemon drops the binary here).
|
|
64
|
-
const root = vendorRoot || path.resolve(__dirname, '..', '..', 'vendor');
|
|
65
|
-
const vendor = path.join(root, `bmo-sync-daemon-${tag}`, binName);
|
|
66
|
-
if (existsSync(vendor)) return { path: vendor, source: 'vendor' };
|
|
67
|
-
|
|
68
|
-
// 4. last resort — spawn by name and let PATH resolve it.
|
|
69
|
-
return { path: binName, source: 'path' };
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The version of the INSTALLED per-platform daemon subpackage (e.g. `"0.1.3"`),
|
|
74
|
-
* or null when it can't be determined (resolved via PATH/vendor, or not found).
|
|
75
|
-
* Used by the supervisor to detect a stale running daemon after an auto-update
|
|
76
|
-
* (the daemon's own /health doesn't report a version), so it can recycle it.
|
|
77
|
-
*/
|
|
78
|
-
export function resolveDaemonVersion({ env = process.env, requireResolve } = {}) {
|
|
79
|
-
const tag = platformTag();
|
|
80
|
-
const resolvePkg = requireResolve || ((id) => require.resolve(id));
|
|
81
|
-
try {
|
|
82
|
-
const pkgJson = resolvePkg(`@venturewild/workspace-daemon-${tag}/package.json`);
|
|
83
|
-
const parsed = JSON.parse(readFileSync(pkgJson, 'utf8'));
|
|
84
|
-
return typeof parsed.version === 'string' ? parsed.version : null;
|
|
85
|
-
} catch {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The daemon version the INSTALLED meta package PINS for this platform — read
|
|
92
|
-
* from the meta `package.json`'s optionalDependencies. This is the version
|
|
93
|
-
* `npm i -g @venturewild/workspace@<v>` is SUPPOSED to have pulled onto disk.
|
|
94
|
-
* Comparing it to resolveDaemonVersion() catches the go-live failure where the
|
|
95
|
-
* meta package updated but its daemon optionalDependency on disk lagged behind
|
|
96
|
-
* (the tangled Windows dev box stuck on the @0.2.0-era daemon). Returns the
|
|
97
|
-
* pinned version string, or null when it can't be read. Self-contained: reads the
|
|
98
|
-
* meta package.json that ships two dirs up from this file.
|
|
99
|
-
*/
|
|
100
|
-
export function expectedDaemonVersion({ metaPkgPath } = {}) {
|
|
101
|
-
const tag = platformTag();
|
|
102
|
-
try {
|
|
103
|
-
const pkg = metaPkgPath || path.resolve(__dirname, '..', '..', 'package.json');
|
|
104
|
-
const parsed = JSON.parse(readFileSync(pkg, 'utf8'));
|
|
105
|
-
const v = parsed?.optionalDependencies?.[`@venturewild/workspace-daemon-${tag}`];
|
|
106
|
-
return typeof v === 'string' ? v.replace(/^[~^]/, '') : null;
|
|
107
|
-
} catch {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
1
|
+
// Locates the bmo-sync-daemon binary for the current platform.
|
|
2
|
+
//
|
|
3
|
+
// wild-workspace ships the daemon as a per-platform npm subpackage
|
|
4
|
+
// (@venturewild/workspace-daemon-<tag>, biome pattern). The resolver walks a
|
|
5
|
+
// lookup chain so it works both in development (a locally built binary in
|
|
6
|
+
// vendor/ or on PATH) and in a published install (the platform subpackage).
|
|
7
|
+
|
|
8
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import url from 'node:url';
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
|
|
13
|
+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
|
|
16
|
+
/** `<platform>-<arch>` token, e.g. `win32-x64`, `darwin-arm64`, `linux-x64`. */
|
|
17
|
+
export function platformTag() {
|
|
18
|
+
return `${process.platform}-${process.arch}`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Daemon binary file name for the current platform. */
|
|
22
|
+
export function daemonBinaryName() {
|
|
23
|
+
return process.platform === 'win32' ? 'bmo-sync-daemon.exe' : 'bmo-sync-daemon';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Resolve the daemon binary. Lookup order:
|
|
28
|
+
* 1. WILD_WORKSPACE_DAEMON_BIN — explicit override (must exist, or null).
|
|
29
|
+
* 2. the per-platform npm subpackage `@venturewild/workspace-daemon-<tag>`.
|
|
30
|
+
* 3. a local `vendor/bmo-sync-daemon-<tag>/<bin>` dir (dev builds land here).
|
|
31
|
+
* 4. the bare binary name — let the OS resolve it on PATH at spawn time.
|
|
32
|
+
*
|
|
33
|
+
* Returns `{ path, source }`. `source` is one of `env` | `subpackage` |
|
|
34
|
+
* `vendor` | `path`. Returns `null` only when an explicit override is set
|
|
35
|
+
* but missing — every other case falls through to the PATH last resort.
|
|
36
|
+
*
|
|
37
|
+
* @param {{ env?: NodeJS.ProcessEnv, vendorRoot?: string }} [opts]
|
|
38
|
+
*/
|
|
39
|
+
export function resolveDaemonBinary({ env = process.env, vendorRoot, requireResolve } = {}) {
|
|
40
|
+
const binName = daemonBinaryName();
|
|
41
|
+
const tag = platformTag();
|
|
42
|
+
// Injected seam: lets a test simulate "the platform subpackage isn't
|
|
43
|
+
// installed" deterministically, regardless of what's in this machine's
|
|
44
|
+
// node_modules (the win32-x64 subpackage IS present on a Windows dev box).
|
|
45
|
+
const resolvePkg = requireResolve || ((id) => require.resolve(id));
|
|
46
|
+
|
|
47
|
+
// 1. explicit override — if set but missing, that's an error, not a miss.
|
|
48
|
+
const override = env.WILD_WORKSPACE_DAEMON_BIN;
|
|
49
|
+
if (override) {
|
|
50
|
+
return existsSync(override) ? { path: override, source: 'env' } : null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 2. per-platform npm subpackage — resolve via its package.json so the
|
|
54
|
+
// lookup doesn't depend on an `exports` map for the binary file.
|
|
55
|
+
try {
|
|
56
|
+
const pkgJson = resolvePkg(`@venturewild/workspace-daemon-${tag}/package.json`);
|
|
57
|
+
const candidate = path.join(path.dirname(pkgJson), binName);
|
|
58
|
+
if (existsSync(candidate)) return { path: candidate, source: 'subpackage' };
|
|
59
|
+
} catch {
|
|
60
|
+
// subpackage not installed — fall through
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 3. local vendor dir (a dev build of the daemon drops the binary here).
|
|
64
|
+
const root = vendorRoot || path.resolve(__dirname, '..', '..', 'vendor');
|
|
65
|
+
const vendor = path.join(root, `bmo-sync-daemon-${tag}`, binName);
|
|
66
|
+
if (existsSync(vendor)) return { path: vendor, source: 'vendor' };
|
|
67
|
+
|
|
68
|
+
// 4. last resort — spawn by name and let PATH resolve it.
|
|
69
|
+
return { path: binName, source: 'path' };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The version of the INSTALLED per-platform daemon subpackage (e.g. `"0.1.3"`),
|
|
74
|
+
* or null when it can't be determined (resolved via PATH/vendor, or not found).
|
|
75
|
+
* Used by the supervisor to detect a stale running daemon after an auto-update
|
|
76
|
+
* (the daemon's own /health doesn't report a version), so it can recycle it.
|
|
77
|
+
*/
|
|
78
|
+
export function resolveDaemonVersion({ env = process.env, requireResolve } = {}) {
|
|
79
|
+
const tag = platformTag();
|
|
80
|
+
const resolvePkg = requireResolve || ((id) => require.resolve(id));
|
|
81
|
+
try {
|
|
82
|
+
const pkgJson = resolvePkg(`@venturewild/workspace-daemon-${tag}/package.json`);
|
|
83
|
+
const parsed = JSON.parse(readFileSync(pkgJson, 'utf8'));
|
|
84
|
+
return typeof parsed.version === 'string' ? parsed.version : null;
|
|
85
|
+
} catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The daemon version the INSTALLED meta package PINS for this platform — read
|
|
92
|
+
* from the meta `package.json`'s optionalDependencies. This is the version
|
|
93
|
+
* `npm i -g @venturewild/workspace@<v>` is SUPPOSED to have pulled onto disk.
|
|
94
|
+
* Comparing it to resolveDaemonVersion() catches the go-live failure where the
|
|
95
|
+
* meta package updated but its daemon optionalDependency on disk lagged behind
|
|
96
|
+
* (the tangled Windows dev box stuck on the @0.2.0-era daemon). Returns the
|
|
97
|
+
* pinned version string, or null when it can't be read. Self-contained: reads the
|
|
98
|
+
* meta package.json that ships two dirs up from this file.
|
|
99
|
+
*/
|
|
100
|
+
export function expectedDaemonVersion({ metaPkgPath } = {}) {
|
|
101
|
+
const tag = platformTag();
|
|
102
|
+
try {
|
|
103
|
+
const pkg = metaPkgPath || path.resolve(__dirname, '..', '..', 'package.json');
|
|
104
|
+
const parsed = JSON.parse(readFileSync(pkg, 'utf8'));
|
|
105
|
+
const v = parsed?.optionalDependencies?.[`@venturewild/workspace-daemon-${tag}`];
|
|
106
|
+
return typeof v === 'string' ? v.replace(/^[~^]/, '') : null;
|
|
107
|
+
} catch {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
}
|