@leonidstern/labit 0.6.3-main.13 → 0.6.3-main.14
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +1 -0
- package/LICENSE +73 -21
- package/README.md +6 -2
- package/package.json +2 -2
- package/public/_lab/comments.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@ Versions follow [semver](https://semver.org). Before 1.0, a minor version can ch
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
- License: from the next release labit is under [PolyForm Perimeter 1.0.0](LICENSE) instead of MIT. Use and change it freely, except to build a competing product. Versions already on npm (0.6.2 and earlier) keep MIT.
|
|
7
8
|
- Phone links with two labs on one computer: each lab keeps its own pass (`lab_guest_<port>`), so joining a try lab no longer logs the phone out of the other, and a used link again takes that phone to its page instead of "used up".
|
|
8
9
|
- Hosted labs sync: each page's comments have a revision (`lab:rev:<page>` in Redis, counted up by every comment, reply, resolve, move and delete). An open page asks for it every 10 s (`GET ?page=…&rev`, a few bytes) and reloads the comments only when it moved, so someone else's reply shows within seconds instead of on your next visit. Hidden tabs don't ask; local labs keep their live stream.
|
|
9
10
|
- With a dev server (`--proxy`), its reload waits while the chat, a thread, the list or a new comment is open, not only while words are typed, so an update no longer closes the chat under you. It comes in once you close it, as the lab's own reload already did.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Required Notice: Copyright 2026 Leonid Stern (https://github.com/leonidstern/labit)
|
|
2
|
+
|
|
3
|
+
# PolyForm Perimeter License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/perimeter/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncompete
|
|
34
|
+
|
|
35
|
+
Any purpose is a permitted purpose, except for providing to others any product that competes with the software.
|
|
36
|
+
|
|
37
|
+
## Competition
|
|
38
|
+
|
|
39
|
+
If you use this software to market a product as a substitute for the functionality or value of the software, it competes with the software. A product may compete regardless how it is designed or deployed. For example, a product may compete even if it provides its functionality via any kind of interface (including services, libraries or plug-ins), even if it is ported to a different platforms or programming languages, and even if it is provided free of charge.
|
|
40
|
+
|
|
41
|
+
## Fair Use
|
|
42
|
+
|
|
43
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
44
|
+
|
|
45
|
+
## No Other Rights
|
|
46
|
+
|
|
47
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
48
|
+
|
|
49
|
+
## Patent Defense
|
|
50
|
+
|
|
51
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
52
|
+
|
|
53
|
+
## Violations
|
|
54
|
+
|
|
55
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
56
|
+
|
|
57
|
+
## No Liability
|
|
58
|
+
|
|
59
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
60
|
+
|
|
61
|
+
## Definitions
|
|
62
|
+
|
|
63
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
64
|
+
|
|
65
|
+
A **product** can be a good or service, or a combination of them.
|
|
66
|
+
|
|
67
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<h1><picture><source media="(prefers-color-scheme: dark)" srcset="docs/labit-mark-dark.svg"><img src="docs/labit-mark-light.svg" alt="" width="34" height="34" align="top"></picture> labit</h1>
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@leonidstern/labit) [](https://github.com/leonidstern/labit/actions/workflows/test.yml) [](https://www.npmjs.com/package/@leonidstern/labit) [](https://github.com/leonidstern/labit/actions/workflows/test.yml) [](LICENSE)
|
|
4
4
|
|
|
5
5
|
**Review is the new build.** Pin comments on your pages. Your coding agent reads them, changes the code, and answers on the pin.
|
|
6
6
|
|
|
@@ -51,4 +51,8 @@ Everything merged to main, before it is released: `npx @leonidstern/labit@next`.
|
|
|
51
51
|
|
|
52
52
|
Shared labs on a domain (comments from people you send a link to) come later.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
[PolyForm Perimeter 1.0.0](LICENSE). You can use labit, change it, and ship it inside your own work, for free and for any purpose, except to offer a product that competes with labit. That makes labit source-available, not OSI open source. Versions already on npm (0.6.2 and earlier) stay under MIT.
|
|
57
|
+
|
|
58
|
+
Made by [leonidstern](https://github.com/LeonidStern) · [OOZE](https://ooze.design)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leonidstern/labit",
|
|
3
|
-
"version": "0.6.3-main.
|
|
3
|
+
"version": "0.6.3-main.14",
|
|
4
4
|
"description": "Pin comments on pages, read by your agent as plain text. Local mode: comment on pages on your computer and Claude answers on the pins.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"homepage": "https://github.com/leonidstern/labit#readme",
|
|
44
44
|
"bugs": "https://github.com/leonidstern/labit/issues",
|
|
45
45
|
"author": "leonidstern (https://github.com/LeonidStern)",
|
|
46
|
-
"license": "
|
|
46
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
}
|
package/public/_lab/comments.js
CHANGED
|
@@ -13,7 +13,7 @@ ${l}`:n.push({text:l,gap:a>0&&p===0||!!i})})}return n.map(a=>{let o=Me("span",{c
|
|
|
13
13
|
`)!==N(document).join(`
|
|
14
14
|
`))return l();let B=null;for(let ee of[Math.min(innerHeight/3,240),innerHeight/2,80]){let V=document.elementFromPoint(innerWidth/2,ee);if(V&&V!==document.body&&V!==document.documentElement&&!H.host.contains(V)&&V!==H.host){B=V;break}}let Y=B?.getBoundingClientRect().top,ce=()=>{W.title!==H.tabTitle.base&&(H.tabTitle.base=W.title,document.title=W.title,H.drawList());let ee=$(),V=[...document.head.querySelectorAll("style")].filter(re=>!ee.has(re)),pe=[...W.head.querySelectorAll("style")];pe.forEach((re,tt)=>V[tt]?V[tt].textContent!==re.textContent&&(V[tt].textContent=re.textContent):document.head.append(document.importNode(re,!0)));for(let re of V.slice(pe.length))re.remove();if(R(document.body,W.body),B?.isConnected){let re=B.getBoundingClientRect().top-Y;Math.abs(re)>1&&scrollBy(0,re)}H.reflow()},j=()=>{try{ce()}catch{l()}};document.startViewTransition&&!H.still.matches?document.startViewTransition(j):j()}catch{l()}},ie=x=>{let O=W=>x.filter(B=>B.kind===W).map(B=>B.path),P=decodeURIComponent(location.pathname).replace(/\/$/,"/index").replace(/\.html?$/i,"");O("html").some(W=>!W||W.replace(/\.html?$/i,"")===P)&&I(),O("css").length&&v(O("css")),O("img").length&&S(O("img")),O("font").length&&E(O("font"))},ae=Math.random().toString(36).slice(2,12),U="BroadcastChannel"in window?new BroadcastChannel("labit-live"):null,xe=!!(U&&navigator.locks),ye=!xe,he=null,We=null,Oe=x=>{w=Date.now(),We=x,Fe(x)};U&&(U.onmessage=({data:x})=>{x.t==="hello"&&c&&We&&U.postMessage({t:"state",v:We}),!c&&(x.t==="state"&&Oe(x.v),x.t==="beat"&&(w=Date.now()),x.t==="down"&&f("reconnecting"))});let _e=()=>{c||(c=new EventSource(`${H.script.dataset.live}?tab=${ae}`),w=Date.now(),c.addEventListener("beat",()=>{w=Date.now(),ye&&U?.postMessage({t:"beat"})}),c.onerror=()=>{f("reconnecting"),ye&&U?.postMessage({t:"down"})},c.onmessage=x=>{let O=JSON.parse(x.data);Oe(O),ye&&U?.postMessage({t:"state",v:O})})},Ne=()=>navigator.locks.request("labit-live",()=>new Promise(x=>{he=x,ye=!0,_e()}));document.addEventListener("visibilitychange",()=>{if(!document.hidden){if(o)return l();Ye()}}),addEventListener("pagehide",()=>{c?.close(),c=null,he?.(),he=null,ye=!xe,fetch(H.script.dataset.live.replace(/live$/,"bye"),{method:"POST",keepalive:!0,headers:{"content-type":"application/json"},body:JSON.stringify({tab:ae})}).catch(()=>{})}),addEventListener("pageshow",x=>x.persisted&&je());let et=Date.now(),Zt=()=>{c?.close(),c=null,f("reconnecting"),_e()},Ye=(x=!1)=>{let O=Date.now()-w>4e4;c&&(x||O)?Zt():!c&&O?_e():!c&&x&&U?.postMessage({t:"hello"})};setInterval(()=>{let x=Date.now(),O=x-et>2e4;et=x,document.hidden||Ye(O)},5e3),addEventListener("online",()=>!document.hidden&&Ye(!0));let je=()=>{if(!xe)return _e();w=Date.now(),Ne(),U.postMessage({t:"hello"})};je()}}/*!
|
|
15
15
|
* lab comments: anyone with the link clicks anywhere on a lab page to pin a comment. No login, just a name.
|
|
16
|
-
* https://github.com/leonidstern/labit ·
|
|
16
|
+
* https://github.com/leonidstern/labit · PolyForm Perimeter 1.0.0
|
|
17
17
|
* Comments are off by default; the bar button or c turns them on (remembered per browser). When on, click anywhere that isn't a link or control to pin one (alt/option-click pins on those too). c (or the bar button) hides
|
|
18
18
|
* and shows them; esc or a click outside closes an open comment. Dragging (mouse/pen) marks an area instead of a point.
|
|
19
19
|
* Include on a page served through your lab domain:
|