@cortexkit/pi-magic-context 0.46.1 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-search-worker.js +112 -0
- package/dist/embedding-activity-ew6dshfd.js +10 -0
- package/dist/embedding-backfill-bnnytehy.js +20 -0
- package/dist/embedding-cache-7rp4gqzr.js +16 -0
- package/dist/embedding-worker.js +11 -8
- package/dist/harness-9872e0ym.js +10 -0
- package/dist/historian-calibration-extension.js +3 -2
- package/dist/index-0am8a7k1.js +152 -0
- package/dist/index-0h2mkab2.js +17 -0
- package/dist/index-135e8hvg.js +43 -0
- package/dist/{index-wv28nczk.js → index-3cgbv47m.js} +354 -38
- package/dist/index-419bndtm.js +2309 -0
- package/dist/index-544c0e0x.js +3026 -0
- package/dist/index-5hd7h4rr.js +3098 -0
- package/dist/index-5jp1h0bz.js +750 -0
- package/dist/index-603mt6nm.js +171 -0
- package/dist/index-674f6qs2.js +16 -0
- package/dist/{index-r01b1b78.js → index-6pgq5ns2.js} +157 -2454
- package/dist/index-72bdc1bd.js +3591 -0
- package/dist/index-8976mezv.js +209 -0
- package/dist/{index-td885aah.js → index-8y5knskr.js} +98 -231
- package/dist/{index-ykb8kkm3.js → index-98z1c1r0.js} +14599 -22287
- package/dist/index-9p40dgkm.js +22 -0
- package/dist/index-9x1f96r8.js +11 -0
- package/dist/{index-266qrgss.js → index-9xb0axhc.js} +301 -27
- package/dist/{index-phh7e055.js → index-bgmv2kaf.js} +28 -28
- package/dist/index-dkx0b1kt.js +514 -0
- package/dist/{index-7n8gb6j3.js → index-f956htf3.js} +28 -31
- package/dist/index-fapenpch.js +13 -0
- package/dist/index-fm3ksh5e.js +1060 -0
- package/dist/{index-2p1e8706.js → index-fp37he9a.js} +3 -3
- package/dist/index-hrf13mn3.js +2388 -0
- package/dist/index-pvm4pd5d.js +3069 -0
- package/dist/index-r7xg4hvw.js +3480 -0
- package/dist/index-rt5jgzp1.js +1127 -0
- package/dist/{index-n3g5mwa8.js → index-wrm4nbj7.js} +3 -3
- package/dist/index-xjqheg7a.js +931 -0
- package/dist/index-yhzhdp3m.js +143 -0
- package/dist/{index-w76x3af7.js → index-zrr5t5a7.js} +1 -3
- package/dist/index.js +6345 -2585
- package/dist/logger-v3dsxdnm.js +19 -0
- package/dist/message-index-bounded-t7vvty76.js +120 -0
- package/dist/{message-time-backfill-4688z1k2.js → message-time-backfill-4ndf7hrq.js} +7 -6
- package/dist/migration-worker.js +24 -16
- package/dist/project-embedding-registry-jy2hmq28.js +85 -0
- package/dist/raw-ordinal-warmup-worker.js +60 -0
- package/dist/{read-session-chunk-tc6yn2pe.js → read-session-chunk-47pjn7fz.js} +12 -6
- package/dist/read-session-raw-yn8nawav.js +55 -0
- package/dist/{safe-notification-target-6cn3z99t.js → safe-notification-target-3c1ns931.js} +3 -2
- package/dist/search-42szfhwp.js +40 -0
- package/dist/sqlite-3yye76ht.js +44 -0
- package/dist/sqlite-context-pragmas-gcgch6qz.js +6 -0
- package/dist/storage-memory-1z20y55x.js +71 -0
- package/dist/storage-tags-jym5z6yk.js +127 -0
- package/dist/subagent-entry.js +36 -16
- package/dist/transformers-node-wasm.js +18415 -18415
- package/package.json +3 -3
- package/dist/index-4vfrjwf6.js +0 -7737
- package/dist/index-xvw8zptx.js +0 -5123
- /package/dist/{index-901ekbga.js → index-5prbx026.js} +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import {
|
|
2
|
+
updateTagByteSize2,
|
|
3
|
+
getRecentTagOwnerMessageIds2,
|
|
4
|
+
getActiveTagTokenAggregate2,
|
|
5
|
+
AGE_RECLAIM_MIN_TOKENS2,
|
|
6
|
+
getOldestActiveUnprotectedToolTags2,
|
|
7
|
+
getActiveToolTagsForAgeReclaim2,
|
|
8
|
+
getTriggerTagTokenUpperBound2,
|
|
9
|
+
getActiveTagTokenTotalsByMessage2,
|
|
10
|
+
updateTagInputByteSize2,
|
|
11
|
+
updateTagTokenCount2,
|
|
12
|
+
getPersistedToolTagAccounting2,
|
|
13
|
+
getAllStatusTagTokenTotalsFlat2,
|
|
14
|
+
getReasoningTokenEstimatesByMessage2,
|
|
15
|
+
tryGetReasoningTokenEstimatesByMessage2,
|
|
16
|
+
getMaxTagNumberByOwnerMessage2,
|
|
17
|
+
scanTagOwnerSummary2,
|
|
18
|
+
scanTagOwnerDelta2,
|
|
19
|
+
updateTagInputTokenCount2,
|
|
20
|
+
tagTokenCountIsNull2,
|
|
21
|
+
backfillTagTokenCounts2,
|
|
22
|
+
insertTag2,
|
|
23
|
+
updateTagStatus2,
|
|
24
|
+
getInertWhitespaceAssistantTags2,
|
|
25
|
+
updateTagDropMode2,
|
|
26
|
+
updateCavemanDepth2,
|
|
27
|
+
updateTagMessageId2,
|
|
28
|
+
hasPiFallbackMessageTags2,
|
|
29
|
+
findAdoptableFallbackTags2,
|
|
30
|
+
adoptFallbackTagMessageId2,
|
|
31
|
+
foldShrunkPartTags2,
|
|
32
|
+
hasPiFallbackToolOwnerTags2,
|
|
33
|
+
findPiFallbackToolOwnerTags2,
|
|
34
|
+
PiTagIdentityConflictError2,
|
|
35
|
+
getPiMessageTagCandidates2,
|
|
36
|
+
findPiTagIdentityConflict2,
|
|
37
|
+
adoptPiFallbackToolOwnerTag2,
|
|
38
|
+
adoptPiFallbackMessageTag2,
|
|
39
|
+
markTagsCompactedByMessageIds2,
|
|
40
|
+
deleteTagsByMessageId2,
|
|
41
|
+
getMaxTagNumberBySession2,
|
|
42
|
+
getTagNumberByMessageId2,
|
|
43
|
+
getAssignableTagNumberByMessageId2,
|
|
44
|
+
getMinMessageTagNumberForRawId2,
|
|
45
|
+
deriveTagLoadFloor2,
|
|
46
|
+
TAG_SELECT_COLUMNS2,
|
|
47
|
+
getTagsBySession2,
|
|
48
|
+
getActiveTagsBySession2,
|
|
49
|
+
getTagsForPendingOperations2,
|
|
50
|
+
getTagsByNumbers2,
|
|
51
|
+
getNewestToolTagNumbers2,
|
|
52
|
+
getDroppedTagsByNumbers2,
|
|
53
|
+
getMaxDroppedTagNumber2,
|
|
54
|
+
getTagById2,
|
|
55
|
+
getTopNBySize2,
|
|
56
|
+
getToolTagNumberByOwner2,
|
|
57
|
+
getNullOwnerToolTag2,
|
|
58
|
+
adoptNullOwnerToolTag2,
|
|
59
|
+
getCandidateToolOwners2,
|
|
60
|
+
pickNearestPriorOwner2
|
|
61
|
+
} from "./index-5hd7h4rr.js";
|
|
62
|
+
import"./index-8y5knskr.js";
|
|
63
|
+
import"./index-3cgbv47m.js";
|
|
64
|
+
import"./index-9xb0axhc.js";
|
|
65
|
+
import"./index-f956htf3.js";
|
|
66
|
+
import"./index-0h2mkab2.js";
|
|
67
|
+
export {
|
|
68
|
+
AGE_RECLAIM_MIN_TOKENS2 as AGE_RECLAIM_MIN_TOKENS,
|
|
69
|
+
PiTagIdentityConflictError2 as PiTagIdentityConflictError,
|
|
70
|
+
TAG_SELECT_COLUMNS2 as TAG_SELECT_COLUMNS,
|
|
71
|
+
adoptFallbackTagMessageId2 as adoptFallbackTagMessageId,
|
|
72
|
+
adoptNullOwnerToolTag2 as adoptNullOwnerToolTag,
|
|
73
|
+
adoptPiFallbackMessageTag2 as adoptPiFallbackMessageTag,
|
|
74
|
+
adoptPiFallbackToolOwnerTag2 as adoptPiFallbackToolOwnerTag,
|
|
75
|
+
backfillTagTokenCounts2 as backfillTagTokenCounts,
|
|
76
|
+
deleteTagsByMessageId2 as deleteTagsByMessageId,
|
|
77
|
+
deriveTagLoadFloor2 as deriveTagLoadFloor,
|
|
78
|
+
findAdoptableFallbackTags2 as findAdoptableFallbackTags,
|
|
79
|
+
findPiFallbackToolOwnerTags2 as findPiFallbackToolOwnerTags,
|
|
80
|
+
findPiTagIdentityConflict2 as findPiTagIdentityConflict,
|
|
81
|
+
foldShrunkPartTags2 as foldShrunkPartTags,
|
|
82
|
+
getActiveTagTokenAggregate2 as getActiveTagTokenAggregate,
|
|
83
|
+
getActiveTagTokenTotalsByMessage2 as getActiveTagTokenTotalsByMessage,
|
|
84
|
+
getActiveTagsBySession2 as getActiveTagsBySession,
|
|
85
|
+
getActiveToolTagsForAgeReclaim2 as getActiveToolTagsForAgeReclaim,
|
|
86
|
+
getAllStatusTagTokenTotalsFlat2 as getAllStatusTagTokenTotalsFlat,
|
|
87
|
+
getAssignableTagNumberByMessageId2 as getAssignableTagNumberByMessageId,
|
|
88
|
+
getCandidateToolOwners2 as getCandidateToolOwners,
|
|
89
|
+
getDroppedTagsByNumbers2 as getDroppedTagsByNumbers,
|
|
90
|
+
getInertWhitespaceAssistantTags2 as getInertWhitespaceAssistantTags,
|
|
91
|
+
getMaxDroppedTagNumber2 as getMaxDroppedTagNumber,
|
|
92
|
+
getMaxTagNumberByOwnerMessage2 as getMaxTagNumberByOwnerMessage,
|
|
93
|
+
getMaxTagNumberBySession2 as getMaxTagNumberBySession,
|
|
94
|
+
getMinMessageTagNumberForRawId2 as getMinMessageTagNumberForRawId,
|
|
95
|
+
getNewestToolTagNumbers2 as getNewestToolTagNumbers,
|
|
96
|
+
getNullOwnerToolTag2 as getNullOwnerToolTag,
|
|
97
|
+
getOldestActiveUnprotectedToolTags2 as getOldestActiveUnprotectedToolTags,
|
|
98
|
+
getPersistedToolTagAccounting2 as getPersistedToolTagAccounting,
|
|
99
|
+
getPiMessageTagCandidates2 as getPiMessageTagCandidates,
|
|
100
|
+
getReasoningTokenEstimatesByMessage2 as getReasoningTokenEstimatesByMessage,
|
|
101
|
+
getRecentTagOwnerMessageIds2 as getRecentTagOwnerMessageIds,
|
|
102
|
+
getTagById2 as getTagById,
|
|
103
|
+
getTagNumberByMessageId2 as getTagNumberByMessageId,
|
|
104
|
+
getTagsByNumbers2 as getTagsByNumbers,
|
|
105
|
+
getTagsBySession2 as getTagsBySession,
|
|
106
|
+
getTagsForPendingOperations2 as getTagsForPendingOperations,
|
|
107
|
+
getToolTagNumberByOwner2 as getToolTagNumberByOwner,
|
|
108
|
+
getTopNBySize2 as getTopNBySize,
|
|
109
|
+
getTriggerTagTokenUpperBound2 as getTriggerTagTokenUpperBound,
|
|
110
|
+
hasPiFallbackMessageTags2 as hasPiFallbackMessageTags,
|
|
111
|
+
hasPiFallbackToolOwnerTags2 as hasPiFallbackToolOwnerTags,
|
|
112
|
+
insertTag2 as insertTag,
|
|
113
|
+
markTagsCompactedByMessageIds2 as markTagsCompactedByMessageIds,
|
|
114
|
+
pickNearestPriorOwner2 as pickNearestPriorOwner,
|
|
115
|
+
scanTagOwnerDelta2 as scanTagOwnerDelta,
|
|
116
|
+
scanTagOwnerSummary2 as scanTagOwnerSummary,
|
|
117
|
+
tagTokenCountIsNull2 as tagTokenCountIsNull,
|
|
118
|
+
tryGetReasoningTokenEstimatesByMessage2 as tryGetReasoningTokenEstimatesByMessage,
|
|
119
|
+
updateCavemanDepth2 as updateCavemanDepth,
|
|
120
|
+
updateTagByteSize2 as updateTagByteSize,
|
|
121
|
+
updateTagDropMode2 as updateTagDropMode,
|
|
122
|
+
updateTagInputByteSize2 as updateTagInputByteSize,
|
|
123
|
+
updateTagInputTokenCount2 as updateTagInputTokenCount,
|
|
124
|
+
updateTagMessageId2 as updateTagMessageId,
|
|
125
|
+
updateTagStatus2 as updateTagStatus,
|
|
126
|
+
updateTagTokenCount2 as updateTagTokenCount
|
|
127
|
+
};
|
package/dist/subagent-entry.js
CHANGED
|
@@ -1,36 +1,56 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOKEN_BUDGET_TOOL_REFUSAL
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-hrf13mn3.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
setHarness2
|
|
6
|
+
} from "./index-0h2mkab2.js";
|
|
7
|
+
import {
|
|
8
|
+
log2
|
|
9
|
+
} from "./index-f956htf3.js";
|
|
10
|
+
import {
|
|
11
|
+
resolveProjectIdentityForSession
|
|
12
|
+
} from "./index-dkx0b1kt.js";
|
|
8
13
|
import {
|
|
9
|
-
resolveProjectIdentityForSession,
|
|
10
14
|
openDatabase
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
+
} from "./index-r7xg4hvw.js";
|
|
16
|
+
import"./index-3cgbv47m.js";
|
|
17
|
+
import"./index-fapenpch.js";
|
|
18
|
+
import"./index-603mt6nm.js";
|
|
19
|
+
import"./index-72bdc1bd.js";
|
|
20
|
+
import"./index-8y5knskr.js";
|
|
21
|
+
import"./index-135e8hvg.js";
|
|
22
|
+
import"./index-8976mezv.js";
|
|
23
|
+
import"./index-9xb0axhc.js";
|
|
15
24
|
import {
|
|
16
25
|
loadPiConfig,
|
|
17
26
|
ensureProjectRegisteredFromPiDirectory,
|
|
18
27
|
resolvePiHarnessKind,
|
|
19
28
|
registerMagicContextTools
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
29
|
+
} from "./index-98z1c1r0.js";
|
|
30
|
+
import"./index-6pgq5ns2.js";
|
|
31
|
+
import"./index-bgmv2kaf.js";
|
|
32
|
+
import"./index-419bndtm.js";
|
|
33
|
+
import"./index-fm3ksh5e.js";
|
|
34
|
+
import"./index-544c0e0x.js";
|
|
35
|
+
import"./index-9p40dgkm.js";
|
|
36
|
+
import"./index-yhzhdp3m.js";
|
|
37
|
+
import"./index-0am8a7k1.js";
|
|
38
|
+
import"./index-5jp1h0bz.js";
|
|
39
|
+
import"./index-5hd7h4rr.js";
|
|
40
|
+
import"./index-rt5jgzp1.js";
|
|
41
|
+
import"./index-pvm4pd5d.js";
|
|
42
|
+
import"./index-xjqheg7a.js";
|
|
43
|
+
import"./index-fp37he9a.js";
|
|
23
44
|
import {
|
|
24
45
|
setStoragePrivatePermissionEnforcement
|
|
25
46
|
} from "./index-vf38qhee.js";
|
|
26
|
-
import"./index-2p1e8706.js";
|
|
27
47
|
|
|
28
48
|
// src/subagent-entry.ts
|
|
29
49
|
import { readFileSync } from "node:fs";
|
|
30
50
|
var SUBAGENT_DREAMER_ACTIONS_FLAG = "magic-context-dreamer-actions";
|
|
31
51
|
var openedDb;
|
|
32
52
|
function magicContextSubagentExtension(pi) {
|
|
33
|
-
|
|
53
|
+
setHarness2(resolvePiHarnessKind());
|
|
34
54
|
pi.registerFlag(SUBAGENT_DREAMER_ACTIONS_FLAG, {
|
|
35
55
|
description: "Register ctx_memory with dreamer actions for Magic Context subagents.",
|
|
36
56
|
type: "boolean",
|
|
@@ -74,10 +94,10 @@ function magicContextSubagentExtension(pi) {
|
|
|
74
94
|
todowriteCommandEnabled: false,
|
|
75
95
|
promptSurface: registrationPromptSurface
|
|
76
96
|
});
|
|
77
|
-
|
|
97
|
+
log2(`[pi-subagent] registered tools: ctx_search${dreamerActionsEnabled ? ", ctx_memory" : ""}${cfg.todowrite.enabled ? ", todowrite" : ""}` + ` (ctx_note/ctx_expand omitted: --no-session child;` + ` memory=${cfg.memory.enabled}, embedding=${cfg.embedding.provider !== "off"},` + ` git_commits=${cfg.memory.git_commit_indexing.enabled}, dreamer_actions=${dreamerActionsEnabled})`);
|
|
78
98
|
} catch (err) {
|
|
79
99
|
const message = err instanceof Error ? err.message : String(err);
|
|
80
|
-
|
|
100
|
+
log2(`[pi-subagent] startup failed: ${message}`);
|
|
81
101
|
process.exitCode = 1;
|
|
82
102
|
throw err;
|
|
83
103
|
}
|