mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
0d4e58914e
Work-in-progress snapshot preserved for the dedicated #2026 PR. NOT for merge as-is: the migration is incomplete (injected-executor ...WithAdb helpers, packages/platform-* host ports, and ~30 test files still assert the legacy ['shell', ...] shape), and a partially enforced seam is exactly what #2026 must avoid landing. Mechanism (complete, green in isolation): - packages/kernel/src/shell-safe.ts: branded ShellSafe plus sh.lit/lits/arg/num/raw, byte-identical to raw argv for safe-charset input (parity test). - runAndroidShell/runAndroidExecOut, runHarmonyShell, runLimrunAndroidShell funnels; a raw shell/exec-out argv is rejected at the adb executor, hdc, and limrun boundaries (catches variable-built argv, which a static gate cannot). - src/platforms/android/__tests__/device-shell-boundary.test.ts: planted-red tests for raw and indirect/variable-built argv, plus a ts-expect-error proving raw strings do not typecheck. - scripts/shell-safe: AST backstop holding sh.raw and ShellSafe casts to sites carrying a shell-safe-approved comment with a reason. Migrated so far: android input-actions/perf*/settings/screenshot/notifications/ permission-grant-state/app-deployment-resolution, all harmonyos, limrun, daemon/android-system-dialog, platform-runtime-runtime-hints. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wb8EuoySL26UsdtCtRj5X8
46 lines
1.2 KiB
JSON
46 lines
1.2 KiB
JSON
{
|
|
"name": "@agent-device/kernel",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Foundational vocabulary for agent-device: errors, device identity, snapshot model, shared contracts. Internal workspace package bundled into the published agent-device artifact.",
|
|
"exports": {
|
|
"./errors": {
|
|
"types": "./src/errors.ts",
|
|
"default": "./src/errors.ts"
|
|
},
|
|
"./device": {
|
|
"types": "./src/device.ts",
|
|
"default": "./src/device.ts"
|
|
},
|
|
"./snapshot": {
|
|
"types": "./src/snapshot.ts",
|
|
"default": "./src/snapshot.ts"
|
|
},
|
|
"./contracts": {
|
|
"types": "./src/contracts.ts",
|
|
"default": "./src/contracts.ts"
|
|
},
|
|
"./collections": {
|
|
"types": "./src/collections.ts",
|
|
"default": "./src/collections.ts"
|
|
},
|
|
"./rect": {
|
|
"types": "./src/rect.ts",
|
|
"default": "./src/rect.ts"
|
|
},
|
|
"./redaction": {
|
|
"types": "./src/redaction.ts",
|
|
"default": "./src/redaction.ts"
|
|
},
|
|
"./shell": {
|
|
"types": "./src/shell-safe.ts",
|
|
"default": "./src/shell-safe.ts"
|
|
},
|
|
"./bounds": {
|
|
"types": "./src/bounds.ts",
|
|
"default": "./src/bounds.ts"
|
|
}
|
|
}
|
|
}
|