Files
plugins/packages/inkstone/icon.svg
T
我是一条没有名字的区 e7004d9354 inkstone 0.1.0: Intern InkStone (书生·端砚) Token Plan, browser sign-in, credit card and ink-* key chat (#775)
New package @magpie-community/opencode-inkstone-auth 0.1.0 for Intern
InkStone (书生·端砚, Shanghai AI Lab) Token Plan, provider id
`intern-inkstone`. Community package by yunwang2442-creator.

What it does:
- Browser sign-in (Edge/Chrome, its own profile under
  $XDG_CONFIG_HOME or ~/.config/magpie/inkstone-browser, or
  %LOCALAPPDATA%\magpie\inkstone-browser). The login window has no
  debugging port. A headless CDP read takes the uaa-token cookie, and the
  same read renews it silently later.
- Usage card: ink-credit balance, 5-hour and 7-day windows, credit packs.
- Chat: a pasted ink-* API key, or one the sign-in creates, named
  ink-<host4>-<acct4>-<rand4> (18 of the console's 20 characters). An
  idempotency clash (-15109) retries with a fresh name, up to three times.
  Pruning is on by default. It only touches this machine's and account's
  prefix, keeps the newest two and the key this sign-in created, and never
  deletes manual keys or keys of unknown age.
- Closing on Unix: SIGTERM, then SIGKILL only after a 15s grace. Leftover
  browsers are matched by --user-data-dir=<escaped profile>, and Windows
  uses .Contains().
- The login wait comes from an injected waitForLogin in tests. No env
  hook is left in production code.
- Hosts: discovery.intern-ai.org.cn, discovery-api.intern-ai.org.cn,
  127.0.0.1 (CDP).

Outside the package: scripts/opencode2.mjs lets a prompt with
`required: false` stay optional (`p.required !== false`). Every package's
copy is synced byte for byte, so all 39 copies in the merged tree are blob
afe074cb. No other package sets `required: false` on a prompt, so this
changes nothing for them. Also a root README row and a registry entry.

Review at 36412a15, on mote, HOME=$(mktemp -d), Bun 1.4.2:
- bun test packages/inkstone: 68 pass, 0 fail in Asia/Shanghai, UTC,
  America/Los_Angeles and Pacific/Kiritimati.
- bun scripts/check.mjs inkstone and bun scripts/check.mjs: ok.
- bun test (repo), on 36412a15 merged with origin/main e7cb9dc5:
  6743 pass, 20 skip, 0 fail. main has since moved by cline 0.1.14 and
  zcode 0.1.55 only, and none of the adapter copies changed.
- Broken by hand, each red: no protectName protection; prune_keys default
  off; no post-sign-in prune; no SIGTERM on close; the -15109 retry keeping
  its name.

Not tried: a real InkStone account sign-in on macOS, Linux or Windows (no
account here); a live chat request; magpie end to end with the plugin.
2026-11-07 15:07:06 +08:00

13 lines
11 KiB
XML

<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- Intern InkStone (书生·端砚) icon: the site's own tab logo, taken verbatim
from https://static.intern-ai.org.cn/platform-config-upload/discoverypublic/tab_logo_1789096347416.svg
A 32x32 square: the ink-stone mark in #183889 on a white rounded tile,
so it stays legible in both magpie themes. The wide wordmark
(intern-discovery-logo.svg, 115x32) is unreadable at icon sizes. -->
<rect width="32" height="32" rx="5.11435" fill="white"/>
<path d="M12.3554 18.2888C13.0662 18.2888 13.6424 18.8652 13.6424 19.576V21.27C13.6424 21.9809 13.0662 22.5572 12.3554 22.5573C11.6445 22.5573 11.0681 21.9809 11.0681 21.27V19.576C11.0681 18.8651 11.6445 18.2888 12.3554 18.2888Z" fill="#183889"/>
<path d="M20.6293 18.2888C21.3402 18.2888 21.9166 18.8652 21.9166 19.576V21.27C21.9166 21.9809 21.3402 22.5572 20.6293 22.5573C19.9184 22.5573 19.3421 21.9809 19.3421 21.27V19.576C19.3421 18.8651 19.9184 18.2888 20.6293 18.2888Z" fill="#183889"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.201 7.75181C11.31 7.70875 11.4209 7.66706 11.5338 7.62681C11.6503 7.58525 11.769 7.54522 11.8898 7.50676C12.1314 7.42982 12.3815 7.35925 12.6403 7.2953C12.7697 7.26333 12.9013 7.233 13.0351 7.20442C13.102 7.19013 13.1694 7.17643 13.2374 7.16301C13.4414 7.12275 13.6504 7.08639 13.8645 7.05415C14.0073 7.03266 14.1523 7.01285 14.2997 6.99504C14.7417 6.94161 15.2045 6.90518 15.689 6.88671C15.9312 6.87747 16.1788 6.87265 16.4319 6.87264C16.6241 6.87264 16.813 6.87563 16.9989 6.88098C17.138 6.88498 17.2754 6.8902 17.4111 6.89712C17.618 6.90768 17.8208 6.92187 18.0197 6.93905C18.1261 6.94824 18.2314 6.95796 18.3356 6.969C18.4513 6.98127 18.5656 6.99512 18.6786 7.00962C18.7122 7.01394 18.7457 7.01787 18.7791 7.02238C18.7961 7.02468 18.8129 7.02733 18.8299 7.02968C18.9586 7.04752 19.0855 7.0665 19.2106 7.08723C19.3134 7.10426 19.4149 7.12272 19.5153 7.14165C19.6186 7.16113 19.7207 7.18114 19.8215 7.20259C19.8402 7.20658 19.8589 7.21078 19.8775 7.21483C19.9917 7.23966 20.1043 7.26565 20.2153 7.29296C20.2383 7.29862 20.2612 7.30464 20.284 7.3104C20.3256 7.3209 20.3671 7.33134 20.4082 7.34218C20.4396 7.35042 20.4707 7.35899 20.5017 7.36744C20.5306 7.37529 20.5595 7.38284 20.5882 7.39087C20.6336 7.4036 20.6787 7.41678 20.7236 7.42994C20.7399 7.4347 20.7561 7.43944 20.7723 7.44426C20.8187 7.45808 20.8648 7.47243 20.9106 7.48671C20.9247 7.49112 20.9389 7.49528 20.953 7.49973C21.0018 7.51511 21.0501 7.53097 21.0981 7.54686C21.1093 7.55057 21.1205 7.55407 21.1317 7.5578C21.1695 7.57045 21.2071 7.58338 21.2444 7.59634C21.2679 7.60448 21.2914 7.6123 21.3148 7.62056C21.3561 7.63521 21.3971 7.65032 21.4379 7.66535C21.4524 7.67066 21.4668 7.67588 21.4812 7.68124C21.5149 7.69382 21.5483 7.70694 21.5817 7.71978C21.6094 7.73044 21.637 7.74098 21.6645 7.75181C21.6838 7.75945 21.7031 7.76727 21.7223 7.77499C21.7584 7.78949 21.7944 7.80393 21.8301 7.81874C21.8529 7.82818 21.8755 7.83782 21.8981 7.84738C21.9302 7.86097 21.9622 7.87444 21.9939 7.88827C22.0189 7.89915 22.0436 7.91031 22.0684 7.92134C22.095 7.93319 22.1215 7.945 22.1478 7.95702C22.1772 7.97044 22.2065 7.98401 22.2356 7.99764C22.2612 8.00965 22.2868 8.02168 22.3122 8.03384C22.3368 8.04563 22.3612 8.05758 22.3856 8.06952C22.4113 8.08211 22.4369 8.09478 22.4624 8.10754C22.4876 8.12014 22.5125 8.13306 22.5374 8.14582C22.5647 8.15978 22.5919 8.17359 22.6189 8.18775C22.6473 8.20265 22.6755 8.21794 22.7036 8.23306C22.7218 8.24288 22.7401 8.25258 22.7582 8.26249C22.7862 8.27775 22.814 8.29311 22.8416 8.30858C22.8679 8.32334 22.8942 8.33817 22.9202 8.35311C22.9316 8.35966 22.943 8.36632 22.9543 8.3729C22.9882 8.39253 23.022 8.41208 23.0554 8.43202C23.0782 8.44562 23.1008 8.45942 23.1233 8.47317C23.1499 8.48932 23.1763 8.50551 23.2025 8.52186C23.2148 8.52953 23.227 8.53733 23.2392 8.54504C23.2702 8.56454 23.3009 8.58412 23.3314 8.60389C23.3519 8.61718 23.3723 8.63059 23.3926 8.644C23.4208 8.6626 23.4489 8.68115 23.4767 8.69999C23.4916 8.71004 23.5063 8.72033 23.521 8.73046C23.5479 8.74889 23.5747 8.76727 23.6012 8.78593C23.6225 8.80092 23.6437 8.81611 23.6648 8.83124C23.6876 8.84761 23.7104 8.86393 23.733 8.88046C23.7499 8.89286 23.7667 8.90546 23.7835 8.91796C23.8091 8.93698 23.8346 8.95602 23.8598 8.97525C23.8784 8.98941 23.8969 9.00369 23.9153 9.01796C23.9375 9.03518 23.9597 9.0524 23.9817 9.06978C23.9998 9.08413 24.0179 9.09855 24.0358 9.11301C24.0595 9.13204 24.0831 9.15109 24.1064 9.1703C24.1217 9.18289 24.1368 9.19566 24.152 9.20832C24.1773 9.22941 24.2024 9.25057 24.2273 9.27186C24.2414 9.28396 24.2554 9.29616 24.2694 9.30832C24.2922 9.32807 24.3149 9.34778 24.3374 9.3677C24.3563 9.38448 24.3752 9.40131 24.3939 9.41822C24.4123 9.4348 24.4305 9.45152 24.4486 9.46822C24.4696 9.4875 24.4904 9.50685 24.5111 9.52629C24.5267 9.54094 24.5423 9.55557 24.5577 9.5703C24.5775 9.58915 24.5971 9.60809 24.6166 9.62707C24.6353 9.64525 24.6539 9.66345 24.6723 9.68176C24.6874 9.69678 24.7024 9.71197 24.7174 9.72707C24.7364 9.74627 24.7556 9.76529 24.7744 9.78462C24.7924 9.80309 24.81 9.82177 24.8278 9.84035C24.8456 9.85899 24.8633 9.87759 24.8809 9.89634C24.8931 9.9094 24.9052 9.92255 24.9174 9.93567C24.9417 9.96202 24.9658 9.98851 24.9898 10.0151C24.9958 10.0219 25.0019 10.0286 25.008 10.0354C25.0334 10.0638 25.0586 10.0924 25.0835 10.1211C25.0927 10.1316 25.1017 10.1423 25.1108 10.1529C25.1337 10.1794 25.1564 10.2058 25.1788 10.2325C25.1907 10.2467 25.2025 10.261 25.2142 10.2752C25.2316 10.2963 25.2489 10.3174 25.2661 10.3385C25.3149 10.3988 25.3625 10.4596 25.4093 10.5208C25.4208 10.5358 25.4323 10.5508 25.4437 10.5659C25.4567 10.5832 25.4696 10.6006 25.4825 10.618C25.4974 10.6381 25.5123 10.6582 25.527 10.6784C25.5437 10.7014 25.5603 10.7245 25.5767 10.7476C25.5907 10.7672 25.6046 10.7868 25.6184 10.8065C25.6293 10.8222 25.6401 10.8379 25.651 10.8536C25.6678 10.8781 25.6846 10.9027 25.7012 10.9273C25.7133 10.9453 25.7252 10.9634 25.7372 10.9815C25.7493 10.9998 25.7616 11.018 25.7736 11.0364C25.7883 11.0589 25.8027 11.0816 25.8171 11.1042C25.83 11.1243 25.8427 11.1446 25.8554 11.1648C25.8676 11.1844 25.8798 11.204 25.8918 11.2237C25.9037 11.2429 25.9156 11.2622 25.9273 11.2815C25.9376 11.2986 25.9478 11.3157 25.958 11.3328C25.997 11.3984 26.0352 11.4644 26.0723 11.5307C26.0831 11.5501 26.0939 11.5694 26.1046 11.5888C26.1178 11.6129 26.1309 11.637 26.1439 11.6612C26.1518 11.6758 26.1596 11.6905 26.1674 11.7052C26.2029 11.7722 26.2375 11.8396 26.2713 11.9073C26.2835 11.9319 26.2957 11.9565 26.3077 11.9812C26.3147 11.9956 26.3217 12.0099 26.3286 12.0242C26.3391 12.0461 26.3494 12.0681 26.3598 12.0901C26.3718 12.1156 26.384 12.1411 26.3957 12.1667C26.403 12.1824 26.4102 12.1982 26.4174 12.2141C26.4291 12.24 26.4407 12.2661 26.4523 12.2922C26.4607 12.3113 26.4692 12.3305 26.4775 12.3497C26.4874 12.3724 26.4973 12.395 26.5069 12.4177C26.5142 12.4348 26.5214 12.4519 26.5286 12.469C26.5367 12.4885 26.5445 12.5081 26.5525 12.5276C26.5804 12.5955 26.6073 12.6637 26.6335 12.732C26.653 12.7827 26.6717 12.8335 26.6903 12.8844C26.7038 12.9214 26.7176 12.9582 26.7306 12.9953C26.7468 13.0413 26.762 13.0875 26.7775 13.1336C26.792 13.1767 26.8066 13.2198 26.8205 13.263C26.8317 13.2981 26.8424 13.3333 26.8533 13.3685C26.8696 13.4212 26.886 13.4739 26.9015 13.5268C26.9152 13.574 26.9282 13.6212 26.9413 13.6685C26.9522 13.708 26.9631 13.7474 26.9736 13.787C26.9875 13.8396 27.0006 13.8923 27.0137 13.945C27.0222 13.9793 27.0311 14.0134 27.0392 14.0476C27.0529 14.1051 27.0658 14.1627 27.0786 14.2203C27.0855 14.2517 27.0927 14.2831 27.0994 14.3146C27.1118 14.3728 27.1234 14.4311 27.1348 14.4893C27.141 14.5209 27.1474 14.5525 27.1533 14.5841C27.1623 14.6319 27.1705 14.6798 27.1788 14.7276C27.1859 14.7678 27.1933 14.8079 27.1999 14.8482C27.2088 14.9024 27.2168 14.9567 27.2249 15.0109C27.23 15.0448 27.2352 15.0786 27.24 15.1125C27.2477 15.1669 27.2547 15.2212 27.2616 15.2755C27.2663 15.3123 27.2711 15.349 27.2754 15.3857C27.2931 15.5352 27.308 15.6842 27.3202 15.8325C27.3222 15.8569 27.3244 15.8812 27.3262 15.9055C27.33 15.9555 27.3331 16.0054 27.3364 16.0552C27.3388 16.0924 27.3413 16.1296 27.3434 16.1667C27.3466 16.2229 27.3488 16.2791 27.3512 16.3351C27.3526 16.3673 27.3545 16.3994 27.3556 16.4315C27.3576 16.485 27.3588 16.5384 27.3601 16.5917C27.3608 16.6228 27.3619 16.6539 27.3624 16.6849C27.3809 17.7964 27.2589 18.839 27.0653 19.706C28.1653 20.006 29.8946 20.9596 29.0986 23.4393L29.0648 23.5396C28.3362 25.6283 26.1726 26.5356 24.5319 26.306C23.743 27.5949 21.0185 30.1726 16.4319 30.1726L16.2181 30.1708C11.7579 30.0924 9.01896 27.5747 8.19861 26.306C7.12667 26.3934 4.78631 25.9598 3.87413 23.5552L3.83194 23.4393C2.95202 20.9327 4.79859 19.906 5.83194 19.706C5.78663 19.5055 5.74508 19.2956 5.70824 19.0776C5.65912 18.7869 5.61845 18.4819 5.58793 18.1656C5.56505 17.9284 5.54783 17.6849 5.53741 17.4364C5.52351 17.1051 5.52144 16.7649 5.53324 16.419C5.54505 16.073 5.57085 15.7213 5.61241 15.3669C5.65396 15.0127 5.71129 14.6558 5.78663 14.2995C5.80547 14.2104 5.82541 14.1213 5.84653 14.0323C5.88875 13.8543 5.93572 13.6767 5.98741 13.4997C6.01325 13.4113 6.0401 13.3229 6.0684 13.2349C6.13917 13.0147 6.21775 12.796 6.3046 12.5794C6.32194 12.5362 6.33971 12.4931 6.35772 12.45C6.39379 12.3637 6.43118 12.2779 6.46996 12.1924C6.48937 12.1497 6.50924 12.1071 6.52934 12.0646C6.56949 11.9796 6.61086 11.895 6.65382 11.8109C6.67532 11.7689 6.69723 11.727 6.71944 11.6851C6.80823 11.5181 6.90277 11.3531 7.0033 11.1906C7.02846 11.1499 7.05394 11.1094 7.07986 11.069C7.13163 10.9884 7.18493 10.9084 7.23975 10.8292C7.27474 10.7786 7.31053 10.7284 7.34679 10.6784L2.69861 11.5393L3.83194 7.80598L8.73533 9.19374C8.77149 9.16366 8.80781 9.13354 8.8447 9.10389L6.99861 7.80598L9.36528 5.03931L11.201 7.75181ZM22.9653 13.206C20.1319 12.1393 18.4319 14.306 16.4319 14.106C14.4319 13.906 12.9653 12.306 10.0319 13.206C7.09861 14.106 7.33194 17.8726 7.66528 19.706C7.93194 21.1726 8.23194 23.306 8.23194 23.306C7.77825 23.3154 6.82327 22.8069 6.15408 20.8656L6.05981 20.8841C5.73434 20.9471 5.30208 21.147 5.04757 21.462C4.85856 21.6959 4.64504 22.1334 4.96397 23.0419C5.58922 24.8229 7.29562 25.1756 8.10095 25.1099L8.81632 25.0516L9.20616 25.6544C9.84856 26.648 12.3051 28.9726 16.4319 28.9726C20.5538 28.9726 22.9117 26.654 23.5082 25.6794L23.9189 25.0086L24.6981 25.1177C25.89 25.2846 27.471 24.5829 27.9559 23.0726C28.249 22.1596 28.0397 21.7342 27.8569 21.5065C27.611 21.2002 27.181 20.9815 26.7494 20.8638L26.6994 20.85C26.2731 21.9641 25.5819 23.2094 24.7319 23.306C24.7319 23.306 25.0186 21.6526 25.2319 19.706C25.4986 17.2726 25.7986 14.2726 22.9653 13.206Z" fill="#183889"/>
<path d="M16.515 1.82733C19.2302 1.82735 21.4314 3.76745 21.4314 6.16067C21.4314 6.40165 21.4085 6.63794 21.3655 6.86822C20.4859 6.3379 18.6444 5.97265 16.515 5.97264C14.3855 5.97264 12.5439 6.33786 11.6642 6.86822C11.6213 6.63795 11.5986 6.40164 11.5986 6.16067C11.5986 3.76743 13.7998 1.82733 16.515 1.82733Z" fill="#183889"/>
</svg>