@lumyne/codex-gateway 0.0.0-stage → 0.1.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/README.md +26 -2
- package/bin/codex-gateway.cjs +131 -0
- package/capabilities.json +428 -0
- package/gateway.example.json +11 -0
- package/lib/image-link-response.cjs +229 -0
- package/lib/settings.cjs +52 -0
- package/lib/skill.cjs +113 -0
- package/lib/windows.cjs +397 -0
- package/package.json +29 -4
- package/skills/codex-gateway/SKILL.md +15 -0
- package/skills/codex-gateway/adapters/generic.json +6 -0
- package/skills/codex-gateway/capabilities.json +8 -0
package/README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Codex Gateway
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install and update a local gateway helper for the official Codex desktop app on Windows. It provides a configured model picker, forwards model requests through an authenticated loopback bridge, and repairs eligible generated-image links using verified local files. The helper and the gateway configuration have separate update cycles.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
Give your current Agent the gateway configuration file and this prompt.
|
|
8
|
+
|
|
9
|
+
> Install @lumyne/codex-gateway, set up its Skill for this Agent, and configure the official Windows Codex app using the attached gateway configuration.
|
|
10
|
+
|
|
11
|
+
On an existing single-channel installation, the helper can migrate the protected credential. For a fresh installation or an additional channel, provide your Agent an authorized credential file through a private channel. The application should be closed when configuration is applied or switched.
|
|
12
|
+
|
|
13
|
+
> Update @lumyne/codex-gateway and its Skill for this Agent.
|
|
14
|
+
|
|
15
|
+
> Apply the attached gateway configuration to Codex Gateway and verify the model list.
|
|
16
|
+
|
|
17
|
+
## Technical configuration reference
|
|
18
|
+
|
|
19
|
+
Use Node.js 22 or later. The management CLI and Skill can run on any supported Node.js system. The gateway helper itself requires Windows, the official Codex desktop app and its bundled CLI. The helper installs under the current user's Codex settings directory. Its desktop shortcut and the subscription entry launch the same official application.
|
|
20
|
+
|
|
21
|
+
Use a config file like [gateway.example.json](gateway.example.json). Set one HTTPS base URL per channel and select a channel and protocol for every model. Responses and Anthropic Messages are supported. The default model must be in the configured list. Enable image-link correction per model with the optional boolean field written as `"repairImageLinks": true`. Set `"hostedSearch": false` for upstreams that reject hosted search tools.
|
|
22
|
+
|
|
23
|
+
The separate credentials JSON object maps each channel's credential reference to its associated API key. The helper imports keys into Windows DPAPI CurrentUser files and removes inherited file permissions. To rotate a key, use a new reference and import the new credential. Keep configuration and credentials in your distribution channel. Keys are unnecessary for upgrading the package itself.
|
|
24
|
+
|
|
25
|
+
The public bootstrap contract is available from the installed CLI's `capabilities --json` and `skill source --json`. Codex can resolve its default Skill directory. For a different Agent, pass its exact directory with `--target` or its Skill parent with `--path`. The same npm package and Skill support both inputs. Ordinary interactive task entry checks latest in the background, throttled to once per day. Set `CODEX_GATEWAY_NO_UPDATE_CHECK=1` to opt out. Updates require an explicit operation.
|
|
26
|
+
|
|
27
|
+
Image-link correction applies to Responses event streams with local evidence, an invalid Windows image link and a unique verified match in the current turn. Any valid file link is preserved. The buffering limit is 512 KiB, with longer responses passed through.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const os = require('node:os');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const { spawnSync } = require('node:child_process');
|
|
7
|
+
const { parseArgs } = require('node:util');
|
|
8
|
+
const meta = require('../package.json');
|
|
9
|
+
const skill = require('../lib/skill.cjs');
|
|
10
|
+
const manifest = require('../capabilities.json');
|
|
11
|
+
const options = {
|
|
12
|
+
json:{type:'boolean'}, agent:{type:'string'}, target:{type:'string'}, path:{type:'string'}, skill:{type:'string'},
|
|
13
|
+
list:{type:'boolean'}, config:{type:'string'}, credentials:{type:'string'}, 'codex-cli':{type:'string'},
|
|
14
|
+
'no-launch':{type:'boolean'}, 'no-shortcut':{type:'boolean'}, yes:{type:'boolean'}
|
|
15
|
+
};
|
|
16
|
+
const identity = {ok:true,package:meta.name,version:meta.version};
|
|
17
|
+
const print = data => console.log(JSON.stringify(data,null,2));
|
|
18
|
+
|
|
19
|
+
function checkCli() {
|
|
20
|
+
require('@petercjl/codex-own/lib/subagent-bridge.cjs');
|
|
21
|
+
require('smol-toml');
|
|
22
|
+
return {runtimeImport:true, platform:process.platform, windowsDesktopSupported:process.platform==='win32'};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function latest() {
|
|
26
|
+
const response = await fetch('https://registry.npmjs.org/'+encodeURIComponent(meta.name)+'/latest',
|
|
27
|
+
{signal:AbortSignal.timeout(1800),redirect:'error'});
|
|
28
|
+
if (!response.ok) throw new Error('Could not look up the latest version in npm.');
|
|
29
|
+
const {version} = await response.json();
|
|
30
|
+
if (typeof version!=='string'||!/^(\d+\.){2}\d+$/.test(version)) throw new Error('Unexpected registry version.');
|
|
31
|
+
return {...identity,latest:version,updateAvailable:version.localeCompare(meta.version,'en',{numeric:true})>0};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function updateNotice() {
|
|
35
|
+
if (process.env.CODEX_GATEWAY_NO_UPDATE_CHECK || !process.stderr.isTTY) return;
|
|
36
|
+
const cache = path.join(os.homedir(),'.cache','codex-gateway','update.json');
|
|
37
|
+
try {
|
|
38
|
+
const data = JSON.parse(fs.readFileSync(cache,'utf8'));
|
|
39
|
+
if (Date.now()-data.checkedAt < 86400000) {
|
|
40
|
+
if (data.latest && data.latest.localeCompare(meta.version,'en',{numeric:true})>0) {
|
|
41
|
+
console.error('Gateway update available: '+data.latest+'. Run codex-gateway update check.');
|
|
42
|
+
}
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
} catch {}
|
|
46
|
+
const child = require('node:child_process').spawn(process.execPath,[__filename,'update-cache',cache],
|
|
47
|
+
{detached:true,stdio:'ignore',windowsHide:true});
|
|
48
|
+
child.unref();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function main() {
|
|
52
|
+
if (process.argv[2]==='update-cache') {
|
|
53
|
+
const cache=path.join(os.homedir(),'.cache','codex-gateway','update.json');
|
|
54
|
+
if (process.argv[3]!==cache || process.env.CODEX_GATEWAY_NO_UPDATE_CHECK) return;
|
|
55
|
+
const result = await latest().catch(()=>null);
|
|
56
|
+
fs.mkdirSync(path.dirname(cache),{recursive:true});
|
|
57
|
+
const temporary = cache+'.'+process.pid;
|
|
58
|
+
fs.writeFileSync(temporary,JSON.stringify({checkedAt:Date.now(),latest:result?.latest}),{mode:0o600,flag:'wx'});
|
|
59
|
+
fs.renameSync(temporary,cache);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (process.argv[2]==='--help' && process.argv.includes('--json')) return print(manifest);
|
|
63
|
+
const {values, positionals} = parseArgs({options:{...options,help:{type:'boolean'}},allowPositionals:true});
|
|
64
|
+
const [command, operation, ...remaining] = positionals;
|
|
65
|
+
if (values.help) {
|
|
66
|
+
const result = manifest.commandContracts[[command,operation].filter(Boolean).join(' ')];
|
|
67
|
+
if (result) return print(result);
|
|
68
|
+
return print(manifest);
|
|
69
|
+
}
|
|
70
|
+
if (remaining.length) throw new Error('Unexpected positional argument.');
|
|
71
|
+
if (!command || command==='help') {
|
|
72
|
+
if (values.json) return print(manifest);
|
|
73
|
+
return console.log('codex-gateway version | capabilities | doctor | install --config FILE [--credentials FILE] | Gateway | Plus | skill source/status/install/update | update check/install');
|
|
74
|
+
}
|
|
75
|
+
if (command==='version') return values.json?print(identity):console.log(meta.version);
|
|
76
|
+
if (command==='capabilities') return print(manifest);
|
|
77
|
+
if (command==='doctor') {
|
|
78
|
+
if (!values.json) updateNotice();
|
|
79
|
+
return print({...identity,...checkCli(),skill:skill.source()});
|
|
80
|
+
}
|
|
81
|
+
if (command==='prepack') {
|
|
82
|
+
if (skill.source().version!==manifest.version) throw new Error('Capability manifest version mismatch.');
|
|
83
|
+
if (!fs.readFileSync(path.join(skill.source().path,'SKILL.md'),'utf8').startsWith('---\nname: codex-gateway\n')) {
|
|
84
|
+
throw new Error('Canonical Skill is missing or invalid.');
|
|
85
|
+
}
|
|
86
|
+
require('../lib/settings.cjs').readSettings(path.join(__dirname,'..','gateway.example.json'));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (command==='skill') {
|
|
90
|
+
if (values.skill && values.skill!=='codex-gateway') throw new Error('Unknown Skill.');
|
|
91
|
+
if (operation==='source') return print(values.list?{ok:true,complete:true,items:[skill.source()]}:{...manifest,...skill.source()});
|
|
92
|
+
const target = skill.destination(values);
|
|
93
|
+
if (operation==='status') return print(skill.status(target));
|
|
94
|
+
if (['install','update'].includes(operation)) return print(skill.sync(target));
|
|
95
|
+
}
|
|
96
|
+
if (command==='update') {
|
|
97
|
+
if (operation==='check') return print(await latest());
|
|
98
|
+
if (operation==='install' && values.yes) {
|
|
99
|
+
const target = skill.destination(values);
|
|
100
|
+
const installed = skill.status(target);
|
|
101
|
+
if (installed.edited||(!installed.managed&&fs.existsSync(target))) throw new Error('Resolve the Skill destination before updating.');
|
|
102
|
+
const result = await latest();
|
|
103
|
+
if (!result.updateAvailable) return print(skill.sync(target));
|
|
104
|
+
const args = ['install','-g',meta.name+'@'+result.latest,'--ignore-scripts','--registry=https://registry.npmjs.org'];
|
|
105
|
+
const update = process.platform==='win32'
|
|
106
|
+
? spawnSync(process.env.ComSpec || 'cmd.exe',['/d','/c','npm.cmd',...args],{stdio:'inherit'})
|
|
107
|
+
: spawnSync('npm',args,{stdio:'inherit'});
|
|
108
|
+
if (update.error || update.status!==0) throw new Error('npm package update failed.');
|
|
109
|
+
const version = spawnSync(process.execPath,[__filename,'version'],{encoding:'utf8'});
|
|
110
|
+
if (version.status!==0||version.stdout.trim()!==result.latest) throw new Error('Use the global npm installation for this update.');
|
|
111
|
+
const sync = spawnSync(process.execPath,[__filename,'skill','update','--agent',values.agent,'--target',target],
|
|
112
|
+
{stdio:'inherit'});
|
|
113
|
+
if (sync.status!==0) throw new Error('The package was updated. Reconcile the Skill at its selected destination.');
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (['install','Gateway','Plus','token','bridge','ensure','stop'].includes(command)) {
|
|
118
|
+
if (command==='install'&&!values.config) throw new Error('Pass the external gateway configuration with --config.');
|
|
119
|
+
if (['install','Gateway','Plus'].includes(command)) updateNotice();
|
|
120
|
+
return require('../lib/windows.cjs').main(command,values);
|
|
121
|
+
}
|
|
122
|
+
throw new Error('Unknown command. Run codex-gateway help.');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
main().catch(error=>{
|
|
126
|
+
const protectedOperation = ['token','bridge'].includes(process.argv[2]);
|
|
127
|
+
const message = protectedOperation ? 'Could not start the protected gateway operation.' : error.message.split(/\r?\n/,1)[0];
|
|
128
|
+
if (process.argv.includes('--json')) print({ok:false,code:'GATEWAY_OPERATION_FAILED',message});
|
|
129
|
+
else console.error(message);
|
|
130
|
+
process.exitCode=1;
|
|
131
|
+
});
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ok": true,
|
|
3
|
+
"package": "@lumyne/codex-gateway",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"skills": [
|
|
6
|
+
"codex-gateway"
|
|
7
|
+
],
|
|
8
|
+
"runtime": {
|
|
9
|
+
"agentEligibility": "any Agent with shell and file access",
|
|
10
|
+
"gatewayOS": "win32",
|
|
11
|
+
"node": ">=22",
|
|
12
|
+
"desktop": "official Codex"
|
|
13
|
+
},
|
|
14
|
+
"commandContracts": {
|
|
15
|
+
"version": {
|
|
16
|
+
"argv": [
|
|
17
|
+
"version"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": "none",
|
|
20
|
+
"options": {
|
|
21
|
+
"--json": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"required": false
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"capabilities": {
|
|
28
|
+
"argv": [
|
|
29
|
+
"capabilities"
|
|
30
|
+
],
|
|
31
|
+
"sideEffects": "none",
|
|
32
|
+
"options": {
|
|
33
|
+
"--json": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"required": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"doctor": {
|
|
40
|
+
"argv": [
|
|
41
|
+
"doctor"
|
|
42
|
+
],
|
|
43
|
+
"sideEffects": "none",
|
|
44
|
+
"options": {
|
|
45
|
+
"--json": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"required": false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"skill source": {
|
|
52
|
+
"argv": [
|
|
53
|
+
"skill",
|
|
54
|
+
"source"
|
|
55
|
+
],
|
|
56
|
+
"sideEffects": "none",
|
|
57
|
+
"options": {
|
|
58
|
+
"--json": {
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"required": false
|
|
61
|
+
},
|
|
62
|
+
"--skill": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"required": false
|
|
65
|
+
},
|
|
66
|
+
"--list": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"required": false
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"skill status": {
|
|
73
|
+
"argv": [
|
|
74
|
+
"skill",
|
|
75
|
+
"status"
|
|
76
|
+
],
|
|
77
|
+
"sideEffects": "none",
|
|
78
|
+
"options": {
|
|
79
|
+
"--json": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"required": false
|
|
82
|
+
},
|
|
83
|
+
"--agent": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"required": false
|
|
86
|
+
},
|
|
87
|
+
"--target": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"required": false
|
|
90
|
+
},
|
|
91
|
+
"--path": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"required": false
|
|
94
|
+
},
|
|
95
|
+
"--skill": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"required": false
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"skill install": {
|
|
102
|
+
"argv": [
|
|
103
|
+
"skill",
|
|
104
|
+
"install"
|
|
105
|
+
],
|
|
106
|
+
"sideEffects": "local-write",
|
|
107
|
+
"options": {
|
|
108
|
+
"--json": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"required": false
|
|
111
|
+
},
|
|
112
|
+
"--agent": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"required": false
|
|
115
|
+
},
|
|
116
|
+
"--target": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"required": false
|
|
119
|
+
},
|
|
120
|
+
"--path": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"required": false
|
|
123
|
+
},
|
|
124
|
+
"--skill": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"required": false
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"skill update": {
|
|
131
|
+
"argv": [
|
|
132
|
+
"skill",
|
|
133
|
+
"update"
|
|
134
|
+
],
|
|
135
|
+
"sideEffects": "local-write",
|
|
136
|
+
"options": {
|
|
137
|
+
"--json": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"required": false
|
|
140
|
+
},
|
|
141
|
+
"--agent": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"required": false
|
|
144
|
+
},
|
|
145
|
+
"--target": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"required": false
|
|
148
|
+
},
|
|
149
|
+
"--path": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"required": false
|
|
152
|
+
},
|
|
153
|
+
"--skill": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"required": false
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"update check": {
|
|
160
|
+
"argv": [
|
|
161
|
+
"update",
|
|
162
|
+
"check"
|
|
163
|
+
],
|
|
164
|
+
"sideEffects": "none",
|
|
165
|
+
"options": {
|
|
166
|
+
"--json": {
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"required": false
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"update install": {
|
|
173
|
+
"argv": [
|
|
174
|
+
"update",
|
|
175
|
+
"install"
|
|
176
|
+
],
|
|
177
|
+
"sideEffects": "package-and-skill-update",
|
|
178
|
+
"options": {
|
|
179
|
+
"--json": {
|
|
180
|
+
"type": "boolean",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
183
|
+
"--yes": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"required": true
|
|
186
|
+
},
|
|
187
|
+
"--agent": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"required": false
|
|
190
|
+
},
|
|
191
|
+
"--target": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"required": false
|
|
194
|
+
},
|
|
195
|
+
"--path": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"required": false
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"install": {
|
|
202
|
+
"argv": [
|
|
203
|
+
"install"
|
|
204
|
+
],
|
|
205
|
+
"sideEffects": "local-write",
|
|
206
|
+
"options": {
|
|
207
|
+
"--json": {
|
|
208
|
+
"type": "boolean",
|
|
209
|
+
"required": false
|
|
210
|
+
},
|
|
211
|
+
"--config": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"required": true
|
|
214
|
+
},
|
|
215
|
+
"--credentials": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"required": false
|
|
218
|
+
},
|
|
219
|
+
"--codex-cli": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"required": false
|
|
222
|
+
},
|
|
223
|
+
"--no-shortcut": {
|
|
224
|
+
"type": "boolean",
|
|
225
|
+
"required": false
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"Gateway": {
|
|
230
|
+
"argv": [
|
|
231
|
+
"Gateway"
|
|
232
|
+
],
|
|
233
|
+
"sideEffects": "local-write",
|
|
234
|
+
"options": {
|
|
235
|
+
"--json": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"required": false
|
|
238
|
+
},
|
|
239
|
+
"--no-launch": {
|
|
240
|
+
"type": "boolean",
|
|
241
|
+
"required": false
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"Plus": {
|
|
246
|
+
"argv": [
|
|
247
|
+
"Plus"
|
|
248
|
+
],
|
|
249
|
+
"sideEffects": "local-write",
|
|
250
|
+
"options": {
|
|
251
|
+
"--json": {
|
|
252
|
+
"type": "boolean",
|
|
253
|
+
"required": false
|
|
254
|
+
},
|
|
255
|
+
"--no-launch": {
|
|
256
|
+
"type": "boolean",
|
|
257
|
+
"required": false
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"maintenanceContract": {
|
|
263
|
+
"schemaVersion": 1,
|
|
264
|
+
"source": {
|
|
265
|
+
"name": {
|
|
266
|
+
"field": "name",
|
|
267
|
+
"type": "string"
|
|
268
|
+
},
|
|
269
|
+
"package": {
|
|
270
|
+
"field": "package",
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"version": {
|
|
274
|
+
"field": "version",
|
|
275
|
+
"type": "string"
|
|
276
|
+
},
|
|
277
|
+
"path": {
|
|
278
|
+
"field": "path",
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"status": {
|
|
283
|
+
"name": {
|
|
284
|
+
"field": "name",
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"package": {
|
|
288
|
+
"field": "package",
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"version": {
|
|
292
|
+
"field": "version",
|
|
293
|
+
"type": "string"
|
|
294
|
+
},
|
|
295
|
+
"target": {
|
|
296
|
+
"field": "target",
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"installed": {
|
|
300
|
+
"field": "installed",
|
|
301
|
+
"type": "boolean"
|
|
302
|
+
},
|
|
303
|
+
"managed": {
|
|
304
|
+
"field": "managed",
|
|
305
|
+
"type": "boolean"
|
|
306
|
+
},
|
|
307
|
+
"current": {
|
|
308
|
+
"field": "current",
|
|
309
|
+
"type": "boolean"
|
|
310
|
+
},
|
|
311
|
+
"edited": {
|
|
312
|
+
"field": "edited",
|
|
313
|
+
"type": "boolean"
|
|
314
|
+
},
|
|
315
|
+
"verification": {
|
|
316
|
+
"field": "verification",
|
|
317
|
+
"type": "object"
|
|
318
|
+
},
|
|
319
|
+
"recovery": {
|
|
320
|
+
"field": "recovery",
|
|
321
|
+
"type": "object"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"targetOptions": {
|
|
325
|
+
"--target": {
|
|
326
|
+
"kind": "skill-directory"
|
|
327
|
+
},
|
|
328
|
+
"--path": {
|
|
329
|
+
"kind": "skill-parent"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"agentEligibility": "valid-name-with-generic-fallback",
|
|
333
|
+
"hostDiscoveryAuthority": "host"
|
|
334
|
+
},
|
|
335
|
+
"discoveryContract": {
|
|
336
|
+
"schemaVersion": 1,
|
|
337
|
+
"entryPoints": [
|
|
338
|
+
{
|
|
339
|
+
"argv": [
|
|
340
|
+
"capabilities",
|
|
341
|
+
"--json"
|
|
342
|
+
],
|
|
343
|
+
"result": "manifest"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"argv": [
|
|
347
|
+
"--help",
|
|
348
|
+
"--json"
|
|
349
|
+
],
|
|
350
|
+
"result": "manifest"
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"commandsField": "commandContracts",
|
|
354
|
+
"version": {
|
|
355
|
+
"command": "version",
|
|
356
|
+
"argv": [
|
|
357
|
+
"version",
|
|
358
|
+
"--json"
|
|
359
|
+
],
|
|
360
|
+
"fields": {
|
|
361
|
+
"package": {
|
|
362
|
+
"field": "package",
|
|
363
|
+
"type": "string"
|
|
364
|
+
},
|
|
365
|
+
"version": {
|
|
366
|
+
"field": "version",
|
|
367
|
+
"type": "string"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"skillCollection": {
|
|
372
|
+
"namesField": "skills",
|
|
373
|
+
"default": "codex-gateway",
|
|
374
|
+
"selector": {
|
|
375
|
+
"option": "--skill",
|
|
376
|
+
"type": "string"
|
|
377
|
+
},
|
|
378
|
+
"enumeration": {
|
|
379
|
+
"argv": [
|
|
380
|
+
"skill",
|
|
381
|
+
"source",
|
|
382
|
+
"--list",
|
|
383
|
+
"--json"
|
|
384
|
+
],
|
|
385
|
+
"itemsField": "items",
|
|
386
|
+
"completeField": "complete"
|
|
387
|
+
},
|
|
388
|
+
"namedSource": [
|
|
389
|
+
"skill",
|
|
390
|
+
"source",
|
|
391
|
+
"--skill",
|
|
392
|
+
"{skill}",
|
|
393
|
+
"--json"
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"installationLifecycle": {
|
|
398
|
+
"agentNeutral": true,
|
|
399
|
+
"installGuide": "README.md",
|
|
400
|
+
"updateGuide": "README.md",
|
|
401
|
+
"targetRequired": true,
|
|
402
|
+
"hostRegistrationRequired": true,
|
|
403
|
+
"installerIntegration": "capabilities and skill source commands with README bootstrap",
|
|
404
|
+
"installationMode": "copy",
|
|
405
|
+
"sharedLinksAllowed": false,
|
|
406
|
+
"isolatedRuntimeRequired": true,
|
|
407
|
+
"skillRequired": true,
|
|
408
|
+
"updateRequiresSkillSync": true,
|
|
409
|
+
"required_components": [
|
|
410
|
+
"cli",
|
|
411
|
+
"skill"
|
|
412
|
+
],
|
|
413
|
+
"install": "Install the CLI and run skill install for the resolved current Agent directory.",
|
|
414
|
+
"update": "Run update install for the resolved current Agent directory.",
|
|
415
|
+
"verification": "Verify the live version, installed Skill hashes and native host discovery."
|
|
416
|
+
},
|
|
417
|
+
"automaticUpdates": {
|
|
418
|
+
"enabledByDefault": true,
|
|
419
|
+
"intervalHours": 24,
|
|
420
|
+
"timeoutMs": 1800,
|
|
421
|
+
"trigger": "gateway activation or interactive setup",
|
|
422
|
+
"configuration": "persistent daily cache",
|
|
423
|
+
"disable": "CODEX_GATEWAY_NO_UPDATE_CHECK=1",
|
|
424
|
+
"recovery": "update check for an immediate lookup",
|
|
425
|
+
"defaultMode": "notify",
|
|
426
|
+
"installation": "explicit"
|
|
427
|
+
}
|
|
428
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"label": "Company Gateway",
|
|
4
|
+
"defaultModel": "example-model",
|
|
5
|
+
"channels": {
|
|
6
|
+
"primary": {"endpoint": "https://gateway.example.test/v1", "credential": "primary"}
|
|
7
|
+
},
|
|
8
|
+
"models": [
|
|
9
|
+
{"id": "example-model", "label": "Example model", "channel": "primary", "protocol": "responses", "repairImageLinks": true}
|
|
10
|
+
]
|
|
11
|
+
}
|