xkzoom 1.5.2 → 1.5.4
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 +87 -43
- package/dist/{chunk-UANVP2AV.mjs → chunk-27BXVTXH.mjs} +1 -1
- package/dist/{chunk-PY7W2X6W.mjs → chunk-2DR5RT3I.mjs} +52 -45
- package/dist/{chunk-YILSXMZI.mjs → chunk-2IQAT3PE.mjs} +1 -1
- package/dist/{chunk-IXYH42YO.mjs → chunk-2VSERWT6.mjs} +1 -1
- package/dist/{chunk-BSQF7NF4.mjs → chunk-3KJHUTOO.mjs} +2 -2
- package/dist/{chunk-URF75O5Z.mjs → chunk-3VA3YDYL.mjs} +1 -1
- package/dist/{chunk-RTANSWHW.mjs → chunk-3ZH273T7.mjs} +27 -27
- package/dist/{chunk-EQNHKW6L.mjs → chunk-4JXTPCOE.mjs} +1 -1
- package/dist/{chunk-WJIY3BIA.mjs → chunk-5SE4JOKE.mjs} +38 -10
- package/dist/{chunk-JD5NPIMO.mjs → chunk-5YEFG7BF.mjs} +25 -25
- package/dist/{chunk-LTBQWMAJ.mjs → chunk-6W4W5JLG.mjs} +1 -1
- package/dist/{chunk-CDLS44GZ.mjs → chunk-76MFE24I.mjs} +1 -1
- package/dist/{chunk-IPIV4NGB.mjs → chunk-76TKUYY3.mjs} +2 -2
- package/dist/{chunk-T4LPE43H.mjs → chunk-7LEEVP5O.mjs} +1 -1
- package/dist/{chunk-A5DUSLHF.mjs → chunk-DCSERRXG.mjs} +1 -1
- package/dist/{chunk-ASIBETCT.mjs → chunk-E2TTUY6R.mjs} +2 -2
- package/dist/chunk-E5LABIPO.mjs +201 -0
- package/dist/{chunk-KYTJH3R3.mjs → chunk-EE3NRJLQ.mjs} +1 -1
- package/dist/{chunk-SIIEMWE3.mjs → chunk-F35EHL5U.mjs} +3 -3
- package/dist/{chunk-K4RHLREV.mjs → chunk-FG6QCRVN.mjs} +1 -1
- package/dist/{chunk-HJN232FK.mjs → chunk-FLVJABFP.mjs} +1 -1
- package/dist/{chunk-ZM23SMRO.mjs → chunk-GIC2RBVM.mjs} +1 -1
- package/dist/{chunk-HTU5W436.mjs → chunk-GZJMFCRG.mjs} +2 -2
- package/dist/{chunk-JG3EPJ32.mjs → chunk-HAI7DJD2.mjs} +3 -3
- package/dist/{chunk-OB4JJLDC.mjs → chunk-HYSOWPIC.mjs} +2 -2
- package/dist/{chunk-G5ZU7562.mjs → chunk-IDQ5B572.mjs} +6 -6
- package/dist/{chunk-GGWUDW5W.mjs → chunk-IGDJGBAI.mjs} +1 -1
- package/dist/{chunk-A23OTVH2.mjs → chunk-J5AXFEDQ.mjs} +18 -18
- package/dist/{chunk-4DYFM3EC.mjs → chunk-JBKRS62W.mjs} +3 -3
- package/dist/{chunk-OCQUSYRP.mjs → chunk-JFFBD5TV.mjs} +14 -14
- package/dist/{chunk-VPRVZWF3.mjs → chunk-JI67TW4E.mjs} +1 -1
- package/dist/{chunk-GBG4AJON.mjs → chunk-JJKRD5DL.mjs} +1 -1
- package/dist/{chunk-7AZVQS2H.mjs → chunk-JXDHNASC.mjs} +12 -12
- package/dist/{chunk-W4MKSQGZ.mjs → chunk-K7RZQIPZ.mjs} +1 -1
- package/dist/{chunk-J5HTLG3V.mjs → chunk-KPDVZFJY.mjs} +1 -1
- package/dist/{chunk-S7FQBXOO.mjs → chunk-L252ASZW.mjs} +1 -1
- package/dist/{chunk-Z7GTU7KF.mjs → chunk-LESS4N25.mjs} +1 -1
- package/dist/{chunk-5DMSAPS2.mjs → chunk-M3ISDSQP.mjs} +7 -7
- package/dist/{chunk-HR43WO4Q.mjs → chunk-M5IU6U3O.mjs} +2 -2
- package/dist/{chunk-BV76CMVR.mjs → chunk-MBOWNG3A.mjs} +1 -1
- package/dist/{chunk-CCCPWU2O.mjs → chunk-MDZUWIBH.mjs} +4 -4
- package/dist/{chunk-YAD4VG2K.mjs → chunk-MKYCBV3H.mjs} +36 -6
- package/dist/{chunk-CORUFGMR.mjs → chunk-MPGMU75K.mjs} +4 -4
- package/dist/{chunk-7FLALKSN.mjs → chunk-MQKREMOB.mjs} +2 -2
- package/dist/{chunk-H5TJYSTV.mjs → chunk-MRTQWCNC.mjs} +1 -1
- package/dist/{chunk-CNHOCDRM.mjs → chunk-NHICONJ3.mjs} +1 -1
- package/dist/{chunk-5JGUBBXN.mjs → chunk-NIU6GWKB.mjs} +2 -2
- package/dist/{chunk-Q6XX6X24.mjs → chunk-OBYPZT2S.mjs} +6 -6
- package/dist/{chunk-Y6SJUTY6.mjs → chunk-P262PAGZ.mjs} +15 -2
- package/dist/{chunk-YPAQRMUI.mjs → chunk-PETWGCGB.mjs} +1 -1
- package/dist/{chunk-Q4XUEIOE.mjs → chunk-PW3ULDNL.mjs} +1 -1
- package/dist/{chunk-EGWLJJY7.mjs → chunk-RKZ56GST.mjs} +2 -2
- package/dist/{chunk-QUXUHJZW.mjs → chunk-TADSGGK2.mjs} +7 -7
- package/dist/{chunk-ILROJZBI.mjs → chunk-TQBVFKCT.mjs} +37 -9
- package/dist/{chunk-M52HZV6R.mjs → chunk-TVH4LII3.mjs} +1 -1
- package/dist/{chunk-GUADF3KN.mjs → chunk-ULXTQSV6.mjs} +4 -0
- package/dist/{chunk-H5DIQHEQ.mjs → chunk-UXEZFEB3.mjs} +37 -8
- package/dist/{chunk-XHO73X2N.mjs → chunk-VNEPNUBZ.mjs} +13 -13
- package/dist/{chunk-NYG3IUXK.mjs → chunk-W75Z6CZR.mjs} +1 -1
- package/dist/{chunk-PG5CHH66.mjs → chunk-YPKHMAO4.mjs} +1 -1
- package/dist/index.js +336 -31
- package/dist/index.mjs +104 -103
- package/dist/mobile/action-planner.js +21 -1
- package/dist/mobile/action-planner.mjs +60 -59
- package/dist/mobile/agent-capabilities.js +21 -1
- package/dist/mobile/agent-capabilities.mjs +60 -59
- 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 +69 -68
- package/dist/mobile/anthropic-owned-tool-executor.js +21 -1
- package/dist/mobile/anthropic-owned-tool-executor.mjs +68 -67
- package/dist/mobile/api.mjs +31 -31
- package/dist/mobile/context-compact/compact-artifact-enrich.js +19 -0
- package/dist/mobile/context-compact/compact-artifact-enrich.mjs +8 -7
- package/dist/mobile/context-compact/compact-orchestrator.js +21 -1
- package/dist/mobile/context-compact/compact-orchestrator.mjs +12 -11
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-engine-artifact.mjs +8 -7
- package/dist/mobile/context-compact/compact-summarizer-llm-request.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm-request.mjs +5 -4
- package/dist/mobile/context-compact/compact-summarizer-llm.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer-llm.mjs +6 -5
- package/dist/mobile/context-compact/compact-summarizer.js +19 -0
- package/dist/mobile/context-compact/compact-summarizer.mjs +7 -6
- 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 +64 -63
- package/dist/mobile/group/conductor-llm.js +19 -0
- package/dist/mobile/group/conductor-llm.mjs +7 -6
- package/dist/mobile/group/conductor-plan-llm.js +19 -0
- package/dist/mobile/group/conductor-plan-llm.mjs +7 -6
- package/dist/mobile/group/floor-scheduler.mjs +2 -2
- package/dist/mobile/group/group-api-handlers.mjs +21 -21
- package/dist/mobile/group/group-session.mjs +5 -5
- package/dist/mobile/group/index.mjs +16 -16
- package/dist/mobile/group/memory-supplement.mjs +4 -4
- package/dist/mobile/group/orchestrator.mjs +15 -15
- package/dist/mobile/group/plan-runtime.mjs +4 -4
- package/dist/mobile/group/relation-distill.mjs +3 -3
- package/dist/mobile/group/runtime-integration.mjs +19 -19
- package/dist/mobile/group/team-memory-runtime.mjs +3 -3
- package/dist/mobile/index.js +336 -31
- package/dist/mobile/index.mjs +101 -100
- package/dist/mobile/interrupted-turn.js +5 -0
- package/dist/mobile/interrupted-turn.mjs +3 -1
- package/dist/mobile/memory-contract-r1-prefetch.mjs +5 -5
- package/dist/mobile/memory-contract-r5-empty-result.mjs +6 -6
- package/dist/mobile/memory-runtime-v2/eval-runner.mjs +8 -8
- package/dist/mobile/memory-runtime-v2/evidence-plan.mjs +11 -11
- package/dist/mobile/memory-runtime-v2/index.mjs +31 -31
- package/dist/mobile/memory-runtime-v2/local-source-import.mjs +3 -3
- package/dist/mobile/memory-runtime-v2/memory-control-plane.mjs +11 -11
- package/dist/mobile/memory-runtime-v2/memory-readiness.mjs +11 -11
- package/dist/mobile/memory-runtime-v2/orchestrator.mjs +4 -4
- package/dist/mobile/memory-runtime-v2/project-tool-event.mjs +2 -2
- package/dist/mobile/memory-runtime-v2/public-api.mjs +12 -12
- package/dist/mobile/memory-runtime-v2/retrieval.mjs +2 -2
- 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 +4 -3
- 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 +5 -4
- package/dist/mobile/native-reply-system-prompt-layers.js +21 -1
- package/dist/mobile/native-reply-system-prompt-layers.mjs +61 -60
- 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 +69 -68
- package/dist/mobile/runtime.js +336 -31
- package/dist/mobile/runtime.mjs +100 -99
- package/dist/mobile/stream-inbound/mobile-text-stream-pipeline.mjs +4 -4
- package/dist/mobile/tool-use-input-normalize.js +21 -1
- package/dist/mobile/tool-use-input-normalize.mjs +63 -62
- package/dist/mobile/tools/mobile-compact-tool-bridge.js +21 -1
- package/dist/mobile/tools/mobile-compact-tool-bridge.mjs +63 -62
- package/dist/org/dept-context.mjs +2 -2
- package/dist/org/index.mjs +8 -8
- package/dist/owned-tools/ceo-confirm-requirements.mjs +3 -3
- package/dist/owned-tools/ceo-decision.mjs +4 -4
- package/dist/owned-tools/ceo-ops-brief.mjs +3 -3
- package/dist/owned-tools/ceo-redirect.mjs +20 -20
- package/dist/owned-tools/commit-stack-lesson.mjs +4 -4
- package/dist/owned-tools/compact/execute.js +21 -1
- package/dist/owned-tools/compact/execute.mjs +61 -60
- package/dist/owned-tools/compact/gateway-tool-factory.js +21 -1
- package/dist/owned-tools/compact/gateway-tool-factory.mjs +62 -61
- package/dist/owned-tools/compact/registry.js +21 -1
- package/dist/owned-tools/compact/registry.mjs +60 -59
- package/dist/owned-tools/context-compact.js +21 -1
- package/dist/owned-tools/context-compact.mjs +25 -24
- package/dist/owned-tools/handoff.mjs +3 -3
- package/dist/owned-tools/memory-control.mjs +13 -13
- package/dist/owned-tools/memory-runtime-eval.mjs +12 -12
- package/dist/owned-tools/register-owned-providers.mjs +3 -3
- package/dist/owned-tools/registry.js +21 -1
- package/dist/owned-tools/registry.mjs +59 -58
- package/dist/owned-tools/router.js +21 -1
- package/dist/owned-tools/router.mjs +60 -59
- package/dist/owned-tools/runtime-bridge.js +21 -1
- package/dist/owned-tools/runtime-bridge.mjs +61 -60
- package/dist/owned-tools/tool-contract-prompt.js +21 -1
- package/dist/owned-tools/tool-contract-prompt.mjs +60 -59
- package/dist/owned-tools/tool-result-envelope.js +21 -1
- package/dist/owned-tools/tool-result-envelope.mjs +62 -61
- package/dist/owned-tools/tool-usage-guide.js +21 -1
- package/dist/owned-tools/tool-usage-guide.mjs +59 -58
- package/dist/owned-tools/tts.mjs +2 -2
- package/dist/project-pipeline/handlers.mjs +20 -20
- package/dist/project-pipeline/index.mjs +20 -20
- package/dist/project-pipeline/post-close-skill-evolution.mjs +3 -3
- package/package.json +2 -2
- package/dist/{chunk-KCZIK3TH.mjs → chunk-2QCX6RPN.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-VS2URZFN.mjs → chunk-HWGRW6YP.mjs} +3 -3
- package/dist/{chunk-Q7NYATKS.mjs → chunk-UR6LPERL.mjs} +3 -3
- package/dist/{chunk-TAQQSDJN.mjs → chunk-WPMJCKI2.mjs} +3 -3
- package/dist/{chunk-2TBXT3PD.mjs → chunk-XNQJRIGR.mjs} +9 -9
- package/dist/{chunk-BHMWYAVS.mjs → chunk-YYDDQEY4.mjs} +3 -3
|
@@ -6,7 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-BSG6WLML.mjs";
|
|
7
7
|
import {
|
|
8
8
|
GroupFloorOrchestrator
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J5AXFEDQ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
buildConductorAdvancePrompt,
|
|
12
|
+
buildConductorPlanPrompt
|
|
13
|
+
} from "./chunk-TOCC5J66.mjs";
|
|
10
14
|
import {
|
|
11
15
|
buildPostAgentIntentPrompt
|
|
12
16
|
} from "./chunk-XEGXKEIR.mjs";
|
|
@@ -14,21 +18,10 @@ import {
|
|
|
14
18
|
resolveConductorRouteTimeoutMs,
|
|
15
19
|
resolveConductorTimeoutMs
|
|
16
20
|
} from "./chunk-HJCKITZG.mjs";
|
|
17
|
-
import {
|
|
18
|
-
buildConductorAdvancePrompt,
|
|
19
|
-
buildConductorPlanPrompt
|
|
20
|
-
} from "./chunk-TOCC5J66.mjs";
|
|
21
21
|
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";
|
|
@@ -42,15 +35,22 @@ import {
|
|
|
42
35
|
import {
|
|
43
36
|
resolvePlanMaxAppendNodes
|
|
44
37
|
} from "./chunk-24GJWXMG.mjs";
|
|
38
|
+
import {
|
|
39
|
+
hydrateOrgEngineFromDisk,
|
|
40
|
+
persistOrgEngineToDisk
|
|
41
|
+
} from "./chunk-S4AIBE4O.mjs";
|
|
42
|
+
import {
|
|
43
|
+
evaluateToolCallGate
|
|
44
|
+
} from "./chunk-QRMV5CAE.mjs";
|
|
45
45
|
import {
|
|
46
46
|
getMobileChatStore
|
|
47
47
|
} from "./chunk-CVXJ45WI.mjs";
|
|
48
48
|
import {
|
|
49
49
|
buildGroupCollaborationMemorySupplement
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-M3ISDSQP.mjs";
|
|
51
51
|
import {
|
|
52
52
|
isOrgPipelineCharter
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-WPMJCKI2.mjs";
|
|
54
54
|
import {
|
|
55
55
|
loadTeamCharter
|
|
56
56
|
} from "./chunk-KDZWHGGN.mjs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-UAQDS6V2.mjs";
|
|
5
5
|
import {
|
|
6
6
|
buildContextPackForTurn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MPGMU75K.mjs";
|
|
8
8
|
import {
|
|
9
9
|
retrieveMemoryEvidence
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HWGRW6YP.mjs";
|
|
11
11
|
import {
|
|
12
12
|
buildSkillRegistryReport,
|
|
13
13
|
buildSkillRegistryView,
|
|
@@ -27,9 +27,14 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
upsertProjectMemoryMap
|
|
29
29
|
} from "./chunk-TSIQCRWD.mjs";
|
|
30
|
+
import {
|
|
31
|
+
buildContextPack,
|
|
32
|
+
renderContextPack,
|
|
33
|
+
renderContextPackStablePrefixForProviderCache
|
|
34
|
+
} from "./chunk-XL3MUGFG.mjs";
|
|
30
35
|
import {
|
|
31
36
|
importLocalMemorySources
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-2QCX6RPN.mjs";
|
|
33
38
|
import {
|
|
34
39
|
assessLongRunToolCall,
|
|
35
40
|
recordLongRunToolResult
|
|
@@ -44,11 +49,6 @@ import {
|
|
|
44
49
|
import {
|
|
45
50
|
applyContextPackBudget
|
|
46
51
|
} from "./chunk-DUB3FBYX.mjs";
|
|
47
|
-
import {
|
|
48
|
-
buildContextPack,
|
|
49
|
-
renderContextPack,
|
|
50
|
-
renderContextPackStablePrefixForProviderCache
|
|
51
|
-
} from "./chunk-XL3MUGFG.mjs";
|
|
52
52
|
import {
|
|
53
53
|
readRunLedger,
|
|
54
54
|
readRunLedgerEvents,
|
|
@@ -56,14 +56,14 @@ import {
|
|
|
56
56
|
} from "./chunk-4WWT6OC2.mjs";
|
|
57
57
|
import {
|
|
58
58
|
recordGroupConvergenceTeamMemory
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import {
|
|
61
|
-
runMemoryConsolidation
|
|
62
|
-
} from "./chunk-M2GS2K6H.mjs";
|
|
59
|
+
} from "./chunk-UR6LPERL.mjs";
|
|
63
60
|
import {
|
|
64
61
|
ingestMemoryEvent,
|
|
65
62
|
readMemoryRecords
|
|
66
63
|
} from "./chunk-EZ2UKNOZ.mjs";
|
|
64
|
+
import {
|
|
65
|
+
runMemoryConsolidation
|
|
66
|
+
} from "./chunk-M2GS2K6H.mjs";
|
|
67
67
|
import {
|
|
68
68
|
applyAnthropicProviderAccelerationToRequestBody,
|
|
69
69
|
applyGeminiProviderAccelerationToRequestBody,
|
|
@@ -4,9 +4,6 @@ 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";
|
|
@@ -14,18 +11,21 @@ import {
|
|
|
14
11
|
getOrgProjectByTeamId,
|
|
15
12
|
resolveOrgProjectRootByTeamId
|
|
16
13
|
} from "./chunk-UNZ3D3B3.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-WPMJCKI2.mjs";
|
|
22
|
+
import {
|
|
23
|
+
loadTeamCharter
|
|
24
|
+
} from "./chunk-KDZWHGGN.mjs";
|
|
22
25
|
import {
|
|
23
26
|
formatHandoverSupplementBlock,
|
|
24
27
|
loadPendingHandoverForTeam
|
|
25
28
|
} from "./chunk-I3T745ZX.mjs";
|
|
26
|
-
import {
|
|
27
|
-
loadTeamCharter
|
|
28
|
-
} from "./chunk-KDZWHGGN.mjs";
|
|
29
29
|
|
|
30
30
|
// src/mobile/group/memory-supplement.ts
|
|
31
31
|
var GROUP_COLLAB_PLAYBOOK_BLOCK = GROUP_COLLAB_PLAYBOOK_COMPACT;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
buildMemoryReadinessReport,
|
|
4
4
|
readLastMemoryReadinessGate,
|
|
5
5
|
readLastMemoryReadinessReport
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OBYPZT2S.mjs";
|
|
7
7
|
import {
|
|
8
8
|
buildMemorySoakEvidenceSummary,
|
|
9
9
|
completeMemorySoakSession,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
readLastMemoryRuntimeEvalReport,
|
|
24
24
|
runMemoryRuntimeV2SelfEval
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JXDHNASC.mjs";
|
|
26
26
|
import {
|
|
27
27
|
buildSkillRegistryReport,
|
|
28
28
|
formatSkillRegistryBlock,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isJsonlBlobHygieneCompact,
|
|
15
15
|
resolveContextBudgetSignalSource
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FLVJABFP.mjs";
|
|
17
17
|
import {
|
|
18
18
|
executeSummarizeNativeStore
|
|
19
19
|
} from "./chunk-IMJV6WJP.mjs";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-ZTKJR7OC.mjs";
|
|
23
23
|
import {
|
|
24
24
|
buildEngineCompactSummaryArtifact
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JJKRD5DL.mjs";
|
|
26
26
|
import {
|
|
27
27
|
pickArtifactEnrichTail,
|
|
28
28
|
pickTranscriptRehydrateTail,
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
buildConversationTailContextBlock,
|
|
33
33
|
enrichCompactArtifactFromConversationTail
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3VA3YDYL.mjs";
|
|
35
35
|
import {
|
|
36
36
|
runCompactSummarizerWithRetry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MRTQWCNC.mjs";
|
|
38
38
|
import {
|
|
39
39
|
buildActionStepsBlock
|
|
40
40
|
} from "./chunk-AAVCVONC.mjs";
|
|
@@ -11,6 +11,12 @@ import {
|
|
|
11
11
|
init_native_provider_api_key,
|
|
12
12
|
resolveNativeProviderApiKeySync
|
|
13
13
|
} from "./chunk-NEDXMES6.mjs";
|
|
14
|
+
import {
|
|
15
|
+
applyConfiguredMaxTokens,
|
|
16
|
+
fetchNativeProviderWithRetry,
|
|
17
|
+
formatRequestShape,
|
|
18
|
+
stringifyJsonRequestBody
|
|
19
|
+
} from "./chunk-E5LABIPO.mjs";
|
|
14
20
|
import {
|
|
15
21
|
buildNativeReplySystemPrompt,
|
|
16
22
|
init_native_gateway_config,
|
|
@@ -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)}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatRetrievedMemoryEvidenceBlock,
|
|
3
3
|
retrieveMemoryEvidence
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HWGRW6YP.mjs";
|
|
5
5
|
import {
|
|
6
6
|
buildSkillRegistryView,
|
|
7
7
|
formatSkillRegistryBlock
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
formatProjectMemoryMapBlock,
|
|
11
11
|
upsertProjectMemoryMap
|
|
12
12
|
} from "./chunk-TSIQCRWD.mjs";
|
|
13
|
+
import {
|
|
14
|
+
buildContextPack
|
|
15
|
+
} from "./chunk-XL3MUGFG.mjs";
|
|
13
16
|
import {
|
|
14
17
|
readLastContextPackCostReport,
|
|
15
18
|
recommendContextBudgetClass
|
|
@@ -20,9 +23,6 @@ import {
|
|
|
20
23
|
import {
|
|
21
24
|
applyContextPackBudget
|
|
22
25
|
} from "./chunk-DUB3FBYX.mjs";
|
|
23
|
-
import {
|
|
24
|
-
buildContextPack
|
|
25
|
-
} from "./chunk-XL3MUGFG.mjs";
|
|
26
26
|
import {
|
|
27
27
|
formatRunLedgerBlock,
|
|
28
28
|
readRunLedger
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forceStopGroupFloorState,
|
|
3
3
|
tryRedirectPipelineFloor
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JFFBD5TV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
defineTool
|
|
7
7
|
} from "./chunk-DFJFMZX6.mjs";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
isOrgPipelineCharter,
|
|
21
21
|
resolvePeerIsCeoAgent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WPMJCKI2.mjs";
|
|
23
23
|
import {
|
|
24
24
|
deptLabelFromCharter
|
|
25
25
|
} from "./chunk-JA65ZG3H.mjs";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
enqueuePostCloseDebrief,
|
|
6
6
|
hasPendingDeptPostCloseDebrief
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DCSERRXG.mjs";
|
|
8
8
|
import {
|
|
9
9
|
defineTool
|
|
10
10
|
} from "./chunk-DFJFMZX6.mjs";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
isOrgPipelineCharter,
|
|
25
25
|
resolvePeerIsCeoAgent
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WPMJCKI2.mjs";
|
|
27
27
|
import {
|
|
28
28
|
loadTeamCharter
|
|
29
29
|
} from "./chunk-KDZWHGGN.mjs";
|
|
@@ -8,6 +8,11 @@ import {
|
|
|
8
8
|
requiredDurationHoursForSoakScenario,
|
|
9
9
|
startMemorySoakSession
|
|
10
10
|
} from "./chunk-XQUKAHWK.mjs";
|
|
11
|
+
import {
|
|
12
|
+
exportMemoryPortabilitySnapshot,
|
|
13
|
+
importMemoryPortabilitySnapshot,
|
|
14
|
+
verifyMemoryPortabilitySnapshot
|
|
15
|
+
} from "./chunk-6SJTUWEO.mjs";
|
|
11
16
|
import {
|
|
12
17
|
REQUIRED_PRODUCT_ACCEPTANCE_FLOWS,
|
|
13
18
|
buildMemoryProductAcceptanceSummary,
|
|
@@ -27,15 +32,10 @@ import {
|
|
|
27
32
|
suppressMemoryRecords,
|
|
28
33
|
updateMemoryRecordVisibility
|
|
29
34
|
} from "./chunk-ZZLJUAEK.mjs";
|
|
30
|
-
import {
|
|
31
|
-
exportMemoryPortabilitySnapshot,
|
|
32
|
-
importMemoryPortabilitySnapshot,
|
|
33
|
-
verifyMemoryPortabilitySnapshot
|
|
34
|
-
} from "./chunk-6SJTUWEO.mjs";
|
|
35
35
|
import {
|
|
36
36
|
readLastMemoryRuntimeEvalReport,
|
|
37
37
|
runMemoryRuntimeV2SelfEval
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JXDHNASC.mjs";
|
|
39
39
|
import {
|
|
40
40
|
buildSkillRegistryReport,
|
|
41
41
|
readLastSkillRegistryReport
|
|
@@ -2,13 +2,25 @@
|
|
|
2
2
|
var TRANSCRIPT_BUDGET_BYTES_PER_TOKEN = 4;
|
|
3
3
|
var TRANSCRIPT_CONTEXT_WINDOW_RATIO = 0.35;
|
|
4
4
|
var MIN_TRANSCRIPT_BUDGET_BYTES = 64 * 1024;
|
|
5
|
-
var
|
|
5
|
+
var DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES = 128 * 1024;
|
|
6
|
+
var HARD_MAX_TRANSCRIPT_BUDGET_BYTES = 4 * 1024 * 1024;
|
|
6
7
|
function positiveInteger(value) {
|
|
7
8
|
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
|
|
8
9
|
return void 0;
|
|
9
10
|
}
|
|
10
11
|
return Math.trunc(value);
|
|
11
12
|
}
|
|
13
|
+
function readMaxTranscriptBudgetBytes(env = process.env) {
|
|
14
|
+
const raw = env.XKZOOM_NATIVE_TRANSCRIPT_MAX_REQUEST_BYTES?.trim();
|
|
15
|
+
if (!raw) {
|
|
16
|
+
return DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES;
|
|
17
|
+
}
|
|
18
|
+
const parsed = Number.parseInt(raw, 10);
|
|
19
|
+
if (!Number.isFinite(parsed) || parsed <= 0) {
|
|
20
|
+
return DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES;
|
|
21
|
+
}
|
|
22
|
+
return Math.min(HARD_MAX_TRANSCRIPT_BUDGET_BYTES, Math.max(MIN_TRANSCRIPT_BUDGET_BYTES, parsed));
|
|
23
|
+
}
|
|
12
24
|
function resolveTranscriptBudgetBytesForContextWindow(contextWindowTokens) {
|
|
13
25
|
const tokens = positiveInteger(contextWindowTokens);
|
|
14
26
|
if (tokens === void 0) {
|
|
@@ -18,7 +30,7 @@ function resolveTranscriptBudgetBytesForContextWindow(contextWindowTokens) {
|
|
|
18
30
|
tokens * TRANSCRIPT_CONTEXT_WINDOW_RATIO * TRANSCRIPT_BUDGET_BYTES_PER_TOKEN
|
|
19
31
|
);
|
|
20
32
|
return Math.min(
|
|
21
|
-
|
|
33
|
+
readMaxTranscriptBudgetBytes(),
|
|
22
34
|
Math.max(MIN_TRANSCRIPT_BUDGET_BYTES, estimated)
|
|
23
35
|
);
|
|
24
36
|
}
|
|
@@ -28,6 +40,7 @@ function buildNativeTranscriptBudgetForContextWindow(contextWindowTokens) {
|
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
export {
|
|
43
|
+
DEFAULT_MAX_NATIVE_TRANSCRIPT_BUDGET_BYTES,
|
|
31
44
|
resolveTranscriptBudgetBytesForContextWindow,
|
|
32
45
|
buildNativeTranscriptBudgetForContextWindow
|
|
33
46
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeCompactOwnedTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KPDVZFJY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
COMPACT_OWNED_TOOLS
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TVH4LII3.mjs";
|
|
7
7
|
|
|
8
8
|
// src/owned-tools/compact/gateway-tool-factory.ts
|
|
9
9
|
function jsonToolResult(payload) {
|
|
@@ -5,24 +5,24 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
init_register_owned_providers,
|
|
7
7
|
registerDefaultOwnedProviders
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D3N7EHB2.mjs";
|
|
9
9
|
import {
|
|
10
10
|
diagnoseToolUseInputReadiness,
|
|
11
11
|
finalizeToolUseInputForExecution
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3KJHUTOO.mjs";
|
|
13
13
|
import {
|
|
14
14
|
augmentOwnedToolEnvelopeWithRoot,
|
|
15
15
|
buildOwnedToolErrorEnvelope,
|
|
16
16
|
classifyToolExecutionErrorMessage,
|
|
17
17
|
formatOwnedToolResultEnvelope,
|
|
18
18
|
normalizeOwnedToolExecuteOutcome
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GIC2RBVM.mjs";
|
|
20
20
|
import {
|
|
21
21
|
isMemoryWorkspacePath
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2VSERWT6.mjs";
|
|
23
23
|
import {
|
|
24
24
|
validatePlannedToolAction
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MBOWNG3A.mjs";
|
|
26
26
|
import {
|
|
27
27
|
formatToolValidationError
|
|
28
28
|
} from "./chunk-KWQEFCOY.mjs";
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
OWNED_TURN_TOOL_NAMES,
|
|
32
32
|
buildOwnedTurnToolSchemas,
|
|
33
33
|
isOwnedTurnToolName
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3ZH273T7.mjs";
|
|
35
35
|
import {
|
|
36
36
|
evaluateGroupToolCallGate
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JFFBD5TV.mjs";
|
|
38
38
|
import {
|
|
39
39
|
beginToolSideEffect,
|
|
40
40
|
completeToolSideEffect,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildMvpAnthropicToolSchemas,
|
|
3
3
|
executeAnthropicToolUse
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TADSGGK2.mjs";
|
|
5
5
|
import {
|
|
6
6
|
appendNativeStreamTextDelta,
|
|
7
7
|
mergeNativeStreamTextDelta,
|
|
@@ -9,13 +9,19 @@ import {
|
|
|
9
9
|
mergeOpenAiToolCallDelta,
|
|
10
10
|
readNativeStreamBlockMinChars,
|
|
11
11
|
readNativeStreamLiveDeliverEnabled
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MKYCBV3H.mjs";
|
|
13
13
|
import {
|
|
14
14
|
parseOpenAiCompletionsSseDataLine
|
|
15
15
|
} from "./chunk-C36JYBG7.mjs";
|
|
16
16
|
import {
|
|
17
17
|
selectOpenAiCompletionsAdapter
|
|
18
18
|
} from "./chunk-PJDUIH5J.mjs";
|
|
19
|
+
import {
|
|
20
|
+
applyConfiguredMaxTokens,
|
|
21
|
+
fetchNativeProviderWithRetry,
|
|
22
|
+
formatRequestShape,
|
|
23
|
+
stringifyJsonRequestBody
|
|
24
|
+
} from "./chunk-E5LABIPO.mjs";
|
|
19
25
|
import {
|
|
20
26
|
applyOpenAiProviderAccelerationToRequestBody
|
|
21
27
|
} from "./chunk-JHQIGDVB.mjs";
|
|
@@ -433,15 +439,37 @@ async function runNativeOpenAiCompletionsTurnToDispatcher(params) {
|
|
|
433
439
|
if (params.providerAccelerationPlan || providerAcceleration.application.applied || providerAcceleration.application.warnings.length > 0) {
|
|
434
440
|
params.log(formatProviderAccelerationApplication(providerAcceleration.application));
|
|
435
441
|
}
|
|
442
|
+
applyConfiguredMaxTokens(requestBody, cfg.maxTokens);
|
|
443
|
+
const { bodyText, bodyBytes } = stringifyJsonRequestBody(requestBody);
|
|
436
444
|
params.log(
|
|
437
|
-
`[XKZOOM][native-reply][openai-turn] POST ${url} provider=${cfg.providerId} model=${cfg.model} adapter=${adapter.id} iteration=${iteration} tools=${toolsForRequest ? toolsForRequest.length : 0} tool_choice=${toolChoiceLog} transcriptTurns=${messages.filter((m) => m.role !== "system").length}`
|
|
445
|
+
`[XKZOOM][native-reply][openai-turn] POST ${url} provider=${cfg.providerId} model=${cfg.model} adapter=${adapter.id} iteration=${iteration} tools=${toolsForRequest ? toolsForRequest.length : 0} tool_choice=${toolChoiceLog} transcriptTurns=${messages.filter((m) => m.role !== "system").length} ` + formatRequestShape({
|
|
446
|
+
bodyBytes,
|
|
447
|
+
messages,
|
|
448
|
+
tools: toolsForRequest,
|
|
449
|
+
maxTokens: requestBody.max_tokens
|
|
450
|
+
})
|
|
451
|
+
);
|
|
452
|
+
const res = await fetchNativeProviderWithRetry(
|
|
453
|
+
url,
|
|
454
|
+
{
|
|
455
|
+
method: "POST",
|
|
456
|
+
headers: adapter.buildHeaders(cfg),
|
|
457
|
+
body: bodyText,
|
|
458
|
+
signal: params.signal
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
label: "openai-turn",
|
|
462
|
+
providerId: cfg.providerId,
|
|
463
|
+
model: cfg.model,
|
|
464
|
+
adapter: adapter.id,
|
|
465
|
+
iteration,
|
|
466
|
+
bodyBytes,
|
|
467
|
+
messages,
|
|
468
|
+
tools: toolsForRequest,
|
|
469
|
+
maxTokens: requestBody.max_tokens,
|
|
470
|
+
log: params.log
|
|
471
|
+
}
|
|
438
472
|
);
|
|
439
|
-
const res = await fetch(url, {
|
|
440
|
-
method: "POST",
|
|
441
|
-
headers: adapter.buildHeaders(cfg),
|
|
442
|
-
body: JSON.stringify(requestBody),
|
|
443
|
-
signal: params.signal
|
|
444
|
-
});
|
|
445
473
|
if (!res.ok) {
|
|
446
474
|
const t = await res.text();
|
|
447
475
|
if (policyToolChoiceApplied && requestAttempt === 0 && isOpenAiToolChoiceCompatibilityHttpError(res.status, t)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OWNED_INTERNAL_TOOL_CATALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3ZH273T7.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));
|
|
@@ -175,6 +175,9 @@ function createInterruptedTurnSnapshot(params) {
|
|
|
175
175
|
...clipText(errMessage, MAX_PREVIEW_CHARS) ? { errorMessage: clipText(errMessage, MAX_PREVIEW_CHARS) } : {}
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
|
+
function hasInterruptedTurnRecoveryEvidence(snapshot) {
|
|
179
|
+
return snapshot.visibleTextLength > 0 || Boolean(snapshot.assistantPartialText?.trim()) || Boolean(snapshot.toolCallSummaries?.length);
|
|
180
|
+
}
|
|
178
181
|
function findLatestInterruptedTurnSnapshot(messages) {
|
|
179
182
|
for (let i = messages.length - 1; i >= 0; i -= 1) {
|
|
180
183
|
const message = messages[i];
|
|
@@ -287,6 +290,7 @@ export {
|
|
|
287
290
|
extractLastToolNameFromError,
|
|
288
291
|
formatTurnTimeoutKindForUser,
|
|
289
292
|
createInterruptedTurnSnapshot,
|
|
293
|
+
hasInterruptedTurnRecoveryEvidence,
|
|
290
294
|
findLatestInterruptedTurnSnapshot,
|
|
291
295
|
isInterruptedTurnResumeRequest,
|
|
292
296
|
findActiveInterruptedTurnSnapshotBefore,
|