mirror of
https://github.com/openai/codex.git
synced 2026-05-01 11:52:10 +03:00
## Summary This extends external agent detection/import beyond config artifacts so Codex can detect recent sessions files from the external agent home and import them into Codex rollout history. ## What changed - Added a focused `external_agent_sessions` module for: - session discovery - source-record parsing - rollout construction - import ledger tracking - Wired session detection/import into the app-server external agent config API. - Added compaction handling so large imported sessions can be resumed safely before the first follow-up turn. ## Testing Added coverage for: - recent-session detection - custom-title handling - recency filtering - dedupe and re-detect-after-source-change behavior - visible imported turn construction - backward-compatible import payload deserialization - end-to-end RPC import flow - rejection of undetected session paths - repeat-import behavior - large-session compaction before first follow-up Ran: - `cargo test -p codex-app-server external_agent_config_import_ --test all`
119 lines
2.4 KiB
JSON
Generated
119 lines
2.4 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ExternalAgentConfigMigrationItem": {
|
|
"properties": {
|
|
"cwd": {
|
|
"description": "Null or empty means home-scoped migration; non-empty means repo-scoped migration.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/MigrationDetails"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"itemType": {
|
|
"$ref": "#/definitions/ExternalAgentConfigMigrationItemType"
|
|
}
|
|
},
|
|
"required": [
|
|
"description",
|
|
"itemType"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ExternalAgentConfigMigrationItemType": {
|
|
"enum": [
|
|
"AGENTS_MD",
|
|
"CONFIG",
|
|
"SKILLS",
|
|
"PLUGINS",
|
|
"MCP_SERVER_CONFIG",
|
|
"SESSIONS"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"MigrationDetails": {
|
|
"properties": {
|
|
"plugins": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/PluginsMigration"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"sessions": {
|
|
"default": [],
|
|
"items": {
|
|
"$ref": "#/definitions/SessionMigration"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PluginsMigration": {
|
|
"properties": {
|
|
"marketplaceName": {
|
|
"type": "string"
|
|
},
|
|
"pluginNames": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"marketplaceName",
|
|
"pluginNames"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"SessionMigration": {
|
|
"properties": {
|
|
"cwd": {
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"cwd",
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"migrationItems": {
|
|
"items": {
|
|
"$ref": "#/definitions/ExternalAgentConfigMigrationItem"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"migrationItems"
|
|
],
|
|
"title": "ExternalAgentConfigImportParams",
|
|
"type": "object"
|
|
} |