@senior-skills/adapter-codex 1.0.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.
@@ -0,0 +1,27 @@
1
+ import { type AgentAdapter, type AgentDetection, type AgentLayout, type AgentLocation, type DetectionContext, type InstallScope, type LocationContext, type PackageKind, type SkillPackage, type ValidationIssue } from '@senior-skills/core';
2
+ export declare const CODEX_AGENT_ID = "codex";
3
+ /**
4
+ * OpenAI Codex.
5
+ *
6
+ * Layout:
7
+ * global $CODEX_HOME/skills/<name>/ (default ~/.codex/skills/<name>/)
8
+ * project <project>/.agents/skills/<name>/
9
+ *
10
+ * Codex agrees with Claude on `SKILL.md` + frontmatter, and adds two things this adapter
11
+ * synthesises: `metadata.short-description`, and an optional `agents/openai.yaml` describing
12
+ * how the skill appears in the Codex UI. Both are derived from neutral manifest fields, so a
13
+ * skill author never has to know Codex exists.
14
+ */
15
+ export declare class CodexAdapter implements AgentAdapter {
16
+ readonly id = "codex";
17
+ readonly displayName = "Codex";
18
+ readonly aliases: string[];
19
+ /** The single presentation-only escape hatch this adapter honours. */
20
+ readonly overrideKeys: readonly string[];
21
+ detect(ctx: DetectionContext): Promise<AgentDetection>;
22
+ locationFor(kind: PackageKind, scope: InstallScope, ctx: LocationContext): AgentLocation | undefined;
23
+ layoutFor(pkg: SkillPackage): AgentLayout;
24
+ validate(pkg: SkillPackage): readonly ValidationIssue[];
25
+ private interfaceDocument;
26
+ }
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,cAAc,UAAU,CAAC;AA6BtC;;;;;;;;;;;GAWG;AACH,qBAAa,YAAa,YAAW,YAAY;IAC/C,QAAQ,CAAC,EAAE,WAAkB;IAC7B,QAAQ,CAAC,WAAW,WAAW;IAC/B,QAAQ,CAAC,OAAO,WAA6B;IAE7C,sEAAsE;IACtE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAmB;IAErD,MAAM,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC;IAsB5D,WAAW,CACT,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,eAAe,GACnB,aAAa,GAAG,SAAS;IAoB5B,SAAS,CAAC,GAAG,EAAE,YAAY,GAAG,WAAW;IA2CzC,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,eAAe,EAAE;IAqDvD,OAAO,CAAC,iBAAiB;CAiB1B"}
package/dist/index.js ADDED
@@ -0,0 +1,183 @@
1
+ import { IssueCollector, SKILL_ENTRYPOINT, detectionFrom, encodeText, stringifySkillDocument, } from '@senior-skills/core';
2
+ import { stringify as stringifyYaml } from 'yaml';
3
+ import { join } from 'node:path';
4
+ export const CODEX_AGENT_ID = 'codex';
5
+ /** Codex resolves its home from this variable, falling back to `~/.codex`. */
6
+ const CODEX_HOME_ENV = 'CODEX_HOME';
7
+ const DEFAULT_HOME_DIRNAME = '.codex';
8
+ const SKILLS_DIRNAME = 'skills';
9
+ /**
10
+ * Project-scope location.
11
+ *
12
+ * `.agents/skills/` is the vendor-neutral repository convention Codex's own plugin tooling
13
+ * emits, as opposed to `$CODEX_HOME/skills` which is strictly the user-global location. It is
14
+ * the least firmly established of the four paths this project hardcodes, which is exactly why
15
+ * it is overridable through `agents.codex.projectRoot` in config.
16
+ */
17
+ const PROJECT_DIRNAME = '.agents';
18
+ /** UI metadata Codex reads from `agents/openai.yaml`. */
19
+ const INTERFACE_KEY = 'interface';
20
+ const OPENAI_METADATA_PATH = 'agents/openai.yaml';
21
+ const KNOWN_INTERFACE_KEYS = new Set([
22
+ 'display_name',
23
+ 'short_description',
24
+ 'default_prompt',
25
+ 'icon_small',
26
+ 'icon_large',
27
+ ]);
28
+ /**
29
+ * OpenAI Codex.
30
+ *
31
+ * Layout:
32
+ * global $CODEX_HOME/skills/<name>/ (default ~/.codex/skills/<name>/)
33
+ * project <project>/.agents/skills/<name>/
34
+ *
35
+ * Codex agrees with Claude on `SKILL.md` + frontmatter, and adds two things this adapter
36
+ * synthesises: `metadata.short-description`, and an optional `agents/openai.yaml` describing
37
+ * how the skill appears in the Codex UI. Both are derived from neutral manifest fields, so a
38
+ * skill author never has to know Codex exists.
39
+ */
40
+ export class CodexAdapter {
41
+ id = CODEX_AGENT_ID;
42
+ displayName = 'Codex';
43
+ aliases = ['codex', 'openai-codex'];
44
+ /** The single presentation-only escape hatch this adapter honours. */
45
+ overrideKeys = [INTERFACE_KEY];
46
+ async detect(ctx) {
47
+ const environment = ctx.env.env();
48
+ const evidence = [];
49
+ const home = environment[CODEX_HOME_ENV] ?? join(ctx.env.homeDir(), DEFAULT_HOME_DIRNAME);
50
+ if (await ctx.fs.exists(home)) {
51
+ evidence.push({ strength: 'strong', kind: 'config-dir', detail: home });
52
+ }
53
+ const executable = await ctx.commands.which('codex');
54
+ if (executable !== undefined) {
55
+ evidence.push({ strength: 'strong', kind: 'executable', detail: executable });
56
+ }
57
+ const projectDir = join(ctx.env.cwd(), PROJECT_DIRNAME, SKILLS_DIRNAME);
58
+ if (await ctx.fs.exists(projectDir)) {
59
+ evidence.push({ strength: 'weak', kind: 'project-dir', detail: projectDir });
60
+ }
61
+ return detectionFrom(this.id, evidence);
62
+ }
63
+ locationFor(kind, scope, ctx) {
64
+ // Codex's custom-prompt directory has not been verified against the binary the way the
65
+ // skills path was, so this adapter declares no home for commands rather than guessing one
66
+ // and writing where Codex may never look.
67
+ if (kind !== 'skill')
68
+ return undefined;
69
+ const shape = { shape: 'directory', extension: '' };
70
+ if (ctx.overrideRoot !== undefined)
71
+ return { root: ctx.overrideRoot, ...shape };
72
+ if (scope === 'project') {
73
+ if (ctx.projectRoot === undefined) {
74
+ throw new Error('Codex project scope requires a project root');
75
+ }
76
+ return { root: join(ctx.projectRoot, PROJECT_DIRNAME, SKILLS_DIRNAME), ...shape };
77
+ }
78
+ const home = ctx.env[CODEX_HOME_ENV] ?? join(ctx.homeDir, DEFAULT_HOME_DIRNAME);
79
+ return { root: join(home, SKILLS_DIRNAME), ...shape };
80
+ }
81
+ layoutFor(pkg) {
82
+ const { manifest, document } = pkg;
83
+ const frontmatter = {
84
+ name: manifest.name,
85
+ description: manifest.description,
86
+ };
87
+ // Codex uses `metadata.short-description` in compact listings. Preserve an author-written
88
+ // one; otherwise derive a first-sentence summary rather than repeating the full text.
89
+ const existingMetadata = document.frontmatter['metadata'];
90
+ const metadata = existingMetadata !== null &&
91
+ typeof existingMetadata === 'object' &&
92
+ !Array.isArray(existingMetadata)
93
+ ? { ...existingMetadata }
94
+ : {};
95
+ if (metadata['short-description'] === undefined) {
96
+ metadata['short-description'] = shortDescription(manifest.description);
97
+ }
98
+ frontmatter['metadata'] = metadata;
99
+ const entries = [
100
+ {
101
+ path: SKILL_ENTRYPOINT,
102
+ content: encodeText(stringifySkillDocument({ frontmatter, body: document.body })),
103
+ },
104
+ ];
105
+ for (const file of pkg.files) {
106
+ if (file.path === SKILL_ENTRYPOINT)
107
+ continue;
108
+ if (file.path === OPENAI_METADATA_PATH)
109
+ continue; // regenerated below
110
+ entries.push({ path: file.path, copyFrom: file.path });
111
+ }
112
+ entries.push({
113
+ path: OPENAI_METADATA_PATH,
114
+ content: encodeText(this.interfaceDocument(pkg)),
115
+ });
116
+ return { entries, frontmatter };
117
+ }
118
+ validate(pkg) {
119
+ const issues = new IssueCollector();
120
+ const override = pkg.manifest.agentOverrides[this.id]?.[INTERFACE_KEY];
121
+ if (override !== undefined) {
122
+ if (override === null || typeof override !== 'object' || Array.isArray(override)) {
123
+ issues.error('codex.interface.type', `agentOverrides.codex.${INTERFACE_KEY}`, 'The Codex "interface" override must be a mapping');
124
+ }
125
+ else {
126
+ for (const [key, value] of Object.entries(override)) {
127
+ if (!KNOWN_INTERFACE_KEYS.has(key)) {
128
+ issues.error('codex.interface.unknownKey', `agentOverrides.codex.${INTERFACE_KEY}.${key}`, `Codex does not recognise the interface key "${key}"`, `Accepted: ${[...KNOWN_INTERFACE_KEYS].join(', ')}`);
129
+ continue;
130
+ }
131
+ if (typeof value !== 'string') {
132
+ issues.error('codex.interface.valueType', `agentOverrides.codex.${INTERFACE_KEY}.${key}`, `"${key}" must be a string`);
133
+ }
134
+ }
135
+ }
136
+ }
137
+ // The icon keys reference files that must actually ship, or the Codex UI shows a gap.
138
+ const iconKeys = ['icon_small', 'icon_large'];
139
+ const declared = (override ?? {});
140
+ for (const key of iconKeys) {
141
+ const value = declared[key];
142
+ if (typeof value !== 'string')
143
+ continue;
144
+ const relative = value.replace(/^\.\//, '');
145
+ if (!pkg.files.some((file) => file.path === relative)) {
146
+ issues.warn('codex.interface.missingIcon', `agentOverrides.codex.${INTERFACE_KEY}.${key}`, `"${value}" is not shipped in this package`, 'Add the file, or add its directory to the "files" list in skill.yaml');
147
+ }
148
+ }
149
+ return issues.all();
150
+ }
151
+ interfaceDocument(pkg) {
152
+ const { manifest } = pkg;
153
+ const override = (manifest.agentOverrides[this.id]?.[INTERFACE_KEY] ?? {});
154
+ const iface = {
155
+ display_name: override['display_name'] ?? titleCase(manifest.name),
156
+ short_description: override['short_description'] ?? shortDescription(manifest.description),
157
+ };
158
+ for (const key of ['default_prompt', 'icon_small', 'icon_large']) {
159
+ if (typeof override[key] === 'string')
160
+ iface[key] = override[key];
161
+ }
162
+ return stringifyYaml({ [INTERFACE_KEY]: iface }, { lineWidth: 100 });
163
+ }
164
+ }
165
+ const SHORT_DESCRIPTION_LIMIT = 160;
166
+ /** First sentence, capped at a word boundary so compact listings stay readable. */
167
+ function shortDescription(description) {
168
+ const collapsed = description.replace(/\s+/g, ' ').trim();
169
+ const firstSentence = /^(.+?[.!?])(\s|$)/.exec(collapsed)?.[1] ?? collapsed;
170
+ if (firstSentence.length <= SHORT_DESCRIPTION_LIMIT)
171
+ return firstSentence;
172
+ const clipped = firstSentence.slice(0, SHORT_DESCRIPTION_LIMIT - 1);
173
+ const lastSpace = clipped.lastIndexOf(' ');
174
+ // Cutting mid-word reads as corruption rather than as an abbreviation.
175
+ return `${(lastSpace > 40 ? clipped.slice(0, lastSpace) : clipped).replace(/[,;:]$/, '')}…`;
176
+ }
177
+ function titleCase(name) {
178
+ return name
179
+ .split('-')
180
+ .map((part) => (part.length === 0 ? part : part[0].toUpperCase() + part.slice(1)))
181
+ .join(' ');
182
+ }
183
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,sBAAsB,GAavB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAEtC,8EAA8E;AAC9E,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AACtC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC,yDAAyD;AACzD,MAAM,aAAa,GAAG,WAAW,CAAC;AAClC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,cAAc;IACd,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;IACZ,YAAY;CACb,CAAC,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+1,33 @@
1
+ {
2
+ "name": "@senior-skills/adapter-codex",
3
+ "version": "1.0.0",
4
+ "description": "OpenAI Codex agent adapter for senior-skills",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/robsonkades/senior-skills.git",
9
+ "directory": "packages/adapter-codex"
10
+ },
11
+ "type": "module",
12
+ "main": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "engines": {
24
+ "node": ">=22.18.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@senior-skills/core": "1.0.0",
31
+ "yaml": "^2.9.1"
32
+ }
33
+ }