@agentxm/extension-content 0.49.2 → 0.50.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.d.ts +16 -0
- package/dist/src/content/frontmatter.js +6 -4
- package/dist/src/content/skill-content.d.ts +13 -14
- package/dist/src/content/skill-content.js +8 -46
- package/dist/src/content/subagent-content.js +14 -10
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +3 -3
- package/dist/src/knowledge/index.d.ts +1 -1
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/knowledge/okf.d.ts +52 -1
- package/dist/src/knowledge/okf.js +86 -59
- package/dist/src/knowledge/package-inspection.d.ts +4 -7
- package/dist/src/knowledge/package-inspection.js +7 -19
- package/dist/src/lint/accessor/platform.d.ts +54 -0
- package/dist/src/lint/accessor/platform.js +89 -0
- package/dist/src/lint/{catalog/pack-accessor → accessor}/vft.d.ts +12 -14
- package/dist/src/lint/accessor/vft.js +83 -0
- package/dist/src/lint/catalog/hook/entrypoint-exists.d.ts +2 -2
- package/dist/src/lint/catalog/hook/entrypoint-exists.js +4 -3
- package/dist/src/lint/catalog/hook/envelope.d.ts +6 -6
- package/dist/src/lint/catalog/hook/envelope.js +5 -4
- package/dist/src/lint/catalog/hook/native-bindings-supported.d.ts +2 -2
- package/dist/src/lint/catalog/hook/native-bindings-supported.js +4 -3
- package/dist/src/lint/catalog/hook.d.ts +2 -2
- package/dist/src/lint/catalog/hook.js +1 -1
- package/dist/src/lint/catalog/knowledge/diagnostics.js +4 -3
- package/dist/src/lint/catalog/knowledge/envelope.d.ts +1 -1
- package/dist/src/lint/catalog/knowledge/envelope.js +4 -3
- package/dist/src/lint/catalog/mcp-server/envelope.d.ts +2 -2
- package/dist/src/lint/catalog/mcp-server/envelope.js +4 -3
- package/dist/src/lint/catalog/mcp-server.d.ts +2 -2
- package/dist/src/lint/catalog/{pack-accessor → pack}/contexts.d.ts +6 -6
- package/dist/src/lint/catalog/{pack-accessor → pack}/contexts.js +4 -4
- package/dist/src/lint/catalog/pack/envelope.d.ts +10 -0
- package/dist/src/lint/catalog/pack/envelope.js +20 -0
- package/dist/src/lint/catalog/pack.d.ts +9 -10
- package/dist/src/lint/catalog/pack.js +12 -15
- package/dist/src/lint/catalog/rule/envelope.d.ts +2 -2
- package/dist/src/lint/catalog/rule/envelope.js +4 -3
- package/dist/src/lint/catalog/rule.d.ts +2 -2
- package/dist/src/lint/catalog/shared/envelope-rules.d.ts +23 -12
- package/dist/src/lint/catalog/shared/envelope-rules.js +22 -13
- package/dist/src/lint/catalog/shared/manifest-present.d.ts +3 -4
- package/dist/src/lint/catalog/shared/recommended-packs-rules.js +5 -3
- package/dist/src/lint/catalog/shared/schema-rule.js +3 -3
- package/dist/src/lint/catalog/{skill-accessor → skill}/contexts.d.ts +5 -5
- package/dist/src/lint/catalog/{skill-accessor → skill}/contexts.js +3 -3
- package/dist/src/lint/catalog/skill/envelope.d.ts +11 -0
- package/dist/src/lint/catalog/skill/envelope.js +23 -0
- package/dist/src/lint/catalog/skill/frontmatter-parseable.d.ts +6 -4
- package/dist/src/lint/catalog/skill/frontmatter-parseable.js +17 -21
- package/dist/src/lint/catalog/skill/frontmatter-standard-valid.js +7 -12
- package/dist/src/lint/catalog/skill.d.ts +4 -5
- package/dist/src/lint/catalog/skill.js +11 -16
- package/dist/src/lint/catalog/subagent/envelope.d.ts +2 -2
- package/dist/src/lint/catalog/subagent/envelope.js +4 -3
- package/dist/src/lint/catalog/subagent.d.ts +2 -2
- package/dist/src/lint/catalog-metadata.js +13 -1
- package/dist/src/lint/context.d.ts +39 -115
- package/dist/src/lint/describe-document.d.ts +1 -1
- package/dist/src/lint/describe-document.js +4 -5
- package/dist/src/lint/index.d.ts +5 -7
- package/dist/src/lint/index.js +5 -7
- package/dist/src/packaging/archive-guardrails.d.ts +11 -0
- package/dist/src/packaging/archive-guardrails.js +111 -74
- package/dist/src/packaging/filtered-package-validation.js +3 -4
- package/dist/src/packaging/manifest-file.d.ts +7 -3
- package/dist/src/packaging/manifest-file.js +10 -11
- package/dist/src/packaging/manifest-policy.d.ts +0 -12
- package/dist/src/packaging/manifest-policy.js +12 -26
- package/dist/src/packaging/test-zip-helpers.js +4 -3
- package/package.json +8 -4
- package/dist/src/lint/catalog/pack/manifest-keys-recognized.d.ts +0 -28
- package/dist/src/lint/catalog/pack/manifest-keys-recognized.js +0 -38
- package/dist/src/lint/catalog/pack/manifest-present.d.ts +0 -17
- package/dist/src/lint/catalog/pack/manifest-present.js +0 -24
- package/dist/src/lint/catalog/pack/manifest-schema-valid.d.ts +0 -25
- package/dist/src/lint/catalog/pack/manifest-schema-valid.js +0 -33
- package/dist/src/lint/catalog/pack-accessor/platform.d.ts +0 -56
- package/dist/src/lint/catalog/pack-accessor/platform.js +0 -93
- package/dist/src/lint/catalog/pack-accessor/vft.js +0 -85
- package/dist/src/lint/catalog/skill/manifest-keys-recognized.d.ts +0 -26
- package/dist/src/lint/catalog/skill/manifest-keys-recognized.js +0 -41
- package/dist/src/lint/catalog/skill/manifest-present.d.ts +0 -23
- package/dist/src/lint/catalog/skill/manifest-present.js +0 -32
- package/dist/src/lint/catalog/skill/manifest-schema-valid.d.ts +0 -21
- package/dist/src/lint/catalog/skill/manifest-schema-valid.js +0 -36
- package/dist/src/lint/catalog/skill/recommended-packs-valid.d.ts +0 -8
- package/dist/src/lint/catalog/skill/recommended-packs-valid.js +0 -12
- package/dist/src/lint/catalog/skill/standalone-declaration-valid.d.ts +0 -8
- package/dist/src/lint/catalog/skill/standalone-declaration-valid.js +0 -12
- package/dist/src/lint/catalog/skill-accessor/platform.d.ts +0 -53
- package/dist/src/lint/catalog/skill-accessor/platform.js +0 -90
- package/dist/src/lint/catalog/skill-accessor/vft.d.ts +0 -77
- package/dist/src/lint/catalog/skill-accessor/vft.js +0 -135
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
import type * as Effect from "effect/Effect";
|
|
17
17
|
import type { KnowledgeInspection } from "../knowledge/okf.js";
|
|
18
18
|
/**
|
|
19
|
-
* Tagged error surfaced by
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* Tagged error surfaced by an `ExtensionFileAccessor` when a read fails for
|
|
20
|
+
* reasons other than "file not found" (which is represented by
|
|
21
|
+
* `exists -> false`).
|
|
22
22
|
*
|
|
23
23
|
* This interface fixes the error shape rules can rely on.
|
|
24
24
|
*
|
|
@@ -34,50 +34,36 @@ export interface FileAccessError {
|
|
|
34
34
|
readonly message: string;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Narrow
|
|
37
|
+
* Narrow rooted file accessor shared by every extension type's rule context.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* The root is chosen by the caller: the directory containing the type's
|
|
40
|
+
* manifest (`pack.json`, `hook.json`, ...), or for a skill's `files` the
|
|
41
|
+
* directory containing `SKILL.md`. Paths are posix and relative to the root;
|
|
42
|
+
* implementations MUST reject path-traversal attempts (`..`, absolute paths,
|
|
43
|
+
* symlink escapes) by returning `false` from `exists` or failing `readBytes`
|
|
44
|
+
* with `FileAccessError { reason: "path-escape" }`.
|
|
43
45
|
*
|
|
44
46
|
* @experimental This API is unstable and may change without notice.
|
|
45
47
|
*/
|
|
46
|
-
export interface
|
|
48
|
+
export interface ExtensionFileAccessor {
|
|
47
49
|
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
48
50
|
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
|
-
*
|
|
53
|
+
* Context passed to every extension type's rules.
|
|
52
54
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
+
* `subject` is the caller-decoded content for the type (for example
|
|
56
|
+
* {@link PackContent}). `files` is rooted at the directory containing the
|
|
57
|
+
* type's manifest. `displayRoot` is posix and relative; `""` means the
|
|
58
|
+
* accessor root is the rendering base. See `./compose-path.ts` for the four
|
|
59
|
+
* documented cases.
|
|
55
60
|
*
|
|
56
61
|
* @experimental This API is unstable and may change without notice.
|
|
57
62
|
*/
|
|
58
|
-
export interface
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
|
|
62
|
-
export interface SubagentFileAccessor {
|
|
63
|
-
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
64
|
-
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
65
|
-
}
|
|
66
|
-
export interface McpServerFileAccessor {
|
|
67
|
-
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
68
|
-
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
69
|
-
}
|
|
70
|
-
export interface HookFileAccessor {
|
|
71
|
-
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
72
|
-
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
73
|
-
}
|
|
74
|
-
export interface RuleFileAccessor {
|
|
75
|
-
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
76
|
-
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
77
|
-
}
|
|
78
|
-
export interface KnowledgeFileAccessor {
|
|
79
|
-
readonly exists: (path: string) => Effect.Effect<boolean>;
|
|
80
|
-
readonly readBytes: (path: string) => Effect.Effect<Uint8Array, FileAccessError>;
|
|
63
|
+
export interface ManifestRuleContext<S> {
|
|
64
|
+
readonly subject: S;
|
|
65
|
+
readonly files: ExtensionFileAccessor;
|
|
66
|
+
readonly displayRoot: string;
|
|
81
67
|
}
|
|
82
68
|
/**
|
|
83
69
|
* Context passed to `skill/*` rules.
|
|
@@ -85,13 +71,9 @@ export interface KnowledgeFileAccessor {
|
|
|
85
71
|
* `subject` is the caller-decoded skill content (SKILL.md frontmatter +
|
|
86
72
|
* optional skill.json).
|
|
87
73
|
*
|
|
88
|
-
* `displayRoot` is posix and relative; `""` means the accessor root is the
|
|
89
|
-
* rendering base. See `./compose-path.ts` for the four documented cases.
|
|
90
|
-
*
|
|
91
74
|
* @experimental This API is unstable and may change without notice.
|
|
92
75
|
*/
|
|
93
|
-
export interface SkillRuleContext
|
|
94
|
-
readonly subject: S;
|
|
76
|
+
export interface SkillRuleContext extends ManifestRuleContext<SkillContent> {
|
|
95
77
|
/**
|
|
96
78
|
* Content-root accessor. Rooted at the directory containing `SKILL.md`.
|
|
97
79
|
* For native (registry-installed) skills this is the `src/` sub-directory
|
|
@@ -100,7 +82,7 @@ export interface SkillRuleContext<S = SkillContent> {
|
|
|
100
82
|
* `frontmatter-parseable`, and any future rule evaluating files that
|
|
101
83
|
* render into agent directories) read through this accessor.
|
|
102
84
|
*/
|
|
103
|
-
readonly files:
|
|
85
|
+
readonly files: ExtensionFileAccessor;
|
|
104
86
|
/**
|
|
105
87
|
* Package-root accessor. Rooted at the skill's package root —
|
|
106
88
|
* the directory containing `skill.json` for native skills. For non-native
|
|
@@ -109,8 +91,7 @@ export interface SkillRuleContext<S = SkillContent> {
|
|
|
109
91
|
* future rule inspecting files at or above the content root) read through
|
|
110
92
|
* this accessor.
|
|
111
93
|
*/
|
|
112
|
-
readonly packageFiles:
|
|
113
|
-
readonly displayRoot: string;
|
|
94
|
+
readonly packageFiles: ExtensionFileAccessor;
|
|
114
95
|
}
|
|
115
96
|
/**
|
|
116
97
|
* Concrete subject shape passed to `skill/*` rules.
|
|
@@ -121,16 +102,12 @@ export interface SkillRuleContext<S = SkillContent> {
|
|
|
121
102
|
*
|
|
122
103
|
* - `isNative` — whether the caller expects this skill to carry a
|
|
123
104
|
* `skill.json` manifest. Native (registry-installed) skills set this to
|
|
124
|
-
* `true`; non-native (managed external) skills set it to `false`.
|
|
125
|
-
*
|
|
126
|
-
* `
|
|
127
|
-
* early-return `[]` when `isNative === false`, so the same catalog covers
|
|
128
|
-
* both.
|
|
105
|
+
* `true`; non-native (managed external) skills set it to `false`. The
|
|
106
|
+
* `skill.json` envelope rules produce no findings when
|
|
107
|
+
* `isNative === false`, so the same catalog covers both.
|
|
129
108
|
* - `skillJson` — the already-decoded `skill.json` contents when present
|
|
130
109
|
* (caller decodes once, rules don't re-read + re-parse). `undefined` when
|
|
131
|
-
* the file is absent.
|
|
132
|
-
* `Schema.decodeUnknownResult(SkillManifestSchema)`; keys-recognized
|
|
133
|
-
* enumerates top-level keys after narrowing to `Record<string, unknown>`.
|
|
110
|
+
* the file is absent.
|
|
134
111
|
*
|
|
135
112
|
* Workspace consumers build `SkillContent` via `buildSkillRuleContexts`
|
|
136
113
|
* against the lint workspace view; publish builds one `SkillContent` per
|
|
@@ -145,91 +122,38 @@ export interface SkillContent {
|
|
|
145
122
|
/** Agent-facing skill directory name used for the standard name-match check. */
|
|
146
123
|
readonly expectedName?: string;
|
|
147
124
|
}
|
|
148
|
-
/**
|
|
149
|
-
* Context passed to `pack/*` rules.
|
|
150
|
-
*
|
|
151
|
-
* `subject` is the caller-decoded pack content — concrete `PackContent` shape
|
|
152
|
-
* defined below. Packs are registry-only at v1 (no non-native arm), so the
|
|
153
|
-
* subject carries only the already-decoded manifest and rules read
|
|
154
|
-
* `pack.json` bytes through `context.files` as needed.
|
|
155
|
-
*
|
|
156
|
-
* @experimental This API is unstable and may change without notice.
|
|
157
|
-
*/
|
|
158
|
-
export interface PackRuleContext<S = PackContent> {
|
|
159
|
-
readonly subject: S;
|
|
160
|
-
readonly files: PackFileAccessor;
|
|
161
|
-
readonly displayRoot: string;
|
|
162
|
-
}
|
|
163
125
|
/**
|
|
164
126
|
* Concrete subject shape passed to `pack/*` rules.
|
|
165
127
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* - `packJson` — the already-decoded `pack.json` contents when
|
|
171
|
-
* present (caller decodes once, rules don't re-read + re-parse).
|
|
172
|
-
* `undefined` when the file is absent. Schema-valid rules pipe this into
|
|
173
|
-
* `Schema.decodeUnknownResult(PackManifestSchema)`;
|
|
174
|
-
* keys-recognized enumerates top-level keys after narrowing to
|
|
175
|
-
* `Record<string, unknown>`.
|
|
176
|
-
*
|
|
177
|
-
* Unlike `SkillContent`, there is no `isNative` discriminator — packs are
|
|
178
|
-
* registry-only and every pack context is expected to expose a manifest.
|
|
179
|
-
* The presence rule (`pack/manifest-present`) owns the absence arm.
|
|
180
|
-
*
|
|
181
|
-
* Workspace consumers build `PackContent` via `buildPackRuleContexts`
|
|
182
|
-
* against the lint workspace view; publish builds one `PackContent` per
|
|
183
|
-
* incoming archive.
|
|
128
|
+
* `packJson` is the already-decoded `pack.json` contents when present
|
|
129
|
+
* (caller decodes once, rules don't re-read + re-parse), and `undefined`
|
|
130
|
+
* when the file is absent. Packs are registry-only, so there is no
|
|
131
|
+
* `isNative` discriminator; `pack/manifest-present` owns the absence arm.
|
|
184
132
|
*
|
|
185
133
|
* @experimental This API is unstable and may change without notice.
|
|
186
134
|
*/
|
|
187
135
|
export interface PackContent {
|
|
188
136
|
readonly packJson: unknown;
|
|
189
137
|
}
|
|
190
|
-
export interface SubagentRuleContext<S = SubagentContent> {
|
|
191
|
-
readonly subject: S;
|
|
192
|
-
readonly files: SubagentFileAccessor;
|
|
193
|
-
readonly displayRoot: string;
|
|
194
|
-
}
|
|
195
138
|
export interface SubagentContent {
|
|
196
139
|
readonly subagentJson: unknown;
|
|
197
140
|
}
|
|
198
|
-
export interface McpServerRuleContext<S = McpServerContent> {
|
|
199
|
-
readonly subject: S;
|
|
200
|
-
readonly files: McpServerFileAccessor;
|
|
201
|
-
readonly displayRoot: string;
|
|
202
|
-
}
|
|
203
141
|
export interface McpServerContent {
|
|
204
142
|
readonly mcpServerJson: unknown;
|
|
205
143
|
}
|
|
206
|
-
export interface HookRuleContext<S = HookContent> {
|
|
207
|
-
readonly subject: S;
|
|
208
|
-
readonly files: HookFileAccessor;
|
|
209
|
-
readonly displayRoot: string;
|
|
210
|
-
}
|
|
211
144
|
export interface HookContent {
|
|
212
145
|
readonly hookJson: unknown;
|
|
213
146
|
}
|
|
214
|
-
/**
|
|
215
|
-
* Context passed to `rule/*` rules.
|
|
216
|
-
*
|
|
217
|
-
* The doubled word is unavoidable: `rule` is an extension type and `rule` is
|
|
218
|
-
* also the lint primitive, so the context for the `rule` extension type is a
|
|
219
|
-
* `RuleRuleContext`. Every other name here follows `<Type>RuleContext`.
|
|
220
|
-
*/
|
|
221
|
-
export interface RuleRuleContext<S = RuleContent> {
|
|
222
|
-
readonly subject: S;
|
|
223
|
-
readonly files: RuleFileAccessor;
|
|
224
|
-
readonly displayRoot: string;
|
|
225
|
-
}
|
|
147
|
+
/** Subject for the `rule` extension type's `rule/*` lint rules. */
|
|
226
148
|
export interface RuleContent {
|
|
227
149
|
readonly ruleJson: unknown;
|
|
228
150
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Context passed to `knowledge/*` rules.
|
|
153
|
+
*
|
|
154
|
+
* @experimental This API is unstable and may change without notice.
|
|
155
|
+
*/
|
|
156
|
+
export interface KnowledgeRuleContext extends ManifestRuleContext<KnowledgeContent> {
|
|
233
157
|
/** Absolute package root used once while constructing the cached inspection. */
|
|
234
158
|
readonly packageRoot?: string;
|
|
235
159
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `hook.json`, none knew `rule.json` or `knowledge.json`, and the parse-failure
|
|
9
9
|
* copy defaulted to "Manifest" where the others defaulted to "Document".
|
|
10
10
|
*
|
|
11
|
-
* The manifest labels are derived from `
|
|
11
|
+
* The manifest labels are derived from `manifestFilenameForType` and
|
|
12
12
|
* `extensionTypeSentenceLabels`, both of which are total over `ExtensionType`,
|
|
13
13
|
* so a new extension type gets a label the moment its row lands in
|
|
14
14
|
* `EXTENSION_TYPE_TABLE`.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `hook.json`, none knew `rule.json` or `knowledge.json`, and the parse-failure
|
|
9
9
|
* copy defaulted to "Manifest" where the others defaulted to "Document".
|
|
10
10
|
*
|
|
11
|
-
* The manifest labels are derived from `
|
|
11
|
+
* The manifest labels are derived from `manifestFilenameForType` and
|
|
12
12
|
* `extensionTypeSentenceLabels`, both of which are total over `ExtensionType`,
|
|
13
13
|
* so a new extension type gets a label the moment its row lands in
|
|
14
14
|
* `EXTENSION_TYPE_TABLE`.
|
|
@@ -16,16 +16,15 @@
|
|
|
16
16
|
* @experimental This API is unstable and may change without notice.
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
|
-
import { extensionTypeSentenceLabels, extensionTypes, } from "@agentxm/extension-model/unstable/extensions/common";
|
|
19
|
+
import { extensionTypeSentenceLabels, extensionTypes, manifestFilenameForType, } from "@agentxm/extension-model/unstable/extensions/common";
|
|
20
20
|
import { LOCKFILE_NAME, SETTINGS_FILENAME, } from "@agentxm/extension-model/unstable/workspace-files";
|
|
21
|
-
import { MANIFEST_FILENAME_BY_TYPE } from "../packaging/manifest-policy.js";
|
|
22
21
|
/** Label used when a filename matches no known document. */
|
|
23
22
|
export const UNKNOWN_DOCUMENT_LABEL = "Document";
|
|
24
23
|
const capitalizeFirst = (value) => value.length === 0 ? value : `${value.charAt(0).toUpperCase()}${value.slice(1)}`;
|
|
25
24
|
// eslint-disable-next-line no-restricted-syntax -- Immutable lookup over the closed manifest filename vocabulary.
|
|
26
25
|
const documentLabels = new Map([
|
|
27
26
|
...extensionTypes.map((type) => [
|
|
28
|
-
|
|
27
|
+
manifestFilenameForType(type),
|
|
29
28
|
`${capitalizeFirst(extensionTypeSentenceLabels[type])} manifest`,
|
|
30
29
|
]),
|
|
31
30
|
[SETTINGS_FILENAME, "Workspace settings"],
|
|
@@ -46,4 +45,4 @@ const basename = (file) => {
|
|
|
46
45
|
* @experimental This API is unstable and may change without notice.
|
|
47
46
|
*/
|
|
48
47
|
export const describeSchemaDocument = (file) => documentLabels.get(basename(file)) ?? UNKNOWN_DOCUMENT_LABEL;
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
48
|
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CQUFvQixDQUFDO0lBQ3pDLENBQUMsYUFBYSxFQUFFLFVBQVUsQ0FBQztDQUM1QixDQUFDLENBQUM7QUFFSCxNQUFNLFFBQVEsR0FBRyxDQUFDLElBQVksRUFBVSxFQUFFO0lBQ3hDLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0lBQzVDLE1BQU0sS0FBSyxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDcEMsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsSUFBSSxVQUFVLENBQUM7QUFDL0MsQ0FBQyxDQUFDO0FBRUY7Ozs7Ozs7O0dBUUc7QUFDSCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLElBQVksRUFBVSxFQUFFLENBQzdELGNBQWMsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksc0JBQXNCLENBQUMifQ==
|
package/dist/src/lint/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
12
|
export type { AdvisoryFinding, AdvisoryRule, FindingBase, FindingLocation, LintFinding, LintRule, RuleBase, Severity, } from "./rule.js";
|
|
13
|
-
export type { FileAccessError, HookContent,
|
|
13
|
+
export type { ExtensionFileAccessor, FileAccessError, HookContent, KnowledgeContent, KnowledgeRuleContext, ManifestRuleContext, McpServerContent, PackContent, RuleContent, SkillContent, SkillRuleContext, SubagentContent, } from "./context.js";
|
|
14
14
|
export { type LintConfig, LintConfigSchema, type LintRuleSeverity, LintRuleSeveritySchema, type LintRulesMap, LintRulesMapSchema, platformCanonicalLintConfig, } from "./config.js";
|
|
15
15
|
export { type LintCatalogGroup, type LintCatalogRuleMetadata, type LintCatalogView, allLintCatalogRuleIds, lintCatalogRuleMetadata, } from "./catalog-metadata.js";
|
|
16
16
|
export { type Evaluated, evaluateContexts } from "./evaluate.js";
|
|
@@ -24,12 +24,10 @@ export { mcpServerRules } from "./catalog/mcp-server.js";
|
|
|
24
24
|
export { hookRules } from "./catalog/hook.js";
|
|
25
25
|
export { ruleRules } from "./catalog/rule.js";
|
|
26
26
|
export { knowledgeDiagnosticRuleDefinitions, knowledgeDiagnosticRules, knowledgeRules, publishKnowledgeRules, } from "./catalog/knowledge.js";
|
|
27
|
-
export { type InstalledSkillInfo, buildSkillRuleContexts
|
|
28
|
-
export { type
|
|
29
|
-
export { type
|
|
30
|
-
export { type
|
|
31
|
-
export { type PackVFTNode, makeVftPackFileAccessor } from "./catalog/pack-accessor/vft.js";
|
|
32
|
-
export { type PackAccessorPlatform, makePlatformPackFileAccessor, } from "./catalog/pack-accessor/platform.js";
|
|
27
|
+
export { type InstalledSkillInfo, buildSkillRuleContexts } from "./catalog/skill/contexts.js";
|
|
28
|
+
export { type InstalledPackInfo, buildPackRuleContexts } from "./catalog/pack/contexts.js";
|
|
29
|
+
export { type VFTNode, makeVftFileAccessor } from "./accessor/vft.js";
|
|
30
|
+
export { type FileAccessorPlatform, makePlatformFileAccessor } from "./accessor/platform.js";
|
|
33
31
|
export { type ManifestJsonParseFailure, isManifestJsonParseFailure, makeManifestJsonParseFailure, manifestJsonParseFailureToFinding, } from "./catalog/shared/manifest-json.js";
|
|
34
32
|
export { type ManifestEnvelopeOptions, type ManifestEnvelopeRules, type ManifestEnvelopeSchema, makeManifestEnvelopeRules, orderedEnvelopeRules, } from "./catalog/shared/envelope-rules.js";
|
|
35
33
|
export { schemaDecodeFindings } from "./catalog/shared/schema-rule.js";
|
package/dist/src/lint/index.js
CHANGED
|
@@ -22,13 +22,11 @@ export { mcpServerRules } from "./catalog/mcp-server.js";
|
|
|
22
22
|
export { hookRules } from "./catalog/hook.js";
|
|
23
23
|
export { ruleRules } from "./catalog/rule.js";
|
|
24
24
|
export { knowledgeDiagnosticRuleDefinitions, knowledgeDiagnosticRules, knowledgeRules, publishKnowledgeRules, } from "./catalog/knowledge.js";
|
|
25
|
-
export { buildSkillRuleContexts
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export { makeVftPackFileAccessor } from "./catalog/pack-accessor/vft.js";
|
|
30
|
-
export { makePlatformPackFileAccessor, } from "./catalog/pack-accessor/platform.js";
|
|
25
|
+
export { buildSkillRuleContexts } from "./catalog/skill/contexts.js";
|
|
26
|
+
export { buildPackRuleContexts } from "./catalog/pack/contexts.js";
|
|
27
|
+
export { makeVftFileAccessor } from "./accessor/vft.js";
|
|
28
|
+
export { makePlatformFileAccessor } from "./accessor/platform.js";
|
|
31
29
|
export { isManifestJsonParseFailure, makeManifestJsonParseFailure, manifestJsonParseFailureToFinding, } from "./catalog/shared/manifest-json.js";
|
|
32
30
|
export { makeManifestEnvelopeRules, orderedEnvelopeRules, } from "./catalog/shared/envelope-rules.js";
|
|
33
31
|
export { schemaDecodeFindings } from "./catalog/shared/schema-rule.js";
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGludC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHO0FBMEJILE9BQU8sRUFFTCxnQkFBZ0IsRUFFaEIsc0JBQXNCLEVBRXRCLGtCQUFrQixFQUNsQiwyQkFBMkIsR0FDNUIsTUFBTSxhQUFhLENBQUM7QUFDckIsT0FBTyxFQUlMLHFCQUFxQixFQUNyQix1QkFBdUIsR0FDeEIsTUFBTSx1QkFBdUIsQ0FBQztBQUMvQixPQUFPLEVBQWtCLGdCQUFnQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pFL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1BQU0sb0NBQW9DLENBQUM7QUFDNUMsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0saUNBQWlDLENBQUMifQ==
|
|
@@ -11,17 +11,28 @@ export declare class ArchiveGuardrailError extends ArchiveGuardrailError_base<{
|
|
|
11
11
|
export declare const ZIP_LOCAL_SIGNATURE = 67324752;
|
|
12
12
|
export interface ZipEntry {
|
|
13
13
|
readonly fileName: string;
|
|
14
|
+
/** Creator version; the high byte names the host system that wrote the attributes. */
|
|
15
|
+
readonly versionMadeBy: number;
|
|
16
|
+
readonly crc32: number;
|
|
14
17
|
readonly compressedSize: number;
|
|
15
18
|
readonly uncompressedSize: number;
|
|
16
19
|
readonly compressionMethod: number;
|
|
17
20
|
readonly externalAttributes: number;
|
|
18
21
|
readonly localHeaderOffset: number;
|
|
22
|
+
/** First byte of the entry's stored data, past its verified local header. */
|
|
23
|
+
readonly localDataOffset: number;
|
|
19
24
|
}
|
|
20
25
|
export interface ArchiveGuardrailLimits {
|
|
21
26
|
readonly maxEntries?: number;
|
|
22
27
|
readonly maxDecompressedBytes?: number;
|
|
23
28
|
readonly maxCompressionRatio?: number;
|
|
24
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Read a single-disk ZIP v1 central directory and verify each entry's local
|
|
32
|
+
* header against it, so every reader of the returned entries sees the same
|
|
33
|
+
* names, methods and data ranges. Multi-disk, ZIP64 and encrypted archives are
|
|
34
|
+
* rejected.
|
|
35
|
+
*/
|
|
25
36
|
export declare const parseZipCentralDirectory: (buf: Uint8Array) => Effect.Effect<readonly ZipEntry[], ArchiveGuardrailError>;
|
|
26
37
|
export declare const defaultReadEntry: (archiveBytes: Uint8Array, entry: ZipEntry) => Effect.Effect<Uint8Array, ArchiveGuardrailError>;
|
|
27
38
|
/**
|