@sema-agent/core
Version:
Stateless, task-oriented AI agent core
14 lines (13 loc) • 1.16 kB
TypeScript
import { type CallShellOf } from "./call-shell.js";
import { type Egress } from "./untrusted-egress.js";
/** A SHORT, SECRET-SCRUBBED primary-arg summary. Abbreviation REDUCES the surface; the `same-principal` tier's pass
* is the leak boundary, on whichever field the summary came from (the value is PERSISTED + SSE-forwarded and may be
* read by a platform operator in a multi-tenant deployment). Rules:
* • command → the command NAME: the first segment's written command word past its control words and the
* assignments bash strips (bail to `undefined` on an unparseable text, a lone assignment, an assignment-shaped
* or computed command word; basename a path-form command; `+ …` if more follows).
* • file path → BASENAME only (no host directory layout).
* • url → `new URL` origin+pathname (drops `user:pass@` userinfo + query/fragment).
* • else → pattern/query/description, else the first string field whose name is no credential name.
* Then the tier's pass, then a code-point cut. */
export declare function primaryActivityArg(call: CallShellOf, args: unknown): Egress<"same-principal"> | undefined;