skilldrop-cli 1.0.1 → 1.1.1

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 (311) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/packs/ai-engineering/skills/judge-audit/SKILL.md +24 -6
  4. package/packs/ai-engineering/skills/judge-audit/evals/evals.json +29 -0
  5. package/packs/ai-engineering/skills/judge-audit/evals/files/10/judge_eval.csv +61 -0
  6. package/packs/ai-engineering/skills/judge-audit/evals/files/11/mod_sample_scored.csv +201 -0
  7. package/packs/ai-engineering/skills/judge-audit/manifest.json +1 -1
  8. package/packs/converters/skills/md-to-pptx/SKILL.md +25 -8
  9. package/packs/converters/skills/md-to-pptx/evals/evals.json +30 -0
  10. package/packs/converters/skills/md-to-pptx/evals/files/6/q3-status-report.md +72 -0
  11. package/packs/converters/skills/md-to-pptx/evals/files/7/runbooks/db-failover.md +59 -0
  12. package/packs/converters/skills/md-to-pptx/evals/files/7/runbooks/diagrams/topology.png +0 -0
  13. package/packs/converters/skills/md-to-pptx/manifest.json +1 -1
  14. package/packs/converters/skills/md-to-pptx/reference.md +9 -1
  15. package/packs/converters/skills/md-to-pptx/scripts/md_to_pptx.py +35 -2
  16. package/packs/core/pack.json +2 -2
  17. package/packs/{solution-architect → core}/skills/context-graph/SKILL.md +10 -4
  18. package/packs/{solution-architect → core}/skills/context-graph/evals/eval_queries.json +4 -1
  19. package/packs/{solution-architect → core}/skills/context-graph/evals/evals.json +30 -0
  20. package/packs/core/skills/context-graph/evals/files/16/README.md +4 -0
  21. package/packs/core/skills/context-graph/evals/files/16/docs/adr/0001-record-architecture-decisions.md +12 -0
  22. package/packs/core/skills/context-graph/evals/files/16/docs/adr/0002-postgres-for-the-ledger.md +11 -0
  23. package/packs/core/skills/context-graph/evals/files/16/docs/adr/0003-redis-for-ephemeral-state.md +12 -0
  24. package/packs/core/skills/context-graph/evals/files/16/docs/adr/0004-idempotency-keys-for-payment-creation.md +28 -0
  25. package/packs/core/skills/context-graph/evals/files/16/git-history.json +62 -0
  26. package/packs/core/skills/context-graph/evals/files/16/services/payments/api/create.py +7 -0
  27. package/packs/core/skills/context-graph/evals/files/16/services/payments/ledger.py +9 -0
  28. package/packs/core/skills/context-graph/evals/files/17/README.md +5 -0
  29. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0001-record-architecture-decisions.md +9 -0
  30. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0002-email-via-smtp-relay.md +9 -0
  31. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0003-rabbitmq-for-async-messaging.md +9 -0
  32. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0004-email-via-provider-api.md +11 -0
  33. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0005-server-side-template-rendering.md +10 -0
  34. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0006-notification-retry-backoff.md +10 -0
  35. package/packs/core/skills/context-graph/evals/files/17/docs/adr/0007-kafka-for-event-streaming.md +12 -0
  36. package/packs/core/skills/context-graph/evals/files/17/docs/rfcs/RFC-012-unified-retry-policy.md +10 -0
  37. package/packs/core/skills/context-graph/evals/files/17/packages/notification-templates/README.md +4 -0
  38. package/packs/core/skills/context-graph/evals/files/17/packages/notification-templates/invoice_issued.html +2 -0
  39. package/packs/core/skills/context-graph/evals/files/17/packages/notification-templates/welcome.html +2 -0
  40. package/packs/core/skills/context-graph/evals/files/17/services/billing/retry.py +17 -0
  41. package/packs/core/skills/context-graph/evals/files/17/services/notifications/consumer.py +18 -0
  42. package/packs/core/skills/context-graph/evals/files/17/services/notifications/dispatch.py +21 -0
  43. package/packs/core/skills/context-graph/evals/files/17/services/notifications/email/sender.py +17 -0
  44. package/packs/core/skills/context-graph/evals/files/17/services/notifications/render.py +12 -0
  45. package/packs/core/skills/context-graph/evals/files/17/services/notifications/retry.py +14 -0
  46. package/packs/core/skills/context-graph/examples/inputs/order-events/services/notifications/receipts.py +0 -0
  47. package/packs/core/skills/context-graph/examples/inputs/order-events/services/orders/publisher.py +0 -0
  48. package/packs/{solution-architect → core}/skills/context-graph/manifest.json +3 -3
  49. package/packs/{solution-architect → core}/skills/context-graph/reference.md +28 -0
  50. package/packs/{solution-architect → core}/skills/context-graph/scripts/context_graph.py +105 -5
  51. package/packs/dev-team/loops/modernize/LOOP.md +11 -1
  52. package/packs/dev-team/loops/modernize/evals/evals.json +12 -0
  53. package/packs/dev-team/loops/modernize/loop.json +3 -3
  54. package/packs/frontend/skills/bundle-size-review/SKILL.md +5 -2
  55. package/packs/frontend/skills/bundle-size-review/evals/evals.json +30 -0
  56. package/packs/frontend/skills/bundle-size-review/evals/files/8/.browserslistrc +6 -0
  57. package/packs/frontend/skills/bundle-size-review/evals/files/8/babel.config.js +6 -0
  58. package/packs/frontend/skills/bundle-size-review/evals/files/8/dist/stats.json +854 -0
  59. package/packs/frontend/skills/bundle-size-review/evals/files/8/package-lock.json.fixture +73 -0
  60. package/packs/frontend/skills/bundle-size-review/evals/files/8/package.json.fixture +28 -0
  61. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/app/App.jsx +23 -0
  62. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/app/BookingForm.jsx +18 -0
  63. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/app/admin/Reports.jsx +17 -0
  64. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/app/index.jsx +4 -0
  65. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/landing/Hero.jsx +17 -0
  66. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/landing/index.jsx +4 -0
  67. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/polyfills.js +3 -0
  68. package/packs/frontend/skills/bundle-size-review/evals/files/8/src/utils/format.js +4 -0
  69. package/packs/frontend/skills/bundle-size-review/evals/files/8/webpack.config.js +35 -0
  70. package/packs/frontend/skills/bundle-size-review/evals/files/9/.github/workflows/size.yml.fixture +12 -0
  71. package/packs/frontend/skills/bundle-size-review/evals/files/9/build.mjs +17 -0
  72. package/packs/frontend/skills/bundle-size-review/evals/files/9/meta.main.json +100 -0
  73. package/packs/frontend/skills/bundle-size-review/evals/files/9/meta.pr412.json +196 -0
  74. package/packs/frontend/skills/bundle-size-review/evals/files/9/package.json.fixture +17 -0
  75. package/packs/frontend/skills/bundle-size-review/evals/files/9/scripts/check-size.mjs +11 -0
  76. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/api.ts +11 -0
  77. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/composer.tsx +21 -0
  78. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/emoji/data.ts +8 -0
  79. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/emoji/picker.tsx +22 -0
  80. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/styles.ts +11 -0
  81. package/packs/frontend/skills/bundle-size-review/evals/files/9/src/widget.ts +15 -0
  82. package/packs/frontend/skills/bundle-size-review/manifest.json +1 -1
  83. package/packs/solution-architect/loops/design/LOOP.md +14 -5
  84. package/packs/solution-architect/loops/design/evals/evals.json +12 -0
  85. package/packs/solution-architect/loops/design/loop.json +5 -5
  86. package/packs/solution-architect/skills/event-contract-draft/SKILL.md +36 -8
  87. package/packs/solution-architect/skills/event-contract-draft/evals/evals.json +30 -0
  88. package/packs/solution-architect/skills/event-contract-draft/evals/files/6/infra/topics.yaml +10 -0
  89. package/packs/solution-architect/skills/event-contract-draft/evals/files/6/src/checkout/order_events.py +57 -0
  90. package/packs/solution-architect/skills/event-contract-draft/evals/files/7/docs/webhooks.yaml +40 -0
  91. package/packs/solution-architect/skills/event-contract-draft/manifest.json +1 -1
  92. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0001-record-architecture-decisions.md +0 -0
  93. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0002-postgres-as-primary-database.md +0 -0
  94. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0003-use-redis-for-session-storage.md +0 -0
  95. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0004-structured-json-logging.md +0 -0
  96. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0005-session-lifetime-eight-hours.md +0 -0
  97. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0006-move-sessions-to-postgres.md +0 -0
  98. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/docs/adr/0007-stateless-signed-session-cookies.md +0 -0
  99. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/api/__init__.py +0 -0
  100. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/api/db.py +0 -0
  101. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/api/logging_setup.py +0 -0
  102. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/auth/__init__.py +0 -0
  103. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/auth/cookie_sessions.py +0 -0
  104. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/1/services/auth/redis_sessions.py +0 -0
  105. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/README.md +0 -0
  106. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/docs/adr/0001-record-architecture-decisions.md +0 -0
  107. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/docs/adr/0004-service-auth-hmac-shared-keys.md +0 -0
  108. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/docs/adr/0007-secrets-from-vault-agent.md +0 -0
  109. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/docs/adr/0011-service-auth-mtls.md +0 -0
  110. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/billing-api/app.py +0 -0
  111. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/billing-api/auth/__init__.py +0 -0
  112. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/billing-api/auth/hmac_verify.py +0 -0
  113. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/billing-api/config/settings.py +0 -0
  114. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/ledger-worker/auth/__init__.py +0 -0
  115. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/10/services/ledger-worker/auth/mtls.py +0 -0
  116. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/README.md +0 -0
  117. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/app/models/base.py +0 -0
  118. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/app/models/line_item.py +0 -0
  119. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/app/models/order.py +0 -0
  120. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/eng/decisions/DR-003-money-as-minor-units.md +0 -0
  121. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/eng/decisions/DR-005-orders-typed-columns-only.md +0 -0
  122. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/eng/decisions/DR-009-line-items-immutable.md +0 -0
  123. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/eng/decisions/DR-014-optional-order-attributes-json.md +0 -0
  124. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/eng/decisions/DR-016-order-attributes-table.md +0 -0
  125. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/migrations/0007_create_orders.sql +0 -0
  126. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/11/migrations/0012_add_order_attributes.sql +0 -0
  127. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/README.md +0 -0
  128. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/config/delivery.yaml +0 -0
  129. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/config/export.yaml +0 -0
  130. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/config/partners.yaml +0 -0
  131. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0001-record-architecture-decisions.md +0 -0
  132. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0002-postgres-delivery-log.md +0 -0
  133. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0003-redis-idempotency-keys.md +0 -0
  134. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0004-retry-policy.md +0 -0
  135. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0005-hmac-signed-payloads.md +0 -0
  136. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0006-postgres-idempotency.md +0 -0
  137. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0007-sftp-batch-export.md +0 -0
  138. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0008-partner-config-in-yaml.md +0 -0
  139. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/docs/adr/0009-partner-config-admin-api.md +0 -0
  140. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/migrations/003_idempotency_keys.sql +0 -0
  141. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/migrations/004_partners.sql +0 -0
  142. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/delivery/dispatcher.py +0 -0
  143. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/delivery/retry.py +0 -0
  144. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/delivery/signing.py +0 -0
  145. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/export/s3_export.py +0 -0
  146. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/idempotency/pg_store.py +0 -0
  147. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/idempotency/redis_store.py +0 -0
  148. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/partners/loader.py +0 -0
  149. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/12/src/store/delivery_log.py +0 -0
  150. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/README.md +0 -0
  151. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/config/cache.yaml +0 -0
  152. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/config/settings.yaml +0 -0
  153. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/docs/decisions/RFC-008-pricing-from-erp.md +0 -0
  154. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/docs/decisions/RFC-012-pricing-cache.md +0 -0
  155. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/docs/decisions/RFC-015-checkout-price-lock.md +0 -0
  156. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/docs/decisions/RFC-019-pricing-service.md +0 -0
  157. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/shopfront/catalog/views.py +0 -0
  158. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/shopfront/checkout/lock.py +0 -0
  159. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/shopfront/pricing/cache.py +0 -0
  160. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/13/shopfront/pricing/client.py +0 -0
  161. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0001-idempotency-keys.md +0 -0
  162. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0002-processor-retry-policy.md +0 -0
  163. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0003-money-in-minor-units.md +0 -0
  164. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0004-webhook-signing.md +0 -0
  165. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0005-retry-with-jitter.md +0 -0
  166. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/docs/rfcs/0006-idempotency-at-gateway.md +0 -0
  167. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/pr-summary.md +0 -0
  168. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/payments/amount.ts +0 -0
  169. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/payments/charge.ts +0 -0
  170. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/payments/idempotency.ts +0 -0
  171. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/payments/retry.ts +0 -0
  172. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/webhooks/send.ts +0 -0
  173. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/14/src/webhooks/sign.ts +0 -0
  174. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/deploy/services.yaml +0 -0
  175. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0001-record-architecture-decisions.md +0 -0
  176. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0002-use-postgresql-for-shipment-data.md +0 -0
  177. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0003-store-vehicle-telemetry-in-cassandra.md +0 -0
  178. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0004-use-redis-for-session-storage.md +0 -0
  179. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0005-use-react-for-dispatcher-dashboard.md +0 -0
  180. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0006-archive-delivered-shipments-to-object-storage.md +0 -0
  181. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0007-move-shipment-records-to-mongodb.md +0 -0
  182. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0008-store-vehicle-telemetry-in-timescaledb.md +0 -0
  183. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/doc/adr/0009-stateless-sessions-with-signed-cookies.md +0 -0
  184. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/services/api/session.py +0 -0
  185. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/services/shipments/db.py +0 -0
  186. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/services/shipments/migrations.sql +0 -0
  187. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/services/telemetry/store.py +0 -0
  188. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/15/web/dashboard/App.jsx +0 -0
  189. /package/packs/{solution-architect/skills/context-graph/evals/files/2/libs/money → core/skills/context-graph/evals/files/16/services/payments}/__init__.py +0 -0
  190. /package/packs/{solution-architect/skills/context-graph/evals/files/3/services/notifications → core/skills/context-graph/evals/files/16/services/payments/api}/__init__.py +0 -0
  191. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0001-record-architecture-decisions.md +0 -0
  192. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0002-rabbitmq-for-background-jobs.md +0 -0
  193. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0003-thumbnail-service.md +0 -0
  194. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0004-money-as-integer-minor-units.md +0 -0
  195. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0005-worker-retries.md +0 -0
  196. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0006-fx-amounts-with-four-decimals.md +0 -0
  197. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0007-feature-flags.md +0 -0
  198. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/docs/adr/0008-retire-legacy-search.md +0 -0
  199. /package/packs/{solution-architect/skills/context-graph/evals/files/3/services/payments → core/skills/context-graph/evals/files/2/libs/money}/__init__.py +0 -0
  200. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/libs/money/amount.py +0 -0
  201. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/services/checkout/flags.py +0 -0
  202. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/services/checkout/publish.py +0 -0
  203. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/services/media/resize.py +0 -0
  204. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/2/services/worker/consumer.py +0 -0
  205. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0001-how-we-write-rfcs.md +0 -0
  206. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0002-payments-service-boundary.md +0 -0
  207. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0003-webhook-retries-fixed-interval.md +0 -0
  208. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0004-webhook-idempotency-keys.md +0 -0
  209. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0005-notification-retries.md +0 -0
  210. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0006-webhook-retry-backoff.md +0 -0
  211. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/docs/rfcs/0007-webhooks-on-the-job-queue.md +0 -0
  212. /package/packs/{solution-architect/skills/context-graph/evals/files/3/services/payments/webhooks → core/skills/context-graph/evals/files/3/services/notifications}/__init__.py +0 -0
  213. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/services/notifications/retry.py +0 -0
  214. /package/packs/{solution-architect/skills/context-graph/evals/files/4/src/ledgerline → core/skills/context-graph/evals/files/3/services/payments}/__init__.py +0 -0
  215. /package/packs/{solution-architect/skills/context-graph/evals/files/4/src/ledgerline/scheduler → core/skills/context-graph/evals/files/3/services/payments/webhooks}/__init__.py +0 -0
  216. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/services/payments/webhooks/retry.py +0 -0
  217. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/3/services/payments/webhooks/send.py +0 -0
  218. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/adr/0001-record-architecture-decisions.md +0 -0
  219. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/adr/0002-postgres-as-system-of-record.md +0 -0
  220. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/adr/0004-redis-locks-for-scheduler.md +0 -0
  221. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/adr/0007-remove-redis.md +0 -0
  222. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/adr/0009-money-as-integer-minor-units.md +0 -0
  223. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/docs/onboarding.md +0 -0
  224. /package/packs/{solution-architect/skills/context-graph/examples/inputs/order-events/services/notifications/receipts.py → core/skills/context-graph/evals/files/4/src/ledgerline/__init__.py} +0 -0
  225. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/src/ledgerline/db/__init__.py +0 -0
  226. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/src/ledgerline/invoicing.py +0 -0
  227. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/src/ledgerline/money.py +0 -0
  228. /package/packs/{solution-architect/skills/context-graph/examples/inputs/order-events/services/orders/publisher.py → core/skills/context-graph/evals/files/4/src/ledgerline/scheduler/__init__.py} +0 -0
  229. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/src/ledgerline/scheduler/lock.py +0 -0
  230. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/4/src/ledgerline/scheduler/runner.py +0 -0
  231. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/lib/types/index.ts +0 -0
  232. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/rfcs/0001-service-layout.md +0 -0
  233. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/rfcs/0003-ingest-retry-policy.md +0 -0
  234. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/rfcs/0006-shared-retry-library.md +0 -0
  235. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/rfcs/0008-outbound-http-client.md +0 -0
  236. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/services/export/client.ts +0 -0
  237. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/services/export/retry.ts +0 -0
  238. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/services/ingest/client.ts +0 -0
  239. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/5/services/ingest/retry.ts +0 -0
  240. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/README.md +0 -0
  241. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/adr/0001-monorepo-layout.md +0 -0
  242. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/adr/0002-billing-on-postgres.md +0 -0
  243. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/adr/0004-ledger-sync-nightly-batch.md +0 -0
  244. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/rfcs/RFC-0003-invoice-ids.md +0 -0
  245. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/rfcs/RFC-0007-invoice-ids-ulid.md +0 -0
  246. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/rfcs/RFC-0009-billing-event-store.md +0 -0
  247. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/docs/rfcs/RFC-0010-revenue-service.md +0 -0
  248. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/libs/money/ulid.py +0 -0
  249. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/services/billing/src/events.py +0 -0
  250. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/services/billing/src/store.py +0 -0
  251. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/services/invoicing/ids/generator.py +0 -0
  252. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/services/ledger/README.md +0 -0
  253. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/6/services/ledger/sync.py +0 -0
  254. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/README.md +0 -0
  255. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/db/queries/orders.sql +0 -0
  256. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/db/sharding/router.py +0 -0
  257. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/design/decisions/DD-001-postgres-primary.md +0 -0
  258. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/design/decisions/DD-002-kafka-event-bus.md +0 -0
  259. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/design/decisions/DD-003-no-orm.md +0 -0
  260. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/design/decisions/DD-006-tenant-sharding.md +0 -0
  261. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/design/decisions/DD-011-orm-for-admin-console.md +0 -0
  262. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/pipelines/fanout/router.py +0 -0
  263. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/pipelines/ingest/consumer.py +0 -0
  264. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/pipelines/ingest/topics.yaml +0 -0
  265. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/rfcs/0004-region-sharding.md +0 -0
  266. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/services/admin-console/models.py +0 -0
  267. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/7/services/orders/repo.py +0 -0
  268. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/README.md +0 -0
  269. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/api/ledger.proto +0 -0
  270. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/config/http.yaml +0 -0
  271. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/config/messaging.yaml +0 -0
  272. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0001-record-architecture-decisions.md +0 -0
  273. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0002-postgresql-for-ledger.md +0 -0
  274. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0003-rabbitmq-domain-events.md +0 -0
  275. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0004-integer-minor-units.md +0 -0
  276. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0005-provider-http-retries.md +0 -0
  277. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0006-openapi-generated-clients.md +0 -0
  278. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0007-kafka-domain-events.md +0 -0
  279. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/adr/0008-structured-logging.md +0 -0
  280. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/docs/rfcs/RFC-012-idempotency-keys.md +0 -0
  281. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/api/idempotency.py +0 -0
  282. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/api/server.py +0 -0
  283. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/clients/provider.py +0 -0
  284. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/db/migrations/0001_init.sql +0 -0
  285. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/db/migrations/0008_idempotency_keys.sql +0 -0
  286. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/db/migrations/0009_fx_entries.sql +0 -0
  287. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/events/publisher.py +0 -0
  288. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/logging.py +0 -0
  289. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/8/services/ledger/models/entry.py +0 -0
  290. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/.env.example +0 -0
  291. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/README.md +0 -0
  292. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/docker-compose.yml +0 -0
  293. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/docs/decisions/001-session-storage.md +0 -0
  294. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/docs/decisions/002-api-rate-limiting.md +0 -0
  295. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/docs/decisions/003-jwt-sessions.md +0 -0
  296. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/docs/decisions/004-catalog-cache.md +0 -0
  297. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/catalog/cache.ts +0 -0
  298. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/catalog/repository.ts +0 -0
  299. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/jobs/email.ts +0 -0
  300. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/jobs/export.ts +0 -0
  301. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/jobs/queue.ts +0 -0
  302. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/jobs/worker.ts +0 -0
  303. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/lib/db.ts +0 -0
  304. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/lib/redis.ts +0 -0
  305. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/middleware/rateLimit.ts +0 -0
  306. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/server.ts +0 -0
  307. /package/packs/{solution-architect → core}/skills/context-graph/evals/files/9/src/session/store.ts +0 -0
  308. /package/packs/{solution-architect → core}/skills/context-graph/examples/inputs/order-events/docs/adr/0004-kafka-for-order-events.md +0 -0
  309. /package/packs/{solution-architect → core}/skills/context-graph/examples/inputs/order-events/docs/adr/0006-email-receipts.md +0 -0
  310. /package/packs/{solution-architect → core}/skills/context-graph/examples/inputs/order-events/docs/adr/0009-sqs-for-order-events.md +0 -0
  311. /package/packs/{solution-architect → core}/skills/context-graph/examples/order-events.md +0 -0
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "harbourline-web",
3
+ "version": "3.8.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "harbourline-web",
9
+ "version": "3.8.0",
10
+ "dependencies": {
11
+ "@northwind/datepicker": "^1.4.2",
12
+ "date-fns": "^2.30.0",
13
+ "lodash": "^4.17.21",
14
+ "moment": "^2.29.4",
15
+ "promise-polyfill": "^8.3.0",
16
+ "react": "^18.3.1",
17
+ "react-dom": "^18.3.1",
18
+ "whatwg-fetch": "^3.6.20"
19
+ }
20
+ },
21
+ "node_modules/@babel/runtime": {
22
+ "version": "7.25.6",
23
+ "dependencies": { "regenerator-runtime": "^0.14.0" }
24
+ },
25
+ "node_modules/@northwind/datepicker": {
26
+ "version": "1.4.2",
27
+ "dependencies": { "date-fns": "^3.6.0" },
28
+ "peerDependencies": { "react": ">=17" }
29
+ },
30
+ "node_modules/@northwind/datepicker/node_modules/date-fns": {
31
+ "version": "3.6.0"
32
+ },
33
+ "node_modules/date-fns": {
34
+ "version": "2.30.0",
35
+ "dependencies": { "@babel/runtime": "^7.21.0" }
36
+ },
37
+ "node_modules/js-tokens": {
38
+ "version": "4.0.0"
39
+ },
40
+ "node_modules/lodash": {
41
+ "version": "4.17.21"
42
+ },
43
+ "node_modules/loose-envify": {
44
+ "version": "1.4.0",
45
+ "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }
46
+ },
47
+ "node_modules/moment": {
48
+ "version": "2.29.4"
49
+ },
50
+ "node_modules/promise-polyfill": {
51
+ "version": "8.3.0"
52
+ },
53
+ "node_modules/react": {
54
+ "version": "18.3.1",
55
+ "dependencies": { "loose-envify": "^1.1.0" }
56
+ },
57
+ "node_modules/react-dom": {
58
+ "version": "18.3.1",
59
+ "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" },
60
+ "peerDependencies": { "react": "^18.3.1" }
61
+ },
62
+ "node_modules/regenerator-runtime": {
63
+ "version": "0.14.1"
64
+ },
65
+ "node_modules/scheduler": {
66
+ "version": "0.23.2",
67
+ "dependencies": { "loose-envify": "^1.1.0" }
68
+ },
69
+ "node_modules/whatwg-fetch": {
70
+ "version": "3.6.20"
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "harbourline-web",
3
+ "version": "3.8.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "build": "webpack --mode production",
7
+ "build:stats": "webpack --mode production --json=dist/stats.json"
8
+ },
9
+ "dependencies": {
10
+ "@northwind/datepicker": "^1.4.2",
11
+ "date-fns": "^2.30.0",
12
+ "lodash": "^4.17.21",
13
+ "moment": "^2.29.4",
14
+ "promise-polyfill": "^8.3.0",
15
+ "react": "^18.3.1",
16
+ "react-dom": "^18.3.1",
17
+ "whatwg-fetch": "^3.6.20"
18
+ },
19
+ "devDependencies": {
20
+ "@babel/core": "^7.25.2",
21
+ "@babel/preset-env": "^7.25.4",
22
+ "@babel/preset-react": "^7.24.7",
23
+ "babel-loader": "^9.1.3",
24
+ "html-webpack-plugin": "^5.6.0",
25
+ "webpack": "^5.94.0",
26
+ "webpack-cli": "^5.1.4"
27
+ }
28
+ }
@@ -0,0 +1,23 @@
1
+ import { lazy, Suspense, useState } from 'react';
2
+ import BookingForm from './BookingForm';
3
+
4
+ const Reports = lazy(() => import(/* webpackChunkName: "admin" */ './admin/Reports'));
5
+
6
+ export default function App() {
7
+ const [view, setView] = useState(window.location.hash === '#admin' ? 'admin' : 'book');
8
+ return (
9
+ <main>
10
+ <nav>
11
+ <button onClick={() => setView('book')}>Book</button>
12
+ <button onClick={() => setView('admin')}>Staff reports</button>
13
+ </nav>
14
+ {view === 'book' ? (
15
+ <BookingForm />
16
+ ) : (
17
+ <Suspense fallback={<p>Loading reports…</p>}>
18
+ <Reports />
19
+ </Suspense>
20
+ )}
21
+ </main>
22
+ );
23
+ }
@@ -0,0 +1,18 @@
1
+ import { useMemo, useState } from 'react';
2
+ import { DatePicker } from '@northwind/datepicker';
3
+ import { format, parseISO } from 'date-fns';
4
+ import { debounce } from '../utils/format';
5
+
6
+ export default function BookingForm() {
7
+ const [departure, setDeparture] = useState('2027-06-14');
8
+ const [query, setQuery] = useState('');
9
+ const search = useMemo(() => debounce((q) => fetch(`/api/cabins?q=${encodeURIComponent(q)}`), 300), []);
10
+
11
+ return (
12
+ <form>
13
+ <DatePicker value={parseISO(departure)} onChange={(d) => setDeparture(format(d, 'yyyy-MM-dd'))} />
14
+ <p>Departing {format(parseISO(departure), 'EEEE d MMMM yyyy')}</p>
15
+ <input value={query} onChange={(e) => { setQuery(e.target.value); search(e.target.value); }} />
16
+ </form>
17
+ );
18
+ }
@@ -0,0 +1,17 @@
1
+ import moment from 'moment';
2
+
3
+ export default function Reports({ rows = [] }) {
4
+ return (
5
+ <table>
6
+ <tbody>
7
+ {rows.map((r) => (
8
+ <tr key={r.id}>
9
+ <td>{r.ship}</td>
10
+ <td>{moment(r.sailedAt).format('LL')}</td>
11
+ <td>{moment(r.sailedAt).fromNow()}</td>
12
+ </tr>
13
+ ))}
14
+ </tbody>
15
+ </table>
16
+ );
17
+ }
@@ -0,0 +1,4 @@
1
+ import { createRoot } from 'react-dom/client';
2
+ import App from './App';
3
+
4
+ createRoot(document.getElementById('root')).render(<App />);
@@ -0,0 +1,17 @@
1
+ import { useState } from 'react';
2
+ import { titleCase } from '../utils/format';
3
+
4
+ export default function Hero() {
5
+ const [email, setEmail] = useState('');
6
+ const headline = titleCase('SAIL THE NORTHERN FJORDS THIS SUMMER');
7
+ return (
8
+ <section className="hero">
9
+ <h1>{headline}</h1>
10
+ <p>Small-ship cruises from Bergen and Tromsø, May to September.</p>
11
+ <form action="/api/waitlist" method="post">
12
+ <input type="email" name="email" value={email} onChange={(e) => setEmail(e.target.value)} />
13
+ <button type="submit">Join the waitlist</button>
14
+ </form>
15
+ </section>
16
+ );
17
+ }
@@ -0,0 +1,4 @@
1
+ import { createRoot } from 'react-dom/client';
2
+ import Hero from './Hero';
3
+
4
+ createRoot(document.getElementById('root')).render(<Hero />);
@@ -0,0 +1,3 @@
1
+ // Added in 2019 when we still had IE11 customers. Keep first so globals exist.
2
+ import 'whatwg-fetch';
3
+ import 'promise-polyfill/src/polyfill';
@@ -0,0 +1,4 @@
1
+ import _ from 'lodash';
2
+
3
+ export const titleCase = (s) => _.startCase(_.toLower(s));
4
+ export const debounce = (fn, ms) => _.debounce(fn, ms);
@@ -0,0 +1,35 @@
1
+ const path = require('path');
2
+ const HtmlWebpackPlugin = require('html-webpack-plugin');
3
+
4
+ module.exports = {
5
+ entry: {
6
+ app: ['./src/polyfills.js', './src/app/index.jsx'],
7
+ landing: ['./src/polyfills.js', './src/landing/index.jsx'],
8
+ },
9
+ output: {
10
+ path: path.resolve(__dirname, 'dist'),
11
+ filename: '[name].[contenthash:6].js',
12
+ publicPath: '/static/',
13
+ },
14
+ resolve: { extensions: ['.js', '.jsx'] },
15
+ module: {
16
+ rules: [{ test: /\.jsx?$/, exclude: /node_modules/, use: 'babel-loader' }],
17
+ },
18
+ optimization: {
19
+ runtimeChunk: 'single',
20
+ splitChunks: {
21
+ cacheGroups: {
22
+ // one cacheable vendor file for everything
23
+ vendors: {
24
+ test: /[\\/]node_modules[\\/]/,
25
+ name: 'vendors',
26
+ chunks: 'initial',
27
+ },
28
+ },
29
+ },
30
+ },
31
+ plugins: [
32
+ new HtmlWebpackPlugin({ filename: 'index.html', chunks: ['app'] }),
33
+ new HtmlWebpackPlugin({ filename: 'welcome.html', chunks: ['landing'] }),
34
+ ],
35
+ };
@@ -0,0 +1,12 @@
1
+ name: size
2
+ on: [pull_request]
3
+ jobs:
4
+ size:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - uses: actions/setup-node@v4
9
+ with: { node-version: 20 }
10
+ - run: npm ci
11
+ - run: npm run build
12
+ - run: npm run size
@@ -0,0 +1,17 @@
1
+ import { build } from 'esbuild';
2
+ import { writeFileSync } from 'node:fs';
3
+
4
+ const result = await build({
5
+ entryPoints: ['src/widget.ts'],
6
+ bundle: true,
7
+ splitting: true,
8
+ format: 'esm',
9
+ minify: true,
10
+ target: ['es2020'],
11
+ outdir: 'dist',
12
+ jsxFactory: 'h',
13
+ jsxFragment: 'Fragment',
14
+ metafile: true,
15
+ });
16
+
17
+ writeFileSync(process.env.META_OUT ?? 'meta.json', JSON.stringify(result.metafile, null, 2));
@@ -0,0 +1,100 @@
1
+ {
2
+ "inputs": {
3
+ "node_modules/preact/dist/preact.module.js": {
4
+ "bytes": 11480,
5
+ "imports": [],
6
+ "format": "esm"
7
+ },
8
+ "node_modules/preact/hooks/dist/hooks.module.js": {
9
+ "bytes": 3620,
10
+ "imports": [
11
+ {
12
+ "path": "node_modules/preact/dist/preact.module.js",
13
+ "kind": "import-statement",
14
+ "original": "preact"
15
+ }
16
+ ],
17
+ "format": "esm"
18
+ },
19
+ "src/api.ts": {
20
+ "bytes": 3960,
21
+ "imports": [],
22
+ "format": "esm"
23
+ },
24
+ "src/composer.tsx": {
25
+ "bytes": 6850,
26
+ "imports": [
27
+ {
28
+ "path": "node_modules/preact/dist/preact.module.js",
29
+ "kind": "import-statement",
30
+ "original": "preact"
31
+ },
32
+ {
33
+ "path": "node_modules/preact/hooks/dist/hooks.module.js",
34
+ "kind": "import-statement",
35
+ "original": "preact/hooks"
36
+ },
37
+ {
38
+ "path": "src/api.ts",
39
+ "kind": "import-statement",
40
+ "original": "./api"
41
+ }
42
+ ],
43
+ "format": "esm"
44
+ },
45
+ "src/styles.ts": {
46
+ "bytes": 4210,
47
+ "imports": [],
48
+ "format": "esm"
49
+ },
50
+ "src/widget.ts": {
51
+ "bytes": 1420,
52
+ "imports": [
53
+ {
54
+ "path": "node_modules/preact/dist/preact.module.js",
55
+ "kind": "import-statement",
56
+ "original": "preact"
57
+ },
58
+ {
59
+ "path": "src/composer.tsx",
60
+ "kind": "import-statement",
61
+ "original": "./composer"
62
+ },
63
+ {
64
+ "path": "src/styles.ts",
65
+ "kind": "import-statement",
66
+ "original": "./styles"
67
+ }
68
+ ],
69
+ "format": "esm"
70
+ }
71
+ },
72
+ "outputs": {
73
+ "dist/widget.js": {
74
+ "imports": [],
75
+ "exports": [],
76
+ "entryPoint": "src/widget.ts",
77
+ "inputs": {
78
+ "src/widget.ts": {
79
+ "bytesInOutput": 612
80
+ },
81
+ "src/composer.tsx": {
82
+ "bytesInOutput": 3108
83
+ },
84
+ "src/api.ts": {
85
+ "bytesInOutput": 1874
86
+ },
87
+ "src/styles.ts": {
88
+ "bytesInOutput": 3950
89
+ },
90
+ "node_modules/preact/dist/preact.module.js": {
91
+ "bytesInOutput": 10214
92
+ },
93
+ "node_modules/preact/hooks/dist/hooks.module.js": {
94
+ "bytesInOutput": 1436
95
+ }
96
+ },
97
+ "bytes": 21312
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,196 @@
1
+ {
2
+ "inputs": {
3
+ "node_modules/preact/dist/preact.module.js": {
4
+ "bytes": 11480,
5
+ "imports": [],
6
+ "format": "esm"
7
+ },
8
+ "node_modules/preact/hooks/dist/hooks.module.js": {
9
+ "bytes": 3620,
10
+ "imports": [
11
+ {
12
+ "path": "node_modules/preact/dist/preact.module.js",
13
+ "kind": "import-statement",
14
+ "original": "preact"
15
+ }
16
+ ],
17
+ "format": "esm"
18
+ },
19
+ "src/api.ts": {
20
+ "bytes": 3960,
21
+ "imports": [],
22
+ "format": "esm"
23
+ },
24
+ "src/composer.tsx": {
25
+ "bytes": 7720,
26
+ "imports": [
27
+ {
28
+ "path": "node_modules/preact/dist/preact.module.js",
29
+ "kind": "import-statement",
30
+ "original": "preact"
31
+ },
32
+ {
33
+ "path": "node_modules/preact/hooks/dist/hooks.module.js",
34
+ "kind": "import-statement",
35
+ "original": "preact/hooks"
36
+ },
37
+ {
38
+ "path": "src/api.ts",
39
+ "kind": "import-statement",
40
+ "original": "./api"
41
+ },
42
+ {
43
+ "path": "src/emoji/data.ts",
44
+ "kind": "import-statement",
45
+ "original": "./emoji/data"
46
+ }
47
+ ],
48
+ "format": "esm"
49
+ },
50
+ "src/emoji/data.ts": {
51
+ "bytes": 690,
52
+ "imports": [
53
+ {
54
+ "path": "src/emoji/emoji-data.json",
55
+ "kind": "import-statement",
56
+ "original": "./emoji-data.json"
57
+ }
58
+ ],
59
+ "format": "esm"
60
+ },
61
+ "src/emoji/emoji-data.json": {
62
+ "bytes": 142380,
63
+ "imports": [],
64
+ "format": "esm",
65
+ "with": {}
66
+ },
67
+ "src/emoji/picker.tsx": {
68
+ "bytes": 9140,
69
+ "imports": [
70
+ {
71
+ "path": "node_modules/preact/dist/preact.module.js",
72
+ "kind": "import-statement",
73
+ "original": "preact"
74
+ },
75
+ {
76
+ "path": "node_modules/preact/hooks/dist/hooks.module.js",
77
+ "kind": "import-statement",
78
+ "original": "preact/hooks"
79
+ },
80
+ {
81
+ "path": "src/emoji/data.ts",
82
+ "kind": "import-statement",
83
+ "original": "./data"
84
+ }
85
+ ],
86
+ "format": "esm"
87
+ },
88
+ "src/styles.ts": {
89
+ "bytes": 4210,
90
+ "imports": [],
91
+ "format": "esm"
92
+ },
93
+ "src/widget.ts": {
94
+ "bytes": 1610,
95
+ "imports": [
96
+ {
97
+ "path": "node_modules/preact/dist/preact.module.js",
98
+ "kind": "import-statement",
99
+ "original": "preact"
100
+ },
101
+ {
102
+ "path": "src/composer.tsx",
103
+ "kind": "import-statement",
104
+ "original": "./composer"
105
+ },
106
+ {
107
+ "path": "src/styles.ts",
108
+ "kind": "import-statement",
109
+ "original": "./styles"
110
+ },
111
+ {
112
+ "path": "src/emoji/picker.tsx",
113
+ "kind": "dynamic-import",
114
+ "original": "./emoji/picker"
115
+ }
116
+ ],
117
+ "format": "esm"
118
+ }
119
+ },
120
+ "outputs": {
121
+ "dist/widget.js": {
122
+ "imports": [
123
+ {
124
+ "path": "dist/chunk-R4N7QW2L.js",
125
+ "kind": "import-statement"
126
+ },
127
+ {
128
+ "path": "dist/picker-6YB3KD5M.js",
129
+ "kind": "dynamic-import"
130
+ }
131
+ ],
132
+ "exports": [],
133
+ "entryPoint": "src/widget.ts",
134
+ "inputs": {
135
+ "src/widget.ts": {
136
+ "bytesInOutput": 688
137
+ },
138
+ "src/composer.tsx": {
139
+ "bytesInOutput": 3467
140
+ },
141
+ "src/api.ts": {
142
+ "bytesInOutput": 1874
143
+ },
144
+ "src/styles.ts": {
145
+ "bytesInOutput": 3950
146
+ }
147
+ },
148
+ "bytes": 10215
149
+ },
150
+ "dist/picker-6YB3KD5M.js": {
151
+ "imports": [
152
+ {
153
+ "path": "dist/chunk-R4N7QW2L.js",
154
+ "kind": "import-statement"
155
+ }
156
+ ],
157
+ "exports": [
158
+ "default"
159
+ ],
160
+ "entryPoint": "src/emoji/picker.tsx",
161
+ "inputs": {
162
+ "src/emoji/picker.tsx": {
163
+ "bytesInOutput": 5830
164
+ }
165
+ },
166
+ "bytes": 5920
167
+ },
168
+ "dist/chunk-R4N7QW2L.js": {
169
+ "imports": [],
170
+ "exports": [
171
+ "EMOJI",
172
+ "SHORTCODES",
173
+ "h",
174
+ "render",
175
+ "useEffect",
176
+ "useRef",
177
+ "useState"
178
+ ],
179
+ "inputs": {
180
+ "node_modules/preact/dist/preact.module.js": {
181
+ "bytesInOutput": 10214
182
+ },
183
+ "node_modules/preact/hooks/dist/hooks.module.js": {
184
+ "bytesInOutput": 1436
185
+ },
186
+ "src/emoji/emoji-data.json": {
187
+ "bytesInOutput": 96512
188
+ },
189
+ "src/emoji/data.ts": {
190
+ "bytesInOutput": 402
191
+ }
192
+ },
193
+ "bytes": 108695
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@parcelpost/chat-widget",
3
+ "version": "2.6.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "node build.mjs",
8
+ "size": "node scripts/check-size.mjs"
9
+ },
10
+ "dependencies": {
11
+ "preact": "^10.24.3"
12
+ },
13
+ "devDependencies": {
14
+ "esbuild": "^0.24.0",
15
+ "typescript": "^5.6.3"
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ // Fails CI if the widget gets too big for customers' pages.
2
+ import { statSync } from 'node:fs';
3
+
4
+ const LIMIT = 25_000; // bytes, minified, uncompressed
5
+ const size = statSync('dist/widget.js').size;
6
+
7
+ console.log(`dist/widget.js: ${size} bytes (limit ${LIMIT})`);
8
+ if (size > LIMIT) {
9
+ console.error('widget.js is over its size budget');
10
+ process.exit(1);
11
+ }
@@ -0,0 +1,11 @@
1
+ const ENDPOINT = 'https://chat.parcelpost.example/v1/messages';
2
+
3
+ export async function sendMessage(text: string) {
4
+ const res = await fetch(ENDPOINT, {
5
+ method: 'POST',
6
+ headers: { 'content-type': 'application/json', 'x-widget-key': 'PLACEHOLDER_WIDGET_KEY' },
7
+ body: JSON.stringify({ text, page: location.href }),
8
+ });
9
+ if (!res.ok) throw new Error(`send failed: ${res.status}`);
10
+ return res.json();
11
+ }
@@ -0,0 +1,21 @@
1
+ import { h } from 'preact';
2
+ import { useRef, useState } from 'preact/hooks';
3
+ import { sendMessage } from './api';
4
+ import { SHORTCODES } from './emoji/data';
5
+
6
+ // PR #412: turn :smile: style shortcodes into emoji as the visitor types.
7
+ const SHORTCODE_RE = /:([a-z0-9_+-]+):/g;
8
+ const expandShortcodes = (text: string) =>
9
+ text.replace(SHORTCODE_RE, (m, code) => SHORTCODES[code] ?? m);
10
+
11
+ export function Composer({ openPicker }: { openPicker: (cb: (c: string) => void) => void }) {
12
+ const [text, setText] = useState('');
13
+ const input = useRef<HTMLTextAreaElement>(null);
14
+ return (
15
+ <form onSubmit={(e) => { e.preventDefault(); sendMessage(text); setText(''); }}>
16
+ <textarea ref={input} value={text} onInput={(e) => setText(expandShortcodes(e.currentTarget.value))} />
17
+ <button type="button" aria-label="Insert emoji" onClick={() => openPicker((c) => setText(text + c))}>☺</button>
18
+ <button type="submit">Send</button>
19
+ </form>
20
+ );
21
+ }
@@ -0,0 +1,8 @@
1
+ import EMOJI from './emoji-data.json';
2
+
3
+ export interface Emoji { char: string; shortcode: string; name: string; group: string; keywords: string[] }
4
+
5
+ export { EMOJI };
6
+ export const SHORTCODES: Record<string, string> = Object.fromEntries(
7
+ (EMOJI as Emoji[]).map((e) => [e.shortcode, e.char]),
8
+ );
@@ -0,0 +1,22 @@
1
+ import { h, render } from 'preact';
2
+ import { useState } from 'preact/hooks';
3
+ import { EMOJI, type Emoji } from './data';
4
+
5
+ function Picker({ onPick }: { onPick: (c: string) => void }) {
6
+ const [q, setQ] = useState('');
7
+ const shown = (EMOJI as Emoji[]).filter((e) => !q || e.keywords.some((k) => k.includes(q))).slice(0, 200);
8
+ return (
9
+ <div class="pp-picker">
10
+ <input placeholder="Search emoji" value={q} onInput={(e) => setQ(e.currentTarget.value)} />
11
+ <div class="pp-grid">
12
+ {shown.map((e) => <button key={e.shortcode} title={e.name} onClick={() => onPick(e.char)}>{e.char}</button>)}
13
+ </div>
14
+ </div>
15
+ );
16
+ }
17
+
18
+ export default function mountPicker(root: HTMLElement, onPick: (c: string) => void) {
19
+ const el = document.createElement('div');
20
+ root.appendChild(el);
21
+ render(<Picker onPick={onPick} />, el);
22
+ }