fix: prepublish changes to package names (#1420)

This commit is contained in:
Brandon Keiji 2025-06-25 05:41:11 -07:00 committed by GitHub
parent a3c46c0d31
commit f6c36f75e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
67 changed files with 129 additions and 122 deletions

View File

@ -41,7 +41,7 @@ options:
substitutions:
_REVISION: '0'
_SANDBOX_IMAGE_REGISTRY: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers'
_SANDBOX_IMAGE_NAME: 'gemini-cli-sandbox'
_SANDBOX_IMAGE_REGISTRY: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-cli'
_SANDBOX_IMAGE_NAME: 'sandbox-ci'
_NPM_PUBLISH_TAG: 'head'
_CONTAINER_TOOL: 'docker'

View File

@ -24,7 +24,8 @@ steps:
- name: 'us-west1-docker.pkg.dev/gemini-code-dev/gemini-code-containers/gemini-code-builder'
entrypoint: 'npm'
args: ['publish', '--tag=head', '--dry-run', '--workspace=@gemini-cli/cli']
args:
['publish', '--tag=head', '--dry-run', '--workspace=@google/gemini-cli']
options:
defaultLogsBucketBehavior: REGIONAL_USER_OWNED_BUCKET

2
.npmrc
View File

@ -1 +1 @@
@gemini-cli:registry=https://us-west1-npm.pkg.dev/gemini-code-dev/gemini-code/
@google:registry=https://wombat-dressing-room.appspot.com

View File

@ -40,11 +40,11 @@ ENV PATH=$PATH:/usr/local/share/npm-global/bin
USER node
# install gemini-cli and clean up
COPY packages/cli/dist/gemini-cli-cli-*.tgz /usr/local/share/npm-global/gemini-cli-cli.tgz
COPY packages/core/dist/gemini-cli-core-*.tgz /usr/local/share/npm-global/gemini-cli-core.tgz
RUN npm install -g /usr/local/share/npm-global/gemini-cli-cli.tgz /usr/local/share/npm-global/gemini-cli-core.tgz \
COPY packages/cli/dist/google-gemini-cli-*.tgz /usr/local/share/npm-global/gemini-cli.tgz
COPY packages/core/dist/google-gemini-cli-core-*.tgz /usr/local/share/npm-global/gemini-core.tgz
RUN npm install -g /usr/local/share/npm-global/gemini-cli.tgz /usr/local/share/npm-global/gemini-core.tgz \
&& npm cache clean --force \
&& rm -f /usr/local/share/npm-global/gemini-cli-{cli,core}.tgz
&& rm -f /usr/local/share/npm-global/gemini-{cli,core}.tgz
# default entrypoint when none specified
CMD ["gemini"]

View File

@ -16,7 +16,7 @@ This is the recommended way for end-users to install Gemini CLI. It involves dow
```bash
# Install the CLI globally
npm install -g @gemini-cli/cli
npm install -g @google/gemini-cli
# Now you can run the CLI from anywhere
gemini
@ -25,7 +25,7 @@ This is the recommended way for end-users to install Gemini CLI. It involves dow
- **NPX execution:**
```bash
# Execute the latest version from NPM without a global install
npx @gemini-cli/cli
npx @google/gemini-cli
```
---
@ -88,8 +88,8 @@ The execution methods described above are made possible by the following archite
Gemini CLI project is a monorepo that publishes two core packages to the NPM registry:
- `@gemini-cli/core`: The backend, handling logic and tool execution.
- `@gemini-cli/cli`: The user-facing frontend.
- `@google/gemini-cli-core`: The backend, handling logic and tool execution.
- `@google/gemini-cli`: The user-facing frontend.
These packages are used when performing the standard installation and when running Gemini CLI from the source.
@ -97,7 +97,7 @@ These packages are used when performing the standard installation and when runni
There are two distinct build processes used, depending on the distribution channel:
- **NPM publication:** For publishing to the NPM registry, the TypeScript source code in `@gemini-cli/core` and `@gemini-cli/cli` is transpiled into standard JavaScript using the TypeScript Compiler (`tsc`). The resulting `dist/` directory is what gets published in the NPM package. This is a standard approach for TypeScript libraries.
- **NPM publication:** For publishing to the NPM registry, the TypeScript source code in `@google/gemini-cli-core` and `@google/gemini-cli` is transpiled into standard JavaScript using the TypeScript Compiler (`tsc`). The resulting `dist/` directory is what gets published in the NPM package. This is a standard approach for TypeScript libraries.
- **GitHub `npx` execution:** When running the latest version of Gemini CLI directly from GitHub, a different process is triggered by the `prepare` script in `package.json`. This script uses `esbuild` to bundle the entire application and its dependencies into a single, self-contained JavaScript file. This bundle is created on-the-fly on the user's machine and is not checked into the repository.

View File

@ -6,7 +6,7 @@ This guide provides solutions to common issues and debugging tips.
- **Q: How do I update Gemini CLI to the latest version?**
- A: If installed globally via npm, update Gemini CLI using the command `npm install -g @gemini-cli/cli@latest`. If run from source, pull the latest changes from the repository and rebuild using `npm run build`.
- A: If installed globally via npm, update Gemini CLI using the command `npm install -g @google/gemini-cli@latest`. If run from source, pull the latest changes from the repository and rebuild using `npm run build`.
- **Q: Where are Gemini CLI configuration files stored?**

10
package-lock.json generated
View File

@ -875,11 +875,11 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@gemini-cli/cli": {
"node_modules/@google/gemini-cli": {
"resolved": "packages/cli",
"link": true
},
"node_modules/@gemini-cli/core": {
"node_modules/@google/gemini-cli-core": {
"resolved": "packages/core",
"link": true
},
@ -11597,10 +11597,10 @@
}
},
"packages/cli": {
"name": "@gemini-cli/cli",
"name": "@google/gemini-cli",
"version": "0.1.0",
"dependencies": {
"@gemini-cli/core": "file:../core",
"@google/gemini-cli-core": "file:../core",
"@types/update-notifier": "^6.0.8",
"command-exists": "^1.2.9",
"diff": "^7.0.0",
@ -11670,7 +11670,7 @@
}
},
"packages/core": {
"name": "@gemini-cli/core",
"name": "@google/gemini-cli-core",
"version": "0.1.0",
"dependencies": {
"@google/genai": "^1.4.0",

View File

@ -1,5 +1,5 @@
{
"name": "gemini-cli",
"name": "@google/gemini-cli",
"version": "0.1.0",
"type": "module",
"workspaces": [

View File

@ -1,5 +1,5 @@
{
"name": "@gemini-cli/cli",
"name": "@google/gemini-cli",
"version": "0.1.0",
"description": "Gemini CLI",
"type": "module",
@ -19,7 +19,7 @@
"typecheck": "tsc --noEmit",
"prerelease:version": "node ../../scripts/bind_package_version.js",
"prerelease:deps": "node ../../scripts/bind_package_dependencies.js",
"prepublishOnly": "npm publish --workspace=@gemini-cli/core",
"prepublishOnly": "npm publish --workspace=@google/gemini-cli-core",
"prepack": "npm run build"
},
"files": [
@ -29,7 +29,7 @@
"sandboxImageUri": "gemini-cli-sandbox"
},
"dependencies": {
"@gemini-cli/core": "file:../core",
"@google/gemini-cli-core": "0.1.0",
"@types/update-notifier": "^6.0.8",
"command-exists": "^1.2.9",
"diff": "^7.0.0",

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { AuthType } from '@gemini-cli/core';
import { AuthType } from '@google/gemini-cli-core';
import { loadEnvironment } from './config.js';
export const validateAuthMethod = (authMethod: string): string | null => {

View File

@ -12,7 +12,7 @@ import {
Config,
ConfigParameters,
ContentGeneratorConfig,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
const TEST_CONTENT_GENERATOR_CONFIG: ContentGeneratorConfig = {
apiKey: 'test-key',
@ -21,8 +21,8 @@ const TEST_CONTENT_GENERATOR_CONFIG: ContentGeneratorConfig = {
};
// Mock file discovery service and tool registry
vi.mock('@gemini-cli/core', async () => {
const actual = await vi.importActual('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
return {
...actual,
FileDiscoveryService: vi.fn().mockImplementation(() => ({

View File

@ -9,7 +9,7 @@ import * as os from 'os';
import { loadCliConfig } from './config.js';
import { Settings } from './settings.js';
import { Extension } from './extension.js';
import * as ServerConfig from '@gemini-cli/core';
import * as ServerConfig from '@google/gemini-cli-core';
vi.mock('os', async (importOriginal) => {
const actualOs = await importOriginal<typeof os>();
@ -29,9 +29,10 @@ vi.mock('read-package-up', () => ({
),
}));
vi.mock('@gemini-cli/core', async () => {
const actualServer =
await vi.importActual<typeof ServerConfig>('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actualServer = await vi.importActual<typeof ServerConfig>(
'@google/gemini-cli-core',
);
return {
...actualServer,
loadEnvironment: vi.fn(),

View File

@ -18,7 +18,7 @@ import {
DEFAULT_GEMINI_EMBEDDING_MODEL,
FileDiscoveryService,
TelemetryTarget,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { Settings } from './settings.js';
import { Extension } from './extension.js';

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { MCPServerConfig } from '@gemini-cli/core';
import { MCPServerConfig } from '@google/gemini-cli-core';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { SandboxConfig } from '@gemini-cli/core';
import { SandboxConfig } from '@google/gemini-cli-core';
import commandExists from 'command-exists';
import * as os from 'node:os';
import { getPackageJson } from '../utils/package.js';

View File

@ -13,7 +13,7 @@ import {
BugCommandSettings,
TelemetrySettings,
AuthType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import stripJsonComments from 'strip-json-comments';
import { DefaultLight } from '../ui/themes/default-light.js';
import { DefaultDark } from '../ui/themes/default.js';

View File

@ -33,7 +33,7 @@ import {
sessionId,
logUserPrompt,
AuthType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { validateAuthMethod } from './config/auth.js';
import { setMaxSizedBoxDebugging } from './ui/components/shared/MaxSizedBox.js';

View File

@ -7,15 +7,14 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { runNonInteractive } from './nonInteractiveCli.js';
import { Config, GeminiClient, ToolRegistry } from '@gemini-cli/core';
import { Config, GeminiClient, ToolRegistry } from '@google/gemini-cli-core';
import { GenerateContentResponse, Part, FunctionCall } from '@google/genai';
// Mock dependencies
vi.mock('@gemini-cli/core', async () => {
const actualCore =
await vi.importActual<typeof import('@gemini-cli/core')>(
'@gemini-cli/core',
);
vi.mock('@google/gemini-cli-core', async () => {
const actualCore = await vi.importActual<
typeof import('@google/gemini-cli-core')
>('@google/gemini-cli-core');
return {
...actualCore,
GeminiClient: vi.fn(),
@ -110,7 +109,7 @@ describe('runNonInteractive', () => {
};
const { executeToolCall: mockCoreExecuteToolCall } = await import(
'@gemini-cli/core'
'@google/gemini-cli-core'
);
vi.mocked(mockCoreExecuteToolCall).mockResolvedValue({
callId: 'fc1',
@ -163,7 +162,7 @@ describe('runNonInteractive', () => {
};
const { executeToolCall: mockCoreExecuteToolCall } = await import(
'@gemini-cli/core'
'@google/gemini-cli-core'
);
vi.mocked(mockCoreExecuteToolCall).mockResolvedValue({
callId: 'fcError',

View File

@ -11,7 +11,7 @@ import {
ToolRegistry,
shutdownTelemetry,
isTelemetrySdkInitialized,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import {
Content,
Part,

View File

@ -14,7 +14,7 @@ import {
ToolRegistry,
AccessibilitySettings,
SandboxConfig,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { LoadedSettings, SettingsFile, Settings } from '../config/settings.js';
import process from 'node:process';
@ -68,9 +68,10 @@ interface MockServerConfig {
getAllGeminiMdFilenames: Mock<() => string[]>;
}
// Mock @gemini-cli/core and its Config class
vi.mock('@gemini-cli/core', async (importOriginal) => {
const actualCore = await importOriginal<typeof import('@gemini-cli/core')>();
// Mock @google/gemini-cli-core and its Config class
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
const actualCore =
await importOriginal<typeof import('@google/gemini-cli-core')>();
const ConfigClassMock = vi
.fn()
.mockImplementation((optionsPassedToConstructor) => {

View File

@ -54,7 +54,7 @@ import {
ApprovalMode,
isEditorAvailable,
EditorType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { validateAuthMethod } from '../config/auth.js';
import { useLogger } from './hooks/useLogger.js';
import { StreamingContext } from './contexts/StreamingContext.js';

View File

@ -8,7 +8,7 @@ import { render } from 'ink-testing-library';
import { describe, it, expect, vi } from 'vitest';
import { AuthDialog } from './AuthDialog.js';
import { LoadedSettings, SettingScope } from '../../config/settings.js';
import { AuthType } from '@gemini-cli/core';
import { AuthType } from '@google/gemini-cli-core';
describe('AuthDialog', () => {
const wait = (ms = 50) => new Promise((resolve) => setTimeout(resolve, ms));

View File

@ -9,7 +9,7 @@ import { Box, Text, useInput } from 'ink';
import { Colors } from '../colors.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import { LoadedSettings, SettingScope } from '../../config/settings.js';
import { AuthType } from '@gemini-cli/core';
import { AuthType } from '@google/gemini-cli-core';
import { validateAuthMethod } from '../../config/auth.js';
interface AuthDialogProps {

View File

@ -7,7 +7,7 @@
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { ApprovalMode } from '@gemini-cli/core';
import { ApprovalMode } from '@google/gemini-cli-core';
interface AutoAcceptIndicatorProps {
approvalMode: ApprovalMode;

View File

@ -7,7 +7,7 @@
import React from 'react';
import { Text } from 'ink';
import { Colors } from '../colors.js';
import { type MCPServerConfig } from '@gemini-cli/core';
import { type MCPServerConfig } from '@google/gemini-cli-core';
interface ContextSummaryDisplayProps {
geminiMdFileCount: number;

View File

@ -14,7 +14,7 @@ import {
} from '../editors/editorSettingsManager.js';
import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
import { LoadedSettings, SettingScope } from '../../config/settings.js';
import { EditorType, isEditorAvailable } from '@gemini-cli/core';
import { EditorType, isEditorAvailable } from '@google/gemini-cli-core';
interface EditorDialogProps {
onSelect: (editorType: EditorType | undefined, scope: SettingScope) => void;

View File

@ -7,7 +7,7 @@
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { shortenPath, tildeifyPath, tokenLimit } from '@gemini-cli/core';
import { shortenPath, tildeifyPath, tokenLimit } from '@google/gemini-cli-core';
import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js';
import process from 'node:process';
import { MemoryUsageDisplay } from './MemoryUsageDisplay.js';

View File

@ -18,7 +18,7 @@ import { Box } from 'ink';
import { AboutBox } from './AboutBox.js';
import { StatsDisplay } from './StatsDisplay.js';
import { SessionSummaryDisplay } from './SessionSummaryDisplay.js';
import { Config } from '@gemini-cli/core';
import { Config } from '@google/gemini-cli-core';
interface HistoryItemDisplayProps {
item: HistoryItem;

View File

@ -7,7 +7,7 @@
import { render } from 'ink-testing-library';
import { InputPrompt, InputPromptProps } from './InputPrompt.js';
import type { TextBuffer } from './shared/text-buffer.js';
import { Config } from '@gemini-cli/core';
import { Config } from '@google/gemini-cli-core';
import { vi } from 'vitest';
import { useShellHistory } from '../hooks/useShellHistory.js';
import { useCompletion } from '../hooks/useCompletion.js';

View File

@ -18,7 +18,7 @@ import { useShellHistory } from '../hooks/useShellHistory.js';
import { useCompletion } from '../hooks/useCompletion.js';
import { isAtCommand, isSlashCommand } from '../utils/commandUtils.js';
import { SlashCommand } from '../hooks/slashCommandProcessor.js';
import { Config } from '@gemini-cli/core';
import { Config } from '@google/gemini-cli-core';
export interface InputPromptProps {
buffer: TextBuffer;

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { ThoughtSummary } from '@gemini-cli/core';
import { ThoughtSummary } from '@google/gemini-cli-core';
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';

View File

@ -7,7 +7,7 @@
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { type Config } from '@gemini-cli/core';
import { type Config } from '@google/gemini-cli-core';
interface TipsProps {
config: Config;

View File

@ -7,7 +7,7 @@
import { render } from 'ink-testing-library';
import { describe, it, expect, vi } from 'vitest';
import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
import { ToolCallConfirmationDetails } from '@gemini-cli/core';
import { ToolCallConfirmationDetails } from '@google/gemini-cli-core';
describe('ToolConfirmationMessage', () => {
it('should not display urls if prompt and url are the same', () => {

View File

@ -14,7 +14,7 @@ import {
ToolExecuteConfirmationDetails,
ToolMcpConfirmationDetails,
Config,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import {
RadioButtonSelect,
RadioSelectItem,

View File

@ -10,7 +10,7 @@ import { IndividualToolCallDisplay, ToolCallStatus } from '../../types.js';
import { ToolMessage } from './ToolMessage.js';
import { ToolConfirmationMessage } from './ToolConfirmationMessage.js';
import { Colors } from '../../colors.js';
import { Config } from '@gemini-cli/core';
import { Config } from '@google/gemini-cli-core';
interface ToolGroupMessageProps {
groupId: number;

View File

@ -11,7 +11,7 @@ import os from 'os';
import pathMod from 'path';
import { useState, useCallback, useEffect, useMemo } from 'react';
import stringWidth from 'string-width';
import { unescapePath } from '@gemini-cli/core';
import { unescapePath } from '@google/gemini-cli-core';
import { toCodePoints, cpLen, cpSlice } from '../../utils/textUtils.js';
export type Direction =

View File

@ -8,7 +8,7 @@ import {
allowEditorTypeInSandbox,
checkHasEditorType,
type EditorType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
export interface EditorDisplay {
name: string;

View File

@ -7,7 +7,7 @@
import { describe, it, expect, vi, beforeEach, afterEach, Mock } from 'vitest';
import type { Mocked } from 'vitest';
import { handleAtCommand } from './atCommandProcessor.js';
import { Config, FileDiscoveryService } from '@gemini-cli/core';
import { Config, FileDiscoveryService } from '@google/gemini-cli-core';
import { ToolCallStatus } from '../types.js';
import { UseHistoryManagerReturn } from './useHistoryManager.js';
import * as fsPromises from 'fs/promises';
@ -52,8 +52,8 @@ vi.mock('fs/promises', async () => {
};
});
vi.mock('@gemini-cli/core', async () => {
const actual = await vi.importActual('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
return {
...actual,
FileDiscoveryService: vi.fn(),

View File

@ -12,7 +12,7 @@ import {
getErrorMessage,
isNodeError,
unescapePath,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import {
HistoryItem,
IndividualToolCallDisplay,

View File

@ -7,7 +7,7 @@
import { act, renderHook } from '@testing-library/react';
import { vi } from 'vitest';
import { useShellCommandProcessor } from './shellCommandProcessor';
import { Config, GeminiClient } from '@gemini-cli/core';
import { Config, GeminiClient } from '@google/gemini-cli-core';
import * as fs from 'fs';
import EventEmitter from 'events';
@ -22,7 +22,7 @@ vi.mock('os', () => ({
platform: () => 'linux',
tmpdir: () => '/tmp',
}));
vi.mock('@gemini-cli/core');
vi.mock('@google/gemini-cli-core');
vi.mock('../utils/textUtils.js', () => ({
isBinary: vi.fn(),
}));

View File

@ -8,7 +8,7 @@ import { spawn } from 'child_process';
import { StringDecoder } from 'string_decoder';
import type { HistoryItemWithoutId } from '../types.js';
import { useCallback } from 'react';
import { Config, GeminiClient } from '@gemini-cli/core';
import { Config, GeminiClient } from '@google/gemini-cli-core';
import { type PartListUnion } from '@google/genai';
import { formatMemoryUsage } from '../utils/formatters.js';
import { isBinary } from '../utils/textUtils.js';

View File

@ -68,7 +68,7 @@ import {
getMCPDiscoveryState,
getMCPServerStatus,
GeminiClient,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { useSessionStats } from '../contexts/SessionContext.js';
import { LoadedSettings } from '../../config/settings.js';
@ -712,7 +712,7 @@ Add any other context about the problem here.
describe('/mcp command', () => {
beforeEach(() => {
// Mock the core module with getMCPServerStatus and getMCPDiscoveryState
vi.mock('@gemini-cli/core', async (importOriginal) => {
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
const actual = await importOriginal();
return {
...actual,

View File

@ -18,7 +18,7 @@ import {
MCPServerStatus,
getMCPDiscoveryState,
getMCPServerStatus,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { useSessionStats } from '../contexts/SessionContext.js';
import {
Message,

View File

@ -11,7 +11,7 @@ import {
Config,
clearCachedCredentialFile,
getErrorMessage,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
async function performAuthFlow(authMethod: AuthType, config: Config) {
await config.refreshAuth(authMethod);

View File

@ -20,14 +20,14 @@ import {
Config,
Config as ActualConfigType,
ApprovalMode,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { useInput, type Key as InkKey } from 'ink';
vi.mock('ink');
vi.mock('@gemini-cli/core', async () => {
vi.mock('@google/gemini-cli-core', async () => {
const actualServerModule = (await vi.importActual(
'@gemini-cli/core',
'@google/gemini-cli-core',
)) as Record<string, unknown>;
return {
...actualServerModule,

View File

@ -6,7 +6,7 @@
import { useState, useEffect } from 'react';
import { useInput } from 'ink';
import { ApprovalMode, type Config } from '@gemini-cli/core';
import { ApprovalMode, type Config } from '@google/gemini-cli-core';
export interface UseAutoAcceptIndicatorArgs {
config: Config;

View File

@ -9,13 +9,13 @@ import type { Mocked } from 'vitest';
import { renderHook, act } from '@testing-library/react';
import { useCompletion } from './useCompletion.js';
import * as fs from 'fs/promises';
import { FileDiscoveryService } from '@gemini-cli/core';
import { FileDiscoveryService } from '@google/gemini-cli-core';
import { glob } from 'glob';
// Mock dependencies
vi.mock('fs/promises');
vi.mock('@gemini-cli/core', async () => {
const actual = await vi.importActual('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
return {
...actual,
FileDiscoveryService: vi.fn(),

View File

@ -15,7 +15,7 @@ import {
getErrorMessage,
Config,
FileDiscoveryService,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import {
MAX_SUGGESTIONS_TO_SHOW,
Suggestion,

View File

@ -22,10 +22,10 @@ import {
type EditorType,
checkHasEditorType,
allowEditorTypeInSandbox,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
vi.mock('@gemini-cli/core', async () => {
const actual = await vi.importActual('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
return {
...actual,
checkHasEditorType: vi.fn(() => true),

View File

@ -11,7 +11,7 @@ import {
allowEditorTypeInSandbox,
checkHasEditorType,
EditorType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
interface UseEditorSettingsReturn {
isEditorDialogOpen: boolean;

View File

@ -16,7 +16,7 @@ import {
TrackedExecutingToolCall,
TrackedCancelledToolCall,
} from './useReactToolScheduler.js';
import { Config, EditorType, AuthType } from '@gemini-cli/core';
import { Config, EditorType, AuthType } from '@google/gemini-cli-core';
import { Part, PartListUnion } from '@google/genai';
import { UseHistoryManagerReturn } from './useHistoryManager.js';
import { HistoryItem, MessageType, StreamingState } from '../types.js';
@ -42,7 +42,7 @@ const MockedUserPromptEvent = vi.hoisted(() =>
vi.fn().mockImplementation(() => {}),
);
vi.mock('@gemini-cli/core', async (importOriginal) => {
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
const actualCoreModule = (await importOriginal()) as any;
return {
...actualCoreModule,

View File

@ -24,7 +24,7 @@ import {
ThoughtSummary,
UnauthorizedError,
UserPromptEvent,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { type Part, type PartListUnion } from '@google/genai';
import {
StreamingState,

View File

@ -5,7 +5,7 @@
*/
import { useState, useEffect } from 'react';
import { sessionId, Logger } from '@gemini-cli/core';
import { sessionId, Logger } from '@google/gemini-cli-core';
/**
* Hook to manage the logger instance.

View File

@ -21,7 +21,7 @@ import {
ToolCall,
Status as CoreStatus,
EditorType,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { useCallback, useState, useMemo } from 'react';
import {
HistoryItemToolGroup,

View File

@ -7,7 +7,7 @@
import { useState, useEffect, useCallback } from 'react';
import * as fs from 'fs/promises';
import * as path from 'path';
import { isNodeError, getProjectTempDir } from '@gemini-cli/core';
import { isNodeError, getProjectTempDir } from '@google/gemini-cli-core';
const HISTORY_FILE = 'shell_history';
const MAX_HISTORY_LENGTH = 100;

View File

@ -5,7 +5,7 @@
*/
import { Message, MessageType } from '../types.js';
import { Config } from '@gemini-cli/core';
import { Config } from '@google/gemini-cli-core';
import { LoadedSettings } from '../../config/settings.js';
export function createShowMemoryAction(

View File

@ -24,7 +24,7 @@ import {
ToolCall, // Import from core
Status as ToolCallStatusType,
ApprovalMode, // Import from core
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import {
HistoryItemWithoutId,
ToolCallStatus,
@ -32,8 +32,8 @@ import {
} from '../types.js';
// Mocks
vi.mock('@gemini-cli/core', async () => {
const actual = await vi.importActual('@gemini-cli/core');
vi.mock('@google/gemini-cli-core', async () => {
const actual = await vi.importActual('@google/gemini-cli-core');
return {
...actual,
ToolRegistry: vi.fn(),

View File

@ -7,7 +7,7 @@
import {
ToolCallConfirmationDetails,
ToolResultDisplay,
} from '@gemini-cli/core';
} from '@google/gemini-cli-core';
import { CumulativeStats } from './contexts/SessionContext.js';
// Only defining the state enum needed by the UI

View File

@ -6,7 +6,7 @@
import { describe, it, expect } from 'vitest';
import { parseAndFormatApiError } from './errorParsing.js';
import { AuthType, StructuredError } from '@gemini-cli/core';
import { AuthType, StructuredError } from '@google/gemini-cli-core';
describe('parseAndFormatApiError', () => {
const enterpriseMessage = 'upgrade to a plan with higher limits';

View File

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { AuthType, StructuredError } from '@gemini-cli/core';
import { AuthType, StructuredError } from '@google/gemini-cli-core';
const RATE_LIMIT_ERROR_MESSAGE_GOOGLE =
'\nPlease wait and try again later. To increase your limits, upgrade to a plan with higher limits, or use /auth to switch to using a paid API key from AI Studio at https://aistudio.google.com/apikey';

View File

@ -6,7 +6,7 @@
import { promises as fs } from 'fs';
import { join } from 'path';
import { getProjectTempDir } from '@gemini-cli/core';
import { getProjectTempDir } from '@google/gemini-cli-core';
export async function cleanupCheckpoints() {
const tempDir = getProjectTempDir(process.cwd());

View File

@ -15,7 +15,7 @@ import {
SETTINGS_DIRECTORY_NAME,
} from '../config/settings.js';
import { promisify } from 'util';
import { SandboxConfig } from '@gemini-cli/core';
import { SandboxConfig } from '@google/gemini-cli-core';
const execAsync = promisify(exec);

View File

@ -7,10 +7,10 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { getStartupWarnings } from './startupWarnings.js';
import * as fs from 'fs/promises';
import { getErrorMessage } from '@gemini-cli/core';
import { getErrorMessage } from '@google/gemini-cli-core';
vi.mock('fs/promises');
vi.mock('@gemini-cli/core', async (importOriginal) => {
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
const actual = await importOriginal();
return {
...actual,

View File

@ -7,7 +7,7 @@
import fs from 'fs/promises';
import os from 'os';
import { join as pathJoin } from 'node:path';
import { getErrorMessage } from '@gemini-cli/core';
import { getErrorMessage } from '@google/gemini-cli-core';
const warningsFilePath = pathJoin(os.tmpdir(), 'gemini-cli-warnings.txt');

View File

@ -1,11 +1,11 @@
{
"name": "@gemini-cli/core",
"name": "@google/gemini-cli-core",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gemini-cli/core",
"name": "@google/gemini-cli-core",
"version": "0.1.0",
"dependencies": {
"@google/genai": "^1.4.0",

View File

@ -1,5 +1,5 @@
{
"name": "@gemini-cli/core",
"name": "@google/gemini-cli-core",
"version": "0.1.0",
"description": "Gemini CLI Server",
"type": "module",

View File

@ -77,18 +77,23 @@ if (!argv.s) {
execSync('npm run build --workspaces', { stdio: 'inherit' });
}
console.log('packing @gemini-cli/cli ...');
console.log('packing @google/gemini-cli ...');
const cliPackageDir = join('packages', 'cli');
rmSync(join(cliPackageDir, 'dist', 'gemini-cli-cli-*.tgz'), { force: true });
execSync(`npm pack -w @gemini-cli/cli --pack-destination ./packages/cli/dist`, {
stdio: 'ignore',
});
console.log('packing @gemini-cli/core ...');
const corePackageDir = join('packages', 'core');
rmSync(join(corePackageDir, 'dist', 'gemini-cli-core-*.tgz'), { force: true });
rmSync(join(cliPackageDir, 'dist', 'google-gemini-cli-*.tgz'), { force: true });
execSync(
`npm pack -w @gemini-cli/core --pack-destination ./packages/core/dist`,
`npm pack -w @google/gemini-cli --pack-destination ./packages/cli/dist`,
{
stdio: 'ignore',
},
);
console.log('packing @google/gemini-cli-core ...');
const corePackageDir = join('packages', 'core');
rmSync(join(corePackageDir, 'dist', 'google-gemini-cli-core-*.tgz'), {
force: true,
});
execSync(
`npm pack -w @google/gemini-cli-core --pack-destination ./packages/core/dist`,
{ stdio: 'ignore' },
);
@ -97,11 +102,11 @@ const packageVersion = JSON.parse(
).version;
chmodSync(
join(cliPackageDir, 'dist', `gemini-cli-cli-${packageVersion}.tgz`),
join(cliPackageDir, 'dist', `google-gemini-cli-${packageVersion}.tgz`),
0o755,
);
chmodSync(
join(corePackageDir, 'dist', `gemini-cli-core-${packageVersion}.tgz`),
join(corePackageDir, 'dist', `google-gemini-cli-core-${packageVersion}.tgz`),
0o755,
);