@rubytech/create-maxy-code 0.1.312 → 0.1.314

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 (134) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/graph-style/dist/index.d.ts.map +1 -1
  3. package/payload/platform/lib/graph-style/dist/index.js +5 -3
  4. package/payload/platform/lib/graph-style/dist/index.js.map +1 -1
  5. package/payload/platform/lib/graph-style/src/index.ts +5 -3
  6. package/payload/platform/neo4j/schema.cypher +7 -17
  7. package/payload/platform/plugins/.claude-plugin/marketplace.json +5 -0
  8. package/payload/platform/plugins/admin/hooks/lib/maxy-mcp-plugins.txt +1 -0
  9. package/payload/platform/plugins/admin/skills/file-presentation/SKILL.md +1 -1
  10. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +39 -5
  11. package/payload/platform/plugins/admin/skills/professional-document/SKILL.md +1 -1
  12. package/payload/platform/plugins/docs/references/admin-session.md +2 -0
  13. package/payload/platform/plugins/docs/references/admin-ui.md +3 -3
  14. package/payload/platform/plugins/docs/references/memory-guide.md +1 -1
  15. package/payload/platform/plugins/docs/references/quickbooks.md +29 -0
  16. package/payload/platform/plugins/graph-viewer/mcp/dist/index.js +1 -1
  17. package/payload/platform/plugins/graph-viewer/mcp/dist/index.js.map +1 -1
  18. package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.d.ts.map +1 -1
  19. package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.js +8 -7
  20. package/payload/platform/plugins/graph-viewer/mcp/dist/tools/graph-render.js.map +1 -1
  21. package/payload/platform/plugins/graph-viewer/skills/render-graph/SKILL.md +8 -5
  22. package/payload/platform/plugins/memory/mcp/dist/index.js +2 -0
  23. package/payload/platform/plugins/memory/mcp/dist/index.js.map +1 -1
  24. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.d.ts +2 -0
  25. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.d.ts.map +1 -0
  26. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.js +146 -0
  27. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/relationship-patterns.test.js.map +1 -0
  28. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.test.js +4 -0
  29. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-cypher-drift.test.js.map +1 -1
  30. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js +1 -0
  31. package/payload/platform/plugins/memory/mcp/dist/lib/__tests__/schema-validator.test.js.map +1 -1
  32. package/payload/platform/plugins/memory/mcp/dist/lib/relationship-patterns.d.ts +66 -0
  33. package/payload/platform/plugins/memory/mcp/dist/lib/relationship-patterns.d.ts.map +1 -0
  34. package/payload/platform/plugins/memory/mcp/dist/lib/relationship-patterns.js +102 -0
  35. package/payload/platform/plugins/memory/mcp/dist/lib/relationship-patterns.js.map +1 -0
  36. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts +9 -0
  37. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.d.ts.map +1 -1
  38. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js +6 -1
  39. package/payload/platform/plugins/memory/mcp/dist/lib/schema-loader.js.map +1 -1
  40. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.js +1 -0
  41. package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-update-personfields-open.test.js.map +1 -1
  42. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.d.ts +9 -0
  43. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.d.ts.map +1 -1
  44. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.js +25 -1
  45. package/payload/platform/plugins/memory/mcp/dist/tools/memory-edge.js.map +1 -1
  46. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.d.ts.map +1 -1
  47. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js +21 -0
  48. package/payload/platform/plugins/memory/mcp/dist/tools/memory-write.js.map +1 -1
  49. package/payload/platform/plugins/memory/mcp/vitest.config.ts +2 -0
  50. package/payload/platform/plugins/memory/references/schema-construction.md +37 -15
  51. package/payload/platform/plugins/quickbooks/.claude-plugin/plugin.json +21 -0
  52. package/payload/platform/plugins/quickbooks/PLUGIN.md +91 -0
  53. package/payload/platform/plugins/quickbooks/lib/mcp-spawn-tee/index.js +159 -0
  54. package/payload/platform/plugins/quickbooks/lib/mcp-spawn-tee/package.json +3 -0
  55. package/payload/platform/plugins/quickbooks/mcp/dist/index.d.ts +2 -0
  56. package/payload/platform/plugins/quickbooks/mcp/dist/index.d.ts.map +1 -0
  57. package/payload/platform/plugins/quickbooks/mcp/dist/index.js +218 -0
  58. package/payload/platform/plugins/quickbooks/mcp/dist/index.js.map +1 -0
  59. package/payload/platform/plugins/quickbooks/mcp/dist/lib/oauth.d.ts +37 -0
  60. package/payload/platform/plugins/quickbooks/mcp/dist/lib/oauth.d.ts.map +1 -0
  61. package/payload/platform/plugins/quickbooks/mcp/dist/lib/oauth.js +75 -0
  62. package/payload/platform/plugins/quickbooks/mcp/dist/lib/oauth.js.map +1 -0
  63. package/payload/platform/plugins/quickbooks/mcp/dist/lib/qbo-client.d.ts +39 -0
  64. package/payload/platform/plugins/quickbooks/mcp/dist/lib/qbo-client.d.ts.map +1 -0
  65. package/payload/platform/plugins/quickbooks/mcp/dist/lib/qbo-client.js +178 -0
  66. package/payload/platform/plugins/quickbooks/mcp/dist/lib/qbo-client.js.map +1 -0
  67. package/payload/platform/plugins/quickbooks/mcp/dist/lib/secrets.d.ts +36 -0
  68. package/payload/platform/plugins/quickbooks/mcp/dist/lib/secrets.d.ts.map +1 -0
  69. package/payload/platform/plugins/quickbooks/mcp/dist/lib/secrets.js +107 -0
  70. package/payload/platform/plugins/quickbooks/mcp/dist/lib/secrets.js.map +1 -0
  71. package/payload/platform/plugins/quickbooks/mcp/package.json +19 -0
  72. package/payload/platform/plugins/quickbooks/skills/quickbooks/SKILL.md +37 -0
  73. package/payload/platform/scripts/check-no-esm-require.mjs +4 -0
  74. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  75. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +16 -0
  76. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  77. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  78. package/payload/platform/services/claude-session-manager/dist/http-server.js +53 -3
  79. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  80. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts +4 -0
  81. package/payload/platform/services/claude-session-manager/dist/pty-spawner.d.ts.map +1 -1
  82. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js +6 -0
  83. package/payload/platform/services/claude-session-manager/dist/pty-spawner.js.map +1 -1
  84. package/payload/platform/services/claude-session-manager/dist/session-sidecar.d.ts +10 -0
  85. package/payload/platform/services/claude-session-manager/dist/session-sidecar.d.ts.map +1 -1
  86. package/payload/platform/services/claude-session-manager/dist/session-sidecar.js +15 -0
  87. package/payload/platform/services/claude-session-manager/dist/session-sidecar.js.map +1 -1
  88. package/payload/platform/services/webchat-channel/dist/instructions.d.ts.map +1 -1
  89. package/payload/platform/services/webchat-channel/dist/instructions.js +8 -1
  90. package/payload/platform/services/webchat-channel/dist/instructions.js.map +1 -1
  91. package/payload/platform/services/whatsapp-channel/dist/notification.d.ts.map +1 -1
  92. package/payload/platform/services/whatsapp-channel/dist/notification.js +8 -1
  93. package/payload/platform/services/whatsapp-channel/dist/notification.js.map +1 -1
  94. package/payload/platform/templates/specialists/agents/content-producer.md +1 -1
  95. package/payload/server/{chunk-J6WDAWFJ.js → chunk-Q7EWROVN.js} +4 -0
  96. package/payload/server/maxy-edge.js +1 -1
  97. package/payload/server/public/assets/AccessGate-B_sL5-0I.js +1 -0
  98. package/payload/server/public/assets/{AdminLoginScreens-B8s2TbT7.js → AdminLoginScreens-BgicJfUu.js} +1 -1
  99. package/payload/server/public/assets/AdminShell-C0gZ5JKc.js +1 -0
  100. package/payload/server/public/assets/{Checkbox-B_sOAyv1.js → Checkbox-BJdwS4v2.js} +1 -1
  101. package/payload/server/public/assets/OperatorConversations-DPlZIELy.js +1 -0
  102. package/payload/server/public/assets/{admin-gZEndvJT.js → admin-DAFDivnO.js} +1 -1
  103. package/payload/server/public/assets/audio-attachment-mime-h53tpH_4.js +30 -0
  104. package/payload/server/public/assets/{brand-BcNavK6q.css → brand-bye0l_rp.css} +1 -1
  105. package/payload/server/public/assets/{browser-BUlB5_MD.js → browser-CmFjVZYo.js} +1 -1
  106. package/payload/server/public/assets/chat-CSw2u48Q.js +1 -0
  107. package/payload/server/public/assets/data-C4v6AdQ-.js +1 -0
  108. package/payload/server/public/assets/graph-BJyMQdRx.js +51 -0
  109. package/payload/server/public/assets/graph-labels-BTpv_U3g.js +1 -0
  110. package/payload/server/public/assets/operator-Bj88rdnI.js +1 -0
  111. package/payload/server/public/assets/page-hmlVCBRQ.js +1 -0
  112. package/payload/server/public/assets/{public-G_-UI9nB.js → public-IRKxc9hu.js} +3 -3
  113. package/payload/server/public/assets/{public-next-C8_nExQB.js → public-next-DqQ4PZLk.js} +1 -1
  114. package/payload/server/public/assets/{useSelectionMode-Bf6Rt-sl.js → useSelectionMode-CTJhWnNp.js} +1 -1
  115. package/payload/server/public/browser.html +6 -6
  116. package/payload/server/public/chat.html +8 -8
  117. package/payload/server/public/data.html +5 -5
  118. package/payload/server/public/graph.html +8 -8
  119. package/payload/server/public/index.html +9 -9
  120. package/payload/server/public/operator.html +10 -10
  121. package/payload/server/public/public-next.html +9 -9
  122. package/payload/server/public/public.html +7 -7
  123. package/payload/server/server.js +1387 -824
  124. package/payload/server/public/assets/AccessGate-Dh5A79FU.js +0 -1
  125. package/payload/server/public/assets/AdminShell-Cu1zlb6L.js +0 -1
  126. package/payload/server/public/assets/OperatorConversations-hm0Gpu_Q.js +0 -1
  127. package/payload/server/public/assets/audio-attachment-mime-B0b89VnH.js +0 -30
  128. package/payload/server/public/assets/chat-BnceaVl7.js +0 -1
  129. package/payload/server/public/assets/data-3Nl3P5wt.js +0 -1
  130. package/payload/server/public/assets/graph-DMCKpW6P.js +0 -51
  131. package/payload/server/public/assets/graph-labels-AZLGoVy8.js +0 -1
  132. package/payload/server/public/assets/operator-BF4F7k23.js +0 -1
  133. package/payload/server/public/assets/page-DQUEst1o.js +0 -1
  134. /package/payload/server/public/assets/{brand-BQ_u9UdS.js → brand-DqQPSWa7.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"memory-write.js","sourceRoot":"","sources":["../../src/tools/memory-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAqB,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,4BAA4B,GAG7B,MAAM,8CAA8C,CAAC;AAwCtD,yGAAyG;AACzG,MAAM,uBAAuB,GAAG;IAC9B,QAAQ;IACR,cAAc;IACd,SAAS;IACT,SAAS;IACT,eAAe;CACP,CAAC;AACX,sEAAsE;AACtE,4EAA4E;AAC5E,gFAAgF;AAChF,iFAAiF;AACjF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7E,oFAAoF;AACpF,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B,MAAM,UAAU,uBAAuB,CACrC,MAAgB,EAChB,UAAmC;IAEnC,MAAM,KAAK,GAAa,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEnD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;YACjE,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACnF,CAAC"}
@@ -45,6 +45,8 @@ export default defineConfig({
45
45
  // Task 436 — revision-stamping restored under the specialist gate
46
46
  // (single-TX SET + revision CREATE).
47
47
  "src/lib/__tests__/compiled-truth-revision.test.ts",
48
+ // Vertical relationship-pattern projector + warn-only edge check.
49
+ "src/lib/__tests__/relationship-patterns.test.ts",
48
50
  ],
49
51
  testTimeout: 10_000,
50
52
  },
@@ -19,18 +19,21 @@ When loading this reference, confirm: "Using schema-base + schema-construction".
19
19
  | QuoteDocument | `QuoteDocument` | `schema:DigitalDocument` | `accountId`, `jobId`, `ref`, `totalPaymentDue`, `date`, `status` (draft/sent/accepted) |
20
20
  | VariationNote | `VariationNote` | `schema:DigitalDocument` | `accountId`, `jobId`, `variationNumber`, `description`, `totalPaymentDue`, `status` |
21
21
  | InboundInvoice | `InboundInvoice` | `schema:Invoice` | `accountId`, `supplier`, `confirmationNumber`, `totalPaymentDue`, `status` (pending/approved/processed) |
22
- | SubContractor | `SubContractor` | `schema:Person` (extended) | `accountId`, `name`, `whatsappNumber`, `dayRate` |
23
- | TimeLog | `TimeLog` | `schema:Action` | `accountId`, `subContractorId`, `jobId`, `date`, `days` |
24
- | SubInvoice | `SubInvoice` | `schema:Invoice` | `accountId`, `subContractorId`, `jobId`, `period`, `days`, `totalPaymentDue`, `status` |
22
+ | Worker | `Worker` (label on `Person`) | `schema:Person` (config) | `accountId`, `personId`, `name`, `engagement` (employee/cis), `dayRatePence`, `showCisDeduction`, `invoiceEmail` |
23
+ | CheckIn | `CheckIn` | `schema:Action` | `accountId`, `personId`, `source`, `date`, `site`, `description`, `dayHundredths` |
25
24
  | WhatsAppGroup | `WhatsAppGroup` | `cdm:Channel` | `accountId`, `groupId`, `jobId`, `clientName` |
26
25
 
27
26
  `awardedDate` on `Job` is expected once `status` is `active` or `complete` — a job still `quoting` has no award date. Never write a sentinel value (`"pending"`, `""`) to stand in for an unknown date; omit the property until the real date is known.
28
27
 
29
- These entities model a general builder job folder: a `Job` carries many `LineItem` rows organised by trade stage, a generated client `QuoteDocument`, supplier and sub-contractor invoices, and per-trade structure. A residential building job's line items typically span stages such as groundworks, sub-structure, superstructure, roof, structural alterations & envelope, first fix, drylining & plastering, floor screed, second fixing, knock-throughs, windows & doors, completion items and preliminaries, plus sub-contractor trades (scaffolding, roofing, electrical, plumbing, plastering, tiling, decorations). The schema carries no client, job, or pricing data of its own — those are per-account runtime values.
28
+ These entities model a general builder job folder: a `Job` has a generated client `QuoteDocument` that carries many `LineItem` rows organised by trade stage, supplier and sub-contractor invoices, and per-trade structure. A residential building job's line items typically span stages such as groundworks, sub-structure, superstructure, roof, structural alterations & envelope, first fix, drylining & plastering, floor screed, second fixing, knock-throughs, windows & doors, completion items and preliminaries, plus sub-contractor trades (scaffolding, roofing, electrical, plumbing, plastering, tiling, decorations). The schema carries no client, job, or pricing data of its own — those are per-account runtime values.
30
29
 
31
30
  ### Distinctions from schema-trades
32
31
 
33
- `QuoteDocument` is the generated client quote artefact (the `Q-XXXX` document), distinct from schema-trades' `Quote` (a pre-acceptance Order estimate). `InboundInvoice` and `SubInvoice` are received/payable invoices with job + trade assignment, distinct from the base `Invoice`. `SubContractor` extends base `Person` with `dayRate` and `whatsappNumber`; use it as an additional label on a `Person` node where the subcontractor is also a known person, or standalone where only the WhatsApp identity is known.
32
+ `QuoteDocument` is the generated client quote artefact (the `Q-XXXX` document), distinct from schema-trades' `Quote` (a pre-acceptance Order estimate). `InboundInvoice` is a received/payable invoice with job + trade assignment, distinct from the base `Invoice`. A subcontractor company's received invoices use the same `InboundInvoice` model as any other supplier.
33
+
34
+ ### Field-worker time and pay
35
+
36
+ A field worker's time and pay is the `:Worker`/`:CheckIn` model. `:Worker` is an operator-config label on the worker's `:Person` (engagement, day rate, whether the CIS deduction shows, the office invoice address); `:CheckIn` is one record per working day, linked to the worker by `(:Worker)-[:LOGGED]->(:CheckIn)` and unified for roll-up by the shared `personId`. The timesheet skill rolls the check-ins for a period into a per-worker timesheet, and for a CIS worker an invoice that is rendered and emailed, not stored as a node.
34
37
 
35
38
  ---
36
39
 
@@ -43,32 +46,51 @@ MERGE keys per label:
43
46
  - `:QuoteDocument` — `(accountId, ref)`
44
47
  - `:VariationNote` — `(accountId, jobId, variationNumber)`
45
48
  - `:InboundInvoice` — `(accountId, supplier, confirmationNumber)`
46
- - `:SubContractor` — `(accountId, whatsappNumber)`
47
- - `:SubInvoice` — `(accountId, subContractorId, period)`
48
49
  - `:WhatsAppGroup` — `(accountId, groupId)`
49
- - `:LineItem` — `(accountId, jobId, trade, description)` — child of `:Job`, write-time MERGE only
50
+ - `:LineItem` — `(accountId, jobId, trade, description)` — child of the `:QuoteDocument`, write-time MERGE only
50
51
  - `:Milestone` — `(accountId, jobId, name)` — child of `:Job`, write-time MERGE only
51
- - `:TimeLog` — `(accountId, subContractorId, jobId, date)` — write-time MERGE only
52
+ - `:Worker` — `(accountId, personId)` — an additional label on the worker's `:Person`, set via `memory-update`
53
+ - `:CheckIn` — `(accountId, personId, date)` — child of the worker's `:Person`, write-time MERGE only
52
54
 
53
55
  ---
54
56
 
55
57
  ## Relationship Patterns
56
58
 
57
59
  ```
58
- (:Job)-[:HAS_LINE_ITEM]->(:LineItem)
59
60
  (:Job)-[:HAS_VALUATION]->(:Valuation)
60
61
  (:Job)-[:HAS_MILESTONE]->(:Milestone)
61
62
  (:Job)-[:HAS_QUOTE]->(:QuoteDocument)
63
+ (:QuoteDocument)-[:HAS_LINE_ITEM]->(:LineItem)
64
+ (:Valuation)-[:VALUES]->(:LineItem)
62
65
  (:Job)-[:HAS_VARIATION]->(:VariationNote)
63
66
  (:Job)-[:FOR_CLIENT]->(:Person)
64
67
  (:Job)-[:AT_ADDRESS]->(:PostalAddress)
65
68
  (:InboundInvoice)-[:ASSIGNED_TO]->(:Job)
66
69
  (:InboundInvoice)-[:FROM_SUPPLIER]->(:Organization)
67
- (:SubContractor)-[:LOGGED]->(:TimeLog)
68
- (:TimeLog)-[:ON_JOB]->(:Job)
69
- (:SubInvoice)-[:FOR_SUBCONTRACTOR]->(:SubContractor)
70
- (:SubInvoice)-[:ON_JOB]->(:Job)
70
+ (:Worker)-[:LOGGED]->(:CheckIn)
71
71
  (:WhatsAppGroup)-[:MAPPED_TO]->(:Job)
72
72
  ```
73
73
 
74
- Every `:Job` is the parent node for its line items, valuations, milestones, quotes, and variations, satisfying the ≥1-adjacency write-gate doctrine. A `:Job` links to its client (`:Person`) and site (`:PostalAddress`); inbound supplier invoices link to the `:Job` they are assigned to and the `:Organization` that issued them.
74
+ Every `:Job` is the parent node for its valuations, milestones, quotes, and variations, satisfying the ≥1-adjacency write-gate doctrine. Line items are **not** a direct child of the `:Job`: a `:LineItem` is one row of the priced contract schedule, owned by the `:QuoteDocument` that priced it, and reached from the job through the quote — `(:Job)-[:HAS_QUOTE]->(:QuoteDocument)-[:HAS_LINE_ITEM]->(:LineItem)`. Each valuation links the lines it measures with `(:Valuation)-[:VALUES]->(:LineItem)`; the per-line percent-complete a valuation records is carried valuation state, not a property of the edge or the line. A `:Job` links to its client (`:Person`) and site (`:PostalAddress`); inbound supplier invoices link to the `:Job` they are assigned to and the `:Organization` that issued them.
75
+
76
+ ---
77
+
78
+ ## Filesystem ↔ graph (base template)
79
+
80
+ The graph is a disciplined projection of the operator's job folder: every node corresponds to a filesystem artefact, and the edges follow the folder containment. This mapping is the **base template** — the default a standard building-contractor job folder projects into. It is shipped-generic; the folder names, sheet names and trade list below are the common default, not any operator's data.
81
+
82
+ A standard job folder, `{jobId} - {name}, {address} ({client})/`, projects as:
83
+
84
+ | Folder / artefact | Node | Edge from the job |
85
+ |---|---|---|
86
+ | the job folder itself | `:Job` | — (the hub); `(:Job)-[:FOR_CLIENT]->(:Person)`, `(:Job)-[:AT_ADDRESS]->(:PostalAddress)` |
87
+ | `Quotations/` — the client quote (`Q {jobId}`) and its priced schedule | `:QuoteDocument`; its priced rows → `:LineItem` | `(:Job)-[:HAS_QUOTE]->(:QuoteDocument)-[:HAS_LINE_ITEM]->(:LineItem)` |
88
+ | `Finances/Valuations/` — one interim valuation per cycle | `:Valuation`; each measures the priced lines | `(:Job)-[:HAS_VALUATION]->(:Valuation)-[:VALUES]->(:LineItem)` |
89
+ | the variations register | `:VariationNote` | `(:Job)-[:HAS_VARIATION]->(:VariationNote)` |
90
+ | `Contractors/<Trade>/{Enquiries,Quotes,Invoices,Superseded}` | `:Organization`; invoices → `:InboundInvoice` | `(:InboundInvoice)-[:ASSIGNED_TO]->(:Job)`, `(:InboundInvoice)-[:FROM_SUPPLIER]->(:Organization)` |
91
+ | `Suppliers/<Supplier>/{Enquiries,Quotes,Invoices,Superseded}` | `:Organization`; invoices → `:InboundInvoice` | `(:InboundInvoice)-[:ASSIGNED_TO]->(:Job)`, `(:InboundInvoice)-[:FROM_SUPPLIER]->(:Organization)` |
92
+ | `Drawings/`, `Health & Safety/`, `Emails/`, `Snagging/`, `Meetings/`, `Programs/`, `Materials/`, `Admin/` | ingested documents (`:KnowledgeDocument` + `:Section`) | linked to the `:Job` |
93
+
94
+ A contractor who keeps the whole job in one master workbook holds the same model in sheets rather than folders: a cover/calculation sheet is the priced schedule (`:QuoteDocument` + `:LineItem`s), one sheet per valuation cycle is a `:Valuation` measuring those lines, a variations sheet is the `:VariationNote` register, and per-trade sheets are the sub-contractor packages. Folder and workbook are two views of one job; both project into this same graph.
95
+
96
+ Operators vary this template — they rename folders, add trades, restructure their workbook. This template is the shipped-generic default the agent projects against; the graph follows this one canonical ontology, not a per-operator schema. Where a real folder does not fit the default, the agent maps it to the nearest canonical node rather than inventing a node or edge type absent from this reference.
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "quickbooks",
3
+ "description": "QuickBooks Online connector — operator-owned Intuit app, OAuth consent relay, then agent-driven read/write over the QBO REST API.",
4
+ "version": "0.1.0",
5
+ "author": {
6
+ "name": "Rubytech LLC"
7
+ },
8
+ "mcpServers": {
9
+ "quickbooks": {
10
+ "type": "stdio",
11
+ "command": "node",
12
+ "args": [
13
+ "${CLAUDE_PLUGIN_ROOT}/lib/mcp-spawn-tee/index.js",
14
+ "${CLAUDE_PLUGIN_ROOT}/mcp/dist/index.js"
15
+ ],
16
+ "env": {
17
+ "MCP_SPAWN_TEE_NAME": "quickbooks"
18
+ }
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: quickbooks
3
+ description: "QuickBooks Online connector — operator-owned Intuit app, OAuth consent relay, then agent-driven read/write over the QBO REST API."
4
+ tools:
5
+ - name: quickbooks-credentials-set
6
+ publicAllowlist: false
7
+ adminAllowlist: true
8
+ - name: quickbooks-authorize-url
9
+ publicAllowlist: false
10
+ adminAllowlist: true
11
+ - name: quickbooks-connections
12
+ publicAllowlist: false
13
+ adminAllowlist: true
14
+ - name: quickbooks-token-audit
15
+ publicAllowlist: false
16
+ adminAllowlist: true
17
+ - name: quickbooks-disconnect
18
+ publicAllowlist: false
19
+ adminAllowlist: true
20
+ - name: quickbooks-query
21
+ publicAllowlist: false
22
+ adminAllowlist: false
23
+ - name: quickbooks-report
24
+ publicAllowlist: false
25
+ adminAllowlist: false
26
+ - name: quickbooks-invoice-create
27
+ publicAllowlist: false
28
+ adminAllowlist: false
29
+ - name: quickbooks-invoice-update
30
+ publicAllowlist: false
31
+ adminAllowlist: false
32
+ - name: quickbooks-customer-create
33
+ publicAllowlist: false
34
+ adminAllowlist: false
35
+ - name: quickbooks-customer-update
36
+ publicAllowlist: false
37
+ adminAllowlist: false
38
+ - name: quickbooks-bill-create
39
+ publicAllowlist: false
40
+ adminAllowlist: false
41
+ - name: quickbooks-payment-create
42
+ publicAllowlist: false
43
+ adminAllowlist: false
44
+ - name: quickbooks-entity-create
45
+ publicAllowlist: false
46
+ adminAllowlist: false
47
+ - name: quickbooks-entity-update
48
+ publicAllowlist: false
49
+ adminAllowlist: false
50
+ skills:
51
+ - skills/quickbooks/SKILL.md
52
+ metadata: {"platform":{"optional":true,"pluginKey":"quickbooks"}}
53
+ mcp:
54
+ command: node
55
+ args:
56
+ - ${PLATFORM_ROOT}/lib/mcp-spawn-tee/dist/index.js
57
+ - ${PLATFORM_ROOT}/plugins/quickbooks/mcp/dist/index.js
58
+ env:
59
+ MCP_SPAWN_TEE_NAME: quickbooks
60
+ LOG_DIR: ${LOG_DIR}
61
+ PLATFORM_ROOT: ${PLATFORM_ROOT}
62
+ ACCOUNT_ID: ${ACCOUNT_ID}
63
+ SESSION_ID: ${SESSION_ID}
64
+ mcp-manifest: auto
65
+ ---
66
+
67
+ # QuickBooks Online
68
+
69
+ Connects to QuickBooks **Online** — the cloud accounting product (REST/JSON, OAuth 2.0). There is no local company file; the books live in Intuit's cloud, so every call proves app identity plus per-company consent.
70
+
71
+ Maxy ships installs and walks away, so Maxy is **never** the OAuth app owner. The operator registers their **own** Intuit app; its client ID/secret is a per-brand secret like the Cloudflare token. Two steps are irreducibly human and are relayed, never auto-clicked: registering the app at developer.intuit.com, and clicking the consent link for each company. Everything after — code→token exchange, access-token refresh, every REST call — is agent-driven.
72
+
73
+ ## Capabilities
74
+
75
+ - **quickbooks-credentials-set** — store the operator's Intuit app client ID + secret (sandbox or production).
76
+ - **quickbooks-authorize-url** — mint a consent URL for a human to click; one company per click.
77
+ - **quickbooks-connections** — list connected companies and the age of each refresh token.
78
+ - **quickbooks-token-audit** — probe each refresh token; surfaces a dead connection before a customer-facing call hits it.
79
+ - **quickbooks-disconnect** — drop one company's stored token.
80
+ - **quickbooks-query** — read any entity via the QBO query language (invoices, customers, bills, …).
81
+ - **quickbooks-report** — fetch a named report (ProfitAndLoss, BalanceSheet, …).
82
+ - **quickbooks-invoice-create / -update**, **quickbooks-customer-create / -update**, **quickbooks-bill-create**, **quickbooks-payment-create** — entity-specific writes.
83
+ - **quickbooks-entity-create / -update** — generic write for any other entity (Vendor, Item, Estimate, …).
84
+
85
+ ## Setup
86
+
87
+ Connecting QuickBooks runs through the `quickbooks` skill (`skills/quickbooks/SKILL.md`): register the Intuit app, paste the credentials, then relay the consent link. The skill is the operator-facing procedure; load it and follow its instructions.
88
+
89
+ ## Credentials and isolation
90
+
91
+ Credentials and per-company refresh tokens live only in this account's secrets directory (`secrets/quickbooks.json`, mode `0600`), inside the brand-isolated install. No Intuit app identity is shared across brands. Token refresh is automatic until a refresh token expires (~100 days of inactivity) or is revoked.
@@ -0,0 +1,159 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * MCP spawn-tee — parent-side stderr capture + lifecycle observability.
5
+ *
6
+ * Claude Code spawns each MCP server itself; the platform never holds a
7
+ * ChildProcess handle. This wrapper sits between Claude Code and the real
8
+ * MCP server: Claude Code runs `node <this> <real-entry>`, and the wrapper
9
+ * spawns the real entry with `stdio:['inherit','inherit','pipe']` so stdin
10
+ * and stdout (the JSON-RPC channel) pass through byte-identical. Only stderr
11
+ * is intercepted, and only for logging.
12
+ *
13
+ * Because the wrapper IS the helper's parent, it observes the helper's true
14
+ * exit code, signal, and lifetime for every death mode — including a SIGKILL
15
+ * or a transport-layer crash that an in-process handler would miss.
16
+ *
17
+ * Claude Code CLI → wrapper (this file) → child = node <real-entry>
18
+ * child stdin/stdout : inherited (Claude Code pipe, untouched)
19
+ * child stderr : piped → per-date log + per-session log + passthrough
20
+ *
21
+ * Destinations (Task 706):
22
+ * - `${LOG_DIR}/mcp-<name>-stderr-<date>.log` — per-date raw (back-compat;
23
+ * the in-process mcp-stderr-tee and the [mcp-init-error] probe read it).
24
+ * - `${LOG_DIR}/mcp-<name>-<SESSION_ID>.log` — per-session raw + lifecycle
25
+ * lines; wrapper-only, so it never mixes the enumeration copy with the
26
+ * live copy. Authoritative sink. Absent when SESSION_ID is unset
27
+ * (enumeration spawn) — then the per-date file is the fallback.
28
+ * - `server.log` via the loopback log-ingest route — best-effort mirror of
29
+ * the [mcp-helper] lifecycle lines. A dropped POST loses nothing because
30
+ * the per-session file already holds the line (written synchronously).
31
+ *
32
+ * Lifecycle lines, correlation key `session=<id8> server=<name>`:
33
+ * [mcp-helper] op=spawn ... pid= entry=
34
+ * [mcp-helper] op=boot ... head=<first stderr bytes>
35
+ * [mcp-helper] op=exit ... code= signal= lifetimeMs= stderr-tail= (always)
36
+ *
37
+ * The wrapper never writes to fd 1 (stdout) — that is the JSON-RPC channel.
38
+ * SIGTERM/SIGINT are forwarded to the child so a Claude Code shutdown does
39
+ * not orphan it; the child exit code/signal is propagated verbatim.
40
+ */
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ const node_child_process_1 = require("node:child_process");
43
+ const node_fs_1 = require("node:fs");
44
+ const node_path_1 = require("node:path");
45
+ const SERVER_NAME = process.env.MCP_SPAWN_TEE_NAME ?? "unknown";
46
+ const LOG_DIR = process.env.LOG_DIR;
47
+ const SESSION_ID = process.env.SESSION_ID;
48
+ const PLATFORM_PORT = process.env.PLATFORM_PORT;
49
+ const ENTRY = process.argv[2];
50
+ const SESSION_ID8 = SESSION_ID ? SESSION_ID.slice(0, 8) : "—";
51
+ const spawnStamp = Date.now();
52
+ // Per-session raw + lifecycle log (Task 706). Wrapper-only. Empty SESSION_ID
53
+ // (enumeration spawn) → undefined, and the per-date file is the fallback.
54
+ const perSessionPath = LOG_DIR && SESSION_ID
55
+ ? (0, node_path_1.resolve)(LOG_DIR, `mcp-${SERVER_NAME}-${SESSION_ID}.log`)
56
+ : undefined;
57
+ const perDatePath = LOG_DIR
58
+ ? (0, node_path_1.resolve)(LOG_DIR, `mcp-${SERVER_NAME}-stderr-${new Date(spawnStamp).toISOString().slice(0, 10)}.log`)
59
+ : undefined;
60
+ // Rolling tail of child stderr for op=exit. Capped so a chatty child cannot
61
+ // grow the buffer without bound.
62
+ const TAIL_CAP = 2048;
63
+ let stderrTail = "";
64
+ let bootEmitted = false;
65
+ function appendSafe(path, data) {
66
+ if (!path || !LOG_DIR)
67
+ return;
68
+ try {
69
+ (0, node_fs_1.mkdirSync)(LOG_DIR, { recursive: true });
70
+ (0, node_fs_1.appendFileSync)(path, data);
71
+ }
72
+ catch {
73
+ /* unwritable destination — never mask primary output */
74
+ }
75
+ }
76
+ // Best-effort mirror of a lifecycle line to server.log via the loopback
77
+ // log-ingest route. Fire-and-forget: the per-session file is authoritative,
78
+ // so a dropped POST (unreachable port, process exiting) loses nothing.
79
+ function postToServerLog(suffix, level) {
80
+ if (!PLATFORM_PORT)
81
+ return;
82
+ try {
83
+ const ctrl = new AbortController();
84
+ const t = setTimeout(() => ctrl.abort(), 500);
85
+ t.unref?.(); // never let the abort timer keep the wrapper's event loop alive
86
+ void fetch(`http://127.0.0.1:${PLATFORM_PORT}/api/admin/log-ingest`, {
87
+ method: "POST",
88
+ headers: { "content-type": "application/json" },
89
+ body: JSON.stringify({ tag: "mcp-helper", level, line: suffix }),
90
+ signal: ctrl.signal,
91
+ }).then(() => clearTimeout(t)).catch(() => clearTimeout(t));
92
+ }
93
+ catch {
94
+ /* fetch threw synchronously — best-effort only */
95
+ }
96
+ }
97
+ // Emit one [mcp-helper] lifecycle line: authoritative per-session file (sync,
98
+ // survives process.exit), the wrapper's own stderr (journald / Claude Code
99
+ // visibility), and a best-effort server.log mirror. `suffix` is the line body
100
+ // after the tag and carries no newline (the log-ingest route rejects newlines).
101
+ function emitLifecycle(suffix, level) {
102
+ const line = `[mcp-helper] ${suffix}\n`;
103
+ appendSafe(perSessionPath, line);
104
+ try {
105
+ process.stderr.write(line);
106
+ }
107
+ catch { /* stderr closed */ }
108
+ postToServerLog(suffix, level);
109
+ }
110
+ if (!ENTRY) {
111
+ emitLifecycle(`op=error session=${SESSION_ID8} server=${SERVER_NAME} reason="no entry given (argv[2] missing)"`, "error");
112
+ process.exit(2);
113
+ }
114
+ const child = (0, node_child_process_1.spawn)(process.execPath, [ENTRY], {
115
+ stdio: ["inherit", "inherit", "pipe"],
116
+ env: process.env,
117
+ });
118
+ emitLifecycle(`op=spawn session=${SESSION_ID8} server=${SERVER_NAME} pid=${child.pid ?? -1} entry=${ENTRY}`, "info");
119
+ child.on("error", (err) => {
120
+ const msg = err instanceof Error ? err.message : String(err);
121
+ emitLifecycle(`op=error session=${SESSION_ID8} server=${SERVER_NAME} reason=${JSON.stringify(`spawn error: ${msg}`)}`, "error");
122
+ process.exit(127);
123
+ });
124
+ if (child.stderr) {
125
+ child.stderr.on("data", (chunk) => {
126
+ appendSafe(perDatePath, chunk); // per-date raw (back-compat)
127
+ appendSafe(perSessionPath, chunk); // per-session raw (Task 706)
128
+ try {
129
+ process.stderr.write(chunk);
130
+ }
131
+ catch { /* stderr closed */ } // passthrough
132
+ stderrTail = (stderrTail + chunk.toString("utf8")).slice(-TAIL_CAP);
133
+ if (!bootEmitted) {
134
+ bootEmitted = true;
135
+ const head = chunk.toString("utf8").split("\n")[0].slice(0, 200);
136
+ emitLifecycle(`op=boot session=${SESSION_ID8} server=${SERVER_NAME} head=${JSON.stringify(head)}`, "info");
137
+ }
138
+ });
139
+ }
140
+ const forward = (signal) => { if (!child.killed)
141
+ child.kill(signal); };
142
+ process.on("SIGTERM", () => forward("SIGTERM"));
143
+ process.on("SIGINT", () => forward("SIGINT"));
144
+ // Signal → number, so a signal-killed child propagates as 128+signum (the
145
+ // shell convention). `code` is null on a signal exit, so `128 + (code ?? 0)`
146
+ // would collapse every signal to 128 and lose the signal identity in the
147
+ // wrapper's own exit status.
148
+ const SIGNUM = { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGKILL: 9, SIGTERM: 15 };
149
+ child.on("exit", (code, signal) => {
150
+ const lifetimeMs = Date.now() - spawnStamp;
151
+ const tail = stderrTail.slice(-200);
152
+ const level = signal || (code ?? 0) !== 0 ? "error" : "info";
153
+ emitLifecycle(`op=exit session=${SESSION_ID8} server=${SERVER_NAME} pid=${child.pid ?? -1} ` +
154
+ `code=${code ?? "—"} signal=${signal ?? "—"} lifetimeMs=${lifetimeMs} stderr-tail=${JSON.stringify(tail)}`, level);
155
+ if (signal)
156
+ process.exit(128 + (SIGNUM[signal] ?? 0));
157
+ process.exit(code ?? 0);
158
+ });
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}