elanous 0.2.47 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/{fMFwB4C7VwMRiuFGZdGVs → 98VlBaYvL-VVnCq93_lFS}/_buildManifest.js +1 -1
- package/apps/pwa/out/_next/static/chunks/1388-1eb6df003f29bb9c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1434-a2c279f005d9c501.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1464.14588e93d2ab3190.js +24 -0
- package/apps/pwa/out/_next/static/chunks/1465.85f9a1708f17853a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/156.389be47355dc94c7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/162.c03cf23572cb4136.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1831.25868bc1e2cc0dae.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1896.b6c635d0c8f65727.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1939.3fa2506ad8e585bc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1972.a8d37aadbc59ac43.js +34 -0
- package/apps/pwa/out/_next/static/chunks/1997-f22e6f9510520182.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2242-6edf27c6c0ae7589.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9748.2866a5c59dbe980c.js → 234.f25f5b0d65f89af8.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/2344.795de26da3261060.js +23 -0
- package/apps/pwa/out/_next/static/chunks/2491.9ac5bd2f48bcd60c.js +226 -0
- package/apps/pwa/out/_next/static/chunks/2513.e03f6479c0079b6e.js +79 -0
- package/apps/pwa/out/_next/static/chunks/2551-43782d8812989ae7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2799.12b1a3e7090e27ef.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2806.f04d7923f2adadb1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2862.b8ea08cbc69a63d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/295-1ff35d6a06be8400.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3161.b9eb612f66d5ff04.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6293.4e33bcd25fa7fe80.js → 3233.46021e4acc520c03.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/325.3cfd5b7571a9f740.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3384.d91656787bec7922.js +104 -0
- package/apps/pwa/out/_next/static/chunks/{81a72ea7-19d3ed13dbaabf14.js → 3414f5fa-46ae45073dca64f0.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{6329.cfe619f9146ddb60.js → 3589.a9094c2bc034055c.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/367.1ffe524fe1ee7803.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3777.1450df79d987816d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3877-871ea505d778a6a7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4021.28d034c7fb0a6732.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{17673afb.ba8b2d0410a4be97.js → 4069a63b.a074c39997560438.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4212.873105c37a871421.js +1 -0
- package/apps/pwa/out/_next/static/chunks/423-6be27163a1bce5d7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4231.644cd1e23974f1f6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4362.1adc1412509b7bb8.js +94 -0
- package/apps/pwa/out/_next/static/chunks/4431.83a630154376636a.js +41 -0
- package/apps/pwa/out/_next/static/chunks/{6166-b2fc7231dee53e86.js → 4506-f8439f6fbd0a8483.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4540-993e2e4e1d485a9a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4719-1d04b01d4d6166fc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4754-bfd5e1ad9016e176.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5001.b39bf6d792509317.js +64 -0
- package/apps/pwa/out/_next/static/chunks/5021.7234ae147ab0a3e1.js +77 -0
- package/apps/pwa/out/_next/static/chunks/5230.3e562ed2a69cbc7b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5279.f75fafa19de6e131.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6c31d3a0.7f6d7568c2b7f9cc.js → 52bafb67.054ec9d048116d83.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5325-b9c1258cc7e579f9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5495-37306015ec740354.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7756.ba59333b9f5eb5b1.js → 5536.bbb17703f46e52e7.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/{9695.d086738c907a0c2c.js → 5571.a062963c309338b4.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/5658.d1e61315cb865f82.js +32 -0
- package/apps/pwa/out/_next/static/chunks/5709.867a5086d782dd97.js +286 -0
- package/apps/pwa/out/_next/static/chunks/5765.5949ec61cec63eac.js +1 -0
- package/apps/pwa/out/_next/static/chunks/587.e6b35bcbd947c58e.js +8 -0
- package/apps/pwa/out/_next/static/chunks/5951-f25e14d03e72135a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5962-1ab68b213684716b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6006.3dcd594182d0cedb.js → 5998.d426273cdd00305a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6352.20c708245475cf50.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7340-55af4d0198f3c218.js → 6548-a160aa580fb9a8ff.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/673-40c924b2095a05eb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6731-c9308c2f71a1b8e3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7327.5bc587cdfbb7468b.js → 6747.365eefdf3b4a0226.js} +17 -17
- package/apps/pwa/out/_next/static/chunks/{919.c8775745cc88225f.js → 691.6ff56b5f4b6ec918.js} +4 -4
- package/apps/pwa/out/_next/static/chunks/6932.f80f616260b74131.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6950-5d5edab502cc208b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6982.e8fecbf7feb3aba5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7051-0dbbb2c1ce4f519e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1575.33a2d7d2be3d23f9.js → 7087.99662912e4db6255.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/709.bd9939dbb991de9f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7197.7b19aa948048e19a.js +93 -0
- package/apps/pwa/out/_next/static/chunks/7230-6527ac6be205c096.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7233-d93f8ce1475f730c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7292-a4d5c8d2fe255e06.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7304-dae57d61a8ccccf0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7382.bf53ab097670a235.js +27 -0
- package/apps/pwa/out/_next/static/chunks/7434.99c31fb661085b6a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7457-9ceddd4301467503.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{3131.e7063655797e9743.js → 7479.d00f44fde98cf34e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7494.d8b8d01d8dcbafe8.js +2 -0
- package/apps/pwa/out/_next/static/chunks/{5987.3693cba0f39fc644.js → 751.95d127a92f7817e3.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7554-d9cec4ac2e6d556d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7631-673b883cfbbcaed1.js → 7733-6f0d8da7a3f3ce91.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7757-6f4b6363cc651de5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9270078e.402279bc985895b9.js → 77a1aef7.ba1c04f78a1493d9.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/787-4d1d55b1311a5019.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7915-a755af5ea69cfcfe.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8029-2963385667511b16.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8090.bc2349b6133b2cd5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8136.8ff2113530c27083.js +1 -0
- package/apps/pwa/out/_next/static/chunks/819.632a2a50f814f98e.js +74 -0
- package/apps/pwa/out/_next/static/chunks/8328.72a79ba9b81971ad.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8448.4e25153e035786b0.js +62 -0
- package/apps/pwa/out/_next/static/chunks/8469.f67afe44a0fa8af0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8613.76dfc054055f06ba.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8649-fe9165a8879fad56.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8840-53feb140de04dcfe.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8873.ef8a37057644f876.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8917-46eb4e608f44bf74.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8954.e749ad9e9c5ca512.js +115 -0
- package/apps/pwa/out/_next/static/chunks/9065.8134b756614cf83f.js +36 -0
- package/apps/pwa/out/_next/static/chunks/9089.087fcd352568af49.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2791.6620db26a28b4ad4.js → 9103.bd34694d18c05083.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9140-bfcc4075cac3c387.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9272.787cb6d987824708.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9361-5b10273d3f34b21d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9396.097c14dd4df77c43.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9468.370ef15c86f7b141.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2767.71eaafcf158c9e24.js → 9531.ffbcd1e59e2c32fc.js} +17 -17
- package/apps/pwa/out/_next/static/chunks/963-66d3a6d98e977ae5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9644.a615f56876ed37b8.js +90 -0
- package/apps/pwa/out/_next/static/chunks/{1395-be70dd3408dec106.js → 9693-ab5bc28704a66601.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/9705-bbcd00db4ffd3484.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9786.2d8c3b7368f18f1b.js +148 -0
- package/apps/pwa/out/_next/static/chunks/9805.e17f9c6e3811e48b.js +24 -0
- package/apps/pwa/out/_next/static/chunks/9876-49a1e08c0dfe7b8c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9891.5995e75a99b53d4e.js +149 -0
- package/apps/pwa/out/_next/static/chunks/9912-2be6b6ea0321c365.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c0543429ffa9cdfb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-39f04d88df12b3e9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-e4f014aa82483cae.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-e86f9273877eab46.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/{page-fb3631f9f3a50179.js → page-dbc30fbf2e8933d9.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-d83a916672a8cfd3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-22f27eaa5e6e68c7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-66477bf22d33b56e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-913f2a86ea109c65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-ac51dc349381d564.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-cd09fc74dca72511.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-6c357f5b58598b67.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-ab83de8c73bd2e4f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/page-6402ad2273b6f7b5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-50d9b8d13b33f785.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-c0543429ffa9cdfb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-ffca50fc1f13759c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-3316bfc28a901722.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-aef93e049341011e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-8e67bb49fa81d4e5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-8b8c8ac4a3edf0eb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/page-b5b994c9ea03f6d7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-1a06f6f510439341.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-d9720f6a03f31fa7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/{page-895823d15c5776c7.js → page-d7c891d78672d771.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-e915872b37ca7dcf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-43c2ec7c00978377.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-c2537aa89b121637.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-f0d6a675eb513720.js → page-3264666f6ef99431.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-efe9dd7bc58d4fc6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-153277343c9956b8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-c1457829d1506ad7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-9622573651a4b6ce.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-5aeba1aa69ec67ad.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-29cf1ba9ae2fdb92.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-99a060c6edd4726c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/{page-3835d43c61fa1af6.js → page-decfacd2237da403.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-3650eed85a5c5c93.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-14077f0eddcae22f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-c0543429ffa9cdfb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-364ee29f223bdc6b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-905fb1f67c2665a7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-79907fc36e3113f4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-8f01867ee2a701b6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-310b734167671ba8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/today/page-cb1ca7ae52803603.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-5491f2fb8e9376b5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-7e98befd36460b21.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-220923eefd5149b5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-afdef54bb570da39.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-19f8acddbff16091.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-d327a7647a075184.js +1 -0
- package/apps/pwa/out/_next/static/chunks/bc1f8ef9.b79035bd0f565c66.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{c0a97b40.42e62d6352afa9df.js → c58bec24.d208786405e23259.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/cf9ff424.b702f4a2ac70d836.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{8f44ce90-05842a3e94de7716.js → d90ea774-d492ff408af303c1.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{607d4dc1.a4c4988d2c164d64.js → e7a93f74.aa8572069f848f17.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/ec9064d2.691021d974525713.js +122 -0
- package/apps/pwa/out/_next/static/chunks/ef9d715f.186b83d00befb229.js +1 -0
- package/apps/pwa/out/_next/static/chunks/framework-f01b715c1ec2fb74.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-3267c2e627901292.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-a690bcbeac3c465d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-124f11699738fd43.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-754b7bd073a36a5f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-8ded1efe8121eba0.js +1 -0
- package/apps/pwa/out/_next/static/css/32b8e1b8996dbf5e.css +1 -0
- package/apps/pwa/out/_next/static/css/{62c858ad53854f47.css → 9e19f9d740cf4dcb.css} +1 -1
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +23 -23
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +23 -23
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +23 -23
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +22 -22
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +22 -22
- package/apps/pwa/out/ceo/index.html +1 -1
- package/apps/pwa/out/ceo/index.txt +23 -23
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +22 -22
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +23 -23
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +23 -23
- package/apps/pwa/out/decisions/index.html +1 -1
- package/apps/pwa/out/decisions/index.txt +22 -22
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +23 -23
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +24 -24
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +23 -23
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +23 -23
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +22 -22
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +23 -23
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +23 -23
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +24 -24
- package/apps/pwa/out/live-run/index.html +1 -1
- package/apps/pwa/out/live-run/index.txt +24 -24
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +22 -22
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +22 -22
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +22 -22
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +23 -23
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +23 -23
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +22 -22
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +22 -22
- package/apps/pwa/out/ops/resources/index.html +1 -1
- package/apps/pwa/out/ops/resources/index.txt +22 -22
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +22 -22
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +22 -22
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +23 -23
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +23 -23
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +22 -22
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +23 -23
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +23 -23
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +23 -23
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +23 -23
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +23 -23
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +22 -22
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +23 -23
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +23 -23
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +23 -23
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +23 -23
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +23 -23
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +23 -23
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +23 -23
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +23 -23
- package/graphs/intake/intake-daily.yaml +5 -1
- package/graphs/overlays/examples/demo1104-research-arg-runtime.yaml +28 -0
- package/package.json +3 -1
- package/packs/b2b-sales-public/content/example-answer.md +5 -0
- package/packs/b2b-sales-public/content/playbook.md +11 -0
- package/packs/b2b-sales-public/content/proposal-template.md +13 -0
- package/packs/b2b-sales-public/content/questions.md +10 -0
- package/packs/b2b-sales-public/knowledge-pack.json +31 -0
- package/packs/elanous-basics/.codex-plugin/plugin.json +12 -0
- package/packs/elanous-basics/plugin.json +20 -0
- package/packs/elanous-essentials/plugin.json +24 -0
- package/packs/elanous-hwp/.codex-plugin/plugin.json +12 -0
- package/packs/elanous-hwp/NOTICE.md +13 -0
- package/packs/elanous-hwp/README.md +21 -0
- package/packs/elanous-hwp/nodes/from-md.yaml +16 -0
- package/packs/elanous-hwp/nodes/to-md.yaml +15 -0
- package/packs/elanous-hwp/plugin.json +18 -0
- package/packs/elanous-hwp/scripts/hwp.py +405 -0
- package/packs/elanous-hwp/skills/hwp-fill/SKILL.md +8 -0
- package/packs/elanous-hwp/skills/hwp-read/SKILL.md +8 -0
- package/packs/elanous-hwp/skills/hwp-write/SKILL.md +8 -0
- package/packs/elanous-hwp/templates/official-letter.yaml +6 -0
- package/packs/elanous-hwp/templates/report.yaml +6 -0
- package/packs/elanous-hwp/test/consumer.py +24 -0
- package/packs/elanous-hwp/test/verify-python-hwpx.py +12 -0
- package/packs/elanous-media/.codex-plugin/plugin.json +12 -0
- package/packs/elanous-media/plugin.json +16 -0
- package/packs/image-first-shorts/.codex-plugin/plugin.json +12 -0
- package/packs/image-first-shorts/LICENSE +76 -0
- package/packs/image-first-shorts/README.md +45 -0
- package/packs/image-first-shorts/SOURCE.md +43 -0
- package/packs/image-first-shorts/examples/input.json +9 -0
- package/packs/image-first-shorts/examples/storyboard.json +31 -0
- package/packs/image-first-shorts/graphs/image-first-shorts.yaml +121 -0
- package/packs/image-first-shorts/graphs/recipes.yaml +56 -0
- package/packs/image-first-shorts/graphs/run-step.ts +270 -0
- package/packs/image-first-shorts/plugin.json +38 -0
- package/packs/image-first-shorts/skills/image-first-shorts/SKILL.md +115 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/examples/image_example.vars.json +7 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/examples/video_example.vars.json +6 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/image_blocks.json +30 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/image_runner_wrapper.txt +6 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/image_template.txt +1 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/music_plan_template.json +13 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/pricing.json +7 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/tts_request_template.json +8 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/tts_template.txt +1 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/video_blocks.json +13 -0
- package/packs/image-first-shorts/skills/image-first-shorts/templates/video_template.txt +1 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/analyze_music.py +41 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/asr_pick.py +50 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/fill.py +61 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/heavy.sh +25 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/imagegen_runner.py +128 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/ip_guard.py +54 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/keyer.py +199 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/matte.sh +65 -0
- package/packs/image-first-shorts/skills/image-first-shorts/tools/matte_queue.sh +34 -0
- package/packs/release-ops/README.md +18 -0
- package/packs/release-ops/policy.yaml +26 -0
- package/packs/semiconductor-process-public/content/glossary.md +8 -0
- package/packs/semiconductor-process-public/content/process-overview.md +15 -0
- package/packs/semiconductor-process-public/content/public-source-check.md +8 -0
- package/packs/semiconductor-process-public/content/questions.md +5 -0
- package/packs/semiconductor-process-public/knowledge-pack.json +31 -0
- package/packs/video-broll/.codex-plugin/plugin.json +12 -0
- package/packs/video-broll/plugin.json +18 -0
- package/packs/video-explainer/.codex-plugin/plugin.json +12 -0
- package/packs/video-explainer/README.md +37 -0
- package/packs/video-explainer/nodes/explainer.yaml +17 -0
- package/packs/video-explainer/nodes/field-reel.yaml +17 -0
- package/packs/video-explainer/plugin.json +21 -0
- package/packs/web-publish/.codex-plugin/plugin.json +12 -0
- package/packs/web-publish/LICENSE +24 -0
- package/packs/web-publish/README.md +77 -0
- package/packs/web-publish/SOURCE.md +70 -0
- package/packs/web-publish/examples/input.json +9 -0
- package/packs/web-publish/graphs/recipes.yaml +72 -0
- package/packs/web-publish/graphs/run-step.ts +618 -0
- package/packs/web-publish/graphs/web-publish.yaml +157 -0
- package/packs/web-publish/nodes/web-publish.yaml +18 -0
- package/packs/web-publish/plugin.json +42 -0
- package/packs/web-publish/skills/business-motion-websites/SKILL.md +104 -0
- package/packs/web-publish/skills/business-motion-websites/agents/openai.yaml +5 -0
- package/packs/web-publish/skills/business-motion-websites/assets/project-brief.md +70 -0
- package/packs/web-publish/skills/business-motion-websites/examples/evas.md +17 -0
- package/packs/web-publish/skills/business-motion-websites/references/art-direction.md +59 -0
- package/packs/web-publish/skills/business-motion-websites/references/business-content.md +77 -0
- package/packs/web-publish/skills/business-motion-websites/references/media-production.md +130 -0
- package/packs/web-publish/skills/business-motion-websites/references/scroll-and-mobile.md +80 -0
- package/packs/web-publish/skills/business-motion-websites/references/verification-and-release.md +73 -0
- package/packs/web-publish/skills/business-motion-websites/scripts/audit-media.mjs +181 -0
- package/plugins/cloud-burst/README.md +7 -0
- package/plugins/cloud-burst/mock-runtime.ts +62 -0
- package/plugins/cloud-burst/plugin.json +17 -0
- package/plugins/cloud-burst/plugin.ts +103 -0
- package/plugins/cloud-burst/runtime-types.ts +7 -0
- package/plugins/cloud-burst/service.ts +147 -0
- package/scripts/install-doctor-result.ts +25 -0
- package/scripts/install.sh +144 -75
- package/scripts/land-enqueue.test.sh +60 -0
- package/scripts/release-loop/auto-approve-node.ts +7 -3
- package/scripts/release-loop/fixtures/gate-verdict-0.2.46.json +148 -0
- package/scripts/release-loop/gate-node.ts +74 -7
- package/scripts/release-loop/gate-shard-dispatch.ts +3 -2
- package/scripts/release-loop/gate-shard-receipts.ts +4 -0
- package/scripts/release-loop/known-issues-node.ts +31 -13
- package/scripts/release-loop/publish-node.ts +7 -1
- package/scripts/release-loop/resume-release.ts +32 -6
- package/scripts/release-loop/resume.ts +22 -3
- package/scripts/ux/demo-rehearsal.ts +45 -12
- package/scripts/ux-sim-merge-driver.mjs +187 -0
- package/scripts/warm-pool-provider-config.ts +76 -6
- package/scripts/zero-sim-world.sh +81 -0
- package/src/acp/core-turn-bridge.ts +4 -10
- package/src/agent/agent-output-tool.ts +33 -10
- package/src/agent/terminal-surface.ts +248 -3
- package/src/agent-mission/driver.ts +18 -7
- package/src/agent-substrate/pr-reviewer.ts +55 -1
- package/src/agent-substrate/self-review-cli.ts +246 -23
- package/src/cli/codex-device-login-wait.ts +103 -0
- package/src/cli/control-cli.ts +3 -0
- package/src/cli/doctor-cli.ts +14 -4
- package/src/cli/doctor-fix.ts +76 -13
- package/src/cli/fleet-cli.ts +18 -0
- package/src/cli/ingest-token-cli.ts +1 -1
- package/src/cli/intake-cli.ts +28 -4
- package/src/cli/intake-source-cli.ts +20 -4
- package/src/cli/log-federation-cli.ts +29 -0
- package/src/cli/logs-cli.ts +12 -3
- package/src/cli/plugin-cli.ts +82 -0
- package/src/cli/pr-land-overlap-evidence.ts +82 -22
- package/src/cli/release-cli.ts +13 -5
- package/src/cli/remote-eln-pty.ts +15 -1
- package/src/cli/secret-cli.test-helpers.ts +25 -0
- package/src/cli/secret-cli.ts +172 -0
- package/src/cli/self-update.ts +1 -1
- package/src/cli/setup-cli.ts +3 -14
- package/src/cli/sim-cli.ts +30 -3
- package/src/cli/train-throughput.ts +71 -0
- package/src/context-bus/context-day.ts +60 -11
- package/src/context-bus/external-events.ts +2 -2
- package/src/control-plane/ledger.ts +1 -1
- package/src/core-turn/run-goal-loop.ts +77 -35
- package/src/core-turn/seat-turn-cap.ts +8 -8
- package/src/core-turn/short-question.ts +27 -4
- package/src/dashboard/classic-sidetab-mission-job.ts +47 -5
- package/src/dashboard/classic-sidetab-mission-pair.ts +20 -7
- package/src/dashboard/classic-sidetab-mission-reconcile.ts +212 -0
- package/src/dashboard/classic-sidetab-mission.ts +61 -10
- package/src/dashboard/first-screen-band.ts +2 -2
- package/src/dashboard/input/chat-main-plain-turn-runtime.ts +5 -4
- package/src/dashboard/input/goal-continue.ts +10 -0
- package/src/domains/schedule-manage-tool.ts +1 -1
- package/src/ensure-bin-path.ts +5 -1
- package/src/fleet/burst-auto-wire-ladder.ts +34 -0
- package/src/fleet/burst-auto-within-budget.ts +108 -0
- package/src/fleet/burst-ready-ladder.ts +64 -0
- package/src/fleet/host-doctor.ts +74 -3
- package/src/fleet/resource-inventory.ts +154 -0
- package/src/git-fs/worktree.ts +40 -16
- package/src/graph-runner/runner.ts +7 -6
- package/src/harness/dispatch-backpressure.ts +74 -6
- package/src/harness/harness-cli-command.ts +35 -10
- package/src/index.ts +64 -38
- package/src/intake-plane/actions.ts +19 -7
- package/src/intake-plane/digest.ts +30 -7
- package/src/intake-plane/intake-sources.ts +92 -3
- package/src/intake-plane/items.ts +13 -0
- package/src/intake-plane/linear-wish.ts +24 -1
- package/src/machines/machine-ledger.ts +7 -1
- package/src/maturity/feature-maturity.ts +2 -2
- package/src/mss/logging/log-federation.ts +334 -0
- package/src/mss/logging/log-store.ts +16 -7
- package/src/nexus/api/harness-api.ts +16 -6
- package/src/nexus/api/harness-traversal.ts +78 -5
- package/src/nexus/api/http-server.ts +22 -0
- package/src/nexus/api/ops-api.ts +63 -1
- package/src/nexus/api/public-routes.ts +14 -0
- package/src/nexus/api/resource-ledger.ts +25 -2
- package/src/nexus/api/train-throughput.ts +228 -0
- package/src/nexus/api/ux-sim-devices.ts +35 -4
- package/src/nexus/index.ts +2 -0
- package/src/onboarding/summary.ts +2 -0
- package/src/onboarding/web-first.ts +66 -33
- package/src/plugins/install/plugin-grounding.ts +233 -0
- package/src/release-loop/gate-host-reservation.ts +14 -8
- package/src/repl/index.ts +8 -1
- package/src/resource-ledger/machine-pool-inventory.ts +81 -0
- package/src/resource-ledger/resource-ledger.ts +64 -7
- package/src/self-dev/dev-pipeline.ts +31 -4
- package/src/self-dev/launch-preflight.ts +10 -4
- package/src/self-dev/orchestrate-cli.ts +7 -0
- package/src/self-dev/run-supervisor.ts +26 -9
- package/src/self-implement/fixtures/structural-red-default-reexport.fixture.mjs +3 -0
- package/src/self-implement/fixtures/structural-red-export-star.fixture.mjs +3 -0
- package/src/self-implement/fixtures/structural-red-named-export.fixture.mjs +3 -0
- package/src/self-implement/gate-remote.ts +63 -10
- package/src/self-implement/merge-train.ts +12 -1
- package/src/self-implement/off-diff-evidence.ts +223 -3
- package/src/self-implement/orchestrator.ts +33 -2
- package/src/self-implement/run-step-projection.ts +18 -4
- package/src/session/chat.ts +29 -2
- package/src/session/session-start.ts +17 -2
- package/src/session-runtime/index.ts +1 -1
- package/src/sim-world-device-catalogs.json +182 -0
- package/src/task-orchestrator/surfaces/gate-pod-pool-policy.ts +169 -21
- package/src/task-orchestrator/surfaces/pod-ledger-events.ts +194 -12
- package/src/task-orchestrator/surfaces/pod-pool.ts +55 -4
- package/src/task-orchestrator/surfaces/pod-warm-worker-provider.ts +21 -6
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +40 -5
- package/src/tool-runtime/agent-output-runtime.ts +1 -1
- package/src/tui/entry.ts +46 -23
- package/src/tui-client/local-chat-turn.ts +9 -2
- package/src/user-config.ts +4 -0
- package/src/ux-sim/aside-feedback-loop.ts +181 -0
- package/src/ux-sim/burst-ready-ladder-sim.ts +225 -0
- package/src/ux-sim/fake-cloud-vm.ts +15 -1
- package/src/ux-sim/graph-runtime-overlay-event-path-worker.ts +33 -8
- package/src/ux-sim/graph-runtime-overlay-event-path.ts +27 -5
- package/src/ux-sim/grid-chaos-driver.ts +15 -8
- package/src/ux-sim/in-process-cli.ts +1 -1
- package/src/ux-sim/mock-device-requests.ts +189 -0
- package/src/ux-sim/mock-scenario-catalog.json +2932 -97
- package/src/ux-sim/mock-scenario-catalog.ts +82 -0
- package/src/ux-sim/next-tui-seat-scenarios.ts +52 -4
- package/src/ux-sim/release-sim-rig.ts +298 -7
- package/src/ux-sim/scenario.ts +33 -7
- package/src/ux-sim/service-key-setup.ts +37 -2
- package/src/ux-sim/warm-pool-reuse-sim.ts +80 -7
- package/src/ux-sim/world-store.ts +99 -6
- package/src/version/packed-revision.json +1 -1
- package/src/workflow-runtime/triggers/scheduler.ts +4 -4
- package/apps/pwa/out/_next/static/chunks/05181998.4f8efaf00572ba3b.js +0 -122
- package/apps/pwa/out/_next/static/chunks/1100-c0c1d80f649e121b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/113.80a933f7c75c98f4.js +0 -24
- package/apps/pwa/out/_next/static/chunks/1170.2b91e0702fae25c2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/120-0c4a26e7eedc1bb9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1279.d5c20b1a56b736bf.js +0 -149
- package/apps/pwa/out/_next/static/chunks/1372.9db49566ed0e4c02.js +0 -104
- package/apps/pwa/out/_next/static/chunks/1449-4665277ec241284f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1473.ac3cee48c1d82bc6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1510.7b4ce4032d06097c.js +0 -148
- package/apps/pwa/out/_next/static/chunks/1728-d9808a0d6be6aa40.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2021.7d4dfac25daed3bc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2128.368c63f8816ffc35.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2272-2179b64be6512dcf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2282-7f396efa367b707d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2313.444bed0db65aadb0.js +0 -77
- package/apps/pwa/out/_next/static/chunks/2408-017e04049c99038f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2433.1108dd9eb7f009c0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2474-ce5b82a664d581f2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2532.376ea6de59f7c4f0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/256.2a8e008d30947074.js +0 -1
- package/apps/pwa/out/_next/static/chunks/27.a383feedd4b99367.js +0 -74
- package/apps/pwa/out/_next/static/chunks/279-9a8b620470792271.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2831-6d9d315a32b98961.js +0 -1
- package/apps/pwa/out/_next/static/chunks/292.06ca375a02c7830b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2955-056d5f1facf64dd7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2979-9c9f85d058367133.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2993.e25197cd7fb4e2e5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/29a68040.431a2da0564d7724.js +0 -1
- package/apps/pwa/out/_next/static/chunks/314-db68d7268a1f99aa.js +0 -1
- package/apps/pwa/out/_next/static/chunks/316.76984e210cf33c21.js +0 -62
- package/apps/pwa/out/_next/static/chunks/3255-80f60feecd5db880.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3271.938bf60213f6cd17.js +0 -8
- package/apps/pwa/out/_next/static/chunks/3325-9699faf5a5294830.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3418-f1ea6c6c710d5b94.js +0 -1
- package/apps/pwa/out/_next/static/chunks/342.050ac4b1738dfa5c.js +0 -94
- package/apps/pwa/out/_next/static/chunks/3545-5642d5df0667bcac.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3615-322e67bfc3b6907e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3805-5c39a4bf5012fe86.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3892.b8cde90082048d8c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3900.b581090764d62bfb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3907.097fcec8956b021d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4110.8f14b59381558d7d.js +0 -32
- package/apps/pwa/out/_next/static/chunks/422.33fde3dd808ec96d.js +0 -115
- package/apps/pwa/out/_next/static/chunks/4512-11a489cb5444ef52.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4537-2c8089e830054a19.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4548-afc498c924849db3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4588.3b7994fe28615549.js +0 -23
- package/apps/pwa/out/_next/static/chunks/4621-dcc3be02b7262bbe.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4680-53705a02f53bd359.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4705-16e4a3603923253d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4731.460c7a05f812951a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4818.6fdc817b8b12788a.js +0 -64
- package/apps/pwa/out/_next/static/chunks/4875-dbc3d55494aa15bb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4890-100ef7fd2852528a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/497.e875b212a877dc91.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5106-1d9854b2e07d263b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5136.062e5b4ac043384f.js +0 -90
- package/apps/pwa/out/_next/static/chunks/5190.7cb2cf1274606639.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5290.80a8cd7d37adf0b4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/543.67803b0449dc628e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5464-f8193c7ae973d9d1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5501.43770a36d11760e4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5672.2616c24baee6bb2f.js +0 -34
- package/apps/pwa/out/_next/static/chunks/5745-8a56d7701139e416.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5757.eae58c9553985765.js +0 -79
- package/apps/pwa/out/_next/static/chunks/5848-9c1a3b9533bd0031.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6250.7667f92b4d4465fb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6312.11884f8b6fc01317.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6610-f0510f329e6c15e8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6840.046ad6790da728d9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6851.700470acf99ed58b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7134.373f7059f13a9ea9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7216.dc82684f78870505.js +0 -2
- package/apps/pwa/out/_next/static/chunks/7385.23cc541c89c2fa98.js +0 -286
- package/apps/pwa/out/_next/static/chunks/7746.17ee8fc1f87b774f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7763.a7579952c4e6f1b4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8045.a714469921e805dd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8073.57b55743909e9013.js +0 -93
- package/apps/pwa/out/_next/static/chunks/8126.e5237d43a372cf65.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8269-782b63932e10a2ae.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8385-931a72cc6864b91f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8541-6801e6237710c920.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8572.c425a14dcf1ffeb0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/867-2d1e981b0167c29a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8723.ca926aacbbf3ac7f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8747.eeb006b94dad5759.js +0 -41
- package/apps/pwa/out/_next/static/chunks/895.5f73e50705fe1830.js +0 -226
- package/apps/pwa/out/_next/static/chunks/8993.bbf6810d7afa70bf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9066.629ebf156fcd2ab1.js +0 -27
- package/apps/pwa/out/_next/static/chunks/9133-06cf65777241d447.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9160.83b3cab34166c934.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9397.b3fbfb372280934a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9605.c828819da413e8e0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9635.f8d12ec73885ac29.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9828.e6e68b558c521de6.js +0 -24
- package/apps/pwa/out/_next/static/chunks/9893.7a7b6edae64e8ead.js +0 -36
- package/apps/pwa/out/_next/static/chunks/9a51175e.fccb3ff43e50adbc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-bedb21eab48baf18.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-07762315735dd0b2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-03f85a9f0a258ea8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-e845d6c10f91d76b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-00f6e3c7a80a9bce.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-971a0c0861b98018.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-651d5b7636a46cf6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-d02ad543024d8341.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-bb376bd8355baae6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/decisions/page-28c4bec75794d1bd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-2123da599d50838a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-2955f93723dcc402.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-9223ba698a2a0188.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-e81094cf3567e2f2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-bedb21eab48baf18.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-7d654302ac3b3a4e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-2bc02d4bee167db4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-617df2f350b6d863.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-499ad36f9c8d105c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-09acff44586be1c2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/loops/page-5c18c95a9bd1c524.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-b7e45df4c89eda9d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-9bd9e634f324e2d8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-76d702791c75b6f5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-89cdfe958d836563.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-65718fff9f43051d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-a0d5bffbf9203c00.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-9890ca9c1b120cf1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-bb9cf5e9622532a0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-44dfa774fa7c5533.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-93c8c51d77053d35.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-716bdba6d2ad3fcd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-0f04eeda9894b67d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-41e8ba9c4feab48e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-eedf8d31ba99ca9f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-bedb21eab48baf18.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-241ed1c971bfa1ac.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-93e2ce2a6e871642.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-561cf4fce14c622c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-b71cab2d1ba15c2c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-f86e352129f64ac6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-5b0bd68768085bdb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-a6003c82802c5e93.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-122887bd22818e86.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-a5e2267da13cac6d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-abac2741a74c7e0f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-cc3091a30e35cbde.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-1b5ef5aad6c1eefc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/e866a15a.97493b74d66f48b3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-52efbeade0c028ac.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-365b194cc7ba42f7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-dc781b21621cd6de.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-c69e53f764eae97b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-bd8106d7e595dfc3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-e3f77df212a70fcb.js +0 -1
- package/apps/pwa/out/_next/static/css/700f225938e9488f.css +0 -1
- /package/apps/pwa/out/_next/static/{fMFwB4C7VwMRiuFGZdGVs → 98VlBaYvL-VVnCq93_lFS}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import { execFileSync } from 'node:child_process';
|
|
3
3
|
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
@@ -19,11 +19,15 @@ export interface RegisteredIntakeSource {
|
|
|
19
19
|
scheduleCron?: string;
|
|
20
20
|
until?: string;
|
|
21
21
|
why?: string;
|
|
22
|
+
/** Explicit owner marker for entries reconciled from user-configured starter topics. */
|
|
23
|
+
managedBy?: 'starter.topics';
|
|
22
24
|
/** Existing Linear secretary issue identifier; absent for ordinary sources. */
|
|
23
25
|
issueRef?: string;
|
|
24
26
|
/** Parent Linear issue UUID; never replace with the display identifier. */
|
|
25
27
|
linearIssueId?: string;
|
|
26
28
|
lastRunAt?: string;
|
|
29
|
+
lastSourceCount?: number;
|
|
30
|
+
briefingTopic?: string;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
export function canonicalSeat(value: string): string {
|
|
@@ -58,6 +62,19 @@ export function sourceIsDue(source: RegisteredIntakeSource, now: Date): boolean
|
|
|
58
62
|
|
|
59
63
|
export function sourcesFile(stateDir: string): string { return join(stateDir, 'intake', 'sources.json'); }
|
|
60
64
|
|
|
65
|
+
function starterRssId(topic: string): string {
|
|
66
|
+
return `starter-rss-${createHash('sha256').update(topic.toLowerCase()).digest('hex').slice(0, 12)}`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Ownership requires an explicit marker; an ID, URL, or free-form reason alone never proves ownership.
|
|
71
|
+
* Prior main versions registered starter topics only as `watch-*` GitHub sources, never as RSS. A markerless
|
|
72
|
+
* `starter-rss-*` row is therefore an unrelated/manual RSS source and must not be migrated or removed by inference.
|
|
73
|
+
*/
|
|
74
|
+
export function isManagedStarterTopicRssSource(source: RegisteredIntakeSource): boolean {
|
|
75
|
+
return source.managedBy === 'starter.topics' && source.id.startsWith('starter-rss-') && source.kind === 'rss';
|
|
76
|
+
}
|
|
77
|
+
|
|
61
78
|
function readSources(stateDir: string): RegisteredIntakeSource[] {
|
|
62
79
|
const file = sourcesFile(stateDir);
|
|
63
80
|
if (!existsSync(file)) return [];
|
|
@@ -126,6 +143,37 @@ export function listSources(filter: { seat?: string } = {}, stateDir = effective
|
|
|
126
143
|
return readSources(stateDir).filter((source) => seat === undefined || source.seat === seat);
|
|
127
144
|
}
|
|
128
145
|
|
|
146
|
+
/** Keep the recurring user briefing's RSS source derived from the configured topic. */
|
|
147
|
+
export function syncBriefingTopicSource(topic: string | undefined, stateDir = effectiveInstanceRoot()): RegisteredIntakeSource | undefined {
|
|
148
|
+
const normalized = topic?.trim();
|
|
149
|
+
const id = 'intake-briefing-topic-config';
|
|
150
|
+
if (!normalized) {
|
|
151
|
+
removeSource(id, stateDir);
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
154
|
+
const topicParts = normalized.replace(/^\d{4}\s*사업계획\s*[::]?\s*/, '').split(/[·,]/).map((part) => part.trim()).filter(Boolean);
|
|
155
|
+
const anchorTerms = topicParts.slice(0, 2).map((part) => part.split(/\s+/)[0]!).filter((term) => term.length > 1);
|
|
156
|
+
const impactTerms = topicParts.slice(1).flatMap((part, index) => {
|
|
157
|
+
const tail = index === 0 && /이후/.test(part) ? part.split(/이후/).slice(1).join(' ') : part;
|
|
158
|
+
return tail.split(/\s+/).filter((term) => term.length > 1 && term !== '이후');
|
|
159
|
+
});
|
|
160
|
+
const scopedQueries = anchorTerms.length >= 2 && impactTerms.length
|
|
161
|
+
? [...new Set(anchorTerms.flatMap((anchor) => impactTerms.map((impact) => `${anchor} ${impact}`)))]
|
|
162
|
+
: [...new Set(topicParts.flatMap((part) => part.split(/\s+/).filter((term) => term.length > 1 && term !== '이후')))];
|
|
163
|
+
const query = scopedQueries.length ? scopedQueries.join(' OR ') : normalized;
|
|
164
|
+
const source: RegisteredIntakeSource = {
|
|
165
|
+
id, seat: 'user', kind: 'rss',
|
|
166
|
+
spec: `https://news.google.com/rss/search?q=${encodeURIComponent(query)}&hl=ko&gl=KR&ceid=KR%3Ako`,
|
|
167
|
+
every: '1d', why: 'intake.briefingTopic', briefingTopic: normalized,
|
|
168
|
+
};
|
|
169
|
+
const sources = readSources(stateDir);
|
|
170
|
+
const existing = sources.find((entry) => entry.id === id);
|
|
171
|
+
if (existing && existing.seat === source.seat && existing.kind === source.kind && existing.spec === source.spec
|
|
172
|
+
&& existing.every === source.every && existing.why === source.why && existing.briefingTopic === source.briefingTopic) return existing;
|
|
173
|
+
saveSources(stateDir, [...sources.filter((entry) => entry.id !== id), source]);
|
|
174
|
+
return source;
|
|
175
|
+
}
|
|
176
|
+
|
|
129
177
|
export function removeSource(id: string, stateDir = effectiveInstanceRoot()): boolean {
|
|
130
178
|
const sources = readSources(stateDir);
|
|
131
179
|
if (!sources.some((source) => source.id === id)) return false;
|
|
@@ -133,6 +181,38 @@ export function removeSource(id: string, stateDir = effectiveInstanceRoot()): bo
|
|
|
133
181
|
return true;
|
|
134
182
|
}
|
|
135
183
|
|
|
184
|
+
/** Keep configured starter topics represented as stable RSS sources. Only this function owns `starter-rss-*` entries. */
|
|
185
|
+
export function syncStarterTopicRssSources(topics: readonly string[] | undefined, stateDir = effectiveInstanceRoot(), options: { dryRun?: boolean } = {}): RegisteredIntakeSource[] {
|
|
186
|
+
const normalized = [...new Map((topics ?? []).map((topic) => topic.trim()).filter(Boolean)
|
|
187
|
+
.map((topic) => [topic.toLowerCase(), topic])).values()];
|
|
188
|
+
const managedPrefix = 'starter-rss-';
|
|
189
|
+
const existing = readSources(stateDir);
|
|
190
|
+
const byId = new Map(existing.map((source) => [source.id, source]));
|
|
191
|
+
const usedIds = new Set(existing.filter((source) => !isManagedStarterTopicRssSource(source)).map((source) => source.id));
|
|
192
|
+
const desired = normalized.map((topic): RegisteredIntakeSource => {
|
|
193
|
+
const baseId = starterRssId(topic);
|
|
194
|
+
let id = baseId;
|
|
195
|
+
for (let suffix = 2; usedIds.has(id); suffix += 1) id = `${baseId}-${suffix}`;
|
|
196
|
+
usedIds.add(id);
|
|
197
|
+
const prior = byId.get(id);
|
|
198
|
+
const feed = new URL('https://news.google.com/rss/search');
|
|
199
|
+
feed.searchParams.set('q', topic);
|
|
200
|
+
feed.searchParams.set('hl', 'en-US');
|
|
201
|
+
feed.searchParams.set('gl', 'US');
|
|
202
|
+
feed.searchParams.set('ceid', 'US:en');
|
|
203
|
+
return { id, seat: 'user', kind: 'rss', spec: feed.toString(), every: '1d', why: 'starter.topics', managedBy: 'starter.topics',
|
|
204
|
+
...(prior?.lastRunAt ? { lastRunAt: prior.lastRunAt } : {}) };
|
|
205
|
+
});
|
|
206
|
+
const next = [
|
|
207
|
+
...existing.filter((source) => !isManagedStarterTopicRssSource(source)
|
|
208
|
+
&& !(source.id.startsWith('watch-') && source.kind === 'github-query' && source.why === 'starter.topics')),
|
|
209
|
+
...desired,
|
|
210
|
+
];
|
|
211
|
+
const changed = existing.length !== next.length || next.some((source, index) => JSON.stringify(source) !== JSON.stringify(existing[index]));
|
|
212
|
+
if (changed && !options.dryRun) saveSources(stateDir, next);
|
|
213
|
+
return desired;
|
|
214
|
+
}
|
|
215
|
+
|
|
136
216
|
export function dueSources(now: Date = new Date(), stateDir = effectiveInstanceRoot(), sourceId?: string): RegisteredIntakeSource[] {
|
|
137
217
|
return listSources({}, stateDir).filter((source) => (sourceId === undefined || source.id === sourceId)
|
|
138
218
|
&& (sourceId !== undefined && source.kind === 'topic-search'
|
|
@@ -196,7 +276,10 @@ export function parseFeed(xml: string): RawIntakeItem[] {
|
|
|
196
276
|
return entries.map((entry) => {
|
|
197
277
|
const field = (name: string): string => xmlText(entry.match(new RegExp(`<${name}\\b[^>]*>([\\s\\S]*?)<\\/${name}>`, 'i'))?.[1] ?? '');
|
|
198
278
|
const link = entry.match(/<link\b[^>]*\bhref=["']([^"']+)["'][^>]*\/?\s*>/i)?.[1] ?? field('link');
|
|
199
|
-
|
|
279
|
+
const publisher = entry.match(/<source\b[^>]*>([\s\S]*?)<\/source>/i)?.[1];
|
|
280
|
+
const publisherUrl = entry.match(/<source\b[^>]*\burl=["']([^"']+)["']/i)?.[1];
|
|
281
|
+
return { url: xmlText(link), title: field('title'), text: field('description') || field('summary') || field('content'), kind: 'rss' as const,
|
|
282
|
+
...(publisher ? { publisher: xmlText(publisher) } : publisherUrl ? { publisher: publisherUrl } : {}) };
|
|
200
283
|
}).filter((entry) => !!entry.url);
|
|
201
284
|
}
|
|
202
285
|
|
|
@@ -244,7 +327,12 @@ export async function runDue({ now = new Date(), seat, sourceId, deps = {} }: {
|
|
|
244
327
|
intakeSource = 'command';
|
|
245
328
|
}
|
|
246
329
|
raws = raws.map((raw) => ({ ...raw, seat: source.seat,
|
|
330
|
+
...(source.briefingTopic ? { briefingTopic: source.briefingTopic } : {}),
|
|
247
331
|
...(source.kind === 'topic-search' && source.linearIssueId ? { linearIssueId: source.linearIssueId } : {}) }));
|
|
332
|
+
const publishers = new Set(raws.map((raw) => {
|
|
333
|
+
if (raw.publisher?.trim()) return raw.publisher.trim().toLowerCase();
|
|
334
|
+
try { return new URL(raw.url!).hostname.toLowerCase().replace(/^www\./, ''); } catch { return undefined; }
|
|
335
|
+
}).filter((host): host is string => !!host));
|
|
248
336
|
const items = (deps.ingest ?? ingestIntakeItems)(stateDir, intakeSource, raws, now.toISOString()).shaped;
|
|
249
337
|
if (source.kind === 'topic-search') await addTopicBriefItems(stateDir, source, raws, now.toISOString(), deps.addBriefItem);
|
|
250
338
|
await deps.onCollected?.(source, raws, now);
|
|
@@ -263,7 +351,8 @@ export async function runDue({ now = new Date(), seat, sourceId, deps = {} }: {
|
|
|
263
351
|
// A projection failure must remain retryable; advance cadence only after delivery succeeds.
|
|
264
352
|
const current = readSources(stateDir);
|
|
265
353
|
const found = current.find((entry) => entry.id === source.id);
|
|
266
|
-
if (found) saveSources(stateDir, current.map((entry) => entry.id === source.id
|
|
354
|
+
if (found && found.spec === source.spec && found.briefingTopic === source.briefingTopic) saveSources(stateDir, current.map((entry) => entry.id === source.id
|
|
355
|
+
? { ...entry, lastRunAt: now.toISOString(), lastSourceCount: publishers.size } : entry));
|
|
267
356
|
ran.push({ id: source.id, items });
|
|
268
357
|
} catch (error) {
|
|
269
358
|
ran.push({ id: source.id, items: 0, error: error instanceof Error ? error.message : String(error) });
|
|
@@ -21,6 +21,10 @@ export interface IntakeItem {
|
|
|
21
21
|
/** 같은 항목이 다른 입력원에서도 왔으면 여기 모인다 — «두 입력원에서 동시에 뜬 것»이 신호다. */
|
|
22
22
|
sources: (IntakeSource | RegisteredIntakeSourceKind)[];
|
|
23
23
|
seat?: string;
|
|
24
|
+
/** Configured topic identity used to keep successive briefing topics isolated. */
|
|
25
|
+
briefingTopic?: string;
|
|
26
|
+
briefingTopics?: string[];
|
|
27
|
+
publisher?: string;
|
|
24
28
|
/** Parent Linear issue UUID, kept separate from its human-readable identifier. */
|
|
25
29
|
linearIssueId?: string;
|
|
26
30
|
url?: string;
|
|
@@ -41,6 +45,8 @@ export interface IntakeItem {
|
|
|
41
45
|
/** 수집기가 내는 한 줄 — 모양 맞추기 전. */
|
|
42
46
|
export interface RawIntakeItem {
|
|
43
47
|
seat?: string;
|
|
48
|
+
briefingTopic?: string;
|
|
49
|
+
publisher?: string;
|
|
44
50
|
linearIssueId?: string;
|
|
45
51
|
url?: string;
|
|
46
52
|
title?: string;
|
|
@@ -133,6 +139,9 @@ export function shapeIntakeItem(source: IntakeSource | RegisteredIntakeSourceKin
|
|
|
133
139
|
source,
|
|
134
140
|
sources: [source],
|
|
135
141
|
...(seat ? { seat } : {}),
|
|
142
|
+
...(raw.briefingTopic ? { briefingTopic: raw.briefingTopic } : {}),
|
|
143
|
+
...(raw.briefingTopic ? { briefingTopics: [raw.briefingTopic] } : {}),
|
|
144
|
+
...(raw.publisher ? { publisher: raw.publisher } : {}),
|
|
136
145
|
...(raw.linearIssueId ? { linearIssueId: raw.linearIssueId } : {}),
|
|
137
146
|
...(url ? { url } : {}),
|
|
138
147
|
kind: raw.kind ?? kindFor(source, url),
|
|
@@ -201,6 +210,10 @@ export function ingestIntakeItems(instanceRoot: string, source: IntakeSource | R
|
|
|
201
210
|
title: prev.title ?? shaped.title,
|
|
202
211
|
text: prev.text ?? shaped.text,
|
|
203
212
|
linearIssueId: prev.linearIssueId ?? shaped.linearIssueId,
|
|
213
|
+
briefingTopic: shaped.briefingTopic ?? prev.briefingTopic,
|
|
214
|
+
briefingTopics: [...new Set([...(prev.briefingTopics ?? (prev.briefingTopic ? [prev.briefingTopic] : [])),
|
|
215
|
+
...(shaped.briefingTopics ?? (shaped.briefingTopic ? [shaped.briefingTopic] : []))])],
|
|
216
|
+
publisher: shaped.publisher ?? prev.publisher,
|
|
204
217
|
axis: shaped.axis ?? prev.axis,
|
|
205
218
|
judgement: shaped.judgement ?? prev.judgement,
|
|
206
219
|
// 한 번이라도 개인 입력원에서 왔으면 개인으로 남긴다(공개로 풀지 않는다).
|
|
@@ -112,7 +112,30 @@ export function parseLinearSecretaryManifest(description: string, currentIssueId
|
|
|
112
112
|
const end = description.indexOf(MANIFEST_END);
|
|
113
113
|
if (start < 0 || end <= start) return undefined;
|
|
114
114
|
try {
|
|
115
|
-
const
|
|
115
|
+
const raw = description.slice(start + MANIFEST_START.length, end).trim();
|
|
116
|
+
// Linear markdown edits may preserve escaped JSON array delimiters as `\\[` / `\\]`.
|
|
117
|
+
// Normalize only the tasks array boundaries; do not unescape arbitrary manifest text.
|
|
118
|
+
const tasksArray = /"tasks"\s*:\s*\\\[/.exec(raw);
|
|
119
|
+
let json = raw;
|
|
120
|
+
if (tasksArray?.index !== undefined) {
|
|
121
|
+
const open = tasksArray.index + tasksArray[0].lastIndexOf('\\[');
|
|
122
|
+
let inString = false;
|
|
123
|
+
let escaped = false;
|
|
124
|
+
let close = -1;
|
|
125
|
+
for (let index = open + 2; index < raw.length; index++) {
|
|
126
|
+
const char = raw[index]!;
|
|
127
|
+
if (inString) {
|
|
128
|
+
if (escaped) escaped = false;
|
|
129
|
+
else if (char === '\\') escaped = true;
|
|
130
|
+
else if (char === '"') inString = false;
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (char === '"') { inString = true; continue; }
|
|
134
|
+
if (char === '\\' && raw[index + 1] === ']') { close = index; break; }
|
|
135
|
+
}
|
|
136
|
+
if (close >= 0) json = `${raw.slice(0, open)}[${raw.slice(open + 2, close)}]${raw.slice(close + 2)}`;
|
|
137
|
+
}
|
|
138
|
+
const manifest = JSON.parse(json) as Partial<LinearSecretaryManifest>;
|
|
116
139
|
if (typeof manifest.parentIssueId !== 'string' || !manifest.parentIssueId.trim() || !Array.isArray(manifest.tasks) ||
|
|
117
140
|
!manifest.tasks.length || !manifest.tasks.every(task => task && typeof task.issueId === 'string' && task.issueId.trim() && typeof task.title === 'string' && task.title.trim()) ||
|
|
118
141
|
!manifest.tasks.some(task => task.issueId === currentIssueId)) return undefined;
|
|
@@ -36,6 +36,8 @@ export interface MachineLedger {
|
|
|
36
36
|
devices: DeviceRow[];
|
|
37
37
|
rules: string[];
|
|
38
38
|
changes: string[];
|
|
39
|
+
/** Reserved catalog marker in machines.yaml; non-empty pool data needs its own validated schema. */
|
|
40
|
+
pools?: never[];
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export const machineLedgerPath = (root = process.cwd()): string => resolve(root, 'docs/ops/machines.yaml');
|
|
@@ -66,7 +68,10 @@ const list = (value: unknown, label: string): string[] => {
|
|
|
66
68
|
|
|
67
69
|
export function validateMachineLedger(value: unknown): MachineLedger {
|
|
68
70
|
const data = record(value, 'ledger');
|
|
69
|
-
keys(data, ['title', 'policy', 'machines', 'devices', 'rules', 'changes'], 'ledger');
|
|
71
|
+
keys(data, ['title', 'policy', 'machines', 'devices', 'rules', 'changes', 'pools'], 'ledger');
|
|
72
|
+
if (data.pools !== undefined && (!Array.isArray(data.pools) || data.pools.length !== 0)) {
|
|
73
|
+
throw new Error('invalid pools: only the empty reserved catalog is supported');
|
|
74
|
+
}
|
|
70
75
|
if (!Array.isArray(data.machines) || !Array.isArray(data.devices)) throw new Error('invalid machines or devices');
|
|
71
76
|
const ids = new Set<string>();
|
|
72
77
|
const rows = <T extends { id: string }>(entries: unknown[], fields: string[], label: string, extraFields: string[] = []): T[] => entries.map((entry, index) => {
|
|
@@ -102,6 +107,7 @@ export function validateMachineLedger(value: unknown): MachineLedger {
|
|
|
102
107
|
devices: rows<DeviceRow>(data.devices, ['id', 'name', 'status', 'purpose'], 'devices'),
|
|
103
108
|
rules: list(data.rules, 'rules'),
|
|
104
109
|
changes: list(data.changes, 'changes'),
|
|
110
|
+
...(data.pools === undefined ? {} : { pools: [] }),
|
|
105
111
|
};
|
|
106
112
|
}
|
|
107
113
|
|
|
@@ -64,7 +64,7 @@ export const FEATURE_MATURITY = {
|
|
|
64
64
|
where: 'stable', bench: 'beta', shadow: 'beta', llm: 'beta', storage: 'beta', leader: 'beta',
|
|
65
65
|
pod: 'beta', browser: 'beta', questions: 'beta', usage: 'stable', runs: 'beta', live: 'beta',
|
|
66
66
|
research: 'beta', release: 'beta', rfc: 'beta', know: 'beta', life: 'beta', freeze: 'beta', herdr: 'beta', flow: 'beta', seat: 'beta', hq: 'beta', steward: 'beta', coord: 'beta', context: 'beta', 'model-watch': 'beta', doctor: 'stable',
|
|
67
|
-
control: 'beta', resources: 'beta', hooks: 'beta', setup: 'stable', start: 'stable',
|
|
67
|
+
control: 'beta', resources: 'beta', train: 'beta', hooks: 'beta', setup: 'stable', start: 'stable',
|
|
68
68
|
grounding: 'beta', graph: 'beta', loop: 'stable', resource: 'beta', card: 'stable', 'launch-head': 'beta',
|
|
69
69
|
a2a: 'beta', plugin: 'stable', make: 'beta', skills: 'beta', connect: 'beta', import: 'beta',
|
|
70
70
|
persona: 'beta', team: 'beta', 'team-set': 'beta', market: 'beta', directive: 'stable', connector: 'beta', storyboard: 'beta',
|
|
@@ -76,7 +76,7 @@ export const FEATURE_MATURITY = {
|
|
|
76
76
|
loops: 'beta', buzz: 'beta', harness: 'stable', self: 'beta', factcheck: 'beta',
|
|
77
77
|
provider: 'stable', 'provider:set': 'beta', 'provider:restore': 'beta',
|
|
78
78
|
'provider:rotate': 'beta', 'provider:use': 'beta', 'status-bar': 'beta',
|
|
79
|
-
schedule: 'beta', guardian: 'beta', intake: 'beta', logs: 'stable', retro: 'beta', ad: 'beta', docs: 'beta',
|
|
79
|
+
schedule: 'beta', guardian: 'beta', intake: 'beta', logs: 'stable', retro: 'beta', ad: 'beta', docs: 'beta', secret: 'beta',
|
|
80
80
|
decisions: 'beta', directives: 'beta', claims: 'beta', lesson: 'beta', fleet: 'beta', ops: 'stable', outputs: 'beta', publish: 'beta',
|
|
81
81
|
env: 'beta', 'agent-mission': 'beta', mission: 'beta', dev: 'beta', keys: 'beta', finance: 'beta',
|
|
82
82
|
config: 'stable', tasks: 'stable', brief: 'beta', notify: 'beta', away: 'beta', labels: 'beta', msg: 'beta', ask: 'stable',
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, renameSync, writeFileSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
+
import { debug, redactSecrets } from '../../debug/log.js';
|
|
5
|
+
import { getDefaultLogStore, logsDbPath, type LogStoreRow } from './log-store.js';
|
|
6
|
+
import { readLogInstances } from './instance-registry.js';
|
|
7
|
+
import { redactLogRecord } from './redaction.js';
|
|
8
|
+
import type { LogRecord } from './record.js';
|
|
9
|
+
import { matchIngestAuthorization, revokeIngestToken } from '../../nexus/api/ingest-token.js';
|
|
10
|
+
import { acquireLockAsync, withFileLockSync } from '../../storage/file-lock.js';
|
|
11
|
+
|
|
12
|
+
const NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;
|
|
13
|
+
const BATCH_LIMIT = 200;
|
|
14
|
+
const MAX_BATCH_BYTES = 900_000;
|
|
15
|
+
const POLL_MS = 5_000;
|
|
16
|
+
const MAX_BACKOFF_MS = 60_000;
|
|
17
|
+
|
|
18
|
+
type FederationConfig = { instance: string; senderId: string; endpoint: string; tokenFile: string; afterId: number; enabled: boolean };
|
|
19
|
+
const federationDir = () => dirname(logsDbPath());
|
|
20
|
+
const configPath = () => join(federationDir(), 'federation.json');
|
|
21
|
+
const registryPath = () => join(federationDir(), 'federated-instances.json');
|
|
22
|
+
const revocationReceiptsPath = () => join(federationDir(), 'federation-revocations.json');
|
|
23
|
+
const configLockPath = () => `${configPath()}.lock`;
|
|
24
|
+
|
|
25
|
+
function withConfigLock<T>(action: () => T): T {
|
|
26
|
+
mkdirSync(federationDir(), { recursive: true, mode: 0o700 });
|
|
27
|
+
return withFileLockSync(configLockPath(), action);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function withConfigLockAsync<T>(action: (stillHeld: () => boolean) => T | Promise<T>): Promise<T> {
|
|
31
|
+
mkdirSync(federationDir(), { recursive: true, mode: 0o700 });
|
|
32
|
+
const lock = await acquireLockAsync(configLockPath());
|
|
33
|
+
try { return await action(() => lock.stillHeld()); }
|
|
34
|
+
finally { lock.release(); }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function readJsonResponse(response: Response, label: string): Promise<Record<string, unknown>> {
|
|
38
|
+
let value: unknown;
|
|
39
|
+
try { value = await response.json(); } catch { throw new Error(`${label} returned invalid JSON`); }
|
|
40
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) throw new Error(`${label} returned an invalid response`);
|
|
41
|
+
return value as Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function readJson(path: string): unknown {
|
|
45
|
+
try { return JSON.parse(readFileSync(path, 'utf8')); }
|
|
46
|
+
catch (error) { if ((error as NodeJS.ErrnoException).code === 'ENOENT') return null; throw error; }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function writePrivate(path: string, contents: string): void {
|
|
50
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
51
|
+
const temporary = `${path}.${process.pid}.${randomUUID()}.tmp`;
|
|
52
|
+
writeFileSync(temporary, contents, { mode: 0o600 });
|
|
53
|
+
renameSync(temporary, path);
|
|
54
|
+
chmodSync(path, 0o600);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function loadConfig(): FederationConfig | null {
|
|
58
|
+
const parsed = readJson(configPath()) as Partial<FederationConfig> | null;
|
|
59
|
+
if (!parsed) return null;
|
|
60
|
+
if (typeof parsed.instance !== 'string' || !NAME.test(parsed.instance)
|
|
61
|
+
|| typeof parsed.senderId !== 'string' || !parsed.senderId
|
|
62
|
+
|| typeof parsed.endpoint !== 'string' || typeof parsed.tokenFile !== 'string'
|
|
63
|
+
|| !Number.isSafeInteger(parsed.afterId) || Number(parsed.afterId) < 0
|
|
64
|
+
|| (parsed.enabled !== undefined && typeof parsed.enabled !== 'boolean')) {
|
|
65
|
+
throw new Error('invalid log federation configuration');
|
|
66
|
+
}
|
|
67
|
+
return { ...(parsed as FederationConfig), enabled: parsed.enabled !== false };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function normalizeEndpoint(raw: string): string {
|
|
71
|
+
const url = new URL(raw);
|
|
72
|
+
if (url.username || url.password || url.search || url.hash) throw new Error('HQ endpoint must not contain credentials, query, or fragment');
|
|
73
|
+
if (url.pathname !== '/') throw new Error('HQ endpoint must be the Nexus origin without a path prefix');
|
|
74
|
+
const loopback = ['localhost', '127.0.0.1', '::1'].includes(url.hostname);
|
|
75
|
+
if (url.protocol !== 'https:' && !(loopback && url.protocol === 'http:')) throw new Error('HQ federation endpoint requires HTTPS (HTTP is allowed only for loopback tests)');
|
|
76
|
+
return url.origin;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function configureLogFederation(input: { instance: string; endpoint: string; token: string; consent: boolean }): void {
|
|
80
|
+
if (!input.consent) throw new Error('explicit --consent is required to send local logs to HQ');
|
|
81
|
+
if (!NAME.test(input.instance)) throw new Error('invalid federation instance name');
|
|
82
|
+
withConfigLock(() => {
|
|
83
|
+
if (loadConfig()) throw new Error('log federation is already configured; disconnect it before replacing credentials');
|
|
84
|
+
const endpoint = normalizeEndpoint(input.endpoint);
|
|
85
|
+
const token = input.token.trim();
|
|
86
|
+
if (!/^[A-Za-z0-9_-]{32,}$/.test(token)) throw new Error('invalid scoped ingest token');
|
|
87
|
+
const tokenFile = join(federationDir(), `federation-${input.instance}.token`);
|
|
88
|
+
if (existsSync(tokenFile)) throw new Error('a federation token file already exists; inspect or revoke it before reconnecting');
|
|
89
|
+
writePrivate(tokenFile, token);
|
|
90
|
+
try {
|
|
91
|
+
writePrivate(configPath(), JSON.stringify({ instance: input.instance, senderId: randomUUID(), endpoint, tokenFile, afterId: 0, enabled: true } satisfies FederationConfig, null, 2) + '\n');
|
|
92
|
+
} catch (error) {
|
|
93
|
+
unlinkSync(tokenFile);
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export async function disconnectLogFederation(fetcher: typeof fetch = fetch): Promise<string | null> {
|
|
100
|
+
const config = await withConfigLockAsync((stillHeld) => {
|
|
101
|
+
const current = loadConfig();
|
|
102
|
+
if (!current) return null;
|
|
103
|
+
if (current.enabled) {
|
|
104
|
+
if (!stillHeld()) throw new Error('federation configuration lock was lost before pause');
|
|
105
|
+
writePrivate(configPath(), JSON.stringify({ ...current, enabled: false }, null, 2) + '\n');
|
|
106
|
+
}
|
|
107
|
+
return current;
|
|
108
|
+
});
|
|
109
|
+
if (!config) return null;
|
|
110
|
+
const stat = lstatSync(config.tokenFile);
|
|
111
|
+
if (!stat.isFile() || (stat.mode & 0o077) !== 0) throw new Error('local federation is paused; token file must be a private regular file');
|
|
112
|
+
const token = readFileSync(config.tokenFile, 'utf8').trim();
|
|
113
|
+
let response: Response;
|
|
114
|
+
try {
|
|
115
|
+
response = await fetcher(`${config.endpoint}/v1/log-federation/revoke`, {
|
|
116
|
+
method: 'POST', headers: { authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(10_000), redirect: 'error',
|
|
117
|
+
});
|
|
118
|
+
} catch (error) {
|
|
119
|
+
throw new Error(`local federation is paused; HQ revoke is pending: ${error instanceof Error ? error.message : String(error)}`);
|
|
120
|
+
}
|
|
121
|
+
if (!response.ok) throw new Error(`local federation is paused; HQ revoke is pending (HTTP ${response.status})`);
|
|
122
|
+
const receipt = await readJsonResponse(response, 'HQ revoke');
|
|
123
|
+
if (receipt.ok !== true || receipt.revoked !== config.instance) {
|
|
124
|
+
throw new Error('local federation is paused; HQ revoke response did not confirm the expected instance');
|
|
125
|
+
}
|
|
126
|
+
await withConfigLockAsync((stillHeld) => {
|
|
127
|
+
const current = loadConfig();
|
|
128
|
+
if (!current) return;
|
|
129
|
+
if (current.senderId !== config.senderId || current.instance !== config.instance || current.tokenFile !== config.tokenFile || current.enabled) {
|
|
130
|
+
throw new Error('local federation is paused; configuration changed before revoke cleanup');
|
|
131
|
+
}
|
|
132
|
+
if (!stillHeld()) throw new Error('federation configuration lock was lost before revoke cleanup');
|
|
133
|
+
unlinkSync(config.tokenFile);
|
|
134
|
+
unlinkSync(configPath());
|
|
135
|
+
});
|
|
136
|
+
return config.instance;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function readLogFederationStatus(): Omit<FederationConfig, 'tokenFile'> | null {
|
|
140
|
+
const config = loadConfig();
|
|
141
|
+
if (!config) return null;
|
|
142
|
+
return { instance: config.instance, senderId: config.senderId, endpoint: config.endpoint, afterId: config.afterId, enabled: config.enabled };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function readFederatedLogInstances(): string[] {
|
|
146
|
+
const parsed = readJson(registryPath()) as { instances?: unknown } | null;
|
|
147
|
+
if (!parsed || !Array.isArray(parsed.instances)) return [];
|
|
148
|
+
return parsed.instances.filter((name): name is string => typeof name === 'string' && NAME.test(name));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function registerFederatedLogInstance(instance: string): void {
|
|
152
|
+
if (!NAME.test(instance)) throw new Error('invalid federation instance name');
|
|
153
|
+
const names = new Set(readFederatedLogInstances());
|
|
154
|
+
names.add(instance);
|
|
155
|
+
writePrivate(registryPath(), JSON.stringify({ instances: [...names].sort() }, null, 2) + '\n');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function redactFederatedRecord(record: LogRecord): LogRecord {
|
|
159
|
+
return scrubUserPaths(redactSecrets(redactLogRecord(record))) as LogRecord;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function rowToRecord(row: LogStoreRow): LogRecord {
|
|
163
|
+
let data: unknown;
|
|
164
|
+
if (row.data !== null) { try { data = JSON.parse(row.data); } catch { data = row.data; } }
|
|
165
|
+
return {
|
|
166
|
+
ts: row.ts, level: row.level as LogRecord['level'], category: row.category, event: row.event,
|
|
167
|
+
...(data !== undefined ? { data } : {}),
|
|
168
|
+
...(row.session_id ? { session_id: row.session_id } : {}),
|
|
169
|
+
...(row.trace_id ? { trace_id: row.trace_id } : {}),
|
|
170
|
+
...(row.host_id ? { host_id: row.host_id } : {}),
|
|
171
|
+
source: { platform: row.surface },
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** The local logs.db is the durable spool. The cursor advances only after HQ commits the batch. */
|
|
176
|
+
export function registerLogFederationWorker(opts: { fetcher?: typeof fetch; pollMs?: number; retryBaseMs?: number; store?: () => ReturnType<typeof getDefaultLogStore> } = {}): () => void {
|
|
177
|
+
const fetcher = opts.fetcher ?? fetch;
|
|
178
|
+
let running = false;
|
|
179
|
+
let stopped = false;
|
|
180
|
+
let retryAt = 0;
|
|
181
|
+
let failures = 0;
|
|
182
|
+
const pump = async (): Promise<void> => {
|
|
183
|
+
if (running || stopped || Date.now() < retryAt) return;
|
|
184
|
+
let config: FederationConfig | null;
|
|
185
|
+
let store: ReturnType<typeof getDefaultLogStore>;
|
|
186
|
+
try {
|
|
187
|
+
config = loadConfig();
|
|
188
|
+
if (!config || !config.enabled) return;
|
|
189
|
+
store = (opts.store ?? getDefaultLogStore)();
|
|
190
|
+
if (!store) return;
|
|
191
|
+
} catch (error) {
|
|
192
|
+
debug.log('logs.federate', 'configuration-error', { reason: error instanceof Error ? error.message : String(error) });
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
running = true;
|
|
196
|
+
try {
|
|
197
|
+
const rows = store.query({ instances: [store.instance], afterId: config.afterId, limit: BATCH_LIMIT });
|
|
198
|
+
if (rows.length === 0) { failures = 0; return; }
|
|
199
|
+
const payload: Array<{ sourceId: string; record: LogRecord }> = [];
|
|
200
|
+
let latest = config.afterId;
|
|
201
|
+
let skippedThrough = config.afterId;
|
|
202
|
+
for (const row of rows) {
|
|
203
|
+
const entry = { sourceId: `${config.senderId}:${row.id}`, record: redactFederatedRecord(rowToRecord(row)) };
|
|
204
|
+
const singleBytes = new TextEncoder().encode(JSON.stringify({ instance: config.instance, records: [entry] })).byteLength;
|
|
205
|
+
const candidate = JSON.stringify({ instance: config.instance, records: [...payload, entry] });
|
|
206
|
+
const bytes = new TextEncoder().encode(candidate).byteLength;
|
|
207
|
+
if (bytes <= MAX_BATCH_BYTES) {
|
|
208
|
+
payload.push(entry);
|
|
209
|
+
latest = row.id;
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (singleBytes <= MAX_BATCH_BYTES) break;
|
|
213
|
+
// A single oversized log stays in the local logs.db and is explicitly skipped for federation
|
|
214
|
+
// so it cannot poison the spool and block later, smaller rows forever.
|
|
215
|
+
skippedThrough = row.id;
|
|
216
|
+
debug.log('logs.federate', 'oversized-row-skipped', { instance: config.instance, rowId: row.id, bytes: singleBytes, maxBytes: MAX_BATCH_BYTES });
|
|
217
|
+
}
|
|
218
|
+
if (payload.length === 0 && skippedThrough === config.afterId) return;
|
|
219
|
+
if (payload.length === 0) latest = skippedThrough;
|
|
220
|
+
const tokenStat = lstatSync(config.tokenFile);
|
|
221
|
+
if (!tokenStat.isFile() || (tokenStat.mode & 0o077) !== 0) throw new Error('federation token file must be a private regular file');
|
|
222
|
+
const token = readFileSync(config.tokenFile, 'utf8').trim();
|
|
223
|
+
if (payload.length > 0) {
|
|
224
|
+
const response = await fetcher(`${config.endpoint}/v1/log-federation/batch`, {
|
|
225
|
+
method: 'POST', headers: { authorization: `Bearer ${token}`, 'content-type': 'application/json' },
|
|
226
|
+
body: JSON.stringify({ instance: config.instance, records: payload }), signal: AbortSignal.timeout(10_000), redirect: 'error',
|
|
227
|
+
});
|
|
228
|
+
if (!response.ok) throw new Error(`HQ returned ${response.status}`);
|
|
229
|
+
const receipt = await readJsonResponse(response, 'HQ batch');
|
|
230
|
+
if (receipt.ok !== true || receipt.instance !== config.instance || receipt.accepted !== payload.length) {
|
|
231
|
+
throw new Error('HQ batch response did not confirm the expected instance and accepted count');
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
await withConfigLockAsync((stillHeld) => {
|
|
235
|
+
const current = loadConfig();
|
|
236
|
+
if (!current || !current.enabled || current.senderId !== config.senderId) return;
|
|
237
|
+
if (!stillHeld()) throw new Error('federation configuration lock was lost before cursor update');
|
|
238
|
+
const through = Math.max(latest, skippedThrough);
|
|
239
|
+
writePrivate(configPath(), JSON.stringify({ ...current, afterId: Math.max(current.afterId, through) }, null, 2) + '\n');
|
|
240
|
+
});
|
|
241
|
+
failures = 0;
|
|
242
|
+
debug.log('logs.federate', 'batch-sent', { instance: config.instance, count: payload.length, afterId: latest, skippedThrough });
|
|
243
|
+
} catch (error) {
|
|
244
|
+
failures += 1;
|
|
245
|
+
retryAt = Date.now() + Math.min(MAX_BACKOFF_MS, (opts.retryBaseMs ?? POLL_MS) * (2 ** Math.min(failures, 4)));
|
|
246
|
+
debug.log('logs.federate', 'batch-retry', { reason: error instanceof Error ? error.message : String(error), retryMs: retryAt - Date.now() });
|
|
247
|
+
} finally { running = false; }
|
|
248
|
+
};
|
|
249
|
+
const timer = setInterval(() => { void pump(); }, opts.pollMs ?? POLL_MS);
|
|
250
|
+
timer.unref?.();
|
|
251
|
+
void pump();
|
|
252
|
+
return () => { stopped = true; clearInterval(timer); };
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export async function handleLogFederationBatch(req: Request, deps: {
|
|
256
|
+
authorize?: (request: Request) => string | null;
|
|
257
|
+
store?: () => ReturnType<typeof getDefaultLogStore>;
|
|
258
|
+
} = {}): Promise<Response> {
|
|
259
|
+
const instance = (deps.authorize ?? ((request) => matchIngestAuthorization(request)?.name ?? null))(req);
|
|
260
|
+
if (!instance) return new Response(JSON.stringify({ error: 'unauthorized' }), { status: 401, headers: { 'content-type': 'application/json' } });
|
|
261
|
+
if (req.method !== 'POST') return new Response(JSON.stringify({ error: 'method not allowed' }), { status: 405, headers: { 'content-type': 'application/json' } });
|
|
262
|
+
let body: unknown;
|
|
263
|
+
try {
|
|
264
|
+
const raw = await req.text();
|
|
265
|
+
if (new TextEncoder().encode(raw).byteLength > 1_000_000) return new Response(JSON.stringify({ error: 'batch too large' }), { status: 413, headers: { 'content-type': 'application/json' } });
|
|
266
|
+
body = JSON.parse(raw);
|
|
267
|
+
} catch { return new Response(JSON.stringify({ error: 'invalid JSON' }), { status: 400 }); }
|
|
268
|
+
const input = body as { instance?: unknown; records?: unknown } | null;
|
|
269
|
+
if (!input || input.instance !== instance || !Array.isArray(input.records) || input.records.length > BATCH_LIMIT) {
|
|
270
|
+
return new Response(JSON.stringify({ error: 'invalid federation batch' }), { status: 400 });
|
|
271
|
+
}
|
|
272
|
+
const store = (deps.store ?? getDefaultLogStore)();
|
|
273
|
+
if (!store) return new Response(JSON.stringify({ error: 'log store unavailable' }), { status: 503 });
|
|
274
|
+
if (instance === store.instance || (readLogInstances().some((view) => view.name === instance) && !readFederatedLogInstances().includes(instance))) {
|
|
275
|
+
return new Response(JSON.stringify({ error: 'instance name conflicts with a local log instance' }), { status: 409, headers: { 'content-type': 'application/json' } });
|
|
276
|
+
}
|
|
277
|
+
const rows: Array<{ rec: LogRecord; surface: string; instance: string; federatedId: string; hostId?: string }> = [];
|
|
278
|
+
for (const item of input.records) {
|
|
279
|
+
if (!item || typeof item !== 'object' || Array.isArray(item)) {
|
|
280
|
+
return new Response(JSON.stringify({ error: 'invalid federation record' }), { status: 400, headers: { 'content-type': 'application/json' } });
|
|
281
|
+
}
|
|
282
|
+
const candidate = item as { sourceId?: unknown; record?: unknown };
|
|
283
|
+
const record = candidate.record as LogRecord | null;
|
|
284
|
+
if (typeof candidate.sourceId !== 'string' || candidate.sourceId.length === 0 || candidate.sourceId.length > 160 || !record || typeof record !== 'object'
|
|
285
|
+
|| typeof record.ts !== 'string' || typeof record.category !== 'string' || typeof record.event !== 'string') {
|
|
286
|
+
return new Response(JSON.stringify({ error: 'invalid federation record' }), { status: 400, headers: { 'content-type': 'application/json' } });
|
|
287
|
+
}
|
|
288
|
+
const redacted = redactFederatedRecord(record);
|
|
289
|
+
const hostId = typeof (record as LogRecord & { host_id?: unknown }).host_id === 'string' ? (record as LogRecord & { host_id: string }).host_id : undefined;
|
|
290
|
+
rows.push({ rec: redacted, surface: typeof record.source?.platform === 'string' ? record.source.platform : 'remote', instance, federatedId: candidate.sourceId, ...(hostId ? { hostId } : {}) });
|
|
291
|
+
}
|
|
292
|
+
try {
|
|
293
|
+
store.insertBatch(rows, { preserveRows: true });
|
|
294
|
+
registerFederatedLogInstance(instance);
|
|
295
|
+
return new Response(JSON.stringify({ ok: true, instance, accepted: rows.length }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
296
|
+
} catch {
|
|
297
|
+
return new Response(JSON.stringify({ error: 'federation store failed' }), { status: 503, headers: { 'content-type': 'application/json' } });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function scrubUserPaths(value: unknown): unknown {
|
|
302
|
+
if (typeof value === 'string') return value
|
|
303
|
+
.replace(/(\/Users\/)[^/\s]+/g, '$1<redacted>')
|
|
304
|
+
.replace(/(\/home\/)[^/\s]+/g, '$1<redacted>')
|
|
305
|
+
.replace(/([A-Za-z]:\\Users\\)[^\\\s]+/g, '$1<redacted>');
|
|
306
|
+
if (Array.isArray(value)) return value.map(scrubUserPaths);
|
|
307
|
+
if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, scrubUserPaths(item)]));
|
|
308
|
+
return value;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function readRevocationReceipts(): Record<string, string> {
|
|
312
|
+
const parsed = readJson(revocationReceiptsPath()) as { receipts?: unknown } | null;
|
|
313
|
+
if (!parsed || !parsed.receipts || typeof parsed.receipts !== 'object' || Array.isArray(parsed.receipts)) return {};
|
|
314
|
+
return Object.fromEntries(Object.entries(parsed.receipts).filter(([hash, name]) => /^[a-f0-9]{64}$/.test(hash) && typeof name === 'string' && NAME.test(name))) as Record<string, string>;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export async function handleLogFederationRevoke(req: Request, deps: { authorize?: (request: Request) => string | null } = {}): Promise<Response> {
|
|
318
|
+
if (req.method !== 'POST') return new Response(JSON.stringify({ error: 'method not allowed' }), { status: 405, headers: { 'content-type': 'application/json' } });
|
|
319
|
+
const authorization = req.headers.get('authorization') ?? '';
|
|
320
|
+
const bearer = /^Bearer ([A-Za-z0-9_-]+)$/.exec(authorization)?.[1];
|
|
321
|
+
if (!bearer) return new Response(JSON.stringify({ error: 'unauthorized' }), { status: 401, headers: { 'content-type': 'application/json' } });
|
|
322
|
+
const tokenHash = createHash('sha256').update(bearer).digest('hex');
|
|
323
|
+
const instance = (deps.authorize ?? ((request) => matchIngestAuthorization(request)?.name ?? null))(req);
|
|
324
|
+
if (instance) {
|
|
325
|
+
const receipts = readRevocationReceipts();
|
|
326
|
+
receipts[tokenHash] = instance;
|
|
327
|
+
writePrivate(revocationReceiptsPath(), JSON.stringify({ receipts }, null, 2) + '\n');
|
|
328
|
+
revokeIngestToken(instance);
|
|
329
|
+
return new Response(JSON.stringify({ ok: true, revoked: instance }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
330
|
+
}
|
|
331
|
+
const revokedInstance = readRevocationReceipts()[tokenHash];
|
|
332
|
+
if (revokedInstance) return new Response(JSON.stringify({ ok: true, revoked: revokedInstance, alreadyRevoked: true }), { status: 200, headers: { 'content-type': 'application/json' } });
|
|
333
|
+
return new Response(JSON.stringify({ error: 'unauthorized' }), { status: 401, headers: { 'content-type': 'application/json' } });
|
|
334
|
+
}
|