@skrr-ai/cli 0.1.114 → 0.1.115
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/commands/agents/chat.js +10 -1
- package/dist/commands/computer-use/audio.d.ts +6 -0
- package/dist/commands/computer-use/audio.js +9 -0
- package/dist/commands/computer-use/browser.d.ts +7 -0
- package/dist/commands/computer-use/browser.js +16 -0
- package/dist/commands/computer-use/disable.d.ts +6 -0
- package/dist/commands/computer-use/disable.js +9 -0
- package/dist/commands/computer-use/enable.d.ts +6 -0
- package/dist/commands/computer-use/enable.js +9 -0
- package/dist/commands/computer-use/index.d.ts +6 -0
- package/dist/commands/computer-use/index.js +9 -0
- package/dist/commands/computer-use/install.d.ts +6 -0
- package/dist/commands/computer-use/install.js +9 -0
- package/dist/commands/computer-use/recover.d.ts +6 -0
- package/dist/commands/computer-use/recover.js +9 -0
- package/dist/commands/computer-use/status.d.ts +6 -0
- package/dist/commands/computer-use/status.js +9 -0
- package/dist/commands/computer-use/stop.d.ts +6 -0
- package/dist/commands/computer-use/stop.js +9 -0
- package/dist/commands/daemon/login.js +1 -1
- package/dist/commands/followups/plans/cancel.js +10 -3
- package/dist/commands/followups/plans/capacity.d.ts +9 -0
- package/dist/commands/followups/plans/capacity.js +42 -0
- package/dist/commands/followups/plans/create.js +3 -0
- package/dist/commands/followups/plans/revise.js +13 -6
- package/dist/lib/agentic-stream.d.ts +5 -1
- package/dist/lib/agentic-stream.js +25 -9
- package/dist/lib/computer-use.d.ts +9 -0
- package/dist/lib/computer-use.js +41 -0
- package/dist/lib/lookbackPlans.d.ts +20 -6
- package/dist/lib/lookbackPlans.js +19 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerUse.d.ts +228 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerUse.js +375 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.d.ts +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.js +6 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +40 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopWire.d.ts +140 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopWire.js +46 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +8 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerUse.d.ts +228 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerUse.js +358 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.d.ts +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.js +5 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +40 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopWire.d.ts +140 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopWire.js +42 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +21 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +23687 -23456
- package/oclif.manifest.json +284 -4
- package/package.json +2 -2
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMPUTER_DESKTOP_CONTROL_CAPABILITY = exports.COMPUTER_DESKTOP_CLOSED_REASONS = exports.COMPUTER_DESKTOP_LIMITS = exports.DAEMON_COMPUTER_DESKTOP_EVENTS = exports.COMPUTER_DESKTOP_EVENTS = exports.COMPUTER_DESKTOP_SURFACE_ID = exports.COMPUTER_DESKTOP_CAPABILITY = void 0;
|
|
4
|
+
exports.isComputerDesktopBase64 = isComputerDesktopBase64;
|
|
5
|
+
/** A separately negotiated read-only desktop stream, not a browser surface or an input grant. */
|
|
6
|
+
exports.COMPUTER_DESKTOP_CAPABILITY = 'computer_desktop_observe_v1';
|
|
7
|
+
exports.COMPUTER_DESKTOP_SURFACE_ID = 'desktop:main';
|
|
8
|
+
exports.COMPUTER_DESKTOP_EVENTS = {
|
|
9
|
+
subscribe: 'computer:desktop:subscribe',
|
|
10
|
+
protocol: 'computer:desktop:protocol',
|
|
11
|
+
unsubscribe: 'computer:desktop:unsubscribe',
|
|
12
|
+
data: 'computer:desktop:data',
|
|
13
|
+
control: 'computer:desktop:control',
|
|
14
|
+
input: 'computer:desktop:input',
|
|
15
|
+
controlChanged: 'computer:desktop:control-changed',
|
|
16
|
+
};
|
|
17
|
+
exports.DAEMON_COMPUTER_DESKTOP_EVENTS = {
|
|
18
|
+
subscribe: 'daemon:computer:desktop:subscribe',
|
|
19
|
+
protocol: 'daemon:computer:desktop:protocol',
|
|
20
|
+
unsubscribe: 'daemon:computer:desktop:unsubscribe',
|
|
21
|
+
data: 'daemon:computer:desktop:data',
|
|
22
|
+
control: 'daemon:computer:desktop:control',
|
|
23
|
+
input: 'daemon:computer:desktop:input',
|
|
24
|
+
controlChanged: 'daemon:computer:desktop:control-changed',
|
|
25
|
+
};
|
|
26
|
+
exports.COMPUTER_DESKTOP_LIMITS = Object.freeze({
|
|
27
|
+
maxIdChars: 160,
|
|
28
|
+
maxProtocolBase64Chars: 88 * 1024,
|
|
29
|
+
maxDataBase64Chars: 128 * 1024,
|
|
30
|
+
});
|
|
31
|
+
exports.COMPUTER_DESKTOP_CLOSED_REASONS = ['unavailable', 'revoked', 'protocol_error', 'slow_viewer', 'ended', 'private_control'];
|
|
32
|
+
/** Canonical RFC 4648 base64 including zero pad bits; no whitespace/URL alphabet. */
|
|
33
|
+
function isComputerDesktopBase64(value, maxChars) {
|
|
34
|
+
if (typeof value !== 'string' || !value.length || value.length > maxChars || value.length % 4 !== 0)
|
|
35
|
+
return false;
|
|
36
|
+
if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value))
|
|
37
|
+
return false;
|
|
38
|
+
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
39
|
+
if (value.endsWith('=='))
|
|
40
|
+
return (alphabet.indexOf(value[value.length - 3]) & 15) === 0;
|
|
41
|
+
if (value.endsWith('='))
|
|
42
|
+
return (alphabet.indexOf(value[value.length - 2]) & 3) === 0;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
/** Typed human input is independent of read-only RFB negotiation. */
|
|
46
|
+
exports.COMPUTER_DESKTOP_CONTROL_CAPABILITY = 'computer_desktop_control_v1';
|
|
@@ -365,7 +365,7 @@ export declare const FIRST_PARTY_HARNESS_ENGINE: Readonly<{
|
|
|
365
365
|
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
366
366
|
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
367
367
|
*/
|
|
368
|
-
env: Readonly<Record<"appName" | "serverPassword" | "serverUsername" | "home" | "config" | "scriptName" | "allowUpstreamEgress" | "compatOpencode" | "noCompatPrompts" | "maxInputTokens"
|
|
368
|
+
env: Readonly<Record<"sessionId" | "appName" | "serverPassword" | "serverUsername" | "home" | "config" | "scriptName" | "allowUpstreamEgress" | "compatOpencode" | "noCompatPrompts" | "maxInputTokens", string>>;
|
|
369
369
|
}>;
|
|
370
370
|
/**
|
|
371
371
|
* Every name the engine reads for one purpose, current namespace first — the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* wire up its logger, config dir, kill switches, and binary name — then
|
|
7
7
|
* uses the rest of the API uniformly.
|
|
8
8
|
*/
|
|
9
|
-
export { SCOPES, ALL_DAEMON_SCOPES, VALID_DAEMON_SCOPE_SET, isDaemonScope, OAUTH_CLI_SCOPE, type DaemonScope, type OAuthCliScope, type OAuthScope, } from './daemonScopes.js';
|
|
9
|
+
export { SCOPES, ALL_DAEMON_SCOPES, DEFAULT_DAEMON_SCOPES, VALID_DAEMON_SCOPE_SET, isDaemonScope, OAUTH_CLI_SCOPE, type DaemonScope, type OAuthCliScope, type OAuthScope, } from './daemonScopes.js';
|
|
10
10
|
export { configureAuthCore, getAuthLogger, getAuthConfigDir, getAuthKillSwitches, getAuthBinaryName, emitAuthTelemetry, type AuthCoreConfig, type AuthLogger, type AuthKillSwitches, type AuthTelemetryEvent, } from './runtime.js';
|
|
11
11
|
export { PermanentAuthFailure, TransientAuthFailure, type PermanentAuthReason, type ReauthState, type TokenPair, } from './types.js';
|
|
12
12
|
export { decodeJwtExpiry, decodeJwtPayload } from './jwtUtils.js';
|
|
@@ -48,3 +48,5 @@ export { resolveConfigRoot, configRootPath, isConfigRootOverridden } from './con
|
|
|
48
48
|
export { PROFILES_SEGMENT, SUPERSEDED_MARKER_SUFFIX, SUPERSEDED_COPY_SUFFIX, profileStateDir, legacyProfileStateDir, resolveProfileStateDir, resolveProfileStateFile, profileStateFileLocations, profileStateFilePathsToClear, consolidateProfileState, type ResolvedProfileStateDir, type ConsolidationSpec, type ConsolidationStatus, type ConsolidationOutcome, } from './profileStateDir.js';
|
|
49
49
|
export * from './harnessPermissionControls.js';
|
|
50
50
|
export { compareReleaseVersions } from './releaseVersions.js';
|
|
51
|
+
export * from './computerUse.js';
|
|
52
|
+
export * from './desktopWire.js';
|
|
@@ -22,11 +22,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
22
22
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.compareReleaseVersions = exports.consolidateProfileState = exports.profileStateFilePathsToClear = exports.profileStateFileLocations = exports.resolveProfileStateFile = exports.resolveProfileStateDir = exports.legacyProfileStateDir = exports.profileStateDir = exports.SUPERSEDED_COPY_SUFFIX = exports.SUPERSEDED_MARKER_SUFFIX = exports.PROFILES_SEGMENT = exports.isConfigRootOverridden = exports.configRootPath = exports.resolveConfigRoot = exports.verifyManifest = exports.verifyArtifact = exports.isTrustedArtifactOrigin = exports.getDeltaFor = exports.buildManifestMessage = exports.buildArtifactMessage = exports.TRUSTED_FEED_ORIGINS = exports.MAX_SIGS = exports.OVERSKY_RELEASE_PUBLIC_KEYS = exports.resolveFirstPartyHarnessChannel = exports.resolveChannelManifestUrl = exports.isFirstPartyHarnessChannel = exports.firstPartyHarnessFeedCandidates = exports.firstPartyHarnessFeedBase = exports.firstPartyHarnessChannelPrefix = exports.FIRST_PARTY_HARNESS_CHANNELS = exports.DEFAULT_FIRST_PARTY_HARNESS_CHANNEL = exports.migrateFirstPartyHarnessHome = exports.linkFirstPartyHarnessAliases = exports.firstPartyHarnessInstalledBinaryPath = exports.firstPartyHarnessHomeDir = exports.firstPartyHarnessBinDir = exports.FIRST_PARTY_HARNESS_PROVENANCE_SUFFIX = exports.FIRST_PARTY_HARNESS_PREVIOUS_SUFFIX = exports.describeLegacyState = exports.findLegacyLocalState = exports.DEFAULT_BINARY_NAME = exports.LEGACY_NATIVE_ID_PREFIXES = exports.NATIVE_ID_PREFIX = exports.LEGACY_CONFIG_DIR_NAMES = exports.CONFIG_DIR_NAME = exports.LOOPBACK_DEFAULT_MAX_BODY_BYTES = exports.LoopbackTargetRefusedError = void 0;
|
|
25
|
+
exports.SENTINEL_TRIGGERING_FAILURES = exports.__resetAuthHelperFailureReasonForTest = exports.getLastAuthHelperFailureReason = exports.getDefaultHelperTtlMs = exports.invokeAuthHelper = exports.AuthHelperUnavailableError = exports.AuthHelperUntrustedError = exports.isStaticTokenKind = exports.PERSONAL_ACCESS_TOKEN_PREFIX = exports.CI_TOKEN_PREFIX = exports.classifyTokenKind = exports.invalidateAuthHelperCache = exports.__resetCredentialResolverForTest = exports.CREDENTIAL_PRECEDENCE = exports.CredentialResolver = exports.__setFdReaderForTest = exports.readAuthFromFd = exports.createRefreshScheduler = exports.UNKNOWN_401_BUDGET = exports.__resetUnknown401StreaksForTest = exports.__refreshDiagnostics = exports.installLockExitHandlers = exports.clearReauthState = exports.needsReauthState = exports.persistReauthState = exports.withAuthLock = exports.revokeDaemonRefreshSession = exports.refreshDaemonToken = exports.classifyRefreshResponse = exports.EXIT_NEEDS_REAUTH = exports.reauthCommand = exports.formatReauthMessage = exports.handleMidStreamAuthExpiry = exports.isAuthExpiredSseEvent = exports.decodeJwtPayload = exports.decodeJwtExpiry = exports.TransientAuthFailure = exports.PermanentAuthFailure = exports.emitAuthTelemetry = exports.getAuthBinaryName = exports.getAuthKillSwitches = exports.getAuthConfigDir = exports.getAuthLogger = exports.configureAuthCore = exports.OAUTH_CLI_SCOPE = exports.isDaemonScope = exports.VALID_DAEMON_SCOPE_SET = exports.DEFAULT_DAEMON_SCOPES = exports.ALL_DAEMON_SCOPES = exports.SCOPES = void 0;
|
|
26
|
+
exports.generateDeviceKeyPair = exports.buildDeviceProof = exports.zeroizeKekCaches = exports.WindowsKek = exports.registerZeroizeHook = exports.MacosKek = exports.LinuxKek = exports.KekUnavailableError = exports.UnavailableKek = exports.InMemoryKek = exports.getKekStrategy = exports.__setKekStrategyForTest = exports.credEnvelopeWrap = exports.credEnvelopeUnwrap = exports.credEnvelopeSerialize = exports.credSealBuffer = exports.credOpenBuffer = exports.CRED_KEY_LEN = exports.isCredEnvelopeString = exports.generateDek = exports.CRED_ENVELOPE_MAGIC = exports.credEnvelopeEncrypt = exports.credEnvelopeDeserialize = exports.credEnvelopeDecrypt = exports.buildCredentialAad = exports.isValidRecoveryCode = exports.normalizeRecoveryCode = exports.parseRecoveryCode = exports.formatRecoveryCode = exports.MAX_TTL_DAYS = exports.MIN_TTL_DAYS = exports.parseTtlDays = exports.LoginExchangeError = exports.LoginInitError = exports.loginWithLocalhost = exports.LocalCallbackMalformedError = exports.LocalCallbackDeniedError = exports.LocalCallbackStateMismatchError = exports.LocalCallbackTimeoutError = exports.LocalCallbackBindError = exports.LocalCallbackError = exports.DEFAULT_LOGIN_TIMEOUT_MS = exports.startLocalCallback = exports.verifyChallenge = exports.safeEqual = exports.generateState = exports.challenge = exports.generateVerifier = exports.invalidateHeadersHelperCache = exports.runHeadersHelper = void 0;
|
|
27
|
+
exports.getHardwareMachineUuid = exports.describeMachineIdentity = exports.getMachineUuidForProfile = exports.getMachineUuid = exports.__getDeviceIdentityStateForTest = exports.__setDeviceIdentityStateForTest = exports.__enrollmentBackoffPathForTest = exports.__enrollmentMarkerPathForTest = exports.__privateKeyPathForTest = exports.__publicKeyPathForTest = exports.describeDeviceKeySplit = exports.describeDeviceIdentityState = exports.getDevicePublicKey = exports.isDeviceIdentityActive = exports.clearEnrollmentMarker = exports.enrollWithServer = exports.signServerRequest = exports.resetDeviceIdentity = exports.initDeviceIdentity = exports.__resetShutdownGuardForTest = exports.__getCredEnvelopeStateForTest = exports.__setCredEnvelopeStateForTest = exports.__wrappedDekFilePathForTest = exports.DEFAULT_UNREADABLE_CREDENTIAL_HINT = exports.maybeDecryptOnRead = exports.maybeEncryptForWrite = exports.splitKeyConvergencePolicy = exports.describeCredEnvelopeState = exports.hasCredEnvelopePathConflict = exports.isCredEnvelopeActive = exports.shutdownCredEnvelope = exports.resetCredEnvelope = exports.initCredEnvelope = exports.verifyDpopProof = exports.normalizeDpopHtu = exports.isJwkThumbprint = exports.isAth = exports.createDpopKey = exports.accessTokenHash = exports.DPOP_PROOF_VERIFY_UNAVAILABLE = exports.DPOP_PROOF_TYP = exports.DPOP_PROOF_REQUIRED = exports.DPOP_PROOF_INVALID = exports.DPOP_MAX_AGE_SECONDS = exports.DPOP_HEADER = exports.verifyDeviceProof = exports.tokenHash = exports.publicJwkFromX = exports.normalizeHtu = exports.jwkThumbprint = void 0;
|
|
28
|
+
exports.isLoopbackHostname = exports.assertLoopbackHttpUrl = exports.loopbackFetch = exports.withLoopbackNoProxy = exports.envHasProxy = exports.LOOPBACK_NO_PROXY_HOSTS = exports.isDaemonChildEnv = exports.DAEMON_CHILD_ENV = exports.SENSITIVE_ENV_PREFIX_EXCEPTIONS = exports.SENSITIVE_ENV_NAME_TOKENS = exports.SENSITIVE_ENV_SUFFIXES = exports.SENSITIVE_ENV_PREFIXES = exports.SENSITIVE_ENV_VARS = exports.sanitizeSpawnEnv = exports.harnessLoadsClaudeSkillsLayout = exports.claudeSkillsLayoutEvidence = exports.HARNESSES_LOADING_CLAUDE_SKILLS_LAYOUT = exports.tierPermitsConfiguredAutoMode = exports.credentialPolicyForTier = exports.getHarnessTier = exports.HARNESS_TIERS = exports.pairUint8ArrayToBase64Url = exports.pairUint8ArrayToBase64 = exports.parsePairUrl = exports.parsePairPlaintext = exports.parsePairBundle = exports.openPairBundleBase64 = exports.generatePairKeyPair = exports.buildPairUrl = exports.buildPairAad = exports.pairBase64UrlToUint8Array = exports.pairBase64ToUint8Array = exports.assemblePairBundleBase64 = exports.PairBundleError = exports.PAIR_SECRET_LEN = exports.PAIR_PUBKEY_LEN = exports.PAIR_NONCE_LEN = exports.PAIR_BUNDLE_MAX_BASE64_LEN = exports.PAIR_AAD_MAX_LEN = exports.PAIR_AAD_PREFIX = exports.__resetCachedDaemonIdForTest = exports.legacyDaemonUuids = exports.ensureMachineDaemonId = exports.__resetMachineUuidCacheForTest = exports.HOSTED_RUNTIME_MACHINE_SOURCES = exports.hostedRuntimeIdOverride = exports.MACHINE_IDENTITY_FILENAME = exports.qualifyMachineUuid = exports.getMachineUuidProfile = exports.setMachineUuidProfile = void 0;
|
|
29
|
+
exports.compareReleaseVersions = exports.consolidateProfileState = exports.profileStateFilePathsToClear = exports.profileStateFileLocations = exports.resolveProfileStateFile = exports.resolveProfileStateDir = exports.legacyProfileStateDir = exports.profileStateDir = exports.SUPERSEDED_COPY_SUFFIX = exports.SUPERSEDED_MARKER_SUFFIX = exports.PROFILES_SEGMENT = exports.isConfigRootOverridden = exports.configRootPath = exports.resolveConfigRoot = exports.verifyManifest = exports.verifyArtifact = exports.isTrustedArtifactOrigin = exports.getDeltaFor = exports.buildManifestMessage = exports.buildArtifactMessage = exports.TRUSTED_FEED_ORIGINS = exports.MAX_SIGS = exports.OVERSKY_RELEASE_PUBLIC_KEYS = exports.resolveFirstPartyHarnessChannel = exports.resolveChannelManifestUrl = exports.isFirstPartyHarnessChannel = exports.firstPartyHarnessFeedCandidates = exports.firstPartyHarnessFeedBase = exports.firstPartyHarnessChannelPrefix = exports.FIRST_PARTY_HARNESS_CHANNELS = exports.DEFAULT_FIRST_PARTY_HARNESS_CHANNEL = exports.migrateFirstPartyHarnessHome = exports.linkFirstPartyHarnessAliases = exports.firstPartyHarnessInstalledBinaryPath = exports.firstPartyHarnessHomeDir = exports.firstPartyHarnessBinDir = exports.FIRST_PARTY_HARNESS_PROVENANCE_SUFFIX = exports.FIRST_PARTY_HARNESS_PREVIOUS_SUFFIX = exports.describeLegacyState = exports.findLegacyLocalState = exports.DEFAULT_BINARY_NAME = exports.LEGACY_NATIVE_ID_PREFIXES = exports.NATIVE_ID_PREFIX = exports.LEGACY_CONFIG_DIR_NAMES = exports.CONFIG_DIR_NAME = exports.LOOPBACK_DEFAULT_MAX_BODY_BYTES = exports.LoopbackTargetRefusedError = exports.isLoopbackAddress = void 0;
|
|
30
30
|
// Daemon scope vocabulary — single source of truth for non-Mongoose tiers
|
|
31
31
|
// (daemon, desktop, cli). Schema-bound canonical lives in
|
|
32
32
|
// `@skrr-ai/data-schemas/common/daemonScopes`; the two are kept byte-equal
|
|
@@ -34,6 +34,7 @@ exports.compareReleaseVersions = exports.consolidateProfileState = exports.profi
|
|
|
34
34
|
var daemonScopes_js_1 = require("./daemonScopes.js");
|
|
35
35
|
Object.defineProperty(exports, "SCOPES", { enumerable: true, get: function () { return daemonScopes_js_1.SCOPES; } });
|
|
36
36
|
Object.defineProperty(exports, "ALL_DAEMON_SCOPES", { enumerable: true, get: function () { return daemonScopes_js_1.ALL_DAEMON_SCOPES; } });
|
|
37
|
+
Object.defineProperty(exports, "DEFAULT_DAEMON_SCOPES", { enumerable: true, get: function () { return daemonScopes_js_1.DEFAULT_DAEMON_SCOPES; } });
|
|
37
38
|
Object.defineProperty(exports, "VALID_DAEMON_SCOPE_SET", { enumerable: true, get: function () { return daemonScopes_js_1.VALID_DAEMON_SCOPE_SET; } });
|
|
38
39
|
Object.defineProperty(exports, "isDaemonScope", { enumerable: true, get: function () { return daemonScopes_js_1.isDaemonScope; } });
|
|
39
40
|
Object.defineProperty(exports, "OAUTH_CLI_SCOPE", { enumerable: true, get: function () { return daemonScopes_js_1.OAUTH_CLI_SCOPE; } });
|
|
@@ -443,3 +444,5 @@ Object.defineProperty(exports, "consolidateProfileState", { enumerable: true, ge
|
|
|
443
444
|
__exportStar(require("./harnessPermissionControls.js"), exports);
|
|
444
445
|
var releaseVersions_js_1 = require("./releaseVersions.js");
|
|
445
446
|
Object.defineProperty(exports, "compareReleaseVersions", { enumerable: true, get: function () { return releaseVersions_js_1.compareReleaseVersions; } });
|
|
447
|
+
__exportStar(require("./computerUse.js"), exports);
|
|
448
|
+
__exportStar(require("./desktopWire.js"), exports);
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computer Use v1 is a host-to-host protocol, never a model tool schema.
|
|
3
|
+
* Models see exactly the runtime's js/js_reset surface. In particular, script
|
|
4
|
+
* contents cannot prove that a call is read-only or supply execution identity.
|
|
5
|
+
* Kept dependency-free so daemon, API, browser and native clients agree.
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMPUTER_USE_TOOL: "ComputerUse";
|
|
8
|
+
export declare const COMPUTER_USE_PROVIDER: "lcu";
|
|
9
|
+
export declare const COMPUTER_USE_PROTOCOL: "computer_use_mcp_v1";
|
|
10
|
+
export declare const COMPUTER_USE_ROTATE_CREDENTIAL_EVENT: "daemon:computer-use:rotate-credential";
|
|
11
|
+
/** Owner-approved hosted credential upgrade; no bearer secret travels in this request. */
|
|
12
|
+
export interface ComputerUseRotateCredentialRequest {
|
|
13
|
+
requestId: string;
|
|
14
|
+
ownerUserId: string;
|
|
15
|
+
machineUuid: string;
|
|
16
|
+
leaseId: string;
|
|
17
|
+
generation: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const COMPUTER_USE_EXECUTION_CAPABILITY: "computer_use";
|
|
20
|
+
export declare const COMPUTER_USE_CLOUD_CONSENT: "computer_use_cloud_agents_v1";
|
|
21
|
+
export declare const COMPUTER_USE_PUBLIC_TOOLS: readonly ["js", "js_reset"];
|
|
22
|
+
export type ComputerUsePublicTool = (typeof COMPUTER_USE_PUBLIC_TOOLS)[number];
|
|
23
|
+
export declare const COMPUTER_USE_OPERATIONS: readonly ["describe", "call", "end_turn", "close", "status", "control_stop"];
|
|
24
|
+
export type ComputerUseOperation = (typeof COMPUTER_USE_OPERATIONS)[number];
|
|
25
|
+
export type ComputerUseSurfaceMode = 'computer' | 'browser' | 'all';
|
|
26
|
+
export type ComputerUseEndReason = 'Stop' | 'Interrupt';
|
|
27
|
+
/** Identity is derived from authenticated execution, never tool arguments. */
|
|
28
|
+
export interface ComputerUseHostContext {
|
|
29
|
+
principalId: string;
|
|
30
|
+
machineId: string;
|
|
31
|
+
sessionId: string;
|
|
32
|
+
turnId: string;
|
|
33
|
+
generation: number;
|
|
34
|
+
toolCallId?: string;
|
|
35
|
+
agentId?: string;
|
|
36
|
+
engine?: string;
|
|
37
|
+
conversationId?: string;
|
|
38
|
+
contextKey?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ComputerUseBudgets {
|
|
41
|
+
activeExecutionMs: number;
|
|
42
|
+
humanResponseMs: number;
|
|
43
|
+
totalLifetimeMs: number;
|
|
44
|
+
cleanupGraceMs: number;
|
|
45
|
+
}
|
|
46
|
+
export declare const COMPUTER_USE_DEFAULT_BUDGETS: Readonly<ComputerUseBudgets>;
|
|
47
|
+
/** Negotiated ceilings; exceeding a limit is an error, never silent clipping. */
|
|
48
|
+
export declare const COMPUTER_USE_LIMITS: Readonly<{
|
|
49
|
+
maxEnvelopeBytes: number;
|
|
50
|
+
maxInstructionsBytes: number;
|
|
51
|
+
maxSchemaBytes: number;
|
|
52
|
+
maxContentBlocks: 512;
|
|
53
|
+
maxIdentityChars: 512;
|
|
54
|
+
maxActiveExecutionMs: 900000;
|
|
55
|
+
maxHumanResponseMs: 900000;
|
|
56
|
+
maxTotalLifetimeMs: 1800000;
|
|
57
|
+
maxCleanupGraceMs: 60000;
|
|
58
|
+
}>;
|
|
59
|
+
/** Preserve upstream fields and schemas, including annotations and extensions. */
|
|
60
|
+
export interface ComputerUseToolDescriptor {
|
|
61
|
+
name: ComputerUsePublicTool;
|
|
62
|
+
description?: string;
|
|
63
|
+
inputSchema: Record<string, unknown>;
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
}
|
|
66
|
+
export interface ComputerUseMcpContent {
|
|
67
|
+
type: string;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
export interface ComputerUseMcpResult {
|
|
71
|
+
content: ComputerUseMcpContent[];
|
|
72
|
+
isError?: boolean;
|
|
73
|
+
structuredContent?: Record<string, unknown>;
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface ComputerUseVersions {
|
|
77
|
+
lcu: string;
|
|
78
|
+
adapter?: string;
|
|
79
|
+
app?: string;
|
|
80
|
+
runtime?: string;
|
|
81
|
+
[key: string]: string | undefined;
|
|
82
|
+
}
|
|
83
|
+
export interface ComputerUseRuntimePolicy {
|
|
84
|
+
replPersistence: 'turn';
|
|
85
|
+
audioCleanup: 'retire-runtime';
|
|
86
|
+
}
|
|
87
|
+
export interface ComputerUseSurface {
|
|
88
|
+
protocol: typeof COMPUTER_USE_PROTOCOL;
|
|
89
|
+
provider: typeof COMPUTER_USE_PROVIDER;
|
|
90
|
+
instructions: string;
|
|
91
|
+
tools: ComputerUseToolDescriptor[];
|
|
92
|
+
versions: ComputerUseVersions;
|
|
93
|
+
/** Digest of the actual instructions and full descriptors, not a version label. */
|
|
94
|
+
digest: string;
|
|
95
|
+
surfaceMode: ComputerUseSurfaceMode;
|
|
96
|
+
/** Host-observed lifecycle constraints, separate from original runtime instructions. */
|
|
97
|
+
runtimePolicy?: ComputerUseRuntimePolicy;
|
|
98
|
+
}
|
|
99
|
+
/** Preserve original documentation while explaining the host's narrower lifecycle. */
|
|
100
|
+
export declare function computerUseModelInstructions(surface: ComputerUseSurface): string;
|
|
101
|
+
export declare const COMPUTER_USE_RUNTIME_STATES: readonly ["disabled", "starting", "ready", "executing", "awaiting_approval", "ending_turn", "unavailable", "closed"];
|
|
102
|
+
export type ComputerUseRuntimeState = (typeof COMPUTER_USE_RUNTIME_STATES)[number];
|
|
103
|
+
export interface ComputerUseReadiness {
|
|
104
|
+
provider: typeof COMPUTER_USE_PROVIDER;
|
|
105
|
+
protocol: typeof COMPUTER_USE_PROTOCOL;
|
|
106
|
+
state: ComputerUseRuntimeState;
|
|
107
|
+
available: boolean;
|
|
108
|
+
enabled: boolean;
|
|
109
|
+
cloudAgentsAllowed: boolean;
|
|
110
|
+
reason?: string;
|
|
111
|
+
versions?: ComputerUseVersions;
|
|
112
|
+
surfaceDigest?: string;
|
|
113
|
+
/** Capability readiness is independent of whether a person granted consent. */
|
|
114
|
+
browserReady?: boolean;
|
|
115
|
+
audioReady?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface ComputerUseStatus extends ComputerUseReadiness {
|
|
118
|
+
controller?: Pick<ComputerUseHostContext, 'sessionId' | 'turnId' | 'generation' | 'agentId' | 'conversationId'>;
|
|
119
|
+
pendingApprovalId?: string;
|
|
120
|
+
cleanupConfirmed?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export type ComputerUseInput = {
|
|
123
|
+
operation: 'describe';
|
|
124
|
+
surfaceMode?: ComputerUseSurfaceMode;
|
|
125
|
+
} | {
|
|
126
|
+
operation: 'call';
|
|
127
|
+
tool: ComputerUsePublicTool;
|
|
128
|
+
arguments: Record<string, unknown>;
|
|
129
|
+
surfaceDigest?: string;
|
|
130
|
+
budgets?: Partial<ComputerUseBudgets>;
|
|
131
|
+
} | {
|
|
132
|
+
operation: 'end_turn';
|
|
133
|
+
reason: ComputerUseEndReason;
|
|
134
|
+
} | {
|
|
135
|
+
operation: 'close';
|
|
136
|
+
reason?: string;
|
|
137
|
+
} | {
|
|
138
|
+
operation: 'status';
|
|
139
|
+
} | {
|
|
140
|
+
operation: 'control_stop';
|
|
141
|
+
reason?: string;
|
|
142
|
+
};
|
|
143
|
+
export type ComputerUseRequest = ComputerUseInput & {
|
|
144
|
+
protocol: typeof COMPUTER_USE_PROTOCOL;
|
|
145
|
+
provider: typeof COMPUTER_USE_PROVIDER;
|
|
146
|
+
context: ComputerUseHostContext;
|
|
147
|
+
};
|
|
148
|
+
export interface ComputerUseCleanupResult {
|
|
149
|
+
/** True only after the runtime confirms execution can no longer produce input. */
|
|
150
|
+
cleanupConfirmed: boolean;
|
|
151
|
+
closed: boolean;
|
|
152
|
+
generation: number;
|
|
153
|
+
}
|
|
154
|
+
export type ComputerUseResponse = {
|
|
155
|
+
operation: 'describe';
|
|
156
|
+
surface: ComputerUseSurface;
|
|
157
|
+
} | {
|
|
158
|
+
operation: 'call';
|
|
159
|
+
mcpResult: ComputerUseMcpResult;
|
|
160
|
+
} | {
|
|
161
|
+
operation: 'status';
|
|
162
|
+
status: ComputerUseStatus;
|
|
163
|
+
} | {
|
|
164
|
+
operation: 'end_turn' | 'close' | 'control_stop';
|
|
165
|
+
cleanup: ComputerUseCleanupResult;
|
|
166
|
+
};
|
|
167
|
+
export declare const COMPUTER_USE_ELICITATION_CHOICES: readonly ["once", "session", "always", "decline"];
|
|
168
|
+
export type ComputerUseElicitationChoice = (typeof COMPUTER_USE_ELICITATION_CHOICES)[number];
|
|
169
|
+
export interface ComputerUseElicitationOption {
|
|
170
|
+
value: ComputerUseElicitationChoice;
|
|
171
|
+
label: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
}
|
|
174
|
+
/** This is a dedicated permission request, not AskUserQuestion or sticky tool approval. */
|
|
175
|
+
export interface ComputerUseElicitationRequest {
|
|
176
|
+
kind: 'computer_use_runtime';
|
|
177
|
+
requestId: string;
|
|
178
|
+
context: ComputerUseHostContext & {
|
|
179
|
+
toolCallId: string;
|
|
180
|
+
};
|
|
181
|
+
message: string;
|
|
182
|
+
resource?: Record<string, unknown>;
|
|
183
|
+
options: ComputerUseElicitationOption[];
|
|
184
|
+
expiresAt: number;
|
|
185
|
+
}
|
|
186
|
+
export interface ComputerUseElicitationResponse {
|
|
187
|
+
requestId: string;
|
|
188
|
+
context: ComputerUseHostContext & {
|
|
189
|
+
toolCallId: string;
|
|
190
|
+
};
|
|
191
|
+
choice: ComputerUseElicitationChoice;
|
|
192
|
+
}
|
|
193
|
+
export declare class ComputerUseContractError extends Error {
|
|
194
|
+
readonly code: string;
|
|
195
|
+
constructor(code: string, message: string);
|
|
196
|
+
}
|
|
197
|
+
/** Validate the hosted rotation envelope before changing runtime admission. */
|
|
198
|
+
export declare function assertComputerUseRotateCredentialRequest(value: unknown): asserts value is ComputerUseRotateCredentialRequest;
|
|
199
|
+
export declare function assertComputerUseHostContext(value: unknown): asserts value is ComputerUseHostContext;
|
|
200
|
+
export declare function computerUseBudgets(value?: unknown): ComputerUseBudgets;
|
|
201
|
+
export declare function assertComputerUseInput(value: unknown): asserts value is ComputerUseInput;
|
|
202
|
+
export declare function assertComputerUseRequest(value: unknown): asserts value is ComputerUseRequest;
|
|
203
|
+
export declare function assertComputerUseSurface(value: unknown): asserts value is ComputerUseSurface;
|
|
204
|
+
/** Validate the envelope without rewriting blocks or discarding upstream extensions. */
|
|
205
|
+
export declare function assertComputerUseMcpResult(value: unknown): asserts value is ComputerUseMcpResult;
|
|
206
|
+
/** Compare full execution identity; a matching conversation alone never grants access. */
|
|
207
|
+
export declare function sameComputerUseContext(left: ComputerUseHostContext, right: ComputerUseHostContext): boolean;
|
|
208
|
+
export declare function assertComputerUseElicitationRequest(value: unknown): asserts value is ComputerUseElicitationRequest;
|
|
209
|
+
export declare function assertComputerUseElicitationResponse(value: unknown): asserts value is ComputerUseElicitationResponse;
|
|
210
|
+
/** A human answer can only satisfy this exact pending request and offered scope.
|
|
211
|
+
* This matcher is not authentication: the caller must verify the human responder.
|
|
212
|
+
*/
|
|
213
|
+
export declare function acceptsComputerUseElicitationResponse(request: ComputerUseElicitationRequest, response: ComputerUseElicitationResponse, now?: number): boolean;
|
|
214
|
+
export type ComputerUseModelProjectionOptions = {
|
|
215
|
+
audio: 'inline';
|
|
216
|
+
} | {
|
|
217
|
+
audio: 'artifact-reference';
|
|
218
|
+
principalId: string;
|
|
219
|
+
sessionId: string;
|
|
220
|
+
consumer?: string;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Consumer capability projection, never a rewrite of the canonical daemon
|
|
224
|
+
* result. Some model hosts accept MCP AudioContent but silently omit its bytes.
|
|
225
|
+
* Those hosts receive explicit references to already-persisted owned audio.
|
|
226
|
+
* This function never uploads, transcribes, invents a path or grants access.
|
|
227
|
+
*/
|
|
228
|
+
export declare function projectComputerUseResultForModel(result: ComputerUseMcpResult, options: ComputerUseModelProjectionOptions): ComputerUseMcpResult;
|