physical.CONFIG_FILEconstno test imports itconst CONFIG_FILE: "planning.config.ts"The name of the configuration file.
What the program works on (0037-planning FR-037, FR-045, plan.md Trust): the configuration file read, the store opened and the sources made from the configuration. planning.config.ts is TypeScript the program imports, so it runs with the permissions of the person who runs planctl: it is read only from the root of the repository the run started in and never from a path an argument or an item names; JSON or YAML beside it is not read; it holds no secret; and a configuration the person has not trusted is not run: a trust is a record in the repository's own .git of the SHA-256 of the file the person trusted, given by --trust of the command line and never by a call to the tool server.
import { loadConfig } from "./world.ts";
// const c = await loadConfig("/work/repo", { trust: false });physical.CONFIG_FILEconstno test imports itconst CONFIG_FILE: "planning.config.ts"The name of the configuration file.
physical.LoadProblemtypeno test imports ittype LoadProblem = { readonly code: "E-CONFIG-LOAD" | "E-CONFIG-INVALID" | "E-TRUST"; readonly message: string };Why the configuration could not be used.
physical.loadConfigfunctionno test imports itfunction loadConfig(root: string, options: { readonly trust: boolean; }): Promise<Result<PlanningConfig, LoadProblem>>The configuration of the repository at root, or why it is not used: absent, not trusted, not importable or not valid. trust records the file as trusted (the command line's --trust).
physical.Hosttypeno test imports ittype Host = {
readonly cwd: string;
readonly env: (name: string) => string | undefined;
/** The wall time in milli… (478 characters)type Host = {
readonly cwd: string;
readonly env: (name: string) => string | undefined;
/** The wall time in milliseconds. */
readonly now: () => number;
/** The channel the run comes through: a person's command line or the tool server. */
readonly channel: "cli" | "mcp";
/** The client of a Git host for a repository: the live one reads its token from the environment; a test gives its own. */
readonly githost?: (ref: RepoRef) => GitHostClient | undefined;
};What a run is given from outside.
physical.policyOffunctionno test imports itfunction policyOf(config: PlanningConfig): PolicyThe policy a configuration says.
physical.openPlanningStorefunctionno test imports itfunction openPlanningStore(root: string, config: PlanningConfig): Promise<Result<PlanningStoreBackend, string>>The store of events of the repository, a folder, made where it is not.
physical.openSourcesfunctionno test imports itfunction openSources(root: string, config: PlanningConfig, host: Host): Promise<Result<readonly Source[], string>>The sources a configuration names, made over the repository at root.
physical.agentIdOffunctionno test imports itfunction agentIdOf(env: (name: string) => string | undefined): stringThe agent of an event of the tool server: its id from the environment, agent where there is none.
physical.personOfTextfunctionno test imports itfunction personOfText(text: string | undefined): PersonActor | undefinedThe person a text names, as id or id:Name.
CONFIG_FILEconstno test imports itconst CONFIG_FILE: "planning.config.ts"The name of the configuration file.
LoadProblemtypeno test imports ittype LoadProblem = { readonly code: "E-CONFIG-LOAD" | "E-CONFIG-INVALID" | "E-TRUST"; readonly message: string };Why the configuration could not be used.
loadConfigfunctionno test imports itfunction loadConfig(root: string, options: { readonly trust: boolean; }): Promise<Result<PlanningConfig, LoadProblem>>The configuration of the repository at root, or why it is not used: absent, not trusted, not importable or not valid. trust records the file as trusted (the command line's --trust).
Hosttypeno test imports ittype Host = {
readonly cwd: string;
readonly env: (name: string) => string | undefined;
/** The wall time in milli… (478 characters)type Host = {
readonly cwd: string;
readonly env: (name: string) => string | undefined;
/** The wall time in milliseconds. */
readonly now: () => number;
/** The channel the run comes through: a person's command line or the tool server. */
readonly channel: "cli" | "mcp";
/** The client of a Git host for a repository: the live one reads its token from the environment; a test gives its own. */
readonly githost?: (ref: RepoRef) => GitHostClient | undefined;
};What a run is given from outside.
policyOffunctionno test imports itfunction policyOf(config: PlanningConfig): PolicyThe policy a configuration says.
openPlanningStorefunctionno test imports itfunction openPlanningStore(root: string, config: PlanningConfig): Promise<Result<PlanningStoreBackend, string>>The store of events of the repository, a folder, made where it is not.
openSourcesfunctionno test imports itfunction openSources(root: string, config: PlanningConfig, host: Host): Promise<Result<readonly Source[], string>>The sources a configuration names, made over the repository at root.
agentIdOffunctionno test imports itfunction agentIdOf(env: (name: string) => string | undefined): stringThe agent of an event of the tool server: its id from the environment, agent where there is none.
personOfTextfunctionno test imports itfunction personOfText(text: string | undefined): PersonActor | undefinedThe person a text names, as id or id:Name.