@yitom/agy-acp-map 0.1.3 → 0.1.6

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.
@@ -1,181 +1,49 @@
1
- import * as v1 from '@agentclientprotocol/sdk';
2
- import * as v2 from '@agentclientprotocol/sdk/experimental/v2';
3
- import { type MapperState } from './lib/map-agy-to-acp.ts';
4
- import { type SoftDenyInfo } from './lib/soft-deny.ts';
5
- import { AgyProcessManager } from './lib/agy-process.ts';
6
- export declare const AGENT_INFO: {
7
- name: string;
8
- title: string;
9
- version: string;
10
- };
11
- export declare const BRIDGE_CAPABILITIES: {
12
- prompt: boolean;
13
- streaming: boolean;
14
- tools: boolean;
15
- resume: boolean;
16
- permissionRoundTrip: boolean;
17
- permissionMode: string;
18
- safetyTiers: ("safe" | "autonomous" | "autonomous-unsandboxed")[];
19
- nativeCancel: boolean;
20
- cancelMode: string;
21
- historyReplay: boolean;
22
- dynamicConfig: string;
23
- richContentInput: string;
24
- richContentOutput: string;
25
- clientFilesystem: boolean;
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
- private sessions;
58
- private sessionStore;
59
- private catalogPromise;
60
- constructor();
61
- private persistSession;
62
- private sessionMeta;
63
- private buildConfigOptions;
64
- initialize(): Promise<{
65
- agentInfo: {
66
- name: string;
67
- title: string;
68
- version: string;
69
- };
70
- info: {
71
- name: string;
72
- title: string;
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): Promise<{
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;
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: package/dist/agy-acp-win-x64.exe
3
+ size: 86637568 bytes
4
+ sha256: a382550f80df362aea3dc5491aeeb3c12cc3a23dbd2ec4e24e3e93740d7b2352
Binary file