Remove internal-only tooling from the external build (#352)

* Remove internal-only tooling without changing external runtime contracts

This trims the lowest-risk internal-only surfaces first: deleted internal
modules are replaced by build-time no-op stubs, the bundled stuck skill is
removed, and the insights S3 upload path now stays local-only. The privacy
verifier is expanded and the remaining bundled internal Slack/Artifactory
strings are neutralized without broad repo-wide renames.

Constraint: Keep the first PR deletion-heavy and avoid mass rewrites of USER_TYPE, tengu, or claude_code identifiers
Rejected: One-shot DMCA cleanup branch | too much semantic risk for a first PR
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Treat full-repo typecheck as a baseline issue on this upstream snapshot; do not claim this commit introduced the existing non-Phase-A errors without isolating them first
Tested: bun run build
Tested: bun run smoke
Tested: bun run verify:privacy
Not-tested: Full repo typecheck (currently fails on widespread pre-existing upstream errors outside this change set)

* Keep minimal source shims so CI can import Phase A cleanup paths

The first PR removed internal-only source files entirely, but CI provider
and context tests import those modules directly from source rather than
through the build-time no-telemetry stubs. This restores tiny no-op source
shims so tests and local source imports resolve while preserving the same
external runtime behavior.

Constraint: GitHub Actions runs source-level tests in addition to bundled build/privacy checks
Rejected: Revert the entire deletion pass | unnecessary once the import contract is satisfied by small shims
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: For later cleanup phases, treat build-time stubs and source-test imports as separate compatibility surfaces
Tested: bun run build
Tested: bun run smoke
Tested: bun run verify:privacy
Tested: bun run test:provider
Tested: bun run test:provider-recommendation
Not-tested: Full repo typecheck (still noisy on this upstream snapshot)

---------

Co-authored-by: anandh8x <test@example.com>
This commit is contained in:
Anandan
2026-04-04 23:04:34 +05:30
committed by GitHub
parent 75d2543854
commit 9e84d2fddc
17 changed files with 148 additions and 1729 deletions

View File

@@ -1390,6 +1390,12 @@ const detectHostIP = memoize(
)
async function installFromArtifactory(command: string): Promise<string> {
const artifactoryBaseUrl =
process.env.CLAUDE_CODE_INTERNAL_ARTIFACTORY_BASE_URL
if (!artifactoryBaseUrl) {
throw new Error('Internal artifactory base URL is not configured')
}
const npmrcAuthPrefix = `//${artifactoryBaseUrl.replace(/^https?:\/\//, '')}/api/npm/npm-all/:_authToken=`
// Read auth token from ~/.npmrc
const npmrcPath = join(os.homedir(), '.npmrc')
let authToken: string | null = null
@@ -1402,11 +1408,8 @@ async function installFromArtifactory(command: string): Promise<string> {
const lines = npmrcContent.split('\n')
for (const line of lines) {
// Look for the artifactory auth token line
const match = line.match(
/\/\/artifactory\.infra\.ant\.dev\/artifactory\/api\/npm\/npm-all\/:_authToken=(.+)/,
)
if (match && match[1]) {
authToken = match[1].trim()
if (line.startsWith(npmrcAuthPrefix)) {
authToken = line.slice(npmrcAuthPrefix.length).trim()
break
}
}
@@ -1420,8 +1423,7 @@ async function installFromArtifactory(command: string): Promise<string> {
}
// Fetch the version from artifactory
const versionUrl =
'https://artifactory.infra.ant.dev/artifactory/armorcode-claude-code-internal/claude-vscode-releases/stable'
const versionUrl = `${artifactoryBaseUrl}/armorcode-claude-code-internal/claude-vscode-releases/stable`
try {
const versionResponse = await axios.get(versionUrl, {
@@ -1436,7 +1438,7 @@ async function installFromArtifactory(command: string): Promise<string> {
}
// Download the .vsix file from artifactory
const vsixUrl = `https://artifactory.infra.ant.dev/artifactory/armorcode-claude-code-internal/claude-vscode-releases/${version}/claude-code.vsix`
const vsixUrl = `${artifactoryBaseUrl}/armorcode-claude-code-internal/claude-vscode-releases/${version}/claude-code.vsix`
const tempVsixPath = join(
os.tmpdir(),
`claude-code-${version}-${Date.now()}.vsix`,