@1agents/acp-service 0.3.0 → 0.4.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/README.md +57 -33
- package/dist/bin/acp-service.js +2 -2
- package/dist/src/bridge.d.ts +2 -2
- package/dist/src/bridge.js +1 -1
- package/dist/src/catalog.js +20 -3
- package/dist/src/manifest.js +1 -1
- package/package.json +27 -8
- package/vendor/runtime/LICENSE +21 -0
- package/vendor/runtime/README.md +115 -0
- package/vendor/runtime/dist/agent-registry-CMg8LHKY.js +806 -0
- package/vendor/runtime/dist/agent-registry-CMg8LHKY.js.map +1 -0
- package/vendor/runtime/dist/agent-registry.d.ts +70 -0
- package/vendor/runtime/dist/agent-registry.d.ts.map +1 -0
- package/vendor/runtime/dist/agent-registry.js +2 -0
- package/vendor/runtime/dist/cli-DUHyAADv.js +182 -0
- package/vendor/runtime/dist/cli-DUHyAADv.js.map +1 -0
- package/vendor/runtime/dist/cli.d.ts +12 -0
- package/vendor/runtime/dist/cli.d.ts.map +1 -0
- package/vendor/runtime/dist/cli.js +2632 -0
- package/vendor/runtime/dist/cli.js.map +1 -0
- package/vendor/runtime/dist/client-DjkWknf7.d.ts +262 -0
- package/vendor/runtime/dist/client-DjkWknf7.d.ts.map +1 -0
- package/vendor/runtime/dist/docs-site/.nojekyll +0 -0
- package/vendor/runtime/dist/docs-site/CLI.html +832 -0
- package/vendor/runtime/dist/docs-site/CNAME +1 -0
- package/vendor/runtime/dist/docs-site/VISION.html +415 -0
- package/vendor/runtime/dist/docs-site/agents.html +391 -0
- package/vendor/runtime/dist/docs-site/compare.html +359 -0
- package/vendor/runtime/dist/docs-site/config.html +450 -0
- package/vendor/runtime/dist/docs-site/custom-agents.html +408 -0
- package/vendor/runtime/dist/docs-site/exit-codes.html +347 -0
- package/vendor/runtime/dist/docs-site/favicon.svg +21 -0
- package/vendor/runtime/dist/docs-site/flows.html +497 -0
- package/vendor/runtime/dist/docs-site/index.html +367 -0
- package/vendor/runtime/dist/docs-site/install.html +386 -0
- package/vendor/runtime/dist/docs-site/llms.txt +35 -0
- package/vendor/runtime/dist/docs-site/output-formats.html +403 -0
- package/vendor/runtime/dist/docs-site/permissions.html +413 -0
- package/vendor/runtime/dist/docs-site/prompting.html +460 -0
- package/vendor/runtime/dist/docs-site/proof-2026-07-18-grok-ext-methods/index.html +336 -0
- package/vendor/runtime/dist/docs-site/quickstart.html +382 -0
- package/vendor/runtime/dist/docs-site/runtime-environment.html +329 -0
- package/vendor/runtime/dist/docs-site/runtime-process-lifecycle.html +335 -0
- package/vendor/runtime/dist/docs-site/session-control.html +406 -0
- package/vendor/runtime/dist/docs-site/session-watch.html +354 -0
- package/vendor/runtime/dist/docs-site/sessions.html +486 -0
- package/vendor/runtime/dist/docs-site/shared-sessions.html +377 -0
- package/vendor/runtime/dist/flows-CiJSCy4D.js +2474 -0
- package/vendor/runtime/dist/flows-CiJSCy4D.js.map +1 -0
- package/vendor/runtime/dist/flows.d.ts +334 -0
- package/vendor/runtime/dist/flows.d.ts.map +1 -0
- package/vendor/runtime/dist/flows.js +2 -0
- package/vendor/runtime/dist/invocation-options-BlIySxIw.js +345 -0
- package/vendor/runtime/dist/invocation-options-BlIySxIw.js.map +1 -0
- package/vendor/runtime/dist/ipc-BlljKR2b.js +5336 -0
- package/vendor/runtime/dist/ipc-BlljKR2b.js.map +1 -0
- package/vendor/runtime/dist/output-BzXQKArM.js +1012 -0
- package/vendor/runtime/dist/output-BzXQKArM.js.map +1 -0
- package/vendor/runtime/dist/queue-owner-runtime-DSFdsS_y.js +8867 -0
- package/vendor/runtime/dist/queue-owner-runtime-DSFdsS_y.js.map +1 -0
- package/vendor/runtime/dist/runtime.d.ts +1156 -0
- package/vendor/runtime/dist/runtime.d.ts.map +1 -0
- package/vendor/runtime/dist/runtime.js +3675 -0
- package/vendor/runtime/dist/runtime.js.map +1 -0
- package/vendor/runtime/dist/session-options-ORCchZGk.d.ts +426 -0
- package/vendor/runtime/dist/session-options-ORCchZGk.d.ts.map +1 -0
- package/vendor/runtime/dist/session-watch-BiBTBMz4.js +76 -0
- package/vendor/runtime/dist/session-watch-BiBTBMz4.js.map +1 -0
- package/vendor/runtime/dist/watch-iYiP-lOo.js +85 -0
- package/vendor/runtime/dist/watch-iYiP-lOo.js.map +1 -0
- package/vendor/runtime/package.json +46 -0
- package/vendor/runtime/skills/acpx/SKILL.md +688 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Session control — acpx</title>
|
|
7
|
+
<meta name="description" content="cancel, set-mode, set, set model, and status — the verbs that adjust an in-flight or saved acpx session without restarting it.">
|
|
8
|
+
<link rel="canonical" href="https://acpx.sh/session-control.html">
|
|
9
|
+
<meta property="og:type" content="website">
|
|
10
|
+
<meta property="og:site_name" content="acpx">
|
|
11
|
+
<meta property="og:title" content="Session control — acpx">
|
|
12
|
+
<meta property="og:description" content="cancel, set-mode, set, set model, and status — the verbs that adjust an in-flight or saved acpx session without restarting it.">
|
|
13
|
+
<meta property="og:url" content="https://acpx.sh/session-control.html">
|
|
14
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
15
|
+
<meta name="twitter:title" content="Session control — acpx">
|
|
16
|
+
<meta name="twitter:description" content="cancel, set-mode, set, set model, and status — the verbs that adjust an in-flight or saved acpx session without restarting it.">
|
|
17
|
+
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
|
18
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
19
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
20
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
21
|
+
<script>(function(){var s;try{s=localStorage.getItem('theme')}catch(e){}var d=window.matchMedia&&matchMedia('(prefers-color-scheme: dark)').matches;document.documentElement.dataset.theme=s||(d?'dark':'light')})();</script>
|
|
22
|
+
<style>
|
|
23
|
+
:root{
|
|
24
|
+
--ink:#0b0e14;
|
|
25
|
+
--text:#1f2530;
|
|
26
|
+
--muted:#6a7282;
|
|
27
|
+
--subtle:#9aa1ab;
|
|
28
|
+
--bg:#f7f8fa;
|
|
29
|
+
--paper:#ffffff;
|
|
30
|
+
--accent:#0ea5e9;
|
|
31
|
+
--accent-soft:rgba(14,165,233,.10);
|
|
32
|
+
--accent-strong:#0284c7;
|
|
33
|
+
--accent-2:#a855f7;
|
|
34
|
+
--accent-3:#22c55e;
|
|
35
|
+
--accent-4:#f59e0b;
|
|
36
|
+
--line:#e5e7eb;
|
|
37
|
+
--line-soft:#eef0f3;
|
|
38
|
+
--code-bg:#0a0d14;
|
|
39
|
+
--code-fg:#e6edf3;
|
|
40
|
+
--code-inline-fg:#1c2128;
|
|
41
|
+
--pill-border:#dbe2eb;
|
|
42
|
+
--shadow-card:0 4px 14px rgba(15,17,21,.08);
|
|
43
|
+
--scrollbar:#cbd5e1;
|
|
44
|
+
}
|
|
45
|
+
:root[data-theme="dark"]{
|
|
46
|
+
--ink:#f3f5f9;
|
|
47
|
+
--text:#cdd3dd;
|
|
48
|
+
--muted:#8d96a4;
|
|
49
|
+
--subtle:#5d6371;
|
|
50
|
+
--bg:#08090f;
|
|
51
|
+
--paper:#13161f;
|
|
52
|
+
--accent:#38bdf8;
|
|
53
|
+
--accent-soft:rgba(56,189,248,.18);
|
|
54
|
+
--accent-strong:#7dd3fc;
|
|
55
|
+
--line:#23283a;
|
|
56
|
+
--line-soft:#1a1d28;
|
|
57
|
+
--code-bg:#040611;
|
|
58
|
+
--code-fg:#e6edf3;
|
|
59
|
+
--code-inline-fg:#e6edf3;
|
|
60
|
+
--pill-border:#2a2f3c;
|
|
61
|
+
--shadow-card:0 4px 18px rgba(0,0,0,.45);
|
|
62
|
+
--scrollbar:#3a4154;
|
|
63
|
+
}
|
|
64
|
+
:root{color-scheme:light}
|
|
65
|
+
:root[data-theme="dark"]{color-scheme:dark}
|
|
66
|
+
*{box-sizing:border-box}
|
|
67
|
+
html{scroll-behavior:smooth;scroll-padding-top:24px}
|
|
68
|
+
body{margin:0;background:var(--bg);color:var(--text);font-family:"Inter",ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;line-height:1.65;overflow-x:hidden;-webkit-font-smoothing:antialiased;font-feature-settings:"cv02","cv03","cv04","cv11";transition:background-color .18s,color .18s}
|
|
69
|
+
::selection{background:var(--accent);color:#04121d}
|
|
70
|
+
a{color:var(--accent);text-decoration:none;transition:color .12s}
|
|
71
|
+
a:hover{text-decoration:underline;text-underline-offset:.2em}
|
|
72
|
+
.shell{display:grid;grid-template-columns:268px minmax(0,1fr);min-height:100vh}
|
|
73
|
+
.sidebar{position:sticky;top:0;height:100vh;overflow:auto;padding:24px 22px;background:var(--paper);border-right:1px solid var(--line);scrollbar-width:thin;scrollbar-color:var(--line) transparent;transition:background-color .18s,border-color .18s}
|
|
74
|
+
.sidebar::-webkit-scrollbar{width:6px}
|
|
75
|
+
.sidebar::-webkit-scrollbar-thumb{background:var(--line);border-radius:6px}
|
|
76
|
+
.sidebar-head{display:flex;align-items:center;gap:10px;margin-bottom:24px}
|
|
77
|
+
.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;flex:1;min-width:0}
|
|
78
|
+
.brand:hover{text-decoration:none}
|
|
79
|
+
.brand .mark{flex:0 0 34px;width:34px;height:34px;border-radius:8px;background:linear-gradient(145deg,#08111f 0%,#101827 58%,#172554 100%);position:relative;overflow:hidden;display:grid;place-items:center;box-shadow:0 1px 0 rgba(255,255,255,.08) inset,0 10px 24px -13px rgba(14,165,233,.7)}
|
|
80
|
+
.brand .mark::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(125,211,252,.22),transparent 42%),linear-gradient(315deg,rgba(167,139,250,.2),transparent 48%);pointer-events:none}
|
|
81
|
+
.brand .mark::after{content:"";position:absolute;inset:1px;border-radius:7px;border:1px solid rgba(255,255,255,.1);pointer-events:none}
|
|
82
|
+
.brand .mark svg{position:relative;z-index:1;width:23px;height:23px;display:block}
|
|
83
|
+
.brand .mark .cursor{transform-origin:center;animation:acpx-blink 1.2s steps(2,jump-none) infinite}
|
|
84
|
+
@keyframes acpx-blink{0%,49%{opacity:1}50%,100%{opacity:.25}}
|
|
85
|
+
@media (prefers-reduced-motion: reduce){.brand .mark .cursor{animation:none}}
|
|
86
|
+
.brand strong{display:block;font-size:1.05rem;line-height:1.1;font-weight:600;letter-spacing:0;color:var(--ink)}
|
|
87
|
+
.brand small{display:block;color:var(--muted);font-size:.74rem;margin-top:3px;font-weight:400}
|
|
88
|
+
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:var(--paper);color:var(--muted);cursor:pointer;padding:0;transition:border-color .15s,color .15s,background-color .15s,transform .12s}
|
|
89
|
+
.theme-toggle:hover{border-color:var(--ink);color:var(--ink)}
|
|
90
|
+
.theme-toggle:active{transform:scale(.94)}
|
|
91
|
+
.theme-toggle svg{width:16px;height:16px;display:block}
|
|
92
|
+
.theme-icon-sun{display:none}
|
|
93
|
+
:root[data-theme="dark"] .theme-icon-sun{display:block}
|
|
94
|
+
:root[data-theme="dark"] .theme-icon-moon{display:none}
|
|
95
|
+
.search{display:block;margin:0 0 22px}
|
|
96
|
+
.search span{display:block;color:var(--muted);font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:0;margin-bottom:7px}
|
|
97
|
+
.search input{width:100%;border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:9px 12px;font:inherit;font-size:.9rem;color:var(--text);outline:none;transition:border-color .15s,box-shadow .15s,background-color .18s}
|
|
98
|
+
.search input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
|
|
99
|
+
nav section{margin:0 0 18px}
|
|
100
|
+
nav h2{font-size:.68rem;color:var(--muted);text-transform:uppercase;letter-spacing:0;margin:0 0 6px;font-weight:600}
|
|
101
|
+
.nav-link{display:block;color:var(--text);text-decoration:none;border-radius:6px;padding:5px 10px;margin:1px 0;font-size:.9rem;line-height:1.4;transition:background .12s,color .12s}
|
|
102
|
+
.nav-link:hover{background:var(--line-soft);color:var(--ink);text-decoration:none}
|
|
103
|
+
.nav-link.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
|
|
104
|
+
main{min-width:0;padding:32px clamp(20px,4.5vw,56px) 80px;max-width:1180px;margin:0 auto;width:100%}
|
|
105
|
+
.hero{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;border-bottom:1px solid var(--line);padding:8px 0 22px;margin-bottom:8px;flex-wrap:wrap}
|
|
106
|
+
.hero-text{min-width:0;flex:1 1 320px}
|
|
107
|
+
.eyebrow{margin:0 0 8px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:0;font-size:.7rem}
|
|
108
|
+
.hero h1{font-size:2.25rem;line-height:1.1;letter-spacing:-.01em;margin:0;font-weight:700;color:var(--ink)}
|
|
109
|
+
.hero-meta{display:flex;gap:8px;flex:0 0 auto;flex-wrap:wrap}
|
|
110
|
+
.repo,.edit,.btn-ghost{border:1px solid var(--line);color:var(--text);text-decoration:none;border-radius:7px;padding:6px 11px;font-weight:500;font-size:.83rem;background:var(--paper);transition:border-color .15s,color .15s,background .15s}
|
|
111
|
+
.repo:hover,.edit:hover,.btn-ghost:hover{border-color:var(--ink);color:var(--ink);text-decoration:none}
|
|
112
|
+
.edit{color:var(--muted)}
|
|
113
|
+
.home-hero{padding:14px 0 28px;margin-bottom:8px;border-bottom:1px solid var(--line)}
|
|
114
|
+
.home-hero .eyebrow{display:inline-flex;align-items:center;gap:8px}
|
|
115
|
+
.home-hero .eyebrow .dot{width:7px;height:7px;border-radius:50%;background:var(--accent-3);box-shadow:0 0 0 3px rgba(34,197,94,.2)}
|
|
116
|
+
.home-hero h1{font-size:3.25rem;line-height:1.04;letter-spacing:-.015em;margin:0 0 .35em;font-weight:700;color:var(--ink)}
|
|
117
|
+
.home-hero h1 .accent{background:linear-gradient(110deg,var(--accent) 0%,var(--accent-2) 70%);-webkit-background-clip:text;background-clip:text;color:transparent}
|
|
118
|
+
.home-hero .lede{font-size:1.18rem;line-height:1.55;color:var(--text);margin:0 0 1.2em;max-width:60ch}
|
|
119
|
+
.home-cta{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 18px}
|
|
120
|
+
.home-cta .btn{display:inline-flex;align-items:center;gap:7px;border-radius:8px;padding:10px 16px;font-weight:600;font-size:.92rem;text-decoration:none;transition:background .15s,border-color .15s,color .15s,transform .12s}
|
|
121
|
+
.home-cta .btn-primary{background:var(--ink);color:var(--paper);border:1px solid var(--ink)}
|
|
122
|
+
.home-cta .btn-primary:hover{background:var(--accent);border-color:var(--accent);color:#04121d;text-decoration:none}
|
|
123
|
+
.home-cta .btn-ghost{padding:10px 16px}
|
|
124
|
+
.home-install{display:flex;align-items:center;gap:12px;background:var(--code-bg);color:var(--code-fg);border-radius:8px;padding:10px 10px 10px 16px;font:500 .9rem/1.2 "JetBrains Mono","SF Mono",ui-monospace,monospace;max-width:32em;border:1px solid #1f2937}
|
|
125
|
+
.home-install .prompt{color:#7dd3fc;user-select:none;flex:0 0 auto}
|
|
126
|
+
.home-install code{flex:1;background:transparent;border:0;color:var(--code-fg);font:inherit;padding:0;white-space:pre;overflow:hidden;text-overflow:ellipsis}
|
|
127
|
+
.home-install .copy{flex:0 0 auto;background:rgba(255,255,255,.08);color:var(--code-fg);border:1px solid rgba(255,255,255,.16);border-radius:6px;padding:5px 11px;font:500 .72rem/1 "Inter",sans-serif;cursor:pointer;transition:background .15s,border-color .15s}
|
|
128
|
+
.home-install .copy:hover{background:rgba(255,255,255,.16)}
|
|
129
|
+
.home-install .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d}
|
|
130
|
+
.home-services{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 18px}
|
|
131
|
+
.home-services span{display:inline-block;padding:3px 9px;border:1px solid var(--line);border-radius:999px;font-size:.78rem;color:var(--muted);background:var(--paper);font-family:"JetBrains Mono","SF Mono",ui-monospace,monospace}
|
|
132
|
+
.doc-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:48px;margin-top:24px}
|
|
133
|
+
.doc-grid-home{margin-top:8px}
|
|
134
|
+
@media(min-width:1180px){.doc-grid{grid-template-columns:minmax(0,72ch) 200px;justify-content:start}.doc-grid-home{grid-template-columns:minmax(0,76ch);justify-content:start}}
|
|
135
|
+
.doc{min-width:0;max-width:72ch;overflow-wrap:break-word}
|
|
136
|
+
.doc-home{max-width:76ch}
|
|
137
|
+
.doc h1{font-size:2.6rem;line-height:1.08;letter-spacing:-.015em;margin:0 0 .4em;font-weight:700;color:var(--ink)}
|
|
138
|
+
body:not(.home) .doc>h1:first-child{display:none}
|
|
139
|
+
.doc h2{font-size:1.45rem;line-height:1.2;margin:2em 0 .5em;font-weight:600;letter-spacing:-.005em;color:var(--ink);position:relative}
|
|
140
|
+
.doc h3{font-size:1.1rem;margin:1.7em 0 .35em;position:relative;font-weight:600;color:var(--ink);letter-spacing:0}
|
|
141
|
+
.doc h4{font-size:.98rem;margin:1.4em 0 .25em;color:var(--ink);position:relative;font-weight:600}
|
|
142
|
+
.doc h2:first-child,.doc h3:first-child,.doc h4:first-child{margin-top:.2em}
|
|
143
|
+
.doc :is(h2,h3,h4) .anchor{position:absolute;left:-1.05em;top:0;color:var(--subtle);opacity:0;text-decoration:none;font-weight:400;padding-right:.3em;transition:opacity .12s,color .12s}
|
|
144
|
+
.doc :is(h2,h3,h4):hover .anchor{opacity:.7}
|
|
145
|
+
.doc :is(h2,h3,h4) .anchor:hover{opacity:1;color:var(--accent);text-decoration:none}
|
|
146
|
+
.doc p{margin:0 0 1.05em}
|
|
147
|
+
.doc ul,.doc ol{padding-left:1.3rem;margin:0 0 1.15em}
|
|
148
|
+
.doc li{margin:.25em 0}
|
|
149
|
+
.doc li>p{margin:0 0 .4em}
|
|
150
|
+
.doc strong{font-weight:600;color:var(--ink)}
|
|
151
|
+
.doc em{font-style:italic}
|
|
152
|
+
.doc code{font-family:"JetBrains Mono","SF Mono",ui-monospace,monospace;font-size:.84em;background:var(--line-soft);border:1px solid var(--line);border-radius:5px;padding:.08em .35em;color:var(--code-inline-fg)}
|
|
153
|
+
.doc pre{position:relative;overflow:auto;background:var(--code-bg);color:var(--code-fg);border-radius:8px;padding:14px 18px;margin:1.3em 0;font-size:.85em;line-height:1.6;scrollbar-width:thin;scrollbar-color:#334155 transparent;border:1px solid #1f2937}
|
|
154
|
+
.doc pre::-webkit-scrollbar{height:8px;width:8px}
|
|
155
|
+
.doc pre::-webkit-scrollbar-thumb{background:#334155;border-radius:8px}
|
|
156
|
+
.doc pre code{display:block;background:transparent;border:0;color:inherit;padding:0;font-size:1em;white-space:pre}
|
|
157
|
+
.doc pre .hl-com{color:#7a8597;font-style:italic}
|
|
158
|
+
.doc pre .hl-str{color:#86efac}
|
|
159
|
+
.doc pre .hl-num{color:#fbbf24}
|
|
160
|
+
.doc pre .hl-kw{color:#c4b5fd;font-weight:500}
|
|
161
|
+
.doc pre .hl-lit{color:#f0abfc}
|
|
162
|
+
.doc pre .hl-flag{color:#7dd3fc}
|
|
163
|
+
.doc pre .hl-var{color:#fca5a5}
|
|
164
|
+
.doc pre .hl-prop{color:#7dd3fc}
|
|
165
|
+
.doc pre .hl-op{color:#94a3b8}
|
|
166
|
+
.doc pre .hl-typ{color:#fde68a}
|
|
167
|
+
.doc pre .copy{position:absolute;top:8px;right:8px;background:rgba(255,255,255,.06);color:var(--code-fg);border:1px solid rgba(255,255,255,.16);border-radius:6px;padding:3px 9px;font:500 .7rem/1 "Inter",sans-serif;cursor:pointer;opacity:0;transition:opacity .15s,background .15s,border-color .15s}
|
|
168
|
+
.doc pre:hover .copy,.doc pre .copy:focus{opacity:1}
|
|
169
|
+
.doc pre .copy:hover{background:rgba(255,255,255,.12)}
|
|
170
|
+
.doc pre .copy.copied{background:var(--accent);border-color:var(--accent);color:#04121d;opacity:1}
|
|
171
|
+
.doc blockquote{margin:1.4em 0;padding:10px 16px;border-left:3px solid var(--accent);background:var(--accent-soft);border-radius:0 8px 8px 0;color:var(--text)}
|
|
172
|
+
.doc blockquote p:last-child{margin-bottom:0}
|
|
173
|
+
.doc table{width:100%;border-collapse:collapse;margin:1.2em 0;font-size:.92em}
|
|
174
|
+
.doc th,.doc td{border-bottom:1px solid var(--line);padding:9px 10px;text-align:left;vertical-align:top}
|
|
175
|
+
.doc th{font-weight:600;color:var(--ink);background:var(--line-soft);border-bottom:1px solid var(--line)}
|
|
176
|
+
.doc hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
|
|
177
|
+
.toc{position:sticky;top:24px;align-self:start;font-size:.84rem;padding-left:14px;border-left:1px solid var(--line);max-height:calc(100vh - 48px);overflow:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
|
|
178
|
+
.toc::-webkit-scrollbar{width:5px}
|
|
179
|
+
.toc::-webkit-scrollbar-thumb{background:var(--line);border-radius:5px}
|
|
180
|
+
.toc h2{font-size:.66rem;color:var(--muted);text-transform:uppercase;letter-spacing:0;margin:0 0 10px;font-weight:600}
|
|
181
|
+
.toc a{display:block;color:var(--muted);text-decoration:none;padding:4px 0 4px 10px;line-height:1.35;border-left:2px solid transparent;margin-left:-12px;transition:color .12s,border-color .12s}
|
|
182
|
+
.toc a:hover{color:var(--ink);text-decoration:none}
|
|
183
|
+
.toc a.active{color:var(--accent);border-left-color:var(--accent);font-weight:500}
|
|
184
|
+
.toc-l3{padding-left:22px!important;font-size:.94em}
|
|
185
|
+
@media(max-width:1179px){.toc{display:none}}
|
|
186
|
+
.page-nav{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:48px;border-top:1px solid var(--line);padding-top:20px}
|
|
187
|
+
.page-nav>a{display:block;border:1px solid var(--line);background:var(--paper);border-radius:9px;padding:13px 16px;text-decoration:none;color:var(--text);transition:border-color .15s,transform .15s,box-shadow .15s,background-color .18s}
|
|
188
|
+
.page-nav>a:hover{border-color:var(--accent);text-decoration:none;color:var(--ink)}
|
|
189
|
+
.page-nav small{display:block;color:var(--muted);font-size:.7rem;text-transform:uppercase;letter-spacing:0;margin-bottom:5px;font-weight:600}
|
|
190
|
+
.page-nav span{display:block;font-weight:600;line-height:1.3;color:var(--ink)}
|
|
191
|
+
.page-nav-prev{text-align:left}
|
|
192
|
+
.page-nav-next{text-align:right;grid-column:2}
|
|
193
|
+
.page-nav-prev:only-child{grid-column:1}
|
|
194
|
+
.nav-toggle{display:none;position:fixed;top:14px;right:14px;top:calc(14px + env(safe-area-inset-top, 0px));right:calc(14px + env(safe-area-inset-right, 0px));z-index:20;width:40px;height:40px;border-radius:9px;background:var(--paper);border:1px solid var(--line);color:var(--ink);cursor:pointer;padding:10px 9px;flex-direction:column;align-items:stretch;justify-content:space-between;box-shadow:var(--shadow-card)}
|
|
195
|
+
.nav-toggle span{display:block;width:100%;height:2px;flex:0 0 2px;background:currentColor;border-radius:2px;transition:transform .2s,opacity .2s}
|
|
196
|
+
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(8px) rotate(45deg)}
|
|
197
|
+
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
|
|
198
|
+
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}
|
|
199
|
+
@media(max-width:900px){
|
|
200
|
+
.shell{display:block}
|
|
201
|
+
.sidebar{position:fixed;inset:0 30% 0 0;max-width:320px;height:100vh;z-index:15;transform:translateX(-100%);transition:transform .25s ease,background-color .18s,border-color .18s;box-shadow:0 18px 40px rgba(0,0,0,.18);background:var(--paper);pointer-events:none}
|
|
202
|
+
.sidebar.open{transform:translateX(0);pointer-events:auto}
|
|
203
|
+
.nav-toggle{display:flex}
|
|
204
|
+
main{padding:64px 18px 56px}
|
|
205
|
+
.hero{padding-top:6px}
|
|
206
|
+
.hero h1{font-size:1.8rem}
|
|
207
|
+
.home-hero h1{font-size:2.45rem}
|
|
208
|
+
.doc h1{font-size:2.1rem}
|
|
209
|
+
.hero-meta{width:100%;justify-content:flex-start}
|
|
210
|
+
.home-hero{padding-top:8px}
|
|
211
|
+
.doc{padding:0}
|
|
212
|
+
.doc-grid{margin-top:18px;gap:24px}
|
|
213
|
+
.doc :is(h2,h3,h4) .anchor{display:none}
|
|
214
|
+
}
|
|
215
|
+
@media(max-width:520px){
|
|
216
|
+
main{padding:60px 14px 48px}
|
|
217
|
+
.doc pre{margin-left:-14px;margin-right:-14px;border-radius:0;border-left:0;border-right:0}
|
|
218
|
+
.home-install{flex-wrap:wrap}
|
|
219
|
+
}
|
|
220
|
+
</style>
|
|
221
|
+
</head>
|
|
222
|
+
<body>
|
|
223
|
+
<button class="nav-toggle" type="button" aria-label="Toggle navigation" aria-expanded="false">
|
|
224
|
+
<span aria-hidden="true"></span><span aria-hidden="true"></span><span aria-hidden="true"></span>
|
|
225
|
+
</button>
|
|
226
|
+
<div class="shell">
|
|
227
|
+
<aside class="sidebar">
|
|
228
|
+
<div class="sidebar-head">
|
|
229
|
+
<a class="brand" href="./" aria-label="acpx docs home">
|
|
230
|
+
<span class="mark" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.8 6.8 10 12l-5.2 5.2" stroke="#7dd3fc" stroke-width="2.7" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.2 7.2h2.9c1.7 0 3.1 1.4 3.1 3.1v.5c0 1.7-1.4 3.1-3.1 3.1h-1.4c-1.7 0-3.1 1.4-3.1 3.1v.5" stroke="#a78bfa" stroke-width="1.8" stroke-linecap="round"/><circle cx="13.2" cy="7.2" r="1.6" fill="#7dd3fc"/><circle cx="19.2" cy="12" r="1.6" fill="#a78bfa"/><rect class="cursor" x="13.2" y="16.2" width="6.6" height="2.5" rx="1.25" fill="#e0e7ff"/></svg></span>
|
|
231
|
+
<span><strong>acpx</strong><small>ACP CLI docs</small></span>
|
|
232
|
+
</a>
|
|
233
|
+
<button class="theme-toggle" type="button" aria-label="Toggle dark mode" aria-pressed="false" data-theme-toggle>
|
|
234
|
+
<svg class="theme-icon-moon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.6 12.1A6.5 6.5 0 0 1 7.4 2.7a6.5 6.5 0 1 0 7.2 9.4z" fill="currentColor"/></svg>
|
|
235
|
+
<svg class="theme-icon-sun" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="3.4" fill="currentColor"/><g stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><line x1="10" y1="2" x2="10" y2="4"/><line x1="10" y1="16" x2="10" y2="18"/><line x1="2" y1="10" x2="4" y2="10"/><line x1="16" y1="10" x2="18" y2="10"/><line x1="4.2" y1="4.2" x2="5.6" y2="5.6"/><line x1="14.4" y1="14.4" x2="15.8" y2="15.8"/><line x1="4.2" y1="15.8" x2="5.6" y2="14.4"/><line x1="14.4" y1="5.6" x2="15.8" y2="4.2"/></g></svg>
|
|
236
|
+
</button>
|
|
237
|
+
</div>
|
|
238
|
+
<label class="search"><span>Search</span><input id="doc-search" type="search" placeholder="sessions, flows, json…"></label>
|
|
239
|
+
<nav><section><h2>Start</h2><a class="nav-link" href="./">Overview</a><a class="nav-link" href="install.html">Install</a><a class="nav-link" href="quickstart.html">Quickstart</a></section><section><h2>Agents</h2><a class="nav-link" href="agents.html">Agents</a><a class="nav-link" href="custom-agents.html">Custom agents</a></section><section><h2>Sessions</h2><a class="nav-link" href="sessions.html">Sessions</a><a class="nav-link" href="prompting.html">Prompting</a><a class="nav-link active" href="session-control.html">Session control</a></section><section><h2>Output & Policy</h2><a class="nav-link" href="output-formats.html">Output formats</a><a class="nav-link" href="permissions.html">Permissions</a><a class="nav-link" href="config.html">Config</a></section><section><h2>Flows</h2><a class="nav-link" href="flows.html">Flows</a></section><section><h2>Reference</h2><a class="nav-link" href="CLI.html">CLI Reference</a><a class="nav-link" href="exit-codes.html">Exit codes</a><a class="nav-link" href="VISION.html">Vision</a></section></nav>
|
|
240
|
+
</aside>
|
|
241
|
+
<main>
|
|
242
|
+
<header class="hero">
|
|
243
|
+
<div class="hero-text">
|
|
244
|
+
<p class="eyebrow">Sessions</p>
|
|
245
|
+
<h1>Session control</h1>
|
|
246
|
+
</div>
|
|
247
|
+
<div class="hero-meta">
|
|
248
|
+
<a class="repo" href="https://github.com/openclaw/acpx" rel="noopener">GitHub</a>
|
|
249
|
+
<a class="edit" href="https://github.com/openclaw/acpx/edit/main/docs/session-control.md" rel="noopener">Edit page</a>
|
|
250
|
+
</div>
|
|
251
|
+
</header>
|
|
252
|
+
<div class="doc-grid">
|
|
253
|
+
<article class="doc"><p>These commands change live session state without restarting an adapter or losing history. They route through the queue owner when one is active, and reconnect directly otherwise.</p>
|
|
254
|
+
<p>A warm owner applies settings on its retained adapter even when no prompt is running. During a prompt, controls can finish before the prompt ends. The owner saves accepted mode, model, and configuration changes before acknowledging them; prompt completion and close wait for admitted controls to finish their state updates.</p>
|
|
255
|
+
<p>If a control times out after it may have reached the adapter, treat its result as uncertain. acpx does not repeat the setting automatically. Accepted replies still finish saving their state, and unfinished connections are retired before another prompt uses that context. Race-free persistence requires updated callers and an updated owner. Already running v0.17.1 owners and older callers retain caller-side whole-record writes, which can race other controls or owner checkpoints. Use updated clients and let an older owner expire while idle before resuming work.</p>
|
|
256
|
+
<h2 id="cancel"><a class="anchor" href="#cancel" aria-label="Anchor link">#</a><code>cancel</code></h2>
|
|
257
|
+
<pre><code class="language-bash">acpx codex cancel
|
|
258
|
+
acpx codex cancel <span class="hl-flag">-s</span> backend
|
|
259
|
+
acpx cancel <span class="hl-com"># defaults to codex</span></code></pre>
|
|
260
|
+
<p>Sends ACP <code>session/cancel</code> cooperatively:</p>
|
|
261
|
+
<ul>
|
|
262
|
+
<li>If a queue owner is running, the cancel is delivered through IPC.</li>
|
|
263
|
+
<li>If a native prompt is active, acpx asks the adapter to cancel it; the adapter's reply determines the final stop reason.</li>
|
|
264
|
+
<li>If nothing is running, <code>acpx</code> prints <code>nothing to cancel</code> and exits success.</li>
|
|
265
|
+
</ul>
|
|
266
|
+
<p>This is the same semantics as <code>Ctrl+C</code> during a foreground turn, but available without a TTY signal — useful from scripts and other agents.</p>
|
|
267
|
+
<p>Accepted cancellation stops remaining queued-turn attempts during retry backoff or before the next transport write. Cancellation during backoff records a cancelled result without sending another prompt. Completed prompt responses and non-retryable failures keep their actual outcomes, including responses received before update draining finishes. Separately queued turns remain eligible to run.</p>
|
|
268
|
+
<h2 id="set-mode"><a class="anchor" href="#set-mode" aria-label="Anchor link">#</a><code>set-mode</code></h2>
|
|
269
|
+
<pre><code class="language-bash">acpx codex set-mode auto
|
|
270
|
+
acpx codex set-mode plan <span class="hl-flag">-s</span> backend
|
|
271
|
+
acpx set-mode auto <span class="hl-com"># defaults to codex</span></code></pre>
|
|
272
|
+
<p>Calls ACP <code>session/set_mode</code>. The set of valid <code><mode></code> values is <strong>adapter-defined</strong> and not standardized across ACP. Common values seen in the wild:</p>
|
|
273
|
+
<table><thead><tr><th>Adapter</th><th>Modes</th></tr></thead><tbody><tr><td><code>codex</code></td><td>adapter-defined (see codex-acp release notes)</td></tr><tr><td><code>claude</code></td><td>adapter-defined; <code>plan</code> and <code>auto</code> are typical</td></tr><tr><td>Others</td><td>check upstream agent docs</td></tr></tbody></table>
|
|
274
|
+
<p>Unsupported mode ids are rejected by the adapter, often as <code>Invalid params</code>. <code>acpx</code> surfaces that error code unchanged.</p>
|
|
275
|
+
<p><code>set-mode</code> routes through the queue owner when active and falls back to a fresh client connection otherwise.</p>
|
|
276
|
+
<p>When reconnect permits a fresh session, an explicit mode change replaces the saved mode without replaying that previous mode first. This lets you replace a mode the adapter no longer supports. Other saved model and config selections still restore before the requested change. The new mode is saved only after the adapter accepts it; rejection keeps the prior mode preference. Persistent runtime sessions and imported records still require the original native session.</p>
|
|
277
|
+
<p>During prompt reconnect, model metadata received while restoring a saved mode takes effect before the saved model is restored. This includes changed model lists, renamed model controls, and removed model support. The final session metadata retains those changes even when no model selection needs replaying.</p>
|
|
278
|
+
<h2 id="set-key-value"><a class="anchor" href="#set-key-value" aria-label="Anchor link">#</a><code>set <key> <value></code></h2>
|
|
279
|
+
<pre><code class="language-bash">acpx set model gpt-<span class="hl-num">5</span>.<span class="hl-num">4</span> <span class="hl-com"># defaults to codex</span>
|
|
280
|
+
acpx claude set verbosity terse</code></pre>
|
|
281
|
+
<p>Calls ACP <code>session/set_config_option</code> with the adapter's config key. Values for its advertised model control follow the model-selection rules below; other values are sent unchanged. Config selections are saved using the adapter's accepted values and restored after reconnect, before the next prompt. Saved config keys and accepted string values retain their exact spelling through reconnect. If a control changes another saved selection, such as reasoning effort after a model switch, ACPX saves the adjusted value or removes the selection when its control disappears. Unselected defaults are not pinned.</p>
|
|
282
|
+
<p>A config key named <code>mode</code> keeps config-option transport; <code>set-mode</code> uses the separate legacy mode control. Their saved preferences remain independent. Existing legacy-mode preferences are not reinterpreted as config selections.</p>
|
|
283
|
+
<p>After a genuine resume or load, ACPX restores the saved model first when the adapter advertises model controls, then replays saved configuration. An already loaded, reusable session needs no replay. A failed replay stops the operation with an error instead of silently continuing with defaults.</p>
|
|
284
|
+
<p>For applications using <code>acpx/runtime</code>, <code>AcpxRuntime.setConfigOption(...)</code> returns the native ACP response, including its complete <code>configOptions</code>, after saving the accepted state. Use that response to update displayed model and reasoning controls from the same operation, including changed or removed sibling options.</p>
|
|
285
|
+
<p>For model selection in an application, use <code>runtime.setModel({ handle, model })</code>. It uses the adapter's advertised model control and saves the selection for reconnect. When you need the accepted configuration response, use <code>setConfigOption</code> with the advertised model option's ID as <code>key</code>. Both methods validate the requested model against the connected session's catalog, including after reconnect. Read <code>runtime.getStatus({ handle })</code> for the current model and available IDs. Treat each model ID as opaque; pass exact advertised IDs, including IDs containing slashes, unchanged.</p>
|
|
286
|
+
<p>Unknown or ambiguous model selectors are rejected before sending the model change. In-process runtime callers can identify these failures with <code>isRequestedModelUnsupportedError(error)</code> and <code>error.reason === "unadvertised-model"</code>. When a Cursor alias matches multiple advertised variants, the error also has <code>ambiguous: true</code>; a selector with no advertised match omits that flag. Shared runtime callers receive the owner's queue error instead of the in-process error class. Claude ACP retains its forwarding exception: Claude Code accepts or rejects selectors absent from its advertised list. Cursor alone also accepts a bare model name when exactly one advertised bracketed variant matches; an exact advertised ID always wins. See <a href="https://github.com/openclaw/acpx/blob/main/agents/Cursor.md">Cursor</a> for examples.</p>
|
|
287
|
+
<p>Embedded <code>setModel</code>, <code>setMode</code>, and <code>setConfigOption</code> calls also accept optional <code>signal</code> and <code>assertActive</code> fields. Supply a synchronous <code>assertActive</code> callback that throws when the host no longer permits the operation. Authority is checked after queue and storage waits and before the request is handed to the ACP SDK. Rejection preserves the original abort reason or callback error.</p>
|
|
288
|
+
<pre><code class="language-typescript"><span class="hl-kw">await</span> runtime.setModel({
|
|
289
|
+
handle,
|
|
290
|
+
model: selectedModel,
|
|
291
|
+
signal: abortController.signal,
|
|
292
|
+
assertActive,
|
|
293
|
+
});</code></pre>
|
|
294
|
+
<p>These fields guard request admission. After SDK admission, the response and accepted state still settle even if the signal aborts or host authority changes. This keeps the saved selection consistent with the agent. Callers that omit the fields retain their existing behavior.</p>
|
|
295
|
+
<p>Within an embedded runtime, accepted controls save the current conversation and configuration together. Turn completion and one-shot cleanup wait for those controls to settle before saving final state or releasing the connection. A late control response therefore preserves final output and usage, and its accepted selection remains in the saved session for later turns and reconnect replay. Ordinary <code>close</code> still need not wait for the active prompt to finish cancellation; its closed/reset markers survive the prompt's later final save.</p>
|
|
296
|
+
<p>The same guard applies to each saved mode, model, and configuration control replayed during reconnect. Revocation stops later replay requests and preserves the original rejection. Replies already accepted by the agent remain saved, including any adjusted sibling selections.</p>
|
|
297
|
+
<h3 id="set-model-id"><a class="anchor" href="#set-model-id" aria-label="Anchor link">#</a><code>set model <id></code></h3>
|
|
298
|
+
<p><code>set model <id></code> is a special-case interception. <code>acpx</code> prefers an advertised model session config option and updates it through <code>session/set_config_option</code>. If an adapter explicitly advertises legacy <code>models</code> metadata instead, <code>acpx</code> preserves compatibility through <code>session/set_model</code>.</p>
|
|
299
|
+
<p>Current codex-acp releases advertise the base model and reasoning effort as separate config options.</p>
|
|
300
|
+
<pre><code class="language-bash">acpx codex set model gpt-<span class="hl-num">5</span>.<span class="hl-num">6</span>-sol
|
|
301
|
+
acpx codex set reasoning_effort max
|
|
302
|
+
acpx claude set model claude-sonnet-<span class="hl-num">4</span>-<span class="hl-num">6</span></code></pre>
|
|
303
|
+
<p>For setting the model at session creation instead, use the <code>--model</code> global flag. See <a href="prompting.html#models">Prompting</a>.</p>
|
|
304
|
+
<h2 id="status"><a class="anchor" href="#status" aria-label="Anchor link">#</a><code>status</code></h2>
|
|
305
|
+
<pre><code class="language-bash">acpx codex status
|
|
306
|
+
acpx codex status <span class="hl-flag">-s</span> backend
|
|
307
|
+
acpx status <span class="hl-com"># defaults to codex</span></code></pre>
|
|
308
|
+
<p>Reports local queue-owner health for the cwd-scoped session. A healthy warm owner may be processing a prompt or waiting for more work during its idle TTL.</p>
|
|
309
|
+
<table><thead><tr><th>Text/quiet state</th><th>JSON <code>status</code></th><th>Meaning</th></tr></thead><tbody><tr><td><code>running</code></td><td><code>alive</code></td><td>Queue owner is healthy and its socket is reachable; this does not establish that a prompt is active.</td></tr><tr><td><code>idle</code></td><td><code>idle</code></td><td>Saved session is resumable and no queue owner is present.</td></tr><tr><td><code>dead</code></td><td><code>dead</code></td><td>A queue-owner lease remains but is unhealthy, or the recorded agent exit was abnormal.</td></tr><tr><td><code>no-session</code></td><td><code>no-session</code></td><td>No saved record matches this scope.</td></tr></tbody></table>
|
|
310
|
+
<p>When available, output also includes the queue-owner PID, model, mode, uptime, and last prompt time. Dead status can include the recorded exit code or signal. The JSON result is a status summary, not a full session record; <code>no-session</code> has no local session identity.</p>
|
|
311
|
+
<p>Uptime measures wall-clock time since the most recently launched agent process, rounded down to whole seconds. It can keep advancing after that process exits and resets when a replacement starts. The queue-owner PID can stay the same across this reset.</p>
|
|
312
|
+
<p>Status checks use local lease, process, and socket information and do not send an ACP request to the agent. Use session watch events to observe prompt progress or settlement; owner liveness alone is not a prompt-completion signal.</p>
|
|
313
|
+
<h3 id="output"><a class="anchor" href="#output" aria-label="Anchor link">#</a>Output</h3>
|
|
314
|
+
<ul>
|
|
315
|
+
<li><code>text</code>: key/value lines (default).</li>
|
|
316
|
+
<li><code>json</code>: a <code>status_snapshot</code> object using the JSON status values above.</li>
|
|
317
|
+
<li><code>quiet</code>: the text/quiet state token.</li>
|
|
318
|
+
</ul>
|
|
319
|
+
<p><code>idle</code> is meaningful: it means the persistent session is saved and resumable, but no queue owner is currently running. The next prompt will start an owner and reconnect.</p>
|
|
320
|
+
<h2 id="routing-rules"><a class="anchor" href="#routing-rules" aria-label="Anchor link">#</a>Routing rules</h2>
|
|
321
|
+
<p>All four commands (<code>cancel</code>, <code>set-mode</code>, <code>set</code>, <code>status</code>) try the queue owner first when one exists for the target session. If no owner is running:</p>
|
|
322
|
+
<ul>
|
|
323
|
+
<li><code>cancel</code> short-circuits with <code>nothing to cancel</code>.</li>
|
|
324
|
+
<li><code>set-mode</code> and <code>set</code> reconnect to the saved adapter session and apply the change directly.</li>
|
|
325
|
+
<li><code>status</code> simply reports <code>idle</code> or <code>dead</code>.</li>
|
|
326
|
+
</ul>
|
|
327
|
+
<p>This means it is always safe to call these from scripts without worrying about whether a queue owner happens to be running.</p>
|
|
328
|
+
<h2 id="see-also"><a class="anchor" href="#see-also" aria-label="Anchor link">#</a>See also</h2>
|
|
329
|
+
<ul>
|
|
330
|
+
<li><a href="prompting.html">Prompting</a> — <code>--no-wait</code> and timeouts.</li>
|
|
331
|
+
<li><a href="sessions.html">Sessions</a> — scope rules and queue ownership.</li>
|
|
332
|
+
<li><a href="CLI.html#cancel-command">CLI reference</a> — formal command grammar.</li>
|
|
333
|
+
</ul>
|
|
334
|
+
<h2 id="embedded-agent-discovery"><a class="anchor" href="#embedded-agent-discovery" aria-label="Anchor link">#</a>Embedded agent discovery</h2>
|
|
335
|
+
<p>Import <code>createAgentRegistry</code> from <code>acpx/agent-registry</code> to inspect agents without loading the runtime engine. The existing <code>acpx/runtime</code> export remains available.</p>
|
|
336
|
+
<p><code>createAgentRegistry({ overrides })</code> supplies <code>inspect(agentId)</code> for checking installed launch entrypoints. A result contains the canonical <code>id</code>, display <code>name</code>, and either <code>launch: { kind: "installed", argv }</code> or <code>launch: { kind: "missing", requirements }</code>. Each missing requirement names a command or package. Inspection checks known entrypoints and prerequisites; it does not audit the behavior of arbitrary custom programs. Inspection performs filesystem lookup only; it does not start an agent, install packages, authenticate, or acquire a model catalog.</p>
|
|
337
|
+
<p>The optional <code>resolveExecutable(command)</code> and <code>resolvePackageRoot(packageName)</code> callbacks let an embedding host use its own executable and plugin-package lookup. Return an absolute path, or <code>undefined</code> when absent. Explicit overrides retain their precedence. Unknown agents and installer-style overrides that cannot be checked without package execution return <code>undefined</code>. Check again when acquiring the runtime; installation facts can change. Resolved argv can contain private configured arguments and belongs in trusted launch code.</p>
|
|
338
|
+
<p>The existing <code>list()</code> and <code>resolve()</code> methods retain their behavior, including configured and raw adapter commands. Custom registries implementing only those methods remain supported. <code>createAgentRegistry</code> returns the richer <code>AcpInspectableAgentRegistry</code> type.</p>
|
|
339
|
+
<p>Registry lookups use explicit entries only. Names such as <code>constructor</code> and <code>__proto__</code> remain raw commands unless configured; configured values also appear in <code>list()</code> and can be inspected normally.</p>
|
|
340
|
+
<p>After session acquisition, <code>getStatus({ handle }).models.availableModels</code> optionally supplies <code>{ modelId, name }</code> entries with native display names. <code>availableModelIds</code> remains available. IDs are opaque; pass the selected ID unchanged to <code>setModel</code>. Older session records without name metadata may omit <code>availableModels</code> until refreshed. A missing authenticated catalog remains a setup error even when its executable is installed. Ordinary <code>close</code> releases local inspection resources; optional remote discard and deletion of native history are separate operations.</p>
|
|
341
|
+
<p>Within one runtime, turns for the same session record run in submission order; different session records remain concurrent. Queued turns can be cancelled without interrupting their predecessor, and controls continue to reach the active turn.</p>
|
|
342
|
+
<p><code>prepareFreshSession({ handle })</code> releases local session resources and records that the next <code>ensureSession</code> must create a fresh session, including after a runtime restart. Preparation cancels previously submitted turns for that record and waits for their finalization before recording the reset; local finalization or persistence failures reject preparation. Failed cleanup is retried before that owner can be replaced. Omit <code>resumeSessionId</code> on that ensure call. This operation does not require the optional remote <code>session/close</code> capability and does not delete native history. Ordinary <code>close</code> cancels active and queued turns while keeping the session resumable; the active turn may finish cancellation after close returns. Explicit <code>close({ handle, reason, discardPersistentState: true })</code> retains its remote-close requirement.</p><nav class="page-nav" aria-label="Pager"><a class="page-nav-prev" href="prompting.html"><small>Previous</small><span>Prompting</span></a><a class="page-nav-next" href="output-formats.html"><small>Next</small><span>Output formats</span></a></nav></article>
|
|
343
|
+
<nav class="toc" aria-label="On this page"><h2>On this page</h2><a class="toc-l2" href="#cancel">#cancel</a><a class="toc-l2" href="#set-mode">#set-mode</a><a class="toc-l2" href="#set-key-value">#set &lt;key&gt; &lt;value&gt;</a><a class="toc-l3" href="#set-model-id">#set model &lt;id&gt;</a><a class="toc-l2" href="#status">#status</a><a class="toc-l3" href="#output">#Output</a><a class="toc-l2" href="#routing-rules">#Routing rules</a><a class="toc-l2" href="#see-also">#See also</a><a class="toc-l2" href="#embedded-agent-discovery">#Embedded agent discovery</a></nav>
|
|
344
|
+
</div>
|
|
345
|
+
</main>
|
|
346
|
+
</div>
|
|
347
|
+
<script>
|
|
348
|
+
const themeRoot=document.documentElement;
|
|
349
|
+
function applyTheme(mode){themeRoot.dataset.theme=mode;document.querySelectorAll('[data-theme-toggle]').forEach(b=>b.setAttribute('aria-pressed',mode==='dark'?'true':'false'))}
|
|
350
|
+
function storedTheme(){try{return localStorage.getItem('theme')}catch(e){return null}}
|
|
351
|
+
function persistTheme(mode){try{localStorage.setItem('theme',mode)}catch(e){}}
|
|
352
|
+
applyTheme(themeRoot.dataset.theme==='dark'?'dark':'light');
|
|
353
|
+
document.querySelectorAll('[data-theme-toggle]').forEach(btn=>{btn.addEventListener('click',()=>{const next=themeRoot.dataset.theme==='dark'?'light':'dark';applyTheme(next);persistTheme(next)})});
|
|
354
|
+
const systemDark=window.matchMedia&&matchMedia('(prefers-color-scheme: dark)');
|
|
355
|
+
function onSystemChange(e){if(storedTheme())return;applyTheme(e.matches?'dark':'light')}
|
|
356
|
+
if(systemDark){if(systemDark.addEventListener)systemDark.addEventListener('change',onSystemChange);else if(systemDark.addListener)systemDark.addListener(onSystemChange)}
|
|
357
|
+
const sidebar=document.querySelector('.sidebar');
|
|
358
|
+
const toggle=document.querySelector('.nav-toggle');
|
|
359
|
+
const mobileNav=window.matchMedia('(max-width: 900px)');
|
|
360
|
+
const sidebarFocusable='a[href],button,input,select,textarea,[tabindex]';
|
|
361
|
+
function setSidebarFocusable(enabled){
|
|
362
|
+
sidebar?.querySelectorAll(sidebarFocusable).forEach((el)=>{
|
|
363
|
+
if(enabled){
|
|
364
|
+
if(el.dataset.sidebarTabindex!==undefined){
|
|
365
|
+
if(el.dataset.sidebarTabindex)el.setAttribute('tabindex',el.dataset.sidebarTabindex);
|
|
366
|
+
else el.removeAttribute('tabindex');
|
|
367
|
+
delete el.dataset.sidebarTabindex;
|
|
368
|
+
}
|
|
369
|
+
}else if(el.dataset.sidebarTabindex===undefined){
|
|
370
|
+
el.dataset.sidebarTabindex=el.getAttribute('tabindex')??'';
|
|
371
|
+
el.setAttribute('tabindex','-1');
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function setSidebarOpen(open){
|
|
376
|
+
if(!sidebar||!toggle)return;
|
|
377
|
+
sidebar.classList.toggle('open',open);
|
|
378
|
+
toggle.setAttribute('aria-expanded',open?'true':'false');
|
|
379
|
+
if(mobileNav.matches){
|
|
380
|
+
sidebar.inert=!open;
|
|
381
|
+
if(open)sidebar.removeAttribute('aria-hidden');
|
|
382
|
+
else sidebar.setAttribute('aria-hidden','true');
|
|
383
|
+
setSidebarFocusable(open);
|
|
384
|
+
}else{
|
|
385
|
+
sidebar.inert=false;
|
|
386
|
+
sidebar.removeAttribute('aria-hidden');
|
|
387
|
+
setSidebarFocusable(true);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
setSidebarOpen(false);
|
|
391
|
+
toggle?.addEventListener('click',()=>setSidebarOpen(!sidebar?.classList.contains('open')));
|
|
392
|
+
document.addEventListener('click',(e)=>{if(!sidebar?.classList.contains('open'))return;if(sidebar.contains(e.target)||toggle?.contains(e.target))return;setSidebarOpen(false)});
|
|
393
|
+
document.addEventListener('keydown',(e)=>{if(e.key==='Escape')setSidebarOpen(false)});
|
|
394
|
+
const syncSidebarForViewport=()=>setSidebarOpen(sidebar?.classList.contains('open')??false);
|
|
395
|
+
if(mobileNav.addEventListener)mobileNav.addEventListener('change',syncSidebarForViewport);
|
|
396
|
+
else mobileNav.addListener?.(syncSidebarForViewport);
|
|
397
|
+
const input=document.getElementById('doc-search');
|
|
398
|
+
input?.addEventListener('input',()=>{const q=input.value.trim().toLowerCase();document.querySelectorAll('nav section').forEach(sec=>{let any=false;sec.querySelectorAll('.nav-link').forEach(a=>{const m=!q||a.textContent.toLowerCase().includes(q);a.style.display=m?'block':'none';if(m)any=true});sec.style.display=any?'block':'none'})});
|
|
399
|
+
function attachCopy(target,getText){const btn=document.createElement('button');btn.type='button';btn.className='copy';btn.textContent='Copy';btn.addEventListener('click',async()=>{try{await navigator.clipboard.writeText(getText());btn.textContent='Copied';btn.classList.add('copied');setTimeout(()=>{btn.textContent='Copy';btn.classList.remove('copied')},1400)}catch{btn.textContent='Failed';setTimeout(()=>{btn.textContent='Copy'},1400)}});target.appendChild(btn)}
|
|
400
|
+
document.querySelectorAll('.doc pre').forEach(pre=>attachCopy(pre,()=>pre.querySelector('code')?.textContent??''));
|
|
401
|
+
document.querySelectorAll('.home-install').forEach(el=>attachCopy(el,()=>el.querySelector('code')?.textContent??''));
|
|
402
|
+
const tocLinks=document.querySelectorAll('.toc a');
|
|
403
|
+
if(tocLinks.length){const map=new Map();tocLinks.forEach(a=>{const id=a.getAttribute('href').slice(1);const el=document.getElementById(id);if(el)map.set(el,a)});const setActive=l=>{tocLinks.forEach(x=>x.classList.remove('active'));l.classList.add('active')};const obs=new IntersectionObserver(entries=>{const visible=entries.filter(e=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top);if(visible.length){const link=map.get(visible[0].target);if(link)setActive(link)}},{rootMargin:'-15% 0px -65% 0px',threshold:0});map.forEach((_,el)=>obs.observe(el))}
|
|
404
|
+
</script>
|
|
405
|
+
</body>
|
|
406
|
+
</html>
|