toga-ai 1.0.111 → 1.0.112

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.
@@ -7,5 +7,5 @@
7
7
  | [Creating Worker Actions](features/creating-worker-actions.md) | How to add a new callable Worker action — a PHP class whose `public static` methods are invoked as background jobs (via webhook, cron, or `_Worker::runTask()`). | worker2/Worker/, worker2/Controller/Index.php, _underscore/Worker.php |
8
8
  | [Elite Freshservice Sync (worker2)](features/elite-freshservice-sync.md) | `_Worker_Elite` processes Freshservice webhook events and syncs them into TOGA 2. | worker2/Worker/Elite.php, worker2/Config/dev-kmaramreddy-laptop.ini |
9
9
  | [Monitoring Framework (Orchestrator + Child Monitors)](features/monitoring-framework.md) | A unified, DB-driven monitoring framework for business-critical data flows (Compass POs, Prudential asset imports, AIG closed claims, …). | worker2/Worker/Monitor.php, worker2/Worker/Monitors/, worker2/Worker/Notification/Email.php, dbchanges2/Core/2026-05-21 - Monitors.sql |
10
- | [NetSuite → TOGA Opportunity Sync (API Message Queue + worker2 webhook)](features/netsuite-opportunity-sync.md) | Outbound sync from NetSuite to TOGA for the record types the Forecast2 importer pulls (opportunities first; sales/items/etc. | worker2/Worker/Netsuite.php, worker2/Worker/Netsuite/Opportunity.php, worker2/Controller/Index.php, _underscore/Worker.php, test/@dave/NetSuite/api-message-queue/lib_amq_queue.js, test/@dave/NetSuite/api-message-queue/ue_api_msg_queue_enqueue.js, test/@dave/NetSuite/api-message-queue/ue_amq_drain.js, test/@dave/NetSuite/api-message-queue/ss_amq_drain.js, test/@dave/NetSuite/api-message-queue/DEPLOY_RUNBOOK.md, test/@dave/clickup/backfill_opportunity_numbers.php, worker/crons/toga2/forecast2/common_import_sales_from_netsuite.php |
10
+ | [NetSuite → TOGA Opportunity Sync (API Message Queue + worker2 webhook)](features/netsuite-opportunity-sync.md) | Outbound sync from NetSuite to TOGA for the record types the Forecast2 importer pulls (opportunities first; sales/items/etc. | worker2/Worker/Netsuite.php, worker2/Worker/Netsuite/Opportunity.php, worker2/Controller/Index.php, _underscore/Worker.php, test/@dave/NetSuite/api-message-queue/lib_amq_queue.js, test/@dave/NetSuite/api-message-queue/ue_api_msg_queue_enqueue.js, test/@dave/NetSuite/api-message-queue/ue_amq_drain.js, test/@dave/NetSuite/api-message-queue/ss_amq_drain.js, test/@dave/NetSuite/api-message-queue/DEPLOY_RUNBOOK.md, test/@dave/clickup/backfill_opportunity_numbers.php, test/@dave/clickup/probe_opportunity_fields.php, worker/crons/toga2/forecast2/common_import_sales_from_netsuite.php |
11
11
  | [Teams Meeting Transcript Export](features/teams-transcript-export.md) | `_Worker_Team_Transcripts` (action `Team/Transcripts/Export`) polls Microsoft Graph for Teams meeting transcripts produced by a set of organizers, classifies ea | worker2/Worker/Team/Transcripts.php, worker2/Config/production.ini |
@@ -19,6 +19,7 @@ files:
19
19
  - test/@dave/NetSuite/api-message-queue/ss_amq_drain.js
20
20
  - test/@dave/NetSuite/api-message-queue/DEPLOY_RUNBOOK.md
21
21
  - test/@dave/clickup/backfill_opportunity_numbers.php
22
+ - test/@dave/clickup/probe_opportunity_fields.php
22
23
  - worker/crons/toga2/forecast2/common_import_sales_from_netsuite.php
23
24
  related:
24
25
  - ../architecture.md
@@ -97,6 +98,26 @@ Shared helpers: `buildCustomFields()` (the field array, used by both create and
97
98
 
98
99
  - **Task name** = `{opportunityNumber} — {customer} — {title}`, e.g.
99
100
  `60533 — 560 Endeavor Health — Data Center Facility Consolidation Services` (empty parts dropped).
101
+ - **Task description** = a fixed structured block built by `buildDescription()`:
102
+ ```
103
+ Company: 560 Endeavor Health
104
+ Opportunity: 60533 — Data Center Facility Consolidation Services
105
+ Amount: 750000
106
+ Expected Close: Tue Nov 24 2026 00:00:00 GMT-0800 (PST)
107
+ Stage: 10%
108
+
109
+ Details:
110
+ <memo>
111
+
112
+ NetSuite Internal ID: 5483750
113
+ ```
114
+ Field sources (confirmed against opp 5483750 via `test/@dave/clickup/probe_opportunity_fields.php`):
115
+ Company = `entity.refName`; Opportunity = `tranId` + `title`; Amount = `projectedTotal`
116
+ (`formatAmount()`, plain number); Expected Close = `expectedCloseDate` (`formatExpectedClose()` —
117
+ JS `Date.toString()` style in **America/Los_Angeles**, e.g. `GMT-0800 (PST)`, auto PST/PDT by date);
118
+ Stage = `entityStatus.refName` (the percent string like "10%", NOT `probability`); Details = `memo`
119
+ (which carries NetSuite's "Missing Required Details…" fallback verbatim for pre-mandatory records).
120
+ The blank separator lines are a single space. Rendered verbatim — no trailing-period normalization.
100
121
  - **Custom-field value mapping** (the non-obvious part — these were swapped before 2026-06-16):
101
122
  `Opportunity #` (`a5529cdc-…`) ← `tranId`; `Customer #` (`170dc118-…`) ← `entity->refName`
102
123
  (the customer **name**, deliberately — not the NetSuite customer number). Plus `Sales Rep`,
@@ -206,6 +227,10 @@ None — platform-wide Forecast sync.
206
227
  (`Created`,`Pending`,`Retry`,`Sending`) — omitting `Created` silently matches nothing (`candidates:0`).
207
228
 
208
229
  ## Change history
230
+ - 2026-06-16 — ClickUp task description switched to a structured block (`buildDescription()` +
231
+ `formatAmount()`/`formatExpectedClose()`): Company/Opportunity/Amount/Expected Close/Stage/Details/
232
+ Internal ID. Field sources confirmed via `probe_opportunity_fields.php`; Expected Close rendered
233
+ JS-style in Pacific to match the legacy format; Details = memo. (dfranks)
209
234
  - 2026-06-16 — ClickUp dedup implemented (find-or-update by `Opportunity #`, no DB column): edits
210
235
  now update the existing task instead of duplicating. Added `findClickupTaskByOpportunityNumber()`,
211
236
  `updateTask()`, and shared `buildCustomFields()`/`resolvePresalesUserId()`/`cacheClickupUser()`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.111",
3
+ "version": "1.0.112",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",