@limo-labs/deity-adapter-copilot 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/adapter.d.ts +31 -25
  2. package/package.json +1 -1
package/dist/adapter.d.ts CHANGED
@@ -12,30 +12,29 @@ import type {
12
12
  */
13
13
  export interface CopilotSDKAdapterConfig {
14
14
  /**
15
- * GitHub token for authentication
16
- * Defaults to process.env.GITHUB_TOKEN
15
+ * Model to use (default: 'gpt-4o')
16
+ * Options: 'gpt-4o', 'claude-opus-4.6', 'o1', 'o1-mini', etc.
17
17
  */
18
- githubToken?: string;
18
+ model?: string;
19
19
 
20
20
  /**
21
- * Custom endpoint URL (optional)
22
- * For GitHub Enterprise or custom deployments
21
+ * Custom Copilot CLI URL (optional)
22
+ * If not provided, SDK will auto-manage the CLI
23
23
  */
24
- endpoint?: string;
24
+ cliUrl?: string;
25
25
 
26
26
  /**
27
- * Model to use (optional)
28
- * Defaults to Claude Sonnet 4
27
+ * Callback for streaming response chunks (optional)
29
28
  */
30
- model?: string;
29
+ onStreamChunk?: (chunk: string) => void;
31
30
 
32
31
  /**
33
- * Request timeout in milliseconds (optional)
32
+ * Callback for reasoning/thinking chunks (optional)
34
33
  */
35
- timeout?: number;
34
+ onReasoningChunk?: (chunk: string) => void;
36
35
 
37
36
  /**
38
- * Enable debug logging (optional)
37
+ * Enable debug logging (default: false)
39
38
  */
40
39
  debug?: boolean;
41
40
  }
@@ -44,10 +43,10 @@ export interface CopilotSDKAdapterConfig {
44
43
  * GitHub Copilot SDK adapter for Deity framework
45
44
  *
46
45
  * Features:
47
- * - Automatic token authentication via GITHUB_TOKEN
48
- * - Tool calling support with automatic conversion
49
- * - Streaming support
50
- * - Session lifecycle management
46
+ * - Automatic Copilot CLI management
47
+ * - Native tool calling support via Copilot SDK
48
+ * - Streaming support with callbacks
49
+ * - Disposable session pattern for stateless design
51
50
  * - Error handling and retries
52
51
  *
53
52
  * @example
@@ -55,17 +54,28 @@ export interface CopilotSDKAdapterConfig {
55
54
  * import { CopilotSDKAdapter } from '@limo-labs/deity-adapter-copilot';
56
55
  *
57
56
  * const adapter = new CopilotSDKAdapter({
58
- * githubToken: process.env.GITHUB_TOKEN,
59
- * model: 'claude-sonnet-4',
57
+ * model: 'claude-opus-4.6',
58
+ * onStreamChunk: (chunk) => process.stdout.write(chunk),
60
59
  * });
61
60
  * ```
62
61
  */
63
62
  export declare class CopilotSDKAdapter implements LLMAdapter {
64
63
  private client;
65
- private config;
64
+ private model;
65
+ private sessionCounter;
66
+ private isInitialized;
67
+ private onStreamChunk?;
68
+ private currentContext?;
69
+ private debugEnabled;
70
+ private toolCallHistory;
66
71
 
67
72
  constructor(config?: CopilotSDKAdapterConfig);
68
73
 
74
+ /**
75
+ * Initialize the Copilot client
76
+ */
77
+ initialize(): Promise<void>;
78
+
69
79
  /**
70
80
  * Generate LLM response
71
81
  */
@@ -76,11 +86,7 @@ export declare class CopilotSDKAdapter implements LLMAdapter {
76
86
  ): Promise<LLMResponse>;
77
87
 
78
88
  /**
79
- * Execute tool call
89
+ * Cleanup resources and stop Copilot client
80
90
  */
81
- executeTool(
82
- toolName: string,
83
- args: any,
84
- availableTools: ToolSpec[]
85
- ): Promise<any>;
91
+ cleanup(): Promise<void>;
86
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limo-labs/deity-adapter-copilot",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "GitHub Copilot SDK adapter for Deity framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",