@circuitwall/jarela 2.2.1 → 2.3.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 +6 -5
- 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 +8 -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 +76 -76
- 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 +93 -93
- package/.next/standalone/.next/server/app/api/v1/access/route.js +169 -169
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +82 -56
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +122 -122
- 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 +753 -753
- package/.next/standalone/.next/server/app/api/v1/agents/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +364 -364
- package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +802 -802
- package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
- package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +589 -16
- 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 +23 -23
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +30 -30
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +703 -130
- 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 +708 -135
- 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 +802 -229
- 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 +739 -739
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1035 -1035
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +679 -106
- 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 +804 -804
- package/.next/standalone/.next/server/app/api/v1/bridges/route.js +700 -700
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
- 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 +85 -85
- package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
- 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 +2 -2
- 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 +10 -10
- package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +784 -784
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
- 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 +57 -57
- 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/search/route.js +523 -523
- package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
- 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 +122 -122
- 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 +37 -37
- 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 +9 -9
- package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +368 -368
- package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/events/route.js +751 -178
- 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 +77 -77
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
- 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 +44 -44
- package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +65 -65
- package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +34 -34
- package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +204 -204
- package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +133 -133
- package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +106 -106
- package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +114 -114
- package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +134 -134
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
- 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 +93 -93
- 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 +9 -9
- 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 +185 -185
- 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 +171 -171
- 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 +396 -396
- 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 +212 -212
- 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 +235 -235
- package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +221 -221
- package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
- 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 +772 -772
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +133 -133
- package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
- 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 +363 -363
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +233 -233
- package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +682 -682
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +879 -879
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +108 -108
- package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +952 -952
- package/.next/standalone/.next/server/app/api/v1/integrations/route.js +216 -216
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +864 -847
- package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
- package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +72 -72
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +979 -979
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
- package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +381 -381
- package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +79 -79
- package/.next/standalone/.next/server/app/api/v1/memory/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +131 -131
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +374 -369
- package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +143 -143
- package/.next/standalone/.next/server/app/api/v1/models/route.js +543 -543
- package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
- package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
- 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 +234 -234
- 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 +407 -407
- 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 +37 -37
- 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 +107 -107
- 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 +228 -228
- 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 +9 -9
- 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 +148 -148
- 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 +787 -787
- 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 +507 -507
- 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 +181 -181
- 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 +258 -258
- 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 +30 -30
- package/.next/standalone/.next/server/app/api/v1/profile/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +44 -44
- package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +9 -9
- package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +164 -164
- package/.next/standalone/.next/server/app/api/v1/providers/route.js +94 -94
- package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +450 -450
- package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +37 -37
- package/.next/standalone/.next/server/app/api/v1/redaction/route.js +58 -58
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +600 -600
- package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
- 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 +732 -732
- package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +359 -359
- package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +197 -197
- package/.next/standalone/.next/server/app/api/v1/security/state/route.js +51 -51
- package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +176 -176
- package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +190 -190
- package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
- package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +770 -770
- package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +115 -115
- package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +327 -327
- package/.next/standalone/.next/server/app/api/v1/skills/route.js +870 -870
- package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
- package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
- 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 +164 -164
- package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +115 -115
- 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 +1429 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +635 -634
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +53 -439
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -172
- 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 +908 -908
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- 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 +17 -17
- 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 +570 -570
- package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +224 -224
- package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +975 -975
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +23 -23
- package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
- 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 +128 -128
- package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
- 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 +62 -62
- package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
- package/.next/standalone/.next/server/app/page.js +1243 -854
- 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 +6 -5
- package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +335 -986
- package/.next/standalone/.next/server/chunks/1433.js +1 -1
- package/.next/standalone/.next/server/chunks/1638.js +1 -2
- package/.next/standalone/.next/server/chunks/1738.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +6 -6
- package/.next/standalone/.next/server/chunks/2151.js +31 -1
- package/.next/standalone/.next/server/chunks/2207.js +1 -0
- package/.next/standalone/.next/server/chunks/2471.js +28 -28
- package/.next/standalone/.next/server/chunks/2504.js +1 -1
- package/.next/standalone/.next/server/chunks/2695.js +17 -17
- package/.next/standalone/.next/server/chunks/3042.js +14 -8
- package/.next/standalone/.next/server/chunks/3399.js +1 -1
- package/.next/standalone/.next/server/chunks/3566.js +1 -1
- package/.next/standalone/.next/server/chunks/4189.js +946 -0
- package/.next/standalone/.next/server/chunks/{9590.js → 423.js} +8 -3
- package/.next/standalone/.next/server/chunks/4433.js +146 -146
- package/.next/standalone/.next/server/chunks/4508.js +1 -1
- package/.next/standalone/.next/server/chunks/4588.js +1 -0
- package/.next/standalone/.next/server/chunks/46.js +5 -0
- package/.next/standalone/.next/server/chunks/466.js +12 -0
- package/.next/standalone/.next/server/chunks/4868.js +206 -206
- package/.next/standalone/.next/server/chunks/4992.js +13 -0
- package/.next/standalone/.next/server/chunks/5120.js +963 -0
- package/.next/standalone/.next/server/chunks/5701.js +1 -1
- package/.next/standalone/.next/server/chunks/5900.js +1 -1
- package/.next/standalone/.next/server/chunks/6210.js +1 -0
- package/.next/standalone/.next/server/chunks/6213.js +1 -1
- package/.next/standalone/.next/server/chunks/6649.js +2 -2
- package/.next/standalone/.next/server/chunks/6703.js +3 -3
- package/.next/standalone/.next/server/chunks/7445.js +1 -0
- package/.next/standalone/.next/server/chunks/8067.js +12 -0
- package/.next/standalone/.next/server/chunks/8461.js +14 -9
- package/.next/standalone/.next/server/chunks/8558.js +1 -1
- package/.next/standalone/.next/server/chunks/8724.js +1 -1
- package/.next/standalone/.next/server/chunks/8849.js +91 -91
- package/.next/standalone/.next/server/chunks/9032.js +6 -5
- package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33173 -31461
- package/.next/standalone/.next/server/chunks/9237.js +396 -396
- package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1628 -570
- package/.next/standalone/.next/server/chunks/9406.js +1 -1
- package/.next/standalone/.next/server/chunks/9824.js +98 -98
- package/.next/standalone/.next/server/chunks/9826.js +1 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware.js +415 -397
- 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/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-213a623b37226452.js} +1041 -652
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
- package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 312542a5725ba0d5.css} +2 -2
- package/.next/standalone/docs/adoption/changesets.json +309 -0
- package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/.next/standalone/package.json +3 -3
- package/CHANGELOG.md +25 -0
- package/api/client.ts +9 -0
- package/api/types.ts +29 -0
- package/app/api/v1/lifecycle/adoption/route.ts +14 -2
- package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
- package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
- package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
- package/app/api/v1/threads/[thread_id]/route.ts +5 -1
- package/components/chat/ChatView.tsx +52 -11
- package/components/chat/ContextBoundary.test.tsx +68 -1
- package/components/chat/ContextBoundary.tsx +92 -13
- package/components/chat/MessageList.test.tsx +31 -0
- package/components/chat/MessageList.tsx +49 -28
- package/components/chat/ToolList.test.tsx +92 -16
- package/components/chat/ToolList.tsx +59 -4
- package/components/chat/chat-helpers.test.tsx +24 -1
- package/components/chat/chat-helpers.ts +47 -4
- package/components/chat/useThreadActivity.test.tsx +113 -0
- package/components/chat/useThreadActivity.ts +94 -0
- package/components/chat/useThreadData.ts +16 -16
- package/components/chat/workflow-step-retry.ts +25 -0
- package/components/ui/BootScreen.tsx +17 -0
- package/components/ui/WorkflowChecklist.tsx +71 -33
- package/hooks/useSSE.ts +28 -3
- package/lib/agents/compaction-pipeline.test.ts +202 -0
- package/lib/agents/compaction-pipeline.ts +483 -0
- package/lib/agents/conversation-summary.ts +37 -21
- package/lib/agents/prepare/history-window.test.ts +18 -0
- package/lib/agents/prepare/history-window.ts +11 -2
- package/lib/agents/prepare/request.ts +4 -0
- package/lib/agents/prepare/system-prompt.test.ts +39 -0
- package/lib/agents/prepare/system-prompt.ts +8 -3
- package/lib/agents/prompt-registry.test.ts +5 -140
- package/lib/agents/prompt-registry.ts +45 -1
- package/lib/agents/prompt-variants.ts +146 -0
- package/lib/agents/run-registry.test.ts +22 -0
- package/lib/agents/run-registry.ts +29 -0
- package/lib/agents/run-thread.retry.test.ts +67 -1
- package/lib/agents/run-thread.ts +86 -1
- package/lib/agents/thread-activity.test.ts +31 -0
- package/lib/agents/thread-activity.ts +27 -0
- package/lib/agents/thread-compaction-state.test.ts +82 -0
- package/lib/agents/thread-compaction-state.ts +121 -0
- package/lib/agents/thread-compaction.test.ts +83 -4
- package/lib/agents/thread-compaction.ts +34 -11
- package/lib/agents/warm-summary-background.test.ts +219 -5
- package/lib/agents/warm-summary-background.ts +325 -142
- package/lib/agents/warm-topics.test.ts +37 -0
- package/lib/agents/warm-topics.ts +297 -0
- package/lib/agents/workflow-step-retry.test.ts +96 -0
- package/lib/agents/workflow-step-retry.ts +216 -0
- package/lib/api/browser-control.ts +0 -3
- package/lib/db/migrations.ts +5 -0
- package/lib/env/config.ts +2 -0
- package/lib/env/schema.ts +12 -0
- package/lib/lifecycle/changeset-build.test.ts +93 -0
- package/lib/lifecycle/changeset-build.ts +210 -0
- package/lib/lifecycle/changesets.test.ts +101 -0
- package/lib/lifecycle/changesets.ts +166 -0
- package/lib/lifecycle/surface-collect.test.ts +88 -0
- package/lib/lifecycle/surface-collect.ts +64 -0
- package/lib/lifecycle/surface-snapshot.test.ts +104 -0
- package/lib/lifecycle/surface-snapshot.ts +210 -0
- package/lib/memory/record.ts +0 -2
- package/lib/providers/external.ts +0 -2
- package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
- package/lib/stores/threads.test.ts +9 -0
- package/lib/stores/threads.ts +21 -11
- package/lib/stores/version-adoption.test.ts +96 -0
- package/lib/stores/version-adoption.ts +239 -26
- package/lib/stores/workflow-progress.ts +3 -0
- package/lib/tools/communications/ms-todo.ts +0 -7
- package/lib/tools/general/memory.ts +1 -1
- package/lib/tools/general/workflow-progress.ts +2 -0
- package/lib/tools/runtime/catalog.ts +1 -25
- package/lib/triggers/registry.ts +0 -4
- package/package.json +3 -3
- package/scripts/install-to-system.ps1 +39 -11
- package/scripts/install-to-system.sh +37 -3
- package/.next/standalone/.next/server/chunks/3979.js +0 -581
- package/.next/standalone/.next/server/chunks/5936.js +0 -594
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_ssgManifest.js +0 -0
|
@@ -26,964 +26,964 @@ module.exports = require("url");
|
|
|
26
26
|
|
|
27
27
|
/***/ }),
|
|
28
28
|
|
|
29
|
-
/***/
|
|
30
|
-
/***/ ((
|
|
31
|
-
|
|
32
|
-
module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");
|
|
33
|
-
|
|
34
|
-
/***/ }),
|
|
35
|
-
|
|
36
|
-
/***/ 8128:
|
|
37
|
-
/***/ ((module) => {
|
|
38
|
-
|
|
39
|
-
module.exports = require("next/dist/server/runtime-reacts.external.js");
|
|
40
|
-
|
|
41
|
-
/***/ }),
|
|
29
|
+
/***/ 2603:
|
|
30
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
__webpack_require__.r(__webpack_exports__);
|
|
33
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
/* harmony export */ handler: () => (/* binding */ handler),
|
|
35
|
+
/* harmony export */ patchFetch: () => (/* binding */ patchFetch),
|
|
36
|
+
/* harmony export */ routeModule: () => (/* binding */ routeModule),
|
|
37
|
+
/* harmony export */ serverHooks: () => (/* binding */ serverHooks),
|
|
38
|
+
/* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
|
|
39
|
+
/* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
|
|
40
|
+
/* harmony export */ });
|
|
41
|
+
/* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
|
|
42
|
+
/* 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__);
|
|
43
|
+
/* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
|
|
44
|
+
/* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
|
|
45
|
+
/* 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__);
|
|
46
|
+
/* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
|
|
47
|
+
/* 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__);
|
|
48
|
+
/* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
|
|
49
|
+
/* 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__);
|
|
50
|
+
/* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
|
|
51
|
+
/* 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__);
|
|
52
|
+
/* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
|
|
53
|
+
/* 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__);
|
|
54
|
+
/* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
|
|
55
|
+
/* 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__);
|
|
56
|
+
/* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
|
|
57
|
+
/* 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__);
|
|
58
|
+
/* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
|
|
59
|
+
/* 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__);
|
|
60
|
+
/* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
|
|
61
|
+
/* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
|
|
62
|
+
/* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
|
|
63
|
+
/* 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__);
|
|
64
|
+
/* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
|
|
65
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
|
|
66
|
+
/* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
|
|
67
|
+
/* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
|
|
68
|
+
/* 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__);
|
|
69
|
+
/* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
|
|
70
|
+
/* 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__);
|
|
71
|
+
/* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
|
|
72
|
+
/* 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__);
|
|
45
73
|
|
|
46
|
-
module.exports = require("undici");
|
|
47
74
|
|
|
48
|
-
/***/ }),
|
|
49
75
|
|
|
50
|
-
/***/ 10846:
|
|
51
|
-
/***/ ((module) => {
|
|
52
76
|
|
|
53
|
-
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
54
77
|
|
|
55
|
-
/***/ }),
|
|
56
78
|
|
|
57
|
-
/***/ 16698:
|
|
58
|
-
/***/ ((module) => {
|
|
59
79
|
|
|
60
|
-
module.exports = require("node:async_hooks");
|
|
61
80
|
|
|
62
|
-
/***/ }),
|
|
63
81
|
|
|
64
|
-
/***/ 19121:
|
|
65
|
-
/***/ ((module) => {
|
|
66
82
|
|
|
67
|
-
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
68
83
|
|
|
69
|
-
/***/ }),
|
|
70
84
|
|
|
71
|
-
/***/ 21455:
|
|
72
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73
85
|
|
|
74
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
75
|
-
/* harmony export */ SK: () => (/* binding */ getSkill),
|
|
76
|
-
/* harmony export */ YJ: () => (/* binding */ getSkillsDir),
|
|
77
|
-
/* harmony export */ bG: () => (/* binding */ listSkills),
|
|
78
|
-
/* harmony export */ hI: () => (/* binding */ writeSkill),
|
|
79
|
-
/* harmony export */ hp: () => (/* binding */ deleteSkill),
|
|
80
|
-
/* harmony export */ nh: () => (/* binding */ getSkillsDirs)
|
|
81
|
-
/* harmony export */ });
|
|
82
|
-
/* unused harmony exports getBuiltinSkillsDir, invalidateSkillsCache */
|
|
83
|
-
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73024);
|
|
84
|
-
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
85
|
-
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76760);
|
|
86
|
-
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__);
|
|
87
|
-
/* harmony import */ var _lib_stores_skill_repos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70106);
|
|
88
|
-
/* harmony import */ var _lib_cache_keyed_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65700);
|
|
89
|
-
// Skills loader — reads packaged built-in skills plus user SKILL.md files
|
|
90
|
-
// from the repos in the `skill_repos` table (lib/stores/skill-repos.ts,
|
|
91
|
-
// ADR-0074).
|
|
92
|
-
//
|
|
93
|
-
// Supported layouts (both may coexist):
|
|
94
|
-
// repoPath/skill-name/SKILL.md ← Claude-style (directory per skill)
|
|
95
|
-
// repoPath/skill-name.md ← flat .md files
|
|
96
|
-
//
|
|
97
|
-
// Repos are scanned in created_at order; a later repo's skill wins over an
|
|
98
|
-
// earlier repo's (and over built-ins) when ids collide. Writes and deletes
|
|
99
|
-
// always target the one repo flagged `writable` in the DB, so the rest can
|
|
100
|
-
// be read-only clones of shared skill sets.
|
|
101
|
-
//
|
|
102
|
-
// Writing always uses the Claude-style layout so output is compatible with
|
|
103
|
-
// VS Code Copilot and any other tool that discovers skills by SKILL.md.
|
|
104
|
-
//
|
|
105
|
-
// Synchronous I/O is intentional: the caller (system-prompt assembly) is
|
|
106
|
-
// synchronous, and skill directories are small enough that readFileSync
|
|
107
|
-
// overhead is negligible per turn.
|
|
108
86
|
|
|
109
87
|
|
|
110
88
|
|
|
111
89
|
|
|
112
90
|
|
|
113
|
-
//
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
91
|
+
// We inject the nextConfigOutput here so that we can use them in the route
|
|
92
|
+
// module.
|
|
93
|
+
const nextConfigOutput = "standalone"
|
|
94
|
+
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
95
|
+
definition: {
|
|
96
|
+
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
97
|
+
page: "/api/v1/skills/route",
|
|
98
|
+
pathname: "/api/v1/skills",
|
|
99
|
+
filename: "route",
|
|
100
|
+
bundlePath: "app/api/v1/skills/route"
|
|
101
|
+
},
|
|
102
|
+
distDir: ".next" || 0,
|
|
103
|
+
relativeProjectDir: false || '',
|
|
104
|
+
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/skills/route.ts",
|
|
105
|
+
nextConfigOutput,
|
|
106
|
+
// The lazy require factory ensures that:
|
|
107
|
+
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
108
|
+
// correctly attributing module load time to application-code rather than
|
|
109
|
+
// framework internals.
|
|
110
|
+
// - In all modes: async modules (route files with top-level await) are
|
|
111
|
+
// handled correctly — require() returns a Promise for such modules, which
|
|
112
|
+
// ensureUserland() awaits before the first request is handled.
|
|
113
|
+
userland: ()=>__webpack_require__(46837),
|
|
114
|
+
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
115
|
+
// server HMR updates are picked up without re-executing the entry chunk.
|
|
116
|
+
// Using require() (synchronous) avoids adding async overhead that would be
|
|
117
|
+
// incorrectly attributed to application-code time in devRequestTiming.
|
|
118
|
+
... false ? 0 : {}
|
|
119
|
+
});
|
|
120
|
+
// Pull out the exports that we need to expose from the module. This should
|
|
121
|
+
// be eliminated when we've moved the other routes to the new format. These
|
|
122
|
+
// are used to hook into the route.
|
|
123
|
+
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
124
|
+
function patchFetch() {
|
|
125
|
+
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
126
|
+
workAsyncStorage,
|
|
127
|
+
workUnitAsyncStorage
|
|
128
|
+
});
|
|
123
129
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
let headingFound = false;
|
|
129
|
-
for (const line of lines){
|
|
130
|
-
if (!headingFound && line.startsWith("# ")) {
|
|
131
|
-
name = line.slice(2).trim();
|
|
132
|
-
headingFound = true;
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
if (headingFound) {
|
|
136
|
-
if (line.startsWith("#")) break;
|
|
137
|
-
if (line.trim() === "" && descParts.length > 0) break;
|
|
138
|
-
if (line.trim()) descParts.push(line.trim());
|
|
139
|
-
}
|
|
130
|
+
|
|
131
|
+
async function handler(req, res, ctx) {
|
|
132
|
+
if (ctx.requestMeta) {
|
|
133
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
140
134
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
135
|
+
if (routeModule.isDev) {
|
|
136
|
+
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
137
|
+
}
|
|
138
|
+
let srcPage = "/api/v1/skills/route";
|
|
139
|
+
// turbopack doesn't normalize `/index` in the page name
|
|
140
|
+
// so we need to to process dynamic routes properly
|
|
141
|
+
// TODO: fix turbopack providing differing value from webpack
|
|
142
|
+
if (false) {} else if (srcPage === '/index') {
|
|
143
|
+
// we always normalize /index specifically
|
|
144
|
+
srcPage = '/';
|
|
145
|
+
}
|
|
146
|
+
const multiZoneDraftMode = false;
|
|
147
|
+
const prepareResult = await routeModule.prepare(req, res, {
|
|
148
|
+
srcPage,
|
|
149
|
+
multiZoneDraftMode
|
|
150
|
+
});
|
|
151
|
+
if (!prepareResult) {
|
|
152
|
+
res.statusCode = 400;
|
|
153
|
+
res.end('Bad Request');
|
|
154
|
+
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
155
|
+
return null;
|
|
156
|
+
}
|
|
157
|
+
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
158
|
+
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
159
|
+
// Only this route's prerenders can establish ISR or admit generated params.
|
|
160
|
+
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]));
|
|
161
|
+
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
162
|
+
const render404 = async ()=>{
|
|
163
|
+
// TODO: should route-module itself handle rendering the 404
|
|
164
|
+
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
165
|
+
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
166
|
+
} else {
|
|
167
|
+
res.end('This page could not be found');
|
|
169
168
|
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
return null;
|
|
170
|
+
};
|
|
171
|
+
if (isIsr && !isDraftMode) {
|
|
172
|
+
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
173
|
+
if (prerenderInfo) {
|
|
174
|
+
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
175
|
+
if (nextConfig.adapterPath) {
|
|
176
|
+
return await render404();
|
|
177
|
+
}
|
|
178
|
+
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
173
179
|
}
|
|
174
180
|
}
|
|
175
|
-
return Array.from(byId.values()).sort((a, b)=>a.id.localeCompare(b.id));
|
|
176
181
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return skillsCache.get();
|
|
183
|
-
}
|
|
184
|
-
function readSkillsFromDir(dir, source) {
|
|
185
|
-
if (!dir || !(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(dir)) return [];
|
|
186
|
-
let entries;
|
|
187
|
-
try {
|
|
188
|
-
entries = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync)(dir, {
|
|
189
|
-
withFileTypes: true
|
|
190
|
-
}).map((e)=>({
|
|
191
|
-
name: e.name,
|
|
192
|
-
isDir: e.isDirectory()
|
|
193
|
-
}));
|
|
194
|
-
} catch {
|
|
195
|
-
return [];
|
|
196
|
-
}
|
|
197
|
-
const skills = [];
|
|
198
|
-
for (const entry of entries){
|
|
199
|
-
if (entry.isDir) {
|
|
200
|
-
const skillFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, entry.name, "SKILL.md");
|
|
201
|
-
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(skillFile)) continue;
|
|
202
|
-
try {
|
|
203
|
-
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(skillFile, "utf8");
|
|
204
|
-
skills.push(parseSkill(entry.name, content, source));
|
|
205
|
-
} catch {}
|
|
206
|
-
} else if (entry.name.endsWith(".md")) {
|
|
207
|
-
const id = entry.name.slice(0, -3);
|
|
208
|
-
try {
|
|
209
|
-
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, entry.name), "utf8");
|
|
210
|
-
skills.push(parseSkill(id, content, source));
|
|
211
|
-
} catch {}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return skills;
|
|
215
|
-
}
|
|
216
|
-
function getSkill(id) {
|
|
217
|
-
if (!sanitizeId(id)) return null;
|
|
218
|
-
// Later directories override earlier ones, so search in reverse.
|
|
219
|
-
const dirs = getSkillsDirs();
|
|
220
|
-
for(let i = dirs.length - 1; i >= 0; i--){
|
|
221
|
-
const user = readSkillFromDir(dirs[i], id, "user");
|
|
222
|
-
if (user) return user;
|
|
223
|
-
}
|
|
224
|
-
return readSkillFromDir(getBuiltinSkillsDir(), id, "builtin");
|
|
225
|
-
}
|
|
226
|
-
function readSkillFromDir(dir, id, source) {
|
|
227
|
-
if (!dir) return null;
|
|
228
|
-
// Claude-style first
|
|
229
|
-
const claudeFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, id, "SKILL.md");
|
|
230
|
-
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(claudeFile)) {
|
|
231
|
-
try {
|
|
232
|
-
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(claudeFile, "utf8");
|
|
233
|
-
return {
|
|
234
|
-
...parseSkill(id, content, source),
|
|
235
|
-
content
|
|
236
|
-
};
|
|
237
|
-
} catch {}
|
|
238
|
-
}
|
|
239
|
-
// Flat .md
|
|
240
|
-
const flatFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, `${id}.md`);
|
|
241
|
-
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(flatFile)) {
|
|
242
|
-
try {
|
|
243
|
-
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(flatFile, "utf8");
|
|
244
|
-
return {
|
|
245
|
-
...parseSkill(id, content, source),
|
|
246
|
-
content
|
|
247
|
-
};
|
|
248
|
-
} catch {}
|
|
182
|
+
let cacheKey = null;
|
|
183
|
+
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
184
|
+
cacheKey = resolvedPathname;
|
|
185
|
+
// ensure /index and / is normalized to one key
|
|
186
|
+
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
249
187
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const resolvedBase = node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(dir);
|
|
260
|
-
if (!node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(skillFile).startsWith(resolvedBase + (node_path__WEBPACK_IMPORTED_MODULE_1___default().sep))) {
|
|
261
|
-
throw new Error("Path escape detected");
|
|
188
|
+
// Before rendering (which initializes component tree modules), we have to
|
|
189
|
+
// set the reference manifests to our global store so Server Action's
|
|
190
|
+
// encryption util can access to them at the top level of the page module.
|
|
191
|
+
if (serverActionsManifest && clientReferenceManifest) {
|
|
192
|
+
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
193
|
+
page: srcPage,
|
|
194
|
+
clientReferenceManifest,
|
|
195
|
+
serverActionsManifest
|
|
196
|
+
});
|
|
262
197
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
(0
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
198
|
+
const method = req.method || 'GET';
|
|
199
|
+
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
200
|
+
const activeSpan = tracer.getActiveScopeSpan();
|
|
201
|
+
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
202
|
+
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
203
|
+
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
204
|
+
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
205
|
+
globalThis.__incrementalCache = incrementalCache;
|
|
206
|
+
const context = {
|
|
207
|
+
params,
|
|
208
|
+
previewProps,
|
|
209
|
+
renderOpts: {
|
|
210
|
+
experimental: {
|
|
211
|
+
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
212
|
+
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
213
|
+
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
214
|
+
},
|
|
215
|
+
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
216
|
+
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
217
|
+
isDraftMode,
|
|
218
|
+
incrementalCache,
|
|
219
|
+
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
220
|
+
cacheLifeProfiles: nextConfig.cacheLife,
|
|
221
|
+
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
222
|
+
waitUntil: ctx.waitUntil,
|
|
223
|
+
onClose: (cb)=>{
|
|
224
|
+
res.on('close', cb);
|
|
225
|
+
},
|
|
226
|
+
onAfterTaskError: undefined
|
|
227
|
+
},
|
|
228
|
+
sharedContext: {
|
|
229
|
+
buildId,
|
|
230
|
+
deploymentId
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
234
|
+
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
235
|
+
const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
|
|
236
|
+
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
274
237
|
try {
|
|
275
|
-
(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
238
|
+
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
239
|
+
res.statusCode = 404;
|
|
240
|
+
// on-demand revalidate always sets this header
|
|
241
|
+
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
242
|
+
res.end('This page could not be found');
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
246
|
+
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
247
|
+
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
248
|
+
// Attempt using provided waitUntil if available
|
|
249
|
+
// if it's not we fallback to sendResponse's handling
|
|
250
|
+
if (pendingWaitUntil) {
|
|
251
|
+
if (ctx.waitUntil) {
|
|
252
|
+
ctx.waitUntil(pendingWaitUntil);
|
|
253
|
+
pendingWaitUntil = undefined;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const cacheTags = context.renderOpts.collectedTags;
|
|
257
|
+
// If the request is for a static response, we can cache it so long
|
|
258
|
+
// as it's not edge.
|
|
259
|
+
if (isIsr) {
|
|
260
|
+
const blob = await response.blob();
|
|
261
|
+
// Copy the headers from the response.
|
|
262
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
263
|
+
if (cacheTags) {
|
|
264
|
+
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
265
|
+
}
|
|
266
|
+
if (!headers['content-type'] && blob.type) {
|
|
267
|
+
headers['content-type'] = blob.type;
|
|
268
|
+
}
|
|
269
|
+
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
270
|
+
const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
|
|
271
|
+
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
272
|
+
// build-time fallback in `build/index.ts` so cache entries
|
|
273
|
+
// and the response Cache-Control header agree on the route's
|
|
274
|
+
// effective expire. Routes that opt out of revalidation
|
|
275
|
+
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
276
|
+
// keep `expire: undefined`.
|
|
277
|
+
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
278
|
+
// Create the cache entry for the response.
|
|
279
|
+
const cacheEntry = {
|
|
280
|
+
value: {
|
|
281
|
+
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
282
|
+
status: response.status,
|
|
283
|
+
body: Buffer.from(await blob.arrayBuffer()),
|
|
284
|
+
headers
|
|
285
|
+
},
|
|
286
|
+
cacheControl: {
|
|
287
|
+
revalidate,
|
|
288
|
+
expire
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
return cacheEntry;
|
|
292
|
+
} else {
|
|
293
|
+
// send response without caching if not ISR
|
|
294
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
} catch (err) {
|
|
298
|
+
// if this is a background revalidate we need to report
|
|
299
|
+
// the request error here as it won't be bubbled
|
|
300
|
+
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
301
|
+
const silenceLog = false;
|
|
302
|
+
await routeModule.onRequestError(req, err, {
|
|
303
|
+
routerKind: 'App Router',
|
|
304
|
+
routePath: srcPage,
|
|
305
|
+
routeType: 'route',
|
|
306
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
307
|
+
isStaticGeneration: cacheKey !== null,
|
|
308
|
+
isOnDemandRevalidate
|
|
309
|
+
})
|
|
310
|
+
}, silenceLog, routerServerContext);
|
|
311
|
+
}
|
|
312
|
+
throw err;
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
285
316
|
try {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
317
|
+
var _cacheEntry_value;
|
|
318
|
+
const cacheEntry = await routeModule.handleResponse({
|
|
319
|
+
req,
|
|
320
|
+
nextConfig,
|
|
321
|
+
cacheKey,
|
|
322
|
+
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
323
|
+
isFallback: false,
|
|
324
|
+
previewProps,
|
|
325
|
+
prerenderManifest,
|
|
326
|
+
isRoutePPREnabled: false,
|
|
327
|
+
isOnDemandRevalidate,
|
|
328
|
+
revalidateOnlyGenerated,
|
|
329
|
+
responseGenerator,
|
|
330
|
+
waitUntil: ctx.waitUntil,
|
|
331
|
+
isMinimalMode
|
|
332
|
+
});
|
|
333
|
+
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
334
|
+
throw cacheEntry.error;
|
|
335
|
+
}
|
|
336
|
+
// we don't create a cacheEntry for ISR
|
|
337
|
+
if (!isIsr) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
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) {
|
|
341
|
+
var _cacheEntry_value1;
|
|
342
|
+
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
343
|
+
}
|
|
344
|
+
if (!isMinimalMode) {
|
|
345
|
+
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
346
|
+
}
|
|
347
|
+
// Draft mode should never be cached
|
|
348
|
+
if (isDraftMode) {
|
|
349
|
+
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
350
|
+
}
|
|
351
|
+
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
352
|
+
if (!(isMinimalMode && isIsr)) {
|
|
353
|
+
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
354
|
+
}
|
|
355
|
+
// If cache control is already set on the response we don't
|
|
356
|
+
// override it to allow users to customize it via next.config
|
|
357
|
+
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
358
|
+
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
359
|
+
}
|
|
360
|
+
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'.
|
|
361
|
+
new Response(cacheEntry.value.body, {
|
|
362
|
+
headers,
|
|
363
|
+
status: cacheEntry.value.status || 200
|
|
364
|
+
}));
|
|
365
|
+
return;
|
|
366
|
+
} catch (err) {
|
|
367
|
+
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
368
|
+
const silenceLog = false;
|
|
369
|
+
await routeModule.onRequestError(req, err, {
|
|
370
|
+
routerKind: 'App Router',
|
|
371
|
+
routePath: normalizedSrcPage,
|
|
372
|
+
routeType: 'route',
|
|
373
|
+
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
374
|
+
isStaticGeneration: cacheKey !== null,
|
|
375
|
+
isOnDemandRevalidate
|
|
376
|
+
})
|
|
377
|
+
}, silenceLog, routerServerContext);
|
|
378
|
+
}
|
|
379
|
+
// rethrow so that we can handle serving error page
|
|
380
|
+
// If this is during static generation, throw the error again.
|
|
381
|
+
if (isIsr) throw err;
|
|
382
|
+
// Otherwise, send a 500 response unless the original response has
|
|
383
|
+
// already committed. In that case, preserve its status code for
|
|
384
|
+
// telemetry while still recording the failure and terminating a response
|
|
385
|
+
// that the failed pipeline left open.
|
|
386
|
+
if (res.headersSent) {
|
|
387
|
+
if (currentSpan) {
|
|
388
|
+
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
389
|
+
currentSpan.recordException(error);
|
|
390
|
+
currentSpan.setStatus({
|
|
391
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
392
|
+
message: error.message
|
|
393
|
+
});
|
|
394
|
+
currentSpan.setAttribute('error.type', error.name);
|
|
395
|
+
}
|
|
396
|
+
if (!res.writableEnded && !res.destroyed) {
|
|
397
|
+
res.end();
|
|
398
|
+
}
|
|
399
|
+
} else {
|
|
400
|
+
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
401
|
+
status: 500
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
return;
|
|
405
|
+
} finally{
|
|
406
|
+
;
|
|
407
|
+
(()=>{
|
|
408
|
+
if (!currentSpan) {
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
let statusCode = res.statusCode;
|
|
412
|
+
currentSpan.setAttributes({
|
|
413
|
+
'http.status_code': statusCode,
|
|
414
|
+
'next.rsc': false
|
|
415
|
+
});
|
|
416
|
+
if (statusCode && statusCode >= 500) {
|
|
417
|
+
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
418
|
+
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
419
|
+
currentSpan.setStatus({
|
|
420
|
+
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
421
|
+
});
|
|
422
|
+
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
423
|
+
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
424
|
+
}
|
|
425
|
+
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
426
|
+
// We were unable to get attributes, probably OTEL is not enabled
|
|
427
|
+
if (!rootSpanAttributes) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
431
|
+
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
435
|
+
const name = `${method} ${route}`;
|
|
436
|
+
currentSpan.setAttributes({
|
|
437
|
+
'next.route': route,
|
|
438
|
+
'http.route': route,
|
|
439
|
+
'next.span_name': name
|
|
440
|
+
});
|
|
441
|
+
currentSpan.updateName(name);
|
|
442
|
+
// Propagate http.route to the parent span if one exists (e.g.
|
|
443
|
+
// a platform-created HTTP span in adapter deployments).
|
|
444
|
+
if (parentSpan && parentSpan !== currentSpan) {
|
|
445
|
+
parentSpan.setAttribute('http.route', route);
|
|
446
|
+
parentSpan.updateName(name);
|
|
447
|
+
}
|
|
448
|
+
})();
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
// TODO: activeSpan code path is for when wrapped by
|
|
452
|
+
// next-server can be removed when this is no longer used
|
|
453
|
+
if (isWrappedByNextServer && activeSpan) {
|
|
454
|
+
await handleResponse(activeSpan, undefined);
|
|
455
|
+
} else {
|
|
456
|
+
let parentSpan = tracer.getActiveScopeSpan();
|
|
457
|
+
await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
|
|
458
|
+
spanName: `${method} ${srcPage}`,
|
|
459
|
+
kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
|
|
460
|
+
attributes: {
|
|
461
|
+
'http.method': method,
|
|
462
|
+
'http.target': req.url
|
|
463
|
+
}
|
|
464
|
+
}, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
//# sourceMappingURL=app-route.js.map
|
|
469
|
+
|
|
470
|
+
|
|
312
471
|
/***/ }),
|
|
313
472
|
|
|
314
|
-
/***/
|
|
473
|
+
/***/ 3295:
|
|
315
474
|
/***/ ((module) => {
|
|
316
475
|
|
|
317
|
-
module.exports = require("
|
|
476
|
+
module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");
|
|
318
477
|
|
|
319
478
|
/***/ }),
|
|
320
479
|
|
|
321
|
-
/***/
|
|
480
|
+
/***/ 8128:
|
|
322
481
|
/***/ ((module) => {
|
|
323
482
|
|
|
324
|
-
module.exports = require("next/dist/server/
|
|
483
|
+
module.exports = require("next/dist/server/runtime-reacts.external.js");
|
|
325
484
|
|
|
326
485
|
/***/ }),
|
|
327
486
|
|
|
328
|
-
/***/
|
|
487
|
+
/***/ 9956:
|
|
329
488
|
/***/ ((module) => {
|
|
330
489
|
|
|
331
|
-
module.exports = require("
|
|
490
|
+
module.exports = require("undici");
|
|
332
491
|
|
|
333
492
|
/***/ }),
|
|
334
493
|
|
|
335
|
-
/***/
|
|
494
|
+
/***/ 10846:
|
|
336
495
|
/***/ ((module) => {
|
|
337
496
|
|
|
338
|
-
module.exports = require("
|
|
497
|
+
module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");
|
|
339
498
|
|
|
340
499
|
/***/ }),
|
|
341
500
|
|
|
342
|
-
/***/
|
|
501
|
+
/***/ 16698:
|
|
343
502
|
/***/ ((module) => {
|
|
344
503
|
|
|
345
|
-
module.exports = require("node:
|
|
504
|
+
module.exports = require("node:async_hooks");
|
|
346
505
|
|
|
347
506
|
/***/ }),
|
|
348
507
|
|
|
349
|
-
/***/
|
|
508
|
+
/***/ 19121:
|
|
350
509
|
/***/ ((module) => {
|
|
351
510
|
|
|
352
|
-
module.exports = require("
|
|
511
|
+
module.exports = require("next/dist/server/app-render/action-async-storage.external.js");
|
|
353
512
|
|
|
354
513
|
/***/ }),
|
|
355
514
|
|
|
356
|
-
/***/
|
|
515
|
+
/***/ 21455:
|
|
357
516
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
358
517
|
|
|
359
518
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
360
|
-
/* harmony export */
|
|
361
|
-
/* harmony export */
|
|
362
|
-
/* harmony export */
|
|
363
|
-
/* harmony export */
|
|
364
|
-
/* harmony export */
|
|
365
|
-
/* harmony export */
|
|
519
|
+
/* harmony export */ SK: () => (/* binding */ getSkill),
|
|
520
|
+
/* harmony export */ YJ: () => (/* binding */ getSkillsDir),
|
|
521
|
+
/* harmony export */ bG: () => (/* binding */ listSkills),
|
|
522
|
+
/* harmony export */ hI: () => (/* binding */ writeSkill),
|
|
523
|
+
/* harmony export */ hp: () => (/* binding */ deleteSkill),
|
|
524
|
+
/* harmony export */ nh: () => (/* binding */ getSkillsDirs)
|
|
366
525
|
/* harmony export */ });
|
|
367
|
-
/* harmony
|
|
368
|
-
|
|
526
|
+
/* unused harmony exports getBuiltinSkillsDir, invalidateSkillsCache */
|
|
527
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73024);
|
|
528
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_fs__WEBPACK_IMPORTED_MODULE_0__);
|
|
529
|
+
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76760);
|
|
530
|
+
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_path__WEBPACK_IMPORTED_MODULE_1__);
|
|
531
|
+
/* harmony import */ var _lib_stores_skill_repos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70106);
|
|
532
|
+
/* harmony import */ var _lib_cache_keyed_cache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65700);
|
|
533
|
+
// Skills loader — reads packaged built-in skills plus user SKILL.md files
|
|
534
|
+
// from the repos in the `skill_repos` table (lib/stores/skill-repos.ts,
|
|
535
|
+
// ADR-0074).
|
|
369
536
|
//
|
|
370
|
-
//
|
|
371
|
-
//
|
|
372
|
-
//
|
|
373
|
-
//
|
|
537
|
+
// Supported layouts (both may coexist):
|
|
538
|
+
// repoPath/skill-name/SKILL.md ← Claude-style (directory per skill)
|
|
539
|
+
// repoPath/skill-name.md ← flat .md files
|
|
540
|
+
//
|
|
541
|
+
// Repos are scanned in created_at order; a later repo's skill wins over an
|
|
542
|
+
// earlier repo's (and over built-ins) when ids collide. Writes and deletes
|
|
543
|
+
// always target the one repo flagged `writable` in the DB, so the rest can
|
|
544
|
+
// be read-only clones of shared skill sets.
|
|
545
|
+
//
|
|
546
|
+
// Writing always uses the Claude-style layout so output is compatible with
|
|
547
|
+
// VS Code Copilot and any other tool that discovers skills by SKILL.md.
|
|
548
|
+
//
|
|
549
|
+
// Synchronous I/O is intentional: the caller (system-prompt assembly) is
|
|
550
|
+
// synchronous, and skill directories are small enough that readFileSync
|
|
551
|
+
// overhead is negligible per turn.
|
|
374
552
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
// All enabled skill repo paths, in override order (later wins on id collision).
|
|
558
|
+
function getSkillsDirs() {
|
|
559
|
+
return (0,_lib_stores_skill_repos__WEBPACK_IMPORTED_MODULE_2__/* .listEnabledSkillRepos */ .cf)().map((r)=>r.path);
|
|
381
560
|
}
|
|
382
|
-
|
|
383
|
-
|
|
561
|
+
// The writable skill repo's path, or "" if none is configured.
|
|
562
|
+
function getSkillsDir() {
|
|
563
|
+
return (0,_lib_stores_skill_repos__WEBPACK_IMPORTED_MODULE_2__/* .getWritableSkillRepo */ .i4)()?.path ?? "";
|
|
384
564
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
387
|
-
status: 201
|
|
388
|
-
});
|
|
565
|
+
function getBuiltinSkillsDir() {
|
|
566
|
+
return node_path__WEBPACK_IMPORTED_MODULE_1___default().join(process.cwd(), "lib", "skills", "builtins");
|
|
389
567
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
// (dashboard metrics, credential state).
|
|
401
|
-
function cachedJson(data, maxAgeSeconds, swrSeconds) {
|
|
402
|
-
const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
|
|
403
|
-
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
404
|
-
headers: {
|
|
405
|
-
"Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
|
|
568
|
+
function parseSkill(id, content, source) {
|
|
569
|
+
const lines = content.split("\n");
|
|
570
|
+
let name = id;
|
|
571
|
+
const descParts = [];
|
|
572
|
+
let headingFound = false;
|
|
573
|
+
for (const line of lines){
|
|
574
|
+
if (!headingFound && line.startsWith("# ")) {
|
|
575
|
+
name = line.slice(2).trim();
|
|
576
|
+
headingFound = true;
|
|
577
|
+
continue;
|
|
406
578
|
}
|
|
407
|
-
|
|
579
|
+
if (headingFound) {
|
|
580
|
+
if (line.startsWith("#")) break;
|
|
581
|
+
if (line.trim() === "" && descParts.length > 0) break;
|
|
582
|
+
if (line.trim()) descParts.push(line.trim());
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
return {
|
|
586
|
+
id,
|
|
587
|
+
name,
|
|
588
|
+
description: descParts.join(" ").slice(0, 200),
|
|
589
|
+
source
|
|
590
|
+
};
|
|
408
591
|
}
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
592
|
+
// listSkills() readdirs every skill repo and reads each SKILL.md, and the
|
|
593
|
+
// system prompt calls it on every turn — measured at 1.85 ms for 3 skills,
|
|
594
|
+
// ~60% of prompt assembly, because the cost is disk rather than row count.
|
|
595
|
+
// Same shape as the drop-in tool cache in lib/tools/external.ts: a short TTL
|
|
596
|
+
// so hand-edited files still appear promptly, plus explicit invalidation from
|
|
597
|
+
// the in-process write paths so write_skill is visible on the very next turn.
|
|
598
|
+
// listSkills() readdirs every skill repo and reads each SKILL.md, and the
|
|
599
|
+
// system prompt calls it on every turn — measured at 1.85 ms for 3 skills,
|
|
600
|
+
// ~60% of prompt assembly, because the cost is disk rather than row count.
|
|
601
|
+
// The key covers repo enable/disable, which changes the result without
|
|
602
|
+
// touching any skill file; the TTL only bounds hand edits made outside the app.
|
|
603
|
+
const skillsCache = (0,_lib_cache_keyed_cache__WEBPACK_IMPORTED_MODULE_3__/* .createKeyedCache */ .J)({
|
|
604
|
+
ttlMs: 5000,
|
|
605
|
+
key: ()=>[
|
|
606
|
+
getBuiltinSkillsDir(),
|
|
607
|
+
...getSkillsDirs()
|
|
608
|
+
].join("|"),
|
|
609
|
+
load: ()=>{
|
|
610
|
+
const byId = new Map();
|
|
611
|
+
for (const skill of readSkillsFromDir(getBuiltinSkillsDir(), "builtin")){
|
|
612
|
+
byId.set(skill.id, skill);
|
|
415
613
|
}
|
|
416
|
-
|
|
614
|
+
for (const dir of getSkillsDirs()){
|
|
615
|
+
for (const skill of readSkillsFromDir(dir, "user")){
|
|
616
|
+
byId.set(skill.id, skill);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return Array.from(byId.values()).sort((a, b)=>a.id.localeCompare(b.id));
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
/** Drop the cached skill list. Call after any write to a skill repo. */ function invalidateSkillsCache() {
|
|
623
|
+
skillsCache.invalidate();
|
|
417
624
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
async function validateBody(req, schema) {
|
|
425
|
-
let raw;
|
|
625
|
+
function listSkills() {
|
|
626
|
+
return skillsCache.get();
|
|
627
|
+
}
|
|
628
|
+
function readSkillsFromDir(dir, source) {
|
|
629
|
+
if (!dir || !(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(dir)) return [];
|
|
630
|
+
let entries;
|
|
426
631
|
try {
|
|
427
|
-
|
|
632
|
+
entries = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readdirSync)(dir, {
|
|
633
|
+
withFileTypes: true
|
|
634
|
+
}).map((e)=>({
|
|
635
|
+
name: e.name,
|
|
636
|
+
isDir: e.isDirectory()
|
|
637
|
+
}));
|
|
428
638
|
} catch {
|
|
429
|
-
return
|
|
639
|
+
return [];
|
|
430
640
|
}
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
|
|
641
|
+
const skills = [];
|
|
642
|
+
for (const entry of entries){
|
|
643
|
+
if (entry.isDir) {
|
|
644
|
+
const skillFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, entry.name, "SKILL.md");
|
|
645
|
+
if (!(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(skillFile)) continue;
|
|
646
|
+
try {
|
|
647
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(skillFile, "utf8");
|
|
648
|
+
skills.push(parseSkill(entry.name, content, source));
|
|
649
|
+
} catch {}
|
|
650
|
+
} else if (entry.name.endsWith(".md")) {
|
|
651
|
+
const id = entry.name.slice(0, -3);
|
|
652
|
+
try {
|
|
653
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, entry.name), "utf8");
|
|
654
|
+
skills.push(parseSkill(id, content, source));
|
|
655
|
+
} catch {}
|
|
656
|
+
}
|
|
434
657
|
}
|
|
435
|
-
return
|
|
658
|
+
return skills;
|
|
436
659
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
/***/ }),
|
|
447
|
-
|
|
448
|
-
/***/ 44870:
|
|
449
|
-
/***/ ((module) => {
|
|
450
|
-
|
|
451
|
-
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
452
|
-
|
|
453
|
-
/***/ }),
|
|
454
|
-
|
|
455
|
-
/***/ 46837:
|
|
456
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
457
|
-
|
|
458
|
-
__webpack_require__.r(__webpack_exports__);
|
|
459
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
460
|
-
/* harmony export */ GET: () => (/* binding */ GET),
|
|
461
|
-
/* harmony export */ POST: () => (/* binding */ POST)
|
|
462
|
-
/* harmony export */ });
|
|
463
|
-
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97377);
|
|
464
|
-
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39947);
|
|
465
|
-
/* harmony import */ var _lib_skills__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21455);
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
const createSchema = zod__WEBPACK_IMPORTED_MODULE_2__/* .object */ .Ikc({
|
|
470
|
-
id: zod__WEBPACK_IMPORTED_MODULE_2__/* .string */ .YjP().regex(/^[\w-]+$/, "Letters, digits, and hyphens only").max(80),
|
|
471
|
-
content: zod__WEBPACK_IMPORTED_MODULE_2__/* .string */ .YjP().min(1).max(200000)
|
|
472
|
-
});
|
|
473
|
-
function GET() {
|
|
474
|
-
return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .cachedJson */ .Bm)({
|
|
475
|
-
skills: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .listSkills */ .bG)(),
|
|
476
|
-
skills_dir: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .getSkillsDir */ .YJ)(),
|
|
477
|
-
skills_dirs: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .getSkillsDirs */ .nh)()
|
|
478
|
-
}, 5);
|
|
660
|
+
function getSkill(id) {
|
|
661
|
+
if (!sanitizeId(id)) return null;
|
|
662
|
+
// Later directories override earlier ones, so search in reverse.
|
|
663
|
+
const dirs = getSkillsDirs();
|
|
664
|
+
for(let i = dirs.length - 1; i >= 0; i--){
|
|
665
|
+
const user = readSkillFromDir(dirs[i], id, "user");
|
|
666
|
+
if (user) return user;
|
|
667
|
+
}
|
|
668
|
+
return readSkillFromDir(getBuiltinSkillsDir(), id, "builtin");
|
|
479
669
|
}
|
|
480
|
-
|
|
481
|
-
if (!
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
670
|
+
function readSkillFromDir(dir, id, source) {
|
|
671
|
+
if (!dir) return null;
|
|
672
|
+
// Claude-style first
|
|
673
|
+
const claudeFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, id, "SKILL.md");
|
|
674
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(claudeFile)) {
|
|
675
|
+
try {
|
|
676
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(claudeFile, "utf8");
|
|
677
|
+
return {
|
|
678
|
+
...parseSkill(id, content, source),
|
|
679
|
+
content
|
|
680
|
+
};
|
|
681
|
+
} catch {}
|
|
682
|
+
}
|
|
683
|
+
// Flat .md
|
|
684
|
+
const flatFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, `${id}.md`);
|
|
685
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(flatFile)) {
|
|
686
|
+
try {
|
|
687
|
+
const content = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync)(flatFile, "utf8");
|
|
688
|
+
return {
|
|
689
|
+
...parseSkill(id, content, source),
|
|
690
|
+
content
|
|
691
|
+
};
|
|
692
|
+
} catch {}
|
|
491
693
|
}
|
|
694
|
+
return null;
|
|
695
|
+
}
|
|
696
|
+
function writeSkill(id, content) {
|
|
697
|
+
const dir = getSkillsDir();
|
|
698
|
+
if (!dir) throw new Error("No writable skill repo is configured");
|
|
699
|
+
if (!sanitizeId(id)) throw new Error(`Invalid skill id: ${JSON.stringify(id)}`);
|
|
700
|
+
const skillDir = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, id);
|
|
701
|
+
const skillFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(skillDir, "SKILL.md");
|
|
702
|
+
// Path escape guard
|
|
703
|
+
const resolvedBase = node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(dir);
|
|
704
|
+
if (!node_path__WEBPACK_IMPORTED_MODULE_1___default().resolve(skillFile).startsWith(resolvedBase + (node_path__WEBPACK_IMPORTED_MODULE_1___default().sep))) {
|
|
705
|
+
throw new Error("Path escape detected");
|
|
706
|
+
}
|
|
707
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.mkdirSync)(skillDir, {
|
|
708
|
+
recursive: true
|
|
709
|
+
});
|
|
710
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync)(skillFile, content, "utf8");
|
|
711
|
+
invalidateSkillsCache();
|
|
712
|
+
}
|
|
713
|
+
function deleteSkill(id) {
|
|
714
|
+
const dir = getSkillsDir();
|
|
715
|
+
if (!dir || !sanitizeId(id)) return false;
|
|
716
|
+
const claudeFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, id, "SKILL.md");
|
|
717
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(claudeFile)) {
|
|
718
|
+
try {
|
|
719
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.rmSync)(claudeFile);
|
|
720
|
+
try {
|
|
721
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.rmdirSync)(node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, id));
|
|
722
|
+
} catch {}
|
|
723
|
+
invalidateSkillsCache();
|
|
724
|
+
return true;
|
|
725
|
+
} catch {}
|
|
726
|
+
}
|
|
727
|
+
const flatFile = node_path__WEBPACK_IMPORTED_MODULE_1___default().join(dir, `${id}.md`);
|
|
728
|
+
if ((0,node_fs__WEBPACK_IMPORTED_MODULE_0__.existsSync)(flatFile)) {
|
|
729
|
+
try {
|
|
730
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.rmSync)(flatFile);
|
|
731
|
+
invalidateSkillsCache();
|
|
732
|
+
return true;
|
|
733
|
+
} catch {}
|
|
734
|
+
}
|
|
735
|
+
return false;
|
|
736
|
+
}
|
|
737
|
+
function sanitizeId(id) {
|
|
738
|
+
return Boolean(id) && /^[\w-]+$/.test(id) && !id.includes("..") && !id.includes("/") && !id.includes("\\");
|
|
492
739
|
}
|
|
493
740
|
|
|
494
741
|
|
|
495
|
-
/***/ }),
|
|
496
|
-
|
|
497
|
-
/***/
|
|
498
|
-
/***/ ((module) => {
|
|
499
|
-
|
|
500
|
-
module.exports = require("
|
|
501
|
-
|
|
502
|
-
/***/ }),
|
|
503
|
-
|
|
504
|
-
/***/
|
|
505
|
-
/***/ ((module) => {
|
|
506
|
-
|
|
507
|
-
module.exports = require("
|
|
508
|
-
|
|
509
|
-
/***/ }),
|
|
510
|
-
|
|
511
|
-
/***/
|
|
512
|
-
/***/ ((module) => {
|
|
513
|
-
|
|
514
|
-
module.exports = require("
|
|
515
|
-
|
|
516
|
-
/***/ }),
|
|
517
|
-
|
|
518
|
-
/***/
|
|
519
|
-
/***/ ((module) => {
|
|
520
|
-
|
|
521
|
-
module.exports = require("
|
|
522
|
-
|
|
523
|
-
/***/ }),
|
|
524
|
-
|
|
525
|
-
/***/
|
|
526
|
-
/***/ ((module) => {
|
|
527
|
-
|
|
528
|
-
module.exports = require("node:
|
|
529
|
-
|
|
530
|
-
/***/ }),
|
|
531
|
-
|
|
532
|
-
/***/
|
|
533
|
-
/***/ ((module) => {
|
|
534
|
-
|
|
535
|
-
module.exports = require("
|
|
536
|
-
|
|
537
|
-
/***/ }),
|
|
538
|
-
|
|
539
|
-
/***/
|
|
540
|
-
/***/ ((module) => {
|
|
541
|
-
|
|
542
|
-
module.exports = require("
|
|
543
|
-
|
|
544
|
-
/***/ }),
|
|
545
|
-
|
|
546
|
-
/***/
|
|
547
|
-
/***/ ((
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
/* harmony export */
|
|
557
|
-
/* harmony export */
|
|
558
|
-
/* harmony
|
|
559
|
-
/* harmony
|
|
560
|
-
/* harmony
|
|
561
|
-
/* harmony
|
|
562
|
-
/* harmony
|
|
563
|
-
/* harmony
|
|
564
|
-
/* harmony import */ var
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
// We inject the nextConfigOutput here so that we can use them in the route
|
|
609
|
-
// module.
|
|
610
|
-
const nextConfigOutput = "standalone"
|
|
611
|
-
const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
|
|
612
|
-
definition: {
|
|
613
|
-
kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
614
|
-
page: "/api/v1/skills/route",
|
|
615
|
-
pathname: "/api/v1/skills",
|
|
616
|
-
filename: "route",
|
|
617
|
-
bundlePath: "app/api/v1/skills/route"
|
|
618
|
-
},
|
|
619
|
-
distDir: ".next" || 0,
|
|
620
|
-
relativeProjectDir: false || '',
|
|
621
|
-
resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/skills/route.ts",
|
|
622
|
-
nextConfigOutput,
|
|
623
|
-
// The lazy require factory ensures that:
|
|
624
|
-
// - In dev: devRequestTimingInternalsEnd is set before userland executes,
|
|
625
|
-
// correctly attributing module load time to application-code rather than
|
|
626
|
-
// framework internals.
|
|
627
|
-
// - In all modes: async modules (route files with top-level await) are
|
|
628
|
-
// handled correctly — require() returns a Promise for such modules, which
|
|
629
|
-
// ensureUserland() awaits before the first request is handled.
|
|
630
|
-
userland: ()=>__webpack_require__(46837),
|
|
631
|
-
// In Turbopack dev mode, also provide a synchronous per-request getter so
|
|
632
|
-
// server HMR updates are picked up without re-executing the entry chunk.
|
|
633
|
-
// Using require() (synchronous) avoids adding async overhead that would be
|
|
634
|
-
// incorrectly attributed to application-code time in devRequestTiming.
|
|
635
|
-
... false ? 0 : {}
|
|
636
|
-
});
|
|
637
|
-
// Pull out the exports that we need to expose from the module. This should
|
|
638
|
-
// be eliminated when we've moved the other routes to the new format. These
|
|
639
|
-
// are used to hook into the route.
|
|
640
|
-
const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
|
|
641
|
-
function patchFetch() {
|
|
642
|
-
return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
|
|
643
|
-
workAsyncStorage,
|
|
644
|
-
workUnitAsyncStorage
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
async function handler(req, res, ctx) {
|
|
649
|
-
if (ctx.requestMeta) {
|
|
650
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
|
|
651
|
-
}
|
|
652
|
-
if (routeModule.isDev) {
|
|
653
|
-
(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
|
|
654
|
-
}
|
|
655
|
-
let srcPage = "/api/v1/skills/route";
|
|
656
|
-
// turbopack doesn't normalize `/index` in the page name
|
|
657
|
-
// so we need to to process dynamic routes properly
|
|
658
|
-
// TODO: fix turbopack providing differing value from webpack
|
|
659
|
-
if (false) {} else if (srcPage === '/index') {
|
|
660
|
-
// we always normalize /index specifically
|
|
661
|
-
srcPage = '/';
|
|
662
|
-
}
|
|
663
|
-
const multiZoneDraftMode = false;
|
|
664
|
-
const prepareResult = await routeModule.prepare(req, res, {
|
|
665
|
-
srcPage,
|
|
666
|
-
multiZoneDraftMode
|
|
667
|
-
});
|
|
668
|
-
if (!prepareResult) {
|
|
669
|
-
res.statusCode = 400;
|
|
670
|
-
res.end('Bad Request');
|
|
671
|
-
ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
|
|
672
|
-
return null;
|
|
673
|
-
}
|
|
674
|
-
const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
|
|
675
|
-
const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
|
|
676
|
-
// Only this route's prerenders can establish ISR or admit generated params.
|
|
677
|
-
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]));
|
|
678
|
-
let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
|
|
679
|
-
const render404 = async ()=>{
|
|
680
|
-
// TODO: should route-module itself handle rendering the 404
|
|
681
|
-
if (routerServerContext == null ? void 0 : routerServerContext.render404) {
|
|
682
|
-
await routerServerContext.render404(req, res, parsedUrl, false);
|
|
683
|
-
} else {
|
|
684
|
-
res.end('This page could not be found');
|
|
685
|
-
}
|
|
686
|
-
return null;
|
|
687
|
-
};
|
|
688
|
-
if (isIsr && !isDraftMode) {
|
|
689
|
-
const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
|
|
690
|
-
if (prerenderInfo) {
|
|
691
|
-
if (prerenderInfo.fallback === false && !isPrerendered) {
|
|
692
|
-
if (nextConfig.adapterPath) {
|
|
693
|
-
return await render404();
|
|
694
|
-
}
|
|
695
|
-
throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
let cacheKey = null;
|
|
700
|
-
if (isIsr && !routeModule.isDev && !isDraftMode) {
|
|
701
|
-
cacheKey = resolvedPathname;
|
|
702
|
-
// ensure /index and / is normalized to one key
|
|
703
|
-
cacheKey = cacheKey === '/index' ? '/' : cacheKey;
|
|
704
|
-
}
|
|
705
|
-
// Before rendering (which initializes component tree modules), we have to
|
|
706
|
-
// set the reference manifests to our global store so Server Action's
|
|
707
|
-
// encryption util can access to them at the top level of the page module.
|
|
708
|
-
if (serverActionsManifest && clientReferenceManifest) {
|
|
709
|
-
(0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
|
|
710
|
-
page: srcPage,
|
|
711
|
-
clientReferenceManifest,
|
|
712
|
-
serverActionsManifest
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
const method = req.method || 'GET';
|
|
716
|
-
const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
|
|
717
|
-
const activeSpan = tracer.getActiveScopeSpan();
|
|
718
|
-
const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
|
|
719
|
-
const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
|
|
720
|
-
const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
|
|
721
|
-
incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
|
|
722
|
-
globalThis.__incrementalCache = incrementalCache;
|
|
723
|
-
const context = {
|
|
724
|
-
params,
|
|
725
|
-
previewProps,
|
|
726
|
-
renderOpts: {
|
|
727
|
-
experimental: {
|
|
728
|
-
authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
|
|
729
|
-
useCacheTimeout: nextConfig.experimental.useCacheTimeout,
|
|
730
|
-
durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
|
|
731
|
-
},
|
|
732
|
-
cacheComponents: Boolean(nextConfig.cacheComponents),
|
|
733
|
-
validationLevel: nextConfig.experimental.instantInsights.validationLevel,
|
|
734
|
-
isDraftMode,
|
|
735
|
-
incrementalCache,
|
|
736
|
-
hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
|
|
737
|
-
cacheLifeProfiles: nextConfig.cacheLife,
|
|
738
|
-
staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
|
|
739
|
-
waitUntil: ctx.waitUntil,
|
|
740
|
-
onClose: (cb)=>{
|
|
741
|
-
res.on('close', cb);
|
|
742
|
-
},
|
|
743
|
-
onAfterTaskError: undefined
|
|
744
|
-
},
|
|
745
|
-
sharedContext: {
|
|
746
|
-
buildId,
|
|
747
|
-
deploymentId
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
|
|
751
|
-
const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
|
|
752
|
-
const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
|
|
753
|
-
const responseGenerator = async ({ previousCacheEntry })=>{
|
|
754
|
-
try {
|
|
755
|
-
if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
|
|
756
|
-
res.statusCode = 404;
|
|
757
|
-
// on-demand revalidate always sets this header
|
|
758
|
-
res.setHeader('x-nextjs-cache', 'REVALIDATED');
|
|
759
|
-
res.end('This page could not be found');
|
|
760
|
-
return null;
|
|
761
|
-
}
|
|
762
|
-
const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
|
|
763
|
-
req.fetchMetrics = context.renderOpts.fetchMetrics;
|
|
764
|
-
let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
|
|
765
|
-
// Attempt using provided waitUntil if available
|
|
766
|
-
// if it's not we fallback to sendResponse's handling
|
|
767
|
-
if (pendingWaitUntil) {
|
|
768
|
-
if (ctx.waitUntil) {
|
|
769
|
-
ctx.waitUntil(pendingWaitUntil);
|
|
770
|
-
pendingWaitUntil = undefined;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
const cacheTags = context.renderOpts.collectedTags;
|
|
774
|
-
// If the request is for a static response, we can cache it so long
|
|
775
|
-
// as it's not edge.
|
|
776
|
-
if (isIsr) {
|
|
777
|
-
const blob = await response.blob();
|
|
778
|
-
// Copy the headers from the response.
|
|
779
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
|
|
780
|
-
if (cacheTags) {
|
|
781
|
-
headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
|
|
782
|
-
}
|
|
783
|
-
if (!headers['content-type'] && blob.type) {
|
|
784
|
-
headers['content-type'] = blob.type;
|
|
785
|
-
}
|
|
786
|
-
const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
|
|
787
|
-
const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
|
|
788
|
-
// explicit `expire` (e.g. via `cacheLife`). This mirrors the
|
|
789
|
-
// build-time fallback in `build/index.ts` so cache entries
|
|
790
|
-
// and the response Cache-Control header agree on the route's
|
|
791
|
-
// effective expire. Routes that opt out of revalidation
|
|
792
|
-
// (`revalidate: false`) or that are dynamic (`revalidate: 0`)
|
|
793
|
-
// keep `expire: undefined`.
|
|
794
|
-
revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
|
|
795
|
-
// Create the cache entry for the response.
|
|
796
|
-
const cacheEntry = {
|
|
797
|
-
value: {
|
|
798
|
-
kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
|
|
799
|
-
status: response.status,
|
|
800
|
-
body: Buffer.from(await blob.arrayBuffer()),
|
|
801
|
-
headers
|
|
802
|
-
},
|
|
803
|
-
cacheControl: {
|
|
804
|
-
revalidate,
|
|
805
|
-
expire
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
return cacheEntry;
|
|
809
|
-
} else {
|
|
810
|
-
// send response without caching if not ISR
|
|
811
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
|
|
812
|
-
return null;
|
|
813
|
-
}
|
|
814
|
-
} catch (err) {
|
|
815
|
-
// if this is a background revalidate we need to report
|
|
816
|
-
// the request error here as it won't be bubbled
|
|
817
|
-
if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
|
|
818
|
-
const silenceLog = false;
|
|
819
|
-
await routeModule.onRequestError(req, err, {
|
|
820
|
-
routerKind: 'App Router',
|
|
821
|
-
routePath: srcPage,
|
|
822
|
-
routeType: 'route',
|
|
823
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
824
|
-
isStaticGeneration: cacheKey !== null,
|
|
825
|
-
isOnDemandRevalidate
|
|
826
|
-
})
|
|
827
|
-
}, silenceLog, routerServerContext);
|
|
828
|
-
}
|
|
829
|
-
throw err;
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
const handleResponse = async (currentSpan, parentSpan)=>{
|
|
833
|
-
try {
|
|
834
|
-
var _cacheEntry_value;
|
|
835
|
-
const cacheEntry = await routeModule.handleResponse({
|
|
836
|
-
req,
|
|
837
|
-
nextConfig,
|
|
838
|
-
cacheKey,
|
|
839
|
-
routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
|
|
840
|
-
isFallback: false,
|
|
841
|
-
previewProps,
|
|
842
|
-
prerenderManifest,
|
|
843
|
-
isRoutePPREnabled: false,
|
|
844
|
-
isOnDemandRevalidate,
|
|
845
|
-
revalidateOnlyGenerated,
|
|
846
|
-
responseGenerator,
|
|
847
|
-
waitUntil: ctx.waitUntil,
|
|
848
|
-
isMinimalMode
|
|
849
|
-
});
|
|
850
|
-
if (cacheEntry !== null && 'error' in cacheEntry) {
|
|
851
|
-
throw cacheEntry.error;
|
|
852
|
-
}
|
|
853
|
-
// we don't create a cacheEntry for ISR
|
|
854
|
-
if (!isIsr) {
|
|
855
|
-
return;
|
|
856
|
-
}
|
|
857
|
-
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) {
|
|
858
|
-
var _cacheEntry_value1;
|
|
859
|
-
throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
|
|
860
|
-
}
|
|
861
|
-
if (!isMinimalMode) {
|
|
862
|
-
res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
|
|
863
|
-
}
|
|
864
|
-
// Draft mode should never be cached
|
|
865
|
-
if (isDraftMode) {
|
|
866
|
-
res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
|
|
867
|
-
}
|
|
868
|
-
const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
|
|
869
|
-
if (!(isMinimalMode && isIsr)) {
|
|
870
|
-
headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
|
|
871
|
-
}
|
|
872
|
-
// If cache control is already set on the response we don't
|
|
873
|
-
// override it to allow users to customize it via next.config
|
|
874
|
-
if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
|
|
875
|
-
headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
|
|
876
|
-
}
|
|
877
|
-
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'.
|
|
878
|
-
new Response(cacheEntry.value.body, {
|
|
879
|
-
headers,
|
|
880
|
-
status: cacheEntry.value.status || 200
|
|
881
|
-
}));
|
|
882
|
-
return;
|
|
883
|
-
} catch (err) {
|
|
884
|
-
if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
|
|
885
|
-
const silenceLog = false;
|
|
886
|
-
await routeModule.onRequestError(req, err, {
|
|
887
|
-
routerKind: 'App Router',
|
|
888
|
-
routePath: normalizedSrcPage,
|
|
889
|
-
routeType: 'route',
|
|
890
|
-
revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
|
|
891
|
-
isStaticGeneration: cacheKey !== null,
|
|
892
|
-
isOnDemandRevalidate
|
|
893
|
-
})
|
|
894
|
-
}, silenceLog, routerServerContext);
|
|
895
|
-
}
|
|
896
|
-
// rethrow so that we can handle serving error page
|
|
897
|
-
// If this is during static generation, throw the error again.
|
|
898
|
-
if (isIsr) throw err;
|
|
899
|
-
// Otherwise, send a 500 response unless the original response has
|
|
900
|
-
// already committed. In that case, preserve its status code for
|
|
901
|
-
// telemetry while still recording the failure and terminating a response
|
|
902
|
-
// that the failed pipeline left open.
|
|
903
|
-
if (res.headersSent) {
|
|
904
|
-
if (currentSpan) {
|
|
905
|
-
const error = err instanceof Error ? err : new Error('Unknown app route error');
|
|
906
|
-
currentSpan.recordException(error);
|
|
907
|
-
currentSpan.setStatus({
|
|
908
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
|
|
909
|
-
message: error.message
|
|
910
|
-
});
|
|
911
|
-
currentSpan.setAttribute('error.type', error.name);
|
|
912
|
-
}
|
|
913
|
-
if (!res.writableEnded && !res.destroyed) {
|
|
914
|
-
res.end();
|
|
915
|
-
}
|
|
916
|
-
} else {
|
|
917
|
-
await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
|
|
918
|
-
status: 500
|
|
919
|
-
}));
|
|
920
|
-
}
|
|
921
|
-
return;
|
|
922
|
-
} finally{
|
|
923
|
-
;
|
|
924
|
-
(()=>{
|
|
925
|
-
if (!currentSpan) {
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
let statusCode = res.statusCode;
|
|
929
|
-
currentSpan.setAttributes({
|
|
930
|
-
'http.status_code': statusCode,
|
|
931
|
-
'next.rsc': false
|
|
932
|
-
});
|
|
933
|
-
if (statusCode && statusCode >= 500) {
|
|
934
|
-
// For 5xx status codes: SHOULD be set to 'Error' span status.
|
|
935
|
-
// x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
936
|
-
currentSpan.setStatus({
|
|
937
|
-
code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
|
|
938
|
-
});
|
|
939
|
-
// For span status 'Error', SHOULD set 'error.type' attribute.
|
|
940
|
-
currentSpan.setAttribute('error.type', statusCode.toString());
|
|
941
|
-
}
|
|
942
|
-
const rootSpanAttributes = tracer.getRootSpanAttributes();
|
|
943
|
-
// We were unable to get attributes, probably OTEL is not enabled
|
|
944
|
-
if (!rootSpanAttributes) {
|
|
945
|
-
return;
|
|
946
|
-
}
|
|
947
|
-
if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
|
|
948
|
-
console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
|
|
949
|
-
return;
|
|
950
|
-
}
|
|
951
|
-
const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
|
|
952
|
-
const name = `${method} ${route}`;
|
|
953
|
-
currentSpan.setAttributes({
|
|
954
|
-
'next.route': route,
|
|
955
|
-
'http.route': route,
|
|
956
|
-
'next.span_name': name
|
|
957
|
-
});
|
|
958
|
-
currentSpan.updateName(name);
|
|
959
|
-
// Propagate http.route to the parent span if one exists (e.g.
|
|
960
|
-
// a platform-created HTTP span in adapter deployments).
|
|
961
|
-
if (parentSpan && parentSpan !== currentSpan) {
|
|
962
|
-
parentSpan.setAttribute('http.route', route);
|
|
963
|
-
parentSpan.updateName(name);
|
|
964
|
-
}
|
|
965
|
-
})();
|
|
742
|
+
/***/ }),
|
|
743
|
+
|
|
744
|
+
/***/ 27910:
|
|
745
|
+
/***/ ((module) => {
|
|
746
|
+
|
|
747
|
+
module.exports = require("stream");
|
|
748
|
+
|
|
749
|
+
/***/ }),
|
|
750
|
+
|
|
751
|
+
/***/ 28354:
|
|
752
|
+
/***/ ((module) => {
|
|
753
|
+
|
|
754
|
+
module.exports = require("util");
|
|
755
|
+
|
|
756
|
+
/***/ }),
|
|
757
|
+
|
|
758
|
+
/***/ 29021:
|
|
759
|
+
/***/ ((module) => {
|
|
760
|
+
|
|
761
|
+
module.exports = require("fs");
|
|
762
|
+
|
|
763
|
+
/***/ }),
|
|
764
|
+
|
|
765
|
+
/***/ 29294:
|
|
766
|
+
/***/ ((module) => {
|
|
767
|
+
|
|
768
|
+
module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
|
|
769
|
+
|
|
770
|
+
/***/ }),
|
|
771
|
+
|
|
772
|
+
/***/ 31421:
|
|
773
|
+
/***/ ((module) => {
|
|
774
|
+
|
|
775
|
+
module.exports = require("node:child_process");
|
|
776
|
+
|
|
777
|
+
/***/ }),
|
|
778
|
+
|
|
779
|
+
/***/ 33873:
|
|
780
|
+
/***/ ((module) => {
|
|
781
|
+
|
|
782
|
+
module.exports = require("path");
|
|
783
|
+
|
|
784
|
+
/***/ }),
|
|
785
|
+
|
|
786
|
+
/***/ 37067:
|
|
787
|
+
/***/ ((module) => {
|
|
788
|
+
|
|
789
|
+
module.exports = require("node:http");
|
|
790
|
+
|
|
791
|
+
/***/ }),
|
|
792
|
+
|
|
793
|
+
/***/ 38522:
|
|
794
|
+
/***/ ((module) => {
|
|
795
|
+
|
|
796
|
+
module.exports = require("node:zlib");
|
|
797
|
+
|
|
798
|
+
/***/ }),
|
|
799
|
+
|
|
800
|
+
/***/ 39947:
|
|
801
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
802
|
+
|
|
803
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
804
|
+
/* harmony export */ Bm: () => (/* binding */ cachedJson),
|
|
805
|
+
/* harmony export */ HN: () => (/* binding */ notFoundResponse),
|
|
806
|
+
/* harmony export */ Jb: () => (/* binding */ validateBody),
|
|
807
|
+
/* harmony export */ K2: () => (/* binding */ createdResponse),
|
|
808
|
+
/* harmony export */ Ng: () => (/* binding */ noStoreJson),
|
|
809
|
+
/* harmony export */ yj: () => (/* binding */ errorResponse)
|
|
810
|
+
/* harmony export */ });
|
|
811
|
+
/* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
|
|
812
|
+
// Shared HTTP response builders for app/api/v1/** route handlers.
|
|
813
|
+
//
|
|
814
|
+
// Goal: every error/success payload across the v1 surface has the same
|
|
815
|
+
// shape. Before this lived inline, response bodies drifted —
|
|
816
|
+
// `{error: "x"}` vs `{message: "x"}`, 400 vs 422 for the same condition,
|
|
817
|
+
// some routes returned Zod's raw issue array, others stringified it.
|
|
818
|
+
|
|
819
|
+
function errorResponse(message, status = 400) {
|
|
820
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
|
|
821
|
+
error: message
|
|
822
|
+
}, {
|
|
823
|
+
status
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function notFoundResponse(message = "Not found") {
|
|
827
|
+
return errorResponse(message, 404);
|
|
828
|
+
}
|
|
829
|
+
function createdResponse(data) {
|
|
830
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
831
|
+
status: 201
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
// Wrap a 200 JSON response with a private Cache-Control header. Use on safe
|
|
835
|
+
// GET endpoints that serve user-scoped data the client refetches often (panel
|
|
836
|
+
// mounts, navigation back/forward) but mutates rarely. The TTL is short
|
|
837
|
+
// enough that explicit mutations — which patch the client-side ApiClient
|
|
838
|
+
// cache in place — stay observably consistent without an extra roundtrip.
|
|
839
|
+
//
|
|
840
|
+
// swrSeconds (optional): stale-while-revalidate window. When set, the browser
|
|
841
|
+
// serves the cached response immediately and refreshes in the background,
|
|
842
|
+
// making navigation feel instant. Use for data that can tolerate brief
|
|
843
|
+
// staleness (tool list, agent configs, model list). Omit for real-time data
|
|
844
|
+
// (dashboard metrics, credential state).
|
|
845
|
+
function cachedJson(data, maxAgeSeconds, swrSeconds) {
|
|
846
|
+
const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
|
|
847
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
848
|
+
headers: {
|
|
849
|
+
"Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
|
|
966
850
|
}
|
|
967
|
-
};
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
// Use for endpoints whose response contains live state that must never be
|
|
854
|
+
// served from cache — credentials, connection status, live config values.
|
|
855
|
+
function noStoreJson(data) {
|
|
856
|
+
return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
|
|
857
|
+
headers: {
|
|
858
|
+
"Cache-Control": "no-store"
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
// Validate a JSON request body against a zod schema.
|
|
863
|
+
// Returns either the parsed data or a 400 NextResponse explaining the issue.
|
|
864
|
+
// Caller pattern:
|
|
865
|
+
// const parsed = await validateBody(req, Schema);
|
|
866
|
+
// if (parsed instanceof NextResponse) return parsed;
|
|
867
|
+
// // use parsed.field
|
|
868
|
+
async function validateBody(req, schema) {
|
|
869
|
+
let raw;
|
|
870
|
+
try {
|
|
871
|
+
raw = await req.json();
|
|
872
|
+
} catch {
|
|
873
|
+
return errorResponse("Request body must be valid JSON", 400);
|
|
874
|
+
}
|
|
875
|
+
const parsed = schema.safeParse(raw);
|
|
876
|
+
if (!parsed.success) {
|
|
877
|
+
return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
|
|
982
878
|
}
|
|
879
|
+
return parsed.data;
|
|
983
880
|
}
|
|
984
881
|
|
|
985
|
-
//# sourceMappingURL=app-route.js.map
|
|
986
882
|
|
|
883
|
+
/***/ }),
|
|
884
|
+
|
|
885
|
+
/***/ 44708:
|
|
886
|
+
/***/ ((module) => {
|
|
887
|
+
|
|
888
|
+
module.exports = require("node:https");
|
|
889
|
+
|
|
890
|
+
/***/ }),
|
|
891
|
+
|
|
892
|
+
/***/ 44870:
|
|
893
|
+
/***/ ((module) => {
|
|
894
|
+
|
|
895
|
+
module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
|
|
896
|
+
|
|
897
|
+
/***/ }),
|
|
898
|
+
|
|
899
|
+
/***/ 46837:
|
|
900
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
901
|
+
|
|
902
|
+
__webpack_require__.r(__webpack_exports__);
|
|
903
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
904
|
+
/* harmony export */ GET: () => (/* binding */ GET),
|
|
905
|
+
/* harmony export */ POST: () => (/* binding */ POST)
|
|
906
|
+
/* harmony export */ });
|
|
907
|
+
/* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97377);
|
|
908
|
+
/* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39947);
|
|
909
|
+
/* harmony import */ var _lib_skills__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21455);
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
const createSchema = zod__WEBPACK_IMPORTED_MODULE_2__/* .object */ .Ikc({
|
|
914
|
+
id: zod__WEBPACK_IMPORTED_MODULE_2__/* .string */ .YjP().regex(/^[\w-]+$/, "Letters, digits, and hyphens only").max(80),
|
|
915
|
+
content: zod__WEBPACK_IMPORTED_MODULE_2__/* .string */ .YjP().min(1).max(200000)
|
|
916
|
+
});
|
|
917
|
+
function GET() {
|
|
918
|
+
return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .cachedJson */ .Bm)({
|
|
919
|
+
skills: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .listSkills */ .bG)(),
|
|
920
|
+
skills_dir: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .getSkillsDir */ .YJ)(),
|
|
921
|
+
skills_dirs: (0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .getSkillsDirs */ .nh)()
|
|
922
|
+
}, 5);
|
|
923
|
+
}
|
|
924
|
+
async function POST(req) {
|
|
925
|
+
if (!(0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .getSkillsDir */ .YJ)()) return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .errorResponse */ .yj)("No writable skill repo is configured", 503);
|
|
926
|
+
const parsed = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .validateBody */ .Jb)(req, createSchema);
|
|
927
|
+
if (parsed instanceof Response) return parsed;
|
|
928
|
+
try {
|
|
929
|
+
(0,_lib_skills__WEBPACK_IMPORTED_MODULE_1__/* .writeSkill */ .hI)(parsed.id, parsed.content);
|
|
930
|
+
return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .createdResponse */ .K2)({
|
|
931
|
+
id: parsed.id
|
|
932
|
+
});
|
|
933
|
+
} catch (err) {
|
|
934
|
+
return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_0__/* .errorResponse */ .yj)(String(err));
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
/***/ }),
|
|
940
|
+
|
|
941
|
+
/***/ 48161:
|
|
942
|
+
/***/ ((module) => {
|
|
943
|
+
|
|
944
|
+
module.exports = require("node:os");
|
|
945
|
+
|
|
946
|
+
/***/ }),
|
|
947
|
+
|
|
948
|
+
/***/ 51455:
|
|
949
|
+
/***/ ((module) => {
|
|
950
|
+
|
|
951
|
+
module.exports = require("node:fs/promises");
|
|
952
|
+
|
|
953
|
+
/***/ }),
|
|
954
|
+
|
|
955
|
+
/***/ 55511:
|
|
956
|
+
/***/ ((module) => {
|
|
957
|
+
|
|
958
|
+
module.exports = require("crypto");
|
|
959
|
+
|
|
960
|
+
/***/ }),
|
|
961
|
+
|
|
962
|
+
/***/ 55591:
|
|
963
|
+
/***/ ((module) => {
|
|
964
|
+
|
|
965
|
+
module.exports = require("https");
|
|
966
|
+
|
|
967
|
+
/***/ }),
|
|
968
|
+
|
|
969
|
+
/***/ 57075:
|
|
970
|
+
/***/ ((module) => {
|
|
971
|
+
|
|
972
|
+
module.exports = require("node:stream");
|
|
973
|
+
|
|
974
|
+
/***/ }),
|
|
975
|
+
|
|
976
|
+
/***/ 57975:
|
|
977
|
+
/***/ ((module) => {
|
|
978
|
+
|
|
979
|
+
module.exports = require("node:util");
|
|
980
|
+
|
|
981
|
+
/***/ }),
|
|
982
|
+
|
|
983
|
+
/***/ 63033:
|
|
984
|
+
/***/ ((module) => {
|
|
985
|
+
|
|
986
|
+
module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
|
|
987
987
|
|
|
988
988
|
/***/ }),
|
|
989
989
|
|
|
@@ -1147,7 +1147,7 @@ module.exports = import("@huggingface/transformers");;
|
|
|
1147
1147
|
var __webpack_require__ = require("../../../../webpack-runtime.js");
|
|
1148
1148
|
__webpack_require__.C(exports);
|
|
1149
1149
|
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
|
|
1150
|
-
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(
|
|
1150
|
+
var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(2603)));
|
|
1151
1151
|
module.exports = __webpack_exports__;
|
|
1152
1152
|
|
|
1153
1153
|
})();
|