@venturewild/workspace 0.6.1 → 0.6.3

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 (56) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +112 -112
  3. package/package.json +85 -85
  4. package/server/bin/wild-workspace.mjs +1096 -1096
  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 +974 -974
  10. package/server/src/bazaar/index.mjs +88 -88
  11. package/server/src/bazaar/mcp-server.mjs +429 -429
  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 +40 -40
  24. package/server/src/canvas/core.mjs +446 -446
  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 -108
  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 +3332 -3332
  34. package/server/src/listings-rails.mjs +156 -156
  35. package/server/src/logpaths.mjs +98 -98
  36. package/server/src/observability.mjs +45 -45
  37. package/server/src/operator.mjs +92 -92
  38. package/server/src/pairing.mjs +137 -137
  39. package/server/src/service.mjs +515 -515
  40. package/server/src/session-reporter.mjs +201 -201
  41. package/server/src/settings.mjs +145 -145
  42. package/server/src/share.mjs +182 -182
  43. package/server/src/skills.mjs +213 -213
  44. package/server/src/supervisor.mjs +647 -647
  45. package/server/src/support-consent.mjs +133 -133
  46. package/server/src/sync.mjs +248 -248
  47. package/server/src/transcript.mjs +121 -121
  48. package/server/src/turn-mcp.mjs +46 -46
  49. package/server/src/usage.mjs +405 -405
  50. package/server/src/workspace-registry.mjs +295 -295
  51. package/server/src/workspaces.mjs +145 -145
  52. package/web/dist/assets/index-DVflHhYJ.js +131 -0
  53. package/web/dist/assets/index-IhgUFutI.css +32 -0
  54. package/web/dist/index.html +2 -2
  55. package/web/dist/assets/index-CzUrGoMW.css +0 -32
  56. package/web/dist/assets/index-ZYLNuQRa.js +0 -131
@@ -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
+ }