@scotthuang/agent-knock-knock 0.1.1 → 0.2.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/CHANGELOG.md +18 -0
- package/README.md +31 -0
- package/dist/src/agent-session-provider.d.ts +25 -0
- package/dist/src/agent-session-provider.js +2 -0
- package/dist/src/agent-session-provider.js.map +1 -0
- package/dist/src/cli.js +1142 -25
- package/dist/src/cli.js.map +1 -1
- package/dist/src/codex-local-session-provider.d.ts +18 -0
- package/dist/src/codex-local-session-provider.js +87 -0
- package/dist/src/codex-local-session-provider.js.map +1 -0
- package/dist/src/codex-session-provider.d.ts +95 -0
- package/dist/src/codex-session-provider.js +304 -0
- package/dist/src/codex-session-provider.js.map +1 -0
- package/dist/src/codex-store-adapter.d.ts +27 -0
- package/dist/src/codex-store-adapter.js +124 -0
- package/dist/src/codex-store-adapter.js.map +1 -0
- package/dist/src/openclaw-plugin.js +159 -2
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/protocol.d.ts +1 -1
- package/dist/src/session-takeover-planner.d.ts +49 -0
- package/dist/src/session-takeover-planner.js +80 -0
- package/dist/src/session-takeover-planner.js.map +1 -0
- package/package.json +1 -1
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +30 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
No unreleased changes.
|
|
6
6
|
|
|
7
|
+
## 0.2.0 - 2026-06-22
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added experimental native Codex session discovery and takeover flows, including safe resume, OpenClaw-summarized fork, and confirmed terminate-then-resume adoption for active Codex CLI sessions.
|
|
12
|
+
- Added an explicit `allowCwdOnly` terminate-then-resume fallback for Codex TUI processes that do not expose a session id in argv; it still requires a user-confirmed pid and cwd re-scan before termination.
|
|
13
|
+
- Added tests for Codex native session takeover planning, confirmed termination safeguards, fork summary confirmation, and native `codex exec resume` follow-up delivery.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Updated Codex takeover sends to use native `codex exec resume` for adopted Codex sessions, avoiding ACPX session binding issues when resuming existing terminal Codex sessions.
|
|
18
|
+
|
|
19
|
+
## 0.1.2 - 2026-06-21
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Fixed stalled-task notifications from the background monitor when no explicit Gateway token is stored, allowing local OpenClaw CLI credentials to deliver the stalled callback and including a short executor-output trace in the notification.
|
|
24
|
+
|
|
7
25
|
## 0.1.1 - 2026-06-21
|
|
8
26
|
|
|
9
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -266,6 +266,37 @@ node dist/src/cli.js restart \
|
|
|
266
266
|
--conversation <conversation-id>
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
+
Inspect and take over native Codex sessions that were started outside AKK:
|
|
270
|
+
|
|
271
|
+
Experimental: native Codex takeover depends on best-effort local Codex session metadata, process scanning, and Codex CLI resume behavior. It may be unstable across Codex versions or unusual terminal states, so review the returned plan before confirming any takeover.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
node dist/src/cli.js agent discover \
|
|
275
|
+
--agent codex \
|
|
276
|
+
--scope active
|
|
277
|
+
|
|
278
|
+
node dist/src/cli.js agent takeover \
|
|
279
|
+
--agent codex \
|
|
280
|
+
--session-id <native-codex-session-id> \
|
|
281
|
+
--strategy terminate_then_resume
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
`terminate_then_resume` is intentionally two-step. The first command returns the exact pid, cwd, and session that would be stopped. After confirming that plan, execute the takeover:
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
node dist/src/cli.js agent takeover \
|
|
288
|
+
--agent codex \
|
|
289
|
+
--session-id <native-codex-session-id> \
|
|
290
|
+
--strategy terminate_then_resume \
|
|
291
|
+
--create-conversation \
|
|
292
|
+
--confirm-terminate \
|
|
293
|
+
--expected-pid <confirmed-pid>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
AKK re-scans before terminating and only proceeds when the confirmed pid is still an exact match for the requested Codex session. After the process exits, AKK creates a managed conversation and future sends use native `codex exec resume`.
|
|
297
|
+
|
|
298
|
+
Some Codex TUI processes do not expose the native session id in argv. In that case the default takeover remains blocked as ambiguous. For a deliberate local test or an operator-confirmed handoff, add `--allow-cwd-only` with `--expected-pid`; AKK will still re-scan and require that pid to be active in the target session cwd before terminating it.
|
|
299
|
+
|
|
269
300
|
Close a task locally:
|
|
270
301
|
|
|
271
302
|
```bash
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ActiveCodexProcess, CodexSessionModelInfo, CodexSessionSummary, ForkContextPackage, RolloutExcerptOptions } from "./codex-session-provider.js";
|
|
2
|
+
export type CodingAgentSessionProviderAgent = "codex";
|
|
3
|
+
export type HistoricalSessionCapability = "full" | "metadata_only" | "unavailable";
|
|
4
|
+
export type ForkContextCapability = "full" | "partial" | "unavailable";
|
|
5
|
+
export type ActiveSessionCapability = "process_scan" | "unavailable";
|
|
6
|
+
export type TakeoverCapability = "plan_only" | "unavailable";
|
|
7
|
+
export interface AgentSessionCapabilities {
|
|
8
|
+
historicalSessions: HistoricalSessionCapability;
|
|
9
|
+
forkContext: ForkContextCapability;
|
|
10
|
+
activeSessions: ActiveSessionCapability;
|
|
11
|
+
takeover: TakeoverCapability;
|
|
12
|
+
reasons: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ForkContextOptions extends RolloutExcerptOptions {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CodingAgentSessionProvider {
|
|
18
|
+
agent: CodingAgentSessionProviderAgent;
|
|
19
|
+
getCapabilities(): Promise<AgentSessionCapabilities>;
|
|
20
|
+
listHistoricalSessions(): Promise<CodexSessionSummary[]>;
|
|
21
|
+
listActiveSessions(): Promise<ActiveCodexProcess[]>;
|
|
22
|
+
getSession(sessionId: string): Promise<CodexSessionSummary | undefined>;
|
|
23
|
+
getSessionModel(sessionId: string): Promise<CodexSessionModelInfo | undefined>;
|
|
24
|
+
getForkContext(options: ForkContextOptions): Promise<ForkContextPackage | undefined>;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-session-provider.js","sourceRoot":"","sources":["../../src/agent-session-provider.ts"],"names":[],"mappings":""}
|