@gaia-ai/addon-kimi 0.14.2 → 0.15.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/dist/src/index.d.ts +7 -2
- package/dist/src/index.js +20 -6
- package/package.json +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type AgentFootprint, type AgentPlugin, type AgentRunIdentity, type GaiaAgent } from '@gaia-ai/conductor/contract';
|
|
2
2
|
export interface KimiAgentOptions {
|
|
3
3
|
model?: string;
|
|
4
|
+
effort?: string;
|
|
5
|
+
args?: string[];
|
|
4
6
|
}
|
|
5
7
|
export declare class KimiAgent implements GaiaAgent {
|
|
6
|
-
private readonly options;
|
|
7
8
|
readonly id = "kimi";
|
|
8
|
-
|
|
9
|
+
readonly launchWarnings?: readonly string[];
|
|
10
|
+
private readonly args;
|
|
11
|
+
private readonly model;
|
|
12
|
+
private readonly overrides;
|
|
13
|
+
constructor(options?: KimiAgentOptions);
|
|
9
14
|
launchCommand(prompt: string, _run?: AgentRunIdentity): string;
|
|
10
15
|
getRunLog(_worktreePath: string, _run?: AgentRunIdentity): Promise<string>;
|
|
11
16
|
parseFootprint(_log: string): AgentFootprint;
|
package/dist/src/index.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
import { emptyAgentFootprint, } from '@gaia-ai/conductor/contract';
|
|
1
|
+
import { emptyAgentFootprint, resolveAgentCliOptions, } from '@gaia-ai/conductor/contract';
|
|
2
2
|
import { shellQuote } from '@gaia-ai/core';
|
|
3
|
+
const KIMI_RESERVED = ['-p', '--prompt', '--output-format'];
|
|
4
|
+
const KIMI_KNOWN = [
|
|
5
|
+
{ kind: 'model', flags: ['--model', '-m'] },
|
|
6
|
+
];
|
|
3
7
|
export class KimiAgent {
|
|
4
|
-
options;
|
|
5
8
|
id = 'kimi';
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
launchWarnings;
|
|
10
|
+
args;
|
|
11
|
+
model;
|
|
12
|
+
overrides;
|
|
13
|
+
constructor(options = {}) {
|
|
14
|
+
const cli = resolveAgentCliOptions(options, KIMI_RESERVED, KIMI_KNOWN);
|
|
15
|
+
this.args = cli.args;
|
|
16
|
+
this.model = cli.model;
|
|
17
|
+
this.overrides = cli.overrides;
|
|
18
|
+
if (cli.effort !== undefined) {
|
|
19
|
+
this.launchWarnings = ['effort is unsupported and ignored'];
|
|
20
|
+
}
|
|
8
21
|
}
|
|
9
22
|
launchCommand(prompt, _run) {
|
|
10
23
|
if (prompt === '') {
|
|
11
24
|
return 'kimi';
|
|
12
25
|
}
|
|
13
26
|
const parts = ['kimi', '-p', shellQuote(prompt)];
|
|
14
|
-
if (this.
|
|
15
|
-
parts.push('--model', this.
|
|
27
|
+
if (this.model !== undefined && !this.overrides.model) {
|
|
28
|
+
parts.push('--model', shellQuote(this.model));
|
|
16
29
|
}
|
|
17
30
|
parts.push('--output-format', 'text');
|
|
31
|
+
parts.push(...this.args.map(shellQuote));
|
|
18
32
|
return parts.join(' ');
|
|
19
33
|
}
|
|
20
34
|
// Unconverted (GAIA-473): this addon has no run-log reader at all yet —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaia-ai/addon-kimi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "GAIA agent plugin for the Kimi Code CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "gaia-cli/addons/kimi"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@gaia-ai/conductor": "^0.
|
|
24
|
-
"@gaia-ai/core": "^0.
|
|
23
|
+
"@gaia-ai/conductor": "^0.15.1",
|
|
24
|
+
"@gaia-ai/core": "^0.15.1"
|
|
25
25
|
}
|
|
26
26
|
}
|