@cydm/pie 4.14.0 → 4.15.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/README.md +5 -5
- package/dist/builtin/extensions/ask-user/index.js +4 -4
- package/dist/builtin/extensions/cron/index.js +70 -17
- package/dist/builtin/extensions/im-forward/index.js +889 -205
- package/dist/builtin/extensions/memory/index.js +6 -6
- package/dist/builtin/extensions/memory/package.json +1 -2
- package/dist/builtin/extensions/pie-proc/README.md +12 -3
- package/dist/builtin/extensions/pie-proc/index.js +88 -45
- package/dist/builtin/extensions/plan-mode/index.js +4 -4
- package/dist/builtin/extensions/subagent/index.js +5 -5
- package/dist/builtin/extensions/todo/index.js +4 -4
- package/dist/chunks/{chunk-FD3KBPDR.js → chunk-6AYPNTCO.js} +8 -8
- package/dist/chunks/{chunk-JJH77AUU.js → chunk-J6EZ335F.js} +8 -7
- package/dist/chunks/{chunk-EZZTMDWZ.js → chunk-JE53PC46.js} +1064 -161
- package/dist/chunks/{chunk-BOQIGMGQ.js → chunk-LIA52LJU.js} +3 -3
- package/dist/chunks/{chunk-26KRUYZH.js → chunk-MTH6QSYD.js} +1 -1
- package/dist/chunks/{chunk-UYDS75SI.js → chunk-NAMH667S.js} +11 -15
- package/dist/chunks/{chunk-IK2FR2YF.js → chunk-VWDCKHCC.js} +1 -1
- package/dist/chunks/{chunk-MCR4JYI6.js → chunk-YKV45EMY.js} +313 -149
- package/dist/chunks/{chunk-JKO42HZW.js → chunk-ZBIR5YS7.js} +1 -1
- package/dist/chunks/{chunk-KGWKRO7Z.js → chunk-ZH6EAKVM.js} +2 -2
- package/dist/chunks/{host-image-fallback-LPHB5CTL.js → host-image-fallback-GX2KXZXQ.js} +1 -1
- package/dist/chunks/{memory-git-ZJN6SPIU.js → memory-git-BJMYZHIE.js} +5 -5
- package/dist/chunks/{model-registry-GLBIUOJR.js → model-registry-T6EMM66I.js} +2 -2
- package/dist/chunks/{read-file-understanding-DFJPTTSB.js → read-file-understanding-ZRE5KDG3.js} +5 -5
- package/dist/chunks/{src-KZ7YID3I.js → src-DLAIQCKP.js} +3 -3
- package/dist/chunks/{src-ALHMJZ5R.js → src-FWL3LCBK.js} +2 -2
- package/dist/chunks/{src-LEXKDSFV.js → src-OP6LFLR6.js} +8 -4
- package/dist/chunks/{src-76Q33OY5.js → src-XJKZIY3S.js} +11 -1
- package/dist/chunks/{test-stream-OVGDTXOY.js → test-stream-P3CUEGEE.js} +1 -1
- package/dist/cli.js +408 -52
- package/models.schema.json +4 -0
- package/package.json +2 -2
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
createSharedWebSearchTool,
|
|
11
11
|
defaultShellKindForPlatform,
|
|
12
12
|
interpretShellExit
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JE53PC46.js";
|
|
14
14
|
import {
|
|
15
15
|
classifyDefaultFailure,
|
|
16
16
|
isDefaultContextOverflowError,
|
|
17
17
|
requestInteraction
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-J6EZ335F.js";
|
|
19
19
|
import {
|
|
20
20
|
getLogger
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YKV45EMY.js";
|
|
22
22
|
import {
|
|
23
23
|
Type
|
|
24
24
|
} from "./chunk-XXGYUYXI.js";
|
|
@@ -6,14 +6,16 @@ import {
|
|
|
6
6
|
ACTIVE_THINKING_LEVELS,
|
|
7
7
|
ALL_THINKING_LEVELS,
|
|
8
8
|
MODEL_CLASS_FALLBACK_ORDER,
|
|
9
|
+
deepMergePlainRecords,
|
|
9
10
|
getModelThinkingCapabilities,
|
|
10
11
|
isDisableWireCompatibleWithApi,
|
|
11
12
|
isThinkingModeCompatibleWithApi,
|
|
12
13
|
isThinkingSelectionLevel,
|
|
14
|
+
mergeModelCompat,
|
|
13
15
|
modelSupportsToolPurpose,
|
|
14
16
|
requiredCapabilityForToolPurpose,
|
|
15
17
|
sortToolModelCandidatesByCapability
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YKV45EMY.js";
|
|
17
19
|
|
|
18
20
|
// src/core/model-registry.ts
|
|
19
21
|
import * as fs2 from "fs";
|
|
@@ -34,16 +36,6 @@ function captureRegistryBaseline(state) {
|
|
|
34
36
|
auth: state.authStorage.snapshotProviderConfig()
|
|
35
37
|
};
|
|
36
38
|
}
|
|
37
|
-
function deepMergePlainRecords(base, patch) {
|
|
38
|
-
const isPlain = (v) => Boolean(v) && typeof v === "object" && !Array.isArray(v);
|
|
39
|
-
const result = isPlain(base) ? { ...base } : {};
|
|
40
|
-
if (!isPlain(patch)) return result;
|
|
41
|
-
for (const [key, value] of Object.entries(patch)) {
|
|
42
|
-
const current = result[key];
|
|
43
|
-
result[key] = isPlain(current) && isPlain(value) ? deepMergePlainRecords(current, value) : value;
|
|
44
|
-
}
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
39
|
function restoreRegistryBaseline(baseline, target) {
|
|
48
40
|
target.models = cloneModelsMap(baseline.models);
|
|
49
41
|
target.modelOrder = baseline.order.slice();
|
|
@@ -664,6 +656,7 @@ function validateCompat(value, label) {
|
|
|
664
656
|
"supportsReasoningSummary",
|
|
665
657
|
"reasoningSummary",
|
|
666
658
|
"timeoutReplay",
|
|
659
|
+
"supportsPromptCacheKey",
|
|
667
660
|
"supportsStore",
|
|
668
661
|
"supportsDeveloperRole",
|
|
669
662
|
"supportsReasoningEffort",
|
|
@@ -689,6 +682,7 @@ function validateCompat(value, label) {
|
|
|
689
682
|
"responsesContinuation",
|
|
690
683
|
"supportsReasoningSummary",
|
|
691
684
|
"timeoutReplay",
|
|
685
|
+
"supportsPromptCacheKey",
|
|
692
686
|
"supportsStore",
|
|
693
687
|
"supportsDeveloperRole",
|
|
694
688
|
"supportsReasoningEffort",
|
|
@@ -1544,7 +1538,7 @@ var ModelRegistry = class {
|
|
|
1544
1538
|
if (providerConfig.apiKey) stagedApiKeys.set(provider, providerConfig.apiKey);
|
|
1545
1539
|
if (providerConfig.apiKeyEnv) stagedEnvVars.set(provider, providerConfig.apiKeyEnv);
|
|
1546
1540
|
const existing = this.models.get(provider);
|
|
1547
|
-
if (existing && (providerConfig.baseUrl || providerConfig.api || providerConfig.headers || providerConfig.transport)) {
|
|
1541
|
+
if (existing && (providerConfig.baseUrl || providerConfig.api || providerConfig.headers || providerConfig.transport || providerConfig.compat)) {
|
|
1548
1542
|
for (const model of existing.values()) {
|
|
1549
1543
|
this.upsert({
|
|
1550
1544
|
...model,
|
|
@@ -1555,6 +1549,7 @@ var ModelRegistry = class {
|
|
|
1555
1549
|
displayName: providerConfig.displayName || model.displayName || provider,
|
|
1556
1550
|
filePlatform: providerConfig.filePlatform || model.filePlatform,
|
|
1557
1551
|
attachmentPlatform: providerConfig.attachmentPlatform || model.attachmentPlatform,
|
|
1552
|
+
compat: mergeModelCompat(model.compat, providerConfig.compat),
|
|
1558
1553
|
cacheCapability: providerConfig.cacheCapability || model.cacheCapability,
|
|
1559
1554
|
webSearch: providerConfig.webSearch || model.webSearch,
|
|
1560
1555
|
fileCapabilities: providerConfig.fileCapabilities || model.fileCapabilities,
|
|
@@ -1581,7 +1576,7 @@ var ModelRegistry = class {
|
|
|
1581
1576
|
attachmentPlatform: customModel.attachmentPlatform || providerConfig.attachmentPlatform || baseModel?.attachmentPlatform,
|
|
1582
1577
|
headers: providerConfig.headers ? { ...baseModel?.headers, ...providerConfig.headers, ...customModel.headers } : customModel.headers || baseModel?.headers,
|
|
1583
1578
|
transport: customModel.transport ?? providerConfig.transport ?? baseModel?.transport,
|
|
1584
|
-
compat:
|
|
1579
|
+
compat: mergeModelCompat(baseModel?.compat, providerConfig.compat, customModel.compat),
|
|
1585
1580
|
cacheCapability: customModel.cacheCapability || providerConfig.cacheCapability || baseModel?.cacheCapability,
|
|
1586
1581
|
webSearch: customModel.webSearch || providerConfig.webSearch || baseModel?.webSearch,
|
|
1587
1582
|
fileCapabilities: customModel.fileCapabilities || providerConfig.fileCapabilities || baseModel?.fileCapabilities
|
|
@@ -1699,7 +1694,7 @@ var ModelRegistry = class {
|
|
|
1699
1694
|
attachmentPlatform: customModel.attachmentPlatform || providerConfig.attachmentPlatform,
|
|
1700
1695
|
headers: { ...providerConfig.headers, ...customModel.headers },
|
|
1701
1696
|
transport: customModel.transport ?? providerConfig.transport,
|
|
1702
|
-
compat:
|
|
1697
|
+
compat: mergeModelCompat(providerConfig.compat, customModel.compat),
|
|
1703
1698
|
cacheCapability: customModel.cacheCapability || providerConfig.cacheCapability,
|
|
1704
1699
|
webSearch: customModel.webSearch || providerConfig.webSearch,
|
|
1705
1700
|
fileCapabilities: customModel.fileCapabilities || providerConfig.fileCapabilities
|
|
@@ -2193,7 +2188,7 @@ var ModelRegistry = class {
|
|
|
2193
2188
|
displayName: customModel.displayName || baseModel?.displayName || provider,
|
|
2194
2189
|
headers: customHeaders,
|
|
2195
2190
|
transport: customModel.transport ?? config.transport ?? baseModel?.transport,
|
|
2196
|
-
compat: customModel.compat
|
|
2191
|
+
compat: routeChanged ? mergeModelCompat(customModel.compat) : mergeModelCompat(baseModel?.compat, customModel.compat),
|
|
2197
2192
|
cacheCapability: customModel.cacheCapability || baseModel?.cacheCapability,
|
|
2198
2193
|
webSearch: customModel.webSearch || baseModel?.webSearch,
|
|
2199
2194
|
fileCapabilities: customModel.fileCapabilities || baseModel?.fileCapabilities
|
|
@@ -2351,6 +2346,7 @@ var ModelRegistry = class {
|
|
|
2351
2346
|
|
|
2352
2347
|
export {
|
|
2353
2348
|
mergeThinkingCapability,
|
|
2349
|
+
normalizeModelClassRoutes,
|
|
2354
2350
|
validatedRemoteCatalogs,
|
|
2355
2351
|
validateModelsDocumentShape,
|
|
2356
2352
|
resolveProfileRoute,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
redactText
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JE53PC46.js";
|
|
5
5
|
|
|
6
6
|
// src/commands/memory-git.ts
|
|
7
7
|
import { execFileSync } from "node:child_process";
|