toga-ai 1.0.244 → 1.0.246

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.
@@ -5,7 +5,7 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
5
5
  ## 1.0 framework
6
6
 
7
7
  - **library** (Library) _(framework core)_ — 10 doc(s) → [1.0/apps/library/INDEX.md](1.0/apps/library/INDEX.md)
8
- - **worker** (Worker) — 11 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
8
+ - **worker** (Worker) — 12 doc(s) → [1.0/apps/worker/INDEX.md](1.0/apps/worker/INDEX.md)
9
9
  - **togadesk** (TOGa Desk) — 8 doc(s) → [1.0/apps/togadesk/INDEX.md](1.0/apps/togadesk/INDEX.md)
10
10
  - **togaview** (TOGa View) — 6 doc(s) → [1.0/apps/togaview/INDEX.md](1.0/apps/togaview/INDEX.md)
11
11
  - **webhook** (Webhook) — 1 doc(s) → [1.0/apps/webhook/INDEX.md](1.0/apps/webhook/INDEX.md)
@@ -3,6 +3,7 @@
3
3
  | Doc | Framework | Summary | Files |
4
4
  |-----|-----------|---------|-------|
5
5
  | [Prudential: Dell ASN units PRE/POST interceptor (legacy key + flat tracking)](features/dell-asn-units-interceptor.md) | 2.0 | After the tracking-number bridge migration, the ASN unit route was renamed (`advance-shipping-notice-units` → `advance-shipping-notice-item-units`), so the inhe | _underscore/Model/Prudential/AdvanceShippingNotice.php, dbchanges2/Client_Prudential/2026-06-10 - AsnUnitsInterceptor.sql |
6
+ | [Prudential: Dell LCH IOP transmissions (LCHRequestV2)](features/dell-lch-iop-transmissions.md) | 1.0 | Outbound order transmissions from the 1.0 worker tier to Dell's Lifecycle Hub (LCH) ITSM integration. | library/app/api/delllch.php, worker/crons/toga2/prudential/transmissions_to_dell.php, worker/crons/toga2/prudential_beta/transmissions_to_dell_india.php, worker/crons/toga2/prudential_beta/transmissions_to_dell_ireland.php, worker/crons/toga2/prudential_beta/transmissions_to_dell_usa.php |
6
7
  | [Prudential: Service Request Regional Address Validation](features/service-request-address-validation.md) | 2.0 | The `prePost` interceptor on `_Model_Prudential_ServiceRequest` validates `deliverToAddress` fields differently depending on which Prudential regional customer | _underscore/Model/Prudential/ServiceRequest.php |
7
8
  | [Prudential Order Shipped Email — transmit_ordershipped_updates_prudential.php](features/transmit-ordershipped-email.md) | 1.0 | Cron script that transmits "Order Shipped" updates to ServiceNow (RITM) and sends a shipped notification email to the end user. | worker/crons/toga2/prudential/transmit_ordershipped_updates_prudential.php |
8
9
  | [Prudential Financial](profile.md) | 2.0 | Prudential is a TOGA client whose device-fulfillment flow is driven by **Dell** via the Dell API (`Client_Prudential.Apis.id = 2`). | |
@@ -0,0 +1,124 @@
1
+ ---
2
+ title: "Prudential: Dell LCH IOP transmissions (LCHRequestV2)"
3
+ framework: "1.0"
4
+ repo: worker
5
+ project: Worker
6
+ client: prudential
7
+ type: client-feature
8
+ status: active
9
+ updated: 2026-06-30
10
+ owners: ["rgirish"]
11
+ files:
12
+ - library/app/api/delllch.php
13
+ - worker/crons/toga2/prudential/transmissions_to_dell.php
14
+ - worker/crons/toga2/prudential_beta/transmissions_to_dell_india.php
15
+ - worker/crons/toga2/prudential_beta/transmissions_to_dell_ireland.php
16
+ - worker/crons/toga2/prudential_beta/transmissions_to_dell_usa.php
17
+ related:
18
+ - ../profile.md
19
+ - dell-asn-units-interceptor.md
20
+ ---
21
+
22
+ ## Summary
23
+
24
+ Outbound order transmissions from the 1.0 worker tier to Dell's Lifecycle Hub (LCH) ITSM
25
+ integration. As of Dell's **May 2025 IOP spec update**, the deprecated `LCHRequest` endpoint
26
+ was replaced by **`LCHRequestV2`** — a re-shaped payload with an explicit `requestEvent`
27
+ field. All four Prudential transmission scripts (3 beta regional + 1 production) and the 1.0
28
+ library client (`App_Api_Delllch`) were migrated. The OAuth and base-URL layer is unchanged;
29
+ only the request route and payload schema changed.
30
+
31
+ This is the **outbound** counterpart to the 2.0 inbound Dell ASN flow (see
32
+ `dell-asn-units-interceptor.md`).
33
+
34
+ ## How it works
35
+
36
+ - **Route:** `api/v2/request/LCHRequest` → **`api/v2/request/LCHRequestV2`** in all four
37
+ transmission scripts.
38
+ - **Base URL / auth unchanged:** OAuth 2.0 `client_credentials` flow and base endpoints
39
+ (`iopv2/` prod, `iopv2np/` test) in `App_Api_Delllch::initialize()` are unchanged.
40
+ - **Event model (the key change):** the new schema adds a required **`requestEvent`** field —
41
+ `'Create'` for new orders, `'Update'` for updates, `'Cancel'` for cancellations. This
42
+ replaces the old overloaded `svcOrderType` that previously signalled both the SR type AND
43
+ the event (`'CANCEL'`/`'UPDATE'`). In V2, `requestType` carries the SR type only
44
+ (Refresh / Breakfix / Reclaim / Bulk).
45
+ - **Optional pre-submission validation:** `App_Api_Delllch::validateLCHRequestV2(array $payload, bool $isProduction = true): mixed`
46
+ calls `api/v2/validate/LCHRequestV2` — returns 200 on a valid payload, `422` with a
47
+ `problems[]` / `issues[]` array on schema violations. Useful for debugging a new payload
48
+ shape before sending a real order.
49
+
50
+ ### Payload schema migration (old → new)
51
+
52
+ | Old (`LCHRequest`) | New (`LCHRequestV2`) |
53
+ | --- | --- |
54
+ | `svcOrderReqNumber` | `requestNumber` |
55
+ | `svcOrderType` (overloaded: type + event) | `requestType` (Refresh/Breakfix/Reclaim/Bulk only) + `requestEvent` (Create/Update/Cancel) |
56
+ | `svcOrderPriority` | `priority` |
57
+ | `customerName` / `customerTelephone` / `customerEmail` / `employeeID` / `employeeType` (flat) | `employee{}` object: `employee.name` / `.phone` / `.email` / `.id` / `.type` |
58
+ | `addresses[]` with `Ship To` element | `shipAddress{}` flat object |
59
+ | `addresses[]` with `Return To` element | `returnAddress{}` flat object (`addressTo`, `careOf`, `address1`, `address2`, `city`, `state`, `postalCode`, `countryCode`) |
60
+ | `returnItems[].itemType` / `.itemSerialNumber` / `.itemAssetTag` | `returnItems[].type` / `.serialNumber` / `.assetTag` |
61
+ | `updateDate` (UPDATE events) | `deliveryDate` |
62
+ | `updateReason` | `reason` |
63
+
64
+ **Removed fields (no longer in the V2 schema):** `lob`, `msgID`, `deviceType`,
65
+ `organizationalUnit`, `shippingMethod`, `profile`, `imageType`, `modeledAfter`,
66
+ `hdRetentionIndicator`, `cidCoverage`, `cidCaseIndicator`.
67
+
68
+ ### SR-type / branch behavior
69
+
70
+ - **LABEL SR type:** old code set `svcOrderType='RECLAIM'` mid-payload; new code sets
71
+ `requestType='Reclaim'` in the LABEL branch.
72
+ - **RECLAIM:** `kitProfile='PACKAGING'` for all countries.
73
+ - **THIN CLIENT guard removed:** the old `if deviceType == 'THIN CLIENT' then deviceType = 'LAPTOP'`
74
+ mapping was deleted — `deviceType` no longer exists in the V2 schema.
75
+
76
+ ### Country-specific logic (preserved across the migration)
77
+
78
+ - **India:** `employee.type='NA'` hardcoded for all SR types. India device tier map
79
+ (`Knowledge Worker`→`Standard Notebook`, `Developer`→`Developer Notebook`) preserved in the
80
+ BREAKFIX / REFRESH / else branches.
81
+ - **Ireland / USA:** `employee.type` initialised to `'STANDARD'` at base payload.
82
+ Brownfield/Apple device lookups via ServiceNow (`App_Api_Prudential::send()`) preserved.
83
+ Return address uses the `returnAddress{}` flat object built from
84
+ `$returnToAddress` / `$returnToAddressApple` arrays via `array_merge()` with an `addressTo`
85
+ override.
86
+
87
+ ## Deployment order (Prudential standard: beta before production)
88
+
89
+ Beta scripts (`crons/toga2/prudential_beta/`) are migrated and verified **first**; only then
90
+ is the production script (`crons/toga2/prudential/transmissions_to_dell.php`,
91
+ `$inProduction = true`) touched. Beta scripts run against the beta DB
92
+ (`db_beta_toga2core` / `db_client_prudential`) so failures never reach live customer orders.
93
+ This is the established pattern for all Prudential script changes.
94
+
95
+ ## Verification plan
96
+
97
+ 1. Run beta scripts against the beta DB; check `Logs_Prudential` API table for the outbound
98
+ request body and Dell's 200/202 response.
99
+ 2. Optionally call `App_Api_Delllch::validateLCHRequestV2()` on a sample payload to pre-check
100
+ the schema before sending a real order.
101
+ 3. After beta passes a full order cycle (New → shipped), confirm the production script is live.
102
+
103
+ ## Gotchas
104
+ - `requestType` is the SR type only (Refresh/Breakfix/Reclaim/Bulk) — do **not** put the event
105
+ there. Event signalling moved to the separate required `requestEvent` field
106
+ (Create/Update/Cancel). Conflating them is the easiest way to reproduce the old overloaded
107
+ `svcOrderType` bug under the new schema.
108
+ - Dell deprecated `LCHRequest`; any script still POSTing to the old route will fail. All four
109
+ transmission scripts must point at `LCHRequestV2`.
110
+ - The removed fields (e.g. `deviceType`, `lob`, `imageType`) will be rejected by V2 validation —
111
+ do not reintroduce them.
112
+
113
+ ## Change history
114
+ - 2026-06-30 — Migrated all Prudential Dell transmissions (3 beta regional + production) and
115
+ `App_Api_Delllch` from deprecated `LCHRequest` to `LCHRequestV2` per Dell's May 2025 IOP
116
+ spec: re-shaped payload (employee/ship/return objects, renamed return-item keys), new
117
+ required `requestEvent` event field replacing overloaded `svcOrderType`, removed dropped
118
+ fields and the THIN CLIENT device guard, added `validateLCHRequestV2()` pre-submission
119
+ validation helper. Country-specific (India/Ireland/USA) device-tier and address logic
120
+ preserved. (rgirish)
121
+
122
+ ## Related docs
123
+ - Prudential: Dell ASN units interceptor (inbound 2.0 counterpart).
124
+ - Prudential profile.
@@ -6,16 +6,19 @@ apps:
6
6
  - api2
7
7
  - dbchanges2
8
8
  - websocket
9
+ - worker
10
+ - library
9
11
  project: _Underscore
10
12
  client: prudential
11
13
  type: profile
12
14
  status: active
13
- updated: 2026-06-29
15
+ updated: 2026-06-30
14
16
  owners: ["jcardinal", "rgirish"]
15
17
  files: []
16
18
  related:
17
19
  - features/dell-asn-units-interceptor.md
18
20
  - features/service-request-address-validation.md
21
+ - features/dell-lch-iop-transmissions.md
19
22
  ---
20
23
 
21
24
  ## Summary
@@ -33,6 +36,9 @@ order-status transmissions.
33
36
  - **Outbound (worker crons):** `transmissions_to_netsuite.php`, `transmit_ordershipped_updates_prudential.php`,
34
37
  `transmit_closecomplete_updates_prudential.php`, `transmit_order_delivered_updates_from_fedex_toga2.php`,
35
38
  `update_tracking_number_from_netsuite_to_toga.php`, `manually_insert_ASN.php`.
39
+ - **Outbound (Dell LCH ITSM):** `transmissions_to_dell.php` (prod) + `prudential_beta/transmissions_to_dell_{india,ireland,usa}.php`
40
+ POST to Dell's LCH `LCHRequestV2` endpoint via the 1.0 `App_Api_Delllch` client. See the
41
+ Dell LCH IOP transmissions feature doc.
36
42
 
37
43
  ## Gotchas
38
44
  - Dell will not change their payload shape — see the Dell ASN units interceptor feature doc for the
@@ -46,5 +52,6 @@ order-status transmissions.
46
52
 
47
53
  ## Related docs
48
54
  - Dell ASN units interceptor.
55
+ - Dell LCH IOP transmissions (LCHRequestV2, outbound 1.0).
49
56
  - 2.0 _underscore: Tracking-Number Bridge Migration.
50
57
  - features/transmit-ordershipped-email.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.244",
3
+ "version": "1.0.246",
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",
@@ -1,69 +0,0 @@
1
- ---
2
- type: session
3
- slug: team-shared-sessions
4
- title: Team-shared sessions + skill discovery
5
- author: jcardinal
6
- repos: [_underscore]
7
- framework: "2.0"
8
- client: shared
9
- status: active
10
- created: 2026-06-23
11
- updated: 2026-06-23
12
- ---
13
-
14
- # Session: team-shared-sessions
15
- **Date:** 2026-06-23
16
- **Project/Repo:** toga-tech harness (team `claude` repo) — not an application repo
17
- **Task:** Make /session-save and /session-resume store sessions in the team knowledge repo (knowledge/sessions/) so one developer can save an in-progress session and another can resume it, with automatic push/pull, a way to list sessions, and manual delete of stale ones — plus a /team-skills discovery skill.
18
-
19
- ---
20
-
21
- ## What WORKED
22
- - Added five subcommands to `knowledge.js` (committed to `_main`, `44f740d`): `session-save`, `session-list`, `session-show`, `session-delete`, `skills`. Verified: `node -c knowledge.js` passes; `skills --installed=d:/WWW/.claude/skills` correctly flags `worker2-action` as local-only; `session-list` empty + populated both render.
23
- - Key design win confirmed during exploration: `knowledge/sessions/` rides the existing `publish` git rails for free, AND `allDocs()` only walks `1.0/ 2.0/ standalone/ clients/`, so `validate`/`index` ignore `sessions/` with zero exemption code. `node knowledge.js validate` → "OK (24 repos)" with a session file present.
24
- - `session-list`/`show`/`delete` read from `origin/<branch>` via `git ls-tree`/`git show` after a `git fetch` — shows teammates' pushed sessions without touching the working tree. Verified working-tree fallback when origin has none.
25
- - All three `session-save` guard paths reject BEFORE any push: outside-dir → `ABORT_OUTSIDE_SESSIONS`; missing keys → `INVALID — missing frontmatter: ...`; planted `AKIA...` key → `SECRET — line N: AWS access key id`.
26
- - Rewrote `skills/session-save/SKILL.md` (team-by-default + local fallback) and `skills/session-resume/SKILL.md` (fetch-first; `latest`/`<slug-or-id>`/`list`/`delete <id>`; briefing names the author).
27
- - Created `skills/team-skills/SKILL.md` (read-only discovery; pairs with `/sync-team-skills`).
28
- - Updated `scripts/hooks/session-start.js`: time-boxed (3500ms) `teamSessions()` peek that prints available team sessions; fails silent offline. `node -c` passes; runs clean (silent when no sessions — correct).
29
- - Documented `type: session` + `knowledge/sessions/` in `knowledge/CONVENTIONS.md`.
30
- - Synced all skills to `d:\WWW\.claude\skills` via `node sync-skills.js d:/WWW` (9 skills incl. team-skills) and copied the updated hook locally.
31
- - Committed only the 6 intended files + new `team-skills/` to `_main` and pushed (had to `git stash push -- CLAUDE.md` first because of a pre-existing unstaged CLAUDE.md edit; popped it back after).
32
-
33
- ## What did NOT work — DO NOT RETRY THESE
34
- - `git rebase origin/_main` failed with `error: cannot rebase: You have unstaged changes` because `CLAUDE.md` had a PRE-EXISTING (not-ours) modification in the team repo working tree. FIX that worked: `git stash push -- CLAUDE.md`, rebase+push, then `git stash pop`. Do NOT commit CLAUDE.md to "fix" this — that edit is not ours.
35
- - Do NOT treat `toga-tech/.claude/skills/` as the source of truth — it is untracked/gitignored (a local install). The COMMITTED source is the root-level `skills/`, `knowledge.js`, `sync-skills.js`, `scripts/hooks/`. Editing `.claude/` copies would not ship.
36
-
37
- ## Not tried yet (candidates for next session)
38
- - Optional: `knowledge.js skills --write-readme` (or fold into `sync-skills.js`) to regenerate the stale README skill table from frontmatter automatically. Explicitly deferred this session.
39
- - End-to-end cross-developer resume has only been simulated locally (origin had no sessions during testing). Once this very session file is pushed, verify `/session-resume team-shared-sessions` from a fresh clone / another machine.
40
- - `session-list` does a network `git fetch` (6s timeout) on every call; the startup hook bounds it to 3.5s. Consider a `--no-fetch` fast path for the hook if startup latency is felt in practice.
41
-
42
- ## Current file state
43
- | File | Status | Notes |
44
- |------|--------|-------|
45
- | toga-tech/knowledge.js | Modified, committed `44f740d` | +session-* and skills subcommands, shared `pushStaged()` helper |
46
- | toga-tech/skills/session-save/SKILL.md | Modified, committed | team-by-default save + push, local fallback |
47
- | toga-tech/skills/session-resume/SKILL.md | Modified, committed | fetch-first; latest/slug/list/delete; author in briefing |
48
- | toga-tech/skills/team-skills/SKILL.md | Created, committed | new discovery skill |
49
- | toga-tech/scripts/hooks/session-start.js | Modified, committed | team-session startup peek |
50
- | toga-tech/knowledge/CONVENTIONS.md | Modified, committed | type: session schema + sessions/ layout |
51
- | d:/WWW/.claude/skills/* + hooks/toga/session-start.js | Synced locally | for immediate local use (gitignored install) |
52
- | toga-tech/CLAUDE.md | Pre-existing unstaged edit (NOT ours) | left untouched; was stashed/popped during push |
53
-
54
- ## Decisions made
55
- - Store sessions under `knowledge/sessions/` (not a new top-level dir) — reuses `publish` staging + `npx toga-ai` distribution with no new git plumbing. Rejected: separate branch per session (merge complexity), separate sync mechanism.
56
- - One file per session named `YYYY-MM-DD-<slug>-<author>.md` — author suffix prevents slug collisions between developers.
57
- - Team-by-default save; local `~/.claude/session-data` only as offline/no-clone fallback. (User decision.)
58
- - Cleanup = manual delete + age flagging (`STALE` > 14 days); no auto-deletion. (User decision.)
59
- - SessionStart hook surfaces team sessions with a timeout-guarded fetch. (User decision.)
60
- - Sessions are NOT knowledge docs: they get their own lightweight frontmatter + secret scan in `session-save`, and are deliberately excluded from `validate`/`index` (free, via `allDocs()` scope).
61
-
62
- ## Blockers
63
- none
64
-
65
- ## Exact next step
66
- > From a fresh clone or another machine, run `/session-resume team-shared-sessions` and confirm it fetches and renders this session's briefing — the real cross-developer round-trip that was only simulated locally this session.
67
-
68
- ---
69
- _Saved by /session-save on 2026-06-23_