xkzoom 1.5.1 → 1.5.3
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/README.md +125 -55
- package/dist/{chunk-VPRVZWF3.mjs → chunk-37LYF6K2.mjs} +1 -1
- package/dist/{chunk-OCQUSYRP.mjs → chunk-3EV63LAA.mjs} +12 -12
- package/dist/{chunk-W4MKSQGZ.mjs → chunk-3FF266OG.mjs} +1 -1
- package/dist/{chunk-J5HTLG3V.mjs → chunk-3LR4CLDE.mjs} +1 -1
- package/dist/{chunk-CDLS44GZ.mjs → chunk-3TTLV2GM.mjs} +1 -1
- package/dist/{chunk-JG3EPJ32.mjs → chunk-54GVKP6B.mjs} +6 -6
- package/dist/{chunk-M52HZV6R.mjs → chunk-5VR6UOGC.mjs} +1 -1
- package/dist/{chunk-GBG4AJON.mjs → chunk-6EI5MFLD.mjs} +4 -4
- package/dist/{chunk-A23OTVH2.mjs → chunk-6LKZYMIW.mjs} +30 -30
- package/dist/{chunk-TAQQSDJN.mjs → chunk-6SYECCCG.mjs} +6 -6
- package/dist/{chunk-24GJWXMG.mjs → chunk-7MOQ462O.mjs} +1 -1
- package/dist/{chunk-LFZAVCVW.mjs → chunk-AJNXWGX2.mjs} +1 -1
- package/dist/{chunk-5DMSAPS2.mjs → chunk-APQRVOZQ.mjs} +5 -5
- package/dist/{chunk-YAD4VG2K.mjs → chunk-BHT6B2TV.mjs} +36 -6
- package/dist/{chunk-BV76CMVR.mjs → chunk-BN273XTH.mjs} +1 -1
- package/dist/{chunk-IXYH42YO.mjs → chunk-C5VQPAOA.mjs} +1 -1
- package/dist/{chunk-PY7W2X6W.mjs → chunk-CQAQRU4P.mjs} +114 -107
- package/dist/{chunk-Q4XUEIOE.mjs → chunk-CVIZMDMZ.mjs} +1 -1
- package/dist/{chunk-SIIEMWE3.mjs → chunk-DB4XTPJF.mjs} +7 -7
- package/dist/{chunk-URF75O5Z.mjs → chunk-DBYEZK64.mjs} +1 -1
- package/dist/{chunk-GIAML5K5.mjs → chunk-DQ7J7RST.mjs} +1 -1
- package/dist/{chunk-BHMWYAVS.mjs → chunk-DXPZNBSQ.mjs} +3 -3
- package/dist/chunk-E5LABIPO.mjs +201 -0
- package/dist/{chunk-A5DUSLHF.mjs → chunk-ED4H2DM7.mjs} +1 -1
- package/dist/{chunk-KYTJH3R3.mjs → chunk-EE3NRJLQ.mjs} +1 -1
- package/dist/{chunk-T4LPE43H.mjs → chunk-ESYRDWFO.mjs} +11 -11
- package/dist/{chunk-CQUISJWG.mjs → chunk-EYK3W2NV.mjs} +1 -1
- package/dist/{chunk-Z7GTU7KF.mjs → chunk-FAJHYXNU.mjs} +5 -5
- package/dist/{chunk-XHO73X2N.mjs → chunk-FKCGJ3BF.mjs} +2 -2
- package/dist/{chunk-HJN232FK.mjs → chunk-FLVJABFP.mjs} +1 -1
- package/dist/{chunk-H5DIQHEQ.mjs → chunk-FZ7NLBVP.mjs} +45 -16
- package/dist/{chunk-HTU5W436.mjs → chunk-G5LQ2PQ6.mjs} +2 -2
- package/dist/{chunk-LTBQWMAJ.mjs → chunk-GSIZ5FR6.mjs} +2 -2
- package/dist/{chunk-UANVP2AV.mjs → chunk-H4BNL7XG.mjs} +1 -1
- package/dist/{chunk-Q6XX6X24.mjs → chunk-I4LMW3IM.mjs} +1 -1
- package/dist/{chunk-VIZQURO5.mjs → chunk-IGJFAE72.mjs} +9 -9
- package/dist/{chunk-7AZVQS2H.mjs → chunk-IVR74IXK.mjs} +7 -7
- package/dist/{chunk-YILSXMZI.mjs → chunk-KI7AMK7P.mjs} +3 -3
- package/dist/{chunk-EQNHKW6L.mjs → chunk-LJF6JSJB.mjs} +1 -1
- package/dist/{chunk-JD5NPIMO.mjs → chunk-LSQ47CLM.mjs} +27 -27
- package/dist/{chunk-IPIV4NGB.mjs → chunk-LXEKUNXI.mjs} +6 -6
- package/dist/{chunk-HR43WO4Q.mjs → chunk-M6VHS3HQ.mjs} +2 -2
- package/dist/{chunk-4DYFM3EC.mjs → chunk-MI6GFOCU.mjs} +4 -4
- package/dist/{chunk-CFZVBILR.mjs → chunk-MIXYB6BH.mjs} +1 -1
- package/dist/{chunk-K4RHLREV.mjs → chunk-MVKCMXBY.mjs} +1 -1
- package/dist/{chunk-JG3K4N5B.mjs → chunk-NIV5GVCE.mjs} +1 -1
- package/dist/{chunk-ZTKJR7OC.mjs → chunk-OWIXULFQ.mjs} +1 -1
- package/dist/{chunk-Y6SJUTY6.mjs → chunk-P262PAGZ.mjs} +15 -2
- package/dist/{chunk-5JGUBBXN.mjs → chunk-PBBRBETA.mjs} +4 -4
- package/dist/{chunk-EGWLJJY7.mjs → chunk-QSHIFD37.mjs} +2 -2
- package/dist/{chunk-WJIY3BIA.mjs → chunk-QSQ274C6.mjs} +44 -16
- package/dist/{chunk-H5TJYSTV.mjs → chunk-QSUD6TNR.mjs} +5 -5
- package/dist/{chunk-YPAQRMUI.mjs → chunk-QYXYVBTO.mjs} +2 -2
- package/dist/{chunk-OB4JJLDC.mjs → chunk-RVW5XO4A.mjs} +4 -4
- package/dist/{chunk-CNHOCDRM.mjs → chunk-RYSPXH7G.mjs} +2 -2
- package/dist/{chunk-CCCPWU2O.mjs → chunk-RZW4EEPW.mjs} +22 -22
- package/dist/{chunk-GGWUDW5W.mjs → chunk-S5ROBD7X.mjs} +2 -2
- package/dist/{chunk-QUXUHJZW.mjs → chunk-SQHTVHQ7.mjs} +7 -7
- package/dist/{chunk-ZM23SMRO.mjs → chunk-T5ZCLYLJ.mjs} +1 -1
- package/dist/{chunk-NYG3IUXK.mjs → chunk-TER7DFHP.mjs} +1 -1
- package/dist/{chunk-RTANSWHW.mjs → chunk-THN36GA5.mjs} +27 -27
- package/dist/{chunk-GUADF3KN.mjs → chunk-ULXTQSV6.mjs} +4 -0
- package/dist/{chunk-PG5CHH66.mjs → chunk-VHRFLCMY.mjs} +1 -1
- package/dist/{chunk-BSQF7NF4.mjs → chunk-W7OJPFTN.mjs} +2 -2
- package/dist/{chunk-S7FQBXOO.mjs → chunk-WGLYR2YT.mjs} +1 -1
- package/dist/{chunk-G5ZU7562.mjs → chunk-WNI5ZPQY.mjs} +7 -7
- package/dist/{chunk-7FLALKSN.mjs → chunk-WRRJFJ2N.mjs} +7 -7
- package/dist/{chunk-ILROJZBI.mjs → chunk-WV6OKJ4J.mjs} +37 -9
- package/dist/{chunk-ASIBETCT.mjs → chunk-X7P6B2LK.mjs} +10 -10
- package/dist/{chunk-MWRQORKQ.mjs → chunk-XF4EURDX.mjs} +1 -1
- package/dist/{chunk-ETD5LGJY.mjs → chunk-Z3COATFF.mjs} +1 -1
- package/dist/index.js +336 -31
- package/dist/index.mjs +169 -168
- package/dist/mobile/action-planner.js +21 -1
- package/dist/mobile/action-planner.mjs +95 -94
- package/dist/mobile/agent-capabilities.js +21 -1
- package/dist/mobile/agent-capabilities.mjs +96 -95
- package/dist/mobile/agent-shop/handlers.mjs +3 -3
- package/dist/mobile/anthropic-incremental-deliver.js +19 -0
- package/dist/mobile/anthropic-incremental-deliver.mjs +3 -2
- package/dist/mobile/anthropic-messages-turn-runner.js +224 -8
- package/dist/mobile/anthropic-messages-turn-runner.mjs +104 -103
- package/dist/mobile/anthropic-owned-tool-executor.js +21 -1
- package/dist/mobile/anthropic-owned-tool-executor.mjs +103 -102
- package/dist/mobile/api.mjs +49 -49
- package/dist/mobile/context-compact/compact-artifact-enrich.js +19 -0
- package/dist/mobile/context-compact/compact-artifact-enrich.mjs +16 -15
- package/dist/mobile/context-compact/compact-artifact-writer.mjs +4 -4
- package/dist/mobile/context-compact/compact-engine-artifacts.mjs +5 -5
- package/dist/mobile/context-compact/compact-memory-distill-job.mjs +3 -3
- package/dist/mobile/context-compact/compact-message-collector.mjs +2 -2
- package/dist/mobile/context-compact/compact-orchestrator.js +21 -1
- package/dist/mobile/context-compact/compact-orchestrator.mjs +34 -33
- package/dist/mobile/context-compact/compact-resume-prefetch.mjs +4 -4
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.mjs +18 -17
- package/dist/mobile/context-compact/compact-summarizer-llm-request.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm-request.mjs +10 -9
- package/dist/mobile/context-compact/compact-summarizer-llm.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm.mjs +11 -10
- package/dist/mobile/context-compact/compact-summarizer.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer.mjs +15 -14
- package/dist/mobile/context-compact/compact-write-verifier.mjs +2 -2
- package/dist/mobile/context-compact/context-budget-gate.js +14 -2
- package/dist/mobile/context-compact/context-budget-gate.mjs +2 -2
- package/dist/mobile/context-compact/runtime-compact-hook.js +33 -2
- package/dist/mobile/context-compact/runtime-compact-hook.mjs +99 -98
- package/dist/mobile/group/conductor-llm.js +19 -0
- package/dist/mobile/group/conductor-llm.mjs +13 -12
- package/dist/mobile/group/conductor-plan-llm.js +19 -0
- package/dist/mobile/group/conductor-plan-llm.mjs +19 -18
- package/dist/mobile/group/delivery-verification.mjs +4 -4
- package/dist/mobile/group/direct-chat-group-context.mjs +1 -1
- package/dist/mobile/group/execution-plan.mjs +5 -5
- package/dist/mobile/group/floor-scheduler.mjs +7 -7
- package/dist/mobile/group/floor-state-store.mjs +6 -6
- package/dist/mobile/group/group-api-handlers.mjs +38 -38
- package/dist/mobile/group/group-peer-private-context.mjs +1 -1
- package/dist/mobile/group/group-session.mjs +19 -19
- package/dist/mobile/group/index.mjs +32 -32
- package/dist/mobile/group/memory-supplement.mjs +10 -10
- package/dist/mobile/group/orchestrator.mjs +30 -30
- package/dist/mobile/group/pipeline-ceo-dept-mention-parse.mjs +3 -3
- package/dist/mobile/group/pipeline-handoff-verification.mjs +3 -3
- package/dist/mobile/group/pipeline-turn-outcome.mjs +2 -2
- package/dist/mobile/group/plan-runtime.mjs +18 -18
- package/dist/mobile/group/relation-distill.mjs +8 -8
- package/dist/mobile/group/runtime-integration.mjs +36 -36
- package/dist/mobile/index.js +336 -31
- package/dist/mobile/index.mjs +164 -163
- package/dist/mobile/interrupted-turn.js +5 -0
- package/dist/mobile/interrupted-turn.mjs +3 -1
- package/dist/mobile/memory-contract-r1-prefetch.mjs +11 -11
- package/dist/mobile/memory-contract-r5-empty-result.mjs +12 -12
- package/dist/mobile/memory-runtime-v2/eval-runner.mjs +4 -4
- package/dist/mobile/memory-runtime-v2/evidence-plan.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/index.mjs +15 -15
- package/dist/mobile/memory-runtime-v2/memory-control-plane.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/memory-readiness.mjs +5 -5
- package/dist/mobile/memory-runtime-v2/orchestrator.mjs +3 -3
- package/dist/mobile/memory-runtime-v2/public-api.mjs +6 -6
- package/dist/mobile/model-context-window-budget.js +16 -2
- package/dist/mobile/model-context-window-budget.mjs +3 -1
- package/dist/mobile/native-anthropic-messages-stream.js +223 -7
- package/dist/mobile/native-anthropic-messages-stream.mjs +11 -10
- package/dist/mobile/native-anthropic-turn-errors.mjs +2 -2
- package/dist/mobile/native-openai-text-stream.js +223 -6
- package/dist/mobile/native-openai-text-stream.mjs +2 -1
- package/dist/mobile/native-reply-route.js +19 -0
- package/dist/mobile/native-reply-route.mjs +10 -9
- package/dist/mobile/native-reply-system-prompt-layers.js +21 -1
- package/dist/mobile/native-reply-system-prompt-layers.mjs +96 -95
- package/dist/mobile/native-request-diagnostics.js +230 -0
- package/dist/mobile/native-request-diagnostics.mjs +17 -0
- package/dist/mobile/native-stream-block-emit.js +19 -0
- package/dist/mobile/native-stream-block-emit.mjs +2 -1
- package/dist/mobile/openai-completions-turn-runner.js +224 -8
- package/dist/mobile/openai-completions-turn-runner.mjs +104 -103
- package/dist/mobile/reply-dispatch-warmup.mjs +2 -2
- package/dist/mobile/runtime.js +336 -31
- package/dist/mobile/runtime.mjs +161 -160
- package/dist/mobile/stream-inbound/mobile-text-stream-pipeline.mjs +3 -3
- package/dist/mobile/tool-use-input-normalize.js +21 -1
- package/dist/mobile/tool-use-input-normalize.mjs +98 -97
- package/dist/mobile/tools/mobile-compact-tool-bridge.js +21 -1
- package/dist/mobile/tools/mobile-compact-tool-bridge.mjs +98 -97
- package/dist/org/dept-context.mjs +4 -4
- package/dist/org/index.mjs +14 -14
- package/dist/owned-tools/ceo-confirm-requirements.mjs +12 -12
- package/dist/owned-tools/ceo-decision.mjs +18 -18
- package/dist/owned-tools/ceo-ops-brief.mjs +12 -12
- package/dist/owned-tools/ceo-redirect.mjs +37 -37
- package/dist/owned-tools/commit-stack-lesson.mjs +13 -13
- package/dist/owned-tools/compact/execute.js +21 -1
- package/dist/owned-tools/compact/execute.mjs +96 -95
- package/dist/owned-tools/compact/gateway-tool-factory.js +21 -1
- package/dist/owned-tools/compact/gateway-tool-factory.mjs +97 -96
- package/dist/owned-tools/compact/registry.js +21 -1
- package/dist/owned-tools/compact/registry.mjs +95 -94
- package/dist/owned-tools/context-compact.js +21 -1
- package/dist/owned-tools/context-compact.mjs +42 -41
- package/dist/owned-tools/groups-history.mjs +1 -1
- package/dist/owned-tools/handoff.mjs +17 -17
- package/dist/owned-tools/memory-control.mjs +7 -7
- package/dist/owned-tools/memory-runtime-eval.mjs +6 -6
- package/dist/owned-tools/message.mjs +2 -2
- package/dist/owned-tools/models-list.mjs +2 -2
- package/dist/owned-tools/register-owned-providers.mjs +5 -5
- package/dist/owned-tools/registry.js +21 -1
- package/dist/owned-tools/registry.mjs +94 -93
- package/dist/owned-tools/router.js +21 -1
- package/dist/owned-tools/router.mjs +95 -94
- package/dist/owned-tools/runtime-bridge.js +21 -1
- package/dist/owned-tools/runtime-bridge.mjs +96 -95
- package/dist/owned-tools/session-status.mjs +1 -1
- package/dist/owned-tools/sessions-history-resolver.mjs +2 -2
- package/dist/owned-tools/sessions-history.mjs +1 -1
- package/dist/owned-tools/sessions-send.mjs +1 -1
- package/dist/owned-tools/subagents.mjs +1 -1
- package/dist/owned-tools/tool-contract-prompt.js +21 -1
- package/dist/owned-tools/tool-contract-prompt.mjs +95 -94
- package/dist/owned-tools/tool-result-envelope.js +21 -1
- package/dist/owned-tools/tool-result-envelope.mjs +97 -96
- package/dist/owned-tools/tool-usage-guide.js +21 -1
- package/dist/owned-tools/tool-usage-guide.mjs +94 -93
- package/dist/owned-tools/tts.mjs +4 -4
- package/dist/owned-tools/web-smoke.mjs +6 -6
- package/dist/project/file-tool-scope-default.mjs +6 -6
- package/dist/project-pipeline/handlers.mjs +37 -37
- package/dist/project-pipeline/index.mjs +40 -40
- package/dist/project-pipeline/pipeline-routing.mjs +2 -2
- package/dist/project-pipeline/post-close-skill-evolution.mjs +5 -5
- package/dist/project-pipeline/project-store.mjs +5 -5
- package/gateway-core/README.md +6 -0
- package/package.json +5 -2
- package/dist/{chunk-UNZ3D3B3.mjs → chunk-3OXBG4OP.mjs} +5 -5
- package/dist/{chunk-NRJWLPTI.mjs → chunk-6AY6OPO5.mjs} +3 -3
- package/dist/{chunk-JA65ZG3H.mjs → chunk-6ZWKLMY3.mjs} +4 -4
- package/dist/{chunk-T23H5D4O.mjs → chunk-AINHKBJW.mjs} +3 -3
- package/dist/{chunk-2BGXTBZX.mjs → chunk-D3N7EHB2.mjs} +8 -8
- package/dist/{chunk-JIY7IOQ5.mjs → chunk-DRY7AJMM.mjs} +3 -3
- package/dist/{chunk-QM7MTC5Q.mjs → chunk-H6LMX5G5.mjs} +3 -3
- package/dist/{chunk-2TBXT3PD.mjs → chunk-J74WVZGF.mjs} +6 -6
- package/dist/{chunk-WPLDZLAL.mjs → chunk-L7PMYQN5.mjs} +3 -3
- package/dist/{chunk-CORUFGMR.mjs → chunk-N3YQ5IL6.mjs} +7 -7
- package/dist/{chunk-5LUTMHVL.mjs → chunk-NXKHSX4M.mjs} +3 -3
- package/dist/{chunk-MGWYJD5Q.mjs → chunk-QCSNRVL2.mjs} +8 -8
package/README.md
CHANGED
|
@@ -1,55 +1,125 @@
|
|
|
1
|
-
# XKZOOM Gateway
|
|
2
|
-
|
|
3
|
-
XKZOOM Gateway is the local runtime boundary for XKZOOM agents, mobile REST,
|
|
4
|
-
mobile WebSocket, owned tools, memory, skills, and reply dispatch.
|
|
5
|
-
|
|
6
|
-
The default runtime is `gateway-core`. The package does not ship the retired
|
|
7
|
-
external gateway runtime, retired bundled skills, third-party chat channel
|
|
8
|
-
entries, web control UI, or tunnel/TUN entries.
|
|
9
|
-
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
# XKZOOM Gateway
|
|
2
|
+
|
|
3
|
+
XKZOOM Gateway is the local runtime boundary for XKZOOM agents, mobile REST,
|
|
4
|
+
mobile WebSocket, owned tools, memory, skills, and reply dispatch.
|
|
5
|
+
|
|
6
|
+
The default runtime is `gateway-core`. The package does not ship the retired
|
|
7
|
+
external gateway runtime, retired bundled skills, third-party chat channel
|
|
8
|
+
entries, web control UI, or tunnel/TUN entries.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm add xkzoom
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For direct CLI use:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm dlx xkzoom
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The package exposes the `xkzoom` bin and keeps runtime state under
|
|
23
|
+
`~/.xkzoom` by default.
|
|
24
|
+
|
|
25
|
+
## What This Package Includes
|
|
26
|
+
|
|
27
|
+
- Owned XKZOOM gateway runtime under `gateway-core`.
|
|
28
|
+
- CLI entrypoints for local gateway startup and mobile pairing helpers.
|
|
29
|
+
- Mobile REST and `/mobile/ws` runtime used by XKZOOM Desktop and the mobile
|
|
30
|
+
client.
|
|
31
|
+
- Owned reply runtime, owned tools, agent workspace loading, and local state
|
|
32
|
+
bootstrap.
|
|
33
|
+
|
|
34
|
+
The npm package is intentionally runtime-focused. It does not publish source
|
|
35
|
+
tests, internal docs, retired gateway host material, source maps, TypeScript
|
|
36
|
+
declarations, third-party chat channel integrations, web control UI, tunnel
|
|
37
|
+
entries, or VPS deployment scripts.
|
|
38
|
+
|
|
39
|
+
## Release Notes
|
|
40
|
+
|
|
41
|
+
### 1.5.3
|
|
42
|
+
|
|
43
|
+
- Hardens native provider calls against transient upstream connection failures:
|
|
44
|
+
OpenAI-compatible and Anthropic-compatible request paths now retry retryable
|
|
45
|
+
network/connect failures once before surfacing a failed assistant turn.
|
|
46
|
+
- Adds shared retry diagnostics for native provider fetches, including attempt
|
|
47
|
+
counts, retry decisions, request shape, and cause-chain error codes without
|
|
48
|
+
logging prompts or API keys.
|
|
49
|
+
- Applies the retry path to the owned turn runners used by Desktop/App replies
|
|
50
|
+
and to the legacy text-stream helpers, keeping HTTP errors, aborts, and empty
|
|
51
|
+
stream failures honest.
|
|
52
|
+
- Adds regression coverage for `UND_ERR_CONNECT_TIMEOUT` recovery on both
|
|
53
|
+
OpenAI-compatible and Anthropic-compatible native turn paths.
|
|
54
|
+
|
|
55
|
+
### 1.5.2
|
|
56
|
+
|
|
57
|
+
- Publishes the 1.5.x owned gateway runtime with complete npm package metadata
|
|
58
|
+
so npmjs.com renders the README and install guidance correctly.
|
|
59
|
+
- Adds release-package validation that treats `README.md` and npm readme
|
|
60
|
+
metadata as required release artifacts, preventing another metadata-only
|
|
61
|
+
package from being published without docs.
|
|
62
|
+
- Documents the public runtime surface for desktop packaging: CLI entrypoints,
|
|
63
|
+
mobile REST, `/mobile/ws`, owned tools, local state bootstrap, and the trimmed
|
|
64
|
+
runtime-only package shape.
|
|
65
|
+
- Carries forward the 1.5.1 runtime baseline for desktop installer builds while
|
|
66
|
+
making the package easier to verify from the npm page.
|
|
67
|
+
|
|
68
|
+
### 1.5.1
|
|
69
|
+
|
|
70
|
+
- Updates the published `xkzoom` runtime used by XKZOOM Desktop packaging to
|
|
71
|
+
the current owned/native gateway baseline.
|
|
72
|
+
- Keeps the npm artifact focused on runnable gateway material: `dist`,
|
|
73
|
+
`gateway-core`, runtime scripts, license, notice, and package manifest.
|
|
74
|
+
- Preserves the mobile gateway contract used by Desktop and App, including
|
|
75
|
+
mobile REST, `/mobile/ws`, relay connector runtime, and pairing helpers.
|
|
76
|
+
- Removes development-only package surface from the public tarball, including
|
|
77
|
+
source tests, internal docs, source maps, TypeScript declaration files, retired
|
|
78
|
+
host material, tunnel/control UI entries, and VPS deployment material.
|
|
79
|
+
|
|
80
|
+
## Runtime
|
|
81
|
+
|
|
82
|
+
- Start the gateway with `pnpm run gateway:run` or the `xkzoom` bin.
|
|
83
|
+
- The default state root is `~/.xkzoom`.
|
|
84
|
+
- Set `XKZOOM_STATE_DIR` to use an explicit state root.
|
|
85
|
+
- `gateway-core/runtime/gateway/owned-gateway-entry.cjs` owns the gateway CLI
|
|
86
|
+
entry.
|
|
87
|
+
- `gateway-core/runtime/reply/load-owned-reply-runtime.cjs` owns reply runtime
|
|
88
|
+
loading.
|
|
89
|
+
- `gateway-core/runtime/mobile-relay` owns relay and connector processes.
|
|
90
|
+
|
|
91
|
+
## Product Surface
|
|
92
|
+
|
|
93
|
+
- Skills are read from agent workspaces and XKZOOM global skills.
|
|
94
|
+
- The API does not return retired bundled skills by default.
|
|
95
|
+
- Agent creation uses the native XKZOOM skeleton writer.
|
|
96
|
+
- Mobile REST and `/mobile/ws` are part of the owned gateway path.
|
|
97
|
+
- Third-party chat software integrations, web control UI, tunnel, and TUN are
|
|
98
|
+
disabled product surfaces.
|
|
99
|
+
|
|
100
|
+
## Verification
|
|
101
|
+
|
|
102
|
+
Run the core checks before publishing or handing off:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pnpm run build
|
|
106
|
+
pnpm run typecheck:test
|
|
107
|
+
pnpm run verify:release-artifact:shape
|
|
108
|
+
pnpm run verify:zero-legacy-source
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Useful focused checks:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pnpm run test:mobile:regression
|
|
115
|
+
pnpm run test:dev-tools
|
|
116
|
+
pnpm run verify:mobile:runtime
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
- [Gateway Core](docs/gateway-core.md)
|
|
122
|
+
- [State Root](docs/state-root.md)
|
|
123
|
+
- [Skills And Agents](docs/skills-and-agents.md)
|
|
124
|
+
- [Mobile Relay Connector](docs/mobile-relay-connector.md)
|
|
125
|
+
- [Release Verification](docs/release-verification.md)
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BSG6WLML.mjs";
|
|
7
7
|
import {
|
|
8
8
|
GroupFloorOrchestrator
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6LKZYMIW.mjs";
|
|
10
10
|
import {
|
|
11
11
|
buildPostAgentIntentPrompt
|
|
12
12
|
} from "./chunk-XEGXKEIR.mjs";
|
|
@@ -22,13 +22,6 @@ import {
|
|
|
22
22
|
isGroupConductorRouteEnabled,
|
|
23
23
|
isGroupPlanRuntimeAdvanceEnabled
|
|
24
24
|
} from "./chunk-AZVEPDT6.mjs";
|
|
25
|
-
import {
|
|
26
|
-
hydrateOrgEngineFromDisk,
|
|
27
|
-
persistOrgEngineToDisk
|
|
28
|
-
} from "./chunk-S4AIBE4O.mjs";
|
|
29
|
-
import {
|
|
30
|
-
evaluateToolCallGate
|
|
31
|
-
} from "./chunk-QRMV5CAE.mjs";
|
|
32
25
|
import {
|
|
33
26
|
cancelRunningOwnedSubagentsForAgent
|
|
34
27
|
} from "./chunk-RZOILUDC.mjs";
|
|
@@ -38,19 +31,26 @@ import {
|
|
|
38
31
|
} from "./chunk-4POYX4AW.mjs";
|
|
39
32
|
import {
|
|
40
33
|
getGroupFloorState
|
|
41
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-AJNXWGX2.mjs";
|
|
42
35
|
import {
|
|
43
36
|
resolvePlanMaxAppendNodes
|
|
44
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7MOQ462O.mjs";
|
|
45
38
|
import {
|
|
46
39
|
getMobileChatStore
|
|
47
40
|
} from "./chunk-CVXJ45WI.mjs";
|
|
48
41
|
import {
|
|
49
42
|
buildGroupCollaborationMemorySupplement
|
|
50
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-APQRVOZQ.mjs";
|
|
44
|
+
import {
|
|
45
|
+
hydrateOrgEngineFromDisk,
|
|
46
|
+
persistOrgEngineToDisk
|
|
47
|
+
} from "./chunk-S4AIBE4O.mjs";
|
|
48
|
+
import {
|
|
49
|
+
evaluateToolCallGate
|
|
50
|
+
} from "./chunk-QRMV5CAE.mjs";
|
|
51
51
|
import {
|
|
52
52
|
isOrgPipelineCharter
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6SYECCCG.mjs";
|
|
54
54
|
import {
|
|
55
55
|
loadTeamCharter
|
|
56
56
|
} from "./chunk-KDZWHGGN.mjs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
readNativeStreamReasoningEmitIntervalMs,
|
|
7
7
|
readNativeStreamReasoningMinChars,
|
|
8
8
|
shouldEmitNativeStreamBlock
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BHT6B2TV.mjs";
|
|
10
10
|
|
|
11
11
|
// src/mobile/anthropic-incremental-deliver.ts
|
|
12
12
|
var NATIVE_ANTHROPIC_STREAM_BLOCK_MIN_CHARS = readNativeStreamBlockMinChars();
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
buildCompactSummarizerAnthropicRequestBody,
|
|
3
3
|
buildCompactSummarizerOpenAiRequestBody,
|
|
4
4
|
summarizeCompactSummarizerRequestForLog
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RVW5XO4A.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveCompactSummarizerModelOverride,
|
|
8
8
|
resolveCompactSummarizerTimeoutMs
|
|
9
9
|
} from "./chunk-GR7LH34J.mjs";
|
|
10
|
+
import {
|
|
11
|
+
resolveNativeProviderApiKeyViaGatewayAuth
|
|
12
|
+
} from "./chunk-44L5RQKZ.mjs";
|
|
10
13
|
import {
|
|
11
14
|
buildNativeAnthropicRequestHeaders,
|
|
12
15
|
resolveAnthropicMessagesBodyExtras,
|
|
13
16
|
resolveNativeAnthropicMessagesConfigFromGatewayConfig,
|
|
14
17
|
resolveNativeAnthropicMessagesUrl
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
resolveNativeProviderApiKeyViaGatewayAuth
|
|
18
|
-
} from "./chunk-44L5RQKZ.mjs";
|
|
18
|
+
} from "./chunk-FZ7NLBVP.mjs";
|
|
19
19
|
import {
|
|
20
20
|
resolveNativeOpenAiChatCompletionsUrl,
|
|
21
21
|
resolveNativeOpenAiChatConfigFromGatewayConfig,
|
|
22
22
|
resolveOpenAiCompletionsBodyExtras
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BHT6B2TV.mjs";
|
|
24
24
|
import {
|
|
25
25
|
init_native_provider_api_key,
|
|
26
26
|
resolveNativeProviderApiKeySync
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OWNED_INTERNAL_TOOL_CATALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-THN36GA5.mjs";
|
|
4
4
|
|
|
5
5
|
// src/owned-tools/compact/registry.ts
|
|
6
6
|
var COMPACT_OWNED_TOOLS = OWNED_INTERNAL_TOOL_CATALOG.map((entry) => entry.tool).filter((tool) => ["diary_search", "notes_search", "notes_get", "summarize"].includes(tool.name));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mergeRunningSummary
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QSUD6TNR.mjs";
|
|
4
4
|
import {
|
|
5
5
|
assembleCompactNoteMarkdown
|
|
6
6
|
} from "./chunk-HICPBFBW.mjs";
|
|
7
|
-
import {
|
|
8
|
-
extractKeyFactsMarkdownFromTranscript
|
|
9
|
-
} from "./chunk-E4GA33KE.mjs";
|
|
10
7
|
import {
|
|
11
8
|
buildCompactArchiveDigest,
|
|
12
9
|
buildEngineFallbackActionSteps,
|
|
13
10
|
inferOpenLoopsFromSnapshot
|
|
14
11
|
} from "./chunk-UHHTLW2Z.mjs";
|
|
12
|
+
import {
|
|
13
|
+
extractKeyFactsMarkdownFromTranscript
|
|
14
|
+
} from "./chunk-E4GA33KE.mjs";
|
|
15
15
|
import {
|
|
16
16
|
sanitizeTranscriptTextForArchive
|
|
17
17
|
} from "./chunk-DPNXFDFK.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildPairwiseRelationImpression
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TER7DFHP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
formatNormalGroupRouteReceipt
|
|
6
6
|
} from "./chunk-A5OB3QEO.mjs";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-L4Z7ND7Z.mjs";
|
|
22
22
|
import {
|
|
23
23
|
runPlanRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KI7AMK7P.mjs";
|
|
25
25
|
import {
|
|
26
26
|
applyUserContinue,
|
|
27
27
|
applyUserNewTopic,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from "./chunk-C3CZKA3E.mjs";
|
|
44
44
|
import {
|
|
45
45
|
parseCeoMultiDeptLeadMentions
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-DQ7J7RST.mjs";
|
|
47
47
|
import {
|
|
48
48
|
markPipelineCeoRollupLeadDone,
|
|
49
49
|
startPipelineCeoRollup
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
selectNextSpeaker,
|
|
70
70
|
shouldConverge,
|
|
71
71
|
shouldConvergeNaturally
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-DXPZNBSQ.mjs";
|
|
73
73
|
import {
|
|
74
74
|
buildGroupMemberAliases,
|
|
75
75
|
collectMentionedMembers,
|
|
@@ -110,20 +110,14 @@ import {
|
|
|
110
110
|
import {
|
|
111
111
|
isGroupWorkLaneEnabled
|
|
112
112
|
} from "./chunk-AZVEPDT6.mjs";
|
|
113
|
-
import {
|
|
114
|
-
writeTeamMinutes
|
|
115
|
-
} from "./chunk-S4AIBE4O.mjs";
|
|
116
|
-
import {
|
|
117
|
-
buildMinutesDraftFromConvergence
|
|
118
|
-
} from "./chunk-Z7C7KX3U.mjs";
|
|
119
|
-
import {
|
|
120
|
-
createRemarkResolver
|
|
121
|
-
} from "./chunk-4POYX4AW.mjs";
|
|
122
113
|
import {
|
|
123
114
|
clearPipelineDeptRollup,
|
|
124
115
|
markPipelineDeptRollupMemberDone,
|
|
125
116
|
startPipelineDeptRollup
|
|
126
117
|
} from "./chunk-6SZCPHCL.mjs";
|
|
118
|
+
import {
|
|
119
|
+
createRemarkResolver
|
|
120
|
+
} from "./chunk-4POYX4AW.mjs";
|
|
127
121
|
import {
|
|
128
122
|
clearAllInFlightRuns,
|
|
129
123
|
clearInFlightRun,
|
|
@@ -132,7 +126,7 @@ import {
|
|
|
132
126
|
registerInFlightRun,
|
|
133
127
|
setExecutionPlan,
|
|
134
128
|
setGroupFloorState
|
|
135
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-AJNXWGX2.mjs";
|
|
136
130
|
import {
|
|
137
131
|
GROUP_FLOOR_PLAN_SCHEDULING_REASON
|
|
138
132
|
} from "./chunk-INHFVKZY.mjs";
|
|
@@ -141,13 +135,13 @@ import {
|
|
|
141
135
|
buildExecutionPlan,
|
|
142
136
|
markPlanSkipped,
|
|
143
137
|
toExecutionPlanSnapshot
|
|
144
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-7MOQ462O.mjs";
|
|
145
139
|
import {
|
|
146
140
|
assessDeliveryVerification
|
|
147
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-Z3COATFF.mjs";
|
|
148
142
|
import {
|
|
149
143
|
shouldTreatPipelineHandoffAsUnverified
|
|
150
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-XF4EURDX.mjs";
|
|
151
145
|
import {
|
|
152
146
|
assessPipelineCeoDecisionFromToolCalls,
|
|
153
147
|
assessPipelineHandoffFromToolCalls,
|
|
@@ -158,7 +152,7 @@ import {
|
|
|
158
152
|
isPipelineAwaitingCeoPhase,
|
|
159
153
|
isPipelineCeoActionablePhase,
|
|
160
154
|
isPipelineCeoDispatchPhase
|
|
161
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-AINHKBJW.mjs";
|
|
162
156
|
import {
|
|
163
157
|
getActiveTaskOwner,
|
|
164
158
|
patchTeamTaskBoard
|
|
@@ -168,36 +162,41 @@ import {
|
|
|
168
162
|
hasPendingDeptPostCloseDebrief,
|
|
169
163
|
resolveNextPostCloseDebriefAgentId,
|
|
170
164
|
resolvePostCloseDebriefAgentOrder
|
|
171
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-ED4H2DM7.mjs";
|
|
172
166
|
import {
|
|
173
167
|
recordGroupConvergenceTeamMemory
|
|
174
168
|
} from "./chunk-Q7NYATKS.mjs";
|
|
175
169
|
import {
|
|
176
170
|
getMobileChatStore
|
|
177
171
|
} from "./chunk-CVXJ45WI.mjs";
|
|
172
|
+
import {
|
|
173
|
+
getOrgProjectByTeamId
|
|
174
|
+
} from "./chunk-3OXBG4OP.mjs";
|
|
175
|
+
import {
|
|
176
|
+
sanitizeAssistantTextForStore
|
|
177
|
+
} from "./chunk-IXY2XMGE.mjs";
|
|
178
|
+
import {
|
|
179
|
+
writeTeamMinutes
|
|
180
|
+
} from "./chunk-S4AIBE4O.mjs";
|
|
178
181
|
import {
|
|
179
182
|
accumulateNegAndShouldFuse,
|
|
180
183
|
neutralizeRelationPair,
|
|
181
184
|
writePeerRelationNote
|
|
182
185
|
} from "./chunk-OJYZLNSD.mjs";
|
|
183
186
|
import {
|
|
184
|
-
|
|
185
|
-
} from "./chunk-
|
|
187
|
+
buildMinutesDraftFromConvergence
|
|
188
|
+
} from "./chunk-Z7C7KX3U.mjs";
|
|
186
189
|
import {
|
|
187
190
|
isOrgPipelineCharter,
|
|
188
191
|
resolvePeerIsCeoAgent,
|
|
189
192
|
resolvePeerPipelineRole,
|
|
190
193
|
resolvePipelineDeptLead,
|
|
191
194
|
resolvePipelineDeptMembers
|
|
192
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-6SYECCCG.mjs";
|
|
193
196
|
import {
|
|
194
197
|
resolveActivePipelineLead,
|
|
195
198
|
resolveDynamicDeptLead
|
|
196
|
-
} from "./chunk-
|
|
197
|
-
import {
|
|
198
|
-
ORG_PIPELINE_DEPT_LABELS,
|
|
199
|
-
activeDepartmentForPhase
|
|
200
|
-
} from "./chunk-LREFRIQQ.mjs";
|
|
199
|
+
} from "./chunk-6ZWKLMY3.mjs";
|
|
201
200
|
import {
|
|
202
201
|
listPipelineDeptMentionOptions,
|
|
203
202
|
loadPipelineCharter,
|
|
@@ -206,12 +205,13 @@ import {
|
|
|
206
205
|
import {
|
|
207
206
|
parseDynamicDeptSlugFromPhase
|
|
208
207
|
} from "./chunk-6XBAYBWZ.mjs";
|
|
208
|
+
import {
|
|
209
|
+
ORG_PIPELINE_DEPT_LABELS,
|
|
210
|
+
activeDepartmentForPhase
|
|
211
|
+
} from "./chunk-LREFRIQQ.mjs";
|
|
209
212
|
import {
|
|
210
213
|
loadTeamCharter
|
|
211
214
|
} from "./chunk-KDZWHGGN.mjs";
|
|
212
|
-
import {
|
|
213
|
-
sanitizeAssistantTextForStore
|
|
214
|
-
} from "./chunk-IXY2XMGE.mjs";
|
|
215
215
|
|
|
216
216
|
// src/mobile/group/orchestrator.ts
|
|
217
217
|
import { randomUUID } from "crypto";
|
|
@@ -8,12 +8,7 @@ import {
|
|
|
8
8
|
resolveDynamicDeptLead,
|
|
9
9
|
resolvePeerDeptSlug,
|
|
10
10
|
workspaceSubdirForDept
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
ORG_PIPELINE_USER_README,
|
|
14
|
-
ORG_PIPELINE_ZONE_DIRS,
|
|
15
|
-
activeDepartmentForPhase
|
|
16
|
-
} from "./chunk-LREFRIQQ.mjs";
|
|
11
|
+
} from "./chunk-6ZWKLMY3.mjs";
|
|
17
12
|
import {
|
|
18
13
|
resolveSlugFromMemberRole
|
|
19
14
|
} from "./chunk-KHQZ35IL.mjs";
|
|
@@ -24,6 +19,11 @@ import {
|
|
|
24
19
|
parseDynamicDeptSlugFromPhase,
|
|
25
20
|
sortDepartments
|
|
26
21
|
} from "./chunk-6XBAYBWZ.mjs";
|
|
22
|
+
import {
|
|
23
|
+
ORG_PIPELINE_USER_README,
|
|
24
|
+
ORG_PIPELINE_ZONE_DIRS,
|
|
25
|
+
activeDepartmentForPhase
|
|
26
|
+
} from "./chunk-LREFRIQQ.mjs";
|
|
27
27
|
import {
|
|
28
28
|
formatHandoverSupplementBlock,
|
|
29
29
|
loadPendingHandoverForTeam
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
MAX_GROUP_RELATION_LINES,
|
|
5
5
|
applyGroupPromptBudget
|
|
6
6
|
} from "./chunk-LDBMLTV2.mjs";
|
|
7
|
-
import {
|
|
8
|
-
readPeerRelationNote
|
|
9
|
-
} from "./chunk-OJYZLNSD.mjs";
|
|
10
7
|
import {
|
|
11
8
|
ensureProjectPipelineSkeleton
|
|
12
9
|
} from "./chunk-F23B3GJV.mjs";
|
|
13
10
|
import {
|
|
14
11
|
getOrgProjectByTeamId,
|
|
15
12
|
resolveOrgProjectRootByTeamId
|
|
16
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3OXBG4OP.mjs";
|
|
14
|
+
import {
|
|
15
|
+
readPeerRelationNote
|
|
16
|
+
} from "./chunk-OJYZLNSD.mjs";
|
|
17
17
|
import {
|
|
18
18
|
buildCeoContextBlock,
|
|
19
19
|
buildDepartmentContextBlock,
|
|
20
20
|
isOrgPipelineCharter
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6SYECCCG.mjs";
|
|
22
22
|
import {
|
|
23
23
|
formatHandoverSupplementBlock,
|
|
24
24
|
loadPendingHandoverForTeam
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyConfiguredMaxTokens,
|
|
3
|
+
fetchNativeProviderWithRetry,
|
|
4
|
+
formatRequestShape,
|
|
5
|
+
stringifyJsonRequestBody
|
|
6
|
+
} from "./chunk-E5LABIPO.mjs";
|
|
1
7
|
import {
|
|
2
8
|
parseOpenAiCompletionsSseDataLine
|
|
3
9
|
} from "./chunk-C36JYBG7.mjs";
|
|
@@ -357,12 +363,36 @@ async function runNativeOpenAiTextStreamToDispatcher(params) {
|
|
|
357
363
|
if (params.providerAccelerationPlan || providerAcceleration.application.applied || providerAcceleration.application.warnings.length > 0) {
|
|
358
364
|
params.log(formatProviderAccelerationApplication(providerAcceleration.application));
|
|
359
365
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
+
applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
|
|
367
|
+
const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
|
|
368
|
+
params.log(
|
|
369
|
+
`[XKZOOM][native-reply][openai-completions] request_shape ${formatRequestShape({
|
|
370
|
+
bodyBytes,
|
|
371
|
+
messages: chatMessages,
|
|
372
|
+
tools: toolsForRequest,
|
|
373
|
+
maxTokens: requestBody.max_tokens
|
|
374
|
+
})}`
|
|
375
|
+
);
|
|
376
|
+
const res = await fetchNativeProviderWithRetry(
|
|
377
|
+
url,
|
|
378
|
+
{
|
|
379
|
+
method: "POST",
|
|
380
|
+
headers: buildBearerOpenAiHeaders(cfg),
|
|
381
|
+
body: bodyText,
|
|
382
|
+
signal: params.signal
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
label: "openai-completions",
|
|
386
|
+
providerId: cfg.providerId,
|
|
387
|
+
model: cfg.model,
|
|
388
|
+
adapter: "openai-completions",
|
|
389
|
+
bodyBytes,
|
|
390
|
+
messages: chatMessages,
|
|
391
|
+
tools: toolsForRequest,
|
|
392
|
+
maxTokens: requestBody.max_tokens,
|
|
393
|
+
log: params.log
|
|
394
|
+
}
|
|
395
|
+
);
|
|
366
396
|
if (!res.ok) {
|
|
367
397
|
const t = await res.text();
|
|
368
398
|
throw new Error(`native OpenAI HTTP ${res.status}: ${t.slice(0, 500)}`);
|