teleportation-cli 1.3.0 → 1.4.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.
- package/.claude/hooks/permission_request.mjs +11 -4
- package/.claude/hooks/post_tool_use.mjs +1 -3
- package/.claude/hooks/pre_tool_use.mjs +255 -289
- package/.claude/hooks/session-register.mjs +44 -29
- package/.claude/hooks/session_end.mjs +29 -3
- package/.claude/hooks/session_start.mjs +57 -1
- package/.claude/hooks/stop.mjs +245 -242
- package/.claude/hooks/user_prompt_submit.mjs +1 -3
- package/lib/config/manager.js +45 -1
- package/lib/daemon/session-file-registry.js +207 -0
- package/lib/daemon/task-executor-v2.js +239 -29
- package/lib/daemon/teleportation-daemon.js +469 -29
- package/lib/daemon/timeline-analyzer.js +19 -13
- package/lib/daemon/transcript-ingestion.js +310 -51
- package/lib/daemon/utils.js +0 -9
- package/lib/install/installer.js +126 -3
- package/lib/install/uhr-installer.js +32 -18
- package/lib/intelligence/benchmark.js +240 -0
- package/lib/intelligence/index.js +29 -0
- package/lib/intelligence/rebuild-policies.js +169 -0
- package/lib/intelligence/schema.js +259 -0
- package/lib/intelligence/transcript-mine.js +339 -0
- package/lib/session/metadata.js +23 -5
- package/lib/transcript-sync/lifecycle.js +88 -0
- package/lib/transcript-sync/repo-context.js +45 -0
- package/lib/transcript-sync/worker.js +233 -0
- package/lib/utils/log-sanitizer.js +65 -0
- package/package.json +2 -1
- package/scripts/sync-transcripts.sh +272 -0
- package/teleportation-cli.cjs +295 -4
|
@@ -185,10 +185,7 @@ const fetchJson = async (url, opts) => {
|
|
|
185
185
|
log(`Using parent session ${parent_session_id} for approvals (child session: ${session_id})`);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
189
|
-
const isAutonomousTask = env.TELEPORTATION_TASK_MODE === 'true' || !!parent_session_id;
|
|
190
|
-
const source = isAutonomousTask ? 'autonomous_task' : 'cli_interactive';
|
|
191
|
-
log(`Message source: ${source}`);
|
|
188
|
+
const source = 'cli_interactive';
|
|
192
189
|
|
|
193
190
|
// Load config
|
|
194
191
|
let config;
|
|
@@ -232,6 +229,16 @@ const fetchJson = async (url, opts) => {
|
|
|
232
229
|
headers: { 'Authorization': `Bearer ${RELAY_API_KEY}` }
|
|
233
230
|
});
|
|
234
231
|
|
|
232
|
+
// Bypass permissions: auto-approve everything when enabled from mobile.
|
|
233
|
+
// NOTE: This reads from the daemon-state fetched above (already needed for away-mode).
|
|
234
|
+
// Eventual consistency: there's a brief delay (~5s poll cycle) between the mobile toggle
|
|
235
|
+
// and the daemon syncing this state. Acceptable for MVP — no extra network call needed.
|
|
236
|
+
if (state.bypass_permissions) {
|
|
237
|
+
log(`[PermissionRequest] Bypass permissions enabled — auto-approving ${tool_name}`);
|
|
238
|
+
stdout.write(JSON.stringify({ decision: 'allow', reason: 'Auto-approve enabled from mobile' }));
|
|
239
|
+
return exit(0);
|
|
240
|
+
}
|
|
241
|
+
|
|
235
242
|
// Skip auto-toggle if task mode is forcing away
|
|
236
243
|
if (isTaskMode) {
|
|
237
244
|
log(`Task mode: skipping auto-detection, using forced away mode`);
|
|
@@ -257,9 +257,7 @@ function buildErrorMessage(tool_output) {
|
|
|
257
257
|
const { session_id, tool_name, tool_input, tool_output, tool_use_id } = input || {};
|
|
258
258
|
log(`Session: ${session_id}, Tool: ${tool_name}, tool_use_id: ${tool_use_id || 'none'}`);
|
|
259
259
|
|
|
260
|
-
|
|
261
|
-
const isAutonomousTask = env.TELEPORTATION_TASK_MODE === 'true' || !!env.TELEPORTATION_PARENT_SESSION_ID;
|
|
262
|
-
const source = isAutonomousTask ? 'autonomous_task' : 'cli_interactive';
|
|
260
|
+
const source = 'cli_interactive';
|
|
263
261
|
|
|
264
262
|
// Validate session_id
|
|
265
263
|
if (!isValidSessionId(session_id)) {
|