Initial codex telegram bot source

This commit is contained in:
Codex
2026-05-21 08:40:16 +00:00
commit ad61f7eeed
275 changed files with 101972 additions and 0 deletions

View File

@@ -0,0 +1,194 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "HookCompletedNotification",
"type": "object",
"required": [
"run",
"threadId"
],
"properties": {
"run": {
"$ref": "#/definitions/HookRunSummary"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": [
"string",
"null"
]
}
},
"definitions": {
"AbsolutePathBuf": {
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type": "string"
},
"HookEventName": {
"type": "string",
"enum": [
"preToolUse",
"permissionRequest",
"postToolUse",
"preCompact",
"postCompact",
"sessionStart",
"userPromptSubmit",
"stop"
]
},
"HookExecutionMode": {
"type": "string",
"enum": [
"sync",
"async"
]
},
"HookHandlerType": {
"type": "string",
"enum": [
"command",
"prompt",
"agent"
]
},
"HookOutputEntry": {
"type": "object",
"required": [
"kind",
"text"
],
"properties": {
"kind": {
"$ref": "#/definitions/HookOutputEntryKind"
},
"text": {
"type": "string"
}
}
},
"HookOutputEntryKind": {
"type": "string",
"enum": [
"warning",
"stop",
"feedback",
"context",
"error"
]
},
"HookRunStatus": {
"type": "string",
"enum": [
"running",
"completed",
"failed",
"blocked",
"stopped"
]
},
"HookRunSummary": {
"type": "object",
"required": [
"displayOrder",
"entries",
"eventName",
"executionMode",
"handlerType",
"id",
"scope",
"sourcePath",
"startedAt",
"status"
],
"properties": {
"completedAt": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"displayOrder": {
"type": "integer",
"format": "int64"
},
"durationMs": {
"type": [
"integer",
"null"
],
"format": "int64"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/HookOutputEntry"
}
},
"eventName": {
"$ref": "#/definitions/HookEventName"
},
"executionMode": {
"$ref": "#/definitions/HookExecutionMode"
},
"handlerType": {
"$ref": "#/definitions/HookHandlerType"
},
"id": {
"type": "string"
},
"scope": {
"$ref": "#/definitions/HookScope"
},
"source": {
"default": "unknown",
"allOf": [
{
"$ref": "#/definitions/HookSource"
}
]
},
"sourcePath": {
"$ref": "#/definitions/AbsolutePathBuf"
},
"startedAt": {
"type": "integer",
"format": "int64"
},
"status": {
"$ref": "#/definitions/HookRunStatus"
},
"statusMessage": {
"type": [
"string",
"null"
]
}
}
},
"HookScope": {
"type": "string",
"enum": [
"thread",
"turn"
]
},
"HookSource": {
"type": "string",
"enum": [
"system",
"user",
"project",
"mdm",
"sessionFlags",
"plugin",
"cloudRequirements",
"legacyManagedConfigFile",
"legacyManagedConfigMdm",
"unknown"
]
}
}
}