opencode-swarm 7.63.0 → 7.65.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/.opencode/skills/swarm-pr-review/SKILL.md +124 -0
- package/README.md +57 -0
- package/dist/agents/architect.d.ts +1 -1
- package/dist/cli/index.js +192 -23
- package/dist/config/constants.d.ts +2 -0
- package/dist/config/evidence-schema.d.ts +44 -44
- package/dist/config/schema.d.ts +187 -0
- package/dist/hooks/knowledge-store.d.ts +2 -1
- package/dist/hooks/knowledge-validator.d.ts +5 -0
- package/dist/index.js +2561 -613
- package/dist/memory/schema.d.ts +2 -2
- package/dist/services/external-skill-store.d.ts +96 -0
- package/dist/services/external-skill-validator.d.ts +160 -0
- package/dist/summaries/schema.d.ts +15 -0
- package/dist/summaries/store.d.ts +5 -0
- package/dist/tools/external-skill-delete.d.ts +16 -0
- package/dist/tools/external-skill-discover.d.ts +21 -0
- package/dist/tools/external-skill-inspect.d.ts +15 -0
- package/dist/tools/external-skill-list.d.ts +15 -0
- package/dist/tools/external-skill-promote.d.ts +20 -0
- package/dist/tools/external-skill-reject.d.ts +15 -0
- package/dist/tools/external-skill-revoke.d.ts +17 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/manifest.d.ts +7 -0
- package/dist/tools/plugin-registration.d.ts +4 -1
- package/dist/tools/submit-phase-council-verdicts.d.ts +2 -0
- package/dist/tools/tool-metadata.d.ts +28 -0
- package/dist/tools/write-drift-evidence.d.ts +4 -0
- package/package.json +1 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -607,6 +607,7 @@ export declare const ArchitecturalSupervisionConfigSchema: z.ZodObject<{
|
|
|
607
607
|
max_phase_summary_words: z.ZodDefault<z.ZodNumber>;
|
|
608
608
|
allow_concerns_to_complete: z.ZodDefault<z.ZodBoolean>;
|
|
609
609
|
persist_knowledge_recommendations: z.ZodDefault<z.ZodBoolean>;
|
|
610
|
+
provenance_verify: z.ZodDefault<z.ZodBoolean>;
|
|
610
611
|
}, z.core.$strip>;
|
|
611
612
|
export type ArchitecturalSupervisionConfig = z.infer<typeof ArchitecturalSupervisionConfigSchema>;
|
|
612
613
|
export declare const KnowledgeApplicationConfigSchema: z.ZodObject<{
|
|
@@ -962,6 +963,163 @@ export declare const TurboConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
962
963
|
}, z.core.$strip>;
|
|
963
964
|
}, z.core.$strip>], "strategy">;
|
|
964
965
|
export type TurboConfig = z.infer<typeof TurboConfigSchema>;
|
|
966
|
+
/** Where an external skill candidate was discovered. */
|
|
967
|
+
export declare const ExternalSkillCandidateSourceTypeSchema: z.ZodEnum<{
|
|
968
|
+
github: "github";
|
|
969
|
+
url: "url";
|
|
970
|
+
collection: "collection";
|
|
971
|
+
manual_import: "manual_import";
|
|
972
|
+
}>;
|
|
973
|
+
export type ExternalSkillCandidateSourceType = z.infer<typeof ExternalSkillCandidateSourceTypeSchema>;
|
|
974
|
+
/** Evaluation verdict for an external skill candidate. */
|
|
975
|
+
export declare const ExternalSkillCandidateEvaluationVerdictSchema: z.ZodEnum<{
|
|
976
|
+
pending: "pending";
|
|
977
|
+
in_review: "in_review";
|
|
978
|
+
quarantined: "quarantined";
|
|
979
|
+
passed: "passed";
|
|
980
|
+
rejected: "rejected";
|
|
981
|
+
promoted: "promoted";
|
|
982
|
+
revoked: "revoked";
|
|
983
|
+
}>;
|
|
984
|
+
export type ExternalSkillCandidateEvaluationVerdict = z.infer<typeof ExternalSkillCandidateEvaluationVerdictSchema>;
|
|
985
|
+
/** A single discovery source that feeds candidates into the quarantine store. */
|
|
986
|
+
export declare const DiscoverySourceSchema: z.ZodObject<{
|
|
987
|
+
type: z.ZodEnum<{
|
|
988
|
+
github: "github";
|
|
989
|
+
url: "url";
|
|
990
|
+
collection: "collection";
|
|
991
|
+
manual_import: "manual_import";
|
|
992
|
+
}>;
|
|
993
|
+
location: z.ZodString;
|
|
994
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
995
|
+
trust_level: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
996
|
+
low: "low";
|
|
997
|
+
medium: "medium";
|
|
998
|
+
high: "high";
|
|
999
|
+
}>>>;
|
|
1000
|
+
}, z.core.$strip>;
|
|
1001
|
+
export type DiscoverySource = z.infer<typeof DiscoverySourceSchema>;
|
|
1002
|
+
/**
|
|
1003
|
+
* A quarantined or evaluated external skill candidate awaiting promotion.
|
|
1004
|
+
* Stored in `.swarm/external-skills/` with content-addressable naming.
|
|
1005
|
+
*/
|
|
1006
|
+
export declare const ExternalSkillCandidateSchema: z.ZodObject<{
|
|
1007
|
+
id: z.ZodString;
|
|
1008
|
+
source_url: z.ZodString;
|
|
1009
|
+
source_type: z.ZodEnum<{
|
|
1010
|
+
github: "github";
|
|
1011
|
+
url: "url";
|
|
1012
|
+
collection: "collection";
|
|
1013
|
+
manual_import: "manual_import";
|
|
1014
|
+
}>;
|
|
1015
|
+
publisher: z.ZodString;
|
|
1016
|
+
sha256: z.ZodString;
|
|
1017
|
+
fetched_at: z.ZodString;
|
|
1018
|
+
skill_name: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
skill_description: z.ZodOptional<z.ZodString>;
|
|
1020
|
+
skill_body: z.ZodString;
|
|
1021
|
+
risk_flags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1022
|
+
evaluation_verdict: z.ZodDefault<z.ZodEnum<{
|
|
1023
|
+
pending: "pending";
|
|
1024
|
+
in_review: "in_review";
|
|
1025
|
+
quarantined: "quarantined";
|
|
1026
|
+
passed: "passed";
|
|
1027
|
+
rejected: "rejected";
|
|
1028
|
+
promoted: "promoted";
|
|
1029
|
+
revoked: "revoked";
|
|
1030
|
+
}>>;
|
|
1031
|
+
evaluation_history: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1032
|
+
verdict: z.ZodEnum<{
|
|
1033
|
+
pending: "pending";
|
|
1034
|
+
in_review: "in_review";
|
|
1035
|
+
quarantined: "quarantined";
|
|
1036
|
+
passed: "passed";
|
|
1037
|
+
rejected: "rejected";
|
|
1038
|
+
promoted: "promoted";
|
|
1039
|
+
revoked: "revoked";
|
|
1040
|
+
}>;
|
|
1041
|
+
timestamp: z.ZodString;
|
|
1042
|
+
actor: z.ZodString;
|
|
1043
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
candidate_id: z.ZodOptional<z.ZodString>;
|
|
1045
|
+
original_verdict: z.ZodOptional<z.ZodEnum<{
|
|
1046
|
+
pending: "pending";
|
|
1047
|
+
in_review: "in_review";
|
|
1048
|
+
quarantined: "quarantined";
|
|
1049
|
+
passed: "passed";
|
|
1050
|
+
rejected: "rejected";
|
|
1051
|
+
promoted: "promoted";
|
|
1052
|
+
revoked: "revoked";
|
|
1053
|
+
}>>;
|
|
1054
|
+
gate_results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1055
|
+
gate: z.ZodString;
|
|
1056
|
+
verdict: z.ZodString;
|
|
1057
|
+
}, z.core.$strip>>>;
|
|
1058
|
+
risk_assessment: z.ZodOptional<z.ZodObject<{
|
|
1059
|
+
total_flags: z.ZodNumber;
|
|
1060
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
1061
|
+
severity: z.ZodEnum<{
|
|
1062
|
+
error: "error";
|
|
1063
|
+
warning: "warning";
|
|
1064
|
+
}>;
|
|
1065
|
+
category: z.ZodString;
|
|
1066
|
+
}, z.core.$strip>>;
|
|
1067
|
+
}, z.core.$strip>>;
|
|
1068
|
+
risk_flags_count: z.ZodOptional<z.ZodNumber>;
|
|
1069
|
+
provenance_snapshot: z.ZodOptional<z.ZodObject<{
|
|
1070
|
+
sha256: z.ZodString;
|
|
1071
|
+
source_url: z.ZodString;
|
|
1072
|
+
publisher: z.ZodString;
|
|
1073
|
+
fetched_at: z.ZodOptional<z.ZodString>;
|
|
1074
|
+
}, z.core.$strip>>;
|
|
1075
|
+
target_path: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
promoted_content_hash: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
original_evaluation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1078
|
+
}, z.core.$strip>>>;
|
|
1079
|
+
}, z.core.$strip>;
|
|
1080
|
+
export type ExternalSkillCandidate = z.infer<typeof ExternalSkillCandidateSchema>;
|
|
1081
|
+
/** Top-level configuration block for the external skills subsystem. */
|
|
1082
|
+
export declare const ExternalSkillsConfigSchema: z.ZodObject<{
|
|
1083
|
+
curation_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1084
|
+
max_candidates: z.ZodDefault<z.ZodNumber>;
|
|
1085
|
+
max_bytes_per_candidate: z.ZodDefault<z.ZodNumber>;
|
|
1086
|
+
eviction_policy: z.ZodDefault<z.ZodEnum<{
|
|
1087
|
+
fifo: "fifo";
|
|
1088
|
+
}>>;
|
|
1089
|
+
ttl_days: z.ZodDefault<z.ZodNumber>;
|
|
1090
|
+
evaluation_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1091
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1092
|
+
type: z.ZodEnum<{
|
|
1093
|
+
github: "github";
|
|
1094
|
+
url: "url";
|
|
1095
|
+
collection: "collection";
|
|
1096
|
+
manual_import: "manual_import";
|
|
1097
|
+
}>;
|
|
1098
|
+
location: z.ZodString;
|
|
1099
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1100
|
+
trust_level: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
1101
|
+
low: "low";
|
|
1102
|
+
medium: "medium";
|
|
1103
|
+
high: "high";
|
|
1104
|
+
}>>>;
|
|
1105
|
+
}, z.core.$strip>>>;
|
|
1106
|
+
max_candidates_per_discovery: z.ZodDefault<z.ZodNumber>;
|
|
1107
|
+
max_concurrent_fetches: z.ZodDefault<z.ZodNumber>;
|
|
1108
|
+
fetch_timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
1109
|
+
}, z.core.$strip>;
|
|
1110
|
+
export type ExternalSkillsConfig = z.infer<typeof ExternalSkillsConfigSchema>;
|
|
1111
|
+
/** Default external skills configuration (all subsystems disabled). */
|
|
1112
|
+
export declare const DEFAULT_EXTERNAL_SKILLS_CONFIG: ExternalSkillsConfig;
|
|
1113
|
+
/**
|
|
1114
|
+
* Resolve the external_skills config section, merging user-provided values
|
|
1115
|
+
* over defaults. Returns the default (all-disabled) config when
|
|
1116
|
+
* `external_skills` is absent or undefined, ensuring callers never need
|
|
1117
|
+
* null checks.
|
|
1118
|
+
*
|
|
1119
|
+
* Invalid source configs produce warnings via the logger but do NOT block
|
|
1120
|
+
* plugin load (AGENTS.md #1 — fail-open, bounded init).
|
|
1121
|
+
*/
|
|
1122
|
+
export declare function resolveExternalSkillsConfig(input: unknown): ExternalSkillsConfig;
|
|
965
1123
|
export declare const PluginConfigSchema: z.ZodObject<{
|
|
966
1124
|
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
967
1125
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1371,6 +1529,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1371
1529
|
max_phase_summary_words: z.ZodDefault<z.ZodNumber>;
|
|
1372
1530
|
allow_concerns_to_complete: z.ZodDefault<z.ZodBoolean>;
|
|
1373
1531
|
persist_knowledge_recommendations: z.ZodDefault<z.ZodBoolean>;
|
|
1532
|
+
provenance_verify: z.ZodDefault<z.ZodBoolean>;
|
|
1374
1533
|
}, z.core.$strip>>;
|
|
1375
1534
|
knowledge_application: z.ZodOptional<z.ZodObject<{
|
|
1376
1535
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1623,6 +1782,34 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1623
1782
|
every_minutes: z.ZodDefault<z.ZodNumber>;
|
|
1624
1783
|
}, z.core.$strip>>;
|
|
1625
1784
|
}, z.core.$strip>>>;
|
|
1785
|
+
external_skills: z.ZodOptional<z.ZodObject<{
|
|
1786
|
+
curation_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1787
|
+
max_candidates: z.ZodDefault<z.ZodNumber>;
|
|
1788
|
+
max_bytes_per_candidate: z.ZodDefault<z.ZodNumber>;
|
|
1789
|
+
eviction_policy: z.ZodDefault<z.ZodEnum<{
|
|
1790
|
+
fifo: "fifo";
|
|
1791
|
+
}>>;
|
|
1792
|
+
ttl_days: z.ZodDefault<z.ZodNumber>;
|
|
1793
|
+
evaluation_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1794
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1795
|
+
type: z.ZodEnum<{
|
|
1796
|
+
github: "github";
|
|
1797
|
+
url: "url";
|
|
1798
|
+
collection: "collection";
|
|
1799
|
+
manual_import: "manual_import";
|
|
1800
|
+
}>;
|
|
1801
|
+
location: z.ZodString;
|
|
1802
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1803
|
+
trust_level: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
1804
|
+
low: "low";
|
|
1805
|
+
medium: "medium";
|
|
1806
|
+
high: "high";
|
|
1807
|
+
}>>>;
|
|
1808
|
+
}, z.core.$strip>>>;
|
|
1809
|
+
max_candidates_per_discovery: z.ZodDefault<z.ZodNumber>;
|
|
1810
|
+
max_concurrent_fetches: z.ZodDefault<z.ZodNumber>;
|
|
1811
|
+
fetch_timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
1812
|
+
}, z.core.$strip>>;
|
|
1626
1813
|
}, z.core.$strip>;
|
|
1627
1814
|
export type PluginConfig = z.infer<typeof PluginConfigSchema>;
|
|
1628
1815
|
export type { AgentName, PipelineAgentName, QAAgentName, } from './constants';
|
|
@@ -24,6 +24,7 @@ export declare function appendKnowledge<T>(filePath: string, entry: T): Promise<
|
|
|
24
24
|
export declare function rewriteKnowledge<T>(filePath: string, entries: T[]): Promise<void>;
|
|
25
25
|
export declare function transactFile<T>(filePath: string, read: (filePath: string) => Promise<T>, write: (filePath: string, data: T) => Promise<void>, mutate: (data: T) => T | null): Promise<boolean>;
|
|
26
26
|
export declare function transactKnowledge<T>(filePath: string, mutate: (entries: T[]) => T[] | null): Promise<boolean>;
|
|
27
|
+
export declare function appendKnowledgeWithCapEnforcement<T>(filePath: string, entry: T, maxEntries: number): Promise<boolean>;
|
|
27
28
|
export declare function enforceKnowledgeCap<T>(filePath: string, maxEntries: number): Promise<void>;
|
|
28
29
|
export interface SweepResult {
|
|
29
30
|
scanned: number;
|
|
@@ -34,7 +35,7 @@ export interface SweepResult {
|
|
|
34
35
|
}
|
|
35
36
|
export declare function sweepAgedEntries<T extends KnowledgeEntryBase>(filePath: string, defaultMaxPhases: number): Promise<SweepResult>;
|
|
36
37
|
export declare function sweepStaleTodos<T extends KnowledgeEntryBase>(filePath: string, todoMaxPhases: number): Promise<SweepResult>;
|
|
37
|
-
export declare function appendRejectedLesson(directory: string, lesson: RejectedLesson): Promise<void>;
|
|
38
|
+
export declare function appendRejectedLesson(directory: string, lesson: RejectedLesson, maxEntries?: number): Promise<void>;
|
|
38
39
|
export declare function normalize(text: string): string;
|
|
39
40
|
export declare function wordBigrams(text: string): Set<string>;
|
|
40
41
|
export declare function jaccardBigram(a: Set<string>, b: Set<string>): number;
|
|
@@ -27,6 +27,11 @@ export interface ActionableValidationResult {
|
|
|
27
27
|
}
|
|
28
28
|
/** Validate a generated_skill_path: must be repo-local and under an allowed prefix. */
|
|
29
29
|
export declare function validateSkillPath(p: unknown): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Validate that a path is a valid candidate storage path under `.swarm/skills/candidates/`.
|
|
32
|
+
* The filename must be a UUID v4 (canonical, no braces) with `.json` extension.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateSkillCandidatePath(p: unknown): boolean;
|
|
30
35
|
/** Validate the optional ActionableDirectiveFields block on a knowledge entry. */
|
|
31
36
|
export declare function validateActionableFields(fields: ActionableDirectiveFields | undefined): ActionableValidationResult;
|
|
32
37
|
export type { ActionableDirectiveFields, DirectivePriority };
|