@open-mercato/cli 0.8.1-develop.7275.1.f772b944d4 → 0.8.1-develop.7295.1.d0e0e33014
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.
- package/.turbo/turbo-build.log +3 -1
- package/dist/agentic/guides/module-facts.json +1164 -142
- package/dist/agentic/guides/module-facts.v2.json +1164 -142
- package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
- package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
- package/dist/agentic/guides/modules/api_docs/index.md +1 -1
- package/dist/agentic/guides/modules/api_keys/index.md +1 -1
- package/dist/agentic/guides/modules/attachments/index.md +1 -1
- package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
- package/dist/agentic/guides/modules/auth/index.md +1 -1
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/index.md +1 -1
- package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
- package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
- package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
- package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
- package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
- package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
- package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
- package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
- package/dist/agentic/guides/modules/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
- package/dist/agentic/guides/modules/configs/index.md +1 -1
- package/dist/agentic/guides/modules/content/index.md +1 -1
- package/dist/agentic/guides/modules/currencies/index.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
- package/dist/agentic/guides/modules/customers/index.md +1 -1
- package/dist/agentic/guides/modules/dashboards/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/active-extension-bindings.md +1 -1
- package/dist/agentic/guides/modules/data_sync/index.md +1 -1
- package/dist/agentic/guides/modules/design_system/index.md +1 -1
- package/dist/agentic/guides/modules/devices/index.md +1 -1
- package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
- package/dist/agentic/guides/modules/directory/index.md +1 -1
- package/dist/agentic/guides/modules/documents/index.md +1 -1
- package/dist/agentic/guides/modules/entities/index.md +1 -1
- package/dist/agentic/guides/modules/eudr/index.md +1 -1
- package/dist/agentic/guides/modules/events/index.md +1 -1
- package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/generators/index.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
- package/dist/agentic/guides/modules/integrations/index.md +1 -1
- package/dist/agentic/guides/modules/messages/index.md +1 -1
- package/dist/agentic/guides/modules/notifications/index.md +1 -1
- package/dist/agentic/guides/modules/onboarding/index.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
- package/dist/agentic/guides/modules/perspectives/index.md +1 -1
- package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
- package/dist/agentic/guides/modules/planner/index.md +1 -1
- package/dist/agentic/guides/modules/portal/index.md +1 -1
- package/dist/agentic/guides/modules/progress/index.md +1 -1
- package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
- package/dist/agentic/guides/modules/query_index/index.md +1 -1
- package/dist/agentic/guides/modules/record_locks/index.md +1 -1
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/sales/index.md +1 -1
- package/dist/agentic/guides/modules/scheduler/index.md +1 -1
- package/dist/agentic/guides/modules/search/index.md +1 -1
- package/dist/agentic/guides/modules/security/index.md +1 -1
- package/dist/agentic/guides/modules/seeds/index.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
- package/dist/agentic/guides/modules/sso/index.md +1 -1
- package/dist/agentic/guides/modules/staff/host-extension-points.md +1 -1
- package/dist/agentic/guides/modules/staff/index.md +10 -10
- package/dist/agentic/guides/modules/staff/umes-diagnostics.md +4 -0
- package/dist/agentic/guides/modules/staff/umes-hosts.md +36 -0
- package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
- package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
- package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
- package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
- package/dist/agentic/guides/modules/telemetry/index.md +12 -0
- package/dist/agentic/guides/modules/telemetry/owned-contract-module-metadata.md +11 -0
- package/dist/agentic/guides/modules/tillio/index.md +1 -1
- package/dist/agentic/guides/modules/translations/index.md +1 -1
- package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
- package/dist/agentic/guides/modules/webhooks/index.md +1 -1
- package/dist/agentic/guides/modules/wms/index.md +1 -1
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/reference-module-facts.json +1 -1
- package/dist/agentic/guides/upstream/manifest.json +1 -1
- package/dist/agentic/shared/ai/harness/README.md +2 -2
- package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
- package/dist/agentic/shared/ai/harness/cases.json +77 -0
- package/dist/agentic/shared/ai/harness/cases.schema.json +4 -4
- package/dist/agentic/shared/ai/harness/validators.json +1 -1
- package/dist/lib/telemetry-init.js +109 -4
- package/dist/lib/telemetry-init.js.map +2 -2
- package/dist/lib/testing/integration.js +10 -0
- package/dist/lib/testing/integration.js.map +2 -2
- package/package.json +6 -6
- package/src/lib/__tests__/telemetry-init.test.ts +174 -4
- package/src/lib/telemetry-init.ts +166 -8
- package/src/lib/testing/integration.ts +10 -0
|
@@ -44,6 +44,15 @@
|
|
|
44
44
|
|
|
45
45
|
| ID / pattern | Family | Supports | Context | Stability | Source |
|
|
46
46
|
|---|---|---|---|---|---|
|
|
47
|
+
| data-table:staff.my_work.today_entries.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
48
|
+
| data-table:staff.my_work.today_entries.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
49
|
+
| data-table:staff.my_work.today_entries.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
50
|
+
| data-table:staff.my_work.today_entries.list:filters | data-table | filter-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
51
|
+
| data-table:staff.my_work.today_entries.list:footer | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
52
|
+
| data-table:staff.my_work.today_entries.list:header | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
53
|
+
| data-table:staff.my_work.today_entries.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
54
|
+
| data-table:staff.my_work.today_entries.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
55
|
+
| data-table:staff.my_work.today_entries.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
47
56
|
| data-table:staff.time_entries.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
48
57
|
| data-table:staff.time_entries.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
49
58
|
| data-table:staff.time_entries.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
@@ -53,6 +62,15 @@
|
|
|
53
62
|
| data-table:staff.time_entries.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
54
63
|
| data-table:staff.time_entries.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
55
64
|
| data-table:staff.time_entries.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
65
|
+
| data-table:staff.time_project_detail.entries.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
66
|
+
| data-table:staff.time_project_detail.entries.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
67
|
+
| data-table:staff.time_project_detail.entries.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
68
|
+
| data-table:staff.time_project_detail.entries.list:filters | data-table | filter-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
69
|
+
| data-table:staff.time_project_detail.entries.list:footer | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
70
|
+
| data-table:staff.time_project_detail.entries.list:header | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
71
|
+
| data-table:staff.time_project_detail.entries.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
72
|
+
| data-table:staff.time_project_detail.entries.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
73
|
+
| data-table:staff.time_project_detail.entries.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
56
74
|
| data-table:staff.time_projects.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
57
75
|
| data-table:staff.time_projects.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
58
76
|
| data-table:staff.time_projects.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
@@ -62,6 +80,15 @@
|
|
|
62
80
|
| data-table:staff.time_projects.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
63
81
|
| data-table:staff.time_projects.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
64
82
|
| data-table:staff.time_projects.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
83
|
+
| data-table:staff.time_report_detail.locked_entries.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
84
|
+
| data-table:staff.time_report_detail.locked_entries.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
85
|
+
| data-table:staff.time_report_detail.locked_entries.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
86
|
+
| data-table:staff.time_report_detail.locked_entries.list:filters | data-table | filter-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
87
|
+
| data-table:staff.time_report_detail.locked_entries.list:footer | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
88
|
+
| data-table:staff.time_report_detail.locked_entries.list:header | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
89
|
+
| data-table:staff.time_report_detail.locked_entries.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
90
|
+
| data-table:staff.time_report_detail.locked_entries.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
91
|
+
| data-table:staff.time_report_detail.locked_entries.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
65
92
|
| data-table:staff.time_reports.list | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
66
93
|
| data-table:staff.time_reports.list:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
67
94
|
| data-table:staff.time_reports.list:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
@@ -71,6 +98,15 @@
|
|
|
71
98
|
| data-table:staff.time_reports.list:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
72
99
|
| data-table:staff.time_reports.list:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
73
100
|
| data-table:staff.time_reports.list:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
101
|
+
| data-table:staff.time_task_board.list_view | data-table | component-replacement | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
102
|
+
| data-table:staff.time_task_board.list_view:bulk-actions | data-table | bulk-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
103
|
+
| data-table:staff.time_task_board.list_view:columns | data-table | column-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
104
|
+
| data-table:staff.time_task_board.list_view:filters | data-table | filter-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
105
|
+
| data-table:staff.time_task_board.list_view:footer | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
106
|
+
| data-table:staff.time_task_board.list_view:header | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
107
|
+
| data-table:staff.time_task_board.list_view:row-actions | data-table | row-action | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
108
|
+
| data-table:staff.time_task_board.list_view:search-trailing | data-table | render-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
109
|
+
| data-table:staff.time_task_board.list_view:toolbar | data-table | toolbar-widget | — | FROZEN | [extension-points.ts](../../../../node_modules/@open-mercato/core/src/modules/staff/extension-points.ts) |
|
|
74
110
|
|
|
75
111
|
### detail
|
|
76
112
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# storage_s3 — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/storage-s3 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/storage-s3 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/storage-s3/src/modules/storage_s3
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# sync_akeneo — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/sync-akeneo 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/sync-akeneo 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/sync-akeneo/src/modules/sync_akeneo
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# sync_excel — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/sync_excel
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# system_status_overlays — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/enterprise 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/enterprise 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/enterprise/src/modules/system_status_overlays
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# telemetry — module facts (generated, do not edit)
|
|
2
|
+
<!-- generated from @open-mercato/telemetry 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
|
+
Source root: node_modules/@open-mercato/telemetry/src/modules/telemetry
|
|
4
|
+
|
|
5
|
+
## Sections
|
|
6
|
+
|
|
7
|
+
- [Owned contract — module metadata](owned-contract-module-metadata.md) — ~1 KB — Generated owned contract — module metadata facts for telemetry.
|
|
8
|
+
|
|
9
|
+
Read only the section files needed for the task; every section ends with a completion marker.
|
|
10
|
+
A section absent from this list has no facts for telemetry; this index is complete only when the read reaches the marker below.
|
|
11
|
+
|
|
12
|
+
<!-- end module facts: telemetry — 1 sections -->
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# telemetry — Owned contract — module metadata
|
|
2
|
+
|
|
3
|
+
[Back to module index](index.md)
|
|
4
|
+
|
|
5
|
+
## Owned contract — module metadata
|
|
6
|
+
|
|
7
|
+
| ID | Metadata | Source |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| telemetry | name=telemetry; version=0.1.0 | [index.ts:7](../../../../node_modules/@open-mercato/telemetry/src/modules/telemetry/index.ts#L7) |
|
|
10
|
+
|
|
11
|
+
<!-- end module facts section: telemetry/owned-contract-module-metadata -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# tillio — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/tillio 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/tillio 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/tillio/src/modules/tillio
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# translations — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/translations
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# warranty_claims — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/warranty_claims
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# webhooks — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/webhooks 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/webhooks 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/webhooks/src/modules/webhooks
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# wms — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/wms
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# workflows — module facts (generated, do not edit)
|
|
2
|
-
<!-- generated from @open-mercato/core 0.8.1-develop.
|
|
2
|
+
<!-- generated from @open-mercato/core 0.8.1-develop.7295.1.d0e0e33014; core 0.8.1-develop.7295.1.d0e0e33014 — R1 staleness stamp -->
|
|
3
3
|
Source root: node_modules/@open-mercato/core/src/modules/workflows
|
|
4
4
|
|
|
5
5
|
## Sections
|
|
@@ -1185,7 +1185,7 @@
|
|
|
1185
1185
|
"facts": {
|
|
1186
1186
|
"title": "Example Module",
|
|
1187
1187
|
"description": "Demonstrates pages, APIs, entities and DI.",
|
|
1188
|
-
"coreVersion": "0.8.1-develop.
|
|
1188
|
+
"coreVersion": "0.8.1-develop.7295.1.d0e0e33014",
|
|
1189
1189
|
"sourcePackage": null,
|
|
1190
1190
|
"sourceVersion": null,
|
|
1191
1191
|
"sourceRoot": "src/modules/example",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generator": "@open-mercato/cli@0.8.1-develop.
|
|
3
|
+
"generator": "@open-mercato/cli@0.8.1-develop.7295.1.d0e0e33014",
|
|
4
4
|
"files": {
|
|
5
5
|
"AGENTS.md": "9fdaca247f55c64f5966cc103265cfb03233e0532f58f14aff538ae18aa3555d",
|
|
6
6
|
"BACKWARD_COMPATIBILITY.md": "7f7d93266be9dbf1a1e154df6d40efd6de4ffeea3a2d7b2822f3081d6395c272"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent harness evaluations
|
|
2
2
|
|
|
3
|
-
`cases.json` is the
|
|
3
|
+
`cases.json` is the 237-case standalone-app contract. Run `yarn harness:validate --all` for the deterministic gate. Live routing uses a fresh read-only process per case:
|
|
4
4
|
|
|
5
5
|
UMES routing is fact-first. The additive and unified-override audit evaluations, plus their targeted cases, resolve exact/pattern hosts, outgoing contributions, correlation provenance, round-trip groups, framework-owned targets, and override domain/key/mode from the generated module sheets and `.ai/guides/framework-extension-points.md` before bounded installed source. The repository UMES umbrella spec may appear as optional source-checkout provenance; it is never required in a standalone scaffold.
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ yarn harness:release --runner codex --prepare-targets /absolute/empty-release-ta
|
|
|
18
18
|
yarn harness:release --runner codex --portability-runner claude --prepare-targets /absolute/empty-release-targets --acknowledge-writes
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
The primary runner owns all
|
|
21
|
+
The primary runner owns all 237 routing cases, all 49 writable cases, and all generative-judge runs. No per-case fallback or mixed primary ownership is allowed. Omitting `--portability-runner` is valid and the sanitized report records `portabilityRunner: null`; explicitly requesting an unavailable or failing secondary runner fails that extended run.
|
|
22
22
|
|
|
23
23
|
Writable evaluation is intentionally opt-in. The expanded catalog has a 49-case writable release target, but only cases registered in `release-matrix.json` and backed by controller-owned fixtures and oracles are executable. Copy or create a fresh standalone app for one registered case, then seed only that case and mark the target disposable:
|
|
24
24
|
|
|
@@ -6,7 +6,7 @@ Run the complete per-release gate from a generated standalone app with one comma
|
|
|
6
6
|
yarn harness:release --runner codex --prepare-targets /absolute/empty-release-targets --acknowledge-writes
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete
|
|
9
|
+
Choose exactly one blocking primary runner with `--runner codex` or `--runner claude`. That runner owns the complete 237-case routing gate and every writable/review lane. To add cross-model portability evidence, explicitly pass the other runner as `--portability-runner claude` or `--portability-runner codex`; it runs only the exact 49-case representative read-only set. The two runners must differ. Omitting the portability option is valid and is recorded as `portabilityRunner: null`; no secondary result is claimed. There is no per-case fallback or mixed primary ownership. Once requested, a portability failure or unavailable runner fails that extended release run.
|
|
10
10
|
|
|
11
11
|
`--prepare-targets` accepts only an absolute, new or empty regular directory outside the controller app. The controller must be a sanitized fresh scaffold: automatic preparation fails before copying when it finds `.env`, `.env.*` (except `.env.example`, `.env.sample`, and `.env.template`), credential files, or private-key files. Never use a configured development or production app as the controller. It copies the fresh scaffold once per catalog case whose `evaluationKind` is `implementation` or `regression`, while excluding `.git`, `node_modules`, build/cache/coverage output, `.ai/harness/results`, `.ai/reports`, and `.ai/framework-context`. Each target receives a guarded link to the controller's installed dependency tree. The OS sandbox resolves that link as read-only during both the writable model run and the target command gate. The release gate also hashes every dependency entry and regular-file body once before execution and once after the complete suite, and fails if any nested content or metadata changed. A generated `release-targets.json` records the local mapping.
|
|
12
12
|
|
|
@@ -34,17 +34,17 @@ For externally prepared apps, `--writable-targets /absolute/release-targets.json
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The current catalog contains
|
|
37
|
+
The current catalog contains 237 cases, including 49 writable implementation/regression cases (20.7%). The command still derives all counts and case IDs from `cases.json`, `validators.json`, and `release-matrix.json`; those figures are documented release facts, not runner constants. The matrix keeps both supported runner model selectors, an exact all-case primary profile, an exact 49-case portability profile, and runner-neutral writable assignments. Run `yarn install-skills` first so the pinned external `om-code-review` skill and ownership evidence are present; the reusable local `om-judge-agent-session` skill ships with the scaffold. Before running a model or writing a fixture, the release command requires complete deterministic, primary live-routing, writable, trusted-oracle, target, generated-test, and generative-judge coverage. Every one of the 49 writable cases must have a judge assignment composing both skills. Missing business fixtures or release-matrix entries fail preflight and are listed by exact case ID in the report.
|
|
38
38
|
|
|
39
39
|
## PR #4529 remediation evidence
|
|
40
40
|
|
|
41
|
-
The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary
|
|
41
|
+
The PR's focused remediation evidence is not a release-certification substitute. Fresh emitted controllers pass deterministic 192/192, and the field-tested OMH-188–192 generative cohort passes on default Codex, Claude Sonnet, and high-effort gpt-5.4-mini. Fresh OMH-185 writable attempts fixed concrete organization-scope, command-object, module-activation, command-snapshot, schema, custom-field, UI, and Jest guidance defects at their routed owners without relaxing trusted oracles. The final attempt reached the case's fixed 600-second ceiling and is excluded from pass evidence. Issue #4670 now owns the complete selected-primary 237-case routing and 49-case writable/generated-test/review certification, prioritizing the generative cohort and recording unavailable Claude lanes without fallback or mixed-runner ownership.
|
|
42
42
|
|
|
43
43
|
After preflight it runs, in order:
|
|
44
44
|
|
|
45
45
|
1. deterministic validation for the complete catalog;
|
|
46
46
|
2. the release matrix's fixed `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` foundation;
|
|
47
|
-
3. the selected primary runner across all
|
|
47
|
+
3. the selected primary runner across all 237 live-routing cases, followed by the optional distinct portability runner across the exact 49-case read-only sample when requested;
|
|
48
48
|
4. fixture preparation and the selected primary runner for every writable case, including the controller-owned AST/behavior oracles and target typecheck;
|
|
49
49
|
5. `yarn generate`, `yarn typecheck`, `yarn lint`, and `yarn build` in every writable target, after its trusted oracles;
|
|
50
50
|
6. real generated-code execution for OMH-163 and OMH-192 through fixed Jest, OMH-164 through API-only Playwright, and OMH-165 through real-browser Playwright; and
|
|
@@ -21352,5 +21352,82 @@
|
|
|
21352
21352
|
"OMH-201",
|
|
21353
21353
|
"OMH-235"
|
|
21354
21354
|
]
|
|
21355
|
+
},
|
|
21356
|
+
{
|
|
21357
|
+
"id": "OMH-237",
|
|
21358
|
+
"title": "Correlate slow backoffice pages with browser RUM instead of a bespoke span-ingest route",
|
|
21359
|
+
"family": "architecture",
|
|
21360
|
+
"mode": "analysis",
|
|
21361
|
+
"evaluationKind": "routing",
|
|
21362
|
+
"risk": "medium",
|
|
21363
|
+
"prompt": "In a freshly scaffolded standalone Open Mercato app, backoffice users report pages that feel slow even though server-side API traces show fast responses, and the team wants client-side browser telemetry — document-load and fetch spans — correlated with the existing server traces in the OTLP backend. Decide the smallest safe design against what the installed modules already provide, state the access-control posture of the span-ingest path and where the collector credential lives, and identify the smallest relevant validation. Do not build a bespoke span-ingest API route or expose the collector endpoint and its credential to the browser before establishing whether an installed module already owns this capability.",
|
|
21364
|
+
"tags": [
|
|
21365
|
+
"architecture",
|
|
21366
|
+
"module-facts",
|
|
21367
|
+
"reuse-installed",
|
|
21368
|
+
"browser-telemetry"
|
|
21369
|
+
],
|
|
21370
|
+
"owner": {
|
|
21371
|
+
"kind": "facts",
|
|
21372
|
+
"path": ".ai/guides/modules/telemetry/index.md",
|
|
21373
|
+
"ruleIds": [
|
|
21374
|
+
"BC-01",
|
|
21375
|
+
"BC-04"
|
|
21376
|
+
]
|
|
21377
|
+
},
|
|
21378
|
+
"expectedRouter": {
|
|
21379
|
+
"required": [
|
|
21380
|
+
"architecture"
|
|
21381
|
+
],
|
|
21382
|
+
"allowedExtra": [
|
|
21383
|
+
"framework-context",
|
|
21384
|
+
"module-data",
|
|
21385
|
+
"umes",
|
|
21386
|
+
"debugging"
|
|
21387
|
+
]
|
|
21388
|
+
},
|
|
21389
|
+
"requiredSkills": [
|
|
21390
|
+
"om-help"
|
|
21391
|
+
],
|
|
21392
|
+
"context": {
|
|
21393
|
+
"required": [
|
|
21394
|
+
"AGENTS.md",
|
|
21395
|
+
".ai/guides/architecture.md",
|
|
21396
|
+
".ai/skills/om-help/SKILL.md",
|
|
21397
|
+
".ai/guides/modules/telemetry/index.md"
|
|
21398
|
+
],
|
|
21399
|
+
"allowedExtra": [
|
|
21400
|
+
".ai/guides/contracts.md",
|
|
21401
|
+
".ai/guides/testing-debugging.md"
|
|
21402
|
+
],
|
|
21403
|
+
"forbidden": [
|
|
21404
|
+
".env*",
|
|
21405
|
+
".git/**"
|
|
21406
|
+
]
|
|
21407
|
+
},
|
|
21408
|
+
"requiredDecisions": [
|
|
21409
|
+
"facts-first",
|
|
21410
|
+
"smallest-validation"
|
|
21411
|
+
],
|
|
21412
|
+
"forbiddenPatterns": [
|
|
21413
|
+
"node_modules.{0,40}(?:write|edit|patch)",
|
|
21414
|
+
"(?:token|secret|password|credential).{0,30}(?:NEXT_PUBLIC|client bundle|browser env)"
|
|
21415
|
+
],
|
|
21416
|
+
"validators": [
|
|
21417
|
+
"catalog.schema",
|
|
21418
|
+
"owner.reference",
|
|
21419
|
+
"skills.reference",
|
|
21420
|
+
"router.contract",
|
|
21421
|
+
"context.budget",
|
|
21422
|
+
"context.forbidden",
|
|
21423
|
+
"patterns.forbidden"
|
|
21424
|
+
],
|
|
21425
|
+
"maxContextFiles": 7,
|
|
21426
|
+
"maxInitialContextBytes": 49152,
|
|
21427
|
+
"maxTotalContextBytes": 65536,
|
|
21428
|
+
"relatedCases": [
|
|
21429
|
+
"OMH-194",
|
|
21430
|
+
"OMH-195"
|
|
21431
|
+
]
|
|
21355
21432
|
}
|
|
21356
21433
|
]
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"$id": "https://open-mercato.dev/schemas/standalone-harness-cases.schema.json",
|
|
4
4
|
"title": "Open Mercato standalone harness case catalog",
|
|
5
5
|
"type": "array",
|
|
6
|
-
"minItems":
|
|
7
|
-
"maxItems":
|
|
6
|
+
"minItems": 237,
|
|
7
|
+
"maxItems": 237,
|
|
8
8
|
"items": {
|
|
9
9
|
"type": "object",
|
|
10
10
|
"additionalProperties": false,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"maxTotalContextBytes", "relatedCases"
|
|
16
16
|
],
|
|
17
17
|
"properties": {
|
|
18
|
-
"id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-
|
|
18
|
+
"id": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-7])$" },
|
|
19
19
|
"title": { "type": "string", "minLength": 12, "maxLength": 180 },
|
|
20
20
|
"family": { "enum": ["architecture", "module", "umes", "integration", "ai-workflow", "bugfix", "business", "testing"] },
|
|
21
21
|
"mode": { "enum": ["analysis", "one-shot", "spec", "bugfix", "review"] },
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"maxInitialContextBytes": { "type": "integer", "minimum": 4096, "maximum": 98304 },
|
|
169
169
|
"maxTotalContextBytes": { "type": "integer", "minimum": 8192, "maximum": 1048576 },
|
|
170
170
|
"timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 600000 },
|
|
171
|
-
"relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-
|
|
171
|
+
"relatedCases": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "pattern": "^OMH-(00[1-9]|0[1-9][0-9]|1[0-9][0-9]|20[0-9]|21[0-9]|22[0-9]|23[0-7])$" } },
|
|
172
172
|
"source": {
|
|
173
173
|
"type": "object",
|
|
174
174
|
"additionalProperties": false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
3
|
const BULLMQ_OTEL_VERSION = "^1.3.1";
|
|
4
|
-
const
|
|
4
|
+
const ENV_CORE_BLOCK = `
|
|
5
5
|
# --- Telemetry & Observability (vendor-neutral OTLP: traces, logs, metrics, errors) ---
|
|
6
6
|
# Off by default: leave TELEMETRY_BACKEND unset (or =noop) for a hard no-op
|
|
7
7
|
# (the OpenTelemetry SDK is never loaded). Set to 'console' for local span/metric
|
|
@@ -32,6 +32,24 @@ const ENV_BLOCK = `
|
|
|
32
32
|
# OTEL_SERVICE_NAME=open-mercato
|
|
33
33
|
# OTEL_RESOURCE_ATTRIBUTES=deployment.environment=local
|
|
34
34
|
`;
|
|
35
|
+
const ENV_BROWSER_BLOCK = `
|
|
36
|
+
# --- Browser RUM (client-side telemetry) ---
|
|
37
|
+
# Document-load and fetch spans exported from the backoffice through a
|
|
38
|
+
# same-origin proxy (/api/telemetry/browser-traces) that adds the collector
|
|
39
|
+
# credential server-side. Off by default; requires an active
|
|
40
|
+
# TELEMETRY_BACKEND + OTLP endpoint above.
|
|
41
|
+
# Read at request time (not NEXT_PUBLIC_*), so toggling needs no rebuild.
|
|
42
|
+
# Browser spans join their server spans only when TELEMETRY_TRUST_INBOUND_TRACE=true
|
|
43
|
+
# above; without it RUM still works, but each page yields two separate traces.
|
|
44
|
+
# Ingest budget: each open tab exports at most 20 batches/min (a 3s batch delay),
|
|
45
|
+
# and the proxy allows 400/min per authenticated user \u2014 roughly 20 concurrent tabs.
|
|
46
|
+
# Over that, batches are dropped with 204 rather than a retryable status, so the
|
|
47
|
+
# only symptom is missing spans for that one user, never a client retry storm.
|
|
48
|
+
# TELEMETRY_BROWSER_ENABLED=false
|
|
49
|
+
# TELEMETRY_BROWSER_SAMPLING_RATIO=1.0 # 0.0-1.0 (default 1.0)
|
|
50
|
+
# TELEMETRY_BROWSER_SERVICE_NAME= # default: <OTEL_SERVICE_NAME>-browser
|
|
51
|
+
`;
|
|
52
|
+
const ENV_BLOCK = `${ENV_CORE_BLOCK}${ENV_BROWSER_BLOCK}`;
|
|
35
53
|
const INSTRUMENTATION_TS = `import { isTelemetryBackendEnabled } from '@open-mercato/shared/lib/telemetry/runtime'
|
|
36
54
|
|
|
37
55
|
export async function register(): Promise<void> {
|
|
@@ -110,13 +128,98 @@ function patchEnvFile(appDir, relativePath, options) {
|
|
|
110
128
|
const path = join(appDir, relativePath);
|
|
111
129
|
if (!existsSync(path)) return null;
|
|
112
130
|
const content = readFileSync(path, "utf8");
|
|
113
|
-
|
|
131
|
+
const hasCore = content.includes("TELEMETRY_BACKEND");
|
|
132
|
+
const hasBrowser = content.includes("TELEMETRY_BROWSER_ENABLED");
|
|
133
|
+
if (hasCore && hasBrowser) {
|
|
114
134
|
return { file: relativePath, status: "skipped", detail: "TELEMETRY_* block already present" };
|
|
115
135
|
}
|
|
116
136
|
const next = `${content.replace(/\s*$/, "")}
|
|
117
|
-
${ENV_BLOCK}`;
|
|
137
|
+
${hasCore ? ENV_BROWSER_BLOCK : ENV_BLOCK}`;
|
|
138
|
+
if (!options.dryRun) writeFileSync(path, next);
|
|
139
|
+
return {
|
|
140
|
+
file: relativePath,
|
|
141
|
+
status: "patched",
|
|
142
|
+
detail: hasCore ? "appended the missing TELEMETRY_BROWSER_* block" : "appended commented TELEMETRY_* / OTEL_* block"
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const MODULES_SNIPPET = ` // in the enabledModules array:
|
|
146
|
+
{ id: 'telemetry', from: '@open-mercato/telemetry' },`;
|
|
147
|
+
function patchModules(appDir, options) {
|
|
148
|
+
const file = "src/modules.ts";
|
|
149
|
+
const path = join(appDir, file);
|
|
150
|
+
const content = readFileSync(path, "utf8");
|
|
151
|
+
if (/id:\s*'telemetry'/.test(content)) {
|
|
152
|
+
return { file, status: "skipped", detail: "telemetry module already enabled" };
|
|
153
|
+
}
|
|
154
|
+
const anchor = content.match(/export\s+const\s+enabledModules[^=]*=\s*\[/);
|
|
155
|
+
if (!anchor || anchor.index === void 0) {
|
|
156
|
+
return {
|
|
157
|
+
file,
|
|
158
|
+
status: "manual",
|
|
159
|
+
detail: "enabledModules array not found \u2014 add the entry by hand",
|
|
160
|
+
manualSnippet: MODULES_SNIPPET
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const insertAt = anchor.index + anchor[0].length;
|
|
164
|
+
const block = `
|
|
165
|
+
// Same-origin OTLP proxy for browser RUM spans; inert unless
|
|
166
|
+
// TELEMETRY_BROWSER_ENABLED is set alongside an active telemetry backend.
|
|
167
|
+
{ id: 'telemetry', from: '@open-mercato/telemetry' },`;
|
|
168
|
+
if (!options.dryRun) writeFileSync(path, content.slice(0, insertAt) + block + content.slice(insertAt));
|
|
169
|
+
return { file, status: "patched", detail: "enabled the 'telemetry' module (browser-traces proxy route)" };
|
|
170
|
+
}
|
|
171
|
+
const LAYOUT_FILE = "src/app/(backend)/backend/layout.tsx";
|
|
172
|
+
const LAYOUT_SNIPPET = ` // add near the other imports:
|
|
173
|
+
import { BrowserTelemetry } from '@open-mercato/telemetry/browser'
|
|
174
|
+
import { resolveBrowserTelemetryConfig } from '@open-mercato/telemetry/browser/server'
|
|
175
|
+
|
|
176
|
+
// in the component body, before the returned JSX:
|
|
177
|
+
// pass the request's Cookie header when the layout already reads cookies
|
|
178
|
+
// (only consulted by the integration-test opt-in; production is env-only):
|
|
179
|
+
const browserTelemetryConfig = resolveBrowserTelemetryConfig({ cookieHeader: cookieStore.toString() })
|
|
180
|
+
|
|
181
|
+
// as the last child of <AppShell>:
|
|
182
|
+
<BrowserTelemetry config={browserTelemetryConfig} />`;
|
|
183
|
+
function resolveArgument(layout) {
|
|
184
|
+
const binding = layout.match(/const\s+(\w+)\s*=\s*await\s+cookies\(\)/);
|
|
185
|
+
return binding ? `{ cookieHeader: ${binding[1]}.toString() }` : "";
|
|
186
|
+
}
|
|
187
|
+
function patchBackendLayout(appDir, options) {
|
|
188
|
+
const path = join(appDir, LAYOUT_FILE);
|
|
189
|
+
if (!existsSync(path)) {
|
|
190
|
+
return { file: LAYOUT_FILE, status: "manual", detail: "backend layout not found", manualSnippet: LAYOUT_SNIPPET };
|
|
191
|
+
}
|
|
192
|
+
const content = readFileSync(path, "utf8");
|
|
193
|
+
if (content.includes("<BrowserTelemetry")) {
|
|
194
|
+
return { file: LAYOUT_FILE, status: "skipped", detail: "BrowserTelemetry already rendered" };
|
|
195
|
+
}
|
|
196
|
+
const closingShell = content.lastIndexOf("</AppShell>");
|
|
197
|
+
const returnMatch = content.match(/^([ \t]*)return \(\s*$/m);
|
|
198
|
+
const lastImport = [...content.matchAll(/^import[^\n]*$/gm)].at(-1);
|
|
199
|
+
if (closingShell === -1 || !returnMatch || returnMatch.index === void 0 || !lastImport) {
|
|
200
|
+
return {
|
|
201
|
+
file: LAYOUT_FILE,
|
|
202
|
+
status: "manual",
|
|
203
|
+
detail: "layout shape not recognized \u2014 apply the snippet by hand",
|
|
204
|
+
manualSnippet: LAYOUT_SNIPPET
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const shellIndent = content.slice(0, closingShell).match(/\n([ \t]*)$/)?.[1] ?? " ";
|
|
208
|
+
let next = content.slice(0, closingShell) + `<BrowserTelemetry config={browserTelemetryConfig} />
|
|
209
|
+
${shellIndent}` + content.slice(closingShell);
|
|
210
|
+
const returnIndent = returnMatch[1];
|
|
211
|
+
next = next.slice(0, returnMatch.index) + `${returnIndent}// Resolved per request (this layout is force-dynamic), so browser RUM can be
|
|
212
|
+
${returnIndent}// toggled per environment without a rebuild. Null keeps the SDK chunk from
|
|
213
|
+
${returnIndent}// ever being requested.
|
|
214
|
+
${returnIndent}const browserTelemetryConfig = resolveBrowserTelemetryConfig(${resolveArgument(content)})
|
|
215
|
+
|
|
216
|
+
` + next.slice(returnMatch.index);
|
|
217
|
+
const importInsertAt = (lastImport.index ?? 0) + lastImport[0].length;
|
|
218
|
+
next = next.slice(0, importInsertAt) + `
|
|
219
|
+
import { BrowserTelemetry } from '@open-mercato/telemetry/browser'
|
|
220
|
+
import { resolveBrowserTelemetryConfig } from '@open-mercato/telemetry/browser/server'` + next.slice(importInsertAt);
|
|
118
221
|
if (!options.dryRun) writeFileSync(path, next);
|
|
119
|
-
return { file:
|
|
222
|
+
return { file: LAYOUT_FILE, status: "patched", detail: "rendered <BrowserTelemetry /> in the backoffice shell" };
|
|
120
223
|
}
|
|
121
224
|
function patchInstrumentation(appDir, options) {
|
|
122
225
|
const file = "src/instrumentation.ts";
|
|
@@ -323,6 +426,8 @@ async function runTelemetryInit(args) {
|
|
|
323
426
|
results.push(patchInstrumentation(appDir, options));
|
|
324
427
|
results.push(await patchNextConfig(appDir, options));
|
|
325
428
|
results.push(patchDispatcher(appDir, options));
|
|
429
|
+
results.push(patchModules(appDir, options));
|
|
430
|
+
results.push(patchBackendLayout(appDir, options));
|
|
326
431
|
const icon = { created: "\u270D\uFE0F ", patched: "\u2705", skipped: "\u23ED\uFE0F ", manual: "\u26A0\uFE0F " };
|
|
327
432
|
for (const result of results) {
|
|
328
433
|
console.log(`${icon[result.status]} ${result.file} \u2014 ${result.detail}`);
|