@quantiya/codevibe-codex-plugin 2.0.112 → 2.0.114

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 (26) 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 +659 -644
  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/advisory-fingerprint/git-runner.d.ts +7 -2
  12. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/advisory-fingerprint/panel-baseline.d.ts +18 -0
  13. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +3372 -2167
  14. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/ImplementorSetupWizard.d.ts +1 -1
  15. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +3 -14
  16. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/implementor-preference.d.ts +3 -0
  17. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +1 -1
  18. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/model-resolution.d.ts +40 -0
  19. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/reviewer-preference.d.ts +25 -0
  20. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/implementors.d.ts +8 -3
  21. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/reviewers.d.ts +5 -27
  22. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/structural-summary-notices.d.ts +7 -0
  23. package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +4 -0
  24. package/node_modules/@quantiya/codevibe-core/dist/substrate-launch/apikey-bootstrap.d.ts +5 -0
  25. package/node_modules/@quantiya/codevibe-core/package.json +1 -1
  26. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { ImplementorWizardState } from '../types';
3
3
  import { type ImplementorPreference } from '../implementor-preference';
4
- export declare const IMPLEMENTOR_WIZARD_MAX_ROWS = 12;
4
+ export declare const IMPLEMENTOR_WIZARD_MAX_ROWS: number;
5
5
  export interface ImplementorSetupWizardProps {
6
6
  wizard: ImplementorWizardState;
7
7
  onSubmit: (pref: ImplementorPreference) => void;
@@ -1,24 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import type { ReviewerWizardState } from '../types';
3
3
  import { type UpdateReviewerPolicyInput } from '../../types/reviewer';
4
- /**
5
- * Worst-case wizard height in rows: rounded border (2) + title (1) + current
6
- * context (1) + question (1) + the bounded role list (ROLE_LIST_LIMIT) + hint
7
- * (1). Exported so `<OrchestrationApp>` reserves this in the #469 live-region
8
- * height cap while a wizard is open (it renders in the InputBar's slot, so the
9
- * cap must budget for the wizard, not the shorter InputBar).
10
- */
11
4
  export declare const WIZARD_MAX_ROWS: number;
5
+ type AgentKind = 'CLAUDE' | 'CODEX' | 'ANTIGRAVITY';
12
6
  export interface ReviewerSetupWizardProps {
13
7
  wizard: ReviewerWizardState;
14
- /**
15
- * Persist the chosen policy. The parent owns the network write + result
16
- * advisory + `REVIEWER_WIZARD_CLOSE` (which unmounts this component). Called
17
- * exactly once per wizard run; the component shows a "Saving…" step until the
18
- * parent closes the modal.
19
- */
20
8
  onSubmit: (input: UpdateReviewerPolicyInput) => void;
21
- /** Abandon the wizard with NO policy change (Esc / explicit Cancel). */
9
+ onSubmitAgentModels?: (models: Partial<Record<AgentKind, string | null>>) => void;
22
10
  onCancel: () => void;
23
11
  }
24
12
  export declare function ReviewerSetupWizard(props: ReviewerSetupWizardProps): React.ReactElement;
13
+ export {};
@@ -4,6 +4,7 @@ export interface ImplementorPreference {
4
4
  schemaVersion: 1;
5
5
  priorityOrder: ActiveImplementorAgentKind[];
6
6
  confirmBeforeStart: boolean;
7
+ models?: Partial<Record<ActiveImplementorAgentKind, string>>;
7
8
  updatedAt: string;
8
9
  }
9
10
  export declare function implementorPreferenceFilePath(): string;
@@ -20,5 +21,7 @@ export declare function readImplementorPreferenceSync(): ImplementorPreference;
20
21
  export declare function saveImplementorPreference(patch: {
21
22
  priorityOrder?: ActiveImplementorAgentKind[];
22
23
  confirmBeforeStart?: boolean;
24
+ models?: Partial<Record<ActiveImplementorAgentKind, string | null>>;
25
+ resetModels?: boolean;
23
26
  }): Promise<ImplementorPreference>;
24
27
  export declare function resetImplementorPreference(): Promise<ImplementorPreference>;
@@ -632,7 +632,7 @@ export declare function readOnlyAgentPrompt(args: {
632
632
  folderListing?: string;
633
633
  }): string;
634
634
  export declare function readOnlyAdvisoryAllowsRepositoryTools(_input: string): boolean;
635
- export declare function applyReadOnlyAdvisoryToolPolicy(agent: LocalExecutorAgentKind, plan: ReturnType<typeof buildImplementorArgv>, allowRepositoryTools: boolean, workingDir?: string, attachments?: readonly string[]): ReturnType<typeof buildImplementorArgv>;
635
+ export declare function applyReadOnlyAdvisoryToolPolicy(agent: LocalExecutorAgentKind, plan: ReturnType<typeof buildImplementorArgv>, allowRepositoryTools: boolean, workingDir?: string, attachments?: readonly string[], model?: string | null): ReturnType<typeof buildImplementorArgv>;
636
636
  export declare const BRAINSTORM_PANEL_ADVISORY_TIMEOUT_MS = 1800000;
637
637
  /**
638
638
  * [#637] The Claude CLI reports a usage-limit INSIDE its stdout result envelope
@@ -0,0 +1,40 @@
1
+ import type { AgentKind } from '../local-executor/types';
2
+ import type { ReviewerAgentSpec } from '../types/reviewer';
3
+ export declare function resolveExplicitCodevibeEnvModel(agent: string, env?: NodeJS.ProcessEnv): string | null;
4
+ /**
5
+ * Resolves the explicit `--model` override for Implementor-family scenarios:
6
+ * - Task implementor (`plan` / `execute`, single-task & Agent Teams)
7
+ * - Conflict resolver (CP-14 WB2 agentic resolver & Wave B bounded resolver)
8
+ * - Team decomposer (`start_team` decomposition)
9
+ *
10
+ * Returns `null` when unset so the spawned agent CLI honors the user's machine default.
11
+ */
12
+ export declare function resolveImplementorScenarioModel(agent: AgentKind | string, env?: NodeJS.ProcessEnv): string | null;
13
+ export interface ReviewerModelLookupOptions {
14
+ env?: NodeJS.ProcessEnv;
15
+ configuredAgentModels?: Partial<Record<string, string | null>>;
16
+ seats?: ReadonlyArray<Pick<ReviewerAgentSpec, 'seatId' | 'agent' | 'modelHint'>> | null;
17
+ }
18
+ /**
19
+ * Resolves the explicit `model_hint` for a specific Quorum Reviewer Seat (`seatId`).
20
+ * Precedence:
21
+ * 1. Explicit `CODEVIBE_<AGENT>_MODEL` env override
22
+ * 2. Custom seat `modelHint` from `/reviewer-setup` (`seats` or cached cloud seats)
23
+ * 3. Per-agent reviewer model override from `/reviewer-setup` (`reviewer-preference.json`)
24
+ * 4. Caller-supplied `configuredAgentModels[agent]` (host env default / test injection)
25
+ * 5. `null` (honors user's machine default)
26
+ */
27
+ export declare function resolveReviewerSeatModel(seatId: number, agentKind: string, opts?: ReviewerModelLookupOptions): string | null;
28
+ /**
29
+ * Resolves the explicit model override for agent-addressed Reviewer/Advisory scenarios:
30
+ * - Wave B Tier-2 final-tip review
31
+ * - Attributed `@agent` advisory turns (`@claude`, `@codex`, `@agy`, `@all`)
32
+ *
33
+ * Precedence:
34
+ * 1. Explicit `CODEVIBE_<AGENT>_MODEL` env override
35
+ * 2. Per-agent reviewer model override from `/reviewer-setup` (`reviewer-preference.json`)
36
+ * 3. First custom seat `modelHint` matching `agent` from `/reviewer-setup`
37
+ * 4. Caller-supplied `configuredAgentModels[agent]`
38
+ * 5. `null` (honors user's machine default)
39
+ */
40
+ export declare function resolveReviewerAgentModel(agent: AgentKind | string, opts?: ReviewerModelLookupOptions): string | null;
@@ -0,0 +1,25 @@
1
+ import type { ReviewerAgentSpec } from '../types/reviewer';
2
+ import { type ActiveImplementorAgentKind } from './implementor-preference';
3
+ export interface CachedReviewerSeatPreference {
4
+ seatId: number;
5
+ role: string;
6
+ agent: string;
7
+ modelHint?: string;
8
+ }
9
+ export interface ReviewerPreference {
10
+ schemaVersion: 1;
11
+ models?: Partial<Record<ActiveImplementorAgentKind, string>>;
12
+ cachedSeats?: CachedReviewerSeatPreference[];
13
+ updatedAt: string;
14
+ }
15
+ export declare function reviewerPreferenceFilePath(): string;
16
+ export declare function reviewerSeatsCacheFilePath(): string;
17
+ export declare function defaultReviewerPreference(): ReviewerPreference;
18
+ export declare function readReviewerPreferenceSync(): ReviewerPreference;
19
+ export declare function saveReviewerPreference(patch: {
20
+ models?: Partial<Record<ActiveImplementorAgentKind, string | null>>;
21
+ resetModels?: boolean;
22
+ cachedSeats?: readonly ReviewerAgentSpec[] | null;
23
+ }): Promise<ReviewerPreference>;
24
+ export declare function syncCachedReviewerSeats(seats: readonly ReviewerAgentSpec[] | null | undefined): Promise<void>;
25
+ export declare function resetReviewerPreference(): Promise<ReviewerPreference>;
@@ -1,8 +1,9 @@
1
1
  import type { AgentKind } from '../../local-executor/types';
2
2
  import type { Tier } from '../types';
3
- import { detectInstalledAgents } from '../../orchestration';
4
- import { type ImplementorPreference, readImplementorPreferenceSync } from '../implementor-preference';
3
+ import { detectInstalledAgents, discoverAgentModelCatalog, discoverAllAgentModelCatalogs } from '../../orchestration';
4
+ import { type ActiveImplementorAgentKind, type ImplementorPreference, readImplementorPreferenceSync } from '../implementor-preference';
5
5
  export declare function displayAgentName(agent: string): string;
6
+ export declare function formatAgentModelLine(agent: ActiveImplementorAgentKind, overrideModel: string | undefined, machineDefault: string | null): string;
6
7
  /**
7
8
  * Human-readable, ANSI-free rendering of implementor preference & multi-track allocation.
8
9
  */
@@ -14,4 +15,8 @@ export declare function runImplementorsCli(detectFn?: typeof detectInstalledAgen
14
15
  /**
15
16
  * Handles CLI invocation of `/implementor-setup <args>`.
16
17
  */
17
- export declare function runImplementorSetupCli(args: string, detectFn?: typeof detectInstalledAgents): Promise<string>;
18
+ export declare function runImplementorSetupCli(args: string, detectFn?: typeof detectInstalledAgents, discoverCatalogFn?: typeof discoverAgentModelCatalog, discoverAllCatalogsFn?: typeof discoverAllAgentModelCatalogs): Promise<string>;
19
+ export declare function loadImplementorWizardData(detected: readonly AgentKind[]): {
20
+ installedAgents: AgentKind[];
21
+ currentPreference: ImplementorPreference;
22
+ };
@@ -1,43 +1,21 @@
1
1
  import type { AppSyncClient } from '../../appsync';
2
2
  import type { ReviewerAgentSpec, ReviewerQuorumSettings, UserReviewerPolicySnapshot } from '../../types/reviewer';
3
- import { detectInstalledAgents } from '../../orchestration';
4
- /**
5
- * Human-readable, ANSI-free rendering of a reviewer-policy snapshot. Renders ONLY
6
- * the readable+writable policy surface (detected agents + the reviewer panel). The
7
- * legacy `orchestrationEnabledDefault` opt-in was removed in CP-1 (2.0
8
- * orchestration is shell-driven, not a stored flag — `queries.ts` does not select
9
- * it: selecting it 401s on a post-CP-1 schema), so it is intentionally NOT shown
10
- * (it would always render a misleading default).
11
- */
3
+ import { type AgentModelCatalog, type ConfigurableAgentKind, detectInstalledAgents, discoverAgentModelCatalog, discoverAllAgentModelCatalogs } from '../../orchestration';
12
4
  export declare function formatReviewerPolicy(snapshot: UserReviewerPolicySnapshot): string;
13
5
  export declare function formatPassRule(settings: ReviewerQuorumSettings): string;
14
- /**
15
- * Fetches + formats the user's reviewer panel. Re-pushes the locally detected
16
- * agents (idempotent) and renders the returned snapshot. Never throws — returns
17
- * a friendly error line so `/reviewers` can't crash the shell turn.
18
- */
19
6
  export declare function runReviewersCli(client: AppSyncClient): Promise<string>;
20
- /**
21
- * Tier-agnostic payload for opening the `/reviewer-setup` wizard: the host's
22
- * detected agents + the user's current policy. The caller folds in the session
23
- * `tier` to build the full `ReviewerWizardState`.
24
- */
25
7
  export interface ReviewerWizardData {
26
8
  installedAgents: ReturnType<typeof detectInstalledAgents>;
27
9
  currentSeats: ReviewerAgentSpec[] | null;
28
10
  currentQuorum?: ReviewerQuorumSettings | null;
11
+ modelCatalogs?: Partial<Record<ConfigurableAgentKind, AgentModelCatalog>>;
12
+ currentAgentModels?: Partial<Record<ConfigurableAgentKind, string>>;
29
13
  }
30
- /**
31
- * Gathers everything the interactive wizard needs to render synchronously:
32
- * detects installed agents (the only valid reviewer choices) and reads back the
33
- * current policy via the idempotent `updateAvailableAgents` round-trip. Never
34
- * throws — returns a `{ ok:false, message }` the caller surfaces as an advisory
35
- * (no agents installed, or a transport error) instead of opening an empty modal.
36
- */
37
- export declare function loadReviewerWizardData(client: AppSyncClient, detectFn?: typeof detectInstalledAgents): Promise<{
14
+ export declare function loadReviewerWizardData(client: AppSyncClient, detectFn?: typeof detectInstalledAgents, discoverCatalogsFn?: typeof discoverAllAgentModelCatalogs): Promise<{
38
15
  ok: true;
39
16
  data: ReviewerWizardData;
40
17
  } | {
41
18
  ok: false;
42
19
  message: string;
43
20
  }>;
21
+ export declare function runReviewerSetupCli(args: string, client?: AppSyncClient, detectFn?: typeof detectInstalledAgents, discoverCatalogFn?: typeof discoverAgentModelCatalog, discoverAllCatalogsFn?: typeof discoverAllAgentModelCatalogs): Promise<string>;
@@ -0,0 +1,7 @@
1
+ import type { ShellEventEmit } from './emit-shell-event';
2
+ export declare const STRUCTURAL_SUMMARY_TRUNCATED_NOTICE = "This folder is too large to summarize in full \u2014 agents see a partial overview. Start CodeVibe in a smaller folder for a complete one.";
3
+ export declare const STRUCTURAL_SUMMARY_SLOW_NOTICE = "The workspace overview took longer than usual to build.";
4
+ /** §4.7 slow-path audit: the summary walk took longer than its threshold. */
5
+ export declare function structuralSummarySlowEvent(sessionId: string, elapsedMs: number): ShellEventEmit;
6
+ /** The summary hit its privacy budget; `reason` is the dominant cause (file count before body bytes). */
7
+ export declare function structuralSummaryTruncatedEvent(sessionId: string, reason: string): ShellEventEmit;
@@ -4,6 +4,7 @@ import type { GatePromptEnvelope, ReviewSummaryPanelModel } from './gate-prompts
4
4
  import type { TaskProgressEvent } from './task-progress';
5
5
  import type { ReviewerAgentSpec, ReviewerQuorumSettings } from '../types/reviewer';
6
6
  import type { ImplementorPreference } from './implementor-preference';
7
+ import type { AgentModelCatalog, ConfigurableAgentKind } from '../orchestration/agent-model-catalog';
7
8
  import type { AgentKind as LocalExecutorAgentKind } from '../local-executor/types';
8
9
  import type { WorkItemInput } from '../local-executor/task-group-types';
9
10
  /**
@@ -989,6 +990,8 @@ export interface ReviewerWizardState {
989
990
  installedAgents: Array<'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY'>;
990
991
  currentSeats: ReviewerAgentSpec[] | null;
991
992
  currentQuorum?: ReviewerQuorumSettings | null;
993
+ modelCatalogs?: Partial<Record<ConfigurableAgentKind, AgentModelCatalog>>;
994
+ currentAgentModels?: Partial<Record<ConfigurableAgentKind, string>>;
992
995
  }
993
996
  /**
994
997
  * `/implementor-setup` interactive wizard state.
@@ -996,6 +999,7 @@ export interface ReviewerWizardState {
996
999
  export interface ImplementorWizardState {
997
1000
  installedAgents: AgentKind[];
998
1001
  currentPreference: ImplementorPreference;
1002
+ modelCatalogs?: Partial<Record<ConfigurableAgentKind, AgentModelCatalog>>;
999
1003
  }
1000
1004
  /**
1001
1005
  * §5.1 LOCK lines 502-513. Discriminated union over every state
@@ -1,5 +1,6 @@
1
1
  import type { VendorProvider } from "../credential-broker/types";
2
2
  import type { WorkspaceRootAuthority } from "../local-executor/workspace-authority";
3
+ import { type SafeClaudeModelSettings, type SafeCodexModelConfig } from "../orchestration/agent-model-catalog";
3
4
  /** The fixed filenames inside the bootstrap dir (host + sandbox agree). */
4
5
  export declare const HELPER_SCRIPT_NAME = "broker-apikey-helper.sh";
5
6
  export declare const TOKEN_FILE_NAME = "broker-token";
@@ -73,6 +74,10 @@ export interface ApiKeyBootstrapInput {
73
74
  * check (no workdir to collide with).
74
75
  */
75
76
  workdir?: string;
77
+ /** Optional sanitized host Claude model/effort defaults to seed into settings.json. */
78
+ claudeModelSettings?: SafeClaudeModelSettings;
79
+ /** Optional sanitized host Codex model/reasoning defaults to seed into config.toml. */
80
+ codexModelConfig?: SafeCodexModelConfig;
76
81
  }
77
82
  /**
78
83
  * A materialized apiKeyHelper bootstrap. Holds the host paths so the LE can
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-core",
3
- "version": "2.0.96",
3
+ "version": "2.0.98",
4
4
  "description": "Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and auth functionality",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-codex-plugin",
3
- "version": "2.0.112",
3
+ "version": "2.0.114",
4
4
  "description": "Control OpenAI Codex CLI from your iPhone and Android — real-time sync, approve file edits, send prompts by voice. Part of CodeVibe.",
5
5
  "main": "dist/server.js",
6
6
  "codevibe": {
@@ -47,7 +47,7 @@
47
47
  "node": ">=22.0.0"
48
48
  },
49
49
  "dependencies": {
50
- "@quantiya/codevibe-core": "^2.0.96",
50
+ "@quantiya/codevibe-core": "^2.0.98",
51
51
  "@quantiya/quorum-core": "^1.0.1",
52
52
  "chokidar": "^4.0.0",
53
53
  "dotenv": "^16.6.1",