@venturewild/workspace 0.3.7 → 0.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 (55) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -112
  3. package/package.json +83 -83
  4. package/server/bin/wild-workspace.mjs +1096 -995
  5. package/server/src/account.mjs +114 -114
  6. package/server/src/agent-login.mjs +146 -146
  7. package/server/src/agent-readiness.mjs +200 -200
  8. package/server/src/agent.mjs +468 -468
  9. package/server/src/bazaar/core.mjs +579 -579
  10. package/server/src/bazaar/index.mjs +75 -75
  11. package/server/src/bazaar/mcp-server.mjs +328 -328
  12. package/server/src/bazaar/mock-tickup.mjs +97 -97
  13. package/server/src/bazaar/preview-server.mjs +95 -95
  14. package/server/src/bazaar/seed-recipes/customer-feedback-form/know-how.md +23 -23
  15. package/server/src/bazaar/seed-recipes/customer-feedback-form/recipe.json +24 -24
  16. package/server/src/bazaar/seed-recipes/landing-page-launch/know-how.md +29 -29
  17. package/server/src/bazaar/seed-recipes/landing-page-launch/recipe.json +25 -25
  18. package/server/src/bazaar/seed-recipes/personal-portfolio/know-how.md +21 -21
  19. package/server/src/bazaar/seed-recipes/personal-portfolio/recipe.json +24 -24
  20. package/server/src/bazaar/seed-recipes/receipt-sorter/know-how.md +31 -31
  21. package/server/src/bazaar/seed-recipes/receipt-sorter/recipe.json +25 -25
  22. package/server/src/bazaar/seed-recipes/tickup-hr-matching/know-how.md +79 -79
  23. package/server/src/bazaar/seed-recipes/tickup-hr-matching/recipe.json +32 -32
  24. package/server/src/canvas/core.mjs +446 -421
  25. package/server/src/canvas/index.mjs +42 -42
  26. package/server/src/canvas/mcp-server.mjs +253 -253
  27. package/server/src/canvas-rails.mjs +108 -0
  28. package/server/src/config.mjs +404 -404
  29. package/server/src/daemon-bin.mjs +110 -110
  30. package/server/src/daemon-supervisor.mjs +285 -285
  31. package/server/src/doctor.mjs +375 -375
  32. package/server/src/inbox.mjs +86 -86
  33. package/server/src/index.mjs +2766 -2475
  34. package/server/src/logpaths.mjs +98 -98
  35. package/server/src/observability.mjs +45 -45
  36. package/server/src/operator.mjs +92 -92
  37. package/server/src/pairing.mjs +137 -137
  38. package/server/src/service.mjs +515 -515
  39. package/server/src/session-reporter.mjs +201 -201
  40. package/server/src/settings.mjs +145 -145
  41. package/server/src/share.mjs +182 -182
  42. package/server/src/skills.mjs +213 -213
  43. package/server/src/supervisor.mjs +647 -647
  44. package/server/src/support-consent.mjs +133 -133
  45. package/server/src/sync.mjs +248 -248
  46. package/server/src/transcript.mjs +121 -121
  47. package/server/src/turn-mcp.mjs +46 -46
  48. package/server/src/usage.mjs +405 -405
  49. package/server/src/workspace-registry.mjs +225 -0
  50. package/server/src/workspaces.mjs +111 -0
  51. package/web/dist/assets/index-NXZN2LU2.css +1 -0
  52. package/web/dist/assets/index-PAS8Inwp.js +91 -0
  53. package/web/dist/index.html +2 -2
  54. package/web/dist/assets/index-BxRx8EsD.js +0 -91
  55. package/web/dist/assets/index-DoOPBr3s.css +0 -1
@@ -1,86 +1,86 @@
1
- // Component System inbox surfacing.
2
- // When `.wild/inbox.md` exists or changes, emit notifications.
3
- // Drives the "I noticed you imported X — want me to walk integration?" cue in chat.
4
-
5
- import fs from 'node:fs/promises';
6
- import { existsSync } from 'node:fs';
7
- import path from 'node:path';
8
- import chokidar from 'chokidar';
9
- import { EventEmitter } from 'node:events';
10
-
11
- export class InboxWatcher extends EventEmitter {
12
- constructor(workspaceDir) {
13
- super();
14
- this.workspaceDir = workspaceDir;
15
- this.inboxPath = path.join(workspaceDir, '.wild', 'inbox.md');
16
- this.installedPath = path.join(workspaceDir, '.wild', 'installed.json');
17
- this.watcher = null;
18
- // Resolves once the watcher's initial scan is done — see start().
19
- this.ready = Promise.resolve();
20
- }
21
-
22
- start() {
23
- this.watcher = chokidar.watch(
24
- [this.inboxPath, this.installedPath, path.join(this.workspaceDir, '.wild', 'imports')],
25
- {
26
- ignoreInitial: false,
27
- persistent: true,
28
- depth: 3,
29
- awaitWriteFinish: { stabilityThreshold: 200, pollInterval: 100 },
30
- },
31
- );
32
- this.watcher.on('add', () => this._refresh('add'));
33
- this.watcher.on('change', () => this._refresh('change'));
34
- this.watcher.on('unlink', () => this._refresh('unlink'));
35
- // Resolves once chokidar's initial scan completes and it is actively
36
- // watching — anything created after this point is reliably detected.
37
- this.ready = new Promise((resolve) => this.watcher.once('ready', resolve));
38
- return this;
39
- }
40
-
41
- async _refresh(kind) {
42
- const snapshot = await this.snapshot();
43
- this.emit('change', { kind, snapshot });
44
- }
45
-
46
- async snapshot() {
47
- const out = {
48
- hasInbox: existsSync(this.inboxPath),
49
- inboxContent: '',
50
- installed: {},
51
- imports: [],
52
- };
53
- if (out.hasInbox) {
54
- try {
55
- out.inboxContent = await fs.readFile(this.inboxPath, 'utf8');
56
- } catch {
57
- out.inboxContent = '';
58
- }
59
- }
60
- if (existsSync(this.installedPath)) {
61
- try {
62
- const raw = await fs.readFile(this.installedPath, 'utf8');
63
- out.installed = JSON.parse(raw);
64
- } catch {
65
- out.installed = {};
66
- }
67
- }
68
- const importsDir = path.join(this.workspaceDir, '.wild', 'imports');
69
- if (existsSync(importsDir)) {
70
- try {
71
- const entries = await fs.readdir(importsDir, { withFileTypes: true });
72
- out.imports = entries
73
- .filter((e) => e.isDirectory())
74
- .map((e) => e.name);
75
- } catch {
76
- out.imports = [];
77
- }
78
- }
79
- return out;
80
- }
81
-
82
- stop() {
83
- if (this.watcher) this.watcher.close();
84
- this.watcher = null;
85
- }
86
- }
1
+ // Component System inbox surfacing.
2
+ // When `.wild/inbox.md` exists or changes, emit notifications.
3
+ // Drives the "I noticed you imported X — want me to walk integration?" cue in chat.
4
+
5
+ import fs from 'node:fs/promises';
6
+ import { existsSync } from 'node:fs';
7
+ import path from 'node:path';
8
+ import chokidar from 'chokidar';
9
+ import { EventEmitter } from 'node:events';
10
+
11
+ export class InboxWatcher extends EventEmitter {
12
+ constructor(workspaceDir) {
13
+ super();
14
+ this.workspaceDir = workspaceDir;
15
+ this.inboxPath = path.join(workspaceDir, '.wild', 'inbox.md');
16
+ this.installedPath = path.join(workspaceDir, '.wild', 'installed.json');
17
+ this.watcher = null;
18
+ // Resolves once the watcher's initial scan is done — see start().
19
+ this.ready = Promise.resolve();
20
+ }
21
+
22
+ start() {
23
+ this.watcher = chokidar.watch(
24
+ [this.inboxPath, this.installedPath, path.join(this.workspaceDir, '.wild', 'imports')],
25
+ {
26
+ ignoreInitial: false,
27
+ persistent: true,
28
+ depth: 3,
29
+ awaitWriteFinish: { stabilityThreshold: 200, pollInterval: 100 },
30
+ },
31
+ );
32
+ this.watcher.on('add', () => this._refresh('add'));
33
+ this.watcher.on('change', () => this._refresh('change'));
34
+ this.watcher.on('unlink', () => this._refresh('unlink'));
35
+ // Resolves once chokidar's initial scan completes and it is actively
36
+ // watching — anything created after this point is reliably detected.
37
+ this.ready = new Promise((resolve) => this.watcher.once('ready', resolve));
38
+ return this;
39
+ }
40
+
41
+ async _refresh(kind) {
42
+ const snapshot = await this.snapshot();
43
+ this.emit('change', { kind, snapshot });
44
+ }
45
+
46
+ async snapshot() {
47
+ const out = {
48
+ hasInbox: existsSync(this.inboxPath),
49
+ inboxContent: '',
50
+ installed: {},
51
+ imports: [],
52
+ };
53
+ if (out.hasInbox) {
54
+ try {
55
+ out.inboxContent = await fs.readFile(this.inboxPath, 'utf8');
56
+ } catch {
57
+ out.inboxContent = '';
58
+ }
59
+ }
60
+ if (existsSync(this.installedPath)) {
61
+ try {
62
+ const raw = await fs.readFile(this.installedPath, 'utf8');
63
+ out.installed = JSON.parse(raw);
64
+ } catch {
65
+ out.installed = {};
66
+ }
67
+ }
68
+ const importsDir = path.join(this.workspaceDir, '.wild', 'imports');
69
+ if (existsSync(importsDir)) {
70
+ try {
71
+ const entries = await fs.readdir(importsDir, { withFileTypes: true });
72
+ out.imports = entries
73
+ .filter((e) => e.isDirectory())
74
+ .map((e) => e.name);
75
+ } catch {
76
+ out.imports = [];
77
+ }
78
+ }
79
+ return out;
80
+ }
81
+
82
+ stop() {
83
+ if (this.watcher) this.watcher.close();
84
+ this.watcher = null;
85
+ }
86
+ }