@dmsdc-ai/aigentry-telepty 0.1.76 → 0.1.77
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/.claude/commands/telepty-inject.md +45 -7
- package/cli.js +559 -59
- package/cross-machine.js +68 -8
- package/daemon.js +697 -416
- package/package.json +1 -1
- package/session-routing.js +7 -5
- package/shared-context.js +147 -0
|
@@ -11,23 +11,61 @@ Parse `$ARGUMENTS` to extract target session ID and prompt text.
|
|
|
11
11
|
<session_id> <prompt text>
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
###
|
|
14
|
+
### Step 1: Parse Arguments
|
|
15
|
+
|
|
16
|
+
If no arguments provided:
|
|
17
|
+
1. List available sessions: `telepty list`
|
|
18
|
+
2. Ask the user which session to target and what to inject
|
|
19
|
+
|
|
20
|
+
Extract `session_id` (first word) and `prompt` (rest of the arguments).
|
|
21
|
+
|
|
22
|
+
### Step 2: English-Only Enforcement
|
|
23
|
+
|
|
24
|
+
Check if the prompt body contains non-English text (Korean, Japanese, Chinese, etc.).
|
|
25
|
+
|
|
26
|
+
- If non-English text detected: Warn the user and auto-translate the prompt to English before proceeding.
|
|
27
|
+
- Exception: Technical terms (e.g., 'hangul', 'jamo', session IDs like 'aigentry-*') used alongside English are OK.
|
|
28
|
+
- The `--from` header and `[reply-to:]` metadata are exempt from this check.
|
|
29
|
+
|
|
30
|
+
### Step 3: Auto --ref for Long Content
|
|
31
|
+
|
|
32
|
+
Detect if the prompt is long (>500 characters OR >3 lines):
|
|
33
|
+
|
|
34
|
+
- **Long content**: Use `--ref` flag automatically. This writes the prompt to a shared file and sends a SHA reference instead of inline text. Tell the user: "Using --ref (content is X chars / Y lines)."
|
|
35
|
+
- **Short content**: Send inline as-is.
|
|
36
|
+
|
|
37
|
+
### Step 4: Pre-Send Confirmation
|
|
38
|
+
|
|
39
|
+
Before executing, show the user:
|
|
40
|
+
```
|
|
41
|
+
Target: <session_id>
|
|
42
|
+
Prompt: <first 100 chars of prompt>... (X chars total)
|
|
43
|
+
Flags: --ref (if applicable), --from (if set)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then ask: "Send? (y/n)"
|
|
47
|
+
|
|
48
|
+
**Skip confirmation when:**
|
|
49
|
+
- User explicitly said "send it", "just send", "바로 보내", or similar
|
|
50
|
+
- The command was invoked with `--yes` or `-y` flag
|
|
51
|
+
- Context clearly implies immediate send (e.g., replying to an orchestrator request)
|
|
52
|
+
|
|
53
|
+
### Step 5: Execute
|
|
54
|
+
|
|
15
55
|
```bash
|
|
16
|
-
|
|
56
|
+
telepty inject [--ref] [--from <from_id>] <session_id> "<prompt>"
|
|
17
57
|
```
|
|
18
58
|
|
|
19
|
-
|
|
20
|
-
1. List available sessions: `node cli.js list`
|
|
21
|
-
2. Ask the user which session to target and what to inject
|
|
59
|
+
If `TELEPTY_SESSION_ID` env var is set, automatically add `--from $TELEPTY_SESSION_ID`.
|
|
22
60
|
|
|
23
61
|
### Multicast (multiple targets)
|
|
24
62
|
```bash
|
|
25
|
-
|
|
63
|
+
telepty multicast <id1>,<id2> "<prompt>"
|
|
26
64
|
```
|
|
27
65
|
|
|
28
66
|
### Broadcast (all sessions)
|
|
29
67
|
```bash
|
|
30
|
-
|
|
68
|
+
telepty broadcast "<prompt>"
|
|
31
69
|
```
|
|
32
70
|
|
|
33
71
|
## Arguments
|