buddy-agent-harness 0.19.0 → 0.20.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/.claude-plugin/plugin.json +3 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +2 -0
- package/dist/cli.mjs +11714 -11501
- package/dist/index.d.mts +10 -142
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +581 -1199
- package/dist/index.mjs.map +1 -1
- package/dist/skill-scripts/doctor.mjs +175 -173
- package/dist/skill-scripts/init.mjs +175 -173
- package/dist/skill-scripts/mcp.mjs +175 -173
- package/llms.txt +7 -9
- package/package.json +3 -3
- package/plugin.json +2 -1
- package/skills/doctor-buddy-agent-harness/SKILL.md +1 -1
- package/skills/doctor-buddy-agent-harness/scripts/doctor.mjs +175 -173
- package/skills/enhance/SKILL.md +1 -1
- package/skills/enhance/scripts/doctor.mjs +175 -173
- package/skills/init-buddy-agent-harness/SKILL.md +1 -1
- package/skills/init-buddy-agent-harness/scripts/doctor.mjs +175 -173
- package/skills/init-buddy-agent-harness/scripts/init.mjs +175 -173
- package/skills/repair/SKILL.md +1 -1
- package/skills/repair/scripts/doctor.mjs +175 -173
- package/skills/repair/scripts/mcp.mjs +175 -173
- package/src/cli.ts +1 -1
- package/src/dep-plugins/dep-plugins.ts +1 -15
- package/src/dep-plugins/resolve.ts +3 -31
- package/src/diagnose-bridges/doctor.command.ts +2 -2
- package/src/governance-overrides/governance-overrides.ts +6 -6
- package/src/index.ts +29 -20
- package/src/initialize-harnesses/init.command.ts +1 -1
- package/src/initialize-harnesses/initialize-harnesses.ts +1 -2
- package/src/references/references.ts +28 -0
- package/src/skill-scripts/launchers.ts +0 -1
- package/dist/skill-scripts/reference.mjs +0 -486
- package/skills/reference/README.md +0 -53
- package/skills/reference/SKILL.md +0 -82
- package/skills/reference/references/create.md +0 -67
- package/skills/reference/references/load.md +0 -59
- package/skills/reference/scripts/reference.mjs +0 -486
- package/src/references/create-reference.ts +0 -57
- package/src/references/harness-layers.ts +0 -150
- package/src/references/reference-catalog.ts +0 -130
- package/src/references/reference-document.ts +0 -226
- package/src/references/reference-invocation.ts +0 -25
- package/src/references/reference-layers.ts +0 -171
- package/src/references/reference.command.ts +0 -487
- package/src/references/resolve-reference.ts +0 -258
- package/src/skill-scripts/reference.ts +0 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { MatchKind, MergeMode, ReferenceLayer, ReferenceLayer as ReferenceLayer$1, ReferenceLayerOptions as ReferenceLayerOptions$1, ReferenceListing, ReferenceName, ReferenceRow, ReferenceRow as ReferenceRow$1, ReferenceStatus, ReferenceTier, ResolveOptions, ResolvedReference, SearchMatch, TraceEntry, UsedLayer, listReferences, managedReferencesDir, parseReferenceName, resolveReference, searchReferences } from "@cyberuni/agent-harness";
|
|
1
2
|
import { cli as cli$1 } from "clibuilder";
|
|
2
|
-
import "@cyberuni/agent-harness";
|
|
3
|
+
import { ReferenceListReport, ReferenceSearchReport, ReferenceShowEntry } from "@cyberuni/agent-harness/commands";
|
|
3
4
|
//#region src/cli.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* The application boundary: argv in, exit code out — returned rather than written, so a caller that
|
|
@@ -393,116 +394,8 @@ type ConfigurationFinding = {
|
|
|
393
394
|
repair: RepairAction;
|
|
394
395
|
};
|
|
395
396
|
//#endregion
|
|
396
|
-
//#region src/references/reference-layers.d.ts
|
|
397
|
-
/** Order here is precedence order, highest first. */
|
|
398
|
-
type ReferenceTier = "managed" | "project" | "user" | "plugin";
|
|
399
|
-
type ReferenceLayer = {
|
|
400
|
-
tier: ReferenceTier;
|
|
401
|
-
dir: string;
|
|
402
|
-
/** Every name a qualified `<plugin>/<name>` may use for this layer; empty outside the plugin tier. */
|
|
403
|
-
plugins: string[];
|
|
404
|
-
/** Empty unless the layer is legacy, deprecated, or skipped; then it says why. */
|
|
405
|
-
status: string;
|
|
406
|
-
/** Set when the layer is never read, and why: policy held in MDM, or a plugin with no install folder. */
|
|
407
|
-
skipped?: string;
|
|
408
|
-
};
|
|
409
|
-
type ReferenceLayerOptions = {
|
|
410
|
-
root: string;
|
|
411
|
-
home: string;
|
|
412
|
-
platform: NodeJS.Platform;
|
|
413
|
-
programData?: string | undefined;
|
|
414
|
-
/** This package's own root, the `buddy-agent-harness` plugin. */
|
|
415
|
-
packageRoot?: string | undefined;
|
|
416
|
-
/** Detects the harness and reads its settings. Defaults to `process.env`. */
|
|
417
|
-
env?: Readonly<Record<string, string | undefined>>;
|
|
418
|
-
};
|
|
419
|
-
export declare function managedReferencesDir(platform: NodeJS.Platform, programData?: string | undefined): string;
|
|
420
|
-
export declare function referenceLayers({ root, home, platform, programData, packageRoot, env }: ReferenceLayerOptions): Promise<ReferenceLayer[]>;
|
|
421
|
-
//#endregion
|
|
422
|
-
//#region src/references/reference-document.d.ts
|
|
423
|
-
type MergeMode = "first-wins" | "combine" | "merge-sections";
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region src/references/resolve-reference.d.ts
|
|
426
|
-
type ReferenceName = {
|
|
427
|
-
name: string;
|
|
428
|
-
plugin: string | undefined;
|
|
429
|
-
raw: string;
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* Rejects rather than sanitizes — silently answering a different question is how untrusted input
|
|
433
|
-
* reads a file outside the layer. The plugin qualifier is only ever compared with known plugin
|
|
434
|
-
* names, never joined into a path.
|
|
435
|
-
*/
|
|
436
|
-
export declare function parseReferenceName(value: string): ReferenceName;
|
|
437
|
-
type TraceEntry = {
|
|
438
|
-
tier: ReferenceTier;
|
|
439
|
-
plugin: string;
|
|
440
|
-
path: string;
|
|
441
|
-
found: boolean;
|
|
442
|
-
candidate: string;
|
|
443
|
-
merge: string;
|
|
444
|
-
outcome: string;
|
|
445
|
-
/** The layer's own frontmatter `description`, so `list` can show it per row. */
|
|
446
|
-
description: string;
|
|
447
|
-
};
|
|
448
|
-
type UsedLayer = {
|
|
449
|
-
tier: ReferenceTier;
|
|
450
|
-
plugin: string;
|
|
451
|
-
path: string;
|
|
452
|
-
merge: MergeMode;
|
|
453
|
-
};
|
|
454
|
-
type ReferenceStatus = "found" | "missing" | "ambiguous";
|
|
455
|
-
type ResolvedReference = {
|
|
456
|
-
name: string;
|
|
457
|
-
status: ReferenceStatus;
|
|
458
|
-
tier?: ReferenceTier;
|
|
459
|
-
plugin?: string;
|
|
460
|
-
path?: string;
|
|
461
|
-
merge?: MergeMode;
|
|
462
|
-
metadata?: Record<string, unknown>;
|
|
463
|
-
content?: string;
|
|
464
|
-
layers: UsedLayer[];
|
|
465
|
-
warnings: string[];
|
|
466
|
-
/** Qualified names to ask for instead, when two plugins hold an unqualified name. */
|
|
467
|
-
plugins: string[];
|
|
468
|
-
trace: TraceEntry[];
|
|
469
|
-
};
|
|
470
|
-
type ResolveOptions = {
|
|
471
|
-
/** How a path is shown in a label or a warning — the command collapses the home directory. */
|
|
472
|
-
display?: (path: string) => string;
|
|
473
|
-
};
|
|
474
|
-
export declare function resolveReference(ref: ReferenceName, layers: readonly ReferenceLayer[], { display }?: ResolveOptions): ResolvedReference;
|
|
475
|
-
//#endregion
|
|
476
|
-
//#region src/references/reference-catalog.d.ts
|
|
477
|
-
type ReferenceRow = {
|
|
478
|
-
name: string;
|
|
479
|
-
tier: ReferenceTier;
|
|
480
|
-
plugin: string;
|
|
481
|
-
path: string;
|
|
482
|
-
status: string;
|
|
483
|
-
description: string;
|
|
484
|
-
};
|
|
485
|
-
type ReferenceListing = {
|
|
486
|
-
rows: ReferenceRow[];
|
|
487
|
-
warnings: string[];
|
|
488
|
-
};
|
|
489
|
-
/** One row per name per layer holding it, with the status resolution gave that layer. */
|
|
490
|
-
export declare function listReferences(layers: readonly ReferenceLayer[], options?: ResolveOptions): ReferenceListing;
|
|
491
|
-
type MatchKind = "name" | "prefix" | "close name" | "description" | "heading" | "body";
|
|
492
|
-
type SearchMatch = {
|
|
493
|
-
name: string;
|
|
494
|
-
tier: ReferenceTier;
|
|
495
|
-
match: MatchKind;
|
|
496
|
-
description: string;
|
|
497
|
-
};
|
|
498
|
-
/**
|
|
499
|
-
* Every name resolves the way `show` would; a name two plugins hold is searched once per plugin, as
|
|
500
|
-
* the qualified name `show` would need.
|
|
501
|
-
*/
|
|
502
|
-
export declare function searchReferences(query: string, layers: readonly ReferenceLayer[], options?: ResolveOptions): SearchMatch[];
|
|
503
|
-
//#endregion
|
|
504
397
|
//#region src/diagnose-bridges/doctor.command.d.ts
|
|
505
|
-
type DoctorReference = Pick<ReferenceRow, "name" | "tier" | "path" | "status">;
|
|
398
|
+
type DoctorReference = Pick<ReferenceRow$1, "name" | "tier" | "path" | "status">;
|
|
506
399
|
type DoctorReport = {
|
|
507
400
|
bin: string;
|
|
508
401
|
bridges: DiagnoseResult["bridges"];
|
|
@@ -751,39 +644,14 @@ type ListMcpServersOptions = {
|
|
|
751
644
|
*/
|
|
752
645
|
export declare function listMcpServers(options: ListMcpServersOptions): McpServerEntry[];
|
|
753
646
|
//#endregion
|
|
754
|
-
//#region src/references/
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
status: ResolvedReference["status"];
|
|
759
|
-
tier?: ReferenceTier;
|
|
760
|
-
plugin?: string;
|
|
761
|
-
path?: string;
|
|
762
|
-
merge?: string;
|
|
763
|
-
metadata?: Record<string, unknown>;
|
|
764
|
-
content?: string;
|
|
765
|
-
layers?: UsedLayer[];
|
|
766
|
-
warnings: string[];
|
|
767
|
-
suggestions?: string[];
|
|
768
|
-
plugins?: string[];
|
|
769
|
-
trace?: Omit<TraceEntry, "description">[];
|
|
770
|
-
};
|
|
771
|
-
type ReferenceListReport = {
|
|
772
|
-
layers: {
|
|
773
|
-
tier: ReferenceTier;
|
|
774
|
-
plugin: string;
|
|
775
|
-
path: string;
|
|
776
|
-
status: string;
|
|
777
|
-
}[];
|
|
778
|
-
/** Emitted even when empty, so a healthy run states its zero explicitly. */
|
|
779
|
-
references: ReferenceRow[] | string;
|
|
780
|
-
warnings?: string[];
|
|
781
|
-
};
|
|
782
|
-
type ReferenceSearchReport = {
|
|
783
|
-
query: string;
|
|
784
|
-
references: SearchMatch[] | string;
|
|
647
|
+
//#region src/references/references.d.ts
|
|
648
|
+
type ReferenceLayerOptions = Omit<ReferenceLayerOptions$1, "plugin"> & {
|
|
649
|
+
/** This package's own root, the `buddy-agent-harness` plugin. */
|
|
650
|
+
packageRoot?: string | undefined;
|
|
785
651
|
};
|
|
652
|
+
/** `@cyberuni/agent-harness`'s reference layers, with this package as the plugin whose own references come first. */
|
|
653
|
+
export declare function referenceLayers({ packageRoot, ...options }: ReferenceLayerOptions): Promise<ReferenceLayer$1[]>;
|
|
786
654
|
export declare const referenceCommand: cli$1.Command;
|
|
787
655
|
//#endregion
|
|
788
|
-
export type
|
|
656
|
+
export { type BridgeFinding, type BridgeKind, type BridgeProblem, type BridgeReport, type BridgeStatus, type ConfigurationFault, type ConfigurationProblem, type DiagnoseMcpOptions, type DiagnoseOptions, type DiagnoseResult, type DivergenceDirection, type DivergenceReport, type DoctorProblem, type DoctorReference, type DoctorReport, type GlobalInstructionKind, type GlobalInstructionProblem, type GlobalInstructionReport, type GlobalInstructionStatus, type GovernanceDocument, type GovernanceEntry, type GovernanceLayer, type GovernanceListReport, type GovernanceScope, type GovernanceShowReport, type Harness, type HarnessName, type HarnessScope, type HarnessScopeName, type InitializeOptions, type InitializeResult, type InstructionBridge, type InstructionKind, type InstructionProblem, type InstructionReport, type InstructionStatus, type LayerOptions, type ListMcpServersOptions, type MatchKind, type McpConfig, type McpDirection, type McpField, type McpProblem, type McpServer, type McpServerEntry, type McpTransport, type MergeMode, type ReferenceLayer, type ReferenceLayerOptions, type ReferenceListReport, type ReferenceListing, type ReferenceName, type ReferenceRow, type ReferenceSearchReport, type ReferenceShowEntry, type ReferenceStatus, type ReferenceTier, type Repair, type ResolveOptions, type ResolvedReference, type SearchMatch, type TraceEntry, type UsedLayer, listReferences, managedReferencesDir, parseReferenceName, resolveReference, searchReferences };
|
|
789
657
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/cli.ts","../src/harness-registry/instruction-bridge.ts","../src/diagnose-mcp/mcp-model.ts","../src/mcp-dialects/mcp-dialects.ts","../src/harness-registry/mcp-config.ts","../src/harness-registry/nonstandard-artifact.ts","../src/harness-registry/harness-registry.ts","../src/diagnose-bridges/diagnose-global-instructions.ts","../src/diagnose-bridges/diagnose-instructions.ts","../src/diagnose-bridges/locator.ts","../src/diagnose-bridges/doctor-guidance.ts","../src/diagnose-bridges/git-bridge-state.ts","../src/diagnose-bridges/diagnose-bridges.ts","../src/diagnose-configuration/diagnose-configuration.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/cli.ts","../src/harness-registry/instruction-bridge.ts","../src/diagnose-mcp/mcp-model.ts","../src/mcp-dialects/mcp-dialects.ts","../src/harness-registry/mcp-config.ts","../src/harness-registry/nonstandard-artifact.ts","../src/harness-registry/harness-registry.ts","../src/diagnose-bridges/diagnose-global-instructions.ts","../src/diagnose-bridges/diagnose-instructions.ts","../src/diagnose-bridges/locator.ts","../src/diagnose-bridges/doctor-guidance.ts","../src/diagnose-bridges/git-bridge-state.ts","../src/diagnose-bridges/diagnose-bridges.ts","../src/diagnose-configuration/diagnose-configuration.ts","../src/diagnose-bridges/doctor.command.ts","../src/diagnose-mcp/diagnose-mcp.ts","../src/diagnose-mcp/mcp-baseline.ts","../src/diagnose-mcp/mcp-sources.ts","../src/governance-overrides/governance-overrides.ts","../src/governance-overrides/governance.command.ts","../src/initialize-harnesses/init.command.ts","../src/skill-projection/skill-projection.ts","../src/initialize-harnesses/initialize-harnesses.ts","../src/mcp-inventory/mcp-inventory.ts","../src/references/references.ts"],"mappings":";;;;;;;;wBA0CsB,IAAI,iBAAiB;;;;;;;;KCrC/B;;EAGT;;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