openadapt-kernel 0.1.0__py3-none-any.whl
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.
- openadapt_kernel/__init__.py +147 -0
- openadapt_kernel/aci.py +82 -0
- openadapt_kernel/cli.py +215 -0
- openadapt_kernel/copilot.py +338 -0
- openadapt_kernel/extension_bridge.py +134 -0
- openadapt_kernel/fsm.py +198 -0
- openadapt_kernel/interceptor.py +262 -0
- openadapt_kernel/ledger.py +379 -0
- openadapt_kernel/macro.py +354 -0
- openadapt_kernel/mcp_server.py +224 -0
- openadapt_kernel/oracles.py +317 -0
- openadapt_kernel/probe.py +100 -0
- openadapt_kernel/registry.py +145 -0
- openadapt_kernel/runner.py +292 -0
- openadapt_kernel-0.1.0.dist-info/METADATA +52 -0
- openadapt_kernel-0.1.0.dist-info/RECORD +19 -0
- openadapt_kernel-0.1.0.dist-info/WHEEL +4 -0
- openadapt_kernel-0.1.0.dist-info/entry_points.txt +2 -0
- openadapt_kernel-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"""Live CDP / Playwright runner for Draft-to-Commit and Verified Autopilot modes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from dataclasses import asdict, dataclass, field
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Dict, List, Literal, Optional
|
|
9
|
+
|
|
10
|
+
from openadapt_kernel.aci import OnlineACICalibrator
|
|
11
|
+
from openadapt_kernel.copilot import PortalPack, mint_receipt
|
|
12
|
+
from openadapt_kernel.interceptor import CommitInterceptor
|
|
13
|
+
from openadapt_kernel.ledger import ObligationLedger
|
|
14
|
+
from openadapt_kernel.macro import stage_form
|
|
15
|
+
from openadapt_kernel.oracles import verify_cross_tab_dom, verify_pdf_readback, verify_sqlite_ro
|
|
16
|
+
from openadapt_kernel.probe import probe_before_click
|
|
17
|
+
|
|
18
|
+
RunMode = Literal["draft", "autopilot"]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass
|
|
22
|
+
class RunResult:
|
|
23
|
+
mode: RunMode
|
|
24
|
+
outcome: str
|
|
25
|
+
episode_id: str = ""
|
|
26
|
+
staged_fields: Dict[str, str] = field(default_factory=dict)
|
|
27
|
+
provenance_violations: List[str] = field(default_factory=list)
|
|
28
|
+
commit_detected: bool = False
|
|
29
|
+
readback_verified: bool = False
|
|
30
|
+
receipt_path: Optional[str] = None
|
|
31
|
+
reason: str = ""
|
|
32
|
+
aci_alpha_t: Optional[float] = None
|
|
33
|
+
aci_threshold: Optional[float] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _sign_terminal_receipt(
|
|
37
|
+
ledger: ObligationLedger, pack_id: str, private_key_path: Optional[Path], receipt_out: Optional[Path],
|
|
38
|
+
*, outcome_override: Optional[str] = None, include_plaintext_values: bool = False,
|
|
39
|
+
) -> Optional[str]:
|
|
40
|
+
if not private_key_path or not receipt_out:
|
|
41
|
+
return None
|
|
42
|
+
receipt = mint_receipt(
|
|
43
|
+
ledger, pack_id, private_key_path.read_bytes(),
|
|
44
|
+
include_plaintext_values=include_plaintext_values, outcome_override=outcome_override,
|
|
45
|
+
)
|
|
46
|
+
receipt_out.parent.mkdir(parents=True, exist_ok=True)
|
|
47
|
+
receipt_out.write_text(json.dumps(receipt, indent=2), encoding="utf-8")
|
|
48
|
+
return str(receipt_out)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _load_portal_pack(path: Path) -> PortalPack:
|
|
52
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
53
|
+
return PortalPack(
|
|
54
|
+
pack_id=data["pack_id"],
|
|
55
|
+
portal_origin=data["portal_origin"],
|
|
56
|
+
variable_fields=list(data.get("variable_fields") or []),
|
|
57
|
+
static_defaults=dict(data.get("static_defaults") or {}),
|
|
58
|
+
provenance_map=dict(data.get("provenance_map") or {}),
|
|
59
|
+
readback_url_pattern=str(data.get("readback_url_pattern") or ""),
|
|
60
|
+
stage=data.get("stage", "SHADOW"),
|
|
61
|
+
shadow_passes=int(data.get("shadow_passes", 0)),
|
|
62
|
+
edge_branches=dict(data.get("edge_branches") or {}),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _compute_bindings(pack: PortalPack, dossier: Dict[str, str]) -> Dict[str, str]:
|
|
67
|
+
bindings: Dict[str, str] = dict(pack.static_defaults)
|
|
68
|
+
for target_field, source_key in pack.provenance_map.items():
|
|
69
|
+
if source_key in dossier:
|
|
70
|
+
bindings[target_field] = str(dossier[source_key])
|
|
71
|
+
for fname in pack.variable_fields:
|
|
72
|
+
if fname not in bindings and fname in dossier:
|
|
73
|
+
bindings[fname] = str(dossier[fname])
|
|
74
|
+
return bindings
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def run_portal_pack(
|
|
78
|
+
*,
|
|
79
|
+
pack_path: Path,
|
|
80
|
+
dossier: Dict[str, str],
|
|
81
|
+
mode: RunMode = "draft",
|
|
82
|
+
url: Optional[str] = None,
|
|
83
|
+
cdp_url: Optional[str] = None,
|
|
84
|
+
commit_selector: Optional[str] = None,
|
|
85
|
+
popup_trigger_selector: Optional[str] = None,
|
|
86
|
+
popup_bindings: Optional[Dict[str, str]] = None,
|
|
87
|
+
popup_submit_selector: Optional[str] = None,
|
|
88
|
+
sqlite_db_path: Optional[Path] = None,
|
|
89
|
+
sqlite_query: Optional[str] = None,
|
|
90
|
+
pdf_readback_path: Optional[Path] = None,
|
|
91
|
+
private_key_path: Optional[Path] = None,
|
|
92
|
+
receipt_out: Optional[Path] = None,
|
|
93
|
+
episode_id: Optional[str] = None,
|
|
94
|
+
headless: bool = True,
|
|
95
|
+
settle_timeout_ms: int = 5000,
|
|
96
|
+
aci_calibrator: Optional[OnlineACICalibrator] = None,
|
|
97
|
+
include_plaintext_values: bool = False,
|
|
98
|
+
) -> RunResult:
|
|
99
|
+
"""Execute a PortalPack in Draft-to-Commit (stop before save) or Verified Autopilot mode."""
|
|
100
|
+
from playwright.sync_api import sync_playwright
|
|
101
|
+
|
|
102
|
+
pack = _load_portal_pack(pack_path)
|
|
103
|
+
bindings = _compute_bindings(pack, dossier)
|
|
104
|
+
opaque_fields = sorted(pack.provenance_map.keys())
|
|
105
|
+
calibrator = aci_calibrator if aci_calibrator is not None else OnlineACICalibrator()
|
|
106
|
+
|
|
107
|
+
ledger = ObligationLedger(episode_id=episode_id)
|
|
108
|
+
ep_id = ledger.episode_id
|
|
109
|
+
ledger.add_obligation("primary_commit", f"Execute {pack.pack_id}", target_system=pack.portal_origin)
|
|
110
|
+
for k, v in dossier.items():
|
|
111
|
+
ledger.record_ssa_literal(k, str(v), source_window="dossier", turn=0)
|
|
112
|
+
|
|
113
|
+
interceptor = CommitInterceptor()
|
|
114
|
+
|
|
115
|
+
def _finish(
|
|
116
|
+
outcome: str, *, staged_fields: Optional[Dict[str, str]] = None,
|
|
117
|
+
provenance_violations: Optional[List[str]] = None, commit_detected: bool = False,
|
|
118
|
+
readback_verified: bool = False, reason: str = "",
|
|
119
|
+
receipt_outcome: Optional[str] = None, with_aci: bool = False,
|
|
120
|
+
) -> RunResult:
|
|
121
|
+
rpath = _sign_terminal_receipt(
|
|
122
|
+
ledger, pack.pack_id, private_key_path, receipt_out,
|
|
123
|
+
outcome_override=receipt_outcome, include_plaintext_values=include_plaintext_values,
|
|
124
|
+
)
|
|
125
|
+
return RunResult(
|
|
126
|
+
mode=mode, outcome=outcome, episode_id=ep_id, staged_fields=staged_fields or {},
|
|
127
|
+
provenance_violations=provenance_violations or [], commit_detected=commit_detected,
|
|
128
|
+
readback_verified=readback_verified, receipt_path=rpath, reason=reason,
|
|
129
|
+
aci_alpha_t=calibrator.alpha_t if with_aci else None,
|
|
130
|
+
aci_threshold=calibrator.threshold() if with_aci else None,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
with sync_playwright() as pw:
|
|
134
|
+
if cdp_url:
|
|
135
|
+
browser = pw.chromium.connect_over_cdp(cdp_url)
|
|
136
|
+
ctx = browser.contexts[0] if browser.contexts else browser.new_context()
|
|
137
|
+
page = ctx.pages[0] if ctx.pages else ctx.new_page()
|
|
138
|
+
close_browser = False
|
|
139
|
+
else:
|
|
140
|
+
browser = pw.chromium.launch(headless=headless)
|
|
141
|
+
page = browser.new_page()
|
|
142
|
+
close_browser = True
|
|
143
|
+
|
|
144
|
+
try:
|
|
145
|
+
interceptor.attach_playwright_page(page)
|
|
146
|
+
if url:
|
|
147
|
+
page.goto(url, wait_until="domcontentloaded")
|
|
148
|
+
|
|
149
|
+
target_origin = pack.portal_origin or str(getattr(page, "url", "") or "")
|
|
150
|
+
expected_vars = {k: bindings[k] for k in pack.variable_fields if k in bindings}
|
|
151
|
+
pre_present = False
|
|
152
|
+
if not sqlite_db_path and not pdf_readback_path and expected_vars:
|
|
153
|
+
pre_present = verify_cross_tab_dom(
|
|
154
|
+
page, expected_vars, reload_active=False, target_origin=target_origin
|
|
155
|
+
).verified
|
|
156
|
+
|
|
157
|
+
staged = stage_form(
|
|
158
|
+
page,
|
|
159
|
+
bindings,
|
|
160
|
+
ledger=ledger,
|
|
161
|
+
opaque_fields=opaque_fields,
|
|
162
|
+
interceptor=interceptor,
|
|
163
|
+
)
|
|
164
|
+
if staged.provenance_violations:
|
|
165
|
+
ledger.finalize("error", error_detail="ssa_provenance_violation")
|
|
166
|
+
return _finish(
|
|
167
|
+
"ESCALATED",
|
|
168
|
+
provenance_violations=[f"{v.field_name}: {v.reason}" for v in staged.provenance_violations],
|
|
169
|
+
reason="ssa_provenance_violation",
|
|
170
|
+
)
|
|
171
|
+
if not staged.ok:
|
|
172
|
+
ledger.finalize("error", dirty_fields=list(interceptor.dirty_fields.keys()), error_detail="stage_mismatch")
|
|
173
|
+
return _finish(
|
|
174
|
+
"ESCALATED",
|
|
175
|
+
staged_fields=staged.staged,
|
|
176
|
+
reason=f"stage_failed(unmatched={staged.unmatched}, mismatched={staged.mismatched})",
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
if popup_trigger_selector and popup_bindings:
|
|
180
|
+
with page.expect_popup(timeout=5000) as pop_info:
|
|
181
|
+
page.locator(popup_trigger_selector).first.click()
|
|
182
|
+
popup_page = pop_info.value
|
|
183
|
+
popup_page.wait_for_load_state("domcontentloaded")
|
|
184
|
+
pop_staged = stage_form(
|
|
185
|
+
popup_page,
|
|
186
|
+
popup_bindings,
|
|
187
|
+
ledger=ledger,
|
|
188
|
+
opaque_fields=opaque_fields,
|
|
189
|
+
interceptor=interceptor,
|
|
190
|
+
)
|
|
191
|
+
if not pop_staged.ok:
|
|
192
|
+
ledger.finalize("error", dirty_fields=list(interceptor.dirty_fields.keys()), error_detail="popup_stage_failed")
|
|
193
|
+
return _finish(
|
|
194
|
+
"ESCALATED",
|
|
195
|
+
staged_fields={**staged.staged, **pop_staged.staged},
|
|
196
|
+
reason="popup_stage_failed",
|
|
197
|
+
)
|
|
198
|
+
staged.staged.update(pop_staged.staged)
|
|
199
|
+
if popup_submit_selector:
|
|
200
|
+
popup_page.locator(popup_submit_selector).first.click()
|
|
201
|
+
page.wait_for_timeout(200)
|
|
202
|
+
|
|
203
|
+
if mode == "draft":
|
|
204
|
+
return _finish(
|
|
205
|
+
"READY_FOR_HUMAN_COMMIT",
|
|
206
|
+
staged_fields=staged.staged,
|
|
207
|
+
reason="draft_staged_awaiting_operator_submit",
|
|
208
|
+
receipt_outcome="PREPARE_REQUIRED",
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
if not commit_selector:
|
|
212
|
+
ledger.finalize("error", dirty_fields=list(interceptor.dirty_fields.keys()), error_detail="missing_commit_selector")
|
|
213
|
+
return _finish("ESCALATED", staged_fields=staged.staged, reason="autopilot_requires_commit_selector")
|
|
214
|
+
|
|
215
|
+
probe = probe_before_click(page, commit_selector)
|
|
216
|
+
if not probe.safe_to_click or not probe.focus_responded:
|
|
217
|
+
detail = f"commit_control_blocked:{probe.reason}"
|
|
218
|
+
if probe.top_blocker:
|
|
219
|
+
detail = f"{detail}({probe.top_blocker})"
|
|
220
|
+
ledger.finalize("error", dirty_fields=list(interceptor.dirty_fields.keys()), error_detail=detail)
|
|
221
|
+
return _finish("ESCALATED", staged_fields=staged.staged, reason=detail)
|
|
222
|
+
|
|
223
|
+
interceptor.begin_step()
|
|
224
|
+
page.locator(commit_selector).first.click()
|
|
225
|
+
interceptor.wait_for_commit_settle(
|
|
226
|
+
page, target_origin=target_origin, timeout_ms=settle_timeout_ms
|
|
227
|
+
)
|
|
228
|
+
has_2xx_mut = interceptor.has_target_origin_2xx_mutation(target_origin)
|
|
229
|
+
|
|
230
|
+
# Independent post-commit read-back (SQLite RO -> PDF stream -> target-origin DOM)
|
|
231
|
+
if sqlite_db_path and sqlite_query:
|
|
232
|
+
verdict = verify_sqlite_ro(sqlite_db_path, sqlite_query, (), expected_vars)
|
|
233
|
+
elif pdf_readback_path:
|
|
234
|
+
verdict = verify_pdf_readback(pdf_readback_path, expected_vars)
|
|
235
|
+
else:
|
|
236
|
+
verdict = verify_cross_tab_dom(
|
|
237
|
+
page, expected_vars, reload_active=True, target_origin=target_origin
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
has_transition = (not pre_present) and verdict.verified
|
|
241
|
+
commit_confirmed = has_2xx_mut or has_transition
|
|
242
|
+
|
|
243
|
+
# Online ACI update from Level-2/3 read-back ground truth Y_t
|
|
244
|
+
anomaly_score = 0.0 if (has_2xx_mut and probe.focus_responded) else (1.0 if has_transition else 3.0)
|
|
245
|
+
flagged = calibrator.should_flag(anomaly_score)
|
|
246
|
+
realized_error = flagged != (not (verdict.verified and commit_confirmed))
|
|
247
|
+
calibrator.update_from_readback(anomaly_score, realized_error=realized_error)
|
|
248
|
+
|
|
249
|
+
if not commit_confirmed:
|
|
250
|
+
ledger.finalize("error", dirty_fields=list(interceptor.dirty_fields.keys()), error_detail="commit_not_observed")
|
|
251
|
+
return _finish(
|
|
252
|
+
"ESCALATED",
|
|
253
|
+
staged_fields=staged.staged,
|
|
254
|
+
commit_detected=False,
|
|
255
|
+
readback_verified=verdict.verified,
|
|
256
|
+
reason="commit_not_observed",
|
|
257
|
+
with_aci=True,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
if not verdict.verified:
|
|
261
|
+
ledger.finalize(
|
|
262
|
+
"error",
|
|
263
|
+
dirty_fields=list(interceptor.dirty_fields.keys()),
|
|
264
|
+
error_detail="readback_refuted_persistence",
|
|
265
|
+
)
|
|
266
|
+
return _finish(
|
|
267
|
+
"ESCALATED",
|
|
268
|
+
staged_fields=staged.staged,
|
|
269
|
+
commit_detected=commit_confirmed,
|
|
270
|
+
readback_verified=False,
|
|
271
|
+
reason="readback_refuted_persistence",
|
|
272
|
+
with_aci=True,
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
interceptor.clear_dirty_fields()
|
|
276
|
+
ledger.mark_committed("primary_commit", verdict.to_proof())
|
|
277
|
+
decision = ledger.finalize("done", dirty_fields=list(interceptor.dirty_fields.keys()))
|
|
278
|
+
return _finish(
|
|
279
|
+
decision.outcome,
|
|
280
|
+
staged_fields=staged.staged,
|
|
281
|
+
commit_detected=commit_confirmed,
|
|
282
|
+
readback_verified=True,
|
|
283
|
+
reason=decision.reason,
|
|
284
|
+
with_aci=True,
|
|
285
|
+
)
|
|
286
|
+
finally:
|
|
287
|
+
if close_browser:
|
|
288
|
+
browser.close()
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
def format_run_result_json(result: RunResult) -> str:
|
|
292
|
+
return json.dumps(asdict(result), indent=2)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openadapt-kernel
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Minimal commit-boundary verification, macro-action staging, stepwise live-DOM healing, and shadow-to-autopilot kernel for GUI agents
|
|
5
|
+
Project-URL: Homepage, https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel
|
|
6
|
+
Project-URL: Repository, https://github.com/OpenAdaptAI/OpenAdapt/tree/main/packages/kernel
|
|
7
|
+
Project-URL: Documentation, https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/kernel/README.md
|
|
8
|
+
Project-URL: Changelog, https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/kernel/CHANGELOG.md
|
|
9
|
+
Project-URL: Issues, https://github.com/OpenAdaptAI/OpenAdapt/issues
|
|
10
|
+
Author-email: OpenAdapt <admin@openadapt.ai>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: browser-automation,commit-boundary,computer-use,gui-agents,mcp,verification
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: cryptography>=42.0.0
|
|
23
|
+
Provides-Extra: browser
|
|
24
|
+
Requires-Dist: playwright>=1.45.0; extra == 'browser'
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# openadapt-kernel
|
|
32
|
+
|
|
33
|
+
Minimal, self-contained runtime kernel (`< 3,200` LOC, zero `openadapt-flow` dependencies, zero per-app code) implementing commit-boundary verification, cross-rail read-back, reversible occlusion probing, online ACI calibration, macro staging, stepwise live-DOM healing, and shadow-to-autopilot execution:
|
|
34
|
+
|
|
35
|
+
1. **Default-Deny Obligation, Capability, and Saga Ledger (`ledger.py`):** Episodes start `UNVERIFIED` and emit `VERIFIED` only when every obligation has an independent post-commit read-back proof and zero dirty form buffers remain. Step-limit timeouts, crashes, and unverified exits deterministically return `ESCALATED`. Carries both cross-screen `<MANDATORY_CONSTRAINTS>` and `<VERIFIED_CAPABILITIES>` (user consent and SSA opaque-ID provenance), with durable Saga checkpointing across multi-system workflows.
|
|
36
|
+
2. **Wire and DOM-Effect Commit Interceptor (`interceptor.py`):** Detects commits from actual network mutations (`POST`, `PUT`, `PATCH`, `DELETE`) or non-empty dirty form submissions instead of button-label regexes. Excludes search/filter inputs from dirty buffers and escapes escalation payloads safely.
|
|
37
|
+
3. **Full-DOM Macro Staging and Stepwise Live-DOM Healer (`macro.py`):** Extracts all interactive controls across the full scrollable page (`observe_schema`), fills an entire form in one pre-commit batch with SSA provenance enforcement (`stage_form`), and heals drifted UI plans step-by-step against the live mounted DOM (handling modals and dialogs that only exist after earlier clicks).
|
|
38
|
+
4. **Cross-Rail Read-Back Oracles (`oracles.py`):** Independent read-only SQLite queries (`mode=ro`), pure-stdlib PDF content-stream extraction (filtering `3 Tr` / `7 Tr` invisible text), and multi-tab / fresh-reload DOM verification.
|
|
39
|
+
5. **Reversible Pre-Click Probe & Online ACI Calibration (`probe.py`, `aci.py`):** Hit-tests commit controls via `elementsFromPoint` plus an 80ms hover/focus probe to block transparent-overlay click-jacking (`probe_before_click`), and calibrates anomaly thresholds across shifting UI themes via `SessionStartNormalizer` and Gibbs-Candes `OnlineACICalibrator`.
|
|
40
|
+
6. **Shadow-to-Autopilot, 4-Mutant Offline Qualification, Micro-Handoff, Live Runner, and MCP Server (`copilot.py`, `extension_bridge.py`, `runner.py`, `mcp_server.py`, `cli.py`):** Induces zero-PII `PortalPack` specs from live Chrome Co-Pilot `extension_evidence.jsonl` recordings, qualifies verifiers offline against four counterfactual mutants (zero staging DB), runs `Draft-to-Commit` or `Verified Autopilot` across main and child popup windows via Playwright or `--cdp-url`, signs `openadapt.kernel.receipt/v1` Ed25519 receipts, and serves tools over stdio JSON-RPC 2.0 MCP.
|
|
41
|
+
|
|
42
|
+
## CLI Quickstart
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
openadapt-kernel shadow-sync --dir ./recordings --pack-id portal-v1 --out pack.json
|
|
46
|
+
openadapt-kernel qualify --pack pack.json --evidence ./recordings/run_1/extension_evidence.jsonl
|
|
47
|
+
openadapt-kernel keygen --priv priv.pem --pub pub.pem
|
|
48
|
+
openadapt-kernel run --pack pack.json --dossier dossier.json --mode draft --cdp-url http://127.0.0.1:9222
|
|
49
|
+
openadapt-kernel run --pack pack.json --dossier dossier.json --mode autopilot --url https://portal.example --commit-selector '[data-testid="submit-btn"]' --priv priv.pem --receipt-out receipt.json
|
|
50
|
+
openadapt-kernel verify-receipt --receipt receipt.json --pub pub.pem
|
|
51
|
+
openadapt-kernel serve-mcp
|
|
52
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
openadapt_kernel/__init__.py,sha256=al3UK2tKa98NSFKP8OY-o_UnLIDR4r8ZqxuQnp756tg,3469
|
|
2
|
+
openadapt_kernel/aci.py,sha256=BToy8UOalKnyRP6iri2QrCSuJyDeYxwSHwZ-W0L26vQ,2727
|
|
3
|
+
openadapt_kernel/cli.py,sha256=jQBilBsXdNnWYe6KC0f2PS4_DoWuSM7X4U3z2axvBO0,8199
|
|
4
|
+
openadapt_kernel/copilot.py,sha256=2maTmz324CA44naOKk9JjAWDG3efSUKS2fx82VLjIaY,13025
|
|
5
|
+
openadapt_kernel/extension_bridge.py,sha256=-gZ8WRm2FcAJddWfy5Pjimu4FIm-Whk-4HUfpHu5_RM,5114
|
|
6
|
+
openadapt_kernel/fsm.py,sha256=GihnxMbHKQM_ABiDLuEVHFgE8qB6R4ZKksXFU-DYvpE,7820
|
|
7
|
+
openadapt_kernel/interceptor.py,sha256=mry5riAzUJhF4fYlMNg6LBhPyAgiNGjlHBv0LFxnK6E,9986
|
|
8
|
+
openadapt_kernel/ledger.py,sha256=2gySHsmvdlanDFLRYZCGJIe-MnYK_Q6du1a3CESAQVY,13905
|
|
9
|
+
openadapt_kernel/macro.py,sha256=-wwduuKY0cn2yR2q0DgxoSR-uMSe4XSqP-isxo1ckqc,12837
|
|
10
|
+
openadapt_kernel/mcp_server.py,sha256=GKxTf1ZWWk3pKFf_GTcrkDR6469FEorxEriZVsHWdao,8780
|
|
11
|
+
openadapt_kernel/oracles.py,sha256=nIw9ZVaLS692-KYy4dIpw_dbRo3_cckgJSIVHpp0A4k,11923
|
|
12
|
+
openadapt_kernel/probe.py,sha256=bRUXd83EpK-rLuyG63Q3Xvc_1-KibzmrHhoR6yCzlE8,3250
|
|
13
|
+
openadapt_kernel/registry.py,sha256=R-VO0oAcZtTBORFRSmhWDzbUfcOAIE3din_jXBTd8eU,6377
|
|
14
|
+
openadapt_kernel/runner.py,sha256=hoo-VMNUads-jvZ9alUsOulPniKp4LKifnQZdNS4wmg,12887
|
|
15
|
+
openadapt_kernel-0.1.0.dist-info/METADATA,sha256=7AfAIm6hIVYeTyTNt8w9rDQR6EtEgNJCvKuhZtjJsfo,4898
|
|
16
|
+
openadapt_kernel-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
17
|
+
openadapt_kernel-0.1.0.dist-info/entry_points.txt,sha256=b1ueYhk4VURJq4Q246ow1BQPoMORNVWQjkqY5WKIlDE,63
|
|
18
|
+
openadapt_kernel-0.1.0.dist-info/licenses/LICENSE,sha256=CeTKTNzaMOqhqSq-MgQCgC0Y_XCVJWztplTULzC2IZg,1083
|
|
19
|
+
openadapt_kernel-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MLDSAI Inc. (OpenAdapt.AI)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|