@inceptionstack/roundhouse 0.5.4 → 0.5.5
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/architecture.md +37 -18
- package/package.json +2 -1
- package/skills/pr-merge-discipline/SKILL.md +36 -0
- package/skills/roundhouse-cron/SKILL.md +136 -0
- package/src/agents/kiro/kiro-adapter.ts +1 -4
- package/src/agents/pi/pi-adapter.ts +1 -4
- package/src/cli/cli.ts +1 -1
- package/src/cli/setup/args.ts +8 -9
- package/src/cli/setup/flows.ts +47 -14
- package/src/cli/{setup-logger.ts → setup/logger.ts} +4 -4
- package/src/cli/{setup-prompts.ts → setup/prompts.ts} +23 -2
- package/src/cli/setup/runtime.ts +1 -1
- package/src/cli/setup/steps.ts +3 -3
- package/src/cli/{setup-telegram.ts → setup/telegram.ts} +4 -4
- package/src/cli/setup/types.ts +4 -3
- package/src/cli/setup.ts +8 -8
- package/src/cli/systemd.ts +2 -0
- package/src/{commands → cli}/update.ts +1 -1
- package/src/cron/runner.ts +2 -1
- package/src/gateway/commands.ts +4 -3
- package/src/{gateway.ts → gateway/gateway.ts} +63 -97
- package/src/gateway/helpers.ts +1 -1
- package/src/gateway/index.ts +2 -5
- package/src/gateway/streaming.ts +1 -1
- package/src/{bundle.ts → provisioning/bundle.ts} +32 -0
- package/src/transports/index.ts +6 -0
- package/src/{telegram-html.ts → transports/telegram/html.ts} +2 -2
- package/src/{pairing.ts → transports/telegram/pairing.ts} +1 -1
- package/src/transports/telegram/telegram-adapter.ts +111 -0
- package/src/transports/types.ts +71 -0
- /package/src/{commands.ts → transports/telegram/bot-commands.ts} +0 -0
- /package/src/{telegram-format.ts → transports/telegram/format.ts} +0 -0
- /package/src/{notify/telegram.ts → transports/telegram/notify.ts} +0 -0
- /package/src/{telegram-progress.ts → transports/telegram/progress.ts} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* transports/types.ts — Transport adapter interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for platform-specific transport adapters.
|
|
5
|
+
* The gateway uses this interface to remain transport-agnostic.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Minimal thread interface (subset of Chat SDK thread) */
|
|
9
|
+
export interface ChatThread {
|
|
10
|
+
id: string;
|
|
11
|
+
post(text: string): Promise<void>;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Minimal incoming message interface */
|
|
16
|
+
export interface IncomingMessage {
|
|
17
|
+
text?: string;
|
|
18
|
+
author?: { userName?: string; name?: string; userId?: string | number; id?: string };
|
|
19
|
+
chatId?: number;
|
|
20
|
+
raw?: { from?: { id?: number } };
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Result of a successful transport pairing */
|
|
25
|
+
export interface PairingResult {
|
|
26
|
+
/** Thread/channel ID for notifications */
|
|
27
|
+
threadId: string | number;
|
|
28
|
+
/** User ID for allowlist */
|
|
29
|
+
userId: string | number;
|
|
30
|
+
/** Display name */
|
|
31
|
+
username: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* TransportAdapter — platform-specific behavior contract.
|
|
36
|
+
*
|
|
37
|
+
* Encapsulates all concerns specific to a messaging platform
|
|
38
|
+
* (Telegram, Slack, Discord, etc.), keeping the gateway transport-agnostic.
|
|
39
|
+
*/
|
|
40
|
+
export interface TransportAdapter {
|
|
41
|
+
/** Transport name (e.g. "telegram") */
|
|
42
|
+
readonly name: string;
|
|
43
|
+
|
|
44
|
+
/** Enrich prompt text before sending to agent (e.g. formatting hints) */
|
|
45
|
+
enrichPrompt(text: string): string;
|
|
46
|
+
|
|
47
|
+
/** Post a message using platform-native formatting */
|
|
48
|
+
postMessage(thread: ChatThread, text: string): Promise<void>;
|
|
49
|
+
|
|
50
|
+
/** Register bot commands with the platform */
|
|
51
|
+
registerCommands(token: string): Promise<void>;
|
|
52
|
+
|
|
53
|
+
/** Check if a thread belongs to this transport */
|
|
54
|
+
ownsThread(thread: ChatThread): boolean;
|
|
55
|
+
|
|
56
|
+
/** Send notifications to configured recipients */
|
|
57
|
+
notify(chatIds: number[], text: string): Promise<void>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a pairing flow is pending.
|
|
61
|
+
* Gateway uses this to decide whether to attempt pairing on incoming messages.
|
|
62
|
+
*/
|
|
63
|
+
isPairingPending(): Promise<boolean>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Try to handle an incoming message as a pairing attempt.
|
|
67
|
+
* Returns PairingResult on success, null if not a pairing message.
|
|
68
|
+
* Transport manages its own state (nonce files, OAuth tokens, etc.)
|
|
69
|
+
*/
|
|
70
|
+
handlePairing(thread: ChatThread, message: IncomingMessage): Promise<PairingResult | null>;
|
|
71
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|