@agentxm/extension-content 0.38.0 → 0.41.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/dist/src/content/frontmatter.js +9 -22
- package/dist/src/content/skill-content.d.ts +14 -0
- package/dist/src/content/skill-content.js +24 -0
- package/dist/src/content/subagent-content.d.ts +70 -46
- package/dist/src/content/subagent-content.js +273 -85
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/knowledge/package-inspection.d.ts +7 -7
- package/dist/src/lint/catalog/hook/entrypoint-exists.js +18 -15
- package/dist/src/lint/catalog/hook/envelope.d.ts +14 -1
- package/dist/src/lint/catalog/hook/envelope.js +25 -2
- package/dist/src/lint/catalog/hook/native-bindings-supported.d.ts +4 -0
- package/dist/src/lint/catalog/hook/native-bindings-supported.js +39 -0
- package/dist/src/lint/catalog/hook.js +2 -4
- package/dist/src/lint/catalog/skill-accessor/contexts.d.ts +1 -0
- package/dist/src/lint/catalog/skill-accessor/contexts.js +3 -0
- package/dist/src/lint/catalog/skill.d.ts +1 -1
- package/dist/src/lint/catalog/skill.js +20 -8
- package/dist/src/lint/catalog/subagent/envelope.js +1 -1
- package/dist/src/lint/catalog-metadata.js +3 -9
- package/dist/src/lint/context.d.ts +2 -0
- package/dist/src/packaging/archive-guardrails.d.ts +1 -0
- package/dist/src/packaging/archive-guardrails.js +205 -11
- package/dist/src/packaging/filtered-package-validation.js +24 -31
- package/dist/src/packaging/input-normalization.d.ts +0 -1
- package/dist/src/packaging/input-normalization.js +1 -77
- package/dist/src/packaging/manifest-file.js +1 -1
- package/dist/src/packaging/manifest-policy.d.ts +239 -109
- package/dist/src/packaging/manifest-policy.js +1 -1
- package/package.json +9 -7
- package/dist/src/lint/catalog/hook/decision-portability.d.ts +0 -4
- package/dist/src/lint/catalog/hook/decision-portability.js +0 -40
- package/dist/src/lint/catalog/hook/matcher-raw-portability.d.ts +0 -4
- package/dist/src/lint/catalog/hook/matcher-raw-portability.js +0 -51
package/dist/src/index.js
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export { AGENT_SKILLS_COMPATIBILITY_MAX_LENGTH, AGENT_SKILLS_DESCRIPTION_MAX_LENGTH, AGENT_SKILLS_FRONTMATTER_FIELDS, AGENT_SKILLS_NAME_MAX_LENGTH, AGENT_SKILLS_REFERENCE_VALIDATOR_URL, AGENT_SKILLS_SPECIFICATION_URL, AGENT_SKILLS_STANDARD_REVISION, } from "./content/agent-skills-standard.js";
|
|
14
14
|
export { FRONTMATTER_PARSE_FALLBACK_REASON, FrontmatterParseFailure, parseFrontmatterEffect, parseFrontmatterSync, } from "./content/frontmatter.js";
|
|
15
|
-
export { SkillFrontmatterSchema, parseSkillMd, validateSkillFrontmatter, } from "./content/skill-content.js";
|
|
15
|
+
export { SkillFrontmatterSchema, parseSkillMd, extractSkillMetadata, validateSkillFrontmatter, } from "./content/skill-content.js";
|
|
16
16
|
export {} from "./content/skill-types.js";
|
|
17
|
-
export { SubagentContentError,
|
|
18
|
-
export { ArchiveGuardrailError, ZIP_LOCAL_SIGNATURE, checkForbiddenSourceEntries, parseZipCentralDirectory, validateArchive, } from "./packaging/archive-guardrails.js";
|
|
17
|
+
export { SubagentContentError, loadSubagentPackage, nativeSubagentFormat, parseNativeSubagent, readSubagentPackage, selectSubagentImplementation, } from "./content/subagent-content.js";
|
|
18
|
+
export { ArchiveGuardrailError, ZIP_LOCAL_SIGNATURE, checkForbiddenSourceEntries, defaultReadEntry, parseZipCentralDirectory, validateArchive, } from "./packaging/archive-guardrails.js";
|
|
19
19
|
export { FilteredPackageError, validateFilteredPackage, } from "./packaging/filtered-package-validation.js";
|
|
20
20
|
export { IngestLimitError, IngestUnsupportedContentTypeError, REGISTRY_PUBLISH_MAX_ARCHIVE_BYTES, REGISTRY_PUBLISH_MAX_REQUEST_BYTES, enforceArchiveContentType, enforceArchiveSizeLimit, enforceRequestSizeLimit, } from "./packaging/ingest-limits.js";
|
|
21
|
-
export {
|
|
21
|
+
export { normalizePublishInput, } from "./packaging/input-normalization.js";
|
|
22
22
|
export { MANIFEST_FILENAME_BY_TYPE, MANIFEST_FILENAMES, MANIFEST_SCHEMA_BY_TYPE, ManifestError, ManifestIdentitySchema, manifestFilenameForType, extensionTypeForManifestFilename, manifestSchemaForType, resolveManifest, validateDeclaredManifestAlignment, validateManifestHasNoAgentsField, } from "./packaging/manifest-policy.js";
|
|
23
23
|
export { readExtensionManifest } from "./packaging/manifest-file.js";
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,11 +9,11 @@ export declare const readKnowledgePackageManifest: (packageRoot: string) => Effe
|
|
|
9
9
|
sourceRoot: string;
|
|
10
10
|
manifest: {
|
|
11
11
|
readonly name: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
12
|
-
readonly type: "knowledge";
|
|
13
12
|
readonly format: {
|
|
14
13
|
readonly name: "okf";
|
|
15
14
|
readonly version: "0.2";
|
|
16
15
|
};
|
|
16
|
+
readonly type: "knowledge";
|
|
17
17
|
readonly owner: string & import("effect/Brand").Brand<"Handle">;
|
|
18
18
|
readonly version: string & import("effect/Brand").Brand<"Version">;
|
|
19
19
|
readonly bundleRoot: "src";
|
|
@@ -24,12 +24,12 @@ export declare const readKnowledgePackageManifest: (packageRoot: string) => Effe
|
|
|
24
24
|
} | undefined;
|
|
25
25
|
readonly enhances?: readonly string[] | undefined;
|
|
26
26
|
readonly requires?: readonly string[] | undefined;
|
|
27
|
-
readonly fallback?: "auto" | "none" | undefined;
|
|
28
27
|
readonly recommendedPacks?: readonly (string & import("effect/Brand").Brand<"PackSpec">)[] | undefined;
|
|
29
28
|
readonly standalone?: boolean | undefined;
|
|
29
|
+
readonly fallback?: "auto" | "none" | undefined;
|
|
30
30
|
readonly publish?: {
|
|
31
|
-
readonly visibility?: "public" | "private" | undefined;
|
|
32
31
|
readonly ignore?: readonly string[] | undefined;
|
|
32
|
+
readonly visibility?: "public" | "private" | undefined;
|
|
33
33
|
} | undefined;
|
|
34
34
|
readonly keywords?: readonly string[] | undefined;
|
|
35
35
|
readonly repository?: string | {
|
|
@@ -61,18 +61,18 @@ export declare const readKnowledgePackageManifest: (packageRoot: string) => Effe
|
|
|
61
61
|
readonly $schema?: string | undefined;
|
|
62
62
|
readonly instructionEntry?: boolean;
|
|
63
63
|
};
|
|
64
|
-
}, import("effect/PlatformError").PlatformError | ManifestError
|
|
64
|
+
}, Schema.SchemaError | import("effect/PlatformError").PlatformError | ManifestError, FileSystem.FileSystem | Path.Path>;
|
|
65
65
|
/** Inspect one complete Knowledge package, including manifest-level profile diagnostics. */
|
|
66
66
|
export declare const inspectKnowledgePackage: (packageRoot: string) => Effect.Effect<{
|
|
67
67
|
name: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
68
68
|
sourceRoot: string;
|
|
69
69
|
manifest: {
|
|
70
70
|
readonly name: string & import("effect/Brand").Brand<"ExtensionName">;
|
|
71
|
-
readonly type: "knowledge";
|
|
72
71
|
readonly format: {
|
|
73
72
|
readonly name: "okf";
|
|
74
73
|
readonly version: "0.2";
|
|
75
74
|
};
|
|
75
|
+
readonly type: "knowledge";
|
|
76
76
|
readonly owner: string & import("effect/Brand").Brand<"Handle">;
|
|
77
77
|
readonly version: string & import("effect/Brand").Brand<"Version">;
|
|
78
78
|
readonly bundleRoot: "src";
|
|
@@ -83,12 +83,12 @@ export declare const inspectKnowledgePackage: (packageRoot: string) => Effect.Ef
|
|
|
83
83
|
} | undefined;
|
|
84
84
|
readonly enhances?: readonly string[] | undefined;
|
|
85
85
|
readonly requires?: readonly string[] | undefined;
|
|
86
|
-
readonly fallback?: "auto" | "none" | undefined;
|
|
87
86
|
readonly recommendedPacks?: readonly (string & import("effect/Brand").Brand<"PackSpec">)[] | undefined;
|
|
88
87
|
readonly standalone?: boolean | undefined;
|
|
88
|
+
readonly fallback?: "auto" | "none" | undefined;
|
|
89
89
|
readonly publish?: {
|
|
90
|
-
readonly visibility?: "public" | "private" | undefined;
|
|
91
90
|
readonly ignore?: readonly string[] | undefined;
|
|
91
|
+
readonly visibility?: "public" | "private" | undefined;
|
|
92
92
|
} | undefined;
|
|
93
93
|
readonly keywords?: readonly string[] | undefined;
|
|
94
94
|
readonly repository?: string | {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Result from "effect/Result";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { HookManifestSchema, HOOK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
4
|
+
import { HookManifestSchema, HOOK_MANIFEST_FILENAME, referencedHookPackageFiles, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
5
5
|
import { isManifestJsonParseFailure } from "../shared/manifest-json.js";
|
|
6
|
-
const RULE_ID = "hook/
|
|
6
|
+
const RULE_ID = "hook/referenced-files-exist";
|
|
7
7
|
const decodeHookManifest = Schema.decodeUnknownResult(HookManifestSchema);
|
|
8
8
|
export const entrypointExistsRule = {
|
|
9
9
|
id: RULE_ID,
|
|
10
|
-
description: "
|
|
10
|
+
description: "Every Hook implementation, declared asset, and fixture references a package file.",
|
|
11
11
|
kind: "advisory",
|
|
12
12
|
severity: "error",
|
|
13
13
|
check: (context) => {
|
|
@@ -22,18 +22,21 @@ export const entrypointExistsRule = {
|
|
|
22
22
|
if (Result.isFailure(decoded)) {
|
|
23
23
|
return Effect.succeed([]);
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
return Effect.gen(function* () {
|
|
26
|
+
const findings = [];
|
|
27
|
+
for (const file of referencedHookPackageFiles(decoded.success)) {
|
|
28
|
+
if (!(yield* context.files.exists(file))) {
|
|
29
|
+
findings.push({
|
|
30
|
+
kind: "advisory",
|
|
31
|
+
ruleId: RULE_ID,
|
|
32
|
+
severity: "error",
|
|
33
|
+
message: `hook.json references missing package file '${file}'. Add the file or update its reference.`,
|
|
34
|
+
location: { file: HOOK_MANIFEST_FILENAME },
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return findings;
|
|
39
|
+
});
|
|
37
40
|
},
|
|
38
41
|
};
|
|
39
42
|
//# sourceMappingURL=entrypoint-exists.js.map
|
|
@@ -2,5 +2,18 @@
|
|
|
2
2
|
* `hook/*` manifest envelope — see `../shared/envelope-rules.ts`.
|
|
3
3
|
*/
|
|
4
4
|
import type { HookRuleContext } from "../../context.js";
|
|
5
|
-
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
export declare const hookEnvelopeRules: {
|
|
7
|
+
manifestSchemaValid: {
|
|
8
|
+
check: (context: HookRuleContext) => Effect.Effect<readonly import("../../rule.ts").AdvisoryFinding[], never, never>;
|
|
9
|
+
kind: "advisory";
|
|
10
|
+
id: string;
|
|
11
|
+
description: string;
|
|
12
|
+
severity: import("../../rule.ts").Severity;
|
|
13
|
+
};
|
|
14
|
+
manifestPresent: import("../../rule.ts").AdvisoryRule<HookRuleContext<import("../../context.js").HookContent>, never>;
|
|
15
|
+
manifestKeysRecognized: import("../../rule.ts").AdvisoryRule<HookRuleContext<import("../../context.js").HookContent>, never>;
|
|
16
|
+
standaloneDeclarationValid: import("../../rule.ts").AdvisoryRule<HookRuleContext<import("../../context.js").HookContent>, never>;
|
|
17
|
+
recommendedPacksValid: import("../../rule.ts").AdvisoryRule<HookRuleContext<import("../../context.js").HookContent>, never>;
|
|
18
|
+
};
|
|
6
19
|
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -2,14 +2,37 @@
|
|
|
2
2
|
* `hook/*` manifest envelope — see `../shared/envelope-rules.ts`.
|
|
3
3
|
*/
|
|
4
4
|
import { HookManifestSchema, HOOK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Result from "effect/Result";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { issuesToFindings } from "../../issues-to-findings.js";
|
|
9
|
+
import { isManifestJsonParseFailure } from "../shared/manifest-json.js";
|
|
5
10
|
import { makeManifestEnvelopeRules } from "../shared/envelope-rules.js";
|
|
6
|
-
|
|
11
|
+
const envelope = makeManifestEnvelopeRules({
|
|
7
12
|
namespace: "hook",
|
|
8
13
|
manifestFile: HOOK_MANIFEST_FILENAME,
|
|
9
14
|
schema: HookManifestSchema,
|
|
10
15
|
manifestJson: (context) => context.subject.hookJson,
|
|
11
16
|
presentDescription: "Hooks include a root hook.json manifest.",
|
|
12
|
-
presentMissingMessage: "hook.json is missing. Create hook.json with the required manifest fields (`owner`, `type`, `name`, `version`, `
|
|
17
|
+
presentMissingMessage: "hook.json is missing. Create hook.json with the required manifest fields (`owner`, `type`, `name`, `version`, `implementations`).",
|
|
13
18
|
schemaDescription: "hook.json defines a valid hook manifest.",
|
|
14
19
|
});
|
|
20
|
+
export const hookEnvelopeRules = {
|
|
21
|
+
...envelope,
|
|
22
|
+
manifestSchemaValid: {
|
|
23
|
+
...envelope.manifestSchemaValid,
|
|
24
|
+
check: (context) => {
|
|
25
|
+
const input = context.subject.hookJson;
|
|
26
|
+
if (input === undefined || isManifestJsonParseFailure(input))
|
|
27
|
+
return envelope.manifestSchemaValid.check(context);
|
|
28
|
+
const decoded = Schema.decodeUnknownResult(HookManifestSchema)(input, {
|
|
29
|
+
onExcessProperty: "error",
|
|
30
|
+
errors: "all",
|
|
31
|
+
});
|
|
32
|
+
return Effect.succeed(Result.isSuccess(decoded)
|
|
33
|
+
? []
|
|
34
|
+
: issuesToFindings("hook/manifest-schema-valid", "error", HOOK_MANIFEST_FILENAME, decoded.failure.issue));
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
15
38
|
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Result from "effect/Result";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import { AGENTS_BY_ID, installable } from "@agentxm/extension-model/unstable/agent-capabilities";
|
|
5
|
+
import { HookManifestSchema, HOOK_MANIFEST_FILENAME, } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
6
|
+
import { isManifestJsonParseFailure } from "../shared/manifest-json.js";
|
|
7
|
+
const RULE_ID = "hook/native-bindings-supported";
|
|
8
|
+
export const nativeBindingsSupportedRule = {
|
|
9
|
+
id: RULE_ID,
|
|
10
|
+
description: "Native Hook events preserve every required outcome and modification operation.",
|
|
11
|
+
kind: "advisory",
|
|
12
|
+
severity: "error",
|
|
13
|
+
check: (context) => {
|
|
14
|
+
if (context.subject.hookJson === undefined ||
|
|
15
|
+
isManifestJsonParseFailure(context.subject.hookJson))
|
|
16
|
+
return Effect.succeed([]);
|
|
17
|
+
const decoded = Schema.decodeUnknownResult(HookManifestSchema)(context.subject.hookJson, {
|
|
18
|
+
onExcessProperty: "error",
|
|
19
|
+
});
|
|
20
|
+
if (Result.isFailure(decoded))
|
|
21
|
+
return Effect.succeed([]);
|
|
22
|
+
const findings = [];
|
|
23
|
+
for (const implementation of decoded.success.implementations) {
|
|
24
|
+
for (const binding of implementation.bindings) {
|
|
25
|
+
const verdict = installable(AGENTS_BY_ID[implementation.protocol], binding);
|
|
26
|
+
if (!verdict.installable)
|
|
27
|
+
findings.push({
|
|
28
|
+
kind: "advisory",
|
|
29
|
+
ruleId: RULE_ID,
|
|
30
|
+
severity: "error",
|
|
31
|
+
message: `Implementation '${implementation.id}', binding '${binding.id}': ${verdict.reason}`,
|
|
32
|
+
location: { file: HOOK_MANIFEST_FILENAME },
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return Effect.succeed(findings);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=native-bindings-supported.js.map
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { entrypointExistsRule } from "./hook/entrypoint-exists.js";
|
|
2
|
-
import { decisionPortabilityRule } from "./hook/decision-portability.js";
|
|
3
2
|
import { hookEnvelopeRules } from "./hook/envelope.js";
|
|
4
|
-
import {
|
|
3
|
+
import { nativeBindingsSupportedRule } from "./hook/native-bindings-supported.js";
|
|
5
4
|
export const hookRules = [
|
|
6
5
|
hookEnvelopeRules.manifestPresent,
|
|
7
6
|
hookEnvelopeRules.manifestSchemaValid,
|
|
8
7
|
hookEnvelopeRules.manifestKeysRecognized,
|
|
9
|
-
|
|
10
|
-
matcherRawPortabilityRule,
|
|
8
|
+
nativeBindingsSupportedRule,
|
|
11
9
|
entrypointExistsRule,
|
|
12
10
|
hookEnvelopeRules.standaloneDeclarationValid,
|
|
13
11
|
hookEnvelopeRules.recommendedPacksValid,
|
|
@@ -39,6 +39,7 @@ import type { SkillFileAccessor, SkillRuleContext } from "../../context.js";
|
|
|
39
39
|
* @experimental This API is unstable and may change without notice.
|
|
40
40
|
*/
|
|
41
41
|
export interface InstalledSkillInfo {
|
|
42
|
+
readonly validationPurpose?: "authoring" | "management";
|
|
42
43
|
readonly isNative: boolean;
|
|
43
44
|
readonly skillJson: unknown;
|
|
44
45
|
readonly expectedName?: string;
|
|
@@ -44,6 +44,9 @@
|
|
|
44
44
|
*/
|
|
45
45
|
export const buildSkillRuleContexts = (input) => input.installedSkills.map((info) => ({
|
|
46
46
|
subject: {
|
|
47
|
+
...(info.validationPurpose === undefined
|
|
48
|
+
? {}
|
|
49
|
+
: { validationPurpose: info.validationPurpose }),
|
|
47
50
|
isNative: info.isNative,
|
|
48
51
|
skillJson: info.skillJson,
|
|
49
52
|
...(info.expectedName === undefined ? {} : { expectedName: info.expectedName }),
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
import type { LintRule } from "../rule.js";
|
|
29
29
|
import type { SkillRuleContext } from "../context.js";
|
|
30
30
|
/**
|
|
31
|
-
* Ordered
|
|
31
|
+
* Ordered `skill/*` rule catalog. Declaration order is the evaluation
|
|
32
32
|
* order within a single `evaluateContexts` call (deterministic ordering is
|
|
33
33
|
* test-observable; see `evaluate.ts`).
|
|
34
34
|
*
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* @experimental This API is unstable and may change without notice.
|
|
26
26
|
* @packageDocumentation
|
|
27
27
|
*/
|
|
28
|
+
import * as Effect from "effect/Effect";
|
|
28
29
|
import { skillMdPresentRule } from "./skill/skill-md-present.js";
|
|
29
30
|
import { manifestPresentRule } from "./skill/manifest-present.js";
|
|
30
31
|
import { frontmatterParseableRule } from "./skill/frontmatter-parseable.js";
|
|
@@ -34,7 +35,16 @@ import { manifestKeysRecognizedRule } from "./skill/manifest-keys-recognized.js"
|
|
|
34
35
|
import { recommendedPacksValidRule } from "./skill/recommended-packs-valid.js";
|
|
35
36
|
import { standaloneDeclarationValidRule } from "./skill/standalone-declaration-valid.js";
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Authoring rules do not run as routine health checks for acquired content.
|
|
39
|
+
* Skill presence remains a management obligation; accepted identity, integrity,
|
|
40
|
+
* ownership and projection checks are supplied by the workspace catalog.
|
|
41
|
+
*/
|
|
42
|
+
const authoringOnly = (rule) => ({
|
|
43
|
+
...rule,
|
|
44
|
+
check: (context) => context.subject.validationPurpose === "management" ? Effect.succeed([]) : rule.check(context),
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* Ordered `skill/*` rule catalog. Declaration order is the evaluation
|
|
38
48
|
* order within a single `evaluateContexts` call (deterministic ordering is
|
|
39
49
|
* test-observable; see `evaluate.ts`).
|
|
40
50
|
*
|
|
@@ -42,12 +52,14 @@ import { standaloneDeclarationValidRule } from "./skill/standalone-declaration-v
|
|
|
42
52
|
*/
|
|
43
53
|
export const skillRules = [
|
|
44
54
|
skillMdPresentRule,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
...[
|
|
56
|
+
manifestPresentRule,
|
|
57
|
+
frontmatterParseableRule,
|
|
58
|
+
frontmatterStandardValidRule,
|
|
59
|
+
manifestSchemaValidRule,
|
|
60
|
+
manifestKeysRecognizedRule,
|
|
61
|
+
standaloneDeclarationValidRule,
|
|
62
|
+
recommendedPacksValidRule,
|
|
63
|
+
].map(authoringOnly),
|
|
52
64
|
];
|
|
53
65
|
//# sourceMappingURL=skill.js.map
|
|
@@ -9,7 +9,7 @@ export const subagentEnvelopeRules = makeManifestEnvelopeRules({
|
|
|
9
9
|
schema: SubagentManifestSchema,
|
|
10
10
|
manifestJson: (context) => context.subject.subagentJson,
|
|
11
11
|
presentDescription: "Subagents include a root subagent.json manifest.",
|
|
12
|
-
presentMissingMessage: "subagent.json is missing. Create
|
|
12
|
+
presentMissingMessage: "subagent.json is missing. Create the identity fields and either a described portable core or explicit native implementations.",
|
|
13
13
|
schemaDescription: "subagent.json defines a valid subagent manifest.",
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=envelope.js.map
|
|
@@ -158,18 +158,12 @@ export const lintCatalogRuleMetadata = defineLintCatalog([
|
|
|
158
158
|
views: bothViews,
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
id: "hook/
|
|
162
|
-
defaultSeverity: "
|
|
163
|
-
group: "hook",
|
|
164
|
-
views: bothViews,
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: "hook/matcher-raw-portability",
|
|
168
|
-
defaultSeverity: "warning",
|
|
161
|
+
id: "hook/native-bindings-supported",
|
|
162
|
+
defaultSeverity: "error",
|
|
169
163
|
group: "hook",
|
|
170
164
|
views: bothViews,
|
|
171
165
|
},
|
|
172
|
-
{ id: "hook/
|
|
166
|
+
{ id: "hook/referenced-files-exist", defaultSeverity: "error", group: "hook", views: bothViews },
|
|
173
167
|
{
|
|
174
168
|
id: "hook/standalone-declaration-valid",
|
|
175
169
|
defaultSeverity: "warning",
|
|
@@ -139,6 +139,8 @@ export interface SkillRuleContext<S = SkillContent> {
|
|
|
139
139
|
* @experimental This API is unstable and may change without notice.
|
|
140
140
|
*/
|
|
141
141
|
export interface SkillContent {
|
|
142
|
+
/** Authored checks are opt-in for acquired content; normal health checks use management. */
|
|
143
|
+
readonly validationPurpose?: "authoring" | "management";
|
|
142
144
|
readonly isNative: boolean;
|
|
143
145
|
readonly skillJson: unknown;
|
|
144
146
|
/** Agent-facing skill directory name used for the standard name-match check. */
|
|
@@ -23,6 +23,7 @@ export interface ArchiveGuardrailLimits {
|
|
|
23
23
|
readonly maxCompressionRatio?: number;
|
|
24
24
|
}
|
|
25
25
|
export declare const parseZipCentralDirectory: (buf: Uint8Array) => Effect.Effect<readonly ZipEntry[], ArchiveGuardrailError>;
|
|
26
|
+
export declare const defaultReadEntry: (archiveBytes: Uint8Array, entry: ZipEntry) => Effect.Effect<Uint8Array, ArchiveGuardrailError>;
|
|
26
27
|
/**
|
|
27
28
|
* Reject archives carrying build or secret leftovers: any `node_modules` or
|
|
28
29
|
* `.git` path segment, and `.env` / `.env.*` files. Kept out of
|