@quantiya/codevibe-claude-plugin 2.0.11 → 2.0.13
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-plugin/plugin.json +1 -1
- package/dist/server.js +19 -18
- package/hooks/session-end.sh +20 -24
- package/hooks/session-start.sh +6 -4
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +1 -1
- package/node_modules/@quantiya/codevibe-core/dist/index.js +259 -259
- package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +1 -1
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +12 -0
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/fs-ext/build/Makefile +2 -2
- package/node_modules/fs-ext/build/Release/fs_ext.node +0 -0
- package/node_modules/fs-ext/build/Release/obj.target/fs_ext/fs-ext.o +0 -0
- package/node_modules/fs-ext/build/config.gypi +1 -1
- package/package.json +2 -2
package/hooks/session-end.sh
CHANGED
|
@@ -25,33 +25,29 @@ EXIT_CODE=$?
|
|
|
25
25
|
|
|
26
26
|
if [ $EXIT_CODE -eq 0 ]; then
|
|
27
27
|
log "INFO" "SessionEnd event sent successfully"
|
|
28
|
+
else
|
|
29
|
+
log "ERROR" "Failed to send SessionEnd event (exit code: $EXIT_CODE)"
|
|
30
|
+
fi
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fi
|
|
41
|
-
rm -f "$PID_FILE"
|
|
32
|
+
# Local cleanup is independent of telemetry/backend delivery. A terminal-loss
|
|
33
|
+
# monitor can retire the hosted row before this hook's concurrent POST finishes,
|
|
34
|
+
# producing an expected non-200 response; exact owned files must still disappear.
|
|
35
|
+
if [ -n "$SESSION_ID" ]; then
|
|
36
|
+
PID_FILE="${CODEVIBE_TMPDIR}/codevibe-claude-${SESSION_ID}.pid"
|
|
37
|
+
PORT_FILE="${CODEVIBE_TMPDIR}/codevibe-claude-${SESSION_ID}.port"
|
|
38
|
+
|
|
39
|
+
if [ -f "$PID_FILE" ]; then
|
|
40
|
+
PID=$(cat "$PID_FILE")
|
|
41
|
+
if [[ "$PID" =~ ^[0-9]+$ ]]; then
|
|
42
|
+
_reap_codevibe_daemon_pid "$PID" "SessionEnd for $SESSION_ID"
|
|
42
43
|
fi
|
|
43
|
-
|
|
44
|
-
# Remove port file (should also be cleaned up by server, but just in case)
|
|
45
|
-
rm -f "$PORT_FILE"
|
|
46
|
-
|
|
47
|
-
# Remove sent UUIDs tracking file
|
|
48
|
-
SENT_UUIDS_FILE="${CODEVIBE_TMPDIR}/codevibe-claude-sent-uuids-${SESSION_ID}.txt"
|
|
49
|
-
rm -f "$SENT_UUIDS_FILE"
|
|
50
|
-
|
|
51
|
-
log "INFO" "Session cleanup completed for $SESSION_ID"
|
|
44
|
+
rm -f "$PID_FILE"
|
|
52
45
|
fi
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
|
|
47
|
+
rm -f "$PORT_FILE"
|
|
48
|
+
SENT_UUIDS_FILE="${CODEVIBE_TMPDIR}/codevibe-claude-sent-uuids-${SESSION_ID}.txt"
|
|
49
|
+
rm -f "$SENT_UUIDS_FILE"
|
|
50
|
+
log "INFO" "Session cleanup completed for $SESSION_ID"
|
|
55
51
|
fi
|
|
56
52
|
|
|
57
53
|
# Hooks are best-effort telemetry. Never propagate send_to_mcp failures to
|
package/hooks/session-start.sh
CHANGED
|
@@ -423,10 +423,12 @@ if [ -n "$EXISTING_SERVER_PORT" ]; then
|
|
|
423
423
|
else
|
|
424
424
|
# (#638 I1) APP failure: a real non-200 HTTP response — the daemon is live
|
|
425
425
|
# and reachable, it just rejected this event, so the wedged-daemon reap does
|
|
426
|
-
# not apply.
|
|
427
|
-
#
|
|
428
|
-
|
|
429
|
-
|
|
426
|
+
# not apply. Retain the verified instance mapping and stop this invocation.
|
|
427
|
+
# Deleting the mapping here can turn a resume/compaction application error
|
|
428
|
+
# into a second daemon for the same Claude instance. The next hook event can
|
|
429
|
+
# retry the same live daemon; only a later transport failure may replace it.
|
|
430
|
+
log "WARN" "SessionStart application failure from verified server (exit: $CURL_EXIT, HTTP $HTTP_CODE) — keeping daemon mapping; not relaunching"
|
|
431
|
+
exit 0
|
|
430
432
|
fi
|
|
431
433
|
fi
|
|
432
434
|
|
|
@@ -21,7 +21,7 @@ export type { Config, Environment } from './config';
|
|
|
21
21
|
export { Logger, logger, createLogger } from './logger';
|
|
22
22
|
export { parseInteractivePrompt, normalizeSnapshot, } from './prompt-parser';
|
|
23
23
|
export type { ParsedInteractivePrompt, PromptKind, InteractivePromptOption, } from './prompt-parser';
|
|
24
|
-
export { resumeOrCreateSession, prepareSessionEncryption, rekeySessionForNewDevices, startDeviceKeyWatcher, registerDeviceEncryptionKey, prepareEventTimestamp, _resetPrepareEventTimestampForTesting, } from './session';
|
|
24
|
+
export { resumeOrCreateSession, prepareSessionEncryption, rekeySessionForNewDevices, startDeviceKeyWatcher, registerDeviceEncryptionKey, RetiredSessionCannotReactivateError, isRetiredSessionCannotReactivateError, prepareEventTimestamp, _resetPrepareEventTimestampForTesting, } from './session';
|
|
25
25
|
export type { ResumeOrCreateSessionInput, ResumeOrCreateSessionResult } from './session';
|
|
26
26
|
export { detectInstalledAgents, pushDetectedAgents, V1_ORCHESTRATION_PROMPT_KIND, V1_ORCHESTRATION_OPTIONS, mapOptionNumberToUserDecisionKind, mapOptionToUserDecisionKind, } from './orchestration';
|
|
27
27
|
export type { DetectableAgent, V1OrchestrationOption, V1UserDecisionKind, } from './orchestration';
|