@skrr-ai/cli 0.1.47 → 0.1.48
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/README.md +1 -1
- package/dist/base-command.d.ts +18 -0
- package/dist/base-command.js +61 -1
- package/dist/commands/agents/chat.d.ts +21 -0
- package/dist/commands/agents/chat.js +26 -9
- package/dist/commands/balance/usage/breakdown.d.ts +14 -0
- package/dist/commands/balance/usage/breakdown.js +68 -0
- package/dist/commands/balance/usage.js +24 -0
- package/dist/commands/commerce/entitlements/explain.d.ts +22 -0
- package/dist/commands/commerce/entitlements/explain.js +40 -0
- package/dist/commands/commerce/incidents/audit.d.ts +20 -0
- package/dist/commands/commerce/incidents/audit.js +37 -0
- package/dist/commands/commerce/incidents/list.d.ts +22 -0
- package/dist/commands/commerce/incidents/list.js +49 -0
- package/dist/commands/commerce/incidents/resolve.d.ts +23 -0
- package/dist/commands/commerce/incidents/resolve.js +45 -0
- package/dist/commands/commerce/incidents/retry.d.ts +22 -0
- package/dist/commands/commerce/incidents/retry.js +45 -0
- package/dist/commands/commerce/incidents/show.d.ts +13 -0
- package/dist/commands/commerce/incidents/show.js +30 -0
- package/dist/commands/commerce/offers/approve.d.ts +17 -0
- package/dist/commands/commerce/offers/approve.js +33 -0
- package/dist/commands/commerce/offers/create.d.ts +18 -0
- package/dist/commands/commerce/offers/create.js +34 -0
- package/dist/commands/commerce/offers/publish.d.ts +13 -0
- package/dist/commands/commerce/offers/publish.js +28 -0
- package/dist/commands/commerce/offers/retire.d.ts +17 -0
- package/dist/commands/commerce/offers/retire.js +32 -0
- package/dist/commands/commerce/offers/validate.d.ts +18 -0
- package/dist/commands/commerce/offers/validate.js +33 -0
- package/dist/commands/commerce/products/create.d.ts +10 -0
- package/dist/commands/commerce/products/create.js +25 -0
- package/dist/commands/commerce/promotions/redeem.d.ts +13 -0
- package/dist/commands/commerce/promotions/redeem.js +32 -0
- package/dist/commands/commerce/terms/accept.d.ts +18 -0
- package/dist/commands/commerce/terms/accept.js +39 -0
- package/dist/commands/commerce/terms/show.d.ts +10 -0
- package/dist/commands/commerce/terms/show.js +34 -0
- package/dist/commands/commerce/trials/conversion-preview.d.ts +18 -0
- package/dist/commands/commerce/trials/conversion-preview.js +39 -0
- package/dist/commands/commerce/trials/start.d.ts +23 -0
- package/dist/commands/commerce/trials/start.js +58 -0
- package/dist/commands/commitments/accounting.d.ts +39 -0
- package/dist/commands/commitments/accounting.js +116 -0
- package/dist/commands/commitments/action-history.d.ts +1 -0
- package/dist/commands/commitments/action-history.js +8 -1
- package/dist/commands/commitments/case.d.ts +1 -0
- package/dist/commands/commitments/case.js +19 -3
- package/dist/commands/commitments/cases.d.ts +1 -0
- package/dist/commands/commitments/cases.js +11 -1
- package/dist/commands/commitments/checks.d.ts +1 -0
- package/dist/commands/commitments/checks.js +5 -1
- package/dist/commands/commitments/cost.d.ts +62 -0
- package/dist/commands/commitments/cost.js +130 -0
- package/dist/commands/commitments/create.js +1 -1
- package/dist/commands/commitments/delete.d.ts +1 -0
- package/dist/commands/commitments/delete.js +56 -6
- package/dist/commands/commitments/feedback.js +9 -1
- package/dist/commands/commitments/handover.js +16 -0
- package/dist/commands/commitments/hypotheses.d.ts +1 -0
- package/dist/commands/commitments/hypotheses.js +17 -2
- package/dist/commands/commitments/links/list.js +4 -1
- package/dist/commands/commitments/liveness.d.ts +18 -0
- package/dist/commands/commitments/liveness.js +80 -0
- package/dist/commands/commitments/metrics.d.ts +1 -0
- package/dist/commands/commitments/metrics.js +8 -1
- package/dist/commands/commitments/next-tick.d.ts +39 -0
- package/dist/commands/commitments/next-tick.js +122 -0
- package/dist/commands/commitments/observations.d.ts +1 -0
- package/dist/commands/commitments/observations.js +19 -2
- package/dist/commands/commitments/pause.js +12 -0
- package/dist/commands/commitments/receipt.d.ts +2 -0
- package/dist/commands/commitments/receipt.js +16 -2
- package/dist/commands/commitments/remediation-proposal.js +6 -2
- package/dist/commands/commitments/remediation-proposals.js +5 -1
- package/dist/commands/commitments/restore.d.ts +25 -0
- package/dist/commands/commitments/restore.js +46 -0
- package/dist/commands/commitments/show.js +32 -0
- package/dist/commands/commitments/trigger-status.js +33 -0
- package/dist/commands/commitments/update.d.ts +1 -0
- package/dist/commands/commitments/update.js +31 -5
- package/dist/commands/commitments/wake-capabilities.d.ts +0 -1
- package/dist/commands/commitments/wake-capabilities.js +8 -4
- package/dist/commands/enterprise/budgets/create.d.ts +11 -0
- package/dist/commands/enterprise/budgets/create.js +27 -0
- package/dist/commands/enterprise/budgets/evaluate.d.ts +17 -0
- package/dist/commands/enterprise/budgets/evaluate.js +32 -0
- package/dist/commands/enterprise/budgets/publish.d.ts +14 -0
- package/dist/commands/enterprise/budgets/publish.js +30 -0
- package/dist/commands/enterprise/contracts/activate.d.ts +14 -0
- package/dist/commands/enterprise/contracts/activate.js +30 -0
- package/dist/commands/enterprise/contracts/create.d.ts +14 -0
- package/dist/commands/enterprise/contracts/create.js +32 -0
- package/dist/commands/enterprise/contracts/issue.d.ts +18 -0
- package/dist/commands/enterprise/contracts/issue.js +34 -0
- package/dist/commands/enterprise/domains/begin.d.ts +20 -0
- package/dist/commands/enterprise/domains/begin.js +39 -0
- package/dist/commands/enterprise/domains/verify.d.ts +14 -0
- package/dist/commands/enterprise/domains/verify.js +32 -0
- package/dist/commands/enterprise/external-config/activate.d.ts +22 -0
- package/dist/commands/enterprise/external-config/activate.js +49 -0
- package/dist/commands/enterprise/external-config/set.d.ts +25 -0
- package/dist/commands/enterprise/external-config/set.js +123 -0
- package/dist/commands/enterprise/external-config/show.d.ts +12 -0
- package/dist/commands/enterprise/external-config/show.js +39 -0
- package/dist/commands/enterprise/external-config/suspend.d.ts +13 -0
- package/dist/commands/enterprise/external-config/suspend.js +41 -0
- package/dist/commands/enterprise/finance/close-snapshot.d.ts +11 -0
- package/dist/commands/enterprise/finance/close-snapshot.js +28 -0
- package/dist/commands/enterprise/finance/record-document.d.ts +18 -0
- package/dist/commands/enterprise/finance/record-document.js +35 -0
- package/dist/commands/enterprise/profile.d.ts +20 -0
- package/dist/commands/enterprise/profile.js +38 -0
- package/dist/commands/login.d.ts +13 -0
- package/dist/commands/login.js +77 -0
- package/dist/commands/machines/dedicated/index.js +3 -0
- package/dist/commands/machines/dedicated/service/apply.d.ts +23 -0
- package/dist/commands/machines/dedicated/service/apply.js +99 -0
- package/dist/commands/machines/dedicated/service/approve.d.ts +23 -0
- package/dist/commands/machines/dedicated/service/approve.js +52 -0
- package/dist/commands/machines/dedicated/service/create.d.ts +55 -0
- package/dist/commands/machines/dedicated/service/create.js +222 -0
- package/dist/commands/machines/dedicated/service/edit.d.ts +30 -0
- package/dist/commands/machines/dedicated/service/edit.js +146 -0
- package/dist/commands/machines/dedicated/service/exec.d.ts +26 -0
- package/dist/commands/machines/dedicated/service/exec.js +92 -0
- package/dist/commands/machines/dedicated/service/export.d.ts +29 -0
- package/dist/commands/machines/dedicated/service/export.js +106 -0
- package/dist/commands/machines/dedicated/service/index.d.ts +14 -0
- package/dist/commands/machines/dedicated/service/index.js +49 -0
- package/dist/commands/machines/dedicated/service/logs.d.ts +33 -0
- package/dist/commands/machines/dedicated/service/logs.js +148 -0
- package/dist/commands/machines/dedicated/service/ls.d.ts +20 -0
- package/dist/commands/machines/dedicated/service/ls.js +80 -0
- package/dist/commands/machines/dedicated/service/restart.d.ts +14 -0
- package/dist/commands/machines/dedicated/service/restart.js +29 -0
- package/dist/commands/machines/dedicated/service/rm.d.ts +20 -0
- package/dist/commands/machines/dedicated/service/rm.js +33 -0
- package/dist/commands/machines/dedicated/service/secret/index.d.ts +14 -0
- package/dist/commands/machines/dedicated/service/secret/index.js +25 -0
- package/dist/commands/machines/dedicated/service/secret/rm.d.ts +22 -0
- package/dist/commands/machines/dedicated/service/secret/rm.js +54 -0
- package/dist/commands/machines/dedicated/service/secret/set.d.ts +22 -0
- package/dist/commands/machines/dedicated/service/secret/set.js +93 -0
- package/dist/commands/machines/dedicated/service/start.d.ts +14 -0
- package/dist/commands/machines/dedicated/service/start.js +29 -0
- package/dist/commands/machines/dedicated/service/status.d.ts +21 -0
- package/dist/commands/machines/dedicated/service/status.js +85 -0
- package/dist/commands/machines/dedicated/service/stop.d.ts +20 -0
- package/dist/commands/machines/dedicated/service/stop.js +35 -0
- package/dist/commands/machines/dedicated/service/top.d.ts +22 -0
- package/dist/commands/machines/dedicated/service/top.js +120 -0
- package/dist/commands/machines/dedicated/sign-in-status.d.ts +22 -0
- package/dist/commands/machines/dedicated/sign-in-status.js +79 -0
- package/dist/commands/machines/dedicated/ssh-config.d.ts +28 -0
- package/dist/commands/machines/dedicated/ssh-config.js +66 -0
- package/dist/commands/machines/dedicated/ssh-proxy.d.ts +22 -0
- package/dist/commands/machines/dedicated/ssh-proxy.js +62 -0
- package/dist/commands/machines/dedicated/ssh.d.ts +29 -0
- package/dist/commands/machines/dedicated/ssh.js +121 -0
- package/dist/commands/native/allow-all.d.ts +14 -0
- package/dist/commands/native/allow-all.js +25 -0
- package/dist/commands/native/allow.d.ts +24 -0
- package/dist/commands/native/allow.js +45 -0
- package/dist/commands/native/deny.d.ts +24 -0
- package/dist/commands/native/deny.js +43 -0
- package/dist/commands/native/disable.d.ts +17 -0
- package/dist/commands/native/disable.js +28 -0
- package/dist/commands/native/enable.d.ts +12 -0
- package/dist/commands/native/enable.js +29 -0
- package/dist/commands/native/list-apps.d.ts +19 -0
- package/dist/commands/native/list-apps.js +30 -0
- package/dist/commands/native/restrict-to.d.ts +22 -0
- package/dist/commands/native/restrict-to.js +41 -0
- package/dist/commands/native/status.d.ts +19 -0
- package/dist/commands/native/status.js +33 -0
- package/dist/commands/native.d.ts +39 -0
- package/dist/commands/native.js +76 -0
- package/dist/commands/service/index.d.ts +14 -0
- package/dist/commands/service/index.js +31 -0
- package/dist/commands/service/logs.d.ts +18 -0
- package/dist/commands/service/logs.js +53 -0
- package/dist/commands/service/ls.d.ts +13 -0
- package/dist/commands/service/ls.js +48 -0
- package/dist/commands/service/propose.d.ts +34 -0
- package/dist/commands/service/propose.js +113 -0
- package/dist/commands/service/status.d.ts +17 -0
- package/dist/commands/service/status.js +56 -0
- package/dist/commands/spaces/auto-executor/runs.d.ts +13 -0
- package/dist/commands/spaces/auto-executor/runs.js +56 -0
- package/dist/commands/store/governance/artifacts.d.ts +25 -0
- package/dist/commands/store/governance/artifacts.js +55 -0
- package/dist/commands/store/governance/assign.d.ts +16 -0
- package/dist/commands/store/governance/assign.js +54 -0
- package/dist/commands/store/governance/create-license.d.ts +18 -0
- package/dist/commands/store/governance/create-license.js +35 -0
- package/dist/commands/store/governance/install-plan.d.ts +25 -0
- package/dist/commands/store/governance/install-plan.js +56 -0
- package/dist/commands/store/governance/license-policy.d.ts +30 -0
- package/dist/commands/store/governance/license-policy.js +69 -0
- package/dist/commands/store/governance/policy.d.ts +25 -0
- package/dist/commands/store/governance/policy.js +65 -0
- package/dist/commands/store/governance/publish-release.d.ts +17 -0
- package/dist/commands/store/governance/publish-release.js +34 -0
- package/dist/commands/tasks/deliverable/add.d.ts +15 -0
- package/dist/commands/tasks/deliverable/add.js +174 -0
- package/dist/commands/tasks/deliverable/archive.d.ts +35 -0
- package/dist/commands/tasks/deliverable/archive.js +205 -0
- package/dist/commands/tasks/labels/detach.js +3 -0
- package/dist/commands/tasks/labels/suggest.d.ts +24 -0
- package/dist/commands/tasks/labels/suggest.js +69 -0
- package/dist/commands/tasks/list.d.ts +16 -2
- package/dist/commands/tasks/list.js +100 -24
- package/dist/commands/tasks/show.d.ts +23 -0
- package/dist/commands/tasks/show.js +51 -1
- package/dist/commands/wiki/rm.d.ts +22 -1
- package/dist/commands/wiki/rm.js +52 -3
- package/dist/lib/agentic-stream.js +10 -2
- package/dist/lib/balance.d.ts +6 -1
- package/dist/lib/balance.js +15 -0
- package/dist/lib/commerce-command.d.ts +48 -0
- package/dist/lib/commerce-command.js +70 -0
- package/dist/lib/commerce.d.ts +93 -0
- package/dist/lib/commerce.js +129 -0
- package/dist/lib/commitment-product.js +1 -1
- package/dist/lib/commitments.d.ts +202 -29
- package/dist/lib/commitments.js +300 -33
- package/dist/lib/dedicated-lease-command.js +10 -0
- package/dist/lib/dedicated-machines.d.ts +37 -0
- package/dist/lib/dedicated-machines.js +47 -0
- package/dist/lib/dedicated-service-command.d.ts +60 -0
- package/dist/lib/dedicated-service-command.js +182 -0
- package/dist/lib/dedicated-service.d.ts +342 -0
- package/dist/lib/dedicated-service.js +741 -0
- package/dist/lib/dedicated-ssh.d.ts +136 -0
- package/dist/lib/dedicated-ssh.js +387 -0
- package/dist/lib/delegated-cli.js +51 -13
- package/dist/lib/enterprise-commerce.d.ts +67 -0
- package/dist/lib/enterprise-commerce.js +112 -0
- package/dist/lib/enterprise-external-configuration.d.ts +60 -0
- package/dist/lib/enterprise-external-configuration.js +58 -0
- package/dist/lib/first-party-harness.js +17 -3
- package/dist/lib/governed-store.d.ts +110 -0
- package/dist/lib/governed-store.js +79 -0
- package/dist/lib/guest-service-command.d.ts +16 -0
- package/dist/lib/guest-service-command.js +32 -0
- package/dist/lib/guest-service.d.ts +67 -0
- package/dist/lib/guest-service.js +112 -0
- package/dist/lib/prompt.d.ts +1 -0
- package/dist/lib/prompt.js +1 -0
- package/dist/lib/task-asset-upload.d.ts +20 -0
- package/dist/lib/task-asset-upload.js +30 -8
- package/dist/lib/task-extras.d.ts +23 -0
- package/dist/lib/task-extras.js +6 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.d.ts +9 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonScopes.js +10 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +6 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.d.ts +16 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +21 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/spawnEnv.js +24 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.d.ts +9 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonScopes.js +10 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.d.ts +16 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +20 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/spawnEnv.js +24 -2
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +5060 -4827
- package/oclif.manifest.json +37416 -31416
- package/package.json +43 -1
|
@@ -29,28 +29,34 @@
|
|
|
29
29
|
* never rename in place.
|
|
30
30
|
*/
|
|
31
31
|
/**
|
|
32
|
-
* The canonical daemon scope vocabulary.
|
|
32
|
+
* The canonical daemon scope vocabulary. Seven strings, append-only.
|
|
33
33
|
*
|
|
34
34
|
* - `daemon:tools:bash` — bash tool execution
|
|
35
35
|
* - `daemon:tools:fs:read` — Read tool (file read)
|
|
36
36
|
* - `daemon:tools:fs:write` — Write + Edit tools (file mutation)
|
|
37
37
|
* - `daemon:browser:cdp` — browser automation via CDP (reserved)
|
|
38
|
+
* - `daemon:native-ui:control` — native app GUI control via the helper
|
|
38
39
|
* - `daemon:session:replay` — `daemon:session:replay` socket event
|
|
39
40
|
* - `daemon:offline-queue` — daemon-initiated offline queue
|
|
40
41
|
*
|
|
41
42
|
* Order is the consent-screen render order: tools-first, I/O second,
|
|
42
43
|
* control-flow last.
|
|
44
|
+
*
|
|
45
|
+
* `daemon:native-ui:control` is deliberately NOT folded into
|
|
46
|
+
* `daemon:tools:bash`: a token minted to run shell commands must not
|
|
47
|
+
* thereby be able to click around the user's desktop (OSK-11009).
|
|
43
48
|
*/
|
|
44
49
|
export const SCOPES = Object.freeze({
|
|
45
50
|
TOOLS_BASH: 'daemon:tools:bash',
|
|
46
51
|
TOOLS_FS_READ: 'daemon:tools:fs:read',
|
|
47
52
|
TOOLS_FS_WRITE: 'daemon:tools:fs:write',
|
|
48
53
|
BROWSER_CDP: 'daemon:browser:cdp',
|
|
54
|
+
NATIVE_UI_CONTROL: 'daemon:native-ui:control',
|
|
49
55
|
SESSION_REPLAY: 'daemon:session:replay',
|
|
50
56
|
OFFLINE_QUEUE: 'daemon:offline-queue',
|
|
51
57
|
});
|
|
52
58
|
/**
|
|
53
|
-
* The
|
|
59
|
+
* The seven daemon scopes in canonical order. Frozen so consumers can
|
|
54
60
|
* pass it directly to OAuth `scope` parameters without defensive
|
|
55
61
|
* copies.
|
|
56
62
|
*/
|
|
@@ -59,6 +65,7 @@ export const ALL_DAEMON_SCOPES = Object.freeze([
|
|
|
59
65
|
SCOPES.TOOLS_FS_READ,
|
|
60
66
|
SCOPES.TOOLS_FS_WRITE,
|
|
61
67
|
SCOPES.BROWSER_CDP,
|
|
68
|
+
SCOPES.NATIVE_UI_CONTROL,
|
|
62
69
|
SCOPES.SESSION_REPLAY,
|
|
63
70
|
SCOPES.OFFLINE_QUEUE,
|
|
64
71
|
]);
|
|
@@ -72,7 +79,7 @@ export function isDaemonScope(s) {
|
|
|
72
79
|
}
|
|
73
80
|
/**
|
|
74
81
|
* `cli` — REST-only sign-in grant for first-party CLI clients. Peer
|
|
75
|
-
* to the
|
|
82
|
+
* to the daemon scopes; lives on `OAuthClient.allowedScopes` for
|
|
76
83
|
* the `oversky-cli` client. See the data-schemas canonical for the
|
|
77
84
|
* full reasoning behind keeping this OUT of `ALL_DAEMON_SCOPES` (the
|
|
78
85
|
* grandfather sentinel `expandScopes(undefined)` would over-grant).
|
|
@@ -11,7 +11,7 @@ export { configureAuthCore, getAuthLogger, getAuthConfigDir, getAuthKillSwitches
|
|
|
11
11
|
export { PermanentAuthFailure, TransientAuthFailure, type PermanentAuthReason, type ReauthState, type TokenPair, } from './types.js';
|
|
12
12
|
export { decodeJwtExpiry, decodeJwtPayload } from './jwtUtils.js';
|
|
13
13
|
export { isAuthExpiredSseEvent, handleMidStreamAuthExpiry, type ParsedSseLike, type AuthExpiredCallbacks, type HandleMidStreamAuthExpiryResult, } from './authExpiredDetector.js';
|
|
14
|
-
export { formatReauthMessage, EXIT_NEEDS_REAUTH, type AuthFailureReason } from './messages.js';
|
|
14
|
+
export { formatReauthMessage, reauthCommand, EXIT_NEEDS_REAUTH, type AuthFailureReason, } from './messages.js';
|
|
15
15
|
export { classifyRefreshResponse, type RefreshResponseShape, type ClassifiedRefreshResult, type ClassifiedRefreshSuccess, type ClassifiedRefreshFailure, } from './refreshClassification.js';
|
|
16
16
|
export { refreshDaemonToken, revokeDaemonRefreshSession, withAuthLock, persistReauthState, needsReauthState, clearReauthState, installLockExitHandlers, __refreshDiagnostics, __resetUnknown401StreaksForTest, UNKNOWN_401_BUDGET, } from './refresh.js';
|
|
17
17
|
export { createRefreshScheduler, type RefreshScheduler, type RefreshSchedulerOptions, } from './refreshScheduler.js';
|
|
@@ -23,7 +23,7 @@ export { decodeJwtExpiry, decodeJwtPayload } from './jwtUtils.js';
|
|
|
23
23
|
// header.
|
|
24
24
|
export { isAuthExpiredSseEvent, handleMidStreamAuthExpiry, } from './authExpiredDetector.js';
|
|
25
25
|
// Reauth messaging
|
|
26
|
-
export { formatReauthMessage, EXIT_NEEDS_REAUTH } from './messages.js';
|
|
26
|
+
export { formatReauthMessage, reauthCommand, EXIT_NEEDS_REAUTH, } from './messages.js';
|
|
27
27
|
// Pure HTTP→{Permanent, Transient, Success} response classification —
|
|
28
28
|
// exposed so RN-side clients can apply the same mapping daemon uses.
|
|
29
29
|
export { classifyRefreshResponse, } from './refreshClassification.js';
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
export type AuthFailureReason = 'REFRESH_INVALID' | 'REFRESH_REUSED' | 'REFRESH_EXPIRED' | 'SESSION_REVOKED' | 'TOKEN_EXPIRED' | 'TOKEN_INVALID' | 'UNKNOWN_401' | 'UNKNOWN';
|
|
2
|
+
/**
|
|
3
|
+
* The command that recovers this process from a re-auth latch.
|
|
4
|
+
*
|
|
5
|
+
* ONE function owns this, because the answer is printed twice in the same
|
|
6
|
+
* millisecond — once in the human block below and once on the machine-readable
|
|
7
|
+
* `[oversky-reauth]` line a log scraper pages on — and the two used to be
|
|
8
|
+
* written independently. They disagreed: the block said `skrrd login --device`
|
|
9
|
+
* while the error line said `skrr login`, naming a different binary and
|
|
10
|
+
* different flags for one action, so an operator reading either one did
|
|
11
|
+
* something the other did not describe (OSK-10224).
|
|
12
|
+
*
|
|
13
|
+
* The binary is whatever the consumer registered with
|
|
14
|
+
* `configureAuthCore({ binaryName })` — the binary the user actually typed —
|
|
15
|
+
* and `--device` is added only when there is no TTY to open a browser from.
|
|
16
|
+
*/
|
|
17
|
+
export declare function reauthCommand(): string;
|
|
2
18
|
export declare function formatReauthMessage(reason: AuthFailureReason | string): string;
|
|
3
19
|
/**
|
|
4
20
|
* Exit code for "permanent auth failure during initial connect" — picked to
|
|
@@ -17,17 +17,33 @@ const REASON_HUMAN = {
|
|
|
17
17
|
UNKNOWN_401: 'skrr needs you to sign in again.',
|
|
18
18
|
UNKNOWN: 'skrr needs you to sign in again.',
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* The command that recovers this process from a re-auth latch.
|
|
22
|
+
*
|
|
23
|
+
* ONE function owns this, because the answer is printed twice in the same
|
|
24
|
+
* millisecond — once in the human block below and once on the machine-readable
|
|
25
|
+
* `[oversky-reauth]` line a log scraper pages on — and the two used to be
|
|
26
|
+
* written independently. They disagreed: the block said `skrrd login --device`
|
|
27
|
+
* while the error line said `skrr login`, naming a different binary and
|
|
28
|
+
* different flags for one action, so an operator reading either one did
|
|
29
|
+
* something the other did not describe (OSK-10224).
|
|
30
|
+
*
|
|
31
|
+
* The binary is whatever the consumer registered with
|
|
32
|
+
* `configureAuthCore({ binaryName })` — the binary the user actually typed —
|
|
33
|
+
* and `--device` is added only when there is no TTY to open a browser from.
|
|
34
|
+
*/
|
|
35
|
+
export function reauthCommand() {
|
|
36
|
+
const bin = getAuthBinaryName();
|
|
37
|
+
return process.stdout.isTTY ? `${bin} login` : `${bin} login --device`;
|
|
38
|
+
}
|
|
20
39
|
export function formatReauthMessage(reason) {
|
|
21
40
|
const norm = REASON_HUMAN[reason] || REASON_HUMAN.UNKNOWN;
|
|
22
|
-
const isHeadless = !process.stdout.isTTY;
|
|
23
|
-
const bin = getAuthBinaryName();
|
|
24
|
-
const cmd = isHeadless ? `${bin} login --device` : `${bin} login`;
|
|
25
41
|
return [
|
|
26
42
|
'',
|
|
27
43
|
'skrr cannot connect — re-authentication required.',
|
|
28
44
|
` Reason: ${norm}`,
|
|
29
45
|
'',
|
|
30
|
-
` To continue, run: ${
|
|
46
|
+
` To continue, run: ${reauthCommand()}`,
|
|
31
47
|
'',
|
|
32
48
|
].join('\n');
|
|
33
49
|
}
|
|
@@ -75,7 +75,7 @@ export declare const SENSITIVE_ENV_SUFFIXES: readonly string[];
|
|
|
75
75
|
* `SECRETARY` untouched.
|
|
76
76
|
*/
|
|
77
77
|
export declare const SENSITIVE_ENV_NAME_TOKENS: readonly string[];
|
|
78
|
-
/** Specific
|
|
78
|
+
/** Specific names to keep — the prefix sweeps are broad on purpose. */
|
|
79
79
|
export declare const SENSITIVE_ENV_PREFIX_EXCEPTIONS: ReadonlySet<string>;
|
|
80
80
|
/**
|
|
81
81
|
* Build a sanitized snapshot of the parent's own env for a spawned
|
|
@@ -57,6 +57,9 @@
|
|
|
57
57
|
export const SENSITIVE_ENV_VARS = new Set([
|
|
58
58
|
'CLAUDE_CODE_OAUTH_TOKEN',
|
|
59
59
|
'OVERSKY_TOKEN',
|
|
60
|
+
// The renamed credential alias (cli/src/lib/config.ts honors both spellings).
|
|
61
|
+
// Same double coverage as OVERSKY_TOKEN — name AND the SKRR_ prefix below.
|
|
62
|
+
'SKRR_TOKEN',
|
|
60
63
|
'AWS_ACCESS_KEY_ID',
|
|
61
64
|
'AWS_SECRET_ACCESS_KEY',
|
|
62
65
|
'AWS_SESSION_TOKEN',
|
|
@@ -87,7 +90,16 @@ export const SENSITIVE_ENV_VARS = new Set([
|
|
|
87
90
|
'LD_PRELOAD',
|
|
88
91
|
]);
|
|
89
92
|
/** Variable name prefixes that should be stripped (catches families like AWS_*). */
|
|
90
|
-
export const SENSITIVE_ENV_PREFIXES = [
|
|
93
|
+
export const SENSITIVE_ENV_PREFIXES = [
|
|
94
|
+
'AWS_',
|
|
95
|
+
'OVERSKY_',
|
|
96
|
+
// The renamed product namespace: SKRR_TOKEN, SKRR_REFRESH_TOKEN, the
|
|
97
|
+
// session-authority aliases (SKRR_SESSION_*, SKRR_BASE_URL), and the
|
|
98
|
+
// daemon's control-plane identity (SKRR_MACHINE_UUID, SKRR_LEASE_GENERATION)
|
|
99
|
+
// all carry authority a model-driven child must not inherit. Non-secret
|
|
100
|
+
// lane essentials live in SENSITIVE_ENV_PREFIX_EXCEPTIONS below.
|
|
101
|
+
'SKRR_',
|
|
102
|
+
];
|
|
91
103
|
/**
|
|
92
104
|
* Credential-shaped suffixes are also forbidden. A fixed provider list is
|
|
93
105
|
* never complete: a newly configured provider would otherwise leak its key
|
|
@@ -116,7 +128,7 @@ export const SENSITIVE_ENV_SUFFIXES = [
|
|
|
116
128
|
* `SECRETARY` untouched.
|
|
117
129
|
*/
|
|
118
130
|
export const SENSITIVE_ENV_NAME_TOKENS = ['SECRET'];
|
|
119
|
-
/** Specific
|
|
131
|
+
/** Specific names to keep — the prefix sweeps are broad on purpose. */
|
|
120
132
|
export const SENSITIVE_ENV_PREFIX_EXCEPTIONS = new Set([
|
|
121
133
|
// Headless flag is read by spawned tools to know they're inside the daemon —
|
|
122
134
|
// not a secret. Add more here if a tool legitimately needs an OVERSKY_ var.
|
|
@@ -126,6 +138,16 @@ export const SENSITIVE_ENV_PREFIX_EXCEPTIONS = new Set([
|
|
|
126
138
|
// know they're inside a supervised daemon on Linux/Windows in addition
|
|
127
139
|
// to macOS launchd. Not a secret.
|
|
128
140
|
'OVERSKY_SUPERVISOR',
|
|
141
|
+
// A deployment URL, not a credential. The rename to SKRR_SERVER_URL was
|
|
142
|
+
// chosen precisely because it survives the sanitizer
|
|
143
|
+
// (daemon/src/dedicated-tenant-env.ts), so a spawned lane's `skrr` reaches
|
|
144
|
+
// the deployment this machine is registered with.
|
|
145
|
+
'SKRR_SERVER_URL',
|
|
146
|
+
// The Dedicated Runtime workload marker the exec wrapper stamps into every
|
|
147
|
+
// tenant lane; grandchildren spawned from a lane (e.g. `skrr code` → the
|
|
148
|
+
// engine) must keep it to detect they already run as the workload uid. Not
|
|
149
|
+
// a secret — it authorizes nothing without the matching real uid.
|
|
150
|
+
'SKRR_WORKLOAD_UID',
|
|
129
151
|
]);
|
|
130
152
|
/**
|
|
131
153
|
* Build a sanitized snapshot of the parent's own env for a spawned
|