|
| 1 | +/* |
| 2 | + * Copyright (c) 2018-present, easy-4-java (https://github.com/easy-4-java). |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + */ |
| 7 | +package io.github.easy4j.codex.appserver; |
| 8 | + |
| 9 | +/** |
| 10 | + * Canonical method and notification names used by the Codex app-server |
| 11 | + * integration. Keeping protocol strings in one place prevents the turn and |
| 12 | + * generic-RPC transports from drifting apart. |
| 13 | + */ |
| 14 | +final class CodexAppServerProtocol { |
| 15 | + |
| 16 | + static final String INITIALIZE = "initialize"; |
| 17 | + static final String INITIALIZED = "notifications/initialized"; |
| 18 | + |
| 19 | + static final String THREAD_START = "thread/start"; |
| 20 | + static final String THREAD_RESUME = "thread/resume"; |
| 21 | + static final String THREAD_LIST = "thread/list"; |
| 22 | + static final String THREAD_READ = "thread/read"; |
| 23 | + static final String THREAD_FORK = "thread/fork"; |
| 24 | + static final String THREAD_ARCHIVE = "thread/archive"; |
| 25 | + static final String THREAD_UNARCHIVE = "thread/unarchive"; |
| 26 | + static final String THREAD_DELETE = "thread/delete"; |
| 27 | + |
| 28 | + static final String TURN_START = "turn/start"; |
| 29 | + static final String TURN_STEER = "turn/steer"; |
| 30 | + static final String TURN_INTERRUPT = "turn/interrupt"; |
| 31 | + |
| 32 | + static final String TURN_STARTED = "turn/started"; |
| 33 | + static final String TURN_COMPLETED = "turn/completed"; |
| 34 | + static final String TURN_FAILED = "turn/failed"; |
| 35 | + static final String ITEM_STARTED = "item/started"; |
| 36 | + static final String ITEM_COMPLETED = "item/completed"; |
| 37 | + static final String AGENT_MESSAGE_DELTA = "item/agentMessage/delta"; |
| 38 | + static final String TOKEN_USAGE_UPDATED = "thread/tokenUsage/updated"; |
| 39 | + static final String ERROR = "error"; |
| 40 | + |
| 41 | + private CodexAppServerProtocol() { |
| 42 | + } |
| 43 | +} |
0 commit comments