@adecore/agent-contracts 0.62.1 → 0.63.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/agent.d.ts +1 -4
- package/dist/agent.js +2 -7
- package/dist/chat.d.ts +583 -16
- package/dist/chat.js +24 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/model.d.ts +8 -0
- package/dist/model.js +13 -1
- package/dist/protocol.d.ts +397 -11
- package/dist/tool-edits.d.ts +10 -0
- package/dist/tool-edits.js +31 -0
- package/dist/visual.d.ts +1 -0
- package/dist/visual.js +3 -1
- package/package.json +3 -3
- package/src/agent.ts +3 -11
- package/src/chat.ts +45 -1
- package/src/index.ts +9 -4
- package/src/model.ts +16 -1
- package/src/tool-edits.ts +53 -0
- package/src/visual.ts +4 -1
package/dist/agent.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const KNOWN_AGENT_KINDS: readonly ['claude', 'codex', 'gemini', 'copilot', 'apple'];
|
|
3
|
-
export type KnownAgentKind = (typeof KNOWN_AGENT_KINDS)[number];
|
|
4
2
|
export declare const AGENT_KIND_MAX_LENGTH = 32;
|
|
5
3
|
export declare const AgentKindSchema: z.ZodString;
|
|
6
|
-
export type AgentKind =
|
|
7
|
-
export declare function isKnownAgentKind(kind: string): kind is KnownAgentKind;
|
|
4
|
+
export type AgentKind = string;
|
|
8
5
|
export declare const AgentStatusSchema: z.ZodEnum<{
|
|
9
6
|
error: "error";
|
|
10
7
|
exited: "exited";
|
package/dist/agent.js
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SessionIdSchema } from './ids.js';
|
|
3
|
-
// The agent CLIs this version knows by name. Whether one has a chat backend or a hook normalizer is a
|
|
4
|
-
// capability on its provider, not a second list: a CLI without hooks still opens as a terminal agent.
|
|
5
|
-
export const KNOWN_AGENT_KINDS = ['claude', 'codex', 'gemini', 'copilot', 'apple'];
|
|
6
3
|
export const AGENT_KIND_MAX_LENGTH = 32;
|
|
7
4
|
/*
|
|
8
5
|
* Open, so a host can offer a CLI this version never heard of and an older client still reads a reply
|
|
9
|
-
* that names it. Bounded to an identifier, since a kind ends up in ids, paths and command lines.
|
|
6
|
+
* that names it. Bounded to an identifier, since a kind ends up in ids, paths and command lines. The CLIs
|
|
7
|
+
* a host offers are the providers of its registry, and what one can do is a capability on its provider.
|
|
10
8
|
*/
|
|
11
9
|
export const AgentKindSchema = z
|
|
12
10
|
.string()
|
|
13
11
|
.min(1)
|
|
14
12
|
.max(AGENT_KIND_MAX_LENGTH)
|
|
15
13
|
.regex(/^[a-z][a-z0-9-]*$/);
|
|
16
|
-
export function isKnownAgentKind(kind) {
|
|
17
|
-
return KNOWN_AGENT_KINDS.includes(kind);
|
|
18
|
-
}
|
|
19
14
|
// `exited` is the daemon's own reading, not a hook's: the CLI went down with its shell without
|
|
20
15
|
// ever reporting an end, so the node offers a resume instead of a status that stays on running.
|
|
21
16
|
export const AgentStatusSchema = z.enum(['running', 'needs-you', 'idle', 'error', 'exited']);
|