@gaia-ai/addon-kimi 0.6.1
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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.js +42 -0
- package/dist/src/preset.d.ts +2 -0
- package/dist/src/preset.js +5 -0
- package/package.json +26 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 keytec GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type AgentFootprint, type AgentPlugin, type GaiaAgent } from '@gaia-ai/conductor/contract';
|
|
2
|
+
export interface KimiAgentOptions {
|
|
3
|
+
model?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class KimiAgent implements GaiaAgent {
|
|
6
|
+
private readonly options;
|
|
7
|
+
readonly id = "kimi";
|
|
8
|
+
constructor(options: KimiAgentOptions);
|
|
9
|
+
launchCommand(prompt: string): string;
|
|
10
|
+
getRunLog(): Promise<string>;
|
|
11
|
+
parseFootprint(_log: string): AgentFootprint;
|
|
12
|
+
}
|
|
13
|
+
/** Config-facing factory: `kimiAgent({ model: 'moonshot-v1' })`. */
|
|
14
|
+
export declare function kimiAgent(options?: KimiAgentOptions): AgentPlugin;
|
|
15
|
+
export default kimiAgent;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { emptyAgentFootprint, } from '@gaia-ai/conductor/contract';
|
|
2
|
+
import { shellQuote } from '@gaia-ai/core';
|
|
3
|
+
export class KimiAgent {
|
|
4
|
+
options;
|
|
5
|
+
id = 'kimi';
|
|
6
|
+
constructor(options) {
|
|
7
|
+
this.options = options;
|
|
8
|
+
}
|
|
9
|
+
launchCommand(prompt) {
|
|
10
|
+
if (prompt === '') {
|
|
11
|
+
return 'kimi';
|
|
12
|
+
}
|
|
13
|
+
const parts = ['kimi', '-p', shellQuote(prompt)];
|
|
14
|
+
if (this.options.model) {
|
|
15
|
+
parts.push('--model', this.options.model);
|
|
16
|
+
}
|
|
17
|
+
parts.push('--output-format', 'text');
|
|
18
|
+
return parts.join(' ');
|
|
19
|
+
}
|
|
20
|
+
async getRunLog() {
|
|
21
|
+
return '';
|
|
22
|
+
}
|
|
23
|
+
parseFootprint(_log) {
|
|
24
|
+
// Kimi transcript footprint parsing is not implemented yet (getRunLog
|
|
25
|
+
// returns '' too); an empty footprint is the honest result until it is.
|
|
26
|
+
return emptyAgentFootprint();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Config-facing factory: `kimiAgent({ model: 'moonshot-v1' })`. */
|
|
30
|
+
export function kimiAgent(options = {}) {
|
|
31
|
+
const agent = new KimiAgent(options);
|
|
32
|
+
return {
|
|
33
|
+
kind: 'agent',
|
|
34
|
+
id: 'kimi',
|
|
35
|
+
requiredModules: [],
|
|
36
|
+
async createAgent() {
|
|
37
|
+
return agent;
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// Default export lets config auto-pick this factory without `export:`.
|
|
42
|
+
export default kimiAgent;
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gaia-ai/addon-kimi",
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "GAIA agent plugin for the Kimi Code CLI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/src/index.js",
|
|
9
|
+
"./preset": "./dist/src/preset.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/src"
|
|
13
|
+
],
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://git.key-tec.de/keytec/gaia.git",
|
|
20
|
+
"directory": "gaia-cli/addons/kimi"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@gaia-ai/conductor": "^0.6.1",
|
|
24
|
+
"@gaia-ai/core": "^0.6.1"
|
|
25
|
+
}
|
|
26
|
+
}
|