@quantiya/codevibe-codex-plugin 2.0.55 → 2.0.57
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/dist/server.js +8 -8
- package/hooks/common.sh +9 -1
- package/libexec/companion-launcher +17 -6
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +2 -1
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +3 -1
- package/node_modules/@quantiya/codevibe-core/dist/index.js +499 -486
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-backend.d.ts +16 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +9 -7
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +301 -51
- package/node_modules/@quantiya/codevibe-core/dist/planner/client.d.ts +10 -0
- package/node_modules/@quantiya/codevibe-core/dist/planner/composite-advisory.d.ts +25 -0
- package/node_modules/@quantiya/codevibe-core/dist/planner/hosted-advisory.d.ts +37 -0
- package/node_modules/@quantiya/codevibe-core/dist/planner/index.d.ts +3 -1
- package/node_modules/@quantiya/codevibe-core/dist/planner/local-advisory.d.ts +14 -5
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/package.json +2 -2
package/hooks/common.sh
CHANGED
|
@@ -489,7 +489,15 @@ ensure_codex_daemon() {
|
|
|
489
489
|
fi
|
|
490
490
|
if [ $rc -ne 0 ]; then
|
|
491
491
|
if ! ps -p "$server_pid" > /dev/null 2>&1; then
|
|
492
|
-
|
|
492
|
+
# The daemon is our child: its exit code tells a credential-store failure
|
|
493
|
+
# (78, not fixed by signing in) from the usual not-signed-in death.
|
|
494
|
+
local death_rc=0
|
|
495
|
+
wait "$server_pid" 2>/dev/null || death_rc=$?
|
|
496
|
+
if [ "$death_rc" = "78" ]; then
|
|
497
|
+
log "ERROR" "ensure_codex_daemon: daemon could not read its stored credentials (exit 78) — not a sign-in problem; cause and fix are in ${CODEVIBE_TMPDIR}/codevibe-codex-mcp.log"
|
|
498
|
+
else
|
|
499
|
+
log "ERROR" "ensure_codex_daemon: daemon died on startup (exit $death_rc; usually not signed in — run 'codevibe login')"
|
|
500
|
+
fi
|
|
493
501
|
else
|
|
494
502
|
# (#638 F3) Cold-start cap elapsed and the port never appeared, but the launched
|
|
495
503
|
# PID is STILL ALIVE. Leaving it alive-and-unmapped is the #638 duplicate bug: the
|
|
@@ -613,13 +613,24 @@ sleep 1
|
|
|
613
613
|
|
|
614
614
|
# Check if server is still running (exits if auth failed)
|
|
615
615
|
if ! kill -0 "$SERVER_PID" 2>/dev/null; then
|
|
616
|
-
|
|
617
|
-
#
|
|
616
|
+
# Our child: its exit code says why (78 = stored credentials unreadable, which
|
|
617
|
+
# signing in again does not fix). set -e: collect it without aborting.
|
|
618
|
+
SERVER_RC=0
|
|
619
|
+
wait "$SERVER_PID" 2>/dev/null || SERVER_RC=$?
|
|
620
|
+
log "ERROR: Server failed to start (exit $SERVER_RC)"
|
|
618
621
|
echo ""
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
622
|
+
if [ "$SERVER_RC" = "78" ]; then
|
|
623
|
+
awk '/CodeVibe could not read its stored credentials/ { block = ""; on = 1 } on && !/^\[/ { block = block $0 "\n" } END { printf "%s", block }' "$MCP_LOG_FILE" 2>/dev/null
|
|
624
|
+
echo ""
|
|
625
|
+
echo "Server failed to start. Full log: $MCP_LOG_FILE"
|
|
626
|
+
cv_failed "credential_storage_unavailable"
|
|
627
|
+
else
|
|
628
|
+
# Show the last few lines of the log for context (e.g., auth error)
|
|
629
|
+
tail -3 "$MCP_LOG_FILE" 2>/dev/null | grep -v '^\[' | head -1
|
|
630
|
+
echo ""
|
|
631
|
+
echo "Server failed to start. Check $MCP_LOG_FILE for details."
|
|
632
|
+
cv_failed "server_died_on_startup"
|
|
633
|
+
fi
|
|
623
634
|
sleep 1
|
|
624
635
|
exit 1
|
|
625
636
|
fi
|
|
@@ -489,6 +489,22 @@ export declare function shouldDeliverSubscribedEvent(event: Pick<Event, 'source'
|
|
|
489
489
|
* failure from a genuine sign-in rejection.
|
|
490
490
|
*/
|
|
491
491
|
export type AuthFailureKind = 'no_tokens' | 'refresh_auth_rejected' | 'refresh_network' | 'credential_storage_unavailable';
|
|
492
|
+
/**
|
|
493
|
+
* Exit code a companion daemon uses when it cannot read its stored credentials.
|
|
494
|
+
* The plugins' hooks and launchers key their user-facing message off it, so a
|
|
495
|
+
* credential-store failure is never reported as "run codevibe login".
|
|
496
|
+
*/
|
|
497
|
+
export declare const CREDENTIAL_STORAGE_UNAVAILABLE_EXIT_CODE = 78;
|
|
498
|
+
export interface StoredAuthFailureReport {
|
|
499
|
+
exitCode: number;
|
|
500
|
+
message: string;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* What a companion daemon prints, and exits with, when
|
|
504
|
+
* `authenticateWithStoredTokens()` fails. Signing in again repairs only a missing
|
|
505
|
+
* or rejected sign-in; for the other kinds it says what actually went wrong.
|
|
506
|
+
*/
|
|
507
|
+
export declare function describeStoredAuthFailure(kind: AuthFailureKind | null, detail: string | null): StoredAuthFailureReport;
|
|
492
508
|
export declare const DEFAULT_HEARTBEAT_INTERVAL_MS = 120000;
|
|
493
509
|
export declare const MIN_HEARTBEAT_INTERVAL_MS = 1000;
|
|
494
510
|
export declare const MAX_HEARTBEAT_INTERVAL_MS = 300000;
|
|
@@ -530,6 +546,11 @@ export declare class AppSyncClient {
|
|
|
530
546
|
* round-1 Codex M1.
|
|
531
547
|
*/
|
|
532
548
|
private lastAuthFailureKind;
|
|
549
|
+
/**
|
|
550
|
+
* The credential-store error message behind a `credential_storage_unavailable`
|
|
551
|
+
* failure (it names the cause and the fix). `null` for every other outcome.
|
|
552
|
+
*/
|
|
553
|
+
private lastAuthFailureDetail;
|
|
533
554
|
/**
|
|
534
555
|
* Sentinel set inside `performRefresh` / `callCognitoRefresh` when
|
|
535
556
|
* the refresh round-trip fails with a network-shaped error (DNS,
|
|
@@ -592,6 +613,8 @@ export declare class AppSyncClient {
|
|
|
592
613
|
* cannot repair a locked or unavailable keyring.
|
|
593
614
|
*/
|
|
594
615
|
getLastAuthFailureKind(): AuthFailureKind | null;
|
|
616
|
+
/** The credential-store error message behind a `credential_storage_unavailable` failure. */
|
|
617
|
+
getLastAuthFailureDetail(): string | null;
|
|
595
618
|
/**
|
|
596
619
|
* Heuristic — does the error message look like a transient network
|
|
597
620
|
* failure rather than an auth-token rejection? Used for refresh-path
|
|
@@ -935,6 +958,23 @@ export declare class AppSyncClient {
|
|
|
935
958
|
ok: boolean;
|
|
936
959
|
ms: number;
|
|
937
960
|
}>;
|
|
961
|
+
/**
|
|
962
|
+
* Hosted Gemma advisory text generation (browse synthesis, brainstorm, etc.).
|
|
963
|
+
*
|
|
964
|
+
* Implements `PlannerAppSyncTransport.generatePlannerAdvisory`.
|
|
965
|
+
* Input `prompt` is base64 AES-GCM ciphertext under the session key.
|
|
966
|
+
* Output `advisoryText` is base64 AES-GCM ciphertext under the session key.
|
|
967
|
+
*/
|
|
968
|
+
generatePlannerAdvisory(input: {
|
|
969
|
+
sessionId: string;
|
|
970
|
+
prompt: string;
|
|
971
|
+
maxTokens?: number;
|
|
972
|
+
temperature?: number;
|
|
973
|
+
}): Promise<{
|
|
974
|
+
advisoryText: string;
|
|
975
|
+
serverLatencyMs: number;
|
|
976
|
+
providerUsed: string;
|
|
977
|
+
}>;
|
|
938
978
|
/**
|
|
939
979
|
* CP-8 min Stage 1 R1 HIGH-1 closure (Hendry-approved 2026-05-19).
|
|
940
980
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { AppSyncClient, AppSyncAuthenticationError, AppSyncGraphQLError, DownloadUrlResponse, resolveHeartbeatIntervalMs, DEFAULT_HEARTBEAT_INTERVAL_MS, MIN_HEARTBEAT_INTERVAL_MS, MAX_HEARTBEAT_INTERVAL_MS, isRecognizedNonProductionEnvironment, RECOGNIZED_NON_PRODUCTION_ENVIRONMENTS, } from './appsync-client';
|
|
1
|
+
export { AppSyncClient, AppSyncAuthenticationError, AppSyncGraphQLError, DownloadUrlResponse, resolveHeartbeatIntervalMs, DEFAULT_HEARTBEAT_INTERVAL_MS, MIN_HEARTBEAT_INTERVAL_MS, MAX_HEARTBEAT_INTERVAL_MS, isRecognizedNonProductionEnvironment, RECOGNIZED_NON_PRODUCTION_ENVIRONMENTS, CREDENTIAL_STORAGE_UNAVAILABLE_EXIT_CODE, describeStoredAuthFailure, } from './appsync-client';
|
|
2
|
+
export type { AuthFailureKind, StoredAuthFailureReport } from './appsync-client';
|
|
2
3
|
export { coerceAwsJsonObject } from './appsync-client';
|
|
3
4
|
export type { ClassBPacketEnvelopeMeta } from './appsync-client';
|
|
4
5
|
export type { TaskReviewSummary, TaskReviewSummaryRound, TaskReviewSummaryReviewer, TaskGroupStatusResult, PutContextItemInput, } from './appsync-client';
|
|
@@ -11,6 +11,8 @@ export { AppSyncClient, AppSyncGraphQLError, DownloadUrlResponse } from './appsy
|
|
|
11
11
|
export { queries, mutations, subscriptions } from './appsync';
|
|
12
12
|
export { isPersistedEventResult } from './appsync';
|
|
13
13
|
export type { PutContextItemInput } from './appsync';
|
|
14
|
+
export { CREDENTIAL_STORAGE_UNAVAILABLE_EXIT_CODE, describeStoredAuthFailure } from './appsync';
|
|
15
|
+
export type { AuthFailureKind, StoredAuthFailureReport } from './appsync';
|
|
14
16
|
export { AuthService, authService } from './auth';
|
|
15
17
|
export { bindOAuthServer, PRIMARY_PORT, PORT_RANGE_SIZE } from './auth';
|
|
16
18
|
export { runAuthCli } from './auth';
|
|
@@ -37,7 +39,7 @@ export * as CredentialBroker from './credential-broker';
|
|
|
37
39
|
export * as SubstrateLaunch from './substrate-launch';
|
|
38
40
|
export * from './types';
|
|
39
41
|
export * as Planner from './planner';
|
|
40
|
-
export { CompositePlannerAdapter, type CompositePlannerAdapterOptions, } from './planner';
|
|
42
|
+
export { CompositePlannerAdapter, type CompositePlannerAdapterOptions, type AdvisoryRunner, type AdvisoryOptions, type AdvisoryResponseFormat, type LocalGemmaAdvisoryRunner, type LocalGemmaAdvisoryOptions, type LocalGemmaAdvisoryResponseFormat, HostedGemmaAdvisoryRunner, type HostedGemmaAdvisoryRunnerDeps, type HostedAdvisoryTransport, CompositeAdvisoryRunner, type CompositeAdvisoryRunnerOptions, } from './planner';
|
|
41
43
|
export { assertReviewerVendorCredential, reviewerProviderFor, withReviewerCredentialPreflight, ReviewerCredentialMissingError, assertImplementorVendorCredential, implementorProviderFor, withImplementorCredentialPreflight, ImplementorCredentialMissingError, type ReviewerCredentialStore, } from './substrate-launch';
|
|
42
44
|
export { OllamaGemmaPlannerRunner, type OllamaRuntimeConfig } from './local-model/ollama';
|
|
43
45
|
export * as Continuation from './continuation';
|