UNPKG

@hasna/projects

Version:

High-level project management CLI, MCP server, SDK, and AI SDK agent loop for coding agents

65 lines • 3.2 kB
import type { Workspace } from "../types/workspace.js"; export declare const PROJECT_LIST_DETAILS: readonly ["compact", "full"]; export type ProjectListDetail = (typeof PROJECT_LIST_DETAILS)[number]; export declare const PROJECT_QUERY_SCOPES: readonly ["identity", "discovery", "structured", "all"]; export type ProjectQueryScope = (typeof PROJECT_QUERY_SCOPES)[number]; export declare const PROJECT_LIST_FIELDS: readonly ["id", "slug", "name", "status", "kind", "path", "canonical_machine", "root_id", "recipe_id", "git_remote", "updated_at"]; export type ProjectListField = (typeof PROJECT_LIST_FIELDS)[number]; export declare const DEFAULT_PROJECT_LIST_FIELDS: readonly ProjectListField[]; export declare const DEFAULT_PROJECT_LIST_MAX_BYTES: number; export declare const MIN_PROJECT_LIST_MAX_BYTES = 1024; export declare const MAX_PROJECT_LIST_MAX_BYTES: number; export declare const MAX_PROJECT_QUERY_LENGTH = 512; export declare const MAX_PROJECT_QUERY_TAGS = 50; export declare const MAX_PROJECT_QUERY_TAG_LENGTH = 128; export declare const PROJECT_LIST_V2_CONTRACT: "projects.list.v2"; export declare function isProjectQueryScope(value: string): value is ProjectQueryScope; export declare function parseProjectQueryScope(value: string | undefined, fallback: ProjectQueryScope): ProjectQueryScope; export declare function parseProjectListDetail(value: string | undefined): ProjectListDetail | undefined; export declare function projectListMaxBytes(value: number | undefined): number; export declare function resolveProjectListFields(value: string | readonly string[] | undefined): ProjectListField[]; export declare function projectListRow(project: Workspace, fields?: readonly ProjectListField[]): Record<string, unknown>; export interface ProjectListEnvelopeInput<T> { projects: T[]; total: number; offset: number; limit: number | null; detail: ProjectListDetail; fields: readonly ProjectListField[] | null; queryScope: ProjectQueryScope; nextArguments?: Record<string, unknown>; hasMore?: boolean; complete?: boolean; nextOffset?: number | null; } export interface ProjectListEnvelope<T> { projects: T[]; count: number; total: number; offset: number; limit: number | null; next_offset: number | null; has_more: boolean; complete: boolean; detail: ProjectListDetail; fields: readonly ProjectListField[] | null; query_scope: ProjectQueryScope; next_arguments: Record<string, unknown> | null; } export interface BoundedProjectListEnvelope<T> extends ProjectListEnvelope<T> { max_bytes: number; response_bytes: number; truncated: boolean; truncation_reason: "max_bytes" | null; omitted_from_page: number; } export declare function buildProjectListEnvelope<T>(input: ProjectListEnvelopeInput<T>): ProjectListEnvelope<T>; export declare function stringifyProjectListOutput(value: unknown, pretty?: boolean): string; export declare function buildBoundedProjectListOutput<T>(input: ProjectListEnvelopeInput<T>, options?: { maxBytes?: number; pretty?: boolean; }): { envelope: BoundedProjectListEnvelope<T>; text: string; }; //# sourceMappingURL=project-list-output.d.ts.map