toga-ai 1.0.158 → 1.0.159

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.
@@ -46,4 +46,5 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
46
46
  - **Quad Graphics** (`quad`) → [clients/quad/INDEX.md](clients/quad/INDEX.md)
47
47
  - **Rate** (`rate`) → [clients/rate/INDEX.md](clients/rate/INDEX.md)
48
48
  - **Tow Foundation** (`tow-foundation`) → [clients/tow-foundation/INDEX.md](clients/tow-foundation/INDEX.md)
49
+ - **Walmart Client Profile** (`walmart`) → [clients/walmart/INDEX.md](clients/walmart/INDEX.md)
49
50
 
@@ -0,0 +1,7 @@
1
+ # Client: Walmart Client Profile `walmart`
2
+
3
+ | Doc | Framework | Summary | Files |
4
+ |-----|-----------|---------|-------|
5
+ | [Walmart Domain Migration — walmarttechservices.com to walmart.truesolutions.com](features/domain-migration.md) | 1.0 | `walmarttechservices.com` was decommissioned and all traffic/functionality migrated to `walmart.truesolutions.com` via the `walmart-activate` repo on AWS Elasti | walmart-activate/.htaccess, walmart-activate/mvc/home/get.php, walmart-activate/mvc/register/get.php, walmart-activate/mvc/register/post.php, walmart-activate/health/index.php, worker/crons/notifications/send_blast_email.php, library/app/model/servicerequest.php, library/app/client/walmart.php |
6
+ | [Walmart Service Registration Route](features/registration-route.md) | 1.0 | `/register` is the customer-facing service registration form at `walmart.truesolutions.com/register`. | walmart-activate/mvc/register/get.php, walmart-activate/mvc/register/post.php, library/app/client/walmart.php, library/app/string.php |
7
+ | [Walmart Client Profile](profile.md) | 1.0 | Walmart is client ID **7** in `TOGA.Clients`. | library/app/client/walmart.php, library/app/email/walmartb2c.php, walmart-activate/_/app/framework.php |
@@ -0,0 +1,91 @@
1
+ ---
2
+ title: Walmart Domain Migration — walmarttechservices.com to walmart.truesolutions.com
3
+ framework: "1.0"
4
+ project: TOGa
5
+ client: walmart
6
+ type: client-feature
7
+ status: active
8
+ updated: 2026-06-23
9
+ owners: []
10
+ files:
11
+ - walmart-activate/.htaccess
12
+ - walmart-activate/mvc/home/get.php
13
+ - walmart-activate/mvc/register/get.php
14
+ - walmart-activate/mvc/register/post.php
15
+ - walmart-activate/health/index.php
16
+ - worker/crons/notifications/send_blast_email.php
17
+ - library/app/model/servicerequest.php
18
+ - library/app/client/walmart.php
19
+ related:
20
+ - clients/walmart/profile.md
21
+ - clients/walmart/features/registration-route.md
22
+ ---
23
+
24
+ ## Summary
25
+
26
+ `walmarttechservices.com` was decommissioned and all traffic/functionality migrated to `walmart.truesolutions.com` via the `walmart-activate` repo on AWS Elastic Beanstalk. The old domain was flagged as a phishing site by browsers.
27
+
28
+ ## New routes on walmart.truesolutions.com
29
+
30
+ | URL | File | Purpose |
31
+ |-----|------|---------|
32
+ | `/` | `.htaccess` RewriteRule | 302 redirect → `/home` |
33
+ | `/home` | `mvc/home/get.php` | Marketing page |
34
+ | `/register` | `mvc/register/get.php` + `post.php` | Service registration form |
35
+ | `/health` | `health/index.php` | ELB health check (real directory, bypasses rewrite) |
36
+ | `/activate` | existing — untouched | PIN activation flow |
37
+
38
+ ## Root URL redirect
39
+
40
+ `.htaccess` has a dedicated rule BEFORE the catch-all:
41
+ ```apache
42
+ RewriteRule ^$ /home [R=302,L]
43
+ ```
44
+ Required because `/` is a real directory — Apache's `!-d` condition skips the catch-all and serves DirectoryIndex, which caused a 404 without this rule.
45
+
46
+ ## Code changes across repos
47
+
48
+ ### walmart-activate
49
+ - `.htaccess` — root redirect rule added
50
+ - `mvc/home/get.php` — marketing page (migrated from walmarttechservices.com)
51
+ - `mvc/register/get.php` — "Warranty Registration" → "Service Registration"; image paths made absolute
52
+ - `common/header.php` — logo image paths made absolute (relative paths broke on URLs with trailing slash)
53
+ - `health/index.php` — ELB health check: `http_response_code(200); echo 'ok';`
54
+
55
+ ### worker
56
+ - `crons/notifications/send_blast_email.php` line 74 — hardcoded URL updated:
57
+ - Old: `https://www.walmarttechservices.com/?{enc}`
58
+ - New: `https://walmart.truesolutions.com/register?{enc}=`
59
+
60
+ ### library
61
+ - `app/model/servicerequest.php` lines 5009 & 5021 — payment email image URLs updated from `walmarttechservices.com/assets/images/` to `walmart.truesolutions.com/assets/img/`
62
+
63
+ ## DB update (manual — done once on prod)
64
+
65
+ ```sql
66
+ UPDATE TOGA.Clients
67
+ SET requireRegistrationUrl = 'https://walmart.truesolutions.com/register'
68
+ WHERE id = 7
69
+ ```
70
+ Fixes `App_Client_Walmart::sendRegistrationEmail()` and `toga_walmart_order_reminder.php` in one shot — both read this value from the DB.
71
+
72
+ ## Emails that send registration links
73
+
74
+ | File | How URL is built | Status |
75
+ |------|-----------------|--------|
76
+ | `worker/crons/notifications/send_blast_email.php` | Hardcoded | Fixed in code |
77
+ | `worker/crons/toga/toga_walmart_order_reminder.php` | DB `requireRegistrationUrl` | Fixed by DB update |
78
+ | `library/app/client/walmart.php` `sendRegistrationEmail()` | DB `requireRegistrationUrl` | Fixed by DB update |
79
+
80
+ ## Gotchas
81
+
82
+ - Image paths in `walmart-activate` views must be **absolute** (`/assets/img/...`). Relative paths break when the URL has a trailing slash (e.g. `/register/`).
83
+ - `health/` is a real directory — Apache serves `health/index.php` directly, bypassing the MVC rewrite. Intentional.
84
+ - `toga/app/servicerequests/view.php` and togarefresh variants contain `str_replace('https://www.walmarttechservices.com', ...)` wrapped in `if (App_Registry::inDevMode())` — dev-only, no production impact.
85
+ - Old repos (`walmarttechservices`, `walmart-tech-services`) were archived on GitHub after prod was confirmed working.
86
+
87
+ ## Change history
88
+
89
+ | Date | Change |
90
+ |------|--------|
91
+ | 2026-06-23 | Migration completed; all three repos updated, DB updated, old repos archived |
@@ -0,0 +1,86 @@
1
+ ---
2
+ title: Walmart Service Registration Route
3
+ framework: "1.0"
4
+ project: TOGa
5
+ client: walmart
6
+ type: client-feature
7
+ status: active
8
+ updated: 2026-06-23
9
+ owners: []
10
+ files:
11
+ - walmart-activate/mvc/register/get.php
12
+ - walmart-activate/mvc/register/post.php
13
+ - library/app/client/walmart.php
14
+ - library/app/string.php
15
+ related:
16
+ - clients/walmart/profile.md
17
+ - clients/walmart/features/domain-migration.md
18
+ ---
19
+
20
+ ## Summary
21
+
22
+ `/register` is the customer-facing service registration form at `walmart.truesolutions.com/register`. Customers land here via an encrypted link sent in the blast email or order reminder. They confirm their contact info, which triggers a confirmation email.
23
+
24
+ ## URL format
25
+
26
+ The encrypted service request ID is the **query param KEY** (not the value):
27
+
28
+ ```
29
+ https://walmart.truesolutions.com/register?aB3xK9mPqR2vNwLz=
30
+ ```
31
+
32
+ The `=` at the end is intentional — the encrypted string is the key, the value is empty.
33
+
34
+ Built in code as:
35
+ ```php
36
+ $link = 'https://walmart.truesolutions.com/register?' . App_String::encryptString($serviceRequestId) . '=';
37
+ ```
38
+
39
+ ## How the key is parsed (GET handler)
40
+
41
+ `mvc/register/get.php` extracts the encrypted ID by iterating `$_GET` and taking the first key that is not `success` or `error`:
42
+
43
+ ```php
44
+ foreach ($_GET as $key => $val) {
45
+ if ($key !== 'success' && $key !== 'error') {
46
+ $encryptedServiceRequestId = $key;
47
+ break;
48
+ }
49
+ }
50
+ ```
51
+
52
+ Then decrypts: `$serviceRequestId = (int) App_String::decrypt($encryptedServiceRequestId);`
53
+
54
+ ## POST handler flow (mvc/register/post.php)
55
+
56
+ 1. Extract encrypted ID from `$_GET` (same loop as GET handler)
57
+ 2. Validate `firstName`, `lastName`, `phoneNumber`, `emailAddress` — redirect to `?{enc}=&error=1` if any missing
58
+ 3. Decrypt ID → `$serviceRequestId` — redirect to error if decrypt fails
59
+ 4. Update `Contacts` record via `App_Model_Toga_Contact`
60
+ 5. Mark `ServiceRequests.confirmed = true`
61
+ 6. Query `ServiceRequestItems` to check `requiresAgentDownload`
62
+ 7. Send confirmation email via `App_Email_WalmartB2C`:
63
+ - `requiresAgentDownload = 1` → "Download Tech Support App" email with agent download link
64
+ - Otherwise → "Call us to begin your service" email
65
+ 8. Redirect to `?{enc}=&success=1`
66
+
67
+ ## Success / error states
68
+
69
+ | Query string | Meaning |
70
+ |-------------|---------|
71
+ | `?{enc}=` | Fresh form load |
72
+ | `?{enc}=&success=1` | Registration submitted successfully |
73
+ | `?{enc}=&error=1` | Validation failed or decrypt failed |
74
+
75
+ ## Gotchas
76
+
77
+ - The encrypted ID is the **key**, not the value. `?enc=value` format would break parsing.
78
+ - `App_String::encryptString()` and `App_String::decrypt()` are the inverse pair — do not mix with other encryption helpers.
79
+ - Registration URL base comes from `TOGA.Clients.requireRegistrationUrl` for client id=7. If this DB field is wrong, all registration links break.
80
+ - Image paths in the view must use absolute paths (`/assets/img/...`) — relative paths break on URLs with a trailing slash.
81
+
82
+ ## Change history
83
+
84
+ | Date | Change |
85
+ |------|--------|
86
+ | 2026-06-23 | Route documented; migrated from walmarttechservices.com to walmart.truesolutions.com/register |
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: Walmart Client Profile
3
+ framework: "1.0"
4
+ project: TOGa
5
+ client: walmart
6
+ type: client-feature
7
+ status: active
8
+ updated: 2026-06-23
9
+ owners: []
10
+ files:
11
+ - library/app/client/walmart.php
12
+ - library/app/email/walmartb2c.php
13
+ - walmart-activate/_/app/framework.php
14
+ related:
15
+ - clients/walmart/features/domain-migration.md
16
+ - clients/walmart/features/registration-route.md
17
+ ---
18
+
19
+ ## Summary
20
+
21
+ Walmart is client ID **7** in `TOGA.Clients`. All Walmart B2C tech services (service registration, PIN activation, blast emails, order reminders) run through the `walmart-activate` app at `walmart.truesolutions.com`.
22
+
23
+ ## Key identifiers
24
+
25
+ | Field | Value |
26
+ |-------|-------|
27
+ | `TOGA.Clients.id` | `7` |
28
+ | Primary domain | `walmart.truesolutions.com` |
29
+ | Former domain | `walmarttechservices.com` (decommissioned 2026) |
30
+ | Email from | `walmarttechservices@truenetworksolutions.com` |
31
+ | Support phone | (888) 725-4544 |
32
+
33
+ ## Key files
34
+
35
+ - `library/app/client/walmart.php` — `App_Client_Walmart` — sends registration confirmation emails; reads `requireRegistrationUrl` from `TOGA.Clients` to build the registration link
36
+ - `library/app/email/walmartb2c.php` — `App_Email_WalmartB2C` — base email class for all Walmart B2C transactional emails
37
+ - `walmart-activate/` — PHP MVC app serving all customer-facing Walmart routes
38
+
39
+ ## DB field: requireRegistrationUrl
40
+
41
+ `TOGA.Clients.requireRegistrationUrl` for id=7 must be:
42
+ ```
43
+ https://walmart.truesolutions.com/register
44
+ ```
45
+ Used by `App_Client_Walmart::sendRegistrationEmail()` and `worker/crons/toga/toga_walmart_order_reminder.php` to build registration links sent to customers.
46
+
47
+ ## Change history
48
+
49
+ | Date | Change |
50
+ |------|--------|
51
+ | 2026-06-23 | Profile created; domain migrated from walmarttechservices.com to walmart.truesolutions.com |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.158",
3
+ "version": "1.0.159",
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",