@quantiya/codevibe-codex-plugin 2.0.112 → 2.0.113

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.
Files changed (23) hide show
  1. package/dist/native-launch.js +1 -1
  2. package/dist/server.js +1 -1
  3. package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +3 -3
  4. package/node_modules/@quantiya/codevibe-core/dist/index.js +671 -656
  5. package/node_modules/@quantiya/codevibe-core/dist/local-executor/implementor-argv.d.ts +11 -14
  6. package/node_modules/@quantiya/codevibe-core/dist/local-executor/index.d.ts +1 -1
  7. package/node_modules/@quantiya/codevibe-core/dist/orchestration/agent-model-catalog.d.ts +11 -0
  8. package/node_modules/@quantiya/codevibe-core/dist/orchestration/agent-model-settings.d.ts +56 -0
  9. package/node_modules/@quantiya/codevibe-core/dist/orchestration/detect-agents.d.ts +2 -1
  10. package/node_modules/@quantiya/codevibe-core/dist/orchestration/index.d.ts +1 -0
  11. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +3233 -2100
  12. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/ImplementorSetupWizard.d.ts +1 -1
  13. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +3 -14
  14. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/implementor-preference.d.ts +3 -0
  15. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +1 -1
  16. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/model-resolution.d.ts +40 -0
  17. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/reviewer-preference.d.ts +25 -0
  18. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/implementors.d.ts +8 -3
  19. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/reviewers.d.ts +5 -27
  20. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +4 -0
  21. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/apikey-bootstrap.d.ts +5 -0
  22. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  23. package/package.json +2 -2
@@ -28,7 +28,9 @@ export interface ImplementorArgvPlan {
28
28
  * tool set, while `--tools ""` disables all built-in tools. Use the latter here
29
29
  * because broad advisory turns should have no file-inspection tools at all.
30
30
  */
31
- export declare function buildClaudeNoToolsPlanArgv(): ImplementorArgvPlan;
31
+ export declare function buildClaudeNoToolsPlanArgv(options?: {
32
+ model?: string | null;
33
+ }): ImplementorArgvPlan;
32
34
  /**
33
35
  * Helper to escape literal characters in paths so gitignore-style glob pattern matching
34
36
  * does not interpret literal `*`, `?`, `[`, `]` in directory/file names as wildcards (R4-F3).
@@ -60,20 +62,14 @@ export declare function sanitizeClaudeAllowedToolsPattern(p: string): string;
60
62
  * Enforces `--strict-mcp-config` to eliminate ambient MCP servers from enabling
61
63
  * unintended mutations or unconfined execution during advisory turns.
62
64
  */
63
- export declare function buildClaudeReadOnlyAdvisoryPlanArgv(workdir?: string, attachments?: readonly string[]): ImplementorArgvPlan;
65
+ export declare function buildClaudeReadOnlyAdvisoryPlanArgv(workdir?: string, attachments?: readonly string[], options?: {
66
+ model?: string | null;
67
+ }): ImplementorArgvPlan;
64
68
  /**
65
- * D9 — the ONE shared `CODEVIBE_AGY_MODEL` resolver used by BOTH
66
- * `buildImplementorArgv` (the spawned argv) and `agyImplementorAllowlistEntries`
67
- * (the authority templates) so the two can never drift. Absent/empty → `null`
68
- * (omit `--model`, agy default). Invalid → THROW fail-closed with a clear
69
- * operator error (surfaces at scope construction / spawn, never a silent
70
- * mangled spawn).
71
- *
72
- * LIFETIME: the env is resolved ONCE into the authority scope at
73
- * `LocalExecutor` construction (`makeImplementorCommandScope`) — mutating
74
- * `CODEVIBE_AGY_MODEL` mid-session drifts the spawn argv from the cached
75
- * template → a false-positive AuthorityError. Fixed-per-executor-lifecycle;
76
- * tests that mutate the env MUST rebuild the scope/executor.
69
+ * D9 — the shared `CODEVIBE_AGY_MODEL` resolver used by `buildImplementorArgv`
70
+ * (when no explicit model option is supplied) and `agyImplementorAllowlistEntries`
71
+ * (to pin env-configured model overrides at scope construction). Absent/empty →
72
+ * `null` (omit `--model`, agy machine default). Invalid → THROW fail-closed.
77
73
  */
78
74
  export declare function resolveAgyModel(env?: NodeJS.ProcessEnv): string | null;
79
75
  /**
@@ -150,6 +146,7 @@ export declare function stripAgyWebPlugin(workdir: string): void;
150
146
  */
151
147
  export declare function buildImplementorArgv(agent: AgentKind, mode: ImplementorMode, workdir?: string, options?: {
152
148
  mcpConfigPath?: string;
149
+ model?: string | null;
153
150
  }): ImplementorArgvPlan;
154
151
  /**
155
152
  * A1b (Codex summary never-read fix, READ side) — read a Codex implementor's
@@ -2,7 +2,7 @@ export { AuthorityError, AuthorityRefusal, AuthorityRefusalCategory, AuthoritySc
2
2
  export { spawnHealthProbe, spawnImplementor, spawnReviewer } from './spawn';
3
3
  export { reapMarkedProcessTree, PROCESS_TREE_MARKER_ENV, type ReapResult, type ReapOptions, } from './descendant-reaper';
4
4
  export { AgentKind, AuthorityAction, ClassBInbound, ExecutorError, FailureClass, FileChangeKind, GateDispatchPayload, GateDispatchReviewerSeat, HookEvent, ImplementorHandle, LocalExecutor, MergeGateDispatchPayload, ProbeHandle, ProcessExitedInfo, ProcessRole, ProcessSpawnedInfo, ReviewerHandle, ReviewerDispatchPayload, ReviseFeedbackPayload, ReviseSeatFinding, SignedEnvelope, SpawnArgs, SpawnArgsInvalid, SpawnHandleBase, TaskGroupHaltedPayload, TrackAssignedPayload, TrackConflictContext, } from './types';
5
- export { agyImplementorAllowlistEntries, agyWorkdirBriefPreamble, AGY_IMPLEMENTOR_PRINT_TIMEOUT, buildClaudeNoToolsPlanArgv, buildClaudeReadOnlyAdvisoryPlanArgv, escapeClaudePathGlob, formatClaudePermissionPath, sanitizeClaudeAllowedToolsPattern, buildImplementorArgv, extractMcpServerConfig, setupAgyWebPlugin, stripAgyWebPlugin, stripClaudeWebArgs, stripCodexWebArgs, IMPLEMENTOR_COMMAND_ALLOWLIST, makeImplementorCommandScope, resolveAgyModel, type ImplementorArgvPlan, type ImplementorCaptureSurface, type ImplementorMode, } from './implementor-argv';
5
+ export { agyImplementorAllowlistEntries, agyWorkdirBriefPreamble, AGY_IMPLEMENTOR_PRINT_TIMEOUT, bindAgyPrintPrompt, buildClaudeNoToolsPlanArgv, buildClaudeReadOnlyAdvisoryPlanArgv, escapeClaudePathGlob, formatClaudePermissionPath, sanitizeClaudeAllowedToolsPattern, buildImplementorArgv, extractMcpServerConfig, setupAgyWebPlugin, stripAgyWebPlugin, stripClaudeWebArgs, stripCodexWebArgs, IMPLEMENTOR_COMMAND_ALLOWLIST, makeImplementorCommandScope, resolveAgyModel, type ImplementorArgvPlan, type ImplementorCaptureSurface, type ImplementorMode, } from './implementor-argv';
6
6
  export { verifyClassBEd25519, classBCanonicalForSigning, ed25519PublicKeyFromRaw, type ClassBCryptoVerifyResult, } from './class-b-verify';
7
7
  export { TrackRegistry, TrackProcess, trackKey } from './track-registry';
8
8
  export { EmitShellEventFn, HookBridge, HookBridgeDeps, } from './hook-bridge';
@@ -0,0 +1,11 @@
1
+ import { type AgentModelCatalog, type ConfigurableAgentKind } from './agent-model-settings';
2
+ export * from './agent-model-settings';
3
+ export interface DiscoverModelCatalogOptions {
4
+ env?: NodeJS.ProcessEnv;
5
+ homeDir?: string;
6
+ timeoutMs?: number;
7
+ forceRefresh?: boolean;
8
+ }
9
+ export declare function discoverAgentModelCatalog(agent: ConfigurableAgentKind, opts?: DiscoverModelCatalogOptions): Promise<AgentModelCatalog>;
10
+ export declare function discoverAllAgentModelCatalogs(installedAgents: readonly string[], opts?: DiscoverModelCatalogOptions): Promise<Partial<Record<ConfigurableAgentKind, AgentModelCatalog>>>;
11
+ export declare function clearAgentModelCatalogCacheForTest(): void;
@@ -0,0 +1,56 @@
1
+ export type ConfigurableAgentKind = 'CLAUDE' | 'CODEX' | 'ANTIGRAVITY';
2
+ /**
3
+ * Strict model identifier grammar across Claude, Codex, and Antigravity CLIs:
4
+ * - Starts with an ASCII alphanumeric character (blocks flag injection like `--yolo`)
5
+ * - Permits ASCII alphanumerics plus `_`, `.`, `:`, `/`, `[`, `]`, `-` (supports slugs
6
+ * like `gemini-4-carbon-medium`, `gpt-6.1-sol`, and Claude `[1m]` context variants)
7
+ * - Forbids whitespace, quotes, shell metacharacters, commas, parentheses, and control bytes
8
+ * - Maximum length 128 characters
9
+ */
10
+ export declare const MODEL_ID_PATTERN: RegExp;
11
+ /**
12
+ * Antigravity's `~/.gemini/antigravity-cli/settings.json` persists human-readable
13
+ * model labels (e.g. `"Gemini 4 Carbon (Medium)"`) in addition to CLI slugs.
14
+ * Keep CLI `--model` strictly governed by `MODEL_ID_PATTERN`, while allowing safe
15
+ * printable vendor labels when seeding confined Antigravity `settings.json`.
16
+ */
17
+ export declare const AGY_CONFIG_MODEL_PATTERN: RegExp;
18
+ export declare function isValidModelIdentifier(value: unknown): value is string;
19
+ export declare function isValidAgyConfigModelValue(value: unknown): value is string;
20
+ export declare function assertValidModelIdentifier(value: string, sourceLabel?: string): string;
21
+ export interface SafeClaudeModelSettings {
22
+ model?: string;
23
+ effortLevel?: string;
24
+ alwaysThinkingEnabled?: boolean;
25
+ modelSettings?: Record<string, {
26
+ effortLevel: string;
27
+ }>;
28
+ }
29
+ export interface SafeCodexModelConfig {
30
+ model?: string;
31
+ modelReasoningEffort?: string;
32
+ }
33
+ export interface SafeAgyModelSettings {
34
+ model?: string;
35
+ effort?: string;
36
+ }
37
+ export declare function readSafeClaudeModelSettings(homeDir?: string, env?: NodeJS.ProcessEnv): SafeClaudeModelSettings;
38
+ export declare function buildClaudeIsolatedAdvisorySettingsJson(inlinePermissionsSettingsJson: string, homeDir?: string, env?: NodeJS.ProcessEnv): string;
39
+ export declare function readSafeCodexModelConfig(homeDir?: string, env?: NodeJS.ProcessEnv): SafeCodexModelConfig;
40
+ export declare function readSafeAgyModelSettings(homeDir?: string, env?: NodeJS.ProcessEnv): SafeAgyModelSettings;
41
+ export declare function detectConfiguredMachineDefaultModel(agent: ConfigurableAgentKind, homeDir?: string, env?: NodeJS.ProcessEnv): string | null;
42
+ export interface AgentModelOption {
43
+ id: string;
44
+ label: string;
45
+ description?: string;
46
+ isDefault?: boolean;
47
+ }
48
+ export interface AgentModelCatalog {
49
+ agent: ConfigurableAgentKind;
50
+ configuredDefault: string | null;
51
+ cliDefaultModel: string | null;
52
+ options: AgentModelOption[];
53
+ source: 'cli' | 'cache' | 'fallback';
54
+ }
55
+ export declare function formatMachineDefaultSummary(catalog?: AgentModelCatalog | null): string;
56
+ export declare function parseAgyModelsOutput(stdout: string): AgentModelOption[];
@@ -1,5 +1,6 @@
1
1
  import { Logger } from '../logger';
2
2
  import { AppSyncClient } from '../appsync';
3
+ import type { UserReviewerPolicySnapshot } from '../types/reviewer';
3
4
  import { CapabilityRegistry } from '../adapter/capabilities';
4
5
  export type DetectableAgent = 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
5
6
  declare function launcherCompatiblePath(env: NodeJS.ProcessEnv, commonPaths?: string[]): string;
@@ -66,5 +67,5 @@ export declare const __testing: {
66
67
  * with exactly the detected set and write even when empty.
67
68
  * Default false (1.x companion union path).
68
69
  */
69
- export declare function pushDetectedAgents(client: AppSyncClient, log: Pick<Logger, 'info' | 'warn'>, capabilityRegistry?: CapabilityRegistry, detectFn?: () => DetectableAgent[], replace?: boolean): Promise<void>;
70
+ export declare function pushDetectedAgents(client: AppSyncClient, log: Pick<Logger, 'info' | 'warn'>, capabilityRegistry?: CapabilityRegistry, detectFn?: () => DetectableAgent[], replace?: boolean): Promise<UserReviewerPolicySnapshot | void>;
70
71
  export {};
@@ -1,2 +1,3 @@
1
1
  export { detectInstalledAgents, detectInstalledAgentModels, detectAgentModel, DEFAULT_AGENT_MODELS, pushDetectedAgents, type DetectableAgent, } from './detect-agents';
2
2
  export { V1_ORCHESTRATION_PROMPT_KIND, V1_ORCHESTRATION_OPTIONS, mapOptionNumberToUserDecisionKind, mapOptionToUserDecisionKind, type V1OrchestrationOption, type V1UserDecisionKind, } from './v1-options';
3
+ export * from './agent-model-catalog';