claude-threads 0.12.1 → 0.14.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/CHANGELOG.md +53 -0
- package/README.md +142 -37
- package/dist/claude/cli.d.ts +8 -0
- package/dist/claude/cli.js +16 -8
- package/dist/config/migration.d.ts +45 -0
- package/dist/config/migration.js +35 -0
- package/dist/config.d.ts +12 -18
- package/dist/config.js +7 -94
- package/dist/git/worktree.d.ts +0 -4
- package/dist/git/worktree.js +1 -1
- package/dist/index.js +39 -15
- package/dist/logo.d.ts +3 -20
- package/dist/logo.js +7 -23
- package/dist/mcp/permission-server.js +61 -112
- package/dist/onboarding.d.ts +1 -1
- package/dist/onboarding.js +271 -69
- package/dist/persistence/session-store.d.ts +8 -2
- package/dist/persistence/session-store.js +41 -16
- package/dist/platform/client.d.ts +140 -0
- package/dist/platform/formatter.d.ts +74 -0
- package/dist/platform/index.d.ts +11 -0
- package/dist/platform/index.js +8 -0
- package/dist/platform/mattermost/client.d.ts +70 -0
- package/dist/{mattermost → platform/mattermost}/client.js +117 -34
- package/dist/platform/mattermost/formatter.d.ts +20 -0
- package/dist/platform/mattermost/formatter.js +46 -0
- package/dist/platform/mattermost/permission-api.d.ts +10 -0
- package/dist/platform/mattermost/permission-api.js +139 -0
- package/dist/platform/mattermost/types.js +1 -0
- package/dist/platform/permission-api-factory.d.ts +11 -0
- package/dist/platform/permission-api-factory.js +21 -0
- package/dist/platform/permission-api.d.ts +67 -0
- package/dist/platform/permission-api.js +8 -0
- package/dist/platform/types.d.ts +70 -0
- package/dist/platform/types.js +7 -0
- package/dist/session/commands.d.ts +52 -0
- package/dist/session/commands.js +323 -0
- package/dist/session/events.d.ts +25 -0
- package/dist/session/events.js +368 -0
- package/dist/session/index.d.ts +7 -0
- package/dist/session/index.js +6 -0
- package/dist/session/lifecycle.d.ts +70 -0
- package/dist/session/lifecycle.js +456 -0
- package/dist/session/manager.d.ts +96 -0
- package/dist/session/manager.js +537 -0
- package/dist/session/reactions.d.ts +25 -0
- package/dist/session/reactions.js +151 -0
- package/dist/session/streaming.d.ts +47 -0
- package/dist/session/streaming.js +152 -0
- package/dist/session/types.d.ts +78 -0
- package/dist/session/types.js +9 -0
- package/dist/session/worktree.d.ts +56 -0
- package/dist/session/worktree.js +339 -0
- package/dist/{mattermost → utils}/emoji.d.ts +3 -3
- package/dist/{mattermost → utils}/emoji.js +3 -3
- package/dist/utils/emoji.test.d.ts +1 -0
- package/dist/utils/tool-formatter.d.ts +10 -13
- package/dist/utils/tool-formatter.js +48 -43
- package/dist/utils/tool-formatter.test.js +67 -52
- package/package.json +2 -3
- package/dist/claude/session.d.ts +0 -256
- package/dist/claude/session.js +0 -1964
- package/dist/mattermost/client.d.ts +0 -56
- /package/dist/{mattermost/emoji.test.d.ts → platform/client.js} +0 -0
- /package/dist/{mattermost/types.js → platform/formatter.js} +0 -0
- /package/dist/{mattermost → platform/mattermost}/types.d.ts +0 -0
- /package/dist/{mattermost → utils}/emoji.test.js +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import type { Config } from '../config.js';
|
|
3
|
-
import type { MattermostPost, MattermostUser, MattermostReaction } from './types.js';
|
|
4
|
-
export interface MattermostClientEvents {
|
|
5
|
-
connected: () => void;
|
|
6
|
-
disconnected: () => void;
|
|
7
|
-
error: (error: Error) => void;
|
|
8
|
-
message: (post: MattermostPost, user: MattermostUser | null) => void;
|
|
9
|
-
reaction: (reaction: MattermostReaction, user: MattermostUser | null) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare class MattermostClient extends EventEmitter {
|
|
12
|
-
private ws;
|
|
13
|
-
private config;
|
|
14
|
-
private reconnectAttempts;
|
|
15
|
-
private maxReconnectAttempts;
|
|
16
|
-
private reconnectDelay;
|
|
17
|
-
private userCache;
|
|
18
|
-
private botUserId;
|
|
19
|
-
private pingInterval;
|
|
20
|
-
private lastMessageAt;
|
|
21
|
-
private readonly PING_INTERVAL_MS;
|
|
22
|
-
private readonly PING_TIMEOUT_MS;
|
|
23
|
-
constructor(config: Config);
|
|
24
|
-
private api;
|
|
25
|
-
getBotUser(): Promise<MattermostUser>;
|
|
26
|
-
getUser(userId: string): Promise<MattermostUser | null>;
|
|
27
|
-
createPost(message: string, threadId?: string): Promise<MattermostPost>;
|
|
28
|
-
updatePost(postId: string, message: string): Promise<MattermostPost>;
|
|
29
|
-
addReaction(postId: string, emojiName: string): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Create a post with reaction options for user interaction
|
|
32
|
-
*
|
|
33
|
-
* This is a common pattern for interactive posts that need user response
|
|
34
|
-
* via reactions (e.g., approval prompts, questions, permission requests).
|
|
35
|
-
*
|
|
36
|
-
* @param message - Post message content
|
|
37
|
-
* @param reactions - Array of emoji names to add as reaction options
|
|
38
|
-
* @param threadId - Optional thread root ID
|
|
39
|
-
* @returns The created post
|
|
40
|
-
*/
|
|
41
|
-
createInteractivePost(message: string, reactions: string[], threadId?: string): Promise<MattermostPost>;
|
|
42
|
-
downloadFile(fileId: string): Promise<Buffer>;
|
|
43
|
-
getFileInfo(fileId: string): Promise<import('./types.js').MattermostFile>;
|
|
44
|
-
getPost(postId: string): Promise<MattermostPost | null>;
|
|
45
|
-
connect(): Promise<void>;
|
|
46
|
-
private handleEvent;
|
|
47
|
-
private scheduleReconnect;
|
|
48
|
-
private startHeartbeat;
|
|
49
|
-
private stopHeartbeat;
|
|
50
|
-
isUserAllowed(username: string): boolean;
|
|
51
|
-
isBotMentioned(message: string): boolean;
|
|
52
|
-
extractPrompt(message: string): string;
|
|
53
|
-
getBotName(): string;
|
|
54
|
-
sendTyping(parentId?: string): void;
|
|
55
|
-
disconnect(): void;
|
|
56
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|