@introspection-ai/recipes 0.37.0 → 0.38.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/documents/index.d.ts +2 -1
- package/dist/documents/index.d.ts.map +1 -1
- package/dist/documents/index.js +2 -1
- package/dist/documents/index.js.map +1 -1
- package/dist/documents/module.d.ts +12 -2
- package/dist/documents/module.d.ts.map +1 -1
- package/dist/documents/module.js +20 -3
- package/dist/documents/module.js.map +1 -1
- package/dist/documents/profile.d.ts +34 -0
- package/dist/documents/profile.d.ts.map +1 -0
- package/dist/documents/profile.js +94 -0
- package/dist/documents/profile.js.map +1 -0
- package/dist/mcp-chunks/chunk-EQCSXVQ7.js +10650 -0
- package/dist/mcp-daemon.js +1 -1
- package/dist/mcp-run-worker.js +1 -1
- package/dist/recipe/package.d.ts +8 -0
- package/dist/recipe/package.d.ts.map +1 -1
- package/dist/recipe/package.js +31 -6
- package/dist/recipe/package.js.map +1 -1
- package/docs/documents.md +95 -0
- package/documents/SKILL.md +63 -0
- package/package.json +11 -10
- package/dist/mcp-chunks/chunk-UVEZNUN3.js +0 -3312
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DOCUMENT_COMMANDS, documentCommandsFor, documentConnectorTools, registerDocumentTools, workspacePath, } from "./tools.js";
|
|
2
2
|
export type { DocumentCommand, DocumentToolHost, RegisterDocumentToolsOptions } from "./tools.js";
|
|
3
|
-
export { createDocumentFormatModule, loadRecipeDocuments } from "./module.js";
|
|
3
|
+
export { createDocumentFormatModule, DOCUMENTS_SKILL, loadRecipeDocuments } from "./module.js";
|
|
4
|
+
export { DOCUMENT_PROFILE_NAME, documentProfileShapeProblem, documentProfileSkillProblem, isDocumentProfilePath, recipeProfileSkill, resolveDocumentProfile, } from "./profile.js";
|
|
4
5
|
export type { DocumentFormatModuleOptions, LoadedRecipeDocuments, RecipeDocumentFormatModule } from "./module.js";
|
|
5
6
|
export type { DocumentAdapter, DocumentAdapterContext, DocumentCapabilities, DocumentCommentInput, DocumentEdit, DocumentImage, DocumentProposeEditsInput, DocumentReadInput, DocumentRemoveSectionInput, DocumentRenderInput, DocumentRespondInput, DocumentResponse, DocumentResult, DocumentReviseInput, DocumentRevision, DocumentWriteTarget, } from "./types.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAClH,YAAY,EACV,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
package/dist/documents/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { DOCUMENT_COMMANDS, documentCommandsFor, documentConnectorTools, registerDocumentTools, workspacePath, } from "./tools.js";
|
|
2
|
-
export { createDocumentFormatModule, loadRecipeDocuments } from "./module.js";
|
|
2
|
+
export { createDocumentFormatModule, DOCUMENTS_SKILL, loadRecipeDocuments } from "./module.js";
|
|
3
|
+
export { DOCUMENT_PROFILE_NAME, documentProfileShapeProblem, documentProfileSkillProblem, isDocumentProfilePath, recipeProfileSkill, resolveDocumentProfile, } from "./profile.js";
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/documents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,cAAc,CAAC"}
|
|
@@ -2,6 +2,8 @@ import type { ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
|
2
2
|
import { type RecipePackageDocument } from "../recipe/package.js";
|
|
3
3
|
import { documentConnectorTools } from "./tools.js";
|
|
4
4
|
import type { DocumentAdapter, DocumentCapabilities } from "./types.js";
|
|
5
|
+
/** The core `documents` skill, offered to every agent that selects the tool. It ships beside `dist/`. */
|
|
6
|
+
export declare const DOCUMENTS_SKILL: string;
|
|
5
7
|
/** What a format package exports as its default: transport plus a capability descriptor, no schemas. */
|
|
6
8
|
export interface RecipeDocumentFormatModule {
|
|
7
9
|
readonly kind: "documents";
|
|
@@ -9,6 +11,8 @@ export interface RecipeDocumentFormatModule {
|
|
|
9
11
|
readonly extensions: readonly string[];
|
|
10
12
|
/** Static, so the loader can build the tool before any session exists. */
|
|
11
13
|
readonly capabilities: DocumentCapabilities;
|
|
14
|
+
/** Profiles this format ships: name to the absolute path of its SKILL.md (see profile.ts). */
|
|
15
|
+
readonly profiles?: Readonly<Record<string, string>>;
|
|
12
16
|
createAdapter(options: {
|
|
13
17
|
env: NodeJS.ProcessEnv;
|
|
14
18
|
cwd: string;
|
|
@@ -18,6 +22,8 @@ export interface DocumentFormatModuleOptions {
|
|
|
18
22
|
format: string;
|
|
19
23
|
extensions: readonly string[];
|
|
20
24
|
capabilities: DocumentCapabilities;
|
|
25
|
+
/** Profiles shipped with the format: name to the absolute path of its SKILL.md. */
|
|
26
|
+
profiles?: Readonly<Record<string, string>>;
|
|
21
27
|
createAdapter(options: {
|
|
22
28
|
env: NodeJS.ProcessEnv;
|
|
23
29
|
cwd: string;
|
|
@@ -34,10 +40,14 @@ export interface LoadedRecipeDocuments {
|
|
|
34
40
|
factory: ExtensionFactory;
|
|
35
41
|
};
|
|
36
42
|
toolNames: string[];
|
|
43
|
+
/** The core `documents` skill, then each declared profile's skill, offered beside the tool. */
|
|
44
|
+
skillPaths?: string[];
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
39
|
-
* Load every `pi.documents` format package and
|
|
40
|
-
* `documents`, one extension
|
|
47
|
+
* Load every `pi.documents` format package and the profile each declaration
|
|
48
|
+
* names (only those) and, when the agent selects `documents`, one extension
|
|
49
|
+
* registering the shared tool and offering the core `documents` skill with
|
|
50
|
+
* each profile's hints beside it.
|
|
41
51
|
*
|
|
42
52
|
* Each declaration's `commands` allowlist narrows what that format may do;
|
|
43
53
|
* the tool exposes the union of what the formats allow.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/documents/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/documents/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAGL,sBAAsB,EAGvB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAExE,yGAAyG;AACzG,eAAO,MAAM,eAAe,QAAsE,CAAC;AAEnG,wGAAwG;AACxG,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,aAAa,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,eAAe,CAAC;CAClF;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,YAAY,EAAE,oBAAoB,CAAC;IACnC,mFAAmF;IACnF,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5C,aAAa,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,eAAe,CAAC;CAClF;AAQD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,2BAA2B,GAAG,0BAA0B,CAoB3G;AAoBD,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACzD,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAID;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,SAAS,qBAAqB,EAAE,EAC9C,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACpE,OAAO,CAAC,qBAAqB,CAAC,CAiEhC;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
package/dist/documents/module.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
1
2
|
import { loadRecipeModule } from "../recipe/extensions.js";
|
|
2
3
|
import { recipeDocumentPackageName } from "../recipe/package.js";
|
|
3
4
|
import { DOCUMENT_COMMANDS, documentCommandsFor, documentConnectorTools, registerDocumentTools, } from "./tools.js";
|
|
5
|
+
import { resolveDocumentProfile } from "./profile.js";
|
|
6
|
+
/** The core `documents` skill, offered to every agent that selects the tool. It ships beside `dist/`. */
|
|
7
|
+
export const DOCUMENTS_SKILL = fileURLToPath(new URL("../../documents/SKILL.md", import.meta.url));
|
|
4
8
|
function sameCapabilities(left, right) {
|
|
5
9
|
const a = documentCommandsFor(left);
|
|
6
10
|
const b = documentCommandsFor(right);
|
|
@@ -20,6 +24,7 @@ export function createDocumentFormatModule(options) {
|
|
|
20
24
|
format: options.format,
|
|
21
25
|
extensions: options.extensions.map((extension) => extension.toLowerCase()),
|
|
22
26
|
capabilities: options.capabilities,
|
|
27
|
+
profiles: { ...options.profiles },
|
|
23
28
|
createAdapter(createOptions) {
|
|
24
29
|
const adapter = options.createAdapter(createOptions);
|
|
25
30
|
if (adapter.format !== options.format) {
|
|
@@ -47,8 +52,10 @@ function parseFormatModule(value, declaration) {
|
|
|
47
52
|
}
|
|
48
53
|
const knownCommands = new Set(DOCUMENT_COMMANDS);
|
|
49
54
|
/**
|
|
50
|
-
* Load every `pi.documents` format package and
|
|
51
|
-
* `documents`, one extension
|
|
55
|
+
* Load every `pi.documents` format package and the profile each declaration
|
|
56
|
+
* names (only those) and, when the agent selects `documents`, one extension
|
|
57
|
+
* registering the shared tool and offering the core `documents` skill with
|
|
58
|
+
* each profile's hints beside it.
|
|
52
59
|
*
|
|
53
60
|
* Each declaration's `commands` allowlist narrows what that format may do;
|
|
54
61
|
* the tool exposes the union of what the formats allow.
|
|
@@ -76,13 +83,22 @@ export async function loadRecipeDocuments(declarations, agentTools, options) {
|
|
|
76
83
|
throw new Error(`Document format '${declaration.format}' does not support command: ${command}`);
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
|
-
|
|
86
|
+
const profile = declaration.profile === undefined
|
|
87
|
+
? undefined
|
|
88
|
+
: resolveDocumentProfile(declaration.profile, { format: declaration.format, shipped: module.profiles, recipeDir: options.recipeDir });
|
|
89
|
+
return { declaration, module, profile };
|
|
80
90
|
}));
|
|
81
91
|
const enabled = modules.filter(({ declaration }) => declaration.commands?.length !== 0);
|
|
82
92
|
if (!agentTools.includes("documents") || enabled.length === 0)
|
|
83
93
|
return { toolNames: [] };
|
|
94
|
+
const skillPaths = [DOCUMENTS_SKILL];
|
|
95
|
+
for (const { profile } of enabled) {
|
|
96
|
+
if (profile && !skillPaths.includes(profile))
|
|
97
|
+
skillPaths.push(profile);
|
|
98
|
+
}
|
|
84
99
|
return {
|
|
85
100
|
toolNames: ["documents"],
|
|
101
|
+
skillPaths,
|
|
86
102
|
extension: {
|
|
87
103
|
owner: `<documents:${enabled.map(({ declaration }) => declaration.format).join(",")}>`,
|
|
88
104
|
factory: (pi) => {
|
|
@@ -108,6 +124,7 @@ export async function loadRecipeDocuments(declarations, agentTools, options) {
|
|
|
108
124
|
});
|
|
109
125
|
});
|
|
110
126
|
registerDocumentTools(pi, adapters, { cwd });
|
|
127
|
+
pi.on("resources_discover", () => ({ skillPaths }));
|
|
111
128
|
},
|
|
112
129
|
},
|
|
113
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/documents/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/documents/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAA8B,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GAEtB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAGtD,yGAAyG;AACzG,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,0BAA0B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAuBnG,SA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|
|
3
|
+
* frontmatter `name` is the folder's name, in lower case, with a
|
|
4
|
+
* `description`. A format package ships some by name; a Recipe can bring its
|
|
5
|
+
* own by a relative path to the folder (or its `SKILL.md`). A profile is only
|
|
6
|
+
* read, never run. See docs/documents.md, "Write your own profile".
|
|
7
|
+
*/
|
|
8
|
+
/** A profile name a format ships, such as `legal-redlining-en-US`. */
|
|
9
|
+
export declare const DOCUMENT_PROFILE_NAME: RegExp;
|
|
10
|
+
/** A relative path to a profile folder or its SKILL.md, rather than a shipped name. */
|
|
11
|
+
export declare function isDocumentProfilePath(profile: string): boolean;
|
|
12
|
+
/** Why a `pi.documents[].profile` value has the wrong shape, or undefined when the shape is right. */
|
|
13
|
+
export declare function documentProfileShapeProblem(profile: unknown): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Check a profile's SKILL.md follows the contract: frontmatter whose `name`
|
|
16
|
+
* is its folder's name in lower case, and a `description`. Returns the problem,
|
|
17
|
+
* or undefined when it follows the contract.
|
|
18
|
+
*/
|
|
19
|
+
export declare function documentProfileSkillProblem(skillPath: string): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The SKILL.md of a profile a Recipe brings by path: the folder or the file,
|
|
22
|
+
* inside the Recipe by its real path, following the contract.
|
|
23
|
+
*/
|
|
24
|
+
export declare function recipeProfileSkill(profile: string, recipeDir: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The SKILL.md a declaration's `profile` selects: one the format ships, by
|
|
27
|
+
* name (case-insensitive), or the Recipe's own, by relative path.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveDocumentProfile(profile: string, options: {
|
|
30
|
+
format: string;
|
|
31
|
+
shipped?: Readonly<Record<string, string>>;
|
|
32
|
+
recipeDir: string;
|
|
33
|
+
}): string;
|
|
34
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/documents/profile.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AAEH,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,QAA+B,CAAC;AAElE,uFAAuF;AACvF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED,sGAAsG;AACtG,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAOhF;AAUD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASjF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAc7E;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzF,MAAM,CAUR"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
|
+
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
3
|
+
import { parse } from "yaml";
|
|
4
|
+
import { assertRecipePathContained } from "../recipe/package.js";
|
|
5
|
+
/**
|
|
6
|
+
* A document profile is a skill: a folder holding a `SKILL.md` whose
|
|
7
|
+
* frontmatter `name` is the folder's name, in lower case, with a
|
|
8
|
+
* `description`. A format package ships some by name; a Recipe can bring its
|
|
9
|
+
* own by a relative path to the folder (or its `SKILL.md`). A profile is only
|
|
10
|
+
* read, never run. See docs/documents.md, "Write your own profile".
|
|
11
|
+
*/
|
|
12
|
+
/** A profile name a format ships, such as `legal-redlining-en-US`. */
|
|
13
|
+
export const DOCUMENT_PROFILE_NAME = /^[A-Za-z0-9][A-Za-z0-9-]*$/;
|
|
14
|
+
/** A relative path to a profile folder or its SKILL.md, rather than a shipped name. */
|
|
15
|
+
export function isDocumentProfilePath(profile) {
|
|
16
|
+
return profile.includes("/") || profile.includes("\\") || profile.startsWith(".");
|
|
17
|
+
}
|
|
18
|
+
/** Why a `pi.documents[].profile` value has the wrong shape, or undefined when the shape is right. */
|
|
19
|
+
export function documentProfileShapeProblem(profile) {
|
|
20
|
+
const usage = "must be the name of a profile the format ships, such as legal-redlining-en-US, or a relative path to a profile folder in the Recipe";
|
|
21
|
+
if (typeof profile !== "string" || !profile.trim())
|
|
22
|
+
return usage;
|
|
23
|
+
if (!isDocumentProfilePath(profile))
|
|
24
|
+
return DOCUMENT_PROFILE_NAME.test(profile) ? undefined : usage;
|
|
25
|
+
const absolute = isAbsolute(profile) || profile.startsWith("\\") || /^[A-Za-z]:/.test(profile);
|
|
26
|
+
if (absolute || profile.split(/[\\/]/).includes(".."))
|
|
27
|
+
return `'${profile}' must be a relative path inside the Recipe`;
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
/** The frontmatter of a SKILL.md, or undefined when it has none. */
|
|
31
|
+
function frontmatter(text) {
|
|
32
|
+
const match = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);
|
|
33
|
+
if (!match)
|
|
34
|
+
return undefined;
|
|
35
|
+
const parsed = parse(match[1] ?? "");
|
|
36
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check a profile's SKILL.md follows the contract: frontmatter whose `name`
|
|
40
|
+
* is its folder's name in lower case, and a `description`. Returns the problem,
|
|
41
|
+
* or undefined when it follows the contract.
|
|
42
|
+
*/
|
|
43
|
+
export function documentProfileSkillProblem(skillPath) {
|
|
44
|
+
const folder = basename(dirname(skillPath));
|
|
45
|
+
const fields = frontmatter(readFileSync(skillPath, "utf8"));
|
|
46
|
+
if (!fields)
|
|
47
|
+
return "has no frontmatter; start it with --- name and description ---";
|
|
48
|
+
if (fields.name !== folder || folder !== folder.toLowerCase()) {
|
|
49
|
+
return `frontmatter name must be its folder's name in lower case ('${folder.toLowerCase()}'), not '${String(fields.name ?? "")}'`;
|
|
50
|
+
}
|
|
51
|
+
if (typeof fields.description !== "string" || !fields.description.trim())
|
|
52
|
+
return "frontmatter needs a description";
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The SKILL.md of a profile a Recipe brings by path: the folder or the file,
|
|
57
|
+
* inside the Recipe by its real path, following the contract.
|
|
58
|
+
*/
|
|
59
|
+
export function recipeProfileSkill(profile, recipeDir) {
|
|
60
|
+
const shape = documentProfileShapeProblem(profile);
|
|
61
|
+
if (shape)
|
|
62
|
+
throw new Error(`Document profile ${shape}`);
|
|
63
|
+
const target = resolve(recipeDir, profile);
|
|
64
|
+
if (!existsSync(target))
|
|
65
|
+
throw new Error(`Document profile ${profile} doesn't exist in the Recipe`);
|
|
66
|
+
// Where it really resolves: a symlink inside the Recipe can point outside it.
|
|
67
|
+
assertRecipePathContained(recipeDir, target, `document profile ${profile}`);
|
|
68
|
+
const skill = statSync(target).isDirectory() ? join(target, "SKILL.md") : target;
|
|
69
|
+
if (basename(skill) !== "SKILL.md")
|
|
70
|
+
throw new Error(`Document profile ${profile} must be a folder holding a SKILL.md, or that SKILL.md`);
|
|
71
|
+
if (!existsSync(skill))
|
|
72
|
+
throw new Error(`Document profile ${profile} has no SKILL.md`);
|
|
73
|
+
assertRecipePathContained(recipeDir, skill, `document profile ${profile}`);
|
|
74
|
+
const problem = documentProfileSkillProblem(skill);
|
|
75
|
+
if (problem)
|
|
76
|
+
throw new Error(`Document profile ${profile}: SKILL.md ${problem}`);
|
|
77
|
+
return skill;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The SKILL.md a declaration's `profile` selects: one the format ships, by
|
|
81
|
+
* name (case-insensitive), or the Recipe's own, by relative path.
|
|
82
|
+
*/
|
|
83
|
+
export function resolveDocumentProfile(profile, options) {
|
|
84
|
+
if (isDocumentProfilePath(profile))
|
|
85
|
+
return recipeProfileSkill(profile, options.recipeDir);
|
|
86
|
+
const shipped = options.shipped ?? {};
|
|
87
|
+
const found = Object.keys(shipped).find((name) => name.toLowerCase() === profile.toLowerCase());
|
|
88
|
+
if (found)
|
|
89
|
+
return shipped[found];
|
|
90
|
+
const names = Object.keys(shipped);
|
|
91
|
+
throw new Error(`Unknown document profile '${profile}': the ${options.format} format ships ${names.length ? names.join(", ") : "no profiles"}. ` +
|
|
92
|
+
"Bring your own as a relative path to a profile folder in the Recipe.");
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/documents/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;;;;;GAMG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE,uFAAuF;AACvF,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,sGAAsG;AACtG,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IAC1D,MAAM,KAAK,GAAG,qIAAqI,CAAC;IACpJ,IAAI,OAAO,OAAO,KAAK,QAA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