Adds packages/atomcode (@magpie-community/opencode-atomcode-auth 0.3.0), an AtomGit CodingPlan provider: browser OAuth and AtomCode CLI sign-in (~/.atomcode/auth.toml), signed requests to AtomGit's own gateway, per-account models and quota, daily claim, a loopback-only diagnostics page, and OpenCode 1.x/2.x entries. Registry and README entries added. By LILEOO.
Reviewed at c57b099fff4689c0198c1c6414f04b27614b4092. The last blocking point (an inline TOML comment on a known line went into the uid and was written back) is fixed: values end at an unquoted #, quoted/escaped/literal strings keep their #, and a rewritten line keeps its comment.
Run on a separate test machine (Bun 1.4.2, sandbox HOME):
- PR head merged onto origin/main 24da52b8: bun scripts/check.mjs exit 0 (atomcode ok); whole-repo bun test 6103 pass, 0 fail. origin/main alone: 5942 pass, 0 fail.
- packages/atomcode at the head: bun test 161 pass; node --test test/*.test.mjs 161 pass.
- The new auth-file test against 55ff272's auth-file.mjs: red (1 fail), green at the head.
- Probe: the review's file (id = "123456" # c) parses to uid 123456 and renders back as id = "123456" # c; also #c with no space, CRLF with a tab before #, "1#2", and a literal-string id all round-trip to the same uid. At 55ff272 each gave a uid with the comment in it.
Not tried: a real AtomGit account. A [user] header with a trailing comment is refused ("no user id"), not corrupted; the CLI never writes one. First npm version needs an owner publish; until then magpie installs it from the dist branch.
52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>AtomCode 诊断</title>
|
|
<style>
|
|
:root { color-scheme: light dark; }
|
|
html, body { margin: 0; min-height: 100%; }
|
|
body {
|
|
display: grid;
|
|
place-items: center;
|
|
font: 14px/1.55 var(--magpie-font, "Avenir Next", "Segoe UI", sans-serif);
|
|
background:
|
|
radial-gradient(circle at 20% 10%, color-mix(in srgb, AccentColor 15%, transparent), transparent 42%),
|
|
var(--magpie-bg, Canvas);
|
|
color: var(--magpie-fg, CanvasText);
|
|
}
|
|
.box {
|
|
width: min(520px, calc(100vw - 40px));
|
|
padding: 34px;
|
|
border: 1px solid color-mix(in srgb, CanvasText 18%, transparent);
|
|
border-radius: 22px;
|
|
background: color-mix(in srgb, Canvas 88%, transparent);
|
|
box-shadow: 0 24px 70px rgb(0 0 0 / .16);
|
|
}
|
|
.mark { width: 44px; height: 44px; margin-bottom: 18px; }
|
|
h1 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.02em; }
|
|
p { margin: 0; color: var(--magpie-muted, GrayText); }
|
|
button {
|
|
margin-top: 20px;
|
|
padding: 8px 16px;
|
|
border: 1px solid color-mix(in srgb, CanvasText 24%, transparent);
|
|
border-radius: 999px;
|
|
background: Canvas;
|
|
color: CanvasText;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main class="box">
|
|
<img class="mark" src="icon.svg" alt="">
|
|
<h1>AtomCode 诊断</h1>
|
|
<p id="said" role="status" aria-live="polite">正在连接本机只读诊断服务…</p>
|
|
</main>
|
|
<script src="_magpie/bridge.js"></script>
|
|
<script src="boot.js"></script>
|
|
</body>
|
|
</html>
|