@ktkid/kmh-codex-cli 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +296 -2
- package/bin/README.md +25 -0
- package/bin/codex +36 -0
- package/bin/runtime-receipt.json +9 -0
- package/bin/version +1 -0
- package/cordis.patch.yml +7 -0
- package/lib/browser-types/src/account-status.d.ts +9 -0
- package/lib/browser-types/src/client/ComposerQuota.d.ts +10 -0
- package/lib/browser-types/src/client/DetailCard.d.ts +12 -0
- package/lib/browser-types/src/client/LiveBall.d.ts +19 -0
- package/lib/browser-types/src/client/QuotaCard.d.ts +20 -0
- package/lib/browser-types/src/client/QuotaDisplaySettings.d.ts +6 -0
- package/lib/browser-types/src/client/index.d.ts +18 -0
- package/lib/browser-types/src/client/locales.d.ts +54 -0
- package/lib/browser-types/src/client/quota-store.d.ts +56 -0
- package/lib/browser-types/src/live-state.d.ts +31 -0
- package/lib/browser-types/src/quota-protocol.d.ts +135 -0
- package/lib/browser-types/src/quota-rules.d.ts +18 -0
- package/lib/browser-types/src/tool-switches.d.ts +63 -0
- package/lib/client.js +16193 -0
- package/lib/src/account-status.d.ts +9 -0
- package/lib/src/account-status.js +1 -0
- package/lib/src/account.d.ts +35 -0
- package/lib/src/account.js +173 -0
- package/lib/src/adapter.d.ts +22 -0
- package/lib/src/adapter.js +222 -0
- package/lib/src/approval.d.ts +48 -0
- package/lib/src/approval.js +235 -0
- package/lib/src/capabilities.d.ts +40 -0
- package/lib/src/capabilities.js +85 -0
- package/lib/src/config.d.ts +69 -0
- package/lib/src/config.js +75 -0
- package/lib/src/connection.d.ts +65 -0
- package/lib/src/connection.js +178 -0
- package/lib/src/cursor.d.ts +61 -0
- package/lib/src/cursor.js +339 -0
- package/lib/src/image-delivery.d.ts +36 -0
- package/lib/src/image-delivery.js +65 -0
- package/lib/src/imagegen.d.ts +21 -0
- package/lib/src/imagegen.js +132 -0
- package/lib/src/index.d.ts +146 -0
- package/lib/src/index.js +551 -0
- package/lib/src/isolation.d.ts +61 -0
- package/lib/src/isolation.js +298 -0
- package/lib/src/live-state.d.ts +31 -0
- package/lib/src/live-state.js +14 -0
- package/lib/src/models.d.ts +24 -0
- package/lib/src/models.js +98 -0
- package/lib/src/native-items.d.ts +59 -0
- package/lib/src/native-items.js +122 -0
- package/lib/src/native-tools/catalog.d.ts +29 -0
- package/lib/src/native-tools/catalog.js +197 -0
- package/lib/src/probe.d.ts +17 -0
- package/lib/src/probe.js +54 -0
- package/lib/src/protocol.d.ts +508 -0
- package/lib/src/protocol.js +511 -0
- package/lib/src/quota-protocol.d.ts +135 -0
- package/lib/src/quota-protocol.js +97 -0
- package/lib/src/quota-rules.d.ts +18 -0
- package/lib/src/quota-rules.js +49 -0
- package/lib/src/quota.d.ts +32 -0
- package/lib/src/quota.js +227 -0
- package/lib/src/session-history.d.ts +18 -0
- package/lib/src/session-history.js +113 -0
- package/lib/src/session-store.d.ts +592 -0
- package/lib/src/session-store.js +275 -0
- package/lib/src/status.d.ts +19 -0
- package/lib/src/status.js +69 -0
- package/lib/src/tool-policy.d.ts +47 -0
- package/lib/src/tool-policy.js +454 -0
- package/lib/src/tool-registry.d.ts +42 -0
- package/lib/src/tool-registry.js +70 -0
- package/lib/src/tool-selection.d.ts +88 -0
- package/lib/src/tool-selection.js +60 -0
- package/lib/src/tool-switches-service.d.ts +24 -0
- package/lib/src/tool-switches-service.js +129 -0
- package/lib/src/tool-switches.d.ts +63 -0
- package/lib/src/tool-switches.js +43 -0
- package/lib/src/turn.d.ts +200 -0
- package/lib/src/turn.js +1012 -0
- package/lib/src/web.d.ts +9 -0
- package/lib/src/web.js +143 -0
- package/package.json +172 -4
- package/vendor/codex/LICENSE +201 -0
- package/vendor/codex/NOTICE +4 -0
- package/vendor/codex/models.json +1613 -0
- package/vendor/native-tools/0.162.0-alpha.17.2.json +143 -0
- package/vendor/native-tools/0.163.0-alpha.10.2.json +128 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.162.0-alpha.17.2",
|
|
3
|
+
"declarations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "function",
|
|
6
|
+
"name": "exec_command",
|
|
7
|
+
"description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"parameters": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"cmd": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Shell command to execute."
|
|
15
|
+
},
|
|
16
|
+
"justification": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "User-facing approval question for `require_escalated`; omit otherwise."
|
|
19
|
+
},
|
|
20
|
+
"login": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
|
|
23
|
+
},
|
|
24
|
+
"max_output_tokens": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
|
|
27
|
+
},
|
|
28
|
+
"prefix_rule": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sandbox_permissions": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
|
|
38
|
+
"enum": [
|
|
39
|
+
"use_default",
|
|
40
|
+
"require_escalated"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"shell": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Shell binary to launch. Defaults to the user's default shell."
|
|
46
|
+
},
|
|
47
|
+
"tty": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"description": "True allocates a PTY for the command; false or omitted uses plain pipes."
|
|
50
|
+
},
|
|
51
|
+
"workdir": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Working directory for the command. Defaults to the turn cwd."
|
|
54
|
+
},
|
|
55
|
+
"yield_time_ms": {
|
|
56
|
+
"type": "number",
|
|
57
|
+
"description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"cmd"
|
|
62
|
+
],
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "function",
|
|
68
|
+
"name": "write_stdin",
|
|
69
|
+
"description": "Writes characters to an existing unified exec session and returns recent output.",
|
|
70
|
+
"strict": false,
|
|
71
|
+
"parameters": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"chars": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
|
|
77
|
+
},
|
|
78
|
+
"max_output_tokens": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
|
|
81
|
+
},
|
|
82
|
+
"session_id": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"description": "Identifier of the running unified exec session."
|
|
85
|
+
},
|
|
86
|
+
"yield_time_ms": {
|
|
87
|
+
"type": "number",
|
|
88
|
+
"description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"session_id"
|
|
93
|
+
],
|
|
94
|
+
"additionalProperties": false
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "custom",
|
|
99
|
+
"name": "apply_patch",
|
|
100
|
+
"description": "The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the patch in JSON.",
|
|
101
|
+
"format": {
|
|
102
|
+
"type": "grammar",
|
|
103
|
+
"syntax": "lark",
|
|
104
|
+
"definition": "start: begin_patch hunk+ end_patch\nbegin_patch: \"*** Begin Patch\" LF\nend_patch: \"*** End Patch\" LF?\n\nhunk: add_hunk | delete_hunk | update_hunk\nadd_hunk: \"*** Add File: \" filename LF add_line+\ndelete_hunk: \"*** Delete File: \" filename LF\nupdate_hunk: \"*** Update File: \" filename LF change_move? change?\n\nfilename: /(.+)/\nadd_line: \"+\" /(.*)/ LF -> line\n\nchange_move: \"*** Move to: \" filename LF\nchange: (change_context | change_line)+ eof_line?\nchange_context: (\"@@\" | \"@@ \" /(.+)/) LF\nchange_line: (\"+\" | \"-\" | \" \") /(.*)/ LF\neof_line: \"*** End of File\" LF\n\n%import common.LF\n"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "function",
|
|
109
|
+
"name": "view_image",
|
|
110
|
+
"description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
|
|
111
|
+
"strict": false,
|
|
112
|
+
"parameters": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"properties": {
|
|
115
|
+
"detail": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "Image detail level. Defaults to `high`; use `original` to preserve exact resolution.",
|
|
118
|
+
"enum": [
|
|
119
|
+
"high",
|
|
120
|
+
"original"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"path": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "Local filesystem path to an image file."
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"path"
|
|
130
|
+
],
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "web_search",
|
|
136
|
+
"external_web_access": false,
|
|
137
|
+
"search_content_types": [
|
|
138
|
+
"text",
|
|
139
|
+
"image"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.163.0-alpha.10.2",
|
|
3
|
+
"declarations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "function",
|
|
6
|
+
"name": "exec_command",
|
|
7
|
+
"description": "Runs a command in a PTY, returning output or a session ID for ongoing interaction.",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"parameters": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"cmd": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Shell command to execute."
|
|
15
|
+
},
|
|
16
|
+
"justification": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "User-facing approval question for `require_escalated`; omit otherwise."
|
|
19
|
+
},
|
|
20
|
+
"login": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "True runs the shell with -l/-i semantics; false disables them. Defaults to true."
|
|
23
|
+
},
|
|
24
|
+
"max_output_tokens": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
|
|
27
|
+
},
|
|
28
|
+
"prefix_rule": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"description": "Reusable approval prefix for `cmd`, only with `sandbox_permissions: \"require_escalated\"`; for example [\"git\", \"pull\"].",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sandbox_permissions": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Per-command sandbox override. Defaults to `use_default`; use `require_escalated` for unsandboxed execution.",
|
|
38
|
+
"enum": ["use_default", "require_escalated"]
|
|
39
|
+
},
|
|
40
|
+
"shell": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Shell binary to launch. Defaults to the user's default shell."
|
|
43
|
+
},
|
|
44
|
+
"tty": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"description": "True allocates a PTY for the command; false or omitted uses plain pipes."
|
|
47
|
+
},
|
|
48
|
+
"workdir": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Working directory for the command. Defaults to the turn cwd."
|
|
51
|
+
},
|
|
52
|
+
"yield_time_ms": {
|
|
53
|
+
"type": "number",
|
|
54
|
+
"description": "Wait before yielding output. Defaults to 10000 ms; effective range is 250-30000 ms."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": ["cmd"],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "function",
|
|
63
|
+
"name": "write_stdin",
|
|
64
|
+
"description": "Writes characters to an existing unified exec session and returns recent output.",
|
|
65
|
+
"strict": false,
|
|
66
|
+
"parameters": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"chars": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Bytes to write to stdin. Defaults to empty, which polls without writing."
|
|
72
|
+
},
|
|
73
|
+
"max_output_tokens": {
|
|
74
|
+
"type": "number",
|
|
75
|
+
"description": "Output token budget. Defaults to 10000 tokens; larger requests may be capped by policy."
|
|
76
|
+
},
|
|
77
|
+
"session_id": {
|
|
78
|
+
"type": "number",
|
|
79
|
+
"description": "Identifier of the running unified exec session."
|
|
80
|
+
},
|
|
81
|
+
"yield_time_ms": {
|
|
82
|
+
"type": "number",
|
|
83
|
+
"description": "Wait before yielding output. Non-empty writes default to 250 ms and cap at 30000 ms; empty polls wait 5000-300000 ms by default."
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": ["session_id"],
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "custom",
|
|
92
|
+
"name": "apply_patch",
|
|
93
|
+
"description": "The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the patch in JSON.",
|
|
94
|
+
"format": {
|
|
95
|
+
"type": "grammar",
|
|
96
|
+
"syntax": "lark",
|
|
97
|
+
"definition": "start: begin_patch hunk+ end_patch\nbegin_patch: \"*** Begin Patch\" LF\nend_patch: \"*** End Patch\" LF?\n\nhunk: add_hunk | delete_hunk | update_hunk\nadd_hunk: \"*** Add File: \" filename LF add_line+\ndelete_hunk: \"*** Delete File: \" filename LF\nupdate_hunk: \"*** Update File: \" filename LF change_move? change?\n\nfilename: /(.+)/\nadd_line: \"+\" /(.*)/ LF -> line\n\nchange_move: \"*** Move to: \" filename LF\nchange: (change_context | change_line)+ eof_line?\nchange_context: (\"@@\" | \"@@ \" /(.+)/) LF\nchange_line: (\"+\" | \"-\" | \" \") /(.*)/ LF\neof_line: \"*** End of File\" LF\n\n%import common.LF\n"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "function",
|
|
102
|
+
"name": "view_image",
|
|
103
|
+
"description": "View a local image file from the filesystem when visual inspection is needed. Use this for images already available on disk.",
|
|
104
|
+
"strict": false,
|
|
105
|
+
"parameters": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"detail": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Image detail level. Defaults to `high`; use `original` to preserve exact resolution.",
|
|
111
|
+
"enum": ["high", "original"]
|
|
112
|
+
},
|
|
113
|
+
"path": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "Local filesystem path to an image file."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": ["path"],
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "web_search",
|
|
124
|
+
"external_web_access": false,
|
|
125
|
+
"search_content_types": ["text", "image"]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|