Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/agents/cli-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Thread a flag only through the layers that consume it:
interface exposes it.
6. `src/client/client-normalizers.ts`: update daemon flag normalization only when the request still
needs a public-to-internal translation.
7. `src/daemon/context.ts` and `src/core/dispatch-context.ts`: add the field only when it flows into
7. `src/daemon/context.ts` and `src/daemon/dispatch-context.ts`: add the field only when it flows into
platform dispatch.
8. Handler/platform modules: thread the option only after the command surface, grammar, and
projection prove it belongs there.
Expand Down
4 changes: 4 additions & 0 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@
"types": "./src/daemon-http.ts",
"default": "./src/daemon-http.ts"
},
"./deploy-result-target": {
"types": "./src/deploy-result-target.ts",
"default": "./src/deploy-result-target.ts"
},
"./device": {
"types": "./src/facades/device.ts",
"default": "./src/facades/device.ts"
Expand Down
12 changes: 12 additions & 0 deletions packages/host-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"types": "./src/diagnostics.ts",
"default": "./src/diagnostics.ts"
},
"./doctor-lines": {
"types": "./src/doctor-lines.ts",
"default": "./src/doctor-lines.ts"
},
"./file": {
"types": "./src/file.ts",
"default": "./src/file.ts"
Expand All @@ -48,6 +52,10 @@
"types": "./src/host-file.ts",
"default": "./src/host-file.ts"
},
"./interaction-outcome": {
"types": "./src/interaction-outcome.ts",
"default": "./src/interaction-outcome.ts"
},
"./process": {
"types": "./src/process.ts",
"default": "./src/process.ts"
Expand All @@ -72,6 +80,10 @@
"types": "./src/session-paths.ts",
"default": "./src/session-paths.ts"
},
"./status-markers": {
"types": "./src/status-markers.ts",
"default": "./src/status-markers.ts"
},
"./transport": {
"types": "./src/transport.ts",
"default": "./src/transport.ts"
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions scripts/layering/contracts-exports.snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@agent-device/contracts/command",
"@agent-device/contracts/command-platform-execution",
"@agent-device/contracts/daemon-http",
"@agent-device/contracts/deploy-result-target",
"@agent-device/contracts/device",
"@agent-device/contracts/device-boot",
"@agent-device/contracts/device-readiness-runtime",
Expand Down
2 changes: 1 addition & 1 deletion scripts/layering/contracts-implementation-policy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test('network traffic vocabulary cannot grow parser implementation inside contra
test('contracts rejects mutable interaction-outcome lifecycle', () => {
assert.match(
messages('const targets = new WeakMap();', 'packages/contracts/src/interaction-outcome.ts')[0]!,
/src\/core/,
/host-kit\/interaction-outcome/,
);
});

Expand Down
2 changes: 1 addition & 1 deletion scripts/layering/contracts-implementation-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function contractsImplementationAuthorityViolations(
violation(
file.path,
1,
'contracts may not own mutable interaction-outcome lifecycle; that WeakMap identity map belongs in src/core',
'contracts may not own mutable interaction-outcome lifecycle; that WeakMap identity map lives in @agent-device/host-kit/interaction-outcome',
),
);
}
Expand Down
3 changes: 3 additions & 0 deletions scripts/layering/package-boundaries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,17 @@ test('the real tree parses, declares, and passes R11', () => {
'@agent-device/host-kit/code-signature-cache',
'@agent-device/host-kit/command',
'@agent-device/host-kit/diagnostics',
'@agent-device/host-kit/doctor-lines',
'@agent-device/host-kit/file',
'@agent-device/host-kit/host-file',
'@agent-device/host-kit/interaction-outcome',
'@agent-device/host-kit/process',
'@agent-device/host-kit/project-runtime',
'@agent-device/host-kit/request',
'@agent-device/host-kit/retry',
'@agent-device/host-kit/runtime-transport-hints',
'@agent-device/host-kit/session-paths',
'@agent-device/host-kit/status-markers',
'@agent-device/host-kit/transport',
'@agent-device/host-kit/version',
]);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/replay-test/progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
ReplayTestResult,
ReplayTestStep,
} from './reporters/types.ts';
import { formatCliStatusMarker } from '../../core/status-markers.ts';
import { formatCliStatusMarker } from '@agent-device/host-kit/status-markers';
import { formatDurationSeconds } from './duration-format.ts';
import { colorize, supportsColor } from '../../commands/output/color.ts';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/interaction/runtime/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SELECTOR_PIPELINE_POLICIES } from '@agent-device/selectors/selector-pip
import type { Point } from '@agent-device/kernel/snapshot';
import type { AgentDeviceRuntime, CommandContext } from '../../../runtime-contract.ts';
import { isFillableType } from '@agent-device/contracts/snapshot';
import { attachResolvedInteractionTarget } from '../../../core/interaction-outcome.ts';
import { attachResolvedInteractionTarget } from '@agent-device/host-kit/interaction-outcome';
import { toBackendContext } from '../../runtime-common.ts';
import { toBackendResult, type RuntimeCommand } from '../../runtime-types.ts';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/management/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export async function doctorCliOutput(
progress?: CommandProgressState,
): Promise<CliOutput> {
const { formatDoctorCheckDetailLines, formatDoctorCheckSummaryLine } =
await import('../../core/doctor-output.ts');
await import('@agent-device/host-kit/doctor-lines');
const data = result as Record<string, unknown>;
const status = typeof data.status === 'string' ? data.status : 'unknown';
const lines = [`Doctor: ${status}`];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/output/result-serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { successText, withSuccessText } from '@agent-device/kernel/success-text'
import {
resolveDeployResultTarget,
resolveInstallFromSourceResultTarget,
} from '../../core/deploy-result-target.ts';
} from '@agent-device/contracts/deploy-result-target';

function serializeSessionDevice(
device: AgentDeviceSessionDevice,
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/__tests__/snapshot-runtime-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
} from '@agent-device/kernel/device';
import { applePlugin } from '@agent-device/platform-apple';
import { textSizeSettingPayload } from '@agent-device/contracts/settings';
import { type DispatchContext } from '../../core/dispatch-context.ts';
import { type DispatchContext } from '../dispatch-context.ts';
import { getRequestSignal } from '@agent-device/host-kit/request';
import { isActiveProviderDevice } from '../provider-device-admission.ts';
import type { BindDeviceRuntime, InspectDeviceRuntimeFacts } from '../request-runtime-binding.ts';
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CommandFlags } from '@agent-device/contracts/command';
import { dispatchContextFlags, type DispatchContext } from '../core/dispatch-context.ts';
import { dispatchContextFlags, type DispatchContext } from './dispatch-context.ts';
import { resolveClickButton } from '@agent-device/contracts/click-button';
import {
screenshotFlagsFromOptions,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/daemon/handlers/session-app-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { SessionStore } from '../session-store.ts';
import type { DaemonRequest, DaemonResponse } from '../daemon-request.ts';
import type { SessionRef, SessionState } from '../session-state.ts';
import { resolvePayloadInput } from '../payload-input.ts';
import { resolveDeployResultTarget } from '../../core/deploy-result-target.ts';
import { resolveDeployResultTarget } from '@agent-device/contracts/deploy-result-target';
import { withSuccessText } from '@agent-device/kernel/success-text';
import { recordSessionAction } from '../session-action-recorder.ts';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/handlers/session-app-source-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { BindDeviceRuntime, InspectDeviceRuntimeFacts } from '../request-ru
import { SessionStore } from '../session-store.ts';
import type { DaemonRequest, DaemonResponse } from '../daemon-request.ts';
import type { SessionState } from '../session-state.ts';
import { resolveInstallFromSourceResultTarget } from '../../core/deploy-result-target.ts';
import { resolveInstallFromSourceResultTarget } from '@agent-device/contracts/deploy-result-target';
import { withSuccessText } from '@agent-device/kernel/success-text';
import { recordSessionAction } from '../session-action-recorder.ts';
import { resolveCommandDevice } from '../session-device-resolution.ts';
Expand Down
2 changes: 1 addition & 1 deletion src/daemon/handlers/session-doctor-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { emitRequestProgress } from '@agent-device/host-kit/request';
import {
formatDoctorCheckDetailLines,
formatDoctorCheckSummaryLine,
} from '../../core/doctor-output.ts';
} from '@agent-device/host-kit/doctor-lines';
import type { DoctorCheck, DoctorStatus } from '@agent-device/contracts/observability';

export function summarizeDoctorStatus(checks: DoctorCheck[]): 'pass' | 'warn' | 'fail' {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
stripInternalInteractionDiagnostics,
transformInteractionResponseData,
type InteractionResponseDataTransformCommand,
} from '../../../core/interaction-response-data-transform.ts';
} from './interaction-response-data-transform.ts';
import { issueSettleRefs } from '../../session-snapshot.ts';
import type { RecordedTargetCapture } from '@agent-device/selectors/target-evidence';
import type { CaptureSnapshotForSession, InteractionRouteInput } from './types.ts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
import type { GestureReferenceFrame } from '@agent-device/contracts/scroll-gesture';
import type { SnapshotState } from '@agent-device/kernel/snapshot';
import { asAppError, normalizeError } from '@agent-device/kernel/errors';
import { readResolvedInteractionTarget } from '../../../core/interaction-outcome.ts';
import { readResolvedInteractionTarget } from '@agent-device/host-kit/interaction-outcome';
import { publishAmbiguousMatchCandidateRefs } from '../../session-snapshot.ts';
import { isSessionRecording } from '../../session-script-publication-capability.ts';
import type { DaemonResponse } from '../../daemon-request.ts';
Expand Down
Loading