@ai-primitives-hub/app 0.2.1 → 0.2.2-next.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/README.md +5 -1
- package/dist/collection/affected-collections.d.ts +11 -0
- package/dist/collection/affected-collections.d.ts.map +1 -0
- package/dist/collection/affected-collections.js +90 -0
- package/dist/collection/affected-collections.js.map +1 -0
- package/dist/collection/create-plugin.d.ts +35 -0
- package/dist/collection/create-plugin.d.ts.map +1 -0
- package/dist/collection/create-plugin.js +118 -0
- package/dist/collection/create-plugin.js.map +1 -0
- package/dist/collection/index.d.ts +4 -2
- package/dist/collection/index.d.ts.map +1 -1
- package/dist/collection/index.js +8 -4
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/kind-route-warning.d.ts +13 -0
- package/dist/collection/kind-route-warning.d.ts.map +1 -0
- package/dist/collection/kind-route-warning.js +40 -0
- package/dist/collection/kind-route-warning.js.map +1 -0
- package/dist/collection/plugin-item-issues.d.ts +36 -0
- package/dist/collection/plugin-item-issues.d.ts.map +1 -0
- package/dist/collection/plugin-item-issues.js +31 -0
- package/dist/collection/plugin-item-issues.js.map +1 -0
- package/dist/collection/read-collection.d.ts +1 -1
- package/dist/collection/read-collection.d.ts.map +1 -1
- package/dist/collection/read-collection.js +14 -15
- package/dist/collection/read-collection.js.map +1 -1
- package/dist/collection-editor/collection-contribution-workflow.d.ts +96 -0
- package/dist/collection-editor/collection-contribution-workflow.d.ts.map +1 -0
- package/dist/collection-editor/collection-contribution-workflow.js +479 -0
- package/dist/collection-editor/collection-contribution-workflow.js.map +1 -0
- package/dist/collection-editor/collection-editor-service.d.ts +232 -0
- package/dist/collection-editor/collection-editor-service.d.ts.map +1 -0
- package/dist/collection-editor/collection-editor-service.js +868 -0
- package/dist/collection-editor/collection-editor-service.js.map +1 -0
- package/dist/collection-editor/index.d.ts +7 -0
- package/dist/collection-editor/index.d.ts.map +1 -0
- package/dist/collection-editor/index.js +12 -0
- package/dist/collection-editor/index.js.map +1 -0
- package/dist/diagnostics/find-ancestor-file.d.ts +13 -0
- package/dist/diagnostics/find-ancestor-file.d.ts.map +1 -0
- package/dist/diagnostics/find-ancestor-file.js +85 -0
- package/dist/diagnostics/find-ancestor-file.js.map +1 -0
- package/dist/diagnostics/index.d.ts +10 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +26 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/diagnostics/run-primitive-diagnostics.d.ts +43 -0
- package/dist/diagnostics/run-primitive-diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/run-primitive-diagnostics.js +413 -0
- package/dist/diagnostics/run-primitive-diagnostics.js.map +1 -0
- package/dist/diagnostics/sandbox-snapshot.d.ts +20 -0
- package/dist/diagnostics/sandbox-snapshot.d.ts.map +1 -0
- package/dist/diagnostics/sandbox-snapshot.js +117 -0
- package/dist/diagnostics/sandbox-snapshot.js.map +1 -0
- package/dist/governance/generate-catalogue.d.ts +16 -0
- package/dist/governance/generate-catalogue.d.ts.map +1 -0
- package/dist/governance/generate-catalogue.js +67 -0
- package/dist/governance/generate-catalogue.js.map +1 -0
- package/dist/governance/hub-scoped-governance.d.ts +37 -0
- package/dist/governance/hub-scoped-governance.d.ts.map +1 -0
- package/dist/governance/hub-scoped-governance.js +110 -0
- package/dist/governance/hub-scoped-governance.js.map +1 -0
- package/dist/governance/index.d.ts +10 -0
- package/dist/governance/index.d.ts.map +1 -0
- package/dist/governance/index.js +26 -0
- package/dist/governance/index.js.map +1 -0
- package/dist/governance/load-config.d.ts +45 -0
- package/dist/governance/load-config.d.ts.map +1 -0
- package/dist/governance/load-config.js +137 -0
- package/dist/governance/load-config.js.map +1 -0
- package/dist/governance/pr-scope.d.ts +23 -0
- package/dist/governance/pr-scope.d.ts.map +1 -0
- package/dist/governance/pr-scope.js +22 -0
- package/dist/governance/pr-scope.js.map +1 -0
- package/dist/governance/report.d.ts +23 -0
- package/dist/governance/report.d.ts.map +1 -0
- package/dist/governance/report.js +177 -0
- package/dist/governance/report.js.map +1 -0
- package/dist/governance/run-governance.d.ts +22 -0
- package/dist/governance/run-governance.d.ts.map +1 -0
- package/dist/governance/run-governance.js +78 -0
- package/dist/governance/run-governance.js.map +1 -0
- package/dist/governance/source-checks.d.ts +29 -0
- package/dist/governance/source-checks.d.ts.map +1 -0
- package/dist/governance/source-checks.js +80 -0
- package/dist/governance/source-checks.js.map +1 -0
- package/dist/governance/validate-collection-governance.d.ts +46 -0
- package/dist/governance/validate-collection-governance.d.ts.map +1 -0
- package/dist/governance/validate-collection-governance.js +291 -0
- package/dist/governance/validate-collection-governance.js.map +1 -0
- package/dist/hub-editor/hub-config-editor-service.d.ts +94 -0
- package/dist/hub-editor/hub-config-editor-service.d.ts.map +1 -0
- package/dist/hub-editor/hub-config-editor-service.js +289 -0
- package/dist/hub-editor/hub-config-editor-service.js.map +1 -0
- package/dist/hub-editor/hub-contribution-workflow.d.ts +99 -0
- package/dist/hub-editor/hub-contribution-workflow.d.ts.map +1 -0
- package/dist/hub-editor/hub-contribution-workflow.js +385 -0
- package/dist/hub-editor/hub-contribution-workflow.js.map +1 -0
- package/dist/hub-editor/index.d.ts +7 -0
- package/dist/hub-editor/index.d.ts.map +1 -0
- package/dist/hub-editor/index.js +23 -0
- package/dist/hub-editor/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/install/index.d.ts +2 -0
- package/dist/install/index.d.ts.map +1 -1
- package/dist/install/index.js +3 -1
- package/dist/install/index.js.map +1 -1
- package/dist/install/partial-target-write.d.ts +63 -0
- package/dist/install/partial-target-write.d.ts.map +1 -0
- package/dist/install/partial-target-write.js +128 -0
- package/dist/install/partial-target-write.js.map +1 -0
- package/dist/install/pipeline.d.ts +2 -1
- package/dist/install/pipeline.d.ts.map +1 -1
- package/dist/install/pipeline.js +4 -3
- package/dist/install/pipeline.js.map +1 -1
- package/dist/install/target-write.d.ts +10 -0
- package/dist/install/target-write.d.ts.map +1 -1
- package/dist/install/target-write.js +3 -2
- package/dist/install/target-write.js.map +1 -1
- package/dist/install/uninstall-pipeline.d.ts +11 -10
- package/dist/install/uninstall-pipeline.d.ts.map +1 -1
- package/dist/install/uninstall-pipeline.js +10 -11
- package/dist/install/uninstall-pipeline.js.map +1 -1
- package/dist/records/atomic-write.d.ts +11 -0
- package/dist/records/atomic-write.d.ts.map +1 -0
- package/dist/records/atomic-write.js +66 -0
- package/dist/records/atomic-write.js.map +1 -0
- package/dist/records/confine-path.d.ts +35 -0
- package/dist/records/confine-path.d.ts.map +1 -0
- package/dist/records/confine-path.js +140 -0
- package/dist/records/confine-path.js.map +1 -0
- package/dist/records/git-root.d.ts +66 -0
- package/dist/records/git-root.d.ts.map +1 -0
- package/dist/records/git-root.js +208 -0
- package/dist/records/git-root.js.map +1 -0
- package/dist/records/index.d.ts +30 -0
- package/dist/records/index.d.ts.map +1 -0
- package/dist/records/index.js +46 -0
- package/dist/records/index.js.map +1 -0
- package/dist/records/install-record-service.d.ts +496 -0
- package/dist/records/install-record-service.d.ts.map +1 -0
- package/dist/records/install-record-service.js +1365 -0
- package/dist/records/install-record-service.js.map +1 -0
- package/dist/records/install-record-services.d.ts +29 -0
- package/dist/records/install-record-services.d.ts.map +1 -0
- package/dist/records/install-record-services.js +17 -0
- package/dist/records/install-record-services.js.map +1 -0
- package/dist/records/legacy-shapes.d.ts +18 -0
- package/dist/records/legacy-shapes.d.ts.map +1 -0
- package/dist/records/legacy-shapes.js +30 -0
- package/dist/records/legacy-shapes.js.map +1 -0
- package/dist/records/map-tool-to-target.d.ts +33 -0
- package/dist/records/map-tool-to-target.d.ts.map +1 -0
- package/dist/records/map-tool-to-target.js +98 -0
- package/dist/records/map-tool-to-target.js.map +1 -0
- package/dist/records/mcp-servers.d.ts +116 -0
- package/dist/records/mcp-servers.d.ts.map +1 -0
- package/dist/records/mcp-servers.js +268 -0
- package/dist/records/mcp-servers.js.map +1 -0
- package/dist/records/modified-files.d.ts +32 -0
- package/dist/records/modified-files.d.ts.map +1 -0
- package/dist/records/modified-files.js +146 -0
- package/dist/records/modified-files.js.map +1 -0
- package/dist/records/plan-record-entries.d.ts +76 -0
- package/dist/records/plan-record-entries.d.ts.map +1 -0
- package/dist/records/plan-record-entries.js +84 -0
- package/dist/records/plan-record-entries.js.map +1 -0
- package/dist/records/read-record-text.d.ts +15 -0
- package/dist/records/read-record-text.d.ts.map +1 -0
- package/dist/records/read-record-text.js +36 -0
- package/dist/records/read-record-text.js.map +1 -0
- package/dist/records/record-entry.d.ts +31 -0
- package/dist/records/record-entry.d.ts.map +1 -0
- package/dist/records/record-entry.js +81 -0
- package/dist/records/record-entry.js.map +1 -0
- package/dist/records/record-file-shape.d.ts +90 -0
- package/dist/records/record-file-shape.d.ts.map +1 -0
- package/dist/records/record-file-shape.js +288 -0
- package/dist/records/record-file-shape.js.map +1 -0
- package/dist/records/record-hub.d.ts +42 -0
- package/dist/records/record-hub.d.ts.map +1 -0
- package/dist/records/record-hub.js +85 -0
- package/dist/records/record-hub.js.map +1 -0
- package/dist/records/record-identity.d.ts +14 -0
- package/dist/records/record-identity.d.ts.map +1 -0
- package/dist/records/record-identity.js +41 -0
- package/dist/records/record-identity.js.map +1 -0
- package/dist/records/record-migration.d.ts +118 -0
- package/dist/records/record-migration.d.ts.map +1 -0
- package/dist/records/record-migration.js +454 -0
- package/dist/records/record-migration.js.map +1 -0
- package/dist/records/record-store.d.ts +123 -0
- package/dist/records/record-store.d.ts.map +1 -0
- package/dist/records/record-store.js +291 -0
- package/dist/records/record-store.js.map +1 -0
- package/dist/records/resolve-record-source.d.ts +64 -0
- package/dist/records/resolve-record-source.d.ts.map +1 -0
- package/dist/records/resolve-record-source.js +160 -0
- package/dist/records/resolve-record-source.js.map +1 -0
- package/dist/records/sanitize-source.d.ts +18 -0
- package/dist/records/sanitize-source.d.ts.map +1 -0
- package/dist/records/sanitize-source.js +90 -0
- package/dist/records/sanitize-source.js.map +1 -0
- package/dist/records/select-record.d.ts +54 -0
- package/dist/records/select-record.d.ts.map +1 -0
- package/dist/records/select-record.js +180 -0
- package/dist/records/select-record.js.map +1 -0
- package/dist/records/serialize-record.d.ts +20 -0
- package/dist/records/serialize-record.d.ts.map +1 -0
- package/dist/records/serialize-record.js +100 -0
- package/dist/records/serialize-record.js.map +1 -0
- package/dist/records/source-fields.d.ts +21 -0
- package/dist/records/source-fields.d.ts.map +1 -0
- package/dist/records/source-fields.js +28 -0
- package/dist/records/source-fields.js.map +1 -0
- package/dist/records/to-record-source.d.ts +23 -0
- package/dist/records/to-record-source.d.ts.map +1 -0
- package/dist/records/to-record-source.js +39 -0
- package/dist/records/to-record-source.js.map +1 -0
- package/dist/records/user-home.d.ts +16 -0
- package/dist/records/user-home.d.ts.map +1 -0
- package/dist/records/user-home.js +84 -0
- package/dist/records/user-home.js.map +1 -0
- package/dist/records/writer-group.d.ts +7 -0
- package/dist/records/writer-group.d.ts.map +1 -0
- package/dist/records/writer-group.js +31 -0
- package/dist/records/writer-group.js.map +1 -0
- package/dist/registry/activate-registry-profile.d.ts.map +1 -1
- package/dist/registry/activate-registry-profile.js +4 -1
- package/dist/registry/activate-registry-profile.js.map +1 -1
- package/dist/registry/batch-install-profile.d.ts +76 -0
- package/dist/registry/batch-install-profile.d.ts.map +1 -0
- package/dist/registry/batch-install-profile.js +67 -0
- package/dist/registry/batch-install-profile.js.map +1 -0
- package/dist/registry/create-source-adapter.d.ts +16 -1
- package/dist/registry/create-source-adapter.d.ts.map +1 -1
- package/dist/registry/create-source-adapter.js +76 -3
- package/dist/registry/create-source-adapter.js.map +1 -1
- package/dist/registry/hub-manager.d.ts +41 -0
- package/dist/registry/hub-manager.d.ts.map +1 -1
- package/dist/registry/hub-manager.js +82 -4
- package/dist/registry/hub-manager.js.map +1 -1
- package/dist/registry/index.d.ts +1 -0
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -0
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/install-registry-bundle.js +4 -3
- package/dist/registry/install-registry-bundle.js.map +1 -1
- package/dist/registry/list-installed-bundles.d.ts +2 -3
- package/dist/registry/list-installed-bundles.d.ts.map +1 -1
- package/dist/registry/list-installed-bundles.js.map +1 -1
- package/dist/registry/load-hub-sources.d.ts +8 -0
- package/dist/registry/load-hub-sources.d.ts.map +1 -1
- package/dist/registry/load-hub-sources.js +70 -3
- package/dist/registry/load-hub-sources.js.map +1 -1
- package/dist/registry/profile-lifecycle.d.ts +7 -2
- package/dist/registry/profile-lifecycle.d.ts.map +1 -1
- package/dist/registry/profile-lifecycle.js +82 -11
- package/dist/registry/profile-lifecycle.js.map +1 -1
- package/dist/registry/uninstall-installed-bundle.d.ts +2 -3
- package/dist/registry/uninstall-installed-bundle.d.ts.map +1 -1
- package/dist/registry/uninstall-installed-bundle.js.map +1 -1
- package/dist/registry/update-registry-bundle.d.ts +2 -2
- package/dist/registry/update-registry-bundle.js +2 -2
- package/dist/registry/update-registry-bundle.js.map +1 -1
- package/dist/registry/validate-hub-config-file.d.ts +14 -1
- package/dist/registry/validate-hub-config-file.d.ts.map +1 -1
- package/dist/registry/validate-hub-config-file.js +81 -44
- package/dist/registry/validate-hub-config-file.js.map +1 -1
- package/dist/release/plan-bundle-release.d.ts +6 -12
- package/dist/release/plan-bundle-release.d.ts.map +1 -1
- package/dist/release/plan-bundle-release.js +178 -7
- package/dist/release/plan-bundle-release.js.map +1 -1
- package/dist/replicate/replicate.d.ts +5 -2
- package/dist/replicate/replicate.d.ts.map +1 -1
- package/dist/replicate/replicate.js +121 -17
- package/dist/replicate/replicate.js.map +1 -1
- package/dist/security/index.d.ts +4 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +22 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/rating/bundle-discovery.d.ts +19 -0
- package/dist/security/rating/bundle-discovery.d.ts.map +1 -0
- package/dist/security/rating/bundle-discovery.js +244 -0
- package/dist/security/rating/bundle-discovery.js.map +1 -0
- package/dist/security/rating/index.d.ts +5 -0
- package/dist/security/rating/index.d.ts.map +1 -0
- package/dist/security/rating/index.js +21 -0
- package/dist/security/rating/index.js.map +1 -0
- package/dist/security/rating/security-rating-markdown.d.ts +17 -0
- package/dist/security/rating/security-rating-markdown.d.ts.map +1 -0
- package/dist/security/rating/security-rating-markdown.js +131 -0
- package/dist/security/rating/security-rating-markdown.js.map +1 -0
- package/dist/security/rating/security-rating-scan.d.ts +23 -0
- package/dist/security/rating/security-rating-scan.d.ts.map +1 -0
- package/dist/security/rating/security-rating-scan.js +40 -0
- package/dist/security/rating/security-rating-scan.js.map +1 -0
- package/dist/security/rating/security-rating-templates.d.ts +40 -0
- package/dist/security/rating/security-rating-templates.d.ts.map +1 -0
- package/dist/security/rating/security-rating-templates.js +83 -0
- package/dist/security/rating/security-rating-templates.js.map +1 -0
- package/dist/security/rating/security-rating.d.ts +32 -0
- package/dist/security/rating/security-rating.d.ts.map +1 -0
- package/dist/security/rating/security-rating.js +94 -0
- package/dist/security/rating/security-rating.js.map +1 -0
- package/dist/security/security-scan-use-case.d.ts +101 -0
- package/dist/security/security-scan-use-case.d.ts.map +1 -0
- package/dist/security/security-scan-use-case.js +185 -0
- package/dist/security/security-scan-use-case.js.map +1 -0
- package/dist/stores/json-lockfile-store.d.ts.map +1 -1
- package/dist/stores/json-lockfile-store.js +6 -32
- package/dist/stores/json-lockfile-store.js.map +1 -1
- package/dist/transform/transformer-registry.d.ts.map +1 -1
- package/dist/transform/transformer-registry.js +3 -0
- package/dist/transform/transformer-registry.js.map +1 -1
- package/dist/transform/transformers/windsurf-transformer.d.ts +5 -0
- package/dist/transform/transformers/windsurf-transformer.d.ts.map +1 -1
- package/dist/transform/transformers/windsurf-transformer.js.map +1 -1
- package/dist/writers/file-tree-writer.d.ts +14 -1
- package/dist/writers/file-tree-writer.d.ts.map +1 -1
- package/dist/writers/file-tree-writer.js +23 -71
- package/dist/writers/file-tree-writer.js.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { type CollectionChangeSummary, type CollectionCursorNodeContext, type CollectionInlineDecoration, type CollectionManifest, type CollectionValidationDiagnostic, type SourceRange } from '@ai-primitives-hub/core';
|
|
2
|
+
import { type CollectionYamlMutation, type SiblingCollectionSummary } from '@ai-primitives-hub/infra';
|
|
3
|
+
export interface CollectionItemFileStatus {
|
|
4
|
+
index: number;
|
|
5
|
+
path: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
inferredKind: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
tags?: string[];
|
|
11
|
+
exists: boolean;
|
|
12
|
+
routeMismatch: boolean;
|
|
13
|
+
previewTitle?: string;
|
|
14
|
+
previewDescription?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkspacePrimitiveCandidate {
|
|
17
|
+
path: string;
|
|
18
|
+
kind: string;
|
|
19
|
+
title: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CollectionDocumentInspection {
|
|
23
|
+
valid: boolean;
|
|
24
|
+
manifest?: CollectionManifest;
|
|
25
|
+
errors: string[];
|
|
26
|
+
warnings: string[];
|
|
27
|
+
diagnostics: CollectionValidationDiagnostic[];
|
|
28
|
+
inlineDecorations: CollectionInlineDecoration[];
|
|
29
|
+
nodeRanges: Map<string, SourceRange>;
|
|
30
|
+
itemStatuses: CollectionItemFileStatus[];
|
|
31
|
+
readmeExists: boolean;
|
|
32
|
+
unassignedPrimitives: WorkspacePrimitiveCandidate[];
|
|
33
|
+
}
|
|
34
|
+
export interface WorkspaceCollectionSummary {
|
|
35
|
+
filePath: string;
|
|
36
|
+
relPath: string;
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
version: string;
|
|
40
|
+
description: string;
|
|
41
|
+
itemCount: number;
|
|
42
|
+
mcpServerCount: number;
|
|
43
|
+
valid: boolean;
|
|
44
|
+
errorCount: number;
|
|
45
|
+
warningCount: number;
|
|
46
|
+
inspection: CollectionDocumentInspection;
|
|
47
|
+
}
|
|
48
|
+
export interface WorkspaceCollectionsOverview {
|
|
49
|
+
workspaceRoot: string;
|
|
50
|
+
collectionsPath: string;
|
|
51
|
+
collections: WorkspaceCollectionSummary[];
|
|
52
|
+
workspacePrimitives: WorkspacePrimitiveCandidate[];
|
|
53
|
+
totalErrors: number;
|
|
54
|
+
totalWarnings: number;
|
|
55
|
+
valid: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface PrimitiveVisualContent {
|
|
58
|
+
relPath: string;
|
|
59
|
+
absPath: string;
|
|
60
|
+
kind: string;
|
|
61
|
+
exists: boolean;
|
|
62
|
+
format: 'markdown-frontmatter' | 'plugin-json' | 'json' | 'raw';
|
|
63
|
+
frontmatter: Record<string, unknown>;
|
|
64
|
+
body: string;
|
|
65
|
+
rawContent: string;
|
|
66
|
+
rawFrontmatter?: string;
|
|
67
|
+
parseError?: string;
|
|
68
|
+
pluginManifest?: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
export interface PrimitiveVisualContentUpdate {
|
|
71
|
+
kind?: string;
|
|
72
|
+
frontmatter?: Record<string, unknown>;
|
|
73
|
+
body?: string;
|
|
74
|
+
pluginManifest?: Record<string, unknown>;
|
|
75
|
+
rawContent?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface CreateCollectionVisualInput {
|
|
78
|
+
id: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
author?: string;
|
|
82
|
+
version?: string;
|
|
83
|
+
tags?: string[];
|
|
84
|
+
collectionsPath?: string;
|
|
85
|
+
createReadme?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface ScaffoldPrimitiveForCollectionInput {
|
|
88
|
+
kind: string;
|
|
89
|
+
name: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
author?: string;
|
|
92
|
+
body?: string;
|
|
93
|
+
customRelPath?: string;
|
|
94
|
+
applyTo?: string;
|
|
95
|
+
tools?: string[];
|
|
96
|
+
model?: string;
|
|
97
|
+
tags?: string[];
|
|
98
|
+
addToCollection?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare class CollectionEditorService {
|
|
101
|
+
private readonly primitivesCacheByWorkspace;
|
|
102
|
+
private readonly siblingsCacheByDir;
|
|
103
|
+
private buildFileProbe;
|
|
104
|
+
private collectSiblingSummaries;
|
|
105
|
+
/**
|
|
106
|
+
* Workspace-relative, forward-slash label for a file. The root and parent
|
|
107
|
+
* directory are compared by realpath so OS path aliases (macOS `/var` →
|
|
108
|
+
* `/private/var`, Windows 8.3 short names) still yield `collections/<file>`;
|
|
109
|
+
* the file name itself is kept, so a symlinked collection keeps its own label.
|
|
110
|
+
* @param workspaceRoot Workspace root directory.
|
|
111
|
+
* @param filePath File path inside the workspace.
|
|
112
|
+
*/
|
|
113
|
+
private toWorkspaceRelativeLabel;
|
|
114
|
+
/**
|
|
115
|
+
* Invalidate cached workspace primitive and sibling collection scans.
|
|
116
|
+
* @param workspaceRoot Optional workspace root path to clear; clears all when omitted.
|
|
117
|
+
*/
|
|
118
|
+
clearWorkspaceCache(workspaceRoot?: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Discover all candidate primitive files across standard repository folders.
|
|
121
|
+
* @param workspaceRoot Repository root path.
|
|
122
|
+
*/
|
|
123
|
+
discoverWorkspacePrimitives(workspaceRoot: string): WorkspacePrimitiveCandidate[];
|
|
124
|
+
/**
|
|
125
|
+
* Inspect a `.collection.yml` document string and resolve item statuses,
|
|
126
|
+
* diagnostics, inline decorations, and unassigned workspace primitives.
|
|
127
|
+
* @param content Raw YAML document string.
|
|
128
|
+
* @param options Optional file path, workspace root, sibling summaries, and pre-discovered primitives.
|
|
129
|
+
* @param options.filePath
|
|
130
|
+
* @param options.workspaceRoot
|
|
131
|
+
* @param options.siblingCollections
|
|
132
|
+
* @param options.workspacePrimitives
|
|
133
|
+
*/
|
|
134
|
+
inspectDocument(content: string, options?: {
|
|
135
|
+
filePath?: string;
|
|
136
|
+
workspaceRoot?: string;
|
|
137
|
+
siblingCollections?: SiblingCollectionSummary[];
|
|
138
|
+
workspacePrimitives?: WorkspacePrimitiveCandidate[];
|
|
139
|
+
}): CollectionDocumentInspection;
|
|
140
|
+
/**
|
|
141
|
+
* Detect and inspect all `*.collection.{yml,yaml}` files in a workspace.
|
|
142
|
+
* @param workspaceRoot Workspace root directory.
|
|
143
|
+
* @param collectionsPath Relative collections folder (default `'collections'`).
|
|
144
|
+
*/
|
|
145
|
+
detectWorkspaceCollections(workspaceRoot: string, collectionsPath?: string): WorkspaceCollectionsOverview;
|
|
146
|
+
/**
|
|
147
|
+
* Apply a comment-preserving YAML mutation and re-inspect the document.
|
|
148
|
+
* @param content Current YAML content.
|
|
149
|
+
* @param mutation Mutation payload.
|
|
150
|
+
* @param options Inspection context options.
|
|
151
|
+
* @param options.filePath
|
|
152
|
+
* @param options.workspaceRoot
|
|
153
|
+
* @param options.siblingCollections
|
|
154
|
+
*/
|
|
155
|
+
applyMutation(content: string, mutation: CollectionYamlMutation, options?: {
|
|
156
|
+
filePath?: string;
|
|
157
|
+
workspaceRoot?: string;
|
|
158
|
+
siblingCollections?: SiblingCollectionSummary[];
|
|
159
|
+
}): {
|
|
160
|
+
updatedContent: string;
|
|
161
|
+
inspection: CollectionDocumentInspection;
|
|
162
|
+
};
|
|
163
|
+
locateCursor(content: string, line: number): CollectionCursorNodeContext;
|
|
164
|
+
summarizeChanges(baseContent: string | undefined, currentContent: string): CollectionChangeSummary;
|
|
165
|
+
/**
|
|
166
|
+
* Create a new `.collection.yml` file (and optional starter README) on disk.
|
|
167
|
+
* @param workspaceRoot Workspace root directory.
|
|
168
|
+
* @param input New collection configuration.
|
|
169
|
+
*/
|
|
170
|
+
createCollectionFile(workspaceRoot: string, input: CreateCollectionVisualInput): {
|
|
171
|
+
filePath: string;
|
|
172
|
+
relPath: string;
|
|
173
|
+
content: string;
|
|
174
|
+
inspection: CollectionDocumentInspection;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Duplicate an existing `.collection.yml` file under a new `id` and `name`.
|
|
178
|
+
* @param workspaceRoot Workspace root directory.
|
|
179
|
+
* @param sourceFilePath Existing `.collection.yml` path (absolute or relative).
|
|
180
|
+
* @param newId New collection ID.
|
|
181
|
+
* @param newName Optional new collection display name.
|
|
182
|
+
*/
|
|
183
|
+
duplicateCollectionFile(workspaceRoot: string, sourceFilePath: string, newId: string, newName?: string): {
|
|
184
|
+
filePath: string;
|
|
185
|
+
relPath: string;
|
|
186
|
+
content: string;
|
|
187
|
+
inspection: CollectionDocumentInspection;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Delete a `.collection.yml` file from disk.
|
|
191
|
+
* @param workspaceRoot Workspace root directory.
|
|
192
|
+
* @param filePath Collection file path (absolute or relative).
|
|
193
|
+
*/
|
|
194
|
+
deleteCollectionFile(workspaceRoot: string, filePath: string): void;
|
|
195
|
+
/**
|
|
196
|
+
* Scaffold a new or missing primitive file (`prompt`, `instruction`, `agent`,
|
|
197
|
+
* `skill`, `plugin`, `hook`, `readme`, etc.) on disk and optionally add it to
|
|
198
|
+
* the collection manifest.
|
|
199
|
+
* @param workspaceRoot Workspace root directory.
|
|
200
|
+
* @param collectionContent Current `.collection.yml` content.
|
|
201
|
+
* @param input Scaffolding parameters.
|
|
202
|
+
* @param options Optional inspection options.
|
|
203
|
+
* @param options.filePath
|
|
204
|
+
* @param options.siblingCollections
|
|
205
|
+
*/
|
|
206
|
+
scaffoldPrimitiveForCollection(workspaceRoot: string, collectionContent: string, input: ScaffoldPrimitiveForCollectionInput, options?: {
|
|
207
|
+
filePath?: string;
|
|
208
|
+
siblingCollections?: SiblingCollectionSummary[];
|
|
209
|
+
}): Promise<{
|
|
210
|
+
createdFileRelPath: string;
|
|
211
|
+
createdFileAbsPath: string;
|
|
212
|
+
updatedCollectionContent: string;
|
|
213
|
+
inspection: CollectionDocumentInspection;
|
|
214
|
+
}>;
|
|
215
|
+
/**
|
|
216
|
+
* Read a referenced primitive file or README into a structured visual model
|
|
217
|
+
* (YAML frontmatter + Markdown body, or parsed `plugin.json`).
|
|
218
|
+
* @param workspaceRoot Workspace root directory.
|
|
219
|
+
* @param relPath Repo-relative path to the primitive file.
|
|
220
|
+
* @param kind Optional primitive kind override.
|
|
221
|
+
*/
|
|
222
|
+
readPrimitiveContent(workspaceRoot: string, relPath: string, kind?: string): PrimitiveVisualContent;
|
|
223
|
+
/**
|
|
224
|
+
* Write visual edits (frontmatter + Markdown body, `plugin.json` manifest, or
|
|
225
|
+
* raw text) back to a referenced primitive file on disk.
|
|
226
|
+
* @param workspaceRoot Workspace root directory.
|
|
227
|
+
* @param relPath Repo-relative path to the primitive file.
|
|
228
|
+
* @param update Content update payload.
|
|
229
|
+
*/
|
|
230
|
+
writePrimitiveContent(workspaceRoot: string, relPath: string, update: PrimitiveVisualContentUpdate): PrimitiveVisualContent;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=collection-editor-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collection-editor-service.d.ts","sourceRoot":"","sources":["../../src/collection-editor/collection-editor-service.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAE/B,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EASnC,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,KAAK,sBAAsB,EAG3B,KAAK,wBAAwB,EAG9B,MAAM,0BAA0B,CAAC;AAMlC,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,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