@cnwenf/occ 2.1.281 → 2.1.282
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/cli.js +139 -120
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.282","BINARY_NAME":"occ","BUILD_TIME":"2026-07-24T09:40:02.332Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -59590,7 +59590,7 @@ var init_types2 = __esm(() => {
|
|
|
59590
59590
|
sshHost: exports_external.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),
|
|
59591
59591
|
sshPort: exports_external.number().int().optional().describe("SSH port (default: 22)"),
|
|
59592
59592
|
sshIdentityFile: exports_external.string().optional().describe("Path to SSH identity file (private key)"),
|
|
59593
|
-
startDirectory: exports_external.string().optional().describe("Default working directory on the remote host. " + "Supports tilde expansion (e.g. ~/projects). " + "If not specified, defaults to the remote user home directory. " + "Can be overridden by the [dir] positional argument in `
|
|
59593
|
+
startDirectory: exports_external.string().optional().describe("Default working directory on the remote host. " + "Supports tilde expansion (e.g. ~/projects). " + "If not specified, defaults to the remote user home directory. " + "Can be overridden by the [dir] positional argument in `occ ssh <config> [dir]`.")
|
|
59594
59594
|
})).optional().describe("SSH connection configurations for remote environments. " + "Typically set in managed settings by enterprise administrators " + "to pre-configure SSH connections for team members."),
|
|
59595
59595
|
claudeMdExcludes: exports_external.array(exports_external.string()).optional().describe("Glob patterns or absolute paths of CLAUDE.md files to exclude from loading. " + "Patterns are matched against absolute file paths using picomatch. " + "Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). " + 'Examples: "/home/user/monorepo/CLAUDE.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),
|
|
59596
59596
|
pluginTrustMessage: exports_external.string().optional().describe("Custom message to append to the plugin trust warning shown before installation. " + "Only read from policy settings (managed-settings.json / MDM). " + "Useful for enterprise administrators to add organization-specific context " + '(e.g., "All plugins from our internal marketplace are vetted and approved.").'),
|
|
@@ -60775,8 +60775,8 @@ function getRequiredVersionError(opts) {
|
|
|
60775
60775
|
if (!min) {
|
|
60776
60776
|
logForDebugging(`requiredMinimumVersion '${requiredMinimumVersion}' is not a valid semver version \u2014 ignoring`, { level: "error" });
|
|
60777
60777
|
} else if (!gte(currentVersion, min)) {
|
|
60778
|
-
return `
|
|
60779
|
-
Update
|
|
60778
|
+
return `OCC ${currentVersion} is older than the minimum version required by your organization (${requiredMinimumVersion}).
|
|
60779
|
+
Update OCC using your organization's approved method, then try again. If automatic updates are available, \`occ update\` may also work.`;
|
|
60780
60780
|
}
|
|
60781
60781
|
}
|
|
60782
60782
|
if (requiredMaximumVersion) {
|
|
@@ -60784,8 +60784,8 @@ Update Claude Code using your organization's approved method, then try again. If
|
|
|
60784
60784
|
if (!max) {
|
|
60785
60785
|
logForDebugging(`requiredMaximumVersion '${requiredMaximumVersion}' is not a valid semver version \u2014 ignoring`, { level: "error" });
|
|
60786
60786
|
} else if (!lte(currentVersion, max)) {
|
|
60787
|
-
return `
|
|
60788
|
-
Your organization requires version ${requiredMaximumVersion} or older. Install an approved version using your organization's approved method. \`
|
|
60787
|
+
return `OCC ${currentVersion} is newer than the maximum version allowed by your organization (${requiredMaximumVersion}).
|
|
60788
|
+
Your organization requires version ${requiredMaximumVersion} or older. Install an approved version using your organization's approved method. \`occ install <version>\` may also work.`;
|
|
60789
60789
|
}
|
|
60790
60790
|
}
|
|
60791
60791
|
return null;
|
|
@@ -143048,8 +143048,8 @@ async function validateForceLoginOrg() {
|
|
|
143048
143048
|
message: `Unable to verify organization for the current authentication token.
|
|
143049
143049
|
This machine requires organization ${requiredOrgUuid} but the profile could not be fetched.
|
|
143050
143050
|
This may be a network error, or the token may lack the user:profile scope required for
|
|
143051
|
-
verification (tokens from '
|
|
143052
|
-
Try again, or obtain a full-scope token via '
|
|
143051
|
+
verification (tokens from 'occ setup-token' do not include this scope).
|
|
143052
|
+
Try again, or obtain a full-scope token via 'occ auth login'.`
|
|
143053
143053
|
};
|
|
143054
143054
|
}
|
|
143055
143055
|
const tokenOrgUuid = profile3.organization.uuid;
|
|
@@ -143074,7 +143074,7 @@ Remove the environment variable or obtain a token for the correct organization.`
|
|
|
143074
143074
|
message: `Your authentication token belongs to organization ${tokenOrgUuid},
|
|
143075
143075
|
but this machine requires organization ${requiredOrgUuid}.
|
|
143076
143076
|
|
|
143077
|
-
Please log in with the correct organization:
|
|
143077
|
+
Please log in with the correct organization: occ auth login`
|
|
143078
143078
|
};
|
|
143079
143079
|
}
|
|
143080
143080
|
var DEFAULT_API_KEY_HELPER_TTL, _apiKeyHelperCache = null, _apiKeyHelperInflight = null, _apiKeyHelperEpoch = 0, _apiKeyHelperError = null, DEFAULT_AWS_STS_TTL, AWS_CREDENTIAL_EXPIRY_SAFETY_MARGIN_MS, AWS_CREDENTIAL_MIN_CACHE_TTL_MS, AWS_AUTH_REFRESH_TIMEOUT_MS, refreshAndGetAwsCredentials, awsCredentialProviderCache, AWS_PROVIDER_INVALIDATE_MIN_INTERVAL_MS, awsProviderInvalidateTimestamps, GCP_CREDENTIALS_CHECK_TIMEOUT_MS = 5000, DEFAULT_GCP_CREDENTIAL_TTL = 3600000, GCP_AUTH_REFRESH_TIMEOUT_MS = 180000, refreshGcpCredentialsIfNeeded, getApiKeyFromConfigOrMacOSKeychain, getClaudeAIOAuthTokens, lastCredentialsMtimeMs = 0, pending401Handlers, pendingRefreshCheck = null, cachedOtelHeaders = null, cachedOtelHeadersTimestamp = 0, DEFAULT_OTEL_HEADERS_DEBOUNCE_MS = 1740000, GcpCredentialsTimeoutError;
|
|
@@ -152544,13 +152544,13 @@ async function isBridgeEnabledBlocking() {
|
|
|
152544
152544
|
async function getBridgeDisabledReason() {
|
|
152545
152545
|
if (feature("BRIDGE_MODE")) {
|
|
152546
152546
|
if (!isClaudeAISubscriber2()) {
|
|
152547
|
-
return "Remote Control requires a claude.ai subscription. Run `
|
|
152547
|
+
return "Remote Control requires a claude.ai subscription. Run `occ auth login` to sign in with your claude.ai account.";
|
|
152548
152548
|
}
|
|
152549
152549
|
if (!hasProfileScope2()) {
|
|
152550
|
-
return "Remote Control requires a full-scope login token. Long-lived tokens (from `
|
|
152550
|
+
return "Remote Control requires a full-scope login token. Long-lived tokens (from `occ setup-token` or CLAUDE_CODE_OAUTH_TOKEN) are limited to inference-only for security reasons. Run `occ auth login` to use Remote Control.";
|
|
152551
152551
|
}
|
|
152552
152552
|
if (!getOauthAccountInfo2()?.organizationUuid) {
|
|
152553
|
-
return "Unable to determine your organization for Remote Control eligibility. Run `
|
|
152553
|
+
return "Unable to determine your organization for Remote Control eligibility. Run `occ auth login` to refresh your account information.";
|
|
152554
152554
|
}
|
|
152555
152555
|
if (!await checkGate_CACHED_OR_BLOCKING("tengu_ccr_bridge")) {
|
|
152556
152556
|
return "Remote Control is not yet enabled for your account.";
|
|
@@ -152590,8 +152590,8 @@ function checkBridgeMinVersion() {
|
|
|
152590
152590
|
if (feature("BRIDGE_MODE")) {
|
|
152591
152591
|
const config4 = getDynamicConfig_CACHED_MAY_BE_STALE("tengu_bridge_min_version", { minVersion: "0.0.0" });
|
|
152592
152592
|
if (config4.minVersion && lt(MACRO.VERSION, config4.minVersion)) {
|
|
152593
|
-
return `Your version of
|
|
152594
|
-
Version ${config4.minVersion} or higher is required. Run \`
|
|
152593
|
+
return `Your version of OCC (${MACRO.VERSION}) is too old for Remote Control.
|
|
152594
|
+
Version ${config4.minVersion} or higher is required. Run \`occ update\` to update.`;
|
|
152595
152595
|
}
|
|
152596
152596
|
}
|
|
152597
152597
|
return null;
|
|
@@ -380634,6 +380634,8 @@ var init_readOnlyValidation = __esm(() => {
|
|
|
380634
380634
|
/^echo(?:\s+(?:'[^']*'|"[^"$<>\n\r]*"|[^|;&`$(){}><#\\!"'\s]+))*(?:\s+2>&1)?\s*$/,
|
|
380635
380635
|
/^claude -h$/,
|
|
380636
380636
|
/^claude --help$/,
|
|
380637
|
+
/^occ -h$/,
|
|
380638
|
+
/^occ --help$/,
|
|
380637
380639
|
/^uniq(?:\s+(?:-[a-zA-Z]+|--[a-zA-Z-]+(?:=\S+)?|-[fsw]\s+\d+))*(?:\s|$)\s*$/,
|
|
380638
380640
|
/^pwd$/,
|
|
380639
380641
|
/^whoami$/,
|
|
@@ -392144,6 +392146,12 @@ var init_concurrentSessions = __esm(() => {
|
|
|
392144
392146
|
init_teammate();
|
|
392145
392147
|
});
|
|
392146
392148
|
|
|
392149
|
+
// src/constants/cli.ts
|
|
392150
|
+
var CLI_BINARY_NAME;
|
|
392151
|
+
var init_cli = __esm(() => {
|
|
392152
|
+
CLI_BINARY_NAME = globalThis.MACRO?.BINARY_NAME ?? "occ";
|
|
392153
|
+
});
|
|
392154
|
+
|
|
392147
392155
|
// src/services/analytics/datadog.ts
|
|
392148
392156
|
import { createHash as createHash15 } from "crypto";
|
|
392149
392157
|
function camelToSnakeCase(str2) {
|
|
@@ -392412,7 +392420,7 @@ function printResumeHint() {
|
|
|
392412
392420
|
}
|
|
392413
392421
|
writeSync2(1, source_default.dim(`
|
|
392414
392422
|
Resume this session with:
|
|
392415
|
-
|
|
392423
|
+
${CLI_BINARY_NAME} --resume ${resumeArg}
|
|
392416
392424
|
`));
|
|
392417
392425
|
resumeHintPrinted = true;
|
|
392418
392426
|
} catch {}
|
|
@@ -392521,6 +392529,7 @@ var init_gracefulShutdown = __esm(() => {
|
|
|
392521
392529
|
init_source();
|
|
392522
392530
|
init_memoize();
|
|
392523
392531
|
init_mjs();
|
|
392532
|
+
init_cli();
|
|
392524
392533
|
init_state();
|
|
392525
392534
|
init_instances();
|
|
392526
392535
|
init_csi();
|
|
@@ -392730,13 +392739,13 @@ async function checkGroveForNonInteractive() {
|
|
|
392730
392739
|
});
|
|
392731
392740
|
if (config6 === null || config6.notice_is_grace_period) {
|
|
392732
392741
|
writeToStderr(`
|
|
392733
|
-
An update to our Consumer Terms and Privacy Policy will take effect on October 8, 2025. Run \`
|
|
392742
|
+
An update to our Consumer Terms and Privacy Policy will take effect on October 8, 2025. Run \`occ\` to review the updated terms.
|
|
392734
392743
|
|
|
392735
392744
|
`);
|
|
392736
392745
|
await markGroveNoticeViewed();
|
|
392737
392746
|
} else {
|
|
392738
392747
|
writeToStderr(`
|
|
392739
|
-
[ACTION REQUIRED] An update to our Consumer Terms and Privacy Policy has taken effect on October 8, 2025. You must run \`
|
|
392748
|
+
[ACTION REQUIRED] An update to our Consumer Terms and Privacy Policy has taken effect on October 8, 2025. You must run \`occ\` to review the updated terms.
|
|
392740
392749
|
|
|
392741
392750
|
`);
|
|
392742
392751
|
await gracefulShutdown(1);
|
|
@@ -433325,11 +433334,11 @@ async function assertMinVersion() {
|
|
|
433325
433334
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
433326
433335
|
if (versionConfig.minVersion && lt(MACRO.VERSION, versionConfig.minVersion)) {
|
|
433327
433336
|
console.error(`
|
|
433328
|
-
It looks like your version of
|
|
433337
|
+
It looks like your version of OCC (${MACRO.VERSION}) needs an update.
|
|
433329
433338
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
433330
433339
|
|
|
433331
433340
|
To update, please run:
|
|
433332
|
-
|
|
433341
|
+
occ update
|
|
433333
433342
|
|
|
433334
433343
|
This will ensure you have access to the latest features and improvements.
|
|
433335
433344
|
`);
|
|
@@ -433565,13 +433574,13 @@ async function installGlobalPackage(specificVersion) {
|
|
|
433565
433574
|
console.error(`
|
|
433566
433575
|
Error: Windows NPM detected in WSL
|
|
433567
433576
|
|
|
433568
|
-
You're running
|
|
433577
|
+
You're running OCC in WSL but using the Windows NPM installation from /mnt/c/.
|
|
433569
433578
|
This configuration is not supported for updates.
|
|
433570
433579
|
|
|
433571
433580
|
To fix this issue:
|
|
433572
433581
|
1. Install Node.js within your Linux distribution: e.g. sudo apt install nodejs npm
|
|
433573
433582
|
2. Make sure Linux NPM is in your PATH before the Windows version
|
|
433574
|
-
3. Try updating again with '
|
|
433583
|
+
3. Try updating again with 'occ update'
|
|
433575
433584
|
`);
|
|
433576
433585
|
return "install_failed";
|
|
433577
433586
|
}
|
|
@@ -434069,7 +434078,7 @@ async function detectConfigurationIssues(type) {
|
|
|
434069
434078
|
if (await isExternallyManagedLauncher(launcherPath)) {
|
|
434070
434079
|
warnings.push({
|
|
434071
434080
|
issue: `${launcherPath} was not created by the native installer (it is not a symlink into the versions/ directory), so auto-update leaves it untouched.`,
|
|
434072
|
-
fix: `If you put a launcher wrapper there on purpose, this is expected \u2014 new versions still install under $XDG_DATA_HOME/claude/versions, your launcher decides what runs, and automatic version cleanup is disabled on this machine (the installer cannot tell which version your launcher needs, so it keeps them all). To let
|
|
434081
|
+
fix: `If you put a launcher wrapper there on purpose, this is expected \u2014 new versions still install under $XDG_DATA_HOME/claude/versions, your launcher decides what runs, and automatic version cleanup is disabled on this machine (the installer cannot tell which version your launcher needs, so it keeps them all). To let OCC manage the launcher again, remove ${launcherPath} and run \`occ update\`.`
|
|
434073
434082
|
});
|
|
434074
434083
|
}
|
|
434075
434084
|
const path21 = process.env.PATH || "";
|
|
@@ -434113,20 +434122,20 @@ async function detectConfigurationIssues(type) {
|
|
|
434113
434122
|
if (type === "npm-local" && config6.installMethod !== "local") {
|
|
434114
434123
|
warnings.push({
|
|
434115
434124
|
issue: `Running from local installation but config install method is '${config6.installMethod}'`,
|
|
434116
|
-
fix: "Consider using native installation:
|
|
434125
|
+
fix: "Consider using native installation: occ install"
|
|
434117
434126
|
});
|
|
434118
434127
|
}
|
|
434119
434128
|
if (type === "native" && config6.installMethod !== "native") {
|
|
434120
434129
|
warnings.push({
|
|
434121
434130
|
issue: `Running native installation but config install method is '${config6.installMethod}'`,
|
|
434122
|
-
fix: "Run
|
|
434131
|
+
fix: "Run occ install to update configuration"
|
|
434123
434132
|
});
|
|
434124
434133
|
}
|
|
434125
434134
|
}
|
|
434126
434135
|
if (type === "npm-global" && await localInstallationExists()) {
|
|
434127
434136
|
warnings.push({
|
|
434128
434137
|
issue: "Local installation exists but not being used",
|
|
434129
|
-
fix: "Consider using native installation:
|
|
434138
|
+
fix: "Consider using native installation: occ install"
|
|
434130
434139
|
});
|
|
434131
434140
|
}
|
|
434132
434141
|
const existingAlias = await findClaudeAlias();
|
|
@@ -434210,7 +434219,7 @@ async function getDoctorDiagnostic() {
|
|
|
434210
434219
|
if (!hasUpdatePermissions && !getAutoUpdaterDisabledReason()) {
|
|
434211
434220
|
warnings.push({
|
|
434212
434221
|
issue: "Insufficient permissions for auto-updates",
|
|
434213
|
-
fix: "Do one of: (1) Re-install node without sudo, or (2) Use `
|
|
434222
|
+
fix: "Do one of: (1) Re-install node without sudo, or (2) Use `occ install` for native installation"
|
|
434214
434223
|
});
|
|
434215
434224
|
}
|
|
434216
434225
|
}
|
|
@@ -435345,7 +435354,7 @@ async function checkInstall(force = false) {
|
|
|
435345
435354
|
if (isWindows3) {
|
|
435346
435355
|
if (!await isPossibleClaudeBinary(dirs.executable)) {
|
|
435347
435356
|
messages.push({
|
|
435348
|
-
message: `installMethod is native, but
|
|
435357
|
+
message: `installMethod is native, but the OCC command is missing or invalid at ${dirs.executable}`,
|
|
435349
435358
|
userActionRequired: true,
|
|
435350
435359
|
type: "error"
|
|
435351
435360
|
});
|
|
@@ -435364,7 +435373,7 @@ async function checkInstall(force = false) {
|
|
|
435364
435373
|
} catch (e4) {
|
|
435365
435374
|
if (isENOENT(e4)) {
|
|
435366
435375
|
messages.push({
|
|
435367
|
-
message: `installMethod is native, but
|
|
435376
|
+
message: `installMethod is native, but the OCC command was not found at ${dirs.executable}`,
|
|
435368
435377
|
userActionRequired: true,
|
|
435369
435378
|
type: "error"
|
|
435370
435379
|
});
|
|
@@ -436530,7 +436539,7 @@ async function authStatus(opts) {
|
|
|
436530
436539
|
`);
|
|
436531
436540
|
}
|
|
436532
436541
|
if (!loggedIn) {
|
|
436533
|
-
process.stdout.write(`Not logged in. Run
|
|
436542
|
+
process.stdout.write(`Not logged in. Run occ auth login to authenticate.
|
|
436534
436543
|
`);
|
|
436535
436544
|
}
|
|
436536
436545
|
} else {
|
|
@@ -474245,7 +474254,7 @@ async function teleportResumeCodeSession(sessionId, onProgress) {
|
|
|
474245
474254
|
sessionId
|
|
474246
474255
|
});
|
|
474247
474256
|
const notInRepoDisplay = repoValidation.sessionHost && repoValidation.sessionHost.toLowerCase() !== "github.com" ? `${repoValidation.sessionHost}/${repoValidation.sessionRepo}` : repoValidation.sessionRepo;
|
|
474248
|
-
throw new TeleportOperationError(`You must run
|
|
474257
|
+
throw new TeleportOperationError(`You must run occ --teleport ${sessionId} from a checkout of ${notInRepoDisplay}.`, source_default.red(`You must run occ --teleport ${sessionId} from a checkout of ${source_default.bold(notInRepoDisplay)}.
|
|
474249
474258
|
`));
|
|
474250
474259
|
}
|
|
474251
474260
|
case "mismatch": {
|
|
@@ -474255,8 +474264,8 @@ async function teleportResumeCodeSession(sessionId, onProgress) {
|
|
|
474255
474264
|
const hostsDiffer = repoValidation.sessionHost && repoValidation.currentHost && repoValidation.sessionHost.replace(/:\d+$/, "").toLowerCase() !== repoValidation.currentHost.replace(/:\d+$/, "").toLowerCase();
|
|
474256
474265
|
const sessionDisplay = hostsDiffer ? `${repoValidation.sessionHost}/${repoValidation.sessionRepo}` : repoValidation.sessionRepo;
|
|
474257
474266
|
const currentDisplay = hostsDiffer ? `${repoValidation.currentHost}/${repoValidation.currentRepo}` : repoValidation.currentRepo;
|
|
474258
|
-
throw new TeleportOperationError(`You must run
|
|
474259
|
-
This repo is ${currentDisplay}.`, source_default.red(`You must run
|
|
474267
|
+
throw new TeleportOperationError(`You must run occ --teleport ${sessionId} from a checkout of ${sessionDisplay}.
|
|
474268
|
+
This repo is ${currentDisplay}.`, source_default.red(`You must run occ --teleport ${sessionId} from a checkout of ${source_default.bold(sessionDisplay)}.
|
|
474260
474269
|
This repo is ${source_default.bold(currentDisplay)}.
|
|
474261
474270
|
`));
|
|
474262
474271
|
}
|
|
@@ -608680,7 +608689,7 @@ async function removeMarketplaceSource(name3) {
|
|
|
608680
608689
|
const entry = config7[name3];
|
|
608681
608690
|
const seedDir = seedDirFor(entry.installLocation);
|
|
608682
608691
|
if (seedDir) {
|
|
608683
|
-
throw new Error(`Marketplace '${name3}' is registered from the read-only seed directory ` + `(${seedDir}) and will be re-registered on next startup. ` + `To stop using its plugins:
|
|
608692
|
+
throw new Error(`Marketplace '${name3}' is registered from the read-only seed directory ` + `(${seedDir}) and will be re-registered on next startup. ` + `To stop using its plugins: occ plugin disable <plugin>@${name3}`);
|
|
608684
608693
|
}
|
|
608685
608694
|
delete config7[name3];
|
|
608686
608695
|
await saveKnownMarketplacesConfig(config7);
|
|
@@ -608884,7 +608893,7 @@ async function refreshMarketplace(name3, onProgress, options) {
|
|
|
608884
608893
|
const cacheDir = resolve50(getMarketplacesCacheDir());
|
|
608885
608894
|
const resolvedLoc = resolve50(installLocation);
|
|
608886
608895
|
if (resolvedLoc !== cacheDir && !resolvedLoc.startsWith(cacheDir + sep36)) {
|
|
608887
|
-
throw new Error(`Marketplace '${name3}' has a corrupted installLocation ` + `(${installLocation}) \u2014 expected a path inside ${cacheDir}. ` + `This can happen after cross-platform path writes or manual edits ` + `to known_marketplaces.json. ` + `Run:
|
|
608896
|
+
throw new Error(`Marketplace '${name3}' has a corrupted installLocation ` + `(${installLocation}) \u2014 expected a path inside ${cacheDir}. ` + `This can happen after cross-platform path writes or manual edits ` + `to known_marketplaces.json. ` + `Run: occ plugin marketplace remove "${name3}" and re-add it.`);
|
|
608888
608897
|
}
|
|
608889
608898
|
}
|
|
608890
608899
|
if (name3 === OFFICIAL_MARKETPLACE_NAME) {
|
|
@@ -608931,7 +608940,7 @@ async function refreshMarketplace(name3, onProgress, options) {
|
|
|
608931
608940
|
` + `${reason}
|
|
608932
608941
|
` + `Source: ${sourceDisplay}
|
|
608933
608942
|
|
|
608934
|
-
` + `You can remove this marketplace with:
|
|
608943
|
+
` + `You can remove this marketplace with: occ plugin marketplace remove "${name3}"`);
|
|
608935
608944
|
}
|
|
608936
608945
|
} else if (source2.source === "url") {
|
|
608937
608946
|
await cacheMarketplaceFromUrl(source2.url, installLocation, source2.headers, onProgress);
|
|
@@ -609017,7 +609026,7 @@ var init_marketplaceManager = __esm(() => {
|
|
|
609017
609026
|
throw new Error(`Marketplace '${name3}' not found in configuration. Available marketplaces: ${Object.keys(config7).join(", ")}`);
|
|
609018
609027
|
}
|
|
609019
609028
|
if (isLocalMarketplaceSource(entry.source) && !isAbsolute29(entry.source.path)) {
|
|
609020
|
-
throw new Error(`Marketplace "${name3}" has a relative source path (${entry.source.path}) ` + `in known_marketplaces.json \u2014 this is stale state from an older ` + `
|
|
609029
|
+
throw new Error(`Marketplace "${name3}" has a relative source path (${entry.source.path}) ` + `in known_marketplaces.json \u2014 this is stale state from an older ` + `OCC version. Run 'occ marketplace remove ${name3}' and ` + `re-add it from the original project directory.`);
|
|
609021
609030
|
}
|
|
609022
609031
|
try {
|
|
609023
609032
|
return await readCachedMarketplace(entry.installLocation);
|
|
@@ -622703,7 +622712,7 @@ async function performMCPXaaAuth(serverName, serverConfig, onAuthorizationUrl, a
|
|
|
622703
622712
|
}
|
|
622704
622713
|
const idp = getXaaIdpSettings();
|
|
622705
622714
|
if (!idp) {
|
|
622706
|
-
throw new Error("XAA: no IdP connection configured. Run '
|
|
622715
|
+
throw new Error("XAA: no IdP connection configured. Run 'occ mcp xaa setup --issuer <url> --client-id <id> --client-secret' to configure.");
|
|
622707
622716
|
}
|
|
622708
622717
|
const clientId = serverConfig.oauth?.clientId;
|
|
622709
622718
|
if (!clientId) {
|
|
@@ -634687,8 +634696,8 @@ async function regenerateCompletionCache() {
|
|
|
634687
634696
|
return;
|
|
634688
634697
|
}
|
|
634689
634698
|
logForDebugging(`update: Regenerating ${shell.name} completion cache`);
|
|
634690
|
-
const
|
|
634691
|
-
const result = await execFileNoThrow(
|
|
634699
|
+
const cliBin = process.argv[1] || CLI_BINARY_NAME;
|
|
634700
|
+
const result = await execFileNoThrow(cliBin, [
|
|
634692
634701
|
"completion",
|
|
634693
634702
|
shell.shellFlag,
|
|
634694
634703
|
"--output",
|
|
@@ -634702,6 +634711,7 @@ async function regenerateCompletionCache() {
|
|
|
634702
634711
|
}
|
|
634703
634712
|
var init_completionCache = __esm(() => {
|
|
634704
634713
|
init_color();
|
|
634714
|
+
init_cli();
|
|
634705
634715
|
init_supports_hyperlinks2();
|
|
634706
634716
|
init_debug();
|
|
634707
634717
|
init_errors();
|
|
@@ -639881,7 +639891,7 @@ function systemdUnitPath() {
|
|
|
639881
639891
|
function installPersistentService() {
|
|
639882
639892
|
const plat = detectInstallPlatform();
|
|
639883
639893
|
if (plat === "unsupported") {
|
|
639884
|
-
const msg = `
|
|
639894
|
+
const msg = `occ daemon install isn't available on ${process.platform} (no launchd/systemd)`;
|
|
639885
639895
|
logEvent2("daemon_install_unsupported", { platform: process.platform });
|
|
639886
639896
|
return msg;
|
|
639887
639897
|
}
|
|
@@ -639972,7 +639982,7 @@ function uninstallPersistentService() {
|
|
|
639972
639982
|
logEvent2("daemon_uninstall_systemd", {});
|
|
639973
639983
|
return `systemd unit removed`;
|
|
639974
639984
|
}
|
|
639975
|
-
return `
|
|
639985
|
+
return `occ daemon uninstall isn't available on ${process.platform} (no launchd/systemd)`;
|
|
639976
639986
|
}
|
|
639977
639987
|
var init_install2 = __esm(() => {
|
|
639978
639988
|
init_analytics();
|
|
@@ -663723,7 +663733,7 @@ function MCPListPanel(t0) {
|
|
|
663723
663733
|
if ($4[60] !== hasFailedClients) {
|
|
663724
663734
|
t26 = hasFailedClients && /* @__PURE__ */ jsx_runtime234.jsx(ThemedText, {
|
|
663725
663735
|
dimColor: true,
|
|
663726
|
-
children: debugMode ? "\u203B Error logs shown inline with --debug" : "\u203B Run
|
|
663736
|
+
children: debugMode ? "\u203B Error logs shown inline with --debug" : "\u203B Run occ --debug to see error logs"
|
|
663727
663737
|
});
|
|
663728
663738
|
$4[60] = hasFailedClients;
|
|
663729
663739
|
$4[61] = t26;
|
|
@@ -667116,7 +667126,7 @@ function MCPSettings(t0) {
|
|
|
667116
667126
|
return;
|
|
667117
667127
|
}
|
|
667118
667128
|
if (servers.length === 0 && agentMcpServers.length === 0) {
|
|
667119
|
-
onComplete("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `
|
|
667129
|
+
onComplete("No MCP servers configured. Please run /doctor if this is unexpected. Otherwise, run `occ mcp --help` or visit https://code.claude.com/docs/en/mcp to learn more.");
|
|
667120
667130
|
}
|
|
667121
667131
|
};
|
|
667122
667132
|
t8 = [servers.length, filteredClients.length, agentMcpServers.length, onComplete];
|
|
@@ -670843,7 +670853,7 @@ async function uninstallPluginOp(plugin, scope = "user", deleteDataDir = true) {
|
|
|
670843
670853
|
if (actualScope === "project") {
|
|
670844
670854
|
return {
|
|
670845
670855
|
success: false,
|
|
670846
|
-
message: `Plugin "${plugin}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you:
|
|
670856
|
+
message: `Plugin "${plugin}" is enabled at project scope (.claude/settings.json, shared with your team). To disable just for you: occ plugin disable ${plugin} --scope local`
|
|
670847
670857
|
};
|
|
670848
670858
|
}
|
|
670849
670859
|
return {
|
|
@@ -676249,7 +676259,7 @@ When given a directory, automatically validates .claude-plugin/marketplace.json
|
|
|
676249
676259
|
or .claude-plugin/plugin.json (prefers marketplace if both exist).
|
|
676250
676260
|
|
|
676251
676261
|
Or from the command line:
|
|
676252
|
-
|
|
676262
|
+
occ plugin validate <path>`);
|
|
676253
676263
|
return;
|
|
676254
676264
|
}
|
|
676255
676265
|
try {
|
|
@@ -682387,7 +682397,7 @@ function createMovedToPluginCommand({
|
|
|
682387
682397
|
text: `This command has been moved to a plugin. Tell the user:
|
|
682388
682398
|
|
|
682389
682399
|
1. To install the plugin, run:
|
|
682390
|
-
|
|
682400
|
+
occ plugin install ${pluginName}@claude-code-marketplace
|
|
682391
682401
|
|
|
682392
682402
|
2. After installation, use /${pluginName}:${pluginCommand} to run this command
|
|
682393
682403
|
|
|
@@ -684362,7 +684372,7 @@ function createProjectOnboardingFeed(steps) {
|
|
|
684362
684372
|
text: `${checkmark}${text2}`
|
|
684363
684373
|
};
|
|
684364
684374
|
});
|
|
684365
|
-
const warningText = getCwd() === homedir40() ? "Note: You have launched
|
|
684375
|
+
const warningText = getCwd() === homedir40() ? "Note: You have launched OCC in your home directory. For the best experience, launch it in a project directory instead." : undefined;
|
|
684366
684376
|
if (warningText) {
|
|
684367
684377
|
lines2.push({
|
|
684368
684378
|
text: warningText
|
|
@@ -686967,7 +686977,7 @@ var init_statusNoticeDefinitions = __esm(() => {
|
|
|
686967
686977
|
apiKeySource,
|
|
686968
686978
|
" instead of Anthropic Console key. Either unset ",
|
|
686969
686979
|
apiKeySource,
|
|
686970
|
-
", or run `
|
|
686980
|
+
", or run `occ /logout`."
|
|
686971
686981
|
]
|
|
686972
686982
|
})
|
|
686973
686983
|
]
|
|
@@ -692125,7 +692135,7 @@ function checkCrossProjectResume(log3, showAllProjects, worktreePaths) {
|
|
|
692125
692135
|
}
|
|
692126
692136
|
if (process.env.USER_TYPE !== "ant") {
|
|
692127
692137
|
const sessionId2 = getSessionIdFromLog(log3);
|
|
692128
|
-
const command10 = `cd ${quote([log3.projectPath])} &&
|
|
692138
|
+
const command10 = `cd ${quote([log3.projectPath])} && ${CLI_BINARY_NAME} --resume ${sessionId2}`;
|
|
692129
692139
|
return {
|
|
692130
692140
|
isCrossProject: true,
|
|
692131
692141
|
isSameRepoWorktree: false,
|
|
@@ -692142,7 +692152,7 @@ function checkCrossProjectResume(log3, showAllProjects, worktreePaths) {
|
|
|
692142
692152
|
};
|
|
692143
692153
|
}
|
|
692144
692154
|
const sessionId = getSessionIdFromLog(log3);
|
|
692145
|
-
const command9 = `cd ${quote([log3.projectPath])} &&
|
|
692155
|
+
const command9 = `cd ${quote([log3.projectPath])} && ${CLI_BINARY_NAME} --resume ${sessionId}`;
|
|
692146
692156
|
return {
|
|
692147
692157
|
isCrossProject: true,
|
|
692148
692158
|
isSameRepoWorktree: false,
|
|
@@ -692152,6 +692162,7 @@ function checkCrossProjectResume(log3, showAllProjects, worktreePaths) {
|
|
|
692152
692162
|
}
|
|
692153
692163
|
var init_crossProjectResume = __esm(() => {
|
|
692154
692164
|
init_state();
|
|
692165
|
+
init_cli();
|
|
692155
692166
|
init_shellQuote();
|
|
692156
692167
|
init_sessionStorage();
|
|
692157
692168
|
});
|
|
@@ -693214,7 +693225,7 @@ function SessionInfo(t0) {
|
|
|
693214
693225
|
children: [
|
|
693215
693226
|
/* @__PURE__ */ jsx_runtime287.jsx(ThemedText, {
|
|
693216
693227
|
color: "warning",
|
|
693217
|
-
children: "Not in remote mode. Start with `
|
|
693228
|
+
children: "Not in remote mode. Start with `occ --remote` to use this command."
|
|
693218
693229
|
}),
|
|
693219
693230
|
/* @__PURE__ */ jsx_runtime287.jsx(ThemedText, {
|
|
693220
693231
|
dimColor: true,
|
|
@@ -707439,7 +707450,7 @@ async function call63(onDone, context8, args) {
|
|
|
707439
707450
|
};
|
|
707440
707451
|
const titleInfo = title ? ` "${title}"` : "";
|
|
707441
707452
|
const resumeHint = `
|
|
707442
|
-
To resume the original:
|
|
707453
|
+
To resume the original: ${CLI_BINARY_NAME} -r ${originalSessionId}`;
|
|
707443
707454
|
const successMessage = `Branched conversation${titleInfo}. You are now in the branch.${resumeHint}`;
|
|
707444
707455
|
if (context8.resume) {
|
|
707445
707456
|
await context8.resume(sessionId, forkLog, "fork");
|
|
@@ -707456,6 +707467,7 @@ To resume the original: claude -r ${originalSessionId}`;
|
|
|
707456
707467
|
}
|
|
707457
707468
|
var init_branch = __esm(() => {
|
|
707458
707469
|
init_state();
|
|
707470
|
+
init_cli();
|
|
707459
707471
|
init_analytics();
|
|
707460
707472
|
init_json();
|
|
707461
707473
|
init_sessionStorage();
|
|
@@ -708557,11 +708569,11 @@ function handleErrorStatus(status2, data, context8) {
|
|
|
708557
708569
|
case 401:
|
|
708558
708570
|
throw new BridgeFatalError(`${context8}: Authentication failed (401)${detail ? `: ${detail}` : ""}. ${BRIDGE_LOGIN_INSTRUCTION}`, 401, errorType);
|
|
708559
708571
|
case 403:
|
|
708560
|
-
throw new BridgeFatalError(isExpiredErrorType(errorType) ? "Remote Control session has expired. Please restart with `
|
|
708572
|
+
throw new BridgeFatalError(isExpiredErrorType(errorType) ? "Remote Control session has expired. Please restart with `occ remote-control` or /remote-control." : `${context8}: Access denied (403)${detail ? `: ${detail}` : ""}. Check your organization permissions.`, 403, errorType);
|
|
708561
708573
|
case 404:
|
|
708562
708574
|
throw new BridgeFatalError(detail ?? `${context8}: Not found (404). Remote Control may not be available for this organization.`, 404, errorType);
|
|
708563
708575
|
case 410:
|
|
708564
|
-
throw new BridgeFatalError(detail ?? "Remote Control session has expired. Please restart with `
|
|
708576
|
+
throw new BridgeFatalError(detail ?? "Remote Control session has expired. Please restart with `occ remote-control` or /remote-control.", 410, errorType ?? "environment_expired");
|
|
708565
708577
|
case 429:
|
|
708566
708578
|
throw new Error(`${context8}: Rate limited (429). Polling too frequently.`);
|
|
708567
708579
|
default:
|
|
@@ -710659,14 +710671,14 @@ function ClaudeInChromeMenu(t0) {
|
|
|
710659
710671
|
children: "Usage: "
|
|
710660
710672
|
}),
|
|
710661
710673
|
/* @__PURE__ */ jsx_runtime338.jsx(ThemedText, {
|
|
710662
|
-
children: "
|
|
710674
|
+
children: "occ --chrome"
|
|
710663
710675
|
}),
|
|
710664
710676
|
/* @__PURE__ */ jsx_runtime338.jsx(ThemedText, {
|
|
710665
710677
|
dimColor: true,
|
|
710666
710678
|
children: " or "
|
|
710667
710679
|
}),
|
|
710668
710680
|
/* @__PURE__ */ jsx_runtime338.jsx(ThemedText, {
|
|
710669
|
-
children: "
|
|
710681
|
+
children: "occ --no-chrome"
|
|
710670
710682
|
})
|
|
710671
710683
|
]
|
|
710672
710684
|
}),
|
|
@@ -713576,8 +713588,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
713576
713588
|
async function checkEnvLessBridgeMinVersion() {
|
|
713577
713589
|
const cfg = await getEnvLessBridgeConfig();
|
|
713578
713590
|
if (cfg.min_version && lt(MACRO.VERSION, cfg.min_version)) {
|
|
713579
|
-
return `Your version of
|
|
713580
|
-
Version ${cfg.min_version} or higher is required. Run \`
|
|
713591
|
+
return `Your version of OCC (${MACRO.VERSION}) is too old for Remote Control.
|
|
713592
|
+
Version ${cfg.min_version} or higher is required. Run \`occ update\` to update.`;
|
|
713581
713593
|
}
|
|
713582
713594
|
return null;
|
|
713583
713595
|
}
|
|
@@ -716469,9 +716481,12 @@ var FORK_NAME_FALLBACK = "fork";
|
|
|
716469
716481
|
|
|
716470
716482
|
// src/commands/fork/confirmation.ts
|
|
716471
716483
|
function formatForkConfirmation(forkName, sessionId, sharesCheckout) {
|
|
716472
|
-
const base2 = `Forked session ${forkName} (
|
|
716484
|
+
const base2 = `Forked session ${forkName} (${CLI_BINARY_NAME} attach ${sessionId})`;
|
|
716473
716485
|
return sharesCheckout ? `${base2} (shares your checkout)` : base2;
|
|
716474
716486
|
}
|
|
716487
|
+
var init_confirmation = __esm(() => {
|
|
716488
|
+
init_cli();
|
|
716489
|
+
});
|
|
716475
716490
|
|
|
716476
716491
|
// src/commands/fork/fork.ts
|
|
716477
716492
|
var exports_fork = {};
|
|
@@ -716512,6 +716527,7 @@ var init_fork = __esm(() => {
|
|
|
716512
716527
|
init_state();
|
|
716513
716528
|
init_sessionStorage();
|
|
716514
716529
|
init_pointer();
|
|
716530
|
+
init_confirmation();
|
|
716515
716531
|
});
|
|
716516
716532
|
|
|
716517
716533
|
// src/commands/fork/index.ts
|
|
@@ -718538,7 +718554,7 @@ Include 3 friction categories with 2 examples each.`,
|
|
|
718538
718554
|
|
|
718539
718555
|
## CC FEATURES REFERENCE (pick from these for features_to_try):
|
|
718540
718556
|
1. **MCP Servers**: Connect Claude to external tools, databases, and APIs via Model Context Protocol.
|
|
718541
|
-
- How to use: Run \`
|
|
718557
|
+
- How to use: Run \`occ mcp add <server-name> -- <command>\`
|
|
718542
718558
|
- Good for: database queries, Slack integration, GitHub issue lookup, connecting to internal APIs
|
|
718543
718559
|
|
|
718544
718560
|
2. **Custom Skills**: Reusable prompts you define as markdown files that run with a single /command.
|
|
@@ -718550,7 +718566,7 @@ Include 3 friction categories with 2 examples each.`,
|
|
|
718550
718566
|
- Good for: auto-formatting code, running type checks, enforcing conventions
|
|
718551
718567
|
|
|
718552
718568
|
4. **Headless Mode**: Run Claude non-interactively from scripts and CI/CD.
|
|
718553
|
-
- How to use: \`
|
|
718569
|
+
- How to use: \`occ -p "fix lint errors" --allowedTools "Edit,Read,Bash"\`
|
|
718554
718570
|
- Good for: CI/CD integration, batch code fixes, automated reviews
|
|
718555
718571
|
|
|
718556
718572
|
5. **Task Agents**: Claude spawns focused sub-agents for complex exploration or parallel work.
|
|
@@ -732504,7 +732520,7 @@ async function runBridgeLoop(config8, environmentId, environmentSecret, api5, sp
|
|
|
732504
732520
|
await Promise.allSettled([...pendingCleanups]);
|
|
732505
732521
|
}
|
|
732506
732522
|
if (feature("KAIROS") && config8.spawnMode === "single-session" && initialSessionId && !fatalExit) {
|
|
732507
|
-
logger30.logStatus(`Resume this session by running \`
|
|
732523
|
+
logger30.logStatus(`Resume this session by running \`occ remote-control --continue\``);
|
|
732508
732524
|
logForDebugging(`[bridge:shutdown] Skipping archive+deregister to allow resume of session ${initialSessionId}`);
|
|
732509
732525
|
return;
|
|
732510
732526
|
}
|
|
@@ -732675,7 +732691,7 @@ function parseArgs(args) {
|
|
|
732675
732691
|
createSessionInDir = false;
|
|
732676
732692
|
} else {
|
|
732677
732693
|
return makeError2(`Unknown argument: ${arg}
|
|
732678
|
-
Run '
|
|
732694
|
+
Run 'occ remote-control --help' for usage.`);
|
|
732679
732695
|
}
|
|
732680
732696
|
}
|
|
732681
732697
|
if (spawnMode === "single-session" && capacity !== undefined) {
|
|
@@ -732746,7 +732762,7 @@ async function printHelp() {
|
|
|
732746
732762
|
Remote Control - Connect your local environment to claude.ai/code
|
|
732747
732763
|
|
|
732748
732764
|
USAGE
|
|
732749
|
-
|
|
732765
|
+
occ remote-control [options]
|
|
732750
732766
|
OPTIONS
|
|
732751
732767
|
--name <name> Name for the session (shown in claude.ai/code)
|
|
732752
732768
|
${feature("KAIROS") ? ` -c, --continue Resume the last session in this directory
|
|
@@ -732765,7 +732781,7 @@ DESCRIPTION
|
|
|
732765
732781
|
${serverDescription}
|
|
732766
732782
|
NOTES
|
|
732767
732783
|
- You must be logged in with a Claude account that has a subscription
|
|
732768
|
-
- Run \`
|
|
732784
|
+
- Run \`occ\` first in the directory to accept the workspace trust dialog
|
|
732769
732785
|
${serverNote}`;
|
|
732770
732786
|
console.log(help2);
|
|
732771
732787
|
}
|
|
@@ -732835,7 +732851,7 @@ async function bridgeMain(args) {
|
|
|
732835
732851
|
setOriginalCwd2(dir);
|
|
732836
732852
|
setCwdState2(dir);
|
|
732837
732853
|
if (!checkHasTrustDialogAccepted2()) {
|
|
732838
|
-
console.error(`Error: Workspace not trusted. Please run \`
|
|
732854
|
+
console.error(`Error: Workspace not trusted. Please run \`occ\` in ${dir} first to review and accept the workspace trust dialog.`);
|
|
732839
732855
|
process.exit(1);
|
|
732840
732856
|
}
|
|
732841
732857
|
const { clearOAuthTokenCache: clearOAuthTokenCache2, checkAndRefreshOAuthTokenIfNeeded: checkAndRefreshOAuthTokenIfNeeded2 } = await Promise.resolve().then(() => (init_auth6(), exports_auth));
|
|
@@ -732880,7 +732896,7 @@ You can disconnect remote access anytime by running /remote-control again.
|
|
|
732880
732896
|
const { readBridgePointerAcrossWorktrees: readBridgePointerAcrossWorktrees2 } = await Promise.resolve().then(() => (init_bridgePointer(), exports_bridgePointer));
|
|
732881
732897
|
const found = await readBridgePointerAcrossWorktrees2(dir);
|
|
732882
732898
|
if (!found) {
|
|
732883
|
-
console.error(`Error: No recent session found in this directory or its worktrees. Run \`
|
|
732899
|
+
console.error(`Error: No recent session found in this directory or its worktrees. Run \`occ remote-control\` to start a new one.`);
|
|
732884
732900
|
process.exit(1);
|
|
732885
732901
|
}
|
|
732886
732902
|
const { pointer, dir: pointerDir } = found;
|
|
@@ -732998,7 +733014,7 @@ Spawn mode for this project:
|
|
|
732998
733014
|
const { clearBridgePointer: clearBridgePointer2 } = await Promise.resolve().then(() => (init_bridgePointer(), exports_bridgePointer));
|
|
732999
733015
|
await clearBridgePointer2(resumePointerDir);
|
|
733000
733016
|
}
|
|
733001
|
-
console.error(`Error: Session ${resumeSessionId} not found. It may have been archived or expired, or your login may have lapsed (run \`
|
|
733017
|
+
console.error(`Error: Session ${resumeSessionId} not found. It may have been archived or expired, or your login may have lapsed (run \`occ /login\`).`);
|
|
733002
733018
|
process.exit(1);
|
|
733003
733019
|
}
|
|
733004
733020
|
if (!session2.environment_id) {
|
|
@@ -733234,7 +733250,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
733234
733250
|
const { initSinks: initSinks2 } = await Promise.resolve().then(() => (init_sinks(), exports_sinks));
|
|
733235
733251
|
initSinks2();
|
|
733236
733252
|
if (!checkHasTrustDialogAccepted2()) {
|
|
733237
|
-
throw new BridgeHeadlessPermanentError(`Workspace not trusted: ${dir}. Run \`
|
|
733253
|
+
throw new BridgeHeadlessPermanentError(`Workspace not trusted: ${dir}. Run \`occ\` in that directory first to accept the trust dialog.`);
|
|
733238
733254
|
}
|
|
733239
733255
|
if (!opts.getAccessToken()) {
|
|
733240
733256
|
throw new Error(BRIDGE_LOGIN_ERROR);
|
|
@@ -733533,7 +733549,7 @@ function scheduledStatusPath() {
|
|
|
733533
733549
|
return join172(getClaudeConfigHomeDir(), "daemon.scheduled.status.json");
|
|
733534
733550
|
}
|
|
733535
733551
|
function printDaemonUsage() {
|
|
733536
|
-
console.log(`Usage:
|
|
733552
|
+
console.log(`Usage: occ daemon <subcommand>
|
|
733537
733553
|
|
|
733538
733554
|
Subcommands:
|
|
733539
733555
|
start Start the supervisor (default)
|
|
@@ -733566,7 +733582,7 @@ async function daemonSubcommand(sub, args) {
|
|
|
733566
733582
|
} else {
|
|
733567
733583
|
const res = await stopExistingSupervisor();
|
|
733568
733584
|
if (res.holder && !res.stopped) {
|
|
733569
|
-
console.error("Run `
|
|
733585
|
+
console.error("Run `occ daemon stop --any` to stop any background sessions and report on the holder");
|
|
733570
733586
|
process.exitCode = 1;
|
|
733571
733587
|
} else if (res.stopped && res.holder) {
|
|
733572
733588
|
console.log(`Stopped daemon (pid=${res.holder.supervisorPid}).`);
|
|
@@ -733599,7 +733615,7 @@ async function daemonSubcommand(sub, args) {
|
|
|
733599
733615
|
const { connectRemoteControlClient: connectRemoteControlClient2, resolveRemoteControlEndpoint: resolveRemoteControlEndpoint2 } = await Promise.resolve().then(() => (init_remoteControlClient(), exports_remoteControlClient));
|
|
733600
733616
|
const endpoint3 = await resolveRemoteControlEndpoint2();
|
|
733601
733617
|
if (!endpoint3) {
|
|
733602
|
-
console.log("remote-control: daemon not running or RC server not configured. Run `
|
|
733618
|
+
console.log("remote-control: daemon not running or RC server not configured. Run `occ daemon start` first.");
|
|
733603
733619
|
break;
|
|
733604
733620
|
}
|
|
733605
733621
|
try {
|
|
@@ -733677,7 +733693,7 @@ async function logsHandlerDaemon() {
|
|
|
733677
733693
|
async function scheduledHandler(args) {
|
|
733678
733694
|
const op = args[0];
|
|
733679
733695
|
if (op !== "add" && op !== "remove" && op !== "rm" && op !== "list") {
|
|
733680
|
-
console.error("Usage:
|
|
733696
|
+
console.error("Usage: occ daemon scheduled add|remove <task-id> [--schedule <cron>] [--prompt <text>]");
|
|
733681
733697
|
process.exitCode = 1;
|
|
733682
733698
|
return;
|
|
733683
733699
|
}
|
|
@@ -733753,7 +733769,7 @@ function writeScheduledConfig(tasks2) {
|
|
|
733753
733769
|
});
|
|
733754
733770
|
}
|
|
733755
733771
|
async function renderDaemonHubStandalone() {
|
|
733756
|
-
console.log("
|
|
733772
|
+
console.log("OCC daemon hub");
|
|
733757
733773
|
await statusHandler();
|
|
733758
733774
|
console.log(`
|
|
733759
733775
|
(Press q to quit \u2014 interactive hub is a follow-up.)`);
|
|
@@ -742273,7 +742289,7 @@ async function initReplBridge(options) {
|
|
|
742273
742289
|
const versionError2 = await checkEnvLessBridgeMinVersion();
|
|
742274
742290
|
if (versionError2) {
|
|
742275
742291
|
logBridgeSkip("version_too_old", `[bridge:repl] Skipping: ${versionError2}`, true);
|
|
742276
|
-
onStateChange?.("failed", "run `
|
|
742292
|
+
onStateChange?.("failed", "run `occ update` to upgrade");
|
|
742277
742293
|
return null;
|
|
742278
742294
|
}
|
|
742279
742295
|
logForDebugging("[bridge:repl] Using env-less bridge path (tengu_bridge_repl_v2)");
|
|
@@ -742302,7 +742318,7 @@ async function initReplBridge(options) {
|
|
|
742302
742318
|
const versionError = checkBridgeMinVersion();
|
|
742303
742319
|
if (versionError) {
|
|
742304
742320
|
logBridgeSkip("version_too_old", `[bridge:repl] Skipping: ${versionError}`);
|
|
742305
|
-
onStateChange?.("failed", "run `
|
|
742321
|
+
onStateChange?.("failed", "run `occ update` to upgrade");
|
|
742306
742322
|
return null;
|
|
742307
742323
|
}
|
|
742308
742324
|
const branch2 = await getBranch();
|
|
@@ -759166,7 +759182,7 @@ function AutoUpdater({
|
|
|
759166
759182
|
"\u2717 Auto-update failed \xB7 Try ",
|
|
759167
759183
|
/* @__PURE__ */ jsx_runtime405.jsx(ThemedText, {
|
|
759168
759184
|
bold: true,
|
|
759169
|
-
children: "
|
|
759185
|
+
children: "occ doctor"
|
|
759170
759186
|
}),
|
|
759171
759187
|
" or",
|
|
759172
759188
|
" ",
|
|
@@ -792175,6 +792191,7 @@ async function getRelevantTips(context8) {
|
|
|
792175
792191
|
var _isOfficialMarketplaceInstalledCache, externalTips, internalOnlyTips;
|
|
792176
792192
|
var init_tipRegistry = __esm(() => {
|
|
792177
792193
|
init_source();
|
|
792194
|
+
init_cli();
|
|
792178
792195
|
init_debug();
|
|
792179
792196
|
init_fileHistory();
|
|
792180
792197
|
init_settings2();
|
|
@@ -792439,7 +792456,7 @@ var init_tipRegistry = __esm(() => {
|
|
|
792439
792456
|
},
|
|
792440
792457
|
{
|
|
792441
792458
|
id: "continue",
|
|
792442
|
-
content: async () =>
|
|
792459
|
+
content: async () => `Run ${CLI_BINARY_NAME} --continue or ${CLI_BINARY_NAME} --resume to resume a conversation`,
|
|
792443
792460
|
cooldownSessions: 10,
|
|
792444
792461
|
isRelevant: async () => true
|
|
792445
792462
|
},
|
|
@@ -796104,7 +796121,7 @@ async function _temp294() {
|
|
|
796104
796121
|
priority: "high"
|
|
796105
796122
|
};
|
|
796106
796123
|
}
|
|
796107
|
-
var NPM_DEPRECATION_MESSAGE = "
|
|
796124
|
+
var NPM_DEPRECATION_MESSAGE = "OCC has switched from npm to native installer. Run `occ install` or see https://docs.anthropic.com/en/docs/claude-code/getting-started for more options.";
|
|
796108
796125
|
var init_useNpmDeprecationNotification = __esm(() => {
|
|
796109
796126
|
init_doctorDiagnostic();
|
|
796110
796127
|
init_envUtils();
|
|
@@ -807874,7 +807891,7 @@ function TeleportRepoMismatchDialog(t0) {
|
|
|
807874
807891
|
}),
|
|
807875
807892
|
/* @__PURE__ */ jsx_runtime494.jsxs(ThemedText, {
|
|
807876
807893
|
children: [
|
|
807877
|
-
"Open
|
|
807894
|
+
"Open OCC in ",
|
|
807878
807895
|
/* @__PURE__ */ jsx_runtime494.jsx(ThemedText, {
|
|
807879
807896
|
bold: true,
|
|
807880
807897
|
children: targetRepo
|
|
@@ -807907,7 +807924,7 @@ function TeleportRepoMismatchDialog(t0) {
|
|
|
807907
807924
|
/* @__PURE__ */ jsx_runtime494.jsxs(ThemedText, {
|
|
807908
807925
|
dimColor: true,
|
|
807909
807926
|
children: [
|
|
807910
|
-
"Run
|
|
807927
|
+
"Run occ --teleport from a checkout of ",
|
|
807911
807928
|
targetRepo
|
|
807912
807929
|
]
|
|
807913
807930
|
})
|
|
@@ -808875,7 +808892,7 @@ ${tail}
|
|
|
808875
808892
|
|
|
808876
808893
|
Debug logging was OFF for this session until now. Nothing prior to this /debug invocation was captured.
|
|
808877
808894
|
|
|
808878
|
-
Tell the user that debug logging is now active at \`${debugLogPath}\`, ask them to reproduce the issue, then re-read the log. If they can't reproduce, they can also restart with \`
|
|
808895
|
+
Tell the user that debug logging is now active at \`${debugLogPath}\`, ask them to reproduce the issue, then re-read the log. If they can't reproduce, they can also restart with \`occ --debug\` to capture logs from startup.
|
|
808879
808896
|
`;
|
|
808880
808897
|
const prompt = `# Debug Skill
|
|
808881
808898
|
|
|
@@ -810182,7 +810199,7 @@ function generateSettingsSchema() {
|
|
|
810182
810199
|
function registerUpdateConfigSkill() {
|
|
810183
810200
|
registerBundledSkill({
|
|
810184
810201
|
name: "update-config",
|
|
810185
|
-
description: 'Use this skill to configure the
|
|
810202
|
+
description: 'Use this skill to configure the OCC harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not the model, so memory/preferences cannot fulfill them. Also use for: permissions ("allow X", "add permission", "move permission to"), env vars ("set X=Y"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: "allow npm commands", "add bq permission to global settings", "move permission to user settings", "set DEBUG=true", "when OCC stops show X". For simple settings like theme/model, use Config tool.',
|
|
810186
810203
|
allowedTools: ["Read"],
|
|
810187
810204
|
userInvocable: true,
|
|
810188
810205
|
async getPromptForCommand(args) {
|
|
@@ -810643,7 +810660,7 @@ If a hook isn't running:
|
|
|
810643
810660
|
3. **Check the matcher** - Does it match the tool name? (e.g., "Bash", "Write", "Edit")
|
|
810644
810661
|
4. **Check hook type** - Is it "command", "prompt", or "agent"?
|
|
810645
810662
|
5. **Test the command** - Run the hook command manually to see if it works
|
|
810646
|
-
6. **Use --debug** - Run \`
|
|
810663
|
+
6. **Use --debug** - Run \`occ --debug\` to see hook execution logs
|
|
810647
810664
|
`;
|
|
810648
810665
|
});
|
|
810649
810666
|
|
|
@@ -810707,7 +810724,7 @@ tmp dir / a mock / a dry-run flag. If there's no safe mode and the
|
|
|
810707
810724
|
diff touches the destructive path, say so and verify what you can
|
|
810708
810725
|
around it.</p>
|
|
810709
810726
|
`;
|
|
810710
|
-
var
|
|
810727
|
+
var init_cli2 = () => {};
|
|
810711
810728
|
|
|
810712
810729
|
// src/skills/bundled/verify/examples/server.md
|
|
810713
810730
|
var server_default = `<h1>Verifying a server/API change</h1>
|
|
@@ -811005,7 +811022,7 @@ var init_SKILL = () => {};
|
|
|
811005
811022
|
// src/skills/bundled/verifyContent.ts
|
|
811006
811023
|
var SKILL_MD, SKILL_FILES;
|
|
811007
811024
|
var init_verifyContent = __esm(() => {
|
|
811008
|
-
|
|
811025
|
+
init_cli2();
|
|
811009
811026
|
init_server2();
|
|
811010
811027
|
init_SKILL();
|
|
811011
811028
|
SKILL_MD = SKILL_default;
|
|
@@ -812137,24 +812154,24 @@ function registerMcpAddCommand(mcp2) {
|
|
|
812137
812154
|
|
|
812138
812155
|
` + `Examples:
|
|
812139
812156
|
` + ` # Add HTTP server:
|
|
812140
|
-
` + `
|
|
812157
|
+
` + ` occ mcp add --transport http sentry https://mcp.sentry.dev/mcp
|
|
812141
812158
|
|
|
812142
812159
|
` + ` # Add HTTP server with headers:
|
|
812143
|
-
` + `
|
|
812160
|
+
` + ` occ mcp add --transport http corridor https://app.corridor.dev/api/mcp --header "Authorization: Bearer ..."
|
|
812144
812161
|
|
|
812145
812162
|
` + ` # Add stdio server with environment variables:
|
|
812146
|
-
` + `
|
|
812163
|
+
` + ` occ mcp add my-server -e API_KEY=xxx -- npx my-mcp-server
|
|
812147
812164
|
|
|
812148
812165
|
` + ` # Add stdio server with subprocess flags:
|
|
812149
|
-
` + "
|
|
812166
|
+
` + " occ mcp add my-server -- my-command --some-flag arg1").option("-s, --scope <scope>", "Configuration scope (local, user, or project)", "local").option("-t, --transport <transport>", "Transport type (stdio, sse, http). Defaults to stdio if not specified.").option("-e, --env <env...>", "Set environment variables (e.g. -e KEY=value)").option("-H, --header <header...>", 'Set WebSocket headers (e.g. -H "X-Api-Key: abc123" -H "X-Custom: value")').option("--client-id <clientId>", "OAuth client ID for HTTP/SSE servers").option("--client-secret", "Prompt for OAuth client secret (or set MCP_CLIENT_SECRET env var)").option("--callback-port <port>", "Fixed port for OAuth callback (for servers requiring pre-registered redirect URIs)").helpOption("-h, --help", "Display help for command").addOption(new Option("--xaa", "Enable XAA (SEP-990) for this server. Requires 'occ mcp xaa setup' first. Also requires --client-id and --client-secret (for the MCP server's AS).").hideHelp(!isXaaEnabled())).action(async (name3, commandOrUrl, args, options) => {
|
|
812150
812167
|
const actualCommand = commandOrUrl;
|
|
812151
812168
|
const actualArgs = args;
|
|
812152
812169
|
if (!name3) {
|
|
812153
812170
|
cliError(`Error: Server name is required.
|
|
812154
|
-
` + "Usage:
|
|
812171
|
+
` + "Usage: occ mcp add <name> <command> [args...]");
|
|
812155
812172
|
} else if (!actualCommand) {
|
|
812156
812173
|
cliError(`Error: Command is required when server name is provided.
|
|
812157
|
-
` + "Usage:
|
|
812174
|
+
` + "Usage: occ mcp add <name> <command> [args...]");
|
|
812158
812175
|
}
|
|
812159
812176
|
try {
|
|
812160
812177
|
const scope = ensureConfigScope(options.scope);
|
|
@@ -812170,7 +812187,7 @@ function registerMcpAddCommand(mcp2) {
|
|
|
812170
812187
|
if (!options.clientSecret)
|
|
812171
812188
|
missing.push("--client-secret");
|
|
812172
812189
|
if (!getXaaIdpSettings()) {
|
|
812173
|
-
missing.push("'
|
|
812190
|
+
missing.push("'occ mcp xaa setup' (settings.xaaIdp not configured)");
|
|
812174
812191
|
}
|
|
812175
812192
|
if (missing.length) {
|
|
812176
812193
|
cliError(`Error: --xaa requires: ${missing.join(", ")}`);
|
|
@@ -812251,9 +812268,9 @@ function registerMcpAddCommand(mcp2) {
|
|
|
812251
812268
|
process.stderr.write(`
|
|
812252
812269
|
Warning: The command "${actualCommand}" looks like a URL, but is being interpreted as a stdio server as --transport was not specified.
|
|
812253
812270
|
`);
|
|
812254
|
-
process.stderr.write(`If this is an HTTP server, use:
|
|
812271
|
+
process.stderr.write(`If this is an HTTP server, use: occ mcp add --transport http ${name3} ${actualCommand}
|
|
812255
812272
|
`);
|
|
812256
|
-
process.stderr.write(`If this is an SSE server, use:
|
|
812273
|
+
process.stderr.write(`If this is an SSE server, use: occ mcp add --transport sse ${name3} ${actualCommand}
|
|
812257
812274
|
`);
|
|
812258
812275
|
}
|
|
812259
812276
|
const env7 = parseEnvVars(options.env);
|
|
@@ -812332,7 +812349,7 @@ function registerMcpXaaIdpCommand(mcp2) {
|
|
|
812332
812349
|
xaaIdp.command("login").description("Cache an IdP id_token so XAA-enabled MCP servers authenticate " + "silently. Default: run the OIDC browser login. With --id-token: " + "write a pre-obtained JWT directly (used by conformance/e2e tests " + "where the mock IdP does not serve /authorize).").option("--force", "Ignore any cached id_token and re-login (useful after IdP-side revocation)").option("--id-token <jwt>", "Write this pre-obtained id_token directly to cache, skipping the OIDC browser login").action(async (options) => {
|
|
812333
812350
|
const idp = getXaaIdpSettings();
|
|
812334
812351
|
if (!idp) {
|
|
812335
|
-
return cliError("Error: no XAA IdP connection. Run '
|
|
812352
|
+
return cliError("Error: no XAA IdP connection. Run 'occ mcp xaa setup' first.");
|
|
812336
812353
|
}
|
|
812337
812354
|
if (options.idToken) {
|
|
812338
812355
|
const expiresAt = saveIdpIdTokenFromJwt(idp.issuer, options.idToken);
|
|
@@ -812381,7 +812398,7 @@ function registerMcpXaaIdpCommand(mcp2) {
|
|
|
812381
812398
|
}
|
|
812382
812399
|
process.stdout.write(`Client secret: ${hasSecret ? "(stored in keychain)" : "(not set \u2014 PKCE-only)"}
|
|
812383
812400
|
`);
|
|
812384
|
-
process.stdout.write(`Logged in: ${hasIdToken ? "yes (id_token cached)" : "no \u2014 run '
|
|
812401
|
+
process.stdout.write(`Logged in: ${hasIdToken ? "yes (id_token cached)" : "no \u2014 run 'occ mcp xaa login'"}
|
|
812385
812402
|
`);
|
|
812386
812403
|
cliOk();
|
|
812387
812404
|
});
|
|
@@ -818323,7 +818340,7 @@ async function loadInitialMessages(setAppState, options) {
|
|
|
818323
818340
|
logEvent2("tengu_resume_print", {});
|
|
818324
818341
|
const parsedSessionId = parseSessionIdentifier(typeof options.resume === "string" ? options.resume : "");
|
|
818325
818342
|
if (!parsedSessionId) {
|
|
818326
|
-
let errorMessage3 =
|
|
818343
|
+
let errorMessage3 = `Error: --resume requires a valid session ID when used with --print. Usage: ${CLI_BINARY_NAME} -p --resume <session-id>`;
|
|
818327
818344
|
if (typeof options.resume === "string") {
|
|
818328
818345
|
errorMessage3 += `. Session IDs must be in UUID format (e.g., 550e8400-e29b-41d4-a716-446655440000). Provided value "${options.resume}" is not a valid UUID`;
|
|
818329
818346
|
}
|
|
@@ -818705,6 +818722,7 @@ var init_print = __esm(() => {
|
|
|
818705
818722
|
init_omit();
|
|
818706
818723
|
init_reject2();
|
|
818707
818724
|
init_policyLimits();
|
|
818725
|
+
init_cli();
|
|
818708
818726
|
init_bridgeStatusUtil();
|
|
818709
818727
|
init_inboundMessages();
|
|
818710
818728
|
init_inboundAttachments();
|
|
@@ -820045,7 +820063,7 @@ async function mcpRemoveHandler(name3, options) {
|
|
|
820045
820063
|
To remove from a specific scope, use:
|
|
820046
820064
|
`);
|
|
820047
820065
|
scopes.forEach((scope) => {
|
|
820048
|
-
process.stderr.write(`
|
|
820066
|
+
process.stderr.write(` occ mcp remove "${name3}" -s ${scope}
|
|
820049
820067
|
`);
|
|
820050
820068
|
});
|
|
820051
820069
|
cliError();
|
|
@@ -820060,7 +820078,7 @@ async function mcpListHandler() {
|
|
|
820060
820078
|
servers: configs
|
|
820061
820079
|
} = await getAllMcpConfigs();
|
|
820062
820080
|
if (Object.keys(configs).length === 0) {
|
|
820063
|
-
console.log("No MCP servers configured. Use `
|
|
820081
|
+
console.log("No MCP servers configured. Use `occ mcp add` to add a server.");
|
|
820064
820082
|
} else {
|
|
820065
820083
|
console.log(`Checking MCP server health\u2026
|
|
820066
820084
|
`);
|
|
@@ -820158,7 +820176,7 @@ async function mcpGetHandler(name3) {
|
|
|
820158
820176
|
}
|
|
820159
820177
|
}
|
|
820160
820178
|
console.log(`
|
|
820161
|
-
To remove this server, run:
|
|
820179
|
+
To remove this server, run: occ mcp remove "${name3}" -s ${server.scope}`);
|
|
820162
820180
|
await gracefulShutdown(0);
|
|
820163
820181
|
}
|
|
820164
820182
|
async function mcpAddJsonHandler(name3, json2, options) {
|
|
@@ -820567,7 +820585,7 @@ async function pluginListHandler(options) {
|
|
|
820567
820585
|
}
|
|
820568
820586
|
if (pluginIds.length === 0 && inlinePlugins.length === 0) {
|
|
820569
820587
|
if (inlineLoadErrors.length === 0) {
|
|
820570
|
-
cliOk("No plugins installed. Use `
|
|
820588
|
+
cliOk("No plugins installed. Use `occ plugin install` to install a plugin.");
|
|
820571
820589
|
}
|
|
820572
820590
|
}
|
|
820573
820591
|
if (pluginIds.length > 0) {
|
|
@@ -821185,7 +821203,7 @@ function Install({
|
|
|
821185
821203
|
/* @__PURE__ */ jsx_runtime501.jsx(ThemedText, {
|
|
821186
821204
|
color: "claude",
|
|
821187
821205
|
bold: true,
|
|
821188
|
-
children: "
|
|
821206
|
+
children: "occ --help"
|
|
821189
821207
|
}),
|
|
821190
821208
|
/* @__PURE__ */ jsx_runtime501.jsx(ThemedText, {
|
|
821191
821209
|
dimColor: true,
|
|
@@ -821468,7 +821486,7 @@ async function agentsDashboard(json2) {
|
|
|
821468
821486
|
if (rows.length === 0) {
|
|
821469
821487
|
console.log("No background sessions found.");
|
|
821470
821488
|
console.log(`
|
|
821471
|
-
Start the daemon with:
|
|
821489
|
+
Start the daemon with: occ daemon start`);
|
|
821472
821490
|
return;
|
|
821473
821491
|
}
|
|
821474
821492
|
const running2 = rows.filter((r4) => r4.alive).length;
|
|
@@ -821895,7 +821913,7 @@ async function autoModeCritiqueHandler(options) {
|
|
|
821895
821913
|
process.stdout.write(`No custom auto mode rules found.
|
|
821896
821914
|
|
|
821897
821915
|
` + `Add rules to your settings file under autoMode.{allow, soft_deny, environment}.
|
|
821898
|
-
` + "Run `
|
|
821916
|
+
` + "Run `occ auto-mode defaults` to see the default rules for reference.\n");
|
|
821899
821917
|
return;
|
|
821900
821918
|
}
|
|
821901
821919
|
const model = options.model ? parseUserSpecifiedModel(options.model) : getMainLoopModel();
|
|
@@ -822080,7 +822098,7 @@ async function autoModeResetHandler(options, deps = defaultAutoModeResetDeps, st
|
|
|
822080
822098
|
}
|
|
822081
822099
|
emitResetMetric("success");
|
|
822082
822100
|
stdout(`Auto mode configuration reset to defaults \u2014 autoMode section removed from ${path43}.
|
|
822083
|
-
Run \`
|
|
822101
|
+
Run \`occ auto-mode config\` to see the effective rules.
|
|
822084
822102
|
`);
|
|
822085
822103
|
}
|
|
822086
822104
|
var CRITIQUE_SYSTEM_PROMPT, defaultStdout = (message) => {
|
|
@@ -822328,7 +822346,7 @@ async function update2() {
|
|
|
822328
822346
|
`);
|
|
822329
822347
|
process.stderr.write(String(error52) + `
|
|
822330
822348
|
`);
|
|
822331
|
-
process.stderr.write(`Try running "
|
|
822349
|
+
process.stderr.write(`Try running "occ doctor" for diagnostics
|
|
822332
822350
|
`);
|
|
822333
822351
|
await gracefulShutdown(1);
|
|
822334
822352
|
}
|
|
@@ -822443,7 +822461,7 @@ async function update2() {
|
|
|
822443
822461
|
} else {
|
|
822444
822462
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
822445
822463
|
`);
|
|
822446
|
-
process.stderr.write(`Or consider using native installation with:
|
|
822464
|
+
process.stderr.write(`Or consider using native installation with: occ install
|
|
822447
822465
|
`);
|
|
822448
822466
|
}
|
|
822449
822467
|
await gracefulShutdown(1);
|
|
@@ -822457,7 +822475,7 @@ async function update2() {
|
|
|
822457
822475
|
process.stderr.write(` cd ~/.claude/local && npm update ${MACRO.PACKAGE_URL}
|
|
822458
822476
|
`);
|
|
822459
822477
|
} else {
|
|
822460
|
-
process.stderr.write(`Or consider using native installation with:
|
|
822478
|
+
process.stderr.write(`Or consider using native installation with: occ install
|
|
822461
822479
|
`);
|
|
822462
822480
|
}
|
|
822463
822481
|
await gracefulShutdown(1);
|
|
@@ -822872,7 +822890,7 @@ async function main() {
|
|
|
822872
822890
|
}
|
|
822873
822891
|
const rest = rawCliArgs.slice(consumed);
|
|
822874
822892
|
if (rest.includes("-p") || rest.includes("--print")) {
|
|
822875
|
-
process.stderr.write(`Error: headless (-p/--print) mode is not supported with
|
|
822893
|
+
process.stderr.write(`Error: headless (-p/--print) mode is not supported with occ ssh
|
|
822876
822894
|
`);
|
|
822877
822895
|
gracefulShutdownSync(1);
|
|
822878
822896
|
return;
|
|
@@ -823075,7 +823093,7 @@ async function run() {
|
|
|
823075
823093
|
}
|
|
823076
823094
|
if (prompt === "code") {
|
|
823077
823095
|
logEvent2("tengu_code_prompt_ignored", {});
|
|
823078
|
-
console.warn(source_default.yellow("Tip: You can launch
|
|
823096
|
+
console.warn(source_default.yellow("Tip: You can launch OCC with just `occ`"));
|
|
823079
823097
|
prompt = undefined;
|
|
823080
823098
|
}
|
|
823081
823099
|
if (prompt && typeof prompt === "string" && !/\s/.test(prompt) && prompt.length > 0) {
|
|
@@ -824754,7 +824772,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
824754
824772
|
await gracefulShutdown(0);
|
|
824755
824773
|
process.exit(0);
|
|
824756
824774
|
}
|
|
824757
|
-
return await exitWithMessage2(root3, `Assistant installed in ${installedDir}. The daemon is starting up \u2014 run \`
|
|
824775
|
+
return await exitWithMessage2(root3, `Assistant installed in ${installedDir}. The daemon is starting up \u2014 run \`occ assistant\` again in a few seconds to connect.`, {
|
|
824758
824776
|
exitCode: 0,
|
|
824759
824777
|
beforeExit: () => gracefulShutdown(0)
|
|
824760
824778
|
});
|
|
@@ -824856,7 +824874,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
824856
824874
|
const isRemoteTuiEnabled = getFeatureValue_CACHED_MAY_BE_STALE("tengu_remote_backend", false);
|
|
824857
824875
|
if (!isRemoteTuiEnabled && !hasInitialPrompt) {
|
|
824858
824876
|
return await exitWithError2(root3, `Error: --remote requires a description.
|
|
824859
|
-
Usage:
|
|
824877
|
+
Usage: occ --remote "your task description"`, () => gracefulShutdown(1));
|
|
824860
824878
|
}
|
|
824861
824879
|
logEvent2("tengu_remote_create_session", {
|
|
824862
824880
|
has_initial_prompt: String(hasInitialPrompt)
|
|
@@ -824877,7 +824895,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
824877
824895
|
`);
|
|
824878
824896
|
process.stdout.write(`View: ${getRemoteSessionUrl(createdSession.id)}?m=0
|
|
824879
824897
|
`);
|
|
824880
|
-
process.stdout.write(`Resume with:
|
|
824898
|
+
process.stdout.write(`Resume with: occ --teleport ${createdSession.id}
|
|
824881
824899
|
`);
|
|
824882
824900
|
await gracefulShutdown(0);
|
|
824883
824901
|
process.exit(0);
|
|
@@ -824961,7 +824979,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
824961
824979
|
await gracefulShutdown(0);
|
|
824962
824980
|
}
|
|
824963
824981
|
} else {
|
|
824964
|
-
throw new TeleportOperationError(`You must run
|
|
824982
|
+
throw new TeleportOperationError(`You must run occ --teleport ${teleport} from a checkout of ${sessionRepo}.`, source_default.red(`You must run occ --teleport ${teleport} from a checkout of ${source_default.bold(sessionRepo)}.
|
|
824965
824983
|
`));
|
|
824966
824984
|
}
|
|
824967
824985
|
}
|
|
@@ -825258,7 +825276,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
825258
825276
|
} = await Promise.resolve().then(() => exports_lockfile2);
|
|
825259
825277
|
const existing = await probeRunningServer2();
|
|
825260
825278
|
if (existing) {
|
|
825261
|
-
process.stderr.write(`
|
|
825279
|
+
process.stderr.write(`An OCC server is already running (pid ${existing.pid}) at ${existing.httpUrl}
|
|
825262
825280
|
`);
|
|
825263
825281
|
process.exit(1);
|
|
825264
825282
|
}
|
|
@@ -825304,10 +825322,10 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
825304
825322
|
}
|
|
825305
825323
|
if (feature("SSH_REMOTE")) {
|
|
825306
825324
|
program3.command("ssh <host> [dir]").description("Run Claude Code on a remote host over SSH. Deploys the binary and " + "tunnels API auth back through your local machine \u2014 no remote setup needed.").option("--permission-mode <mode>", "Permission mode for the remote session").option("--dangerously-skip-permissions", "Skip all permission prompts on the remote (dangerous)").option("--local", "e2e test mode \u2014 spawn the child CLI locally (skip ssh/deploy). " + "Exercises the auth proxy and unix-socket plumbing without a remote host.").action(async () => {
|
|
825307
|
-
process.stderr.write(`Usage:
|
|
825325
|
+
process.stderr.write(`Usage: occ ssh <user@host | ssh-config-alias> [dir]
|
|
825308
825326
|
|
|
825309
|
-
Runs
|
|
825310
|
-
` + "anything on the remote or run `
|
|
825327
|
+
Runs OCC on a remote Linux host. You don't need to install
|
|
825328
|
+
` + "anything on the remote or run `occ auth login` there \u2014 the binary is\n" + `deployed over SSH and API auth tunnels back through your local machine.
|
|
825311
825329
|
`);
|
|
825312
825330
|
process.exit(1);
|
|
825313
825331
|
});
|
|
@@ -825599,7 +825617,7 @@ Runs Claude Code on a remote Linux host. You don't need to install
|
|
|
825599
825617
|
}
|
|
825600
825618
|
if (feature("KAIROS")) {
|
|
825601
825619
|
program3.command("assistant [sessionId]").description("Attach the REPL as a client to a running bridge session. Discovers sessions via API if no sessionId given.").action(() => {
|
|
825602
|
-
process.stderr.write(`Usage:
|
|
825620
|
+
process.stderr.write(`Usage: occ assistant [sessionId]
|
|
825603
825621
|
|
|
825604
825622
|
Attach the REPL as a viewer client to a running bridge session.
|
|
825605
825623
|
Omit sessionId to discover and pick from available sessions.
|
|
@@ -825947,6 +825965,7 @@ var feature2 = (name3) => _FEATURE_ALLOWLIST.has(name3);
|
|
|
825947
825965
|
if (typeof globalThis.MACRO === "undefined") {
|
|
825948
825966
|
globalThis.MACRO = {
|
|
825949
825967
|
VERSION: "2.1.270",
|
|
825968
|
+
BINARY_NAME: "occ",
|
|
825950
825969
|
BUILD_TIME: new Date().toISOString(),
|
|
825951
825970
|
FEEDBACK_CHANNEL: "",
|
|
825952
825971
|
ISSUES_EXPLAINER: "",
|