@prismshadow/penguin-server · packages/server/src/mechanisms/data-layout.ts:14

DataLayout

interface

DataLayout: the data root's folders, as RootDataLayout builds them.

API

@Interface()
export abstract class DataLayout {
  abstract root(): string;
  abstract projectsDir(): string;
  abstract projectDir(projectId: string): string;
  abstract projectConfigPath(projectId: string): string;
  abstract agentsDir(projectId: string): string;
  abstract agentDir(projectId: string, agentId: string): string;
  abstract tracesDir(projectId: string, agentId: string): string;
  abstract agentStateDir(projectId: string, agentId: string): string;
  abstract agentStateRepoDir(projectId: string, agentId: string): string;
  abstract snapshotsDir(projectId: string, agentId: string): string;
  abstract scratchpadDir(projectId: string, agentId: string): string;
  abstract workspacesDir(projectId: string, agentId: string): string;
  abstract sharedEnvDir(projectId: string, agentId: string): string;
  abstract workbenchCachesDir(projectId: string, agentId: string): string;
  abstract deletingDir(projectId: string): string;
  abstract pluginsDir(): string;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use

Members (16)

root

root(): string

The data root.

@returnsstring

projectsDir

projectsDir(): string

The folder every Project's folder sits in, one per id.

@returnsstring

projectDir

projectDir(projectId: string): string
@paramprojectIdstring
@returnsstring

projectConfigPath

projectConfigPath(projectId: string): string

A Project's config file (.project_config.toml).

@paramprojectIdstring
@returnsstring

agentsDir

agentsDir(projectId: string): string

The folder a Project's Agents sit in, one per id.

@paramprojectIdstring
@returnsstring

agentDir

agentDir(projectId: string, agentId: string): string
@paramprojectIdstring
@paramagentIdstring
@returnsstring

tracesDir

tracesDir(projectId: string, agentId: string): string
@paramprojectIdstring
@paramagentIdstring
@returnsstring

agentStateDir

agentStateDir(projectId: string, agentId: string): string

The Agent State: what the Agent may edit (agent_state/).

@paramprojectIdstring
@paramagentIdstring
@returnsstring

agentStateRepoDir

agentStateRepoDir(projectId: string, agentId: string): string

The Agent State's version history (agent_state.git/).

@paramprojectIdstring
@paramagentIdstring
@returnsstring

snapshotsDir

snapshotsDir(projectId: string, agentId: string): string
@paramprojectIdstring
@paramagentIdstring
@returnsstring

scratchpadDir

scratchpadDir(projectId: string, agentId: string): string

The folder holding one scratchpad per Session, each named by its Session's id.

@paramprojectIdstring
@paramagentIdstring
@returnsstring

workspacesDir

workspacesDir(projectId: string, agentId: string): string

The folder holding the Agent's temporary and Test Workspaces, one per name.

@paramprojectIdstring
@paramagentIdstring
@returnsstring

sharedEnvDir

sharedEnvDir(projectId: string, agentId: string): string

The Agent's reusable tool environments, one folder per environment.

@paramprojectIdstring
@paramagentIdstring
@returnsstring

workbenchCachesDir

workbenchCachesDir(projectId: string, agentId: string): string

The folder holding the disposable files of the Agent's workbenches, one per workbench id.

@paramprojectIdstring
@paramagentIdstring
@returnsstring

deletingDir

deletingDir(projectId: string): string

Where a Project's folders wait while their contents are removed (agents/.deleting/).

@paramprojectIdstring
@returnsstring

pluginsDir

pluginsDir(): string

The npm prefix the server installs plugins into.

@returnsstring