codecartographer-pi 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codecarto/broadside/SKILL.md +4 -1
- package/.codecarto/workflow/scaffold-version.yaml +1 -1
- package/README.md +2 -2
- package/dist/core/broadside/client.d.ts +56 -0
- package/dist/core/broadside/client.js +200 -0
- package/dist/core/broadside/collect.d.ts +68 -0
- package/dist/core/broadside/collect.js +676 -0
- package/dist/core/broadside/constants.d.ts +51 -0
- package/dist/core/broadside/constants.js +74 -0
- package/dist/core/broadside/lenses.d.ts +31 -0
- package/dist/core/broadside/lenses.js +312 -0
- package/dist/core/broadside/models.d.ts +46 -0
- package/dist/core/broadside/models.js +321 -0
- package/dist/core/broadside/render.d.ts +20 -0
- package/dist/core/broadside/render.js +285 -0
- package/dist/core/broadside/repo.d.ts +58 -0
- package/dist/core/broadside/repo.js +592 -0
- package/dist/core/broadside/requests.d.ts +23 -0
- package/dist/core/broadside/requests.js +71 -0
- package/dist/core/broadside/results.d.ts +36 -0
- package/dist/core/broadside/results.js +163 -0
- package/dist/core/broadside/schemas.d.ts +2 -0
- package/dist/core/broadside/schemas.js +342 -0
- package/dist/core/broadside/state.d.ts +99 -0
- package/dist/core/broadside/state.js +384 -0
- package/dist/core/broadside/submit.d.ts +30 -0
- package/dist/core/broadside/submit.js +350 -0
- package/dist/core/broadside/types.d.ts +491 -0
- package/dist/core/broadside/types.js +107 -0
- package/dist/core/{broadside-verify.d.ts → broadside/verify.d.ts} +23 -2
- package/dist/core/{broadside-verify.js → broadside/verify.js} +43 -5
- package/dist/core/broadside.d.ts +14 -952
- package/dist/core/broadside.js +25 -3726
- package/dist/core/completion.js +91 -72
- package/dist/core/dashboard-writer.js +9 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/core/library.d.ts +24 -1
- package/dist/core/library.js +46 -15
- package/dist/core/orchestrator-config.js +22 -8
- package/dist/core/status.d.ts +42 -23
- package/dist/core/status.js +163 -137
- package/dist/core/workspace.d.ts +2 -0
- package/dist/core/workspace.js +49 -25
- package/dist/core/yaml.js +9 -3
- package/dist/extensions/codecarto/auto-runner.js +41 -23
- package/dist/extensions/codecarto/index.js +9 -4
- package/dist/extensions/codecarto/phase-compaction.js +6 -2
- package/dist/mcp-server/server.js +15 -4
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
17
17
|
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
18
18
|
import { mkdir, readFile, readdir, rename, writeFile } from "node:fs/promises";
|
|
19
19
|
import { basename, isAbsolute, join } from "node:path";
|
|
20
|
-
import { buildPhasePrompt, buildSkillPrompt, buildValidationSummary, BROADSIDE_DIR, broadsideDirFor, BROADSIDE_LENS_IDS, BROADSIDE_SKILL_NAME, BroadsideConfigError, defaultBroadsideConfig, backupWorkspaceState, canonicalPath, copyPackagedWorkspace, collectResultText, completeValidatedPhase, computePerPhaseTotals, computeTotals, createEmptyStatus, DEFAULT_PIPELINE_PATH, deriveSlug, discoverLibrary, describeScaffoldStaleness, detectProvenanceConflicts, estimateSubmitText, getLens, describeDanglingCarryForward, describeMissingCompletedOutputs, describeStuckPipeline, getPipelineLabel, getWorkspaceState, isValidSlug, isWithinPathResolved, listBatchModels,
|
|
20
|
+
import { buildPhasePrompt, buildSkillPrompt, buildValidationSummary, BROADSIDE_DIR, broadsideDirFor, BROADSIDE_LENS_IDS, BROADSIDE_SKILL_NAME, BroadsideConfigError, defaultBroadsideConfig, backupWorkspaceState, canonicalPath, copyPackagedWorkspace, collectResultText, completeValidatedPhase, computePerPhaseTotals, computeTotals, createEmptyStatus, DEFAULT_PIPELINE_PATH, deriveSlug, discoverLibrary, describeScaffoldStaleness, detectProvenanceConflicts, estimateSubmitText, getLens, describeDanglingCarryForward, describeMissingCompletedOutputs, describeStuckPipeline, getPipelineLabel, getWorkspaceState, isValidSlug, isWithinPathResolved, listBatchModels, listEntriesWithIndexState, listGuideTopics, loadBroadsideConfig, modelsText, readGuide, listMissingCompletedOutputs, listSkillNames, resolvePipelineOutcome, resolveSkillName, loadCodecartoConfig, loadUsage, loadYamlFile, normalizeForComparison, PACKAGE_VERSION, packagedWorkspaceDir, pathExists, PhasePreflightError, previewPublishVersion, publishEntry, reindex as libraryReindex, refreshScaffold, resolvePhase, resolvePipelineChoice, readBroadsideSkill, runBroadsideCollect, runBroadsideStatus, runBroadsideSubmit, runBroadsideVerify, verifyResultText, seedOrchestratorFiles, statusLineWriter, statusText, stringifySimpleYaml, switchPipeline, validatePhaseOutput, writeLibraryConfig, writeDashboard, } from "../core/index.js";
|
|
21
21
|
import { applyAmendment } from "../core/amendment.js";
|
|
22
22
|
import { appendUsageRun } from "../core/usage.js";
|
|
23
23
|
import { initLibrary } from "../core/library.js";
|
|
@@ -545,7 +545,10 @@ export async function readSpecArg(args, allowedRoots) {
|
|
|
545
545
|
if (!withinAllowed.some((result) => result)) {
|
|
546
546
|
throw new McpError(ErrorCode.InvalidParams, `spec_path must be within the workspace (.codecarto/) or the configured library path. Got: ${args.spec_path}`);
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
// The path that was checked is the path that is read: the original
|
|
549
|
+
// string could be re-pointed through a symlink between the check and
|
|
550
|
+
// the read; the canonical one cannot (#362).
|
|
551
|
+
return readFile(resolvedSpecPath, "utf8");
|
|
549
552
|
}
|
|
550
553
|
throw new McpError(ErrorCode.InvalidParams, "Either spec (inline content) or spec_path (absolute file path) is required");
|
|
551
554
|
}
|
|
@@ -749,7 +752,7 @@ export async function handleLibraryList(args) {
|
|
|
749
752
|
filter.slug = args.slug;
|
|
750
753
|
if (typeof args.source_repo === "string" && args.source_repo !== "")
|
|
751
754
|
filter.source_repo = args.source_repo;
|
|
752
|
-
const entries = await
|
|
755
|
+
const { entries, indexState } = await listEntriesWithIndexState(libraryPath, filter);
|
|
753
756
|
// Computed over the listed entries only, read-only: one readdir per entry
|
|
754
757
|
// plus one small metadata read per older version.
|
|
755
758
|
const conflicts = await detectProvenanceConflicts(libraryPath, entries);
|
|
@@ -766,11 +769,17 @@ export async function handleLibraryList(args) {
|
|
|
766
769
|
}),
|
|
767
770
|
...provenanceConflictLines(conflicts),
|
|
768
771
|
].join("\n");
|
|
769
|
-
|
|
772
|
+
// A list never writes the index (#357): say when it answered from the
|
|
773
|
+
// entry directories instead, so the caller can run a reindex.
|
|
774
|
+
const indexNote = indexState === "indexed"
|
|
775
|
+
? ""
|
|
776
|
+
: `\nindex.yaml is ${indexState}; this listing was built from the entry directories. Run codecarto_library_reindex to rebuild it.`;
|
|
777
|
+
return textResult(`${summary}${indexNote}`, {
|
|
770
778
|
libraryPath,
|
|
771
779
|
libraryName: marker.name,
|
|
772
780
|
namespaced: marker.namespaced,
|
|
773
781
|
count: entries.length,
|
|
782
|
+
indexState,
|
|
774
783
|
entries,
|
|
775
784
|
provenance_conflicts: conflicts,
|
|
776
785
|
});
|
|
@@ -996,6 +1005,7 @@ export async function handleRefreshScaffold(args) {
|
|
|
996
1005
|
written: result.written,
|
|
997
1006
|
scaffoldVersionBefore: result.scaffoldVersionBefore,
|
|
998
1007
|
scaffoldVersionAfter: result.scaffoldVersionAfter,
|
|
1008
|
+
threadLogEntryAppended: result.threadLogEntryAppended,
|
|
999
1009
|
});
|
|
1000
1010
|
}
|
|
1001
1011
|
export async function handleAmend(args) {
|
|
@@ -1208,6 +1218,7 @@ export async function handleBroadside(args) {
|
|
|
1208
1218
|
candidates: verified.candidates,
|
|
1209
1219
|
totalCost: verified.totalCost,
|
|
1210
1220
|
...(verified.stoppedByCost && { stoppedByCost: true }),
|
|
1221
|
+
redactedValues: verified.redactedValues,
|
|
1211
1222
|
findings: verified.findings,
|
|
1212
1223
|
});
|
|
1213
1224
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codecartographer-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"mcpName": "io.github.HuginnIndustries/codecartographer",
|
|
5
5
|
"description": "Turn an unfamiliar codebase into a validated reimplementation spec, then synthesize confirmed specs and a product vision into a traceable plan.",
|
|
6
6
|
"type": "module",
|