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
1 change: 0 additions & 1 deletion packages/cli/src/activation-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const ACTIVATION_STIMULUS_TYPES = new Set(['message', 'schedule', 'system']);

export type MakaActivationStatus = 'completed' | 'blocked' | 'retryable_failure' | 'fatal_failure';

export type MakaActivationBlockedReason = 'permission_denied' | 'permission_required';
export type MakaActivationRequiredAction = 'grant_permission' | 'retry_activation';

export interface MakaActivationOptions {
Expand Down
4 changes: 0 additions & 4 deletions packages/cli/src/runtime-host-service-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1237,10 +1237,6 @@ async function normalizeStateRoot(requestedRoot: string): Promise<string> {
}
}

export async function resolveRuntimeHostManagedStateRoot(requestedRoot: string): Promise<string> {
return normalizeStateRoot(requestedRoot);
}

async function normalizeProjectDirectoryRoots(
roots: readonly { readonly label: string; readonly path: string }[],
): Promise<readonly { readonly label: string; readonly path: string }[]> {
Expand Down
4 changes: 0 additions & 4 deletions packages/cli/src/workspace-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ export {
resolveMakaClientDataRoot,
resolveMakaDataRoots,
resolveMakaWorkspaceRoot,
type DeriveMakaDataRootsInput,
type MakaDataRoots,
type ResolveMakaClientDataRootInput,
type ResolveMakaWorkspaceRootInput,
} from '@maka/storage/workspace-root';
1 change: 0 additions & 1 deletion packages/core/src/computer-use.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export interface ComputerUseBoundAction extends ComputerUseFrameIdentity {

export const CU_ACTION_TYPES = ['screenshot', 'type', 'key', 'wait'] as const;

export const COMPUTER_USE_ACTION_TYPES = CU_ACTION_TYPES;
export type CuActionType = (typeof CU_ACTION_TYPES)[number];

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"epoch": 133,
"files": ["packages/runtime-host/src/protocol/project-catalog.ts"],
"reason": "Unexports two path-limit constants that are referenced only inside project-catalog.ts itself; no wire codec, frame, or error-code shape changes and no consumer imports either name"
}
1 change: 0 additions & 1 deletion packages/runtime-host/src/peer-mesh/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const PEER_MESH_MAX_MEMBERS = 64;
export const PEER_MESH_MAX_MESHES = 16;
export const PEER_MESH_MAX_PENDING_INVITATIONS = 32;
export const PEER_MESH_MAX_INVITATION_RECORDS = PEER_MESH_MAX_PENDING_INVITATIONS * 3;
export const PEER_MESH_MAX_ROUTE_HINTS = 16;
export const PEER_MESH_MAX_TRANSIT_RELAY_ADDRESSES = 256;
export const PEER_MESH_MAX_TRANSIT_ADDRESSES_PER_RELAY = 4;
export const PEER_MESH_MEMBER_ADVERTISEMENT_MAX_BYTES = 2 * 1024;
2 changes: 0 additions & 2 deletions packages/runtime-host/src/peer-mesh/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ export {
PEER_MESH_MAX_MEMBERS,
PEER_MESH_MAX_MESHES,
PEER_MESH_MAX_PENDING_INVITATIONS,
PEER_MESH_MAX_ROUTE_HINTS,
PEER_MESH_MAX_TRANSIT_ADDRESSES_PER_RELAY,
PEER_MESH_MAX_TRANSIT_RELAY_ADDRESSES,
PEER_MESH_MEMBER_ADVERTISEMENT_MAX_BYTES,
} from './limits.js';

export interface PeerMeshRosterV1 {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-host/src/protocol/project-catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export const PROJECT_CATALOG_PAGE_MAX_ITEMS = 64;
export const PROJECT_CATALOG_PAGE_MAX_BYTES = 48 * 1024;
export const PROJECT_CATALOG_CURSOR_MAX_BYTES = 128;
export const PROJECT_CATALOG_NAME_MAX_BYTES = 16 * 1024;
export const PROJECT_CATALOG_PATH_MAX_BYTES = 4 * 1024;
const PROJECT_CATALOG_PATH_MAX_BYTES = 4 * 1024;
export const PROJECT_DIRECTORY_PAGE_MAX_ITEMS = 128;
export const PROJECT_DIRECTORY_PAGE_MAX_BYTES = 32 * 1024;
export const PROJECT_DIRECTORY_MAX_ENTRIES = 4_096;
export const PROJECT_DIRECTORY_MAX_ROOTS = 8;
export const PROJECT_DIRECTORY_MAX_SEGMENTS = 64;
export const PROJECT_DIRECTORY_ROOT_LABEL_MAX_BYTES = 128;
export const PROJECT_DIRECTORY_ROOT_PATH_MAX_BYTES = PROJECT_CATALOG_PATH_MAX_BYTES;
const PROJECT_DIRECTORY_ROOT_PATH_MAX_BYTES = PROJECT_CATALOG_PATH_MAX_BYTES;
export const PROJECT_DIRECTORY_SEGMENT_MAX_BYTES = 255;

const PROJECT_DIRECTORY_ROOT_TEXT_ENCODER = new TextEncoder();
Expand Down
6 changes: 0 additions & 6 deletions packages/runtime-host/src/server/agent-graph-coordinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ export function projectAgentGraphClientSnapshot(
return projectSnapshot(snapshot);
}

export function projectAgentGraphOperatorInspection(
inspection: RuntimeAgentGraphOperatorInspection,
): AgentGraphOperatorInspection {
return projectInspection(inspection);
}

function projectSnapshot(snapshot: RuntimeAgentGraphClientSnapshot): AgentGraphClientSnapshot {
const operators = snapshot.operators.slice(0, AGENT_GRAPH_MAX_OPERATORS).map(projectOperator);
const visibleOperatorIds = new Set(operators.map((operator) => operator.operatorId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import {
import {
ClientCapabilityInvocationBroker,
ClientCapabilityInvocationError,
type ClientCapabilityInvocationFailure,
} from './client-capability-invocation-broker.js';
import type {
ClientCapabilityOperationHandlerMap,
Expand Down Expand Up @@ -78,7 +77,6 @@ const DESKTOP_BROWSER_TOOLS = new Set([
const DESKTOP_SETTINGS_TOOLS = new Set(['MakaClientSettingsGet', 'MakaClientSettingsUpdate']);

export { ClientCapabilityInvocationError };
export type { ClientCapabilityInvocationFailure };

export interface ClientCapabilitySnapshot {
readonly registrationIds: readonly string[];
Expand Down
2 changes: 0 additions & 2 deletions packages/runtime-host/src/server/host-kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ interface RuntimeHostKernelCommonOptions {
};
}

export type RuntimeHostLifecycleMode = 'ephemeral' | 'service';

export type RuntimeHostKernelOptions = RuntimeHostKernelCommonOptions &
(
| {
Expand Down
2 changes: 0 additions & 2 deletions packages/runtime/src/__tests__/provider-contract-matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ export const PROVIDER_CONTRACT_DIMENSIONS = [

export type ProviderContractDimension = (typeof PROVIDER_CONTRACT_DIMENSIONS)[number];

export type ProviderContractCellState = 'generated' | 'override' | 'not-applicable';

/** The four request wires a generated cell can be executed against. */
export type ProviderContractWire =
| 'openai-chat'
Expand Down
21 changes: 0 additions & 21 deletions packages/runtime/src/agent-run-inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,27 +162,6 @@ export async function inspectAgentRunReadModel(
};
}

export async function inspectSessionRunReadModels(
runStore: AgentRunInspectReader,
runtimeEventStore: RuntimeEventInspectReader,
sessionId: string,
options: Pick<InspectAgentRunOptions, 'isFatalReadError'> = {},
): Promise<AgentRunInspectModel[]> {
const invocations = await runtimeEventStore.listSessionInvocations(sessionId);
const models: AgentRunInspectModel[] = [];
for (const invocation of invocations) {
models.push(
await inspectAgentRunReadModel(runStore, runtimeEventStore, {
sessionId,
runId: invocation.runId,
invocation,
...(options.isFatalReadError ? { isFatalReadError: options.isFatalReadError } : {}),
}),
);
}
return models;
}

// A run is not its invocation: a continuation is a new run on the invocation it
// resumes. This reader is addressed by run, so it looks the invocation up by the
// id it was actually given.
Expand Down
40 changes: 0 additions & 40 deletions packages/runtime/src/compaction-boundary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,46 +39,6 @@ export interface CompactionCoverage {
providerMessageSourceIds?: readonly string[];
}

export interface CompactionArchiveRef {
kind: 'toolResult' | 'runtimeEventSource' | 'compactSource';
sessionId?: string;
turnId?: string;
runtimeEventId?: string;
toolCallId?: string;
toolName?: string;
artifactId: string;
bodySha256: string;
originalEstimatedTokens?: number;
originalBytes?: number;
}

export interface CompactionBoundary {
kind: CompactionBoundaryKind;
stage: CompactionStage;
schemaVersion: number;
boundaryId: string;
predecessorBoundaryId?: string;
cumulativeCoverageDigest?: string;
sessionId: string;
createdAt?: number;
highWaterName?: string;
highWaterSeq?: number;
coverage: CompactionCoverage;
preservedAnchor?: {
headProviderMessageSourceIds?: readonly string[];
headRuntimeEventIds?: readonly string[];
tailRuntimeEventIds?: readonly string[];
tailProviderMessageSourceIds?: readonly string[];
tailTurnIds?: readonly string[];
};
archiveRefs?: readonly CompactionArchiveRef[];
sourceHashes?: readonly string[];
renderedText?: string;
estimatedTokens?: number;
validationStatus?: 'valid' | 'invalid' | 'notValidated';
validationReason?: string;
}

export interface CompactionDecision {
stage: CompactionStage;
sourceKind: CompactionSourceKind;
Expand Down
17 changes: 0 additions & 17 deletions packages/runtime/src/context-budget-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,10 @@ export function turnKey(event: RuntimeEvent): string {
return event.turnId || '<unknown-turn>';
}

export function uniqueSorted(values: readonly string[]): string[] {
return [...new Set(values.filter((value) => value.length > 0))].sort();
}

export function sha256(text: string): string {
return createHash('sha256').update(text).digest('hex');
}

export function stableStringify(value: unknown): string {
if (value === undefined) return '';
try {
return JSON.stringify(value) ?? '';
} catch {
return String(value);
}
}

export function finitePositive(value: number | undefined): number | undefined {
return typeof value === 'number' && Number.isFinite(value) && value > 0
? Math.floor(value)
Expand All @@ -76,7 +63,3 @@ export function finitePositive(value: number | undefined): number | undefined {
export function utf8ByteLength(text: string): number {
return Buffer.byteLength(text, 'utf8');
}

export function optionalNonNegativeFiniteNumber(value: unknown): boolean {
return value === undefined || (typeof value === 'number' && Number.isFinite(value) && value >= 0);
}
22 changes: 0 additions & 22 deletions packages/runtime/src/filesystem-authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,6 @@ export interface FilesystemTargetIdentity {
readonly ino: string;
}

/**
* The full target descriptor captured at lock acquisition (the earliest point a
* mutation commits to a path). Modelled as a discriminated union so that
* "the target had no identity to compare" is an explicit `missing` case,
* never an accidentally-absent optional field. A later "skip the identity
* check" change cannot compile without handling the `missing` arm, which is
* what closes the "no identity → CAS passes" regression class.
*
* - `missing`: the path did not exist at capture (a create, or a write to a
* brand-new file). There is no inode to pin; the missing→existing transition
* is detected by `O_EXCL` / `wx` instead.
* - the other variants carry the captured inode, which the worker compares
* against the on-disk inode immediately before mutating.
*/
export type FilesystemTargetDescriptor =
| { readonly enforcementPath: string; readonly targetType: 'missing' }
| {
readonly enforcementPath: string;
readonly targetType: 'file' | 'directory' | 'symlink' | 'other';
readonly identity: FilesystemTargetIdentity;
};

/**
* The outcome a mutation can report. Distinct from "did the tool call succeed"
* — a tool that fails to apply is `rejected`; a tool that may have applied
Expand Down
1 change: 0 additions & 1 deletion packages/runtime/src/memory-extraction-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const memoryProposalItemSchema = z
const canonicalMemoryItemSchema = memoryProposalItemSchema.omit({ evidence: true });

export type MemoryProposalItem = z.infer<typeof memoryProposalItemSchema>;
export type CanonicalMemoryItem = z.infer<typeof canonicalMemoryItemSchema>;

const memoryCanonicalizationSchema = z
.object({
Expand Down
2 changes: 0 additions & 2 deletions packages/runtime/src/model-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export type {
ModelStepOutcome,
ModelFinishReason,
ModelFailure,
ModelFailureKind,
ModelRequestMetadata,
ModelToolSet,
} from './model-protocol.js';

Expand Down
Loading
Loading