跳到內容

serve

本頁內容尚未翻譯。

const serve: (...args: [socket: string, service: {
apply: (request: {
expected: string;
overrideRevocations?: boolean;
target: string;
}) => Effect<Applied, ReleaseError>;
approvals: Effect<readonly {
assignment: {
artifact: {
digest: string;
package: string;
};
contractEntry?: string;
entry: string;
grants: readonly (
| {
_tag: "Http";
credential?: ... | ...;
id: string;
origin: string;
}
| {
_tag: "Files";
directory: string;
id: string;
})[];
tier: "own" | "trusted" | "untrusted";
};
policyVersion: string;
projections: readonly {
operation: string;
projection: string;
service: string;
value: Json;
view: string;
}[];
}[]>;
approve: (request: {
expected: {
assignment: {
artifact: {
digest: string;
package: string;
};
contractEntry?: string;
entry: string;
grants: readonly (
| {
_tag: "Http";
credential?: ... | ...;
id: string;
origin: string;
}
| {
_tag: "Files";
directory: string;
id: string;
})[];
tier: "own" | "trusted" | "untrusted";
};
policyVersion: string;
projections: readonly {
operation: string;
projection: string;
service: string;
value: Json;
view: string;
}[];
};
overrideRevocations?: boolean;
who: string;
}) => Effect<{
at: number;
overrideRevocations: boolean;
statement: {
assignment: {
artifact: {
digest: string;
package: string;
};
contractEntry?: string;
entry: string;
grants: readonly (
| {
_tag: ...;
credential?: ...;
id: ...;
origin: ...;
}
| {
_tag: ...;
directory: ...;
id: ...;
})[];
tier: "own" | "trusted" | "untrusted";
};
policyVersion: string;
projections: readonly {
operation: string;
projection: string;
service: string;
value: Json;
view: string;
}[];
};
who: string;
}, ReleaseError>;
build: (request: {
file: string;
metadataOnly?: boolean;
references: readonly string[];
revocations: readonly string[];
}) => Effect<string, ReleaseError>;
history: Effect<readonly {
approval?: {
at: number;
overrideRevocations: boolean;
statement: {
assignment: {
artifact: {
digest: ...;
package: ...;
};
contractEntry?: ... | ...;
entry: string;
grants: readonly ...[];
tier: ... | ... | ...;
};
policyVersion: string;
projections: readonly {
operation: ...;
projection: ...;
service: ...;
value: ...;
view: ...;
}[];
};
who: string;
};
at?: number;
current: string;
entries?: readonly string[];
entry?: string;
kind: | "Bootstrap"
| "Startup"
| "Approval"
| "Projection"
| "Revocation"
| "Intent"
| "Outcome"
| "Compensation"
| "Commit"
| "Rejected";
outcome?: {
_tag: "Accepted" | "Aborted" | "Recovered" | "RecoveryFailed" | "Stuck";
evidence: readonly {
attempt: number;
hasCause: boolean;
phase: string;
termination?: ... | ...;
}[];
phase: string;
reason?: string;
};
overrideRevocations?: boolean;
projection?: {
after: {
projection: string;
values: readonly {
operation: ...;
service: ...;
value: ...;
}[];
view: string;
};
before: {
projection: string;
values: readonly {
operation: ...;
service: ...;
value: ...;
}[];
view: string;
};
};
revocations?: readonly string[];
target: string;
who?: string;
}[]>;
observe: Effect<{
current: string;
previous: string | null;
revocations: readonly string[];
state: "Ready" | "Applying" | "Degraded";
}>;
plan: (target: string) => Effect<{
changes: readonly {
entry: string;
reasons: readonly ("config" | "code" | "added" | "removed")[];
}[];
current: string;
diagnostics: readonly {
cause?: Cause<unknown>;
code: string;
entry: string;
message: string;
reference?: string;
}[];
target: string;
}, ReleaseError>;
revoke: (references: readonly string[], who: string) => Effect<void, ReleaseError>;
rollback: (expected: string, overrideRevocations?: boolean) => Effect<Applied, ReleaseError>;
}]) => Effect;

Defined in: Control.ts:136

Scoped Unix socket. Directory permissions are the operator’s authentication boundary.

Parameter Type
…args [socket: string, service: { apply: (request: { expected: string; overrideRevocations?: boolean; target: string; }) => Effect<Applied, ReleaseError>; approvals: Effect<readonly { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }[]>; approve: (request: { expected: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; overrideRevocations?: boolean; who: string; }) => Effect<{ at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: …; credential?: …; id: …; origin: …; } | { _tag: …; directory: …; id: …; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; who: string; }, ReleaseError>; build: (request: { file: string; metadataOnly?: boolean; references: readonly string[]; revocations: readonly string[]; }) => Effect<string, ReleaseError>; history: Effect<readonly { approval?: { at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: …; package: …; }; contractEntry?: … | …; entry: string; grants: readonly …[]; tier: … | … | …; }; policyVersion: string; projections: readonly { operation: …; projection: …; service: …; value: …; view: …; }[]; }; who: string; }; at?: number; current: string; entries?: readonly string[]; entry?: string; kind: | "Bootstrap" | "Startup" | "Approval" | "Projection" | "Revocation" | "Intent" | "Outcome" | "Compensation" | "Commit" | "Rejected"; outcome?: { _tag: "Accepted" | "Aborted" | "Recovered" | "RecoveryFailed" | "Stuck"; evidence: readonly { attempt: number; hasCause: boolean; phase: string; termination?: … | …; }[]; phase: string; reason?: string; }; overrideRevocations?: boolean; projection?: { after: { projection: string; values: readonly { operation: …; service: …; value: …; }[]; view: string; }; before: { projection: string; values: readonly { operation: …; service: …; value: …; }[]; view: string; }; }; revocations?: readonly string[]; target: string; who?: string; }[]>; observe: Effect<{ current: string; previous: string | null; revocations: readonly string[]; state: "Ready" | "Applying" | "Degraded"; }>; plan: (target: string) => Effect<{ changes: readonly { entry: string; reasons: readonly ("config" | "code" | "added" | "removed")[]; }[]; current: string; diagnostics: readonly { cause?: Cause<unknown>; code: string; entry: string; message: string; reference?: string; }[]; target: string; }, ReleaseError>; revoke: (references: readonly string[], who: string) => Effect<void, ReleaseError>; rollback: (expected: string, overrideRevocations?: boolean) => Effect<Applied, ReleaseError>; }]

Effect