@cydm/pie 1.0.47 → 1.0.49
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 +21 -1
- package/dist/builtin/extensions/ask-user/index.js +1 -1
- package/dist/builtin/extensions/plan-mode/index.js +1 -1
- package/dist/builtin/extensions/subagent/index.js +2 -2
- package/dist/builtin/extensions/todo/index.js +1 -1
- package/dist/chunks/{chunk-IJMP3JTX.js → chunk-7RYOIXA2.js} +212 -43
- package/dist/chunks/{chunk-U4B6RJ6Z.js → chunk-J6PEH6ST.js} +1 -1
- package/dist/cli.js +446 -181
- package/package.json +2 -2
- package/dist/builtin/extensions/kimi-attachments/index.js +0 -47
- package/dist/builtin/extensions/kimi-attachments/package.json +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cydm/pie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"description": "Pie AI Agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test": "npm run test:offline",
|
|
19
19
|
"pretest:offline": "npm run build --workspace @pie/agent-framework && npm run build --workspace @pie/shared-headless-capabilities && npm run build",
|
|
20
20
|
"posttest:offline": "node --test --import tsx test/remote-model-catalog.test.ts",
|
|
21
|
-
"test:offline": "node --test --import tsx test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-
|
|
21
|
+
"test:offline": "node --test --import tsx test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-provider.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/extensions-enablement.test.ts test/skill-tool-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.test.ts test/runtime-mode-context.test.ts test/tool-policy.test.ts test/retry-policy.test.ts test/yolo-command.test.ts test/footer-lifecycle.test.ts test/files-utils.test.ts test/source-size-guard.test.ts test/runtime-logger.test.ts test/release-readiness.test.ts test/package-artifacts.test.ts test/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/skills-agents-discovery.test.ts test/skills-symlink.test.ts test/model-overrides.test.ts test/auth-storage.test.ts test/extension-register-provider.test.ts test/extension-reload.test.ts test/extension-terminal-input.test.ts test/extension-session-before-events.test.ts test/extension-widgets.test.ts test/extension-render-hint.test.ts test/extension-oauth-restore.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/interactive-controller-title.test.ts test/todo-title.terminal.test.ts test/plan-mode-extension.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/direct-bash.test.ts test/terminal-bell.test.ts test/calm-mode.test.ts test/project-root.test.ts test/guard-advisory-context.test.ts test/clear-command-usage.test.ts test/daily-agent-smoke.terminal.test.ts test/slash-menu-toggles.terminal.test.ts",
|
|
22
22
|
"test:all": "npm run test:offline && npm run test:terminal:vitest",
|
|
23
23
|
"test:terminal:vitest": "vitest run test/mention-file-select.terminal.test.ts test/tool-partial-display.terminal.test.ts test/viewport-position-final.test.ts test/resume-header.terminal.test.ts --no-file-parallelism",
|
|
24
24
|
"test:todo-tui": "PIE_REAL_TODO_TUI=1 node --test --import tsx test/todo-closure.terminal.test.ts",
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import "../../../chunks/chunk-LZQXQOPJ.js";
|
|
3
|
-
|
|
4
|
-
// builtin/extensions/kimi-attachments/index.ts
|
|
5
|
-
function isKimiAttachmentPlatform(model) {
|
|
6
|
-
return model.attachmentPlatform === "kimi" || model.filePlatform === "kimi";
|
|
7
|
-
}
|
|
8
|
-
function getModality(mimeType) {
|
|
9
|
-
if (mimeType.startsWith("image/")) return "image";
|
|
10
|
-
if (mimeType.startsWith("video/")) return "video";
|
|
11
|
-
return "file";
|
|
12
|
-
}
|
|
13
|
-
function kimiAttachmentsExtension(ctx) {
|
|
14
|
-
ctx.log("Kimi attachment extension loaded");
|
|
15
|
-
ctx.registerAttachmentHandler({
|
|
16
|
-
name: "kimi-native-attachments",
|
|
17
|
-
priority: 100,
|
|
18
|
-
matches(model, attachment) {
|
|
19
|
-
return isKimiAttachmentPlatform(model) && Boolean(attachment.fileId) && getModality(attachment.mimeType) !== "file";
|
|
20
|
-
},
|
|
21
|
-
async prepare(_model, attachment, prepareCtx) {
|
|
22
|
-
const fileId = attachment.fileId;
|
|
23
|
-
if (!fileId) {
|
|
24
|
-
return {
|
|
25
|
-
items: [{ type: "text", text: `[${attachment.id}]` }],
|
|
26
|
-
warnings: ["\u9644\u4EF6\u7F3A\u5C11 fileId\uFF0C\u65E0\u6CD5\u8D70 Kimi \u539F\u751F\u5F15\u7528"]
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
const modality = getModality(attachment.mimeType);
|
|
30
|
-
const url = `ms://${fileId}`;
|
|
31
|
-
prepareCtx.log(`Kimi handler prepared ${modality} reference for ${attachment.id}`);
|
|
32
|
-
return {
|
|
33
|
-
items: [
|
|
34
|
-
{
|
|
35
|
-
type: "file-ref",
|
|
36
|
-
mimeType: attachment.mimeType,
|
|
37
|
-
url,
|
|
38
|
-
modality
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
kimiAttachmentsExtension as default
|
|
47
|
-
};
|