@circuitwall/jarela 2.7.0 → 3.0.0
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +58 -58
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +127 -127
- package/.next/standalone/.next/server/app/api/v1/access/route.js +372 -372
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +641 -641
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/duplicate/route.js +723 -723
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/agents/recent-replies/route.js +227 -227
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +384 -384
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +203 -203
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +760 -760
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +699 -699
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +480 -480
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +675 -675
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +559 -559
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +1269 -1269
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +199 -199
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/config/route.js +99 -99
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +515 -515
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +380 -380
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +256 -256
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +80 -97
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +677 -677
- package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js +856 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/recall-policy/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +299 -247
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +486 -486
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +18 -11
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +666 -666
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +128 -100
- package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/env/route.js +207 -207
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/events/route.js +154 -154
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/test/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +97 -97
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +188 -188
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +69 -69
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +223 -223
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +93 -93
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +481 -481
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +378 -378
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +510 -510
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +17 -17
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +33 -33
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +397 -397
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +757 -757
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/health/route.js +228 -228
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +198 -198
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +845 -845
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +747 -747
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +420 -420
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +819 -819
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +217 -217
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +1034 -1034
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +150 -150
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +16 -16
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +87 -538
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/route.js +273 -722
- package/.next/standalone/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +248 -239
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +128 -128
- package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +81 -81
- package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +34 -25
- package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/packages/route.js +48 -39
- package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +863 -863
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +230 -230
- package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +138 -138
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +853 -680
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -171
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +96 -96
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +157 -157
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +47 -47
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +206 -206
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +140 -140
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +166 -166
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +52 -52
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +722 -722
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +243 -243
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +518 -518
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +25 -25
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +609 -609
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +129 -129
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +112 -112
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +86 -86
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +83 -83
- package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +121 -121
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +139 -139
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/messages/[message_id]/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +1182 -1182
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/route.js +158 -158
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +137 -137
- package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +73 -73
- package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/update/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +45 -45
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/icon.svg/route.js +55 -55
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +18 -18
- package/.next/standalone/.next/server/app/page.js +2112 -1235
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page.js +91 -91
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/1244.js +136 -4
- package/.next/standalone/.next/server/chunks/1387.js +733 -57
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +3 -3
- package/.next/standalone/.next/server/chunks/2175.js +874 -0
- package/.next/standalone/.next/server/chunks/3042.js +34 -32
- package/.next/standalone/.next/server/chunks/309.js +21 -40
- package/.next/standalone/.next/server/chunks/3272.js +21 -40
- package/.next/standalone/.next/server/chunks/{540.js → 3326.js} +189 -61
- package/.next/standalone/.next/server/chunks/{6142.js → 3479.js} +170 -159
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/{5323.js → 3692.js} +31 -3
- package/.next/standalone/.next/server/chunks/4189.js +14 -2
- package/.next/standalone/.next/server/chunks/4377.js +2 -2
- package/.next/standalone/.next/server/chunks/4596.js +18 -9
- package/.next/standalone/.next/server/chunks/{639.js → 4728.js} +23676 -22755
- package/.next/standalone/.next/server/chunks/4955.js +81 -14
- package/.next/standalone/.next/server/chunks/5290.js +136 -5
- package/.next/standalone/.next/server/chunks/{2267.js → 6408.js} +990 -926
- package/.next/standalone/.next/server/chunks/{9667.js → 6911.js} +31 -3
- package/.next/standalone/.next/server/chunks/7033.js +7 -4
- package/.next/standalone/.next/server/chunks/7377.js +7 -4
- package/.next/standalone/.next/server/chunks/8461.js +31 -29
- package/.next/standalone/.next/server/chunks/9032.js +3 -3
- package/.next/standalone/.next/server/chunks/9174.js +18 -9
- package/.next/standalone/.next/server/chunks/9408.js +37 -15
- package/.next/standalone/.next/server/chunks/9824.js +2288 -2288
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +104638 -104532
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/preview-props.json +3 -3
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/2BAUJZ7x8eXCYpuZ-Kp7h/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/{877-145c9df8aa0aee63.js → 877-367eb49b20edd3d6.js} +38 -16
- package/.next/standalone/.next/static/chunks/app/_global-error/page-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/recall-policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-64585ef79400f17f.js → page-a584dfa806a1afdb.js} +1082 -205
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6cda89771c3f8ea4.js +17 -0
- package/.next/standalone/.next/static/css/19e1cd815490b47c.css +5 -0
- package/.next/standalone/docs/adoption/changesets.json +148 -0
- package/.next/standalone/package.json +5 -4
- package/CHANGELOG.md +51 -0
- package/README.md +115 -1
- package/api/client.startup.test.ts +29 -0
- package/api/client.ts +9 -2
- package/api/types.ts +20 -1
- package/app/api/v1/dashboard/pricing-task/route.ts +3 -1
- package/app/api/v1/documents/recall-policy/route.test.ts +59 -0
- package/app/api/v1/documents/recall-policy/route.ts +20 -0
- package/app/api/v1/documents/search/route.test.ts +36 -0
- package/app/api/v1/documents/search/route.ts +17 -5
- package/app/api/v1/documents/sources/[id]/reindex/route.test.ts +44 -0
- package/app/api/v1/documents/sources/[id]/reindex/route.ts +4 -1
- package/app/api/v1/documents/sources/route.test.ts +67 -0
- package/app/api/v1/documents/sources/route.ts +20 -2
- package/app/api/v1/models/[name]/route.ts +2 -0
- package/app/api/v1/models/route.ts +4 -0
- package/app/api/v1/providers/[provider]/models/route.test.ts +28 -0
- package/app/api/v1/providers/[provider]/models/route.ts +16 -2
- package/app/globals.css +51 -4
- package/components/agents/AgentsPanel.tsx +2 -2
- package/components/agents/agent-editor/AdvancedSection.tsx +1 -1
- package/components/agents/agent-editor/ModelSection.tsx +2 -2
- package/components/bridges/BridgeEditor.tsx +1 -1
- package/components/bridges/BridgesPanel.tsx +1 -1
- package/components/chat/InputBar.tsx +1 -1
- package/components/chat/MessageList.tsx +3 -3
- package/components/chat/useUserProfileAndAgent.test.tsx +43 -1
- package/components/chat/useUserProfileAndAgent.ts +16 -5
- package/components/credentials/CredentialsPanel.tsx +1 -1
- package/components/dashboard/CostBreakdown.test.tsx +34 -0
- package/components/dashboard/CostBreakdown.tsx +21 -0
- package/components/dashboard/DashboardPanel.test.tsx +9 -0
- package/components/dashboard/DashboardPanel.tsx +3 -3
- package/components/dashboard/Donuts.tsx +5 -2
- package/components/dashboard/ModelPricingSection.test.tsx +42 -0
- package/components/dashboard/ModelPricingSection.tsx +23 -21
- package/components/dashboard/Series.test.tsx +1 -0
- package/components/dashboard/Series.tsx +5 -0
- package/components/dashboard/SummaryCards.tsx +39 -27
- package/components/dashboard/VendorModelReportSection.tsx +2 -0
- package/components/documents/AddSourceFields.tsx +52 -15
- package/components/documents/AddSourceForm.tsx +61 -19
- package/components/documents/DocumentsPanel.tsx +22 -2
- package/components/documents/RecallExclusions.tsx +73 -0
- package/components/documents/SearchProbe.tsx +42 -5
- package/components/documents/helpers.ts +17 -3
- package/components/documents/indexing-controls.test.tsx +137 -0
- package/components/documents/useDocumentsPanel.test.tsx +87 -0
- package/components/documents/useDocumentsPanel.ts +47 -6
- package/components/env/EnvVarsPanel.tsx +1 -1
- package/components/harness/HarnessPanel.tsx +2 -2
- package/components/integrations/NetworkPanel.tsx +1 -1
- package/components/layout/AgentCardControls.test.tsx +162 -0
- package/components/layout/AgentCardControls.tsx +126 -0
- package/components/layout/AgentSwitcher.test.tsx +37 -0
- package/components/layout/AgentSwitcher.tsx +28 -3
- package/components/layout/AppShell.tsx +16 -9
- package/components/layout/MenuPanel.test.tsx +125 -2
- package/components/layout/MenuPanel.tsx +96 -2
- package/components/logs/LogsPanel.tsx +1 -1
- package/components/mcp/MCPPanel.tsx +1 -1
- package/components/memory/UnifiedMemoryPanel.tsx +4 -4
- package/components/models/CapBadges.tsx +1 -1
- package/components/models/EmbeddingModelSection.test.tsx +41 -0
- package/components/models/EmbeddingModelSection.tsx +5 -0
- package/components/models/ModelFeatureGuide.tsx +16 -8
- package/components/models/ModelsPanel.tsx +8 -3
- package/components/models/model-editor/ModelEditorBody.tsx +1 -0
- package/components/models/model-editor/ModelIdSection.tsx +5 -0
- package/components/profile/ProfileEditor.test.tsx +70 -0
- package/components/profile/ProfileEditor.tsx +6 -2
- package/components/profile/ProfilePanel.test.tsx +6 -0
- package/components/profile/ProfilePanel.tsx +1 -1
- package/components/scheduled-tasks/ScheduledTasksPanel.tsx +1 -1
- package/components/settings/AppearancePanel.tsx +1 -1
- package/components/settings/SettingsPanel.test.tsx +23 -0
- package/components/settings/SettingsPanel.tsx +2 -2
- package/components/skills/SkillsPanel.tsx +1 -1
- package/components/tools/BrowserPanel.tsx +1 -1
- package/components/tools/PackagesPanel.tsx +1 -1
- package/components/tools/UnifiedPackageList.tsx +1 -1
- package/components/ui/PanelHeader.tsx +1 -1
- package/components/ui/SubTabBar.tsx +1 -1
- package/docs/INSTALL.md +7 -5
- package/hooks/useAgents.ts +2 -2
- package/lib/agents/prepare/system-prompt.test.ts +65 -0
- package/lib/agents/prepare/system-prompt.ts +27 -20
- package/lib/agents/prompt-registry.test.ts +42 -0
- package/lib/agents/prompt-registry.ts +21 -0
- package/lib/bridges/whatsapp.inbound.test.ts +38 -1
- package/lib/bridges/whatsapp.ts +10 -33
- package/lib/db/index.ts +2 -0
- package/lib/db/migrations.test.ts +10 -0
- package/lib/db/migrations.ts +10 -0
- package/lib/db/statement-cache.test.ts +77 -0
- package/lib/db/statement-cache.ts +31 -0
- package/lib/documents/indexer.test.ts +16 -1
- package/lib/documents/indexer.ts +8 -7
- package/lib/documents/mail-source-config.ts +31 -0
- package/lib/documents/recall-policy.ts +24 -0
- package/lib/documents/remote/icloud.ts +56 -0
- package/lib/documents/remote/index.ts +4 -1
- package/lib/documents/remote/mail.test.ts +232 -0
- package/lib/documents/remote/mail.ts +48 -40
- package/lib/documents/search.test.ts +81 -2
- package/lib/documents/search.ts +47 -7
- package/lib/embeddings/cache.test.ts +16 -2
- package/lib/embeddings/index.test.ts +7 -0
- package/lib/embeddings/index.ts +12 -1
- package/lib/integrations/deepseek-web/manifest.ts +68 -0
- package/lib/integrations/gmail/manifest.ts +2 -3
- package/lib/integrations/icloud/manifest.ts +19 -5
- package/lib/integrations/registry.test.ts +8 -0
- package/lib/integrations/registry.ts +2 -0
- package/lib/lifecycle/changeset-build.test.ts +3 -0
- package/lib/lifecycle/changeset-build.ts +6 -0
- package/lib/lifecycle/changesets.ts +9 -0
- package/lib/pricing/llm-extract.ts +1 -1
- package/lib/pricing/maintenance-task.ts +19 -3
- package/lib/pricing/model-updates.test.ts +192 -0
- package/lib/pricing/model-updates.ts +205 -0
- package/lib/stores/app-settings.ts +17 -1
- package/lib/stores/dashboard-metrics-cache.test.ts +44 -0
- package/lib/stores/dashboard-metrics.test.ts +47 -4
- package/lib/stores/dashboard-metrics.ts +73 -8
- package/lib/stores/document-sources.ts +1 -0
- package/lib/stores/integrations.test.ts +20 -0
- package/lib/stores/integrations.ts +15 -4
- package/lib/stores/langgraph-store.test.ts +53 -0
- package/lib/stores/langgraph-store.ts +9 -21
- package/lib/stores/model-metadata.ts +89 -0
- package/lib/stores/threads.test.ts +34 -0
- package/lib/stores/threads.ts +17 -20
- package/lib/stores/tool-stats.test.ts +31 -0
- package/lib/stores/tool-stats.ts +16 -0
- package/lib/stores/version-adoption.test.ts +8 -0
- package/lib/stores/version-adoption.ts +5 -2
- package/lib/tools/general/documents.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.test.ts +5 -0
- package/lib/tools/general/pricing-maintenance.ts +4 -1
- package/lib/tools/packages/default-packages/icloud.test.ts +49 -0
- package/lib/tools/packages/default-packages/icloud.ts +8 -6
- package/lib/tools/packages/default-packages.test.ts +16 -0
- package/lib/tools/packages/langchain-packages.ts +2 -2
- package/lib/tools/runtime/category-filter.test.ts +22 -0
- package/lib/tools/web/deepseek.test.ts +76 -0
- package/lib/tools/web/deepseek.ts +68 -0
- package/lib/tools/web/fetch.test.ts +130 -2
- package/lib/tools/web/fetch.ts +48 -1
- package/lib/tools/web/search.test.ts +139 -2
- package/lib/tools/web/search.ts +48 -1
- package/lib/triggers/handlers/scheduled-task.test.ts +18 -0
- package/lib/triggers/handlers/scheduled-task.ts +6 -0
- package/lib/ui/feature-readiness.test.ts +7 -0
- package/lib/ui/feature-readiness.ts +2 -1
- package/package.json +5 -4
- package/scripts/check-npm-package.mjs +1 -0
- package/scripts/jarela-bin.mjs +3 -0
- package/scripts/runtime-version.mjs +19 -0
- package/scripts/start-prod.mjs +3 -0
- package/.next/standalone/.next/static/6qLnqWdsfBTJOAJApUYXy/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/page-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/duplicate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/recent-replies/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/messages/[message_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f6b126e5c5b11551.js +0 -17
- package/.next/standalone/.next/static/css/c4a8bed1da2c748f.css +0 -5
- /package/.next/standalone/.next/static/{6qLnqWdsfBTJOAJApUYXy → 2BAUJZ7x8eXCYpuZ-Kp7h}/_ssgManifest.js +0 -0
|
@@ -340,644 +340,190 @@ function isMaskedSecret(v) {
|
|
|
340
340
|
|
|
341
341
|
/***/ }),
|
|
342
342
|
|
|
343
|
-
/***/
|
|
344
|
-
/***/ ((
|
|
345
|
-
|
|
346
|
-
module.exports = require("fs");
|
|
347
|
-
|
|
348
|
-
/***/ }),
|
|
349
|
-
|
|
350
|
-
/***/ 638522:
|
|
351
|
-
/***/ ((module) => {
|
|
352
|
-
|
|
353
|
-
module.exports = require("node:zlib");
|
|
354
|
-
|
|
355
|
-
/***/ }),
|
|
356
|
-
|
|
357
|
-
/***/ 663033:
|
|
358
|
-
/***/ ((module) => {
|
|
359
|
-
|
|
360
|
-
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
361
|
-
|
|
362
|
-
/***/ }),
|
|
363
|
-
|
|
364
|
-
/***/ 710846:
|
|
365
|
-
/***/ ((module) => {
|
|
366
|
-
|
|
367
|
-
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
368
|
-
|
|
369
|
-
/***/ }),
|
|
370
|
-
|
|
371
|
-
/***/ 731421:
|
|
372
|
-
/***/ ((module) => {
|
|
373
|
-
|
|
374
|
-
module.exports = require("node:child_process");
|
|
375
|
-
|
|
376
|
-
/***/ }),
|
|
377
|
-
|
|
378
|
-
/***/ 744870:
|
|
379
|
-
/***/ ((module) => {
|
|
380
|
-
|
|
381
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
382
|
-
|
|
383
|
-
/***/ }),
|
|
343
|
+
/***/ 614094:
|
|
344
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
384
345
|
|
|
385
|
-
|
|
386
|
-
|
|
346
|
+
__webpack_require__.r(__webpack_exports__);
|
|
347
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
348
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
349
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
350
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
351
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
352
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
353
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
354
|
+
/* harmony export */ });
|
|
355
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
356
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
357
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
358
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
359
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
360
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
361
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
362
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
363
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
364
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
365
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
366
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
367
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
368
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
369
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
370
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
371
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
372
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
373
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
374
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
375
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
376
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
377
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
378
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
379
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
380
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
381
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
382
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
383
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
384
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
385
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
386
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
387
387
|
|
|
388
|
-
module.exports = require("node:worker_threads");
|
|
389
388
|
|
|
390
|
-
/***/ }),
|
|
391
389
|
|
|
392
|
-
/***/ 777030:
|
|
393
|
-
/***/ ((module) => {
|
|
394
390
|
|
|
395
|
-
module.exports = require("node:net");
|
|
396
391
|
|
|
397
|
-
/***/ }),
|
|
398
392
|
|
|
399
|
-
/***/ 781630:
|
|
400
|
-
/***/ ((module) => {
|
|
401
393
|
|
|
402
|
-
module.exports = require("http");
|
|
403
394
|
|
|
404
|
-
/***/ }),
|
|
405
395
|
|
|
406
|
-
/***/ 848161:
|
|
407
|
-
/***/ ((module) => {
|
|
408
396
|
|
|
409
|
-
module.exports = require("node:os");
|
|
410
397
|
|
|
411
|
-
/***/ }),
|
|
412
398
|
|
|
413
|
-
/***/ 889080:
|
|
414
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
415
399
|
|
|
416
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
417
|
-
/* harmony export */ Ah: () => (/* binding */ updateFlow),
|
|
418
|
-
/* harmony export */ Dd: () => (/* binding */ exchangeCode),
|
|
419
|
-
/* harmony export */ F8: () => (/* binding */ createFlow),
|
|
420
|
-
/* harmony export */ i8: () => (/* binding */ getMicrosoftAccessToken),
|
|
421
|
-
/* harmony export */ jG: () => (/* binding */ resolveMicrosoftAuth),
|
|
422
|
-
/* harmony export */ lv: () => (/* binding */ getFlow),
|
|
423
|
-
/* harmony export */ op: () => (/* binding */ graphPaged),
|
|
424
|
-
/* harmony export */ xj: () => (/* binding */ buildAuthorizeUrl),
|
|
425
|
-
/* harmony export */ z$: () => (/* binding */ graphFetch)
|
|
426
|
-
/* harmony export */ });
|
|
427
|
-
/* unused harmony export MICROSOFT_SCOPES */
|
|
428
|
-
/* harmony import */ var _lib_stores_integrations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(478228);
|
|
429
|
-
/* harmony import */ var _lib_utils_oauth_flow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(956362);
|
|
430
|
-
/* harmony import */ var _lib_utils_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(253638);
|
|
431
|
-
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(922032);
|
|
432
|
-
/* harmony import */ var _lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(522632);
|
|
433
|
-
// Ephemeral state store + shared auth helpers for the in-app Microsoft OAuth
|
|
434
|
-
// flow. Mirrors lib/integrations/gmail-oauth.ts but targets the Microsoft
|
|
435
|
-
// identity platform (v2.0 endpoint, common tenant by default) and Microsoft
|
|
436
|
-
// Graph as the downstream API surface (Outlook Mail + Calendar in v1).
|
|
437
|
-
//
|
|
438
|
-
// The user types client_id + client_secret in the Integrations panel and
|
|
439
|
-
// clicks "Connect Outlook". We POST those to /oauth/start, which stashes
|
|
440
|
-
// them here keyed by a random `state` token and returns the Microsoft
|
|
441
|
-
// authorize URL. The browser opens that URL; MS bounces back to
|
|
442
|
-
// /oauth/callback with `?code&state`, which exchanges the code for a
|
|
443
|
-
// refresh_token (granted because we asked for `offline_access`) and
|
|
444
|
-
// persists the integration. The panel polls /oauth/status separately.
|
|
445
|
-
//
|
|
446
|
-
// Pinned to globalThis so HMR in dev doesn't lose pending flows.
|
|
447
400
|
|
|
448
401
|
|
|
449
402
|
|
|
450
403
|
|
|
451
404
|
|
|
452
|
-
|
|
453
|
-
|
|
405
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
406
|
+
// module.
|
|
407
|
+
const nextConfigOutput = "standalone"
|
|
408
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
409
|
+
definition: {
|
|
410
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
411
|
+
page: "/api/v1/integrations/outlook/oauth/start/route",
|
|
412
|
+
pathname: "/api/v1/integrations/outlook/oauth/start",
|
|
413
|
+
filename: "route",
|
|
414
|
+
bundlePath: "app/api/v1/integrations/outlook/oauth/start/route"
|
|
415
|
+
},
|
|
416
|
+
distDir: ".next" || 0,
|
|
417
|
+
relativeProjectDir: false || '',
|
|
418
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/integrations/outlook/oauth/start/route.ts",
|
|
419
|
+
nextConfigOutput,
|
|
420
|
+
// The lazy require factory ensures that:
|
|
421
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
422
|
+
// correctly attributing module load time to application-code rather than
|
|
423
|
+
// framework internals.
|
|
424
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
425
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
426
|
+
// ensureUserland() awaits before the first request is handled.
|
|
427
|
+
userland: ()=>__webpack_require__(602523),
|
|
428
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
429
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
430
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
431
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
432
|
+
... false ? 0 : {}
|
|
454
433
|
});
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
const TENANT = process.env.OUTLOOK_TENANT?.trim() || "common";
|
|
464
|
-
// Delegated Graph scopes the agent needs. Keep narrow:
|
|
465
|
-
// - offline_access → required for a refresh_token (MS counterpart of
|
|
466
|
-
// Google's access_type=offline).
|
|
467
|
-
// - User.Read → used by the test endpoint to call /me.
|
|
468
|
-
// - Mail.ReadWrite → search/read mail, create drafts, mark read,
|
|
469
|
-
// move to folders (incl. DeletedItems).
|
|
470
|
-
// - Mail.Send → send mail when the user explicitly asks for it.
|
|
471
|
-
// - Files.Read.All → Microsoft Search over OneDrive/SharePoint files.
|
|
472
|
-
// - Sites.Read.All → Microsoft Search over SharePoint lists and sites.
|
|
473
|
-
// - Calendars.ReadWrite → list/get/create/update/delete events on the
|
|
474
|
-
// user's existing calendars.
|
|
475
|
-
// - Tasks.ReadWrite → list/get/create/update/complete/delete Microsoft
|
|
476
|
-
// To Do tasks and lists (ms_todo_* tools).
|
|
477
|
-
// - People.Read → resolve "who is X" / frequent contacts via
|
|
478
|
-
// /me/people (ms_people_resolve tool).
|
|
479
|
-
const MICROSOFT_SCOPES = [
|
|
480
|
-
"offline_access",
|
|
481
|
-
"User.Read",
|
|
482
|
-
"Mail.ReadWrite",
|
|
483
|
-
"Mail.Send",
|
|
484
|
-
"Files.Read.All",
|
|
485
|
-
"Sites.Read.All",
|
|
486
|
-
"Calendars.ReadWrite",
|
|
487
|
-
"Tasks.ReadWrite",
|
|
488
|
-
"People.Read"
|
|
489
|
-
];
|
|
490
|
-
function buildAuthorizeUrl(opts) {
|
|
491
|
-
const p = new URLSearchParams({
|
|
492
|
-
client_id: opts.clientId,
|
|
493
|
-
redirect_uri: opts.redirectUri,
|
|
494
|
-
response_type: "code",
|
|
495
|
-
response_mode: "query",
|
|
496
|
-
scope: MICROSOFT_SCOPES.join(" "),
|
|
497
|
-
// Force consent so a returning user actually re-grants any newly-added
|
|
498
|
-
// scope (otherwise MS silently reuses the prior grant minus the new bit).
|
|
499
|
-
prompt: "consent",
|
|
500
|
-
state: opts.state
|
|
434
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
435
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
436
|
+
// are used to hook into the route.
|
|
437
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
438
|
+
function patchFetch() {
|
|
439
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
440
|
+
workAsyncStorage,
|
|
441
|
+
workUnitAsyncStorage
|
|
501
442
|
});
|
|
502
|
-
return `https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/authorize?${p.toString()}`;
|
|
503
443
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
async function exchangeCode(opts) {
|
|
509
|
-
const clientId = (0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeOAuthInput */ .d)(opts.clientId) ?? "";
|
|
510
|
-
const clientSecret = (0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeOAuthInput */ .d)(opts.clientSecret) ?? "";
|
|
511
|
-
const body = new URLSearchParams({
|
|
512
|
-
code: opts.code,
|
|
513
|
-
client_id: clientId,
|
|
514
|
-
client_secret: clientSecret,
|
|
515
|
-
redirect_uri: opts.redirectUri,
|
|
516
|
-
grant_type: "authorization_code",
|
|
517
|
-
scope: MICROSOFT_SCOPES.join(" ")
|
|
518
|
-
});
|
|
519
|
-
const res = await fetch(`https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/token`, {
|
|
520
|
-
method: "POST",
|
|
521
|
-
headers: {
|
|
522
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
523
|
-
},
|
|
524
|
-
body: body.toString(),
|
|
525
|
-
signal: AbortSignal.timeout(30000)
|
|
526
|
-
});
|
|
527
|
-
const text = await res.text();
|
|
528
|
-
const parsed = (0,_lib_utils_json__WEBPACK_IMPORTED_MODULE_3__/* .parseJsonSafe */ .p)(text, {});
|
|
529
|
-
if (!res.ok) {
|
|
530
|
-
const err = parsed["error_description"] || parsed["error"] || text || `HTTP ${res.status}`;
|
|
531
|
-
console.error(`[microsoft-oauth] token exchange rejected (${res.status}): ${err} | client_id ${(0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .secretFingerprint */ .n)(clientId)} | client_secret ${(0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .secretFingerprint */ .n)(clientSecret)}`);
|
|
532
|
-
throw new Error(err);
|
|
444
|
+
|
|
445
|
+
async function handler(req, res, ctx) {
|
|
446
|
+
if (ctx.requestMeta) {
|
|
447
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
533
448
|
}
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
function resolveMicrosoftAuth() {
|
|
537
|
-
const envId = process.env.OUTLOOK_CLIENT_ID;
|
|
538
|
-
const envSecret = process.env.OUTLOOK_CLIENT_SECRET;
|
|
539
|
-
const envRefresh = process.env.OUTLOOK_REFRESH_TOKEN;
|
|
540
|
-
if (envId && envSecret && envRefresh) {
|
|
541
|
-
return {
|
|
542
|
-
client_id: envId,
|
|
543
|
-
client_secret: envSecret,
|
|
544
|
-
refresh_token: envRefresh
|
|
545
|
-
};
|
|
449
|
+
if (routeModule.isDev) {
|
|
450
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
546
451
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
452
|
+
let srcPage = "/api/v1/integrations/outlook/oauth/start/route";
|
|
453
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
454
|
+
// so we need to to process dynamic routes properly
|
|
455
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
456
|
+
if (false) {} else if (srcPage === '/index') {
|
|
457
|
+
// we always normalize /index specifically
|
|
458
|
+
srcPage = '/';
|
|
554
459
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
// Force-evict a cached access token (e.g. after a 401). The next call to
|
|
564
|
-
// getMicrosoftAccessToken will refresh against the v2 token endpoint.
|
|
565
|
-
function bustAccessToken(auth) {
|
|
566
|
-
accessTokenCache.delete(cacheKey(auth));
|
|
567
|
-
}
|
|
568
|
-
async function getMicrosoftAccessToken(auth) {
|
|
569
|
-
const key = cacheKey(auth);
|
|
570
|
-
const cached = accessTokenCache.get(key);
|
|
571
|
-
if (cached && cached.expires_at > Date.now() + 60000) return cached.token;
|
|
572
|
-
const body = new URLSearchParams({
|
|
573
|
-
client_id: auth.client_id,
|
|
574
|
-
client_secret: auth.client_secret,
|
|
575
|
-
refresh_token: auth.refresh_token,
|
|
576
|
-
grant_type: "refresh_token",
|
|
577
|
-
// Required on the v2 endpoint even for refresh_token grants.
|
|
578
|
-
scope: MICROSOFT_SCOPES.join(" ")
|
|
460
|
+
const multiZoneDraftMode = false;
|
|
461
|
+
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
462
|
+
// do it before starting the request span. The span is started before
|
|
463
|
+
// `prepare`, so route module preparation is part of the request's trace.
|
|
464
|
+
// When this request triggers registration, the lifecycle spans of
|
|
465
|
+
// `instrumentation.ts` are emitted inside the request span.
|
|
466
|
+
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
467
|
+
deferSpans: true
|
|
579
468
|
});
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
body: body.toString(),
|
|
587
|
-
signal: AbortSignal.timeout(30000)
|
|
588
|
-
});
|
|
589
|
-
const text = await res.text();
|
|
590
|
-
if (!res.ok) {
|
|
591
|
-
accessTokenCache.delete(key);
|
|
592
|
-
return {
|
|
593
|
-
error: `Microsoft OAuth refresh failed (${res.status}): ${text.slice(0, 300)}`
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
const parsed = JSON.parse(text);
|
|
597
|
-
if (!parsed.access_token) return {
|
|
598
|
-
error: "OAuth response missing access_token"
|
|
599
|
-
};
|
|
600
|
-
const expires_at = Date.now() + (parsed.expires_in ?? 3000) * 1000;
|
|
601
|
-
accessTokenCache.set(key, {
|
|
602
|
-
token: parsed.access_token,
|
|
603
|
-
expires_at
|
|
604
|
-
});
|
|
605
|
-
return parsed.access_token;
|
|
606
|
-
} catch (err) {
|
|
607
|
-
return {
|
|
608
|
-
error: `Microsoft OAuth refresh threw: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err)}`
|
|
609
|
-
};
|
|
610
|
-
}
|
|
469
|
+
return routeModule.traceRequest(req, {
|
|
470
|
+
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
471
|
+
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
472
|
+
httpTarget: req.url,
|
|
473
|
+
instrumentation
|
|
474
|
+
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
611
475
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
prefix: "/me/sendMail",
|
|
625
|
-
scope: "Mail.Send"
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
prefix: "/me/events",
|
|
629
|
-
scope: "Calendars.ReadWrite"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
prefix: "/me/calendar",
|
|
633
|
-
scope: "Calendars.ReadWrite"
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
prefix: "/me/calendars",
|
|
637
|
-
scope: "Calendars.ReadWrite"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
prefix: "/me/todo",
|
|
641
|
-
scope: "Tasks.ReadWrite"
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
prefix: "/me/people",
|
|
645
|
-
scope: "People.Read"
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
prefix: "/me/contacts",
|
|
649
|
-
scope: "Contacts.Read"
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
prefix: "/me/drive",
|
|
653
|
-
scope: "Files.Read"
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
prefix: "/me/insights",
|
|
657
|
-
scope: "Sites.Read.All"
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
prefix: "/search/query",
|
|
661
|
-
scope: "Mail.Read / Calendars.Read for mail and events; Files.Read.All for files; Sites.Read.All for lists and sites"
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
prefix: "/me",
|
|
665
|
-
scope: "User.Read"
|
|
476
|
+
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
477
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
478
|
+
srcPage,
|
|
479
|
+
multiZoneDraftMode
|
|
480
|
+
});
|
|
481
|
+
if (!prepareResult) {
|
|
482
|
+
res.statusCode = 400;
|
|
483
|
+
res.end('Bad Request');
|
|
484
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
485
|
+
return null;
|
|
666
486
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
487
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
488
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
489
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
490
|
+
const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
|
|
491
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
492
|
+
const render404 = async ()=>{
|
|
493
|
+
// TODO: should route-module itself handle rendering the 404
|
|
494
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
495
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
496
|
+
} else {
|
|
497
|
+
res.end('This page could not be found');
|
|
498
|
+
}
|
|
499
|
+
return null;
|
|
500
|
+
};
|
|
501
|
+
if (isIsr && !isDraftMode) {
|
|
502
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
503
|
+
if (prerenderInfo) {
|
|
504
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
505
|
+
if (nextConfig.adapterPath) {
|
|
506
|
+
return await render404();
|
|
507
|
+
}
|
|
508
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
509
|
+
}
|
|
510
|
+
}
|
|
672
511
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
if (Number.isFinite(secs) && secs >= 0) return Math.min(secs, 30) * 1000;
|
|
679
|
-
const ts = Date.parse(headerVal);
|
|
680
|
-
if (!Number.isNaN(ts)) return Math.max(0, Math.min(ts - Date.now(), 30000));
|
|
681
|
-
return 0;
|
|
682
|
-
}
|
|
683
|
-
function backoffFor(attempt) {
|
|
684
|
-
return Math.min(500 * 2 ** attempt, 4000);
|
|
685
|
-
}
|
|
686
|
-
// Shared Graph fetch helper. Used by lib/tools/outlook.ts,
|
|
687
|
-
// lib/tools/outlook-calendar.ts, lib/tools/ms-todo.ts, lib/tools/ms-graph.ts.
|
|
688
|
-
// Returns parsed JSON or { error: string, url? }. 204 No Content returns
|
|
689
|
-
// { ok: true }.
|
|
690
|
-
//
|
|
691
|
-
// Built-in resilience:
|
|
692
|
-
// - 401 Unauthorized → drop the cached access token and retry once with a
|
|
693
|
-
// freshly refreshed one (covers token-revoked-mid-cache edge cases).
|
|
694
|
-
// - 429 / 503 → honour the `Retry-After` header (capped at 30s) or fall
|
|
695
|
-
// back to exponential backoff. Retries up to 3 times.
|
|
696
|
-
// - 403 Forbidden → surface a scope hint ("reconnect with X") so the
|
|
697
|
-
// operator knows what to grant.
|
|
698
|
-
async function graphFetch(auth, path, init) {
|
|
699
|
-
let target;
|
|
700
|
-
try {
|
|
701
|
-
target = path.startsWith("http") ? new URL(path) : new URL(`https://graph.microsoft.com/v1.0${path}`);
|
|
702
|
-
} catch {
|
|
703
|
-
return {
|
|
704
|
-
error: "Microsoft Graph request URL is invalid."
|
|
705
|
-
};
|
|
512
|
+
let cacheKey = null;
|
|
513
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
514
|
+
cacheKey = resolvedPathname;
|
|
515
|
+
// ensure /index and / is normalized to one key
|
|
516
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
706
517
|
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const token = await getMicrosoftAccessToken(auth);
|
|
717
|
-
if (typeof token !== "string") return token;
|
|
718
|
-
let res;
|
|
719
|
-
try {
|
|
720
|
-
res = await fetch(url, {
|
|
721
|
-
...init,
|
|
722
|
-
headers: {
|
|
723
|
-
Authorization: `Bearer ${token}`,
|
|
724
|
-
Accept: "application/json",
|
|
725
|
-
"Content-Type": "application/json",
|
|
726
|
-
...init?.headers ?? {}
|
|
727
|
-
},
|
|
728
|
-
signal: AbortSignal.timeout(30000)
|
|
729
|
-
});
|
|
730
|
-
} catch (err) {
|
|
731
|
-
return {
|
|
732
|
-
error: `Graph fetch threw: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err)}`,
|
|
733
|
-
url
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
if (res.status === 204) return {
|
|
737
|
-
ok: true
|
|
738
|
-
};
|
|
739
|
-
if (res.status === 401 && !triedReauth) {
|
|
740
|
-
triedReauth = true;
|
|
741
|
-
bustAccessToken(auth);
|
|
742
|
-
continue;
|
|
743
|
-
}
|
|
744
|
-
if ((res.status === 429 || res.status === 503) && attempt < 3) {
|
|
745
|
-
const waitMs = parseRetryAfter(res.headers.get("Retry-After")) ?? backoffFor(attempt);
|
|
746
|
-
attempt += 1;
|
|
747
|
-
await new Promise((r)=>setTimeout(r, waitMs));
|
|
748
|
-
continue;
|
|
749
|
-
}
|
|
750
|
-
const text = await res.text();
|
|
751
|
-
if (!res.ok) {
|
|
752
|
-
let msg = `Graph ${res.status}: ${text.slice(0, 500)}`;
|
|
753
|
-
if (res.status === 403) {
|
|
754
|
-
const hint = scopeHintFor(path);
|
|
755
|
-
if (hint) {
|
|
756
|
-
msg += ` — reconnect the Microsoft integration with scope: ${hint}`;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
return {
|
|
760
|
-
error: msg,
|
|
761
|
-
url
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
try {
|
|
765
|
-
return JSON.parse(text);
|
|
766
|
-
} catch {
|
|
767
|
-
return text;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
// Follow @odata.nextLink across pages and concatenate `value` arrays.
|
|
772
|
-
// Stops at `maxPages` (default 5) to bound context cost. Returns the same
|
|
773
|
-
// shape as graphFetch (object with `.value`) but with the merged array, or
|
|
774
|
-
// the original error shape if any page errored.
|
|
775
|
-
async function graphPaged(auth, path, opts) {
|
|
776
|
-
const maxPages = opts?.maxPages ?? 5;
|
|
777
|
-
let current = path;
|
|
778
|
-
const merged = [];
|
|
779
|
-
let pages = 0;
|
|
780
|
-
while(current && pages < maxPages){
|
|
781
|
-
const page = await graphFetch(auth, current, opts?.init);
|
|
782
|
-
if (page && typeof page === "object" && "error" in page) return page;
|
|
783
|
-
const body = page;
|
|
784
|
-
if (Array.isArray(body.value)) merged.push(...body.value);
|
|
785
|
-
current = typeof body["@odata.nextLink"] === "string" ? body["@odata.nextLink"] : null;
|
|
786
|
-
pages += 1;
|
|
787
|
-
}
|
|
788
|
-
return {
|
|
789
|
-
value: merged,
|
|
790
|
-
pages
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
/***/ }),
|
|
796
|
-
|
|
797
|
-
/***/ 891853:
|
|
798
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
799
|
-
|
|
800
|
-
__webpack_require__.r(__webpack_exports__);
|
|
801
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
802
|
-
/* harmony export */ handler: () => (/* binding */ handler),
|
|
803
|
-
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
804
|
-
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
805
|
-
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
806
|
-
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
807
|
-
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
808
|
-
/* harmony export */ });
|
|
809
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(319225);
|
|
810
|
-
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
|
|
811
|
-
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(684006);
|
|
812
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
813
|
-
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
|
|
814
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(799373);
|
|
815
|
-
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
|
|
816
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(434775);
|
|
817
|
-
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
|
|
818
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(524235);
|
|
819
|
-
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
|
|
820
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(200261);
|
|
821
|
-
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
|
|
822
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(754365);
|
|
823
|
-
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
|
|
824
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(590771);
|
|
825
|
-
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
|
|
826
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(473461);
|
|
827
|
-
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
|
|
828
|
-
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(767798);
|
|
829
|
-
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(192280);
|
|
830
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(662018);
|
|
831
|
-
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
|
|
832
|
-
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445696);
|
|
833
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(347929);
|
|
834
|
-
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
835
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(986439);
|
|
836
|
-
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
|
|
837
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(710246);
|
|
838
|
-
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
|
|
839
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(137527);
|
|
840
|
-
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
// We inject the nextConfigOutput here so that we can use them in the route
|
|
860
|
-
// module.
|
|
861
|
-
const nextConfigOutput = "standalone"
|
|
862
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
863
|
-
definition: {
|
|
864
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
865
|
-
page: "/api/v1/integrations/outlook/oauth/start/route",
|
|
866
|
-
pathname: "/api/v1/integrations/outlook/oauth/start",
|
|
867
|
-
filename: "route",
|
|
868
|
-
bundlePath: "app/api/v1/integrations/outlook/oauth/start/route"
|
|
869
|
-
},
|
|
870
|
-
distDir: ".next" || 0,
|
|
871
|
-
relativeProjectDir: false || '',
|
|
872
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/integrations/outlook/oauth/start/route.ts",
|
|
873
|
-
nextConfigOutput,
|
|
874
|
-
// The lazy require factory ensures that:
|
|
875
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
876
|
-
// correctly attributing module load time to application-code rather than
|
|
877
|
-
// framework internals.
|
|
878
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
879
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
880
|
-
// ensureUserland() awaits before the first request is handled.
|
|
881
|
-
userland: ()=>__webpack_require__(602523),
|
|
882
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
883
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
884
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
885
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
886
|
-
... false ? 0 : {}
|
|
887
|
-
});
|
|
888
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
889
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
890
|
-
// are used to hook into the route.
|
|
891
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
892
|
-
function patchFetch() {
|
|
893
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
894
|
-
workAsyncStorage,
|
|
895
|
-
workUnitAsyncStorage
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
async function handler(req, res, ctx) {
|
|
900
|
-
if (ctx.requestMeta) {
|
|
901
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
902
|
-
}
|
|
903
|
-
if (routeModule.isDev) {
|
|
904
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
905
|
-
}
|
|
906
|
-
let srcPage = "/api/v1/integrations/outlook/oauth/start/route";
|
|
907
|
-
// turbopack doesn't normalize `/index` in the page name
|
|
908
|
-
// so we need to to process dynamic routes properly
|
|
909
|
-
// TODO: fix turbopack providing differing value from webpack
|
|
910
|
-
if (false) {} else if (srcPage === '/index') {
|
|
911
|
-
// we always normalize /index specifically
|
|
912
|
-
srcPage = '/';
|
|
913
|
-
}
|
|
914
|
-
const multiZoneDraftMode = false;
|
|
915
|
-
// Registering `instrumentation.ts` usually installs the tracer provider, so
|
|
916
|
-
// do it before starting the request span. The span is started before
|
|
917
|
-
// `prepare`, so route module preparation is part of the request's trace.
|
|
918
|
-
// When this request triggers registration, the lifecycle spans of
|
|
919
|
-
// `instrumentation.ts` are emitted inside the request span.
|
|
920
|
-
const { instrumentation } = await routeModule.ensureInstrumentation(req, {
|
|
921
|
-
deferSpans: true
|
|
922
|
-
});
|
|
923
|
-
return routeModule.traceRequest(req, {
|
|
924
|
-
tracer: (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)(),
|
|
925
|
-
spanName: `${req.method || 'GET'} ${srcPage}`,
|
|
926
|
-
httpTarget: req.url,
|
|
927
|
-
instrumentation
|
|
928
|
-
}, (requestSpan, requestRootSpan)=>handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan));
|
|
929
|
-
}
|
|
930
|
-
async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, requestSpan, requestRootSpan) {
|
|
931
|
-
const prepareResult = await routeModule.prepare(req, res, {
|
|
932
|
-
srcPage,
|
|
933
|
-
multiZoneDraftMode
|
|
934
|
-
});
|
|
935
|
-
if (!prepareResult) {
|
|
936
|
-
res.statusCode = 400;
|
|
937
|
-
res.end('Bad Request');
|
|
938
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
939
|
-
return null;
|
|
940
|
-
}
|
|
941
|
-
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
942
|
-
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
943
|
-
// Only this route's prerenders can establish ISR or admit generated params.
|
|
944
|
-
const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
|
|
945
|
-
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
946
|
-
const render404 = async ()=>{
|
|
947
|
-
// TODO: should route-module itself handle rendering the 404
|
|
948
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
949
|
-
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
950
|
-
} else {
|
|
951
|
-
res.end('This page could not be found');
|
|
952
|
-
}
|
|
953
|
-
return null;
|
|
954
|
-
};
|
|
955
|
-
if (isIsr && !isDraftMode) {
|
|
956
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
957
|
-
if (prerenderInfo) {
|
|
958
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
959
|
-
if (nextConfig.adapterPath) {
|
|
960
|
-
return await render404();
|
|
961
|
-
}
|
|
962
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
let cacheKey = null;
|
|
967
|
-
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
968
|
-
cacheKey = resolvedPathname;
|
|
969
|
-
// ensure /index and / is normalized to one key
|
|
970
|
-
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
971
|
-
}
|
|
972
|
-
// Before rendering (which initializes component tree modules), we have to
|
|
973
|
-
// set the reference manifests to our global store so Server Action's
|
|
974
|
-
// encryption util can access to them at the top level of the page module.
|
|
975
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
976
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
977
|
-
page: srcPage,
|
|
978
|
-
clientReferenceManifest,
|
|
979
|
-
serverActionsManifest
|
|
980
|
-
});
|
|
518
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
519
|
+
// set the reference manifests to our global store so Server Action's
|
|
520
|
+
// encryption util can access to them at the top level of the page module.
|
|
521
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
522
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
523
|
+
page: srcPage,
|
|
524
|
+
clientReferenceManifest,
|
|
525
|
+
serverActionsManifest
|
|
526
|
+
});
|
|
981
527
|
}
|
|
982
528
|
const method = req.method || 'GET';
|
|
983
529
|
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
@@ -1097,151 +643,605 @@ async function handleRequest(req, res, ctx, srcPage, multiZoneDraftMode, request
|
|
|
1097
643
|
};
|
|
1098
644
|
const handleResponse = async (currentSpan)=>{
|
|
1099
645
|
try {
|
|
1100
|
-
var _cacheEntry_value;
|
|
1101
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
1102
|
-
req,
|
|
1103
|
-
nextConfig,
|
|
1104
|
-
cacheKey,
|
|
1105
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
1106
|
-
isFallback: false,
|
|
1107
|
-
previewProps,
|
|
1108
|
-
prerenderManifest,
|
|
1109
|
-
isRoutePPREnabled: false,
|
|
1110
|
-
isOnDemandRevalidate,
|
|
1111
|
-
revalidateOnlyGenerated,
|
|
1112
|
-
responseGenerator,
|
|
1113
|
-
waitUntil: ctx.waitUntil,
|
|
1114
|
-
isMinimalMode
|
|
646
|
+
var _cacheEntry_value;
|
|
647
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
648
|
+
req,
|
|
649
|
+
nextConfig,
|
|
650
|
+
cacheKey,
|
|
651
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
652
|
+
isFallback: false,
|
|
653
|
+
previewProps,
|
|
654
|
+
prerenderManifest,
|
|
655
|
+
isRoutePPREnabled: false,
|
|
656
|
+
isOnDemandRevalidate,
|
|
657
|
+
revalidateOnlyGenerated,
|
|
658
|
+
responseGenerator,
|
|
659
|
+
waitUntil: ctx.waitUntil,
|
|
660
|
+
isMinimalMode
|
|
661
|
+
});
|
|
662
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
663
|
+
throw cacheEntry.error;
|
|
664
|
+
}
|
|
665
|
+
// we don't create a cacheEntry for ISR
|
|
666
|
+
if (!isIsr) {
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
670
|
+
var _cacheEntry_value1;
|
|
671
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
672
|
+
}
|
|
673
|
+
if (!isMinimalMode) {
|
|
674
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
675
|
+
}
|
|
676
|
+
// Draft mode should never be cached
|
|
677
|
+
if (isDraftMode) {
|
|
678
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
679
|
+
}
|
|
680
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
681
|
+
if (!(isMinimalMode && isIsr)) {
|
|
682
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
683
|
+
}
|
|
684
|
+
// If cache control is already set on the response we don't
|
|
685
|
+
// override it to allow users to customize it via next.config
|
|
686
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
687
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
688
|
+
}
|
|
689
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
690
|
+
new Response(cacheEntry.value.body, {
|
|
691
|
+
headers,
|
|
692
|
+
status: cacheEntry.value.status || 200
|
|
693
|
+
}));
|
|
694
|
+
return;
|
|
695
|
+
} catch (err) {
|
|
696
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
697
|
+
const silenceLog = false;
|
|
698
|
+
await routeModule.onRequestError(req, err, {
|
|
699
|
+
routerKind: 'App Router',
|
|
700
|
+
routePath: normalizedSrcPage,
|
|
701
|
+
routeType: 'route',
|
|
702
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
703
|
+
isStaticGeneration: cacheKey !== null,
|
|
704
|
+
isOnDemandRevalidate
|
|
705
|
+
})
|
|
706
|
+
}, silenceLog, routerServerContext);
|
|
707
|
+
}
|
|
708
|
+
// rethrow so that we can handle serving error page
|
|
709
|
+
// If this is during static generation, throw the error again.
|
|
710
|
+
if (isIsr) throw err;
|
|
711
|
+
// Otherwise, send a 500 response unless the original response has
|
|
712
|
+
// already committed. In that case, preserve its status code for
|
|
713
|
+
// telemetry while still recording the failure and terminating a response
|
|
714
|
+
// that the failed pipeline left open.
|
|
715
|
+
if (res.headersSent) {
|
|
716
|
+
if (currentSpan) {
|
|
717
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
718
|
+
currentSpan.recordException(error);
|
|
719
|
+
currentSpan.setStatus({
|
|
720
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
721
|
+
message: error.message
|
|
722
|
+
});
|
|
723
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
724
|
+
}
|
|
725
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
726
|
+
res.end();
|
|
727
|
+
}
|
|
728
|
+
} else {
|
|
729
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
730
|
+
status: 500
|
|
731
|
+
}));
|
|
732
|
+
}
|
|
733
|
+
return;
|
|
734
|
+
} finally{
|
|
735
|
+
;
|
|
736
|
+
(()=>{
|
|
737
|
+
if (!currentSpan) {
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
let statusCode = res.statusCode;
|
|
741
|
+
currentSpan.setAttributes({
|
|
742
|
+
'http.status_code': statusCode,
|
|
743
|
+
'next.rsc': false
|
|
744
|
+
});
|
|
745
|
+
if (statusCode && statusCode >= 500) {
|
|
746
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
747
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
748
|
+
currentSpan.setStatus({
|
|
749
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
750
|
+
});
|
|
751
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
752
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
753
|
+
}
|
|
754
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
755
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
756
|
+
if (!rootSpanAttributes) {
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
760
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
764
|
+
const name = `${method} ${route}`;
|
|
765
|
+
currentSpan.setAttributes({
|
|
766
|
+
'next.route': route,
|
|
767
|
+
'http.route': route,
|
|
768
|
+
'next.span_name': name
|
|
769
|
+
});
|
|
770
|
+
currentSpan.updateName(name);
|
|
771
|
+
// Propagate http.route to the request's root span if it isn't the
|
|
772
|
+
// request span (e.g. a platform-created HTTP span in adapter
|
|
773
|
+
// deployments).
|
|
774
|
+
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
775
|
+
requestRootSpan.setAttribute('http.route', route);
|
|
776
|
+
requestRootSpan.updateName(name);
|
|
777
|
+
}
|
|
778
|
+
})();
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
// When invoked directly, the request span was started before `prepare`;
|
|
782
|
+
// record the request target as normalized by it. next-server's request span
|
|
783
|
+
// already has it.
|
|
784
|
+
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
785
|
+
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
786
|
+
}
|
|
787
|
+
await handleResponse(requestSpan);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
//# sourceMappingURL=app-route.js.map
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
/***/ }),
|
|
794
|
+
|
|
795
|
+
/***/ 629021:
|
|
796
|
+
/***/ ((module) => {
|
|
797
|
+
|
|
798
|
+
module.exports = require("fs");
|
|
799
|
+
|
|
800
|
+
/***/ }),
|
|
801
|
+
|
|
802
|
+
/***/ 638522:
|
|
803
|
+
/***/ ((module) => {
|
|
804
|
+
|
|
805
|
+
module.exports = require("node:zlib");
|
|
806
|
+
|
|
807
|
+
/***/ }),
|
|
808
|
+
|
|
809
|
+
/***/ 663033:
|
|
810
|
+
/***/ ((module) => {
|
|
811
|
+
|
|
812
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
813
|
+
|
|
814
|
+
/***/ }),
|
|
815
|
+
|
|
816
|
+
/***/ 710846:
|
|
817
|
+
/***/ ((module) => {
|
|
818
|
+
|
|
819
|
+
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
820
|
+
|
|
821
|
+
/***/ }),
|
|
822
|
+
|
|
823
|
+
/***/ 731421:
|
|
824
|
+
/***/ ((module) => {
|
|
825
|
+
|
|
826
|
+
module.exports = require("node:child_process");
|
|
827
|
+
|
|
828
|
+
/***/ }),
|
|
829
|
+
|
|
830
|
+
/***/ 744870:
|
|
831
|
+
/***/ ((module) => {
|
|
832
|
+
|
|
833
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
834
|
+
|
|
835
|
+
/***/ }),
|
|
836
|
+
|
|
837
|
+
/***/ 775919:
|
|
838
|
+
/***/ ((module) => {
|
|
839
|
+
|
|
840
|
+
module.exports = require("node:worker_threads");
|
|
841
|
+
|
|
842
|
+
/***/ }),
|
|
843
|
+
|
|
844
|
+
/***/ 777030:
|
|
845
|
+
/***/ ((module) => {
|
|
846
|
+
|
|
847
|
+
module.exports = require("node:net");
|
|
848
|
+
|
|
849
|
+
/***/ }),
|
|
850
|
+
|
|
851
|
+
/***/ 781630:
|
|
852
|
+
/***/ ((module) => {
|
|
853
|
+
|
|
854
|
+
module.exports = require("http");
|
|
855
|
+
|
|
856
|
+
/***/ }),
|
|
857
|
+
|
|
858
|
+
/***/ 848161:
|
|
859
|
+
/***/ ((module) => {
|
|
860
|
+
|
|
861
|
+
module.exports = require("node:os");
|
|
862
|
+
|
|
863
|
+
/***/ }),
|
|
864
|
+
|
|
865
|
+
/***/ 889080:
|
|
866
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
867
|
+
|
|
868
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
869
|
+
/* harmony export */ Ah: () => (/* binding */ updateFlow),
|
|
870
|
+
/* harmony export */ Dd: () => (/* binding */ exchangeCode),
|
|
871
|
+
/* harmony export */ F8: () => (/* binding */ createFlow),
|
|
872
|
+
/* harmony export */ i8: () => (/* binding */ getMicrosoftAccessToken),
|
|
873
|
+
/* harmony export */ jG: () => (/* binding */ resolveMicrosoftAuth),
|
|
874
|
+
/* harmony export */ lv: () => (/* binding */ getFlow),
|
|
875
|
+
/* harmony export */ op: () => (/* binding */ graphPaged),
|
|
876
|
+
/* harmony export */ xj: () => (/* binding */ buildAuthorizeUrl),
|
|
877
|
+
/* harmony export */ z$: () => (/* binding */ graphFetch)
|
|
878
|
+
/* harmony export */ });
|
|
879
|
+
/* unused harmony export MICROSOFT_SCOPES */
|
|
880
|
+
/* harmony import */ var _lib_stores_integrations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(478228);
|
|
881
|
+
/* harmony import */ var _lib_utils_oauth_flow_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(956362);
|
|
882
|
+
/* harmony import */ var _lib_utils_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(253638);
|
|
883
|
+
/* harmony import */ var _lib_utils_error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(922032);
|
|
884
|
+
/* harmony import */ var _lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(522632);
|
|
885
|
+
// Ephemeral state store + shared auth helpers for the in-app Microsoft OAuth
|
|
886
|
+
// flow. Mirrors lib/integrations/gmail-oauth.ts but targets the Microsoft
|
|
887
|
+
// identity platform (v2.0 endpoint, common tenant by default) and Microsoft
|
|
888
|
+
// Graph as the downstream API surface (Outlook Mail + Calendar in v1).
|
|
889
|
+
//
|
|
890
|
+
// The user types client_id + client_secret in the Integrations panel and
|
|
891
|
+
// clicks "Connect Outlook". We POST those to /oauth/start, which stashes
|
|
892
|
+
// them here keyed by a random `state` token and returns the Microsoft
|
|
893
|
+
// authorize URL. The browser opens that URL; MS bounces back to
|
|
894
|
+
// /oauth/callback with `?code&state`, which exchanges the code for a
|
|
895
|
+
// refresh_token (granted because we asked for `offline_access`) and
|
|
896
|
+
// persists the integration. The panel polls /oauth/status separately.
|
|
897
|
+
//
|
|
898
|
+
// Pinned to globalThis so HMR in dev doesn't lose pending flows.
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
const flowStore = (0,_lib_utils_oauth_flow_store__WEBPACK_IMPORTED_MODULE_1__/* .createOAuthFlowStore */ .R)({
|
|
905
|
+
globalKey: "__msOauthFlows"
|
|
906
|
+
});
|
|
907
|
+
const createFlow = flowStore.create;
|
|
908
|
+
const getFlow = flowStore.get;
|
|
909
|
+
const updateFlow = flowStore.update;
|
|
910
|
+
// Tenant selector. `common` accepts both personal Microsoft accounts
|
|
911
|
+
// (@outlook.com, @hotmail.com, @live.com) and work/school M365 accounts.
|
|
912
|
+
// Switch to `consumers` to lock to personal only, or `organizations` for
|
|
913
|
+
// work/school only. We expose this as an env override for power users but
|
|
914
|
+
// don't surface it in the UI yet.
|
|
915
|
+
const TENANT = process.env.OUTLOOK_TENANT?.trim() || "common";
|
|
916
|
+
// Delegated Graph scopes the agent needs. Keep narrow:
|
|
917
|
+
// - offline_access → required for a refresh_token (MS counterpart of
|
|
918
|
+
// Google's access_type=offline).
|
|
919
|
+
// - User.Read → used by the test endpoint to call /me.
|
|
920
|
+
// - Mail.ReadWrite → search/read mail, create drafts, mark read,
|
|
921
|
+
// move to folders (incl. DeletedItems).
|
|
922
|
+
// - Mail.Send → send mail when the user explicitly asks for it.
|
|
923
|
+
// - Files.Read.All → Microsoft Search over OneDrive/SharePoint files.
|
|
924
|
+
// - Sites.Read.All → Microsoft Search over SharePoint lists and sites.
|
|
925
|
+
// - Calendars.ReadWrite → list/get/create/update/delete events on the
|
|
926
|
+
// user's existing calendars.
|
|
927
|
+
// - Tasks.ReadWrite → list/get/create/update/complete/delete Microsoft
|
|
928
|
+
// To Do tasks and lists (ms_todo_* tools).
|
|
929
|
+
// - People.Read → resolve "who is X" / frequent contacts via
|
|
930
|
+
// /me/people (ms_people_resolve tool).
|
|
931
|
+
const MICROSOFT_SCOPES = [
|
|
932
|
+
"offline_access",
|
|
933
|
+
"User.Read",
|
|
934
|
+
"Mail.ReadWrite",
|
|
935
|
+
"Mail.Send",
|
|
936
|
+
"Files.Read.All",
|
|
937
|
+
"Sites.Read.All",
|
|
938
|
+
"Calendars.ReadWrite",
|
|
939
|
+
"Tasks.ReadWrite",
|
|
940
|
+
"People.Read"
|
|
941
|
+
];
|
|
942
|
+
function buildAuthorizeUrl(opts) {
|
|
943
|
+
const p = new URLSearchParams({
|
|
944
|
+
client_id: opts.clientId,
|
|
945
|
+
redirect_uri: opts.redirectUri,
|
|
946
|
+
response_type: "code",
|
|
947
|
+
response_mode: "query",
|
|
948
|
+
scope: MICROSOFT_SCOPES.join(" "),
|
|
949
|
+
// Force consent so a returning user actually re-grants any newly-added
|
|
950
|
+
// scope (otherwise MS silently reuses the prior grant minus the new bit).
|
|
951
|
+
prompt: "consent",
|
|
952
|
+
state: opts.state
|
|
953
|
+
});
|
|
954
|
+
return `https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/authorize?${p.toString()}`;
|
|
955
|
+
}
|
|
956
|
+
// NOTE: Unlike Google, MS v2 endpoint **requires** the `scope` parameter on
|
|
957
|
+
// every grant_type call (both authorization_code and refresh_token). Leaving
|
|
958
|
+
// it out yields `AADSTS900144: The request body must contain the following
|
|
959
|
+
// parameter: 'scope'.`. We always pass the full scope set.
|
|
960
|
+
async function exchangeCode(opts) {
|
|
961
|
+
const clientId = (0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeOAuthInput */ .d)(opts.clientId) ?? "";
|
|
962
|
+
const clientSecret = (0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeOAuthInput */ .d)(opts.clientSecret) ?? "";
|
|
963
|
+
const body = new URLSearchParams({
|
|
964
|
+
code: opts.code,
|
|
965
|
+
client_id: clientId,
|
|
966
|
+
client_secret: clientSecret,
|
|
967
|
+
redirect_uri: opts.redirectUri,
|
|
968
|
+
grant_type: "authorization_code",
|
|
969
|
+
scope: MICROSOFT_SCOPES.join(" ")
|
|
970
|
+
});
|
|
971
|
+
const res = await fetch(`https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/token`, {
|
|
972
|
+
method: "POST",
|
|
973
|
+
headers: {
|
|
974
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
975
|
+
},
|
|
976
|
+
body: body.toString(),
|
|
977
|
+
signal: AbortSignal.timeout(30000)
|
|
978
|
+
});
|
|
979
|
+
const text = await res.text();
|
|
980
|
+
const parsed = (0,_lib_utils_json__WEBPACK_IMPORTED_MODULE_3__/* .parseJsonSafe */ .p)(text, {});
|
|
981
|
+
if (!res.ok) {
|
|
982
|
+
const err = parsed["error_description"] || parsed["error"] || text || `HTTP ${res.status}`;
|
|
983
|
+
console.error(`[microsoft-oauth] token exchange rejected (${res.status}): ${err} | client_id ${(0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .secretFingerprint */ .n)(clientId)} | client_secret ${(0,_lib_utils_oauth_input__WEBPACK_IMPORTED_MODULE_2__/* .secretFingerprint */ .n)(clientSecret)}`);
|
|
984
|
+
throw new Error(err);
|
|
985
|
+
}
|
|
986
|
+
return parsed;
|
|
987
|
+
}
|
|
988
|
+
function resolveMicrosoftAuth() {
|
|
989
|
+
const envId = process.env.OUTLOOK_CLIENT_ID;
|
|
990
|
+
const envSecret = process.env.OUTLOOK_CLIENT_SECRET;
|
|
991
|
+
const envRefresh = process.env.OUTLOOK_REFRESH_TOKEN;
|
|
992
|
+
if (envId && envSecret && envRefresh) {
|
|
993
|
+
return {
|
|
994
|
+
client_id: envId,
|
|
995
|
+
client_secret: envSecret,
|
|
996
|
+
refresh_token: envRefresh
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
const saved = (0,_lib_stores_integrations__WEBPACK_IMPORTED_MODULE_0__/* .getIntegrationRaw */ .$G)("outlook");
|
|
1000
|
+
if (saved?.client_id && saved.client_secret && saved.refresh_token) {
|
|
1001
|
+
return {
|
|
1002
|
+
client_id: saved.client_id,
|
|
1003
|
+
client_secret: saved.client_secret,
|
|
1004
|
+
refresh_token: saved.refresh_token
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
return {
|
|
1008
|
+
error: "Microsoft account not connected. Open the gear menu → Integrations tab → " + "Outlook card and click Connect Outlook to authorize Mail, Mail.Send, Calendar, Tasks, and People access."
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
const accessTokenCache = new Map();
|
|
1012
|
+
function cacheKey(auth) {
|
|
1013
|
+
return auth.refresh_token.slice(0, 20);
|
|
1014
|
+
}
|
|
1015
|
+
// Force-evict a cached access token (e.g. after a 401). The next call to
|
|
1016
|
+
// getMicrosoftAccessToken will refresh against the v2 token endpoint.
|
|
1017
|
+
function bustAccessToken(auth) {
|
|
1018
|
+
accessTokenCache.delete(cacheKey(auth));
|
|
1019
|
+
}
|
|
1020
|
+
async function getMicrosoftAccessToken(auth) {
|
|
1021
|
+
const key = cacheKey(auth);
|
|
1022
|
+
const cached = accessTokenCache.get(key);
|
|
1023
|
+
if (cached && cached.expires_at > Date.now() + 60000) return cached.token;
|
|
1024
|
+
const body = new URLSearchParams({
|
|
1025
|
+
client_id: auth.client_id,
|
|
1026
|
+
client_secret: auth.client_secret,
|
|
1027
|
+
refresh_token: auth.refresh_token,
|
|
1028
|
+
grant_type: "refresh_token",
|
|
1029
|
+
// Required on the v2 endpoint even for refresh_token grants.
|
|
1030
|
+
scope: MICROSOFT_SCOPES.join(" ")
|
|
1031
|
+
});
|
|
1032
|
+
try {
|
|
1033
|
+
const res = await fetch(`https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/token`, {
|
|
1034
|
+
method: "POST",
|
|
1035
|
+
headers: {
|
|
1036
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
1037
|
+
},
|
|
1038
|
+
body: body.toString(),
|
|
1039
|
+
signal: AbortSignal.timeout(30000)
|
|
1040
|
+
});
|
|
1041
|
+
const text = await res.text();
|
|
1042
|
+
if (!res.ok) {
|
|
1043
|
+
accessTokenCache.delete(key);
|
|
1044
|
+
return {
|
|
1045
|
+
error: `Microsoft OAuth refresh failed (${res.status}): ${text.slice(0, 300)}`
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
const parsed = JSON.parse(text);
|
|
1049
|
+
if (!parsed.access_token) return {
|
|
1050
|
+
error: "OAuth response missing access_token"
|
|
1051
|
+
};
|
|
1052
|
+
const expires_at = Date.now() + (parsed.expires_in ?? 3000) * 1000;
|
|
1053
|
+
accessTokenCache.set(key, {
|
|
1054
|
+
token: parsed.access_token,
|
|
1055
|
+
expires_at
|
|
1056
|
+
});
|
|
1057
|
+
return parsed.access_token;
|
|
1058
|
+
} catch (err) {
|
|
1059
|
+
return {
|
|
1060
|
+
error: `Microsoft OAuth refresh threw: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err)}`
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
// Path-prefix → required Graph scope. Used to render helpful 403 messages
|
|
1065
|
+
// pointing the user at the exact scope they need to reconnect with.
|
|
1066
|
+
const SCOPE_HINTS = [
|
|
1067
|
+
{
|
|
1068
|
+
prefix: "/me/messages",
|
|
1069
|
+
scope: "Mail.ReadWrite"
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
prefix: "/me/mailFolders",
|
|
1073
|
+
scope: "Mail.ReadWrite"
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
prefix: "/me/sendMail",
|
|
1077
|
+
scope: "Mail.Send"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
prefix: "/me/events",
|
|
1081
|
+
scope: "Calendars.ReadWrite"
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
prefix: "/me/calendar",
|
|
1085
|
+
scope: "Calendars.ReadWrite"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
prefix: "/me/calendars",
|
|
1089
|
+
scope: "Calendars.ReadWrite"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
prefix: "/me/todo",
|
|
1093
|
+
scope: "Tasks.ReadWrite"
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
prefix: "/me/people",
|
|
1097
|
+
scope: "People.Read"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
prefix: "/me/contacts",
|
|
1101
|
+
scope: "Contacts.Read"
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
prefix: "/me/drive",
|
|
1105
|
+
scope: "Files.Read"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
prefix: "/me/insights",
|
|
1109
|
+
scope: "Sites.Read.All"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
prefix: "/search/query",
|
|
1113
|
+
scope: "Mail.Read / Calendars.Read for mail and events; Files.Read.All for files; Sites.Read.All for lists and sites"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
prefix: "/me",
|
|
1117
|
+
scope: "User.Read"
|
|
1118
|
+
}
|
|
1119
|
+
];
|
|
1120
|
+
function scopeHintFor(path) {
|
|
1121
|
+
const p = path.startsWith("http") ? new URL(path).pathname.replace(/^\/v1\.0/, "") : path;
|
|
1122
|
+
for (const { prefix, scope } of SCOPE_HINTS){
|
|
1123
|
+
if (p.startsWith(prefix)) return scope;
|
|
1124
|
+
}
|
|
1125
|
+
return null;
|
|
1126
|
+
}
|
|
1127
|
+
function parseRetryAfter(headerVal) {
|
|
1128
|
+
if (!headerVal) return 0;
|
|
1129
|
+
const secs = Number.parseInt(headerVal, 10);
|
|
1130
|
+
if (Number.isFinite(secs) && secs >= 0) return Math.min(secs, 30) * 1000;
|
|
1131
|
+
const ts = Date.parse(headerVal);
|
|
1132
|
+
if (!Number.isNaN(ts)) return Math.max(0, Math.min(ts - Date.now(), 30000));
|
|
1133
|
+
return 0;
|
|
1134
|
+
}
|
|
1135
|
+
function backoffFor(attempt) {
|
|
1136
|
+
return Math.min(500 * 2 ** attempt, 4000);
|
|
1137
|
+
}
|
|
1138
|
+
// Shared Graph fetch helper. Used by lib/tools/outlook.ts,
|
|
1139
|
+
// lib/tools/outlook-calendar.ts, lib/tools/ms-todo.ts, lib/tools/ms-graph.ts.
|
|
1140
|
+
// Returns parsed JSON or { error: string, url? }. 204 No Content returns
|
|
1141
|
+
// { ok: true }.
|
|
1142
|
+
//
|
|
1143
|
+
// Built-in resilience:
|
|
1144
|
+
// - 401 Unauthorized → drop the cached access token and retry once with a
|
|
1145
|
+
// freshly refreshed one (covers token-revoked-mid-cache edge cases).
|
|
1146
|
+
// - 429 / 503 → honour the `Retry-After` header (capped at 30s) or fall
|
|
1147
|
+
// back to exponential backoff. Retries up to 3 times.
|
|
1148
|
+
// - 403 Forbidden → surface a scope hint ("reconnect with X") so the
|
|
1149
|
+
// operator knows what to grant.
|
|
1150
|
+
async function graphFetch(auth, path, init) {
|
|
1151
|
+
let target;
|
|
1152
|
+
try {
|
|
1153
|
+
target = path.startsWith("http") ? new URL(path) : new URL(`https://graph.microsoft.com/v1.0${path}`);
|
|
1154
|
+
} catch {
|
|
1155
|
+
return {
|
|
1156
|
+
error: "Microsoft Graph request URL is invalid."
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
if (target.origin !== "https://graph.microsoft.com" || target.username || target.password) {
|
|
1160
|
+
return {
|
|
1161
|
+
error: "Microsoft Graph requests must target graph.microsoft.com; refusing to forward credentials."
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
const url = target.toString();
|
|
1165
|
+
let attempt = 0;
|
|
1166
|
+
let triedReauth = false;
|
|
1167
|
+
while(true){
|
|
1168
|
+
const token = await getMicrosoftAccessToken(auth);
|
|
1169
|
+
if (typeof token !== "string") return token;
|
|
1170
|
+
let res;
|
|
1171
|
+
try {
|
|
1172
|
+
res = await fetch(url, {
|
|
1173
|
+
...init,
|
|
1174
|
+
headers: {
|
|
1175
|
+
Authorization: `Bearer ${token}`,
|
|
1176
|
+
Accept: "application/json",
|
|
1177
|
+
"Content-Type": "application/json",
|
|
1178
|
+
...init?.headers ?? {}
|
|
1179
|
+
},
|
|
1180
|
+
signal: AbortSignal.timeout(30000)
|
|
1115
1181
|
});
|
|
1116
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
1117
|
-
throw cacheEntry.error;
|
|
1118
|
-
}
|
|
1119
|
-
// we don't create a cacheEntry for ISR
|
|
1120
|
-
if (!isIsr) {
|
|
1121
|
-
return;
|
|
1122
|
-
}
|
|
1123
|
-
if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
|
|
1124
|
-
var _cacheEntry_value1;
|
|
1125
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
1126
|
-
}
|
|
1127
|
-
if (!isMinimalMode) {
|
|
1128
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
1129
|
-
}
|
|
1130
|
-
// Draft mode should never be cached
|
|
1131
|
-
if (isDraftMode) {
|
|
1132
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
1133
|
-
}
|
|
1134
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
1135
|
-
if (!(isMinimalMode && isIsr)) {
|
|
1136
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
1137
|
-
}
|
|
1138
|
-
// If cache control is already set on the response we don't
|
|
1139
|
-
// override it to allow users to customize it via next.config
|
|
1140
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
1141
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
1142
|
-
}
|
|
1143
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
|
|
1144
|
-
new Response(cacheEntry.value.body, {
|
|
1145
|
-
headers,
|
|
1146
|
-
status: cacheEntry.value.status || 200
|
|
1147
|
-
}));
|
|
1148
|
-
return;
|
|
1149
1182
|
} catch (err) {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
});
|
|
1177
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
1178
|
-
}
|
|
1179
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
1180
|
-
res.end();
|
|
1183
|
+
return {
|
|
1184
|
+
error: `Graph fetch threw: ${(0,_lib_utils_error__WEBPACK_IMPORTED_MODULE_4__/* .errorMessage */ .g)(err)}`,
|
|
1185
|
+
url
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
if (res.status === 204) return {
|
|
1189
|
+
ok: true
|
|
1190
|
+
};
|
|
1191
|
+
if (res.status === 401 && !triedReauth) {
|
|
1192
|
+
triedReauth = true;
|
|
1193
|
+
bustAccessToken(auth);
|
|
1194
|
+
continue;
|
|
1195
|
+
}
|
|
1196
|
+
if ((res.status === 429 || res.status === 503) && attempt < 3) {
|
|
1197
|
+
const waitMs = parseRetryAfter(res.headers.get("Retry-After")) ?? backoffFor(attempt);
|
|
1198
|
+
attempt += 1;
|
|
1199
|
+
await new Promise((r)=>setTimeout(r, waitMs));
|
|
1200
|
+
continue;
|
|
1201
|
+
}
|
|
1202
|
+
const text = await res.text();
|
|
1203
|
+
if (!res.ok) {
|
|
1204
|
+
let msg = `Graph ${res.status}: ${text.slice(0, 500)}`;
|
|
1205
|
+
if (res.status === 403) {
|
|
1206
|
+
const hint = scopeHintFor(path);
|
|
1207
|
+
if (hint) {
|
|
1208
|
+
msg += ` — reconnect the Microsoft integration with scope: ${hint}`;
|
|
1181
1209
|
}
|
|
1182
|
-
} else {
|
|
1183
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
1184
|
-
status: 500
|
|
1185
|
-
}));
|
|
1186
1210
|
}
|
|
1187
|
-
return
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
'http.status_code': statusCode,
|
|
1197
|
-
'next.rsc': false
|
|
1198
|
-
});
|
|
1199
|
-
if (statusCode && statusCode >= 500) {
|
|
1200
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
1201
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
1202
|
-
currentSpan.setStatus({
|
|
1203
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
1204
|
-
});
|
|
1205
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
1206
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
1207
|
-
}
|
|
1208
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
1209
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
1210
|
-
if (!rootSpanAttributes) {
|
|
1211
|
-
return;
|
|
1212
|
-
}
|
|
1213
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
1214
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
1215
|
-
return;
|
|
1216
|
-
}
|
|
1217
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
1218
|
-
const name = `${method} ${route}`;
|
|
1219
|
-
currentSpan.setAttributes({
|
|
1220
|
-
'next.route': route,
|
|
1221
|
-
'http.route': route,
|
|
1222
|
-
'next.span_name': name
|
|
1223
|
-
});
|
|
1224
|
-
currentSpan.updateName(name);
|
|
1225
|
-
// Propagate http.route to the request's root span if it isn't the
|
|
1226
|
-
// request span (e.g. a platform-created HTTP span in adapter
|
|
1227
|
-
// deployments).
|
|
1228
|
-
if (requestRootSpan && requestRootSpan !== currentSpan) {
|
|
1229
|
-
requestRootSpan.setAttribute('http.route', route);
|
|
1230
|
-
requestRootSpan.updateName(name);
|
|
1231
|
-
}
|
|
1232
|
-
})();
|
|
1211
|
+
return {
|
|
1212
|
+
error: msg,
|
|
1213
|
+
url
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
try {
|
|
1217
|
+
return JSON.parse(text);
|
|
1218
|
+
} catch {
|
|
1219
|
+
return text;
|
|
1233
1220
|
}
|
|
1234
|
-
};
|
|
1235
|
-
// When invoked directly, the request span was started before `prepare`;
|
|
1236
|
-
// record the request target as normalized by it. next-server's request span
|
|
1237
|
-
// already has it.
|
|
1238
|
-
if (!isWrappedByNextServer && req.url !== undefined) {
|
|
1239
|
-
requestSpan == null ? void 0 : requestSpan.setAttribute('http.target', req.url);
|
|
1240
1221
|
}
|
|
1241
|
-
await handleResponse(requestSpan);
|
|
1242
1222
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1223
|
+
// Follow @odata.nextLink across pages and concatenate `value` arrays.
|
|
1224
|
+
// Stops at `maxPages` (default 5) to bound context cost. Returns the same
|
|
1225
|
+
// shape as graphFetch (object with `.value`) but with the merged array, or
|
|
1226
|
+
// the original error shape if any page errored.
|
|
1227
|
+
async function graphPaged(auth, path, opts) {
|
|
1228
|
+
const maxPages = opts?.maxPages ?? 5;
|
|
1229
|
+
let current = path;
|
|
1230
|
+
const merged = [];
|
|
1231
|
+
let pages = 0;
|
|
1232
|
+
while(current && pages < maxPages){
|
|
1233
|
+
const page = await graphFetch(auth, current, opts?.init);
|
|
1234
|
+
if (page && typeof page === "object" && "error" in page) return page;
|
|
1235
|
+
const body = page;
|
|
1236
|
+
if (Array.isArray(body.value)) merged.push(...body.value);
|
|
1237
|
+
current = typeof body["@odata.nextLink"] === "string" ? body["@odata.nextLink"] : null;
|
|
1238
|
+
pages += 1;
|
|
1239
|
+
}
|
|
1240
|
+
return {
|
|
1241
|
+
value: merged,
|
|
1242
|
+
pages
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
1245
|
|
|
1246
1246
|
|
|
1247
1247
|
/***/ }),
|
|
@@ -1376,7 +1376,7 @@ module.exports = require("next/dist/shared/lib/no-fallback-error.external");
|
|
|
1376
1376
|
var __webpack_require__ = require("../../../../../../../webpack-runtime.js");
|
|
1377
1377
|
__webpack_require__.C(exports);
|
|
1378
1378
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1379
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,4992,1244], () => (__webpack_exec__(
|
|
1379
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,4891,4992,1244], () => (__webpack_exec__(614094)));
|
|
1380
1380
|
module.exports = __webpack_exports__;
|
|
1381
1381
|
|
|
1382
1382
|
})();
|