Cli
Interfaces
Interfaces
ContextCommandOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Organization ID to set |
workspaceId | string | undefined | No | Workspace ID to set |
interactive | boolean | undefined | No | Interactive mode |
OrgListOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
verbose | boolean | undefined | No | Show all details |
format | "table" | "json" | undefined | No | Output format |
WorkspaceListOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | undefined | No | Filter by org ID |
verbose | boolean | undefined | No | Show all details |
format | "table" | "json" | undefined | No | Output format |
WorkspaceCreateOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workspace name |
title | string | undefined | No | Workspace title |
description | string | undefined | No | Workspace description |
orgId | string | undefined | No | Organization ID |
userId | string | undefined | No | User ID |
interactive | boolean | undefined | No | Interactive mode |
OrgCreateOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Organization name |
title | string | undefined | No | Organization title |
description | string | undefined | No | Organization description |
userId | string | undefined | No | User ID |
interactive | boolean | undefined | No | Interactive mode |
CreateAppOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
appName | string | Yes | |
skipVerify | boolean | undefined | No | |
verbose | boolean | undefined | No |
DiscoverOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
path | string | undefined | No | |
json | boolean | undefined | No | |
verbose | boolean | undefined | No | |
package | string | undefined | No | |
only | string | undefined | No | |
list | boolean | undefined | No |
DoctorOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
fix | boolean | undefined | No | |
json | boolean | undefined | No |
ConfigCheckResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
exists | boolean | Yes | |
valid | boolean | Yes | |
linkedToCodebase | boolean | Yes | |
codebaseId | string | undefined | No | |
workspaceId | string | undefined | No | |
issues | string[] | Yes |
ServiceCheckResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
running | boolean | Yes | |
healthy | boolean | Yes | |
containerExists | boolean | undefined | No | |
error | string | undefined | No |
DoctorResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
dependencies | Map<string, DependencyCheckResult> | Yes | |
config | ConfigCheckResult | Yes | |
services | Map<string, ServiceCheckResult> | Yes | |
repoRequirements | RepoRequirements | Yes | |
allPassed | boolean | Yes |
RepoRequirements
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
found | boolean | Yes | |
requiredNodeVersion | string | undefined | No | |
currentNodeVersion | string | undefined | No | |
nodeVersionMatch | boolean | undefined | No | |
packageManager | string | undefined | No | |
isMonorepo | boolean | undefined | No | |
hasDockerCompose | boolean | undefined | No |
LinkCommandOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
verbose | boolean | undefined | No | Show verbose output |
yes | boolean | undefined | No | Non-interactive mode - skip already linked |
FolderInfo
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Absolute path to the folder |
relativePath | string | Yes | Relative path from current directory |
hasPackageJson | boolean | Yes | Whether it has package.json |
hasFlowstateJson | boolean | Yes | Whether it has flowstate.json |
packageName | string | undefined | Yes | Package name from package.json if available (e.g., |
flowstateDisplayName | string | undefined | Yes | Display name from flowstate.json if available |
isLinked | boolean | Yes | Whether already linked (has .flowstate/config.json) |
linkedProjectId | string | undefined | Yes | Existing project ID if linked |
LocalFlowStateConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
workspaceId | string | Yes | |
orgId | string | Yes | |
linkedAt | string | Yes | |
packageName | string | undefined | No |
ScanTodosOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | undefined | No | |
summaryOnly | boolean | undefined | No | |
file | string | undefined | No | |
verbose | boolean | undefined | No |
LoggingConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
verbose | boolean | Yes | |
level | LogLevel | Yes | |
timestamp | boolean | undefined | No | |
colorize | boolean | undefined | No |
SessionContextData
ObsSessionContext - Singleton for managing observability session context
This class maintains session context that can be automatically included in errors, logs, and traces sent to the observability platform. The context is also set as environment variables for SDK consumption.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | undefined | No | Current project ID |
taskId | string | undefined | No | Current task ID |
specName | string | undefined | No | Current spec name |
userId | string | undefined | No | Current user ID |
gitBranch | string | undefined | No | Current git branch |
workingDirectory | string | undefined | No | Current working directory |
CLISettings
Configuration types for FlowState CLI
Note: Server profiles and authentication are managed by ConfigManager from
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
defaultEditor | string | Yes | Default editor for editing files |
colorOutput | boolean | Yes | Whether to use color output in terminal |
verboseLogging | boolean | Yes | Enable verbose logging |
outputFormat | "table" | "json" | "yaml" | undefined | No | Default output format (json, table, etc.) |
AgentSettings
Agent-specific settings
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
defaultPollInterval | number | Yes | Default polling interval in milliseconds |
maxConcurrentTasks | number | Yes | Maximum concurrent tasks per agent |
defaultLogLevel | "debug" | "info" | "warn" | "error" | Yes | Default log level for agents |
autoRestart | boolean | undefined | No | Auto-restart agents on failure |
AgentConfig
Agent runtime configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
status | "error" | "running" | "stopped" | Yes | |
startedAt | string | undefined | No | |
stoppedAt | string | undefined | No | |
tasksCompleted | number | undefined | No | |
tasksInProgress | number | undefined | No | |
lastError | string | undefined | No |
ContextConfig
Current working context configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
currentOrgId | string | undefined | No | Currently selected organization ID |
currentWorkspaceId | string | undefined | No | Currently selected workspace ID |
lastUpdated | string | undefined | No | Last updated timestamp |
ObservabilityConfig
Observability platform configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Whether observability is enabled |
serverUrl | string | Yes | Observability server URL |
apiKey | string | Yes | API key for authentication |
defaultProject | string | undefined | No | Default project ID |
autoLink | boolean | undefined | No | Auto-link errors and logs to tasks |
sessionTracking | boolean | undefined | No | Track session context automatically |
autoCreateTasks | boolean | undefined | No | Automatically create tasks from TODO comments |
FlowStateConfig
Complete FlowState CLI configuration Stored in ~/.flowstate/cli-config.json
Note: Server profiles are stored separately in ~/.flowstate/config.json and managed by ConfigManager from
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Configuration format version |
cli | CLISettings | Yes | CLI settings |
agent | AgentSettings | Yes | Agent settings |
context | ContextConfig | undefined | No | Current working context (org/workspace) |
observability | ObservabilityConfig | undefined | No | Observability platform configuration |
lastUpdated | string | undefined | No | Last updated timestamp |
CollectionRegistryConfig
Collection registry configuration
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
defaultOrgId | string | undefined | No | |
defaultUserId | string | undefined | No | |
autoFillFields | boolean | undefined | No |
ServerConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
environments | Record<string, any> | Yes | |
activeEnvironment | string | Yes | |
replicationEnabled | boolean | undefined | No | |
metadata | Record<string, any> | undefined | No |
InitOptions
CLI options for flowstate init command
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | undefined | No | Project name (defaults to current directory name) |
type | ProjectType | undefined | No | Project type |
description | string | undefined | No | Project description |
git | boolean | undefined | No | Force git initialization |
noGit | boolean | undefined | No | Skip git initialization |
repo | string | undefined | No | Link to existing GitHub repo URL |
createRepo | boolean | undefined | No | Create new GitHub repository |
vault | string | undefined | No | Use existing 1Password vault name |
createVault | boolean | undefined | No | Create new 1Password vault |
rxdbUrl | string | undefined | No | RxDB server URL |
rxdbDomain | string | undefined | No | RxDB domain ID |
rxdbToken | string | undefined | No | RxDB auth token |
rxdbEnv | "production" | "staging" | "development" | "local" | undefined | No | RxDB environment |
skipRxdb | boolean | undefined | No | Skip RxDB configuration |
orgId | string | undefined | No | FlowState org ID |
workspace | string | undefined | No | FlowState workspace ID |
userId | string | undefined | No | FlowState user ID |
obsUrl | string | undefined | No | Observability server URL |
obsSetup | boolean | undefined | No | Set up observability (non-interactive) |
skipObs | boolean | undefined | No | Skip observability setup |
skipChecks | boolean | undefined | No | Skip dependency checks |
yes | boolean | undefined | No | Accept all defaults (non-interactive) |
dryRun | boolean | undefined | No | Preview what would be created without making changes |
format | "json" | "text" | undefined | No | Output format for dry-run (text or json) |
executePlan | boolean | undefined | No | Execute a previously saved init plan |
ProjectConfig
Project configuration stored in .flowstate/config.json
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | |
projectName | string | Yes | |
projectType | ProjectType | Yes | |
orgId | string | undefined | No | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
codebaseId | string | undefined | No | |
projectId | string | undefined | No | |
vault | { name: string; id?: string; type: "1password"; } | undefined | No | |
repository | { url: string; provider: "github" | "gitlab" | "bitbucket" | "other"; } | undefined | No | |
dependencies | { node?: string; packageManager?: "npm" | "yarn" | "pnpm" | "bun"; docker?: boolean; } | undefined | No | |
rxdbServer | { serverUrl: string; domainId: string; authToken?: string; environment: "local" | "development" | "staging" | "production"; replicationEnabled?: boolean; collections?: string[]; } | undefined | No | |
observability | { enabled: boolean; serverUrl: string; apiKey: string; defaultProject?: string; autoLink?: boolean; sessionTracking?: boolean; autoCreateTasks?: boolean; } | undefined | No | |
secrets | Record<string, string> | undefined | No | |
createdAt | string | Yes | |
lastUpdated | string | Yes |
DependencyCheckResult
Dependency check result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
installed | boolean | Yes | |
version | string | undefined | No | |
installInstructions | string | undefined | No |
VaultConfig
Vault configuration result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
id | string | undefined | No | |
type | "1password" | Yes |
CodebaseCreationResult
Codebase creation result
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
orgId | string | undefined | No | |
workspaceId | string | undefined | No | |
userId | string | undefined | No | |
codebaseId | string | undefined | No | |
projectId | string | undefined | No | |
message | string | undefined | No |
PlannedFile
Planned file operation for dry-run
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Relative path from project root |
operation | "create" | "update" | "skip" | Yes | Type of operation |
content | string | undefined | No | Full content that would be written to the file |
skipReason | string | undefined | No | Reason for skip if applicable |
PlannedEntity
Planned database entity for dry-run
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
collection | string | Yes | Collection name |
id | string | Yes | Entity ID (pre-generated) |
data | Record<string, unknown> | Yes | Entity data |
operation | "create" | "use-existing" | Yes | Type of operation |
PlannedIntegration
Planned external integration for dry-run
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "1password" | "github" | "git" | "rxdb" | "observability" | Yes | Integration type |
operation | "create" | "skip" | "init" | "connect" | Yes | Operation to perform |
details | string | Yes | Details about what will be done |
optional | boolean | Yes | Whether this is optional |
DryRunPlan
Complete dry-run plan
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Plan version for compatibility |
generatedAt | string | Yes | When the plan was generated |
projectConfig | Partial<ProjectConfig> | Yes | Project configuration that would be created |
files | PlannedFile[] | Yes | Files that would be created/modified |
entities | PlannedEntity[] | Yes | Database entities that would be created |
integrations | PlannedIntegration[] | Yes | External integrations that would be set up |
options | InitOptions | Yes | Options used to generate this plan |
QueryFilters
Query filter options from CLI
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
selector | any | No | |
sort | { [key: string]: "asc" | "desc"; }[] | undefined | No | |
limit | number | undefined | No | |
skip | number | undefined | No |
CollectionOperationOptions
CLI options for collection operations
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
data | string | undefined | No | |
file | string | undefined | No | |
interactive | boolean | undefined | No | |
filter | string | undefined | No | |
sort | string | undefined | No | |
limit | string | undefined | No | |
skip | string | undefined | No | |
set | string[] | undefined | No | |
format | "table" | "json" | "yaml" | "csv" | undefined | No | |
output | string | undefined | No | |
force | boolean | undefined | No | |
upsert | boolean | undefined | No |
OperationResult
Result from collection operations
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
data | T | undefined | No | |
message | string | undefined | No | |
error | string | undefined | No |
ProjectTypeTemplate
Project type template interface
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "nodejs" | "mcp" | "fullstack" | "generic" | Yes | |
displayName | string | Yes | |
description | string | Yes | |
dependencies | { node?: string; packageManager?: "npm" | "yarn" | "pnpm" | "bun"; docker?: boolean; git?: boolean; onePassword?: boolean; githubCli?: boolean; } | Yes | |
scripts | Record<string, string> | undefined | No | |
files | { claudeMd: string; gitignore?: string[]; } | Yes | |
claudeCommands | string[] | Yes | |
mcpServers | string[] | undefined | No |
RxDBClient
Org
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
description | string | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes |
Workspace
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
name | string | Yes | |
title | string | Yes | |
description | string | Yes | |
status | "active" | "archived" | "paused" | Yes | |
tags | string[] | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes |
User
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
name | string | Yes | |
email | string | undefined | No | |
onboarded | boolean | Yes | |
createdAt | string | Yes | |
updatedAt | string | Yes |
Project
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
orgId | string | Yes | |
userId | string | Yes | |
workspaceId | string | undefined | No | |
codebaseId | string | undefined | No | |
title | string | Yes | |
description | string | undefined | No | |
completed | boolean | Yes | |
createdAt | string | Yes | |
updatedAt | string | Yes |
EntitySelectionResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
orgId | string | Yes | |
workspaceId | string | Yes | |
userId | string | Yes | |
projectId | string | undefined | No |
PlannedOperation
Planned entity operation for dry-run mode
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
collection | string | Yes | |
id | string | Yes | |
data | Record<string, unknown> | Yes | |
operation | "create" | "use-existing" | Yes |
JsonValidationResult
JSON Validation Utility Provides clear, actionable error messages for JSON parsing and validation issues.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
data | any | No | |
error | JsonValidationError | undefined | No |
JsonValidationError
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
message | string | Yes | |
position | number | undefined | No | |
line | number | undefined | No | |
column | number | undefined | No | |
snippet | string | undefined | No | |
suggestions | string[] | Yes |
ObsConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
serverUrl | string | Yes | |
apiKey | string | Yes | |
defaultProjectId | string | undefined | No |
AgentFile
Agent file metadata parsed from .flowstate/agents/*.json
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Agent name (from JSON) |
filePath | string | Yes | File path relative to project root |
contentHash | string | Yes | SHA-256 hash of file content for change detection |
config | AgentConfig | Yes | Full agent configuration object |
stats | { size: number; created: string; modified: string; } | Yes | File statistics |
AgentConfig
Agent configuration matching the FlowState agent template schema
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | undefined | No | |
name | string | Yes | |
description | string | Yes | |
instructions | string | Yes | |
model | { claude?: string | undefined; opencode?: string | undefined; openai?: string | undefined; } | undefined | No | |
tools | string[] | undefined | No | |
disallowedTools | string[] | undefined | No | |
permissions | { mode?: string | undefined; edit?: string | undefined; bash?: string | undefined; } | undefined | No | |
settings | { temperature?: number | undefined; maxSteps?: number | undefined; resetToolChoice?: boolean | undefined; } | undefined | No | |
skills | string[] | undefined | No | |
hooks | Record<string, unknown> | undefined | No | |
mcpServers | { name: string; url: string; }[] | undefined | No | |
outputType | Record<string, unknown> | undefined | No | |
metadata | AgentMetadata | undefined | No |
AgentMetadata
Agent metadata from FlowState schema
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | undefined | No | |
author | string | undefined | No | |
createdAt | string | undefined | No | |
updatedAt | string | undefined | No | |
tags | string[] | undefined | No | |
orgRole | string | undefined | No | |
reportsTo | string | undefined | No | |
directReports | string[] | undefined | No | |
level | string | undefined | No | |
department | string | undefined | No | |
characterName | string | undefined | No | |
characterEmail | string | undefined | No | |
backstory | string | undefined | No | |
bio | string | undefined | No | |
tone | string | undefined | No | |
teamMemberId | string | undefined | No | |
productId | string | undefined | No |
AgentSyncMetadata
Sync metadata stored in TeamMember extended.agentSync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
contentHash | string | Yes | SHA-256 hash of last synced content |
lastSynced | string | Yes | ISO timestamp of last sync |
filePath | string | Yes | Local file path that was synced |
lastSyncDirection | "local-to-remote" | "remote-to-local" | Yes | Direction of last sync |
AgentSyncResult
Sync result for a single agent
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
action | "error" | "create" | "update" | "skip" | "conflict" | Yes | |
agentName | string | Yes | |
teamMemberId | string | undefined | No | |
direction | "local-to-remote" | "remote-to-local" | undefined | No | |
error | string | undefined | No |
AgentSyncStats
Summary statistics for agent sync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | |
created | number | Yes | |
updated | number | Yes | |
skipped | number | Yes | |
errors | number | Yes | |
conflicts | number | Yes |
AgentScannerConfig
Configuration for agent scanner
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
agentsDir | string | Yes | Directory containing agent JSON files |
patterns | string[] | Yes | File patterns to include |
ignoreFiles | string[] | Yes | Files to ignore |
AgentSyncSummaryJson
Summary JSON output for agent sync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
generatedAt | string | Yes | |
mode | "dry-run" | "sync" | Yes | |
direction | "bidirectional" | "local-to-remote" | "remote-to-local" | Yes | |
statistics | AgentSyncStats | Yes | |
agents | { name: string; filePath?: string | undefined; teamMemberId?: string | undefined; action: string; direction?: string | undefined; contentHash?: string | undefined; error?: string | undefined; }[] | Yes |
DocumentStoreClientConfig
Document Store API Types
Type definitions for interacting with the document-store service API. The document-store handles S3 storage and RAG processing for documents.
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
baseUrl | string | Yes | Base URL of the document-store service (e.g., http://localhost:3003) |
authToken | string | Yes | JWT auth token for API authentication |
timeout | number | undefined | No | Optional timeout in milliseconds (default: 30000) |
workspaceId | string | undefined | No | Workspace ID for document isolation (required by document-store) |
domainId | string | undefined | No | Domain ID for multi-tenancy |
userId | string | undefined | No | User ID for audit trail |
urlReplacements | Record<string, string> | undefined | No | Map of internal Docker URLs to external URLs for S3 presigned URLs. |
| Used when document-store returns internal Docker network URLs. | |||
| Example: { 'http://minio:9000': 'http://localhost:9000' } |
UploadRequest
Request payload for document upload
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | Original filename of the document |
mimeType | string | Yes | MIME type of the document (e.g., text/markdown) |
codebaseId | string | undefined | No | Optional codebase ID to associate the document with |
metadata | { [key: string]: unknown; type?: "code" | "markdown" | "plan" | "config" | "other"; language?: string; tags?: string[]; filePath?: string; contentHash?: string; } | undefined | No | Optional metadata for the document |
UploadResponse
Response from document upload request
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | Document-store assigned document ID |
uploadUrl | string | Yes | Presigned S3 URL for uploading content |
s3Key | string | Yes | S3 object key where content will be stored |
s3Bucket | string | Yes | S3 bucket name |
codebaseId | string | undefined | No | Codebase ID if provided |
expiresIn | number | Yes | Time in seconds until the presigned URL expires |
ragJobId | string | undefined | No | RAG job ID if RAG processing was triggered |
DownloadResponse
Response from document download request
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
downloadUrl | string | Yes | Presigned S3 URL for downloading content |
filename | string | Yes | Original filename |
mimeType | string | Yes | MIME type of the document |
sizeBytes | number | undefined | No | Size in bytes (if available) |
expiresIn | number | Yes | Time in seconds until the presigned URL expires |
DocumentStoreError
Error response from document-store API
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
error | string | Yes | Error message |
details | unknown | No | Optional error details |
message | string | undefined | No | Optional error message (alternative field) |
FileMetadata
File metadata collected from filesystem and git
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | |
name | string | Yes | |
type | "file" | "directory" | Yes | |
size | number | Yes | |
created | string | Yes | |
modified | string | Yes | |
permissions | string | Yes | |
gitInfo | { lastCommit?: string; lastAuthor?: string; lastModified?: string; isTracked: boolean; } | undefined | No | |
contentHash | string | undefined | No |
FiletreeNode
Tree node representing file or directory
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
path | string | Yes | |
type | "file" | "directory" | Yes | |
metadata | FileMetadata | Yes | |
children | FiletreeNode[] | undefined | No |
Filetree
Complete filetree structure with metadata
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
root | string | Yes | |
generatedAt | string | Yes | |
totalFiles | number | Yes | |
totalDirectories | number | Yes | |
totalSize | number | Yes | |
tree | FiletreeNode | Yes |
FiletreeGeneratorConfig
Configuration for filetree generation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
ignorePaths | string[] | Yes | |
includeGitInfo | boolean | Yes | |
includeContentHash | boolean | Yes | |
maxDepth | number | undefined | No |
FiletreeSyncStats
Statistics for filetree sync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | |
filesProcessed | number | Yes | |
directoriesProcessed | number | Yes | |
totalSize | number | Yes | |
error | string | undefined | No |
FiletreeSummaryJson
Summary output formats
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
generatedAt | string | Yes | |
rootPath | string | Yes | |
statistics | { totalFiles: number; totalDirectories: number; totalSize: number; filesProcessed: number; } | Yes | |
documentId | string | undefined | No | |
tree | FiletreeNode | Yes |
BaseMapping
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
createdAt | string | Yes | |
status | MappingStatus | Yes |
TodoMapping
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | |
text | string | Yes | |
contentHash | string | Yes |
MarkdownMapping
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | |
documentType | string | Yes | |
contentHash | string | Yes |
FileMapping
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
specIds | string[] | Yes | |
tags | string[] | Yes |
CommitMapping
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskIds | string[] | Yes | |
message | string | Yes | |
author | string | Yes | |
timestamp | string | Yes |
TodoMappingFile
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | |
lastUpdated | string | Yes | |
mappings | Record<string, TodoMapping> | Yes | |
index | { byTaskId: Record<string, string[]>; byFile: Record<string, string[]>; } | Yes |
MarkdownMappingFile
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | |
lastUpdated | string | Yes | |
mappings | Record<string, MarkdownMapping> | Yes | |
index | { byDocumentId: Record<string, string[]>; byType: Record<string, string[]>; } | Yes |
FileMappingFile
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | |
lastUpdated | string | Yes | |
mappings | Record<string, FileMapping> | Yes | |
index | { bySpecId: Record<string, string[]>; byTag: Record<string, string[]>; } | Yes |
CommitMappingFile
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | |
lastUpdated | string | Yes | |
mappings | Record<string, CommitMapping> | Yes | |
index | { byTaskId: Record<string, string[]>; } | Yes |
MappingManagerConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectRoot | string | Yes | |
mappingsDir | string | undefined | No |
StorageBackedSyncManagerConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
db | RxDatabase | Yes | RxDB database instance |
documentStoreClient | DocumentStoreClient | Yes | Document-store API client |
codebaseId | string | Yes | Codebase ID to associate documents with |
MarkdownFile
Markdown file metadata parsed from file system and frontmatter
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
filePath | string | Yes | Relative path from project root |
content | string | Yes | Markdown content |
contentHash | string | Yes | SHA-256 hash of content |
documentType | "markdown" | "product" | "tech" | "structure" | Yes | Document type detected from filename or frontmatter |
frontmatter | Record<string, any> | undefined | No | Frontmatter metadata (if present) |
stats | { size: number; created: string; modified: string; } | Yes | File statistics |
MarkdownSyncResult
Sync result for a markdown file
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
action | "error" | "create" | "update" | "skip" | Yes | |
documentId | string | undefined | No | |
error | string | undefined | No |
MarkdownSyncStats
Summary statistics for markdown sync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | |
created | number | Yes | |
updated | number | Yes | |
skipped | number | Yes | |
errors | number | Yes |
MarkdownScannerConfig
Configuration for markdown scanner
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
patterns | string[] | Yes | |
ignorePaths | string[] | Yes | |
syncMetadata | boolean | Yes | |
documentTypeMapping | Record<string, "product" | "tech" | "structure"> | undefined | No | |
useMappingSystem | boolean | undefined | No |
MarkdownSummaryJson
Summary JSON output
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
generatedAt | string | Yes | |
mode | "dry-run" | "sync" | Yes | |
statistics | MarkdownSyncStats | Yes | |
files | { filePath: string; documentType: string; documentId?: string; action: string; contentHash: string; }[] | Yes |
StorageBackedSyncResult
Result from storage-backed sync operation
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
action | "error" | "create" | "update" | "skip" | Yes | |
documentId | string | undefined | No | |
s3Key | string | undefined | No | S3 key where content was uploaded |
s3Bucket | string | undefined | No | S3 bucket name |
documentStoreId | string | undefined | No | Document-store internal document ID |
ragJobId | string | undefined | No | RAG job ID if processing was triggered |
error | string | undefined | No | Error message if action is 'error' |
StorageBackedSyncStats
Statistics for storage-backed sync
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | |
created | number | Yes | |
updated | number | Yes | |
skipped | number | Yes | |
errors | number | Yes | |
bytesUploaded | number | Yes | Total bytes uploaded |
ScanOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | undefined | No | |
summaryOnly | boolean | undefined | No | |
filePath | string | undefined | No |
ScanResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
stats | TodoSyncStats | Yes | |
summary | { markdown: string; json: TodoSummaryJson; } | Yes |
SyncResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
action | "conflict" | "create_task" | "update_task" | "update_comment" | "no_change" | Yes | |
taskId | string | undefined | No | |
metadata | TodoMetadata | undefined | No |
TodoMetadata
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | |
status | TaskStatus | Yes | |
lastSync | string | undefined | No |
TodoComment
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
filePath | string | Yes | |
lineNumber | number | Yes | |
description | string | Yes | |
metadata | TodoMetadata | undefined | No | |
fileModifiedAt | string | Yes | |
rawText | string | Yes |
TodoScanResult
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
todos | TodoComment[] | Yes | |
errors | { file: string; error: string; }[] | Yes |
TodoSyncStats
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | |
tracked | number | Yes | |
untracked | number | Yes | |
synced | number | Yes | |
conflicts | number | Yes | |
created | number | Yes | |
updated | number | Yes |
TodoScannerConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
ignorePaths | string[] | undefined | No | |
groupByFile | boolean | undefined | No | |
useMappingSystem | boolean | undefined | No |
FlowStateConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | undefined | No | |
codebaseId | string | undefined | No | |
workspaceId | string | undefined | No | |
projectName | string | undefined | No | |
projectType | string | undefined | No | |
todoScanner | TodoScannerConfig | undefined | No |
TaskModel
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
title | string | Yes | |
description | string | Yes | |
status | TaskStatus | Yes | |
projectId | string | Yes | |
metadata | Record<string, unknown> | undefined | No | |
createdAt | string | Yes | |
updatedAt | string | Yes |
TaskUpdateInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
title | string | undefined | No | |
description | string | undefined | No | |
status | TaskStatus | undefined | No | |
metadata | Record<string, unknown> | undefined | No |
TodoSummaryJson
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
generatedAt | string | Yes | |
statistics | TodoSyncStats | Yes | |
todos | { filePath: string; lineNumber: number; taskId?: string; status?: TaskStatus; description: string; lastSync?: string; }[] | Yes |