import { Entity, Relation, KnowledgeGraph, WampumBead, WampumBeltMetadata, WampumBeadPosition, WampumCeremonyLink, GithubIssueRef } from './types.js'; import { type GithubProjectFieldProjection } from './github-bridge.js'; /** * Parse a GitHub issue reference written as `owner/repo#number`. * * The full path is required. A bare `#42` is rejected: charts travel between * repositories, and a bare number silently resolves against whichever repo the * reader happens to be in — which is how an issue from one project ends up * cited as another project's. */ export declare function parseGithubIssueSpec(spec: string): GithubIssueRef; export declare class KnowledgeGraphManager { private memoryFilePath; constructor(memoryFilePath: string); private loadGraph; private extractCurrentRealityFromContext; private saveGraph; createEntities(entities: Entity[]): Promise; createRelations(relations: Relation[]): Promise; addObservations(observations: { entityName: string; contents: string[]; }[]): Promise<{ entityName: string; addedObservations: string[]; }[]>; deleteEntities(entityNames: string[]): Promise; deleteObservations(deletions: { entityName: string; observations: string[]; }[]): Promise; deleteRelations(relations: Relation[]): Promise; readGraph(): Promise; getGithubProjectFieldProjection(entityNameOrChartId: string): Promise; searchNodes(query: string): Promise; openNodes(names: string[]): Promise; getChartDetails(chartId: string): Promise; getActionStepDetails(actionStepName: string): Promise; createStructuralTensionChart(desiredOutcome: string, currentReality: string, dueDate: string, actionSteps?: string[], elementsOfPerformance?: Array<{ description: string; type: 'DESIGN' | 'EXECUTION'; }>, githubIssue?: string): Promise<{ chartId: string; entities: Entity[]; relations: Relation[]; }>; telescopeActionStep(actionStepName: string, newCurrentReality: string, initialActionSteps?: string[]): Promise<{ chartId: string; parentChart: string; }>; markActionStepComplete(actionStepName: string): Promise; getChartProgress(chartId: string, preloadedGraph?: KnowledgeGraph): Promise<{ chartId: string; progress: number; completedActions: number; totalActions: number; nextAction?: string; dueDate?: string; }>; private distributeActionStepDates; listActiveCharts(): Promise; }>>; updateActionProgress(actionStepName: string, progressObservation: string, updateCurrentReality?: boolean): Promise; updateCurrentReality(chartId: string, newObservations: string[]): Promise; /** * Record on an existing chart the GitHub issue it was written from. * Writes metadata.github.issue, which EntityMetadata already carried and no * tool could reach. */ linkChartToGithubIssue(chartId: string, githubIssue: string): Promise<{ chartId: string; issue: GithubIssueRef; }>; updateDesiredOutcome(chartId: string, newDesiredOutcome: string): Promise; /** * Move the date a chart is due. * * `update_desired_outcome` and `update_current_reality` could already reach both * halves of the tension; the date the tension resolves by could only be changed * by hand-editing the JSONL — on a store several MCP instances write with no * lock, which is how a hand-edit becomes a lost write. * * The chart and its desired outcome were created carrying the same date and are * moved together. Action step dates are left alone unless `redistributeActionSteps` * is asked for; the count still standing past the new date is reported either way, * so the caller sees what the move left behind. */ updateChartDueDate(chartId: string, newDueDate: string, redistributeActionSteps?: boolean): Promise<{ chartId: string; previousDueDate?: string; newDueDate: string; actionStepsRescheduled: number; actionStepsPastDueDate: number; }>; /** * A chart's work in the two shapes it takes: action_step entities on the chart * itself, and telescoped child charts. A child telescoped out of one of the * chart's own steps is that same result seen closer up — it travels with the * step rather than counting as a second unit. */ private collectChartWorkUnits; performMmotEvaluation(chartId: string, phase?: string, assessment?: string, direction?: 'South' | 'East' | 'West' | 'North', correctiveActions?: string[], updateReality?: boolean): Promise<{ guidance: string; evaluationStored: boolean; beatEmitted: boolean; }>; createNarrativeBeat(parentChartId: string, title: string, act: number, type_dramatic: string, perspectiveTypes: string[], description: string, prose: string, lessons: string[], assessRelationalAlignment?: boolean, initiateFourDirectionsInquiry?: boolean, filePath?: string): Promise<{ entity: Entity; beatName: string; }>; telescopeNarrativeBeat(parentBeatName: string, newCurrentReality: string, initialSubBeats?: Array<{ title: string; type_dramatic: string; description: string; prose: string; lessons: string[]; }>): Promise<{ parentBeat: Entity; subBeats: Entity[]; }>; listNarrativeBeats(parentChartId?: string): Promise; createWampumBelt(title: string, purpose: string, rows?: number, cols?: number): Promise<{ beltId: string; entity: Entity; }>; addWampumBead(beltId: string, mnemonic: string, color: WampumBead['color'], position: WampumBeadPosition, reading: string, relationalReadings?: Record, ceremonyLink?: WampumCeremonyLink, observations?: string[]): Promise<{ bead: WampumBead; }>; readWampumBelt(beltId: string, position?: WampumBeadPosition): Promise<{ belt: WampumBeltMetadata; bead?: WampumBead; positionalReading?: string; }>; addActionStep(parentChartId: string, actionStepTitle: string, dueDate?: string, currentReality?: string, performanceElements?: Array<{ description: string; type: 'DESIGN' | 'EXECUTION'; }>): Promise<{ chartId: string; actionStepName: string; }>; telescopeActionStepWithContext(parentChartId: string, actionStepTitle: string, userContext: string, currentReality?: string, dueDate?: string): Promise<{ chartId: string; actionStepName: string; }>; manageActionStep(parentReference: string, actionDescription: string, currentReality?: string, initialActionSteps?: string[], dueDate?: string, performanceElements?: Array<{ description: string; type: 'DESIGN' | 'EXECUTION'; }>): Promise<{ chartId: string; actionStepName: string; }>; removeActionStep(parentChartId: string, actionStepName: string): Promise; }