@yitom/agy-acp-map 0.1.3 → 0.1.4
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 +320 -302
- package/dist/agent-sdk.d.ts +44 -176
- package/dist/bin.js +12779 -25931
- package/dist/core/index.d.ts +2 -0
- package/dist/core/session-core.d.ts +69 -0
- package/dist/core/types.d.ts +69 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +13002 -25488
- package/dist/lib/agy-args.d.ts +23 -5
- package/dist/lib/agy-discovery.d.ts +6 -0
- package/dist/lib/agy-process.d.ts +29 -0
- package/dist/lib/map-agy-to-acp.d.ts +12 -4
- package/dist/lib/prompt-normalize.d.ts +16 -1
- package/dist/lib/session-history.d.ts +33 -0
- package/dist/lib/session-store.d.ts +10 -2
- package/dist/lib/soft-deny.d.ts +11 -0
- package/dist/lib/win32-console.d.ts +12 -0
- package/dist/router.d.ts +7 -0
- package/dist/v1/adapter.d.ts +17 -0
- package/dist/v1/app.d.ts +6 -0
- package/dist/v1/config.d.ts +8 -0
- package/dist/v1/index.d.ts +4 -0
- package/dist/v1/types.d.ts +10 -0
- package/dist/v2/adapter.d.ts +18 -0
- package/dist/v2/app.d.ts +6 -0
- package/dist/v2/config.d.ts +8 -0
- package/dist/v2/index.d.ts +4 -0
- package/dist/v2/types.d.ts +6 -0
- package/package.json +11 -4
package/dist/agent-sdk.d.ts
CHANGED
|
@@ -1,181 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
clientTerminal: boolean;
|
|
27
|
-
};
|
|
28
|
-
export interface SdkSession {
|
|
29
|
-
sessionId: string;
|
|
30
|
-
cwd: string;
|
|
31
|
-
additionalDirectories?: string[];
|
|
32
|
-
createdAt: string;
|
|
33
|
-
updatedAt: string;
|
|
34
|
-
title?: string;
|
|
35
|
-
proc: AgyProcessManager;
|
|
36
|
-
mapper: MapperState;
|
|
37
|
-
busy: boolean;
|
|
38
|
-
cancelled: boolean;
|
|
39
|
-
protocolVersion: number;
|
|
40
|
-
stderrBuf: string;
|
|
41
|
-
softDenies: SoftDenyInfo[];
|
|
42
|
-
softDenyEmitted: boolean;
|
|
43
|
-
stagedFiles: string[];
|
|
44
|
-
conversationId?: string;
|
|
45
|
-
model?: string;
|
|
46
|
-
effort?: string;
|
|
47
|
-
mode?: string;
|
|
48
|
-
agent?: string;
|
|
49
|
-
sandbox?: boolean;
|
|
50
|
-
jsonSchema?: string;
|
|
51
|
-
safety?: 'safe' | 'autonomous' | 'autonomous-unsandboxed';
|
|
52
|
-
skipPermissions?: boolean;
|
|
53
|
-
disableSlashCommands?: boolean;
|
|
54
|
-
printTimeout?: string;
|
|
55
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Official ACP v1/v2 Agent SDK Facade.
|
|
3
|
+
*
|
|
4
|
+
* All business and protocol logic has been modularized into:
|
|
5
|
+
* - src/core/ (Session lifecycle, Process supervisor, FIFO queue, Shared types)
|
|
6
|
+
* - src/v1/ (ACP v1 Production standard: Capabilities, Config, Adapter, App)
|
|
7
|
+
* - src/v2/ (ACP v2 Experimental draft: Capabilities, Config, Adapter, App)
|
|
8
|
+
* - src/router.ts (Dual v1/v2 Protocol Router)
|
|
9
|
+
*
|
|
10
|
+
* This facade maintains 100% backward compatibility with all existing imports.
|
|
11
|
+
*/
|
|
12
|
+
import { AgySessionCore } from './core/session-core.ts';
|
|
13
|
+
import { AgyAcpV1Service } from './v1/adapter.ts';
|
|
14
|
+
import { AgyAcpV2Service } from './v2/adapter.ts';
|
|
15
|
+
export { AGENT_INFO, BRIDGE_CAPABILITIES, type SdkSession } from './core/types.ts';
|
|
16
|
+
export { AgySessionCore } from './core/session-core.ts';
|
|
17
|
+
export { AgyAcpV1Service } from './v1/adapter.ts';
|
|
18
|
+
export { createAcpV1App } from './v1/app.ts';
|
|
19
|
+
export { AgyAcpV2Service } from './v2/adapter.ts';
|
|
20
|
+
export { createAcpV2App } from './v2/app.ts';
|
|
21
|
+
export { createDualAcpApp } from './router.ts';
|
|
22
|
+
/**
|
|
23
|
+
* Composite service providing backward-compatible access to both ACP v1 and v2.
|
|
24
|
+
* Delegates to AgyAcpV1Service and AgyAcpV2Service over a shared AgySessionCore.
|
|
25
|
+
*/
|
|
56
26
|
export declare class AgyAcpService {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
constructor(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
version: string;
|
|
74
|
-
};
|
|
75
|
-
capabilities: {
|
|
76
|
-
session: {
|
|
77
|
-
loadSession: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
agentCapabilities: {
|
|
81
|
-
loadSession: boolean;
|
|
82
|
-
};
|
|
83
|
-
availableModels: any;
|
|
84
|
-
availableAgents: any;
|
|
85
|
-
bridgeCapabilities: {
|
|
86
|
-
availableModels: any;
|
|
87
|
-
availableAgents: any;
|
|
88
|
-
configOptions: {
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
description: string;
|
|
92
|
-
category: string;
|
|
93
|
-
options: any;
|
|
94
|
-
}[];
|
|
95
|
-
prompt: boolean;
|
|
96
|
-
streaming: boolean;
|
|
97
|
-
tools: boolean;
|
|
98
|
-
resume: boolean;
|
|
99
|
-
permissionRoundTrip: boolean;
|
|
100
|
-
permissionMode: string;
|
|
101
|
-
safetyTiers: ("safe" | "autonomous" | "autonomous-unsandboxed")[];
|
|
102
|
-
nativeCancel: boolean;
|
|
103
|
-
cancelMode: string;
|
|
104
|
-
historyReplay: boolean;
|
|
105
|
-
dynamicConfig: string;
|
|
106
|
-
richContentInput: string;
|
|
107
|
-
richContentOutput: string;
|
|
108
|
-
clientFilesystem: boolean;
|
|
109
|
-
clientTerminal: boolean;
|
|
110
|
-
};
|
|
111
|
-
_meta: {
|
|
112
|
-
bridgeCapabilities: {
|
|
113
|
-
prompt: boolean;
|
|
114
|
-
streaming: boolean;
|
|
115
|
-
tools: boolean;
|
|
116
|
-
resume: boolean;
|
|
117
|
-
permissionRoundTrip: boolean;
|
|
118
|
-
permissionMode: string;
|
|
119
|
-
safetyTiers: ("safe" | "autonomous" | "autonomous-unsandboxed")[];
|
|
120
|
-
nativeCancel: boolean;
|
|
121
|
-
cancelMode: string;
|
|
122
|
-
historyReplay: boolean;
|
|
123
|
-
dynamicConfig: string;
|
|
124
|
-
richContentInput: string;
|
|
125
|
-
richContentOutput: string;
|
|
126
|
-
clientFilesystem: boolean;
|
|
127
|
-
clientTerminal: boolean;
|
|
128
|
-
};
|
|
129
|
-
availableModels: any;
|
|
130
|
-
availableAgents: any;
|
|
131
|
-
configOptions: {
|
|
132
|
-
id: string;
|
|
133
|
-
name: string;
|
|
134
|
-
description: string;
|
|
135
|
-
category: string;
|
|
136
|
-
options: any;
|
|
137
|
-
}[];
|
|
138
|
-
};
|
|
139
|
-
}>;
|
|
140
|
-
newSession(params: any): Promise<{
|
|
141
|
-
_meta?: Record<string, unknown> | undefined;
|
|
142
|
-
sessionId: `${string}-${string}-${string}-${string}-${string}`;
|
|
143
|
-
}>;
|
|
144
|
-
resumeSession(params: any): Promise<{
|
|
145
|
-
_meta?: Record<string, unknown> | undefined;
|
|
146
|
-
sessionId: string;
|
|
147
|
-
}>;
|
|
148
|
-
setConfigOption(params: any): Promise<{
|
|
149
|
-
sessionId: any;
|
|
150
|
-
configId: any;
|
|
151
|
-
value: any;
|
|
152
|
-
configOptions: {
|
|
153
|
-
id: string;
|
|
154
|
-
name: string;
|
|
155
|
-
description: string;
|
|
156
|
-
category: string;
|
|
157
|
-
options: any;
|
|
158
|
-
}[];
|
|
159
|
-
_meta: Record<string, unknown> | undefined;
|
|
160
|
-
}>;
|
|
161
|
-
listSessions(params?: any): Promise<{
|
|
162
|
-
sessions: any[];
|
|
163
|
-
}>;
|
|
164
|
-
closeSession(params: any): Promise<{}>;
|
|
27
|
+
readonly core: AgySessionCore;
|
|
28
|
+
readonly v1: AgyAcpV1Service;
|
|
29
|
+
readonly v2: AgyAcpV2Service;
|
|
30
|
+
constructor(coreOrOptions?: AgySessionCore | {
|
|
31
|
+
sessionStore?: any;
|
|
32
|
+
});
|
|
33
|
+
initialize(): Promise<any>;
|
|
34
|
+
initializeV1(): Promise<any>;
|
|
35
|
+
initializeV2(): Promise<any>;
|
|
36
|
+
newSession(params: any): Promise<any>;
|
|
37
|
+
resumeSession(params: any, notifyClient?: (update: any) => Promise<void> | void): Promise<any>;
|
|
38
|
+
loadSession(params: any, notifyClient: (update: any) => Promise<void> | void): Promise<any>;
|
|
39
|
+
setConfigOption(params: any): Promise<any>;
|
|
40
|
+
listSessions(params?: any): Promise<any>;
|
|
41
|
+
closeSession(params: any): Promise<any>;
|
|
42
|
+
deleteSession(params: any): Promise<any>;
|
|
165
43
|
cancelSession(params: any): void;
|
|
166
|
-
promptSession(params: any, notifyClient: (update: any) => Promise<void> | void
|
|
44
|
+
promptSession(params: any, notifyClient: (update: any) => Promise<void> | void, opts?: {
|
|
45
|
+
isPreLocked?: boolean;
|
|
46
|
+
}): Promise<{
|
|
167
47
|
stopReason: string;
|
|
168
48
|
}>;
|
|
169
49
|
}
|
|
170
|
-
/**
|
|
171
|
-
* Creates an ACP v1 agent app wrapped with official @agentclientprotocol/sdk.
|
|
172
|
-
*/
|
|
173
|
-
export declare function createAcpV1App(service?: AgyAcpService): v1.AgentApp;
|
|
174
|
-
/**
|
|
175
|
-
* Creates an ACP v2 agent app wrapped with official @agentclientprotocol/sdk.
|
|
176
|
-
*/
|
|
177
|
-
export declare function createAcpV2App(service?: AgyAcpService): v2.AgentApp;
|
|
178
|
-
/**
|
|
179
|
-
* Dual router supporting both ACP v1 and v2 clients automatically.
|
|
180
|
-
*/
|
|
181
|
-
export declare function createDualAcpApp(service?: AgyAcpService): v2.AgentProtocolRouter;
|