@sifr-dev/loom 0.0.0-stage → 1.0.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/CHANGELOG.md +112 -0
- package/LICENSE +21 -0
- package/README.ar.md +253 -0
- package/README.md +262 -2
- package/dist/browser.js +2717 -0
- package/dist/cli.js +15 -0
- package/dist/index.js +4854 -0
- package/dist/types/args.d.ts +14 -0
- package/dist/types/base64.d.ts +9 -0
- package/dist/types/browser.d.ts +57 -0
- package/dist/types/canonical.d.ts +20 -0
- package/dist/types/cli.d.ts +12 -0
- package/dist/types/commands/context.d.ts +30 -0
- package/dist/types/commands/diff.d.ts +18 -0
- package/dist/types/commands/doctor.d.ts +19 -0
- package/dist/types/commands/export.d.ts +30 -0
- package/dist/types/commands/migrate.d.ts +9 -0
- package/dist/types/commands/serve.d.ts +18 -0
- package/dist/types/commands/snapshot.d.ts +15 -0
- package/dist/types/commands/sync.d.ts +17 -0
- package/dist/types/commands/verify.d.ts +9 -0
- package/dist/types/commands/watch.d.ts +25 -0
- package/dist/types/compute.d.ts +49 -0
- package/dist/types/concurrency.d.ts +31 -0
- package/dist/types/config.d.ts +132 -0
- package/dist/types/diff.d.ts +57 -0
- package/dist/types/digest.d.ts +11 -0
- package/dist/types/entities.d.ts +27 -0
- package/dist/types/errors.d.ts +37 -0
- package/dist/types/fs.d.ts +23 -0
- package/dist/types/github/cache.d.ts +44 -0
- package/dist/types/github/client.d.ts +91 -0
- package/dist/types/github/collect.d.ts +36 -0
- package/dist/types/github/discovery.d.ts +39 -0
- package/dist/types/github/fixture.d.ts +26 -0
- package/dist/types/github/guard.d.ts +14 -0
- package/dist/types/github/memory-cache.d.ts +34 -0
- package/dist/types/index.d.ts +44 -0
- package/dist/types/log.d.ts +16 -0
- package/dist/types/metrics.d.ts +21 -0
- package/dist/types/migrate.d.ts +24 -0
- package/dist/types/pipeline.d.ts +73 -0
- package/dist/types/queue.d.ts +33 -0
- package/dist/types/sdk.d.ts +165 -0
- package/dist/types/secrets.d.ts +28 -0
- package/dist/types/serve-handler.d.ts +46 -0
- package/dist/types/sha256.d.ts +13 -0
- package/dist/types/site-module.d.ts +23 -0
- package/dist/types/site.d.ts +135 -0
- package/dist/types/snapshot.d.ts +16 -0
- package/dist/types/store.d.ts +119 -0
- package/dist/types/triggers.d.ts +67 -0
- package/dist/types/types.d.ts +176 -0
- package/dist/types/version.d.ts +7 -0
- package/dist/types/webhook/delivery.d.ts +45 -0
- package/dist/types/webhook/receiver.d.ts +46 -0
- package/dist/types/webhook/signature.d.ts +43 -0
- package/docs/CONFIGURATION.md +213 -0
- package/docs/DEPLOYMENT.md +316 -0
- package/docs/SDK.md +351 -0
- package/docs/SITE_CONTRACT.md +318 -0
- package/docs/VERIFICATION.md +130 -0
- package/package.json +83 -4
- package/schema/site@1.json +188 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes are recorded here. The version is the `package.json` and
|
|
4
|
+
`loom --version` value; a release tag must match it.
|
|
5
|
+
|
|
6
|
+
## [1.0.0] - 2026-12-02
|
|
7
|
+
|
|
8
|
+
The first release with a stability promise. The exported names and the
|
|
9
|
+
`loom/site@1` record shape are frozen; adding a field to the record or a new
|
|
10
|
+
export is a minor change, and removing or renaming either is a major one.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `@sifr-dev/loom/browser`, an entry with no `node:` builtin, no Bun global and
|
|
15
|
+
no `Buffer` or `process` access, so a website can read public GitHub state and
|
|
16
|
+
derive the record in the page, a worker or an edge function.
|
|
17
|
+
- `collectSite(config, options)`, one call that validates a config, reads the
|
|
18
|
+
source, and returns the record without a store.
|
|
19
|
+
- A dependency-free SHA-256 for every digest, checked against `node:crypto`.
|
|
20
|
+
- Schema tests that validate real `loom export` output against the shipped
|
|
21
|
+
`schema/site@1.json`.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The SDK runs on Node 20 and newer as well as Bun. Only the CLI needs Bun.
|
|
26
|
+
- The config existence check resolves per runtime instead of assuming Bun.
|
|
27
|
+
- `compute.ts` holds the store-free read; `pipeline.ts` keeps its signature.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Share and export paths print relative to the working directory.
|
|
32
|
+
|
|
33
|
+
## [0.3.0] - 2026-11-30
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- `ownerAliases`: account-rename canonicalisation applied before every request.
|
|
38
|
+
A renamed owner (explicit alias or a redirect) moves all entity ids in one
|
|
39
|
+
`updated` event with `previousId`, rewrites project/owner/links, and records
|
|
40
|
+
`ownerAliases` in `loom/site@1`. `discovery.owners: ["me"]` resolves the
|
|
41
|
+
authenticated login via `GET /user`; doctor fails on alias cycles.
|
|
42
|
+
- `loom export --format ts --package none` emits a self-contained module with
|
|
43
|
+
local `SiteProject`/`SiteRecord` types, so the deployed site needs no SDK
|
|
44
|
+
install. Package-import mode remains the default.
|
|
45
|
+
- Public TypeScript SDK: `Loom` class (`open`, `attach`, `sync`, `snapshot`,
|
|
46
|
+
`diff`, `siteRecord`, `siteModule`, `discover`, `subscribe`, `use`,
|
|
47
|
+
`verifyWebhook`, `receiver`, `close`/`drain`), plus `createLoom` and
|
|
48
|
+
`createGitHubClient`. Exported from `src/index.ts` with generated `.d.ts`.
|
|
49
|
+
- Plugin hooks (`onSnapshot`, `onDiff`, `onDeploy`, `onError`), lifecycle
|
|
50
|
+
events, and an abort/drain shutdown contract. The CLI `sync` command is now a
|
|
51
|
+
thin `Loom.attach(...).sync()` consumer.
|
|
52
|
+
- Opt-in, bounded `collect` sources: README state with excerpt, branch heads
|
|
53
|
+
(default plus `extraBranches`), commit comments, issue/PR comments, workflow
|
|
54
|
+
definitions, and latest CI run. Each has its own limit.
|
|
55
|
+
- Precise per-entity diffs for `readme`, `branch`, `commit-comment`,
|
|
56
|
+
`issue-comment`, `workflow`, and `ci`; alias rewrite covers every id kind.
|
|
57
|
+
- `loom export --format ts` renders a deterministic typed projects module with
|
|
58
|
+
`PROJECTS`, `CURATED`, `ProjectId`, and `enrich()`; `--curated` merges a
|
|
59
|
+
site-owned enrichment file; `--check` gates the module too.
|
|
60
|
+
- `docs/SDK.md`, `examples/consumer.ts`, PAT-scope and polled-vs-webhook
|
|
61
|
+
guidance, and SQL-free publish metadata (`exports`, `types`, provenance).
|
|
62
|
+
- TypeScript declaration build (`tsconfig.build.json` → `dist/types`).
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- Package version and description now reflect the framework/SDK role.
|
|
67
|
+
- `SnapshotStats` counts readmes, branches, comments, and workflows.
|
|
68
|
+
- Publishing runs `npm publish --provenance` with `access: public`.
|
|
69
|
+
|
|
70
|
+
## [0.2.0] - 2026-11-30
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- `loom export`: deterministic `loom/site@1` site-consumer record, with
|
|
75
|
+
`--check` for deploy gating. Documented in `docs/SITE_CONTRACT.md`.
|
|
76
|
+
- `discovery.owners`: paginated public-owner discovery with deterministic
|
|
77
|
+
archived/fork/include/exclude policy and fail-closed listing errors. A newly
|
|
78
|
+
public repository requires no Loom config or site source edit.
|
|
79
|
+
- `loom doctor` (offline diagnosis, `--fix` for cache/outbox/temp recovery) and
|
|
80
|
+
`loom migrate` (manifest `@0` → `@1`).
|
|
81
|
+
- Durable dispatch outbox with capped exponential retry and a per-snapshot
|
|
82
|
+
idempotency key, so a commit cannot lose its deploy.
|
|
83
|
+
- Bounded, deduping, ordered webhook sync queue with explicit 503 backpressure.
|
|
84
|
+
- `GET /readyz` and `GET /metrics`; reconciliation polling for missed webhooks.
|
|
85
|
+
- Graceful SIGTERM/SIGINT drain for `serve`; signal-aware `watch`.
|
|
86
|
+
- Structured JSON logs and credential redaction for diagnostics.
|
|
87
|
+
- Store lock, crash-debris cleanup, corrupt cache/webhook/outbox quarantine.
|
|
88
|
+
- Branch discovery from GitHub metadata, so `master`-based repositories are
|
|
89
|
+
watched without a config change.
|
|
90
|
+
- Recorded fixtures for a new repository, metadata/release/head changes,
|
|
91
|
+
renames, a `master` repository, and a failure that must not become a deletion.
|
|
92
|
+
- Contract, fuzz, soak, integrity, queue, site, operator, and migration tests.
|
|
93
|
+
- Measured benchmark script (`bun run bench`), release workflow, and the
|
|
94
|
+
scheduled site deployment guidance.
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
|
|
98
|
+
- Repository collection is concurrent (bounded), releases paginate, and retries
|
|
99
|
+
use full jitter and `Retry-After` dates.
|
|
100
|
+
- Per-repository fetch failures retain the previous good copy instead of
|
|
101
|
+
producing false removals.
|
|
102
|
+
- Exit codes now include `6` (partial) and `8` (busy).
|
|
103
|
+
- Package is scoped as `@sifr-dev/loom`; the published binary is built to
|
|
104
|
+
`dist/cli.js`.
|
|
105
|
+
|
|
106
|
+
### Fixed
|
|
107
|
+
|
|
108
|
+
- `serve` no longer returns from its command and exits before serving.
|
|
109
|
+
- A 304 without a cached body, a pagination loop, or a rate-limit reset beyond
|
|
110
|
+
the wait budget is a precise error rather than a hang or a guess.
|
|
111
|
+
- Trigger plans redact URLs and tokens; error messages redact credential
|
|
112
|
+
patterns.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mohamed Salahy
|
|
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.
|
package/README.ar.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
<div dir="rtl" align="right">
|
|
2
|
+
|
|
3
|
+
# Loom
|
|
4
|
+
|
|
5
|
+
<p align="center"><img src="assets/brand/product.svg" alt="Loom" width="64" height="64"></p>
|
|
6
|
+
|
|
7
|
+
[English](README.md) | **العربية**
|
|
8
|
+
|
|
9
|
+
Loom حزمة تطوير بـ TypeScript تحوّل مستودعات GitHub العامة إلى لقطات حتمية
|
|
10
|
+
وسجل موقع واحد محدّد الأنواع. وجّهها إلى مالك على GitHub أو إلى قائمة مستودعات
|
|
11
|
+
صريحة؛ فتقرأ البيانات الوصفية واللغات والإصدارات وحالة README والفروع وآخر
|
|
12
|
+
التزام، ثم تشتق مستند `loom/site@1` مقنَّنًا يعرضه الموقع دون عميل GitHub. الحالة
|
|
13
|
+
نفسها في GitHub تُنتج البايتات نفسها دائمًا، فيستطيع الموقع تخزين السجل ومقارنته
|
|
14
|
+
بالنسخة المنشورة، ولا ينشر إلا عند التغيير.
|
|
15
|
+
|
|
16
|
+
الاسم هو النول: تُسحب خيوط عامة كثيرة إلى الداخل، ويخرج قماش واحد.
|
|
17
|
+
|
|
18
|
+
## لمن هذه الحزمة
|
|
19
|
+
|
|
20
|
+
- لمن ينشر عدة مستودعات عامة ويريد صفحة أعمال أو فهرس مشاريع يتحدّث تلقائيًا
|
|
21
|
+
عند إضافة مستودع أو إعادة تسميته أو أرشفته أو إصدار نسخة منه.
|
|
22
|
+
- لمن يريد أن تعمل خطّافات النشر عند تغيّر محتوى حقيقي، لا عند كل استقصاء أو
|
|
23
|
+
كل دفعة إلى فرع لا يعني الموقع.
|
|
24
|
+
- للفرق التي تحتاج بيانات مستودعات عامة داخل موقع ثابت أو عامل ويب أو دالة
|
|
25
|
+
طرفية، دون تمرير رمز GitHub إلى المتصفح.
|
|
26
|
+
- لمن يريد ملفًا قابلًا لإعادة الإنتاج بدل قائمة مشاريع يحرّرها بيده.
|
|
27
|
+
|
|
28
|
+
## التثبيت
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bun add @sifr-dev/loom
|
|
32
|
+
# أو
|
|
33
|
+
npm install @sifr-dev/loom
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| الجزء | بيئة التشغيل |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `@sifr-dev/loom` | Bun 1.1 أو أحدث، وNode 20 أو أحدث |
|
|
39
|
+
| `@sifr-dev/loom/browser` | أي بيئة توفّر `fetch`: صفحة، عامل ويب، دالة طرفية، Bun، Node |
|
|
40
|
+
| أمر `loom` | Bun 1.1 أو أحدث |
|
|
41
|
+
|
|
42
|
+
ويبني مجلد الاستنساخ الحزمة نفسها كملف مضغوط:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
bun install
|
|
46
|
+
bun run build
|
|
47
|
+
bun pm pack
|
|
48
|
+
bun add ./sifr-dev-loom-1.0.0.tgz
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## البدء السريع
|
|
52
|
+
|
|
53
|
+
أنشئ الملف `sync.ts`:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { Loom } from "@sifr-dev/loom";
|
|
57
|
+
|
|
58
|
+
const loom = await Loom.open({ repos: ["Sifr-Dev/Loom"], store: ".loom" });
|
|
59
|
+
const outcome = await loom.sync();
|
|
60
|
+
console.log(outcome.status, outcome.snapshot.id);
|
|
61
|
+
await loom.close();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
شغّله مرتين على GitHub العام:
|
|
65
|
+
|
|
66
|
+
```console
|
|
67
|
+
$ bun sync.ts
|
|
68
|
+
created sha256:2eb282178c14a02b8499e33f38bcc7c4e13d324aaafe78338a6fc7931383d33e
|
|
69
|
+
$ bun sync.ts
|
|
70
|
+
unchanged sha256:2eb282178c14a02b8499e33f38bcc7c4e13d324aaafe78338a6fc7931383d33e
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
التشغيل الأول يثبّت لقطة. والثاني يرسل طلبات شرطية، ويرى الحالة نفسها، فلا يثبّت
|
|
74
|
+
شيئًا. المعرّف هو عنوان المحتوى للحالة المرصودة، لذلك يتغيّر عندما يتغيّر GitHub
|
|
75
|
+
لا عندما تتغيّر الساعة. والأمر `GITHUB_TOKEN=... bun sync.ts` يرفع حدّ 60 طلبًا
|
|
76
|
+
في الساعة المخصّص للقراءات المجهولة، ولا يوسّع أبدًا ما يخزّنه Loom.
|
|
77
|
+
|
|
78
|
+
ويعمل المسار نفسه من مجلد الاستنساخ على ملف استجابات مسجّل، بلا شبكة وبلا رمز:
|
|
79
|
+
|
|
80
|
+
```console
|
|
81
|
+
$ bun src/cli.ts sync --config fixtures/demo.config.json --fixture fixtures/github --store .loom-doc
|
|
82
|
+
loom sync: created sha256:8aa70586ead8f545f40b88c1c50edfcda4684ba37cc2080da672a1fad0fd74ad (2 repos, 4 releases, 0 not-modified, 23ms)
|
|
83
|
+
added head:sifr-dev/loom
|
|
84
|
+
added head:sifr-dev/stele
|
|
85
|
+
added release:sifr-dev/loom@v0.1.0
|
|
86
|
+
added release:sifr-dev/stele@v0.1.0
|
|
87
|
+
added release:sifr-dev/stele@v0.2.0
|
|
88
|
+
added release:sifr-dev/stele@v0.3.0-rc.1
|
|
89
|
+
added repo:sifr-dev/loom
|
|
90
|
+
added repo:sifr-dev/stele
|
|
91
|
+
|
|
92
|
+
$ bun src/cli.ts export --store .loom-doc --out site.json
|
|
93
|
+
loom export: wrote site.json from sha256:8aa70586ead8f545f40b88c1c50edfcda4684ba37cc2080da672a1fad0fd74ad (sha256:f28846551d82d7357cae43572328b2d82c6681910a44c252b5ba5a033f36fee2)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## سجل الموقع
|
|
97
|
+
|
|
98
|
+
يكتب `loom export` ملف JSON مقنَّنًا بسبعة مفاتيح في المستوى الأعلى:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
type SiteRecord = {
|
|
102
|
+
schema: "loom/site@1";
|
|
103
|
+
snapshot: string; // "sha256:<64 hex>"، اللقطة المثبّتة
|
|
104
|
+
complete: boolean; // false عندما لا يملك مستودع بيانات ولا نسخة سابقة
|
|
105
|
+
projects: SiteProject[]; // مرتبة حسب id
|
|
106
|
+
aliases: { from: string; to: string }[];
|
|
107
|
+
ownerAliases: { from: string; to: string }[];
|
|
108
|
+
errors: { repo: string; code: string; message: string; retained?: true }[];
|
|
109
|
+
};
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
وكل مشروع يحمل البيانات الوصفية العامة والنشاط الذي تحتاجه البطاقة. والقيمة
|
|
113
|
+
الغائبة تكون `null` أو مصفوفة فارغة، ولا تكون قيمة افتراضية مخترعة:
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
type SiteProject = {
|
|
117
|
+
id: string; // "owner/name" بأحرف صغيرة، المفتاح الثابت
|
|
118
|
+
slug: string;
|
|
119
|
+
owner: string;
|
|
120
|
+
name: string;
|
|
121
|
+
fullName: string; // كتابة الاسم كما يعرضها GitHub
|
|
122
|
+
description: string | null;
|
|
123
|
+
homepage: string | null;
|
|
124
|
+
topics: string[]; // مرتبة
|
|
125
|
+
language: string | null;
|
|
126
|
+
languages: { name: string; bytes: number }[];
|
|
127
|
+
license: string | null; // معرّف SPDX
|
|
128
|
+
stars: number;
|
|
129
|
+
forks: number;
|
|
130
|
+
watchers: number;
|
|
131
|
+
openIssues: number;
|
|
132
|
+
archived: boolean;
|
|
133
|
+
fork: boolean;
|
|
134
|
+
defaultBranch: string;
|
|
135
|
+
htmlUrl: string;
|
|
136
|
+
createdAt: string | null;
|
|
137
|
+
updatedAt: string | null;
|
|
138
|
+
pushedAt: string | null;
|
|
139
|
+
release: SiteRelease | null; // أحدث إصدار غير مسودة
|
|
140
|
+
releases: SiteRelease[]; // الأحدث أولًا، غير المسودات فقط
|
|
141
|
+
head: SiteHead | null; // آخر التزام على الفرع الافتراضي
|
|
142
|
+
|
|
143
|
+
readme?: SiteReadme | null; // فقط عندما يكون collect.readme مفعّلًا
|
|
144
|
+
branches?: SiteBranch[]; // فقط عندما يكون collect.branches مفعّلًا
|
|
145
|
+
commitComments?: SiteComment[];
|
|
146
|
+
issueComments?: SiteComment[];
|
|
147
|
+
workflows?: SiteWorkflow[];
|
|
148
|
+
ci?: SiteCi | null;
|
|
149
|
+
};
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
مشروع واحد من تصدير فعلي، بحقول مختارة:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"id": "sifr-dev/loom",
|
|
157
|
+
"slug": "loom",
|
|
158
|
+
"fullName": "Sifr-Dev/Loom",
|
|
159
|
+
"description": "Public-repository synchronization engine: deterministic GitHub snapshots, change-only rebuilds, signed webhooks",
|
|
160
|
+
"topics": ["github", "portfolio", "sdk", "sync", "typescript", "webhooks", "zero-dependencies"],
|
|
161
|
+
"language": "TypeScript",
|
|
162
|
+
"license": "MIT",
|
|
163
|
+
"stars": 0,
|
|
164
|
+
"forks": 0,
|
|
165
|
+
"openIssues": 0,
|
|
166
|
+
"defaultBranch": "main",
|
|
167
|
+
"htmlUrl": "https://github.com/Sifr-Dev/Loom",
|
|
168
|
+
"release": null,
|
|
169
|
+
"head": {
|
|
170
|
+
"shortSha": "2486d5bad9e4",
|
|
171
|
+
"committedAt": "2026-12-02T03:53:21Z"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
القوائم مرتبة سلفًا: المشاريع حسب `id`، والإصدارات الأحدث أولًا، والموضوعات
|
|
177
|
+
أبجديًا. والصفحة لا تفرز شيئًا. وتظهر `readme` و`branches` و`commitComments`
|
|
178
|
+
و`issueComments` و`workflows` و`ci` فقط عندما يفعّلها `collect`. ومخطط JSON
|
|
179
|
+
المنشور هو [`schema/site@1.json`](schema/site@1.json)، والاختبارات تتحقق من
|
|
180
|
+
تصديرات حقيقية بمطابقته.
|
|
181
|
+
|
|
182
|
+
ويبقى الإثراء في الموقع: العنوان التسويقي والتصنيف والسرد والحقول المكتوبة بيد
|
|
183
|
+
تُدمج حسب `project.id`. والمستودع المكتشف حديثًا يعرض بطاقة عامة في التصدير
|
|
184
|
+
التالي دون تعديل مصدر الموقع.
|
|
185
|
+
|
|
186
|
+
## كيف يعمل
|
|
187
|
+
|
|
188
|
+
- **الحالة العامة فقط.** الرمز يرفع حدّ المعدّل، ولا يمنح إذنًا بقراءة المستودعات
|
|
189
|
+
الخاصة أو الداخلية. تلك الاستجابة تُرفض قبل تخزينها.
|
|
190
|
+
- **طلبات شرطية.** كل طلب GET إلى GitHub يخزّن ETag والجسم. ويرسل التشغيل التالي
|
|
191
|
+
`If-None-Match`، ويعيد الجسم المخزّن عند `304`، فيكون الاستقصاء بلا تغيير
|
|
192
|
+
زهيدًا ولا يستهلك من حدّ المعدّل الأساسي.
|
|
193
|
+
- **لقطات معنونة بالمحتوى.** تُقنَّن الحمولة وتُسمّى بـ SHA-256 الخاص بها. ويُنتج
|
|
194
|
+
تشغيلان على الحالة نفسها المعرّف نفسه والبايتات نفسها.
|
|
195
|
+
- **فروق كيانات بمعرّفات ثابتة.** الكيانات هي `repo:owner/name` و
|
|
196
|
+
`release:owner/name@tag` و `head:owner/name`. والفرق قائمة مرتبة بأحداث
|
|
197
|
+
الإضافة والتحديث والحذف مع أسماء الحقول المتغيّرة. وإعادة التسمية تحديث واحد
|
|
198
|
+
يحمل `previousId`، لا حذف يتبعه إضافة.
|
|
199
|
+
- **صندوق صادر متين.** اللقطة المتغيّرة تكتب الصندوق، ثم تثبّت، ثم تشغّل
|
|
200
|
+
الخطّافات. ولا يُفرَّغ الصندوق إلا بعد الإقرار، فيعيد التشغيل التالي المحاولة
|
|
201
|
+
بعد انهيار أو فشل خطّاف.
|
|
202
|
+
- **سجل واحد للموقع.** يشتق `loom export` السجل `loom/site@1` من اللقطة المثبّتة.
|
|
203
|
+
ويستطيع مدخل المتصفح اشتقاق السجل نفسه في الذاكرة عبر `fetch`، ويكتب
|
|
204
|
+
`--format ts --package none` وحدة أنواع لا تحتاج الحزمة وقت البناء.
|
|
205
|
+
|
|
206
|
+
## الأوامر
|
|
207
|
+
|
|
208
|
+
| الأمر | ما يفعله | رمز الخروج |
|
|
209
|
+
| --- | --- | --- |
|
|
210
|
+
| `loom sync` | يجلب، ويقارن بـ HEAD، ويثبّت عند التغيير فقط، ويشغّل الخطّافات اختياريًا | 0، 1، 6 جزئي، 8 مشغول |
|
|
211
|
+
| `loom watch` | يعيد `sync` على فاصل زمني بطلبات شرطية | 0، 1، 6 |
|
|
212
|
+
| `loom serve` | مستقبل خطّافات HTTP؛ يتحقق ويصفّ ويزامن ويشغّل ويصرّف عند الإشارة | 0 عند إغلاق نظيف |
|
|
213
|
+
| `loom export` | يصدر `loom/site@1` بصيغة JSON أو وحدة أنواع؛ و`--check` يحكم إعادة النشر | 0، 7 قديم |
|
|
214
|
+
| `loom diff` | يقارن `--from` (الافتراضي `HEAD`) مع `--to` (الافتراضي `remote`) | 0 تغيّر، 7 بلا تغيّر |
|
|
215
|
+
| `loom verify` | يعيد حساب كل كتلة، ويتحقق من البيان، ويفحص الأسرار | 0، 3 فشل |
|
|
216
|
+
| `loom snapshot` | يقرأ المصدر ويطبع لقطة أو يكتبها دون تثبيت | 0 |
|
|
217
|
+
| `loom doctor` | تشخيص دون اتصال للإعداد والمخزن والذاكرة والأسرار والخطّافات | 0، 3 فشل |
|
|
218
|
+
| `loom migrate` | يرفع مخطط المخزن على القرص | 0، 2 غير مدعوم |
|
|
219
|
+
|
|
220
|
+
رموز الخروج: `0` نجاح، `1` فشل، `2` خطأ استخدام، `3` فشل التحقق، `4` مستودع
|
|
221
|
+
غير عام، `5` خطّاف غير مصرّح، `6` لقطة جزئية، `7` بلا تغيير، `8` المخزن مشغول.
|
|
222
|
+
|
|
223
|
+
## التوثيق
|
|
224
|
+
|
|
225
|
+
| المستند | المحتوى |
|
|
226
|
+
| --- | --- |
|
|
227
|
+
| [docs/SDK.md](docs/SDK.md) | التثبيت، ومداخل الحزمة، وواجهة `Loom`، والإضافات، والمصادقة، والحدود. |
|
|
228
|
+
| [docs/SITE_CONTRACT.md](docs/SITE_CONTRACT.md) | مخطط `loom/site@1`، والضمانات، وسياسة الاكتشاف، ووحدة الأنواع، والإصدارات. |
|
|
229
|
+
| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | كل مفتاح إعداد وقيمته الافتراضية والتحقق منه، والخطّافات وإعدادات الخادم. |
|
|
230
|
+
| [docs/VERIFICATION.md](docs/VERIFICATION.md) | طريقة تشغيل الفحوص، والمخرجات المقيسة، وما لا تثبته. |
|
|
231
|
+
| [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | الملفات، والتكامل المستمر، وخادم الخطّافات، والبيئة، والاستعادة، والمراقبة. |
|
|
232
|
+
| [docs/ar/](docs/ar/) | النسخ العربية للمستندات الخمسة، صفحة لكل صفحة إنجليزية. |
|
|
233
|
+
|
|
234
|
+
## ما لا يفعله
|
|
235
|
+
|
|
236
|
+
- **استقصاء، لا بثًا.** لا يوفّر GitHub قناة دفع لبيانات المستودعات الوصفية.
|
|
237
|
+
يستخدم `watch` و`serve` طلبات شرطية، لكن التشغيل البارد يكلّف طلبًا لكل نقطة
|
|
238
|
+
نهاية.
|
|
239
|
+
- **لا مستودعات خاصة.** الاستجابات الخاصة والداخلية تُرفض بالسياسة. والمصادقة
|
|
240
|
+
برمز حامل، لا بتطبيق GitHub ولا بمسار OAuth.
|
|
241
|
+
- **كاتب واحد لكل مخزن.** القفل محلي لجهاز واحد، وليس قفلًا موزعًا بين أجهزة.
|
|
242
|
+
- **تسليم خطّافات مرة على الأقل.** الصندوق الصادر ومفتاح اللقطة يجعلان إعادة
|
|
243
|
+
المحاولة آمنة، لكن التسليم مرة واحدة بالضبط غير مضمون عبر انقطاع شبكة عشوائي.
|
|
244
|
+
- **مدخل المتصفح لا يخزّن.** يقرأ ويشتق فقط. ويحتفظ المتصفح بالسجل في الذاكرة أو
|
|
245
|
+
في التخزين الذي يستخدمه الموقع أصلًا.
|
|
246
|
+
|
|
247
|
+
<p align="center"><picture><source media="(prefers-color-scheme: light)" srcset="assets/brand/lockup-horizontal-light.svg"><img src="assets/brand/lockup-horizontal-dark.svg" alt="Sifr" width="240"></picture><br><sub><a href="https://sifr.is-a.dev/p/loom/">Loom</a> · part of <a href="https://sifr.is-a.dev">Sifr</a></sub></p>
|
|
248
|
+
|
|
249
|
+
## الترخيص
|
|
250
|
+
|
|
251
|
+
MIT، حقوق النشر 2026 Mohamed Salahy. انظر [LICENSE](LICENSE).
|
|
252
|
+
|
|
253
|
+
</div>
|
package/README.md
CHANGED
|
@@ -1,3 +1,263 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Loom
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center"><img src="assets/brand/product.svg" alt="Loom" width="64" height="64"></p>
|
|
4
|
+
|
|
5
|
+
**English** | [العربية](README.ar.md)
|
|
6
|
+
|
|
7
|
+
Loom is a TypeScript SDK that turns public GitHub repositories into
|
|
8
|
+
deterministic snapshots and one typed site record. Point it at a GitHub owner
|
|
9
|
+
or a list of repositories; it reads metadata, languages, releases, README state,
|
|
10
|
+
branches, and the head commit, then derives a canonical `loom/site@1` document
|
|
11
|
+
that a website renders without a GitHub client. The same GitHub state always
|
|
12
|
+
produces the same bytes, so a site can cache the record, compare it with the
|
|
13
|
+
deployed copy, and deploy only when it changed.
|
|
14
|
+
|
|
15
|
+
The name is the loom: many public threads are drawn in, and one cloth comes out.
|
|
16
|
+
|
|
17
|
+
## Who it is for
|
|
18
|
+
|
|
19
|
+
- Developers who publish several public repositories and want a portfolio or
|
|
20
|
+
project index that updates itself when a repository is added, renamed,
|
|
21
|
+
archived, or released.
|
|
22
|
+
- Maintainers who want deploy hooks to fire on a real content change, not on
|
|
23
|
+
every poll or every push to an unrelated branch.
|
|
24
|
+
- Teams that need public repository data in a static site, a worker, or an edge
|
|
25
|
+
function without shipping a GitHub token to the browser.
|
|
26
|
+
- Anyone who wants a reproducible artifact instead of a hand-maintained project
|
|
27
|
+
list.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add @sifr-dev/loom
|
|
33
|
+
# or
|
|
34
|
+
npm install @sifr-dev/loom
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| Part | Runtime |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `@sifr-dev/loom` | Bun 1.1 or newer, Node 20 or newer |
|
|
40
|
+
| `@sifr-dev/loom/browser` | any runtime with `fetch`: page, worker, edge function, Bun, Node |
|
|
41
|
+
| the `loom` command | Bun 1.1 or newer |
|
|
42
|
+
|
|
43
|
+
`npm install` installs the library. The command is a Bun program: run it with
|
|
44
|
+
`bunx loom`, or install it globally with `bun add -g @sifr-dev/loom`.
|
|
45
|
+
| `loom` command | Bun 1.1 or newer |
|
|
46
|
+
|
|
47
|
+
A checkout also builds the same artifact as a tarball:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bun install
|
|
51
|
+
bun run build
|
|
52
|
+
bun pm pack
|
|
53
|
+
bun add ./sifr-dev-loom-1.0.0.tgz
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
Create `sync.ts`:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import { Loom } from "@sifr-dev/loom";
|
|
62
|
+
|
|
63
|
+
const loom = await Loom.open({ repos: ["Sifr-Dev/Loom"], store: ".loom" });
|
|
64
|
+
const outcome = await loom.sync();
|
|
65
|
+
console.log(outcome.status, outcome.snapshot.id);
|
|
66
|
+
await loom.close();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Run it twice against public GitHub:
|
|
70
|
+
|
|
71
|
+
```console
|
|
72
|
+
$ bun sync.ts
|
|
73
|
+
created sha256:2eb282178c14a02b8499e33f38bcc7c4e13d324aaafe78338a6fc7931383d33e
|
|
74
|
+
$ bun sync.ts
|
|
75
|
+
unchanged sha256:2eb282178c14a02b8499e33f38bcc7c4e13d324aaafe78338a6fc7931383d33e
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The first run commits a snapshot. The second sends conditional requests, sees
|
|
79
|
+
the same state, and commits nothing. The id is the content address of the
|
|
80
|
+
observed state, so it changes when GitHub changes, not when the clock does.
|
|
81
|
+
`GITHUB_TOKEN=... bun sync.ts` raises the anonymous limit of 60 requests per
|
|
82
|
+
hour; it never widens what Loom will store.
|
|
83
|
+
|
|
84
|
+
The same pipeline runs from a checkout against a recorded fixture, with no
|
|
85
|
+
network and no token:
|
|
86
|
+
|
|
87
|
+
```console
|
|
88
|
+
$ bun src/cli.ts sync --config fixtures/demo.config.json --fixture fixtures/github --store .loom-doc
|
|
89
|
+
loom sync: created sha256:8aa70586ead8f545f40b88c1c50edfcda4684ba37cc2080da672a1fad0fd74ad (2 repos, 4 releases, 0 not-modified, 23ms)
|
|
90
|
+
added head:sifr-dev/loom
|
|
91
|
+
added head:sifr-dev/stele
|
|
92
|
+
added release:sifr-dev/loom@v0.1.0
|
|
93
|
+
added release:sifr-dev/stele@v0.1.0
|
|
94
|
+
added release:sifr-dev/stele@v0.2.0
|
|
95
|
+
added release:sifr-dev/stele@v0.3.0-rc.1
|
|
96
|
+
added repo:sifr-dev/loom
|
|
97
|
+
added repo:sifr-dev/stele
|
|
98
|
+
|
|
99
|
+
$ bun src/cli.ts export --store .loom-doc --out site.json
|
|
100
|
+
loom export: wrote site.json from sha256:8aa70586ead8f545f40b88c1c50edfcda4684ba37cc2080da672a1fad0fd74ad (sha256:f28846551d82d7357cae43572328b2d82c6681910a44c252b5ba5a033f36fee2)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## The site record
|
|
104
|
+
|
|
105
|
+
`loom export` writes canonical JSON with seven top-level keys:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
type SiteRecord = {
|
|
109
|
+
schema: "loom/site@1";
|
|
110
|
+
snapshot: string; // "sha256:<64 hex>", the committed snapshot
|
|
111
|
+
complete: boolean; // false when a repository has no data and no previous copy
|
|
112
|
+
projects: SiteProject[]; // sorted by id
|
|
113
|
+
aliases: { from: string; to: string }[];
|
|
114
|
+
ownerAliases: { from: string; to: string }[];
|
|
115
|
+
errors: { repo: string; code: string; message: string; retained?: true }[];
|
|
116
|
+
};
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Every project carries public metadata plus the activity a card needs. Missing
|
|
120
|
+
values are `null` or an empty array, never an invented default:
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
type SiteProject = {
|
|
124
|
+
id: string; // "owner/name" lowercased, the stable key
|
|
125
|
+
slug: string;
|
|
126
|
+
owner: string;
|
|
127
|
+
name: string;
|
|
128
|
+
fullName: string; // display casing from GitHub
|
|
129
|
+
description: string | null;
|
|
130
|
+
homepage: string | null;
|
|
131
|
+
topics: string[]; // sorted
|
|
132
|
+
language: string | null;
|
|
133
|
+
languages: { name: string; bytes: number }[];
|
|
134
|
+
license: string | null; // SPDX id
|
|
135
|
+
stars: number;
|
|
136
|
+
forks: number;
|
|
137
|
+
watchers: number;
|
|
138
|
+
openIssues: number;
|
|
139
|
+
archived: boolean;
|
|
140
|
+
fork: boolean;
|
|
141
|
+
defaultBranch: string;
|
|
142
|
+
htmlUrl: string;
|
|
143
|
+
createdAt: string | null;
|
|
144
|
+
updatedAt: string | null;
|
|
145
|
+
pushedAt: string | null;
|
|
146
|
+
release: SiteRelease | null; // newest non-draft release
|
|
147
|
+
releases: SiteRelease[]; // newest first, non-draft only
|
|
148
|
+
head: SiteHead | null; // latest commit on the default branch
|
|
149
|
+
|
|
150
|
+
readme?: SiteReadme | null; // only when collect.readme is on
|
|
151
|
+
branches?: SiteBranch[]; // only when collect.branches is on
|
|
152
|
+
commitComments?: SiteComment[];
|
|
153
|
+
issueComments?: SiteComment[];
|
|
154
|
+
workflows?: SiteWorkflow[];
|
|
155
|
+
ci?: SiteCi | null;
|
|
156
|
+
};
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
One exported project, selected fields:
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"id": "sifr-dev/loom",
|
|
164
|
+
"slug": "loom",
|
|
165
|
+
"fullName": "Sifr-Dev/Loom",
|
|
166
|
+
"description": "Public-repository synchronization engine: deterministic GitHub snapshots, change-only rebuilds, signed webhooks",
|
|
167
|
+
"topics": ["github", "portfolio", "sdk", "sync", "typescript", "webhooks", "zero-dependencies"],
|
|
168
|
+
"language": "TypeScript",
|
|
169
|
+
"license": "MIT",
|
|
170
|
+
"stars": 0,
|
|
171
|
+
"forks": 0,
|
|
172
|
+
"openIssues": 0,
|
|
173
|
+
"defaultBranch": "main",
|
|
174
|
+
"htmlUrl": "https://github.com/Sifr-Dev/Loom",
|
|
175
|
+
"release": null,
|
|
176
|
+
"head": {
|
|
177
|
+
"shortSha": "2486d5bad9e4",
|
|
178
|
+
"committedAt": "2026-12-02T03:53:21Z"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Lists are already ordered: projects by id, releases newest first, topics
|
|
184
|
+
alphabetically. The page never sorts. `readme`, `branches`, `commitComments`,
|
|
185
|
+
`issueComments`, `workflows`, and `ci` appear only when `collect` enables them.
|
|
186
|
+
The shipped JSON Schema is [`schema/site@1.json`](schema/site@1.json), and the
|
|
187
|
+
suite validates real exports against it.
|
|
188
|
+
|
|
189
|
+
Enrichment stays on the site: tagline, category, narrative, and other
|
|
190
|
+
hand-written fields are merged by `project.id`. A newly discovered repository
|
|
191
|
+
renders a generic card on the next export with no site source edit.
|
|
192
|
+
|
|
193
|
+
## How it works
|
|
194
|
+
|
|
195
|
+
- **Public state only.** A token raises the rate limit; it is not permission to
|
|
196
|
+
read private or internal repositories. That response is rejected before it is
|
|
197
|
+
stored.
|
|
198
|
+
- **Conditional requests.** Every GitHub GET stores its ETag and body. The next
|
|
199
|
+
run sends `If-None-Match` and replays the cached body on `304`, so an
|
|
200
|
+
unchanged poll is cheap and costs no primary rate-limit budget.
|
|
201
|
+
- **Content-addressed snapshots.** The payload is canonicalised and named by its
|
|
202
|
+
SHA-256. Two runs over the same state produce the same id and the same bytes.
|
|
203
|
+
- **Entity diffs with stable ids.** Entities are `repo:owner/name`,
|
|
204
|
+
`release:owner/name@tag`, and `head:owner/name`. A diff is a sorted list of
|
|
205
|
+
added, updated, and removed events with changed field names. A rename is one
|
|
206
|
+
update with `previousId`, not a remove plus an add.
|
|
207
|
+
- **A durable outbox.** A changed snapshot writes the outbox, then commits, then
|
|
208
|
+
runs triggers. The outbox clears only after acknowledgement, so a crash or a
|
|
209
|
+
failed trigger retries on the next run.
|
|
210
|
+
- **One record for the site.** `loom export` derives `loom/site@1` from the
|
|
211
|
+
committed snapshot. The browser entry can derive the same record in memory
|
|
212
|
+
with `fetch`, and `--format ts --package none` writes a typed module that
|
|
213
|
+
needs no SDK at build time.
|
|
214
|
+
|
|
215
|
+
## Commands
|
|
216
|
+
|
|
217
|
+
| Command | What it does | Exit |
|
|
218
|
+
| --- | --- | --- |
|
|
219
|
+
| `loom sync` | Fetch, diff against HEAD, commit only on change, optionally dispatch triggers | 0, 1, 6 partial, 8 busy |
|
|
220
|
+
| `loom watch` | Repeat `sync` on an interval using conditional requests | 0, 1, 6 |
|
|
221
|
+
| `loom serve` | HTTP webhook receiver; verify, queue, sync, dispatch, drain on signal | 0 on clean shutdown |
|
|
222
|
+
| `loom export` | Emit `loom/site@1` JSON or a typed module; `--check` gates a redeploy | 0, 7 stale |
|
|
223
|
+
| `loom diff` | Compare `--from` (default `HEAD`) with `--to` (default `remote`) | 0 changed, 7 unchanged |
|
|
224
|
+
| `loom verify` | Re-hash every blob, re-check the manifest, scan for secrets | 0, 3 failed |
|
|
225
|
+
| `loom snapshot` | Read the source and print or write a snapshot without committing | 0 |
|
|
226
|
+
| `loom doctor` | Offline config, store, cache, secret, and trigger diagnosis | 0, 3 failed |
|
|
227
|
+
| `loom migrate` | Upgrade an on-disk store schema | 0, 2 unsupported |
|
|
228
|
+
|
|
229
|
+
Exit codes: `0` ok, `1` failure, `2` usage, `3` verification failed, `4`
|
|
230
|
+
non-public repository, `5` unauthorized webhook, `6` partial snapshot, `7`
|
|
231
|
+
unchanged, `8` store busy.
|
|
232
|
+
|
|
233
|
+
## Documentation
|
|
234
|
+
|
|
235
|
+
| Document | Contents |
|
|
236
|
+
| --- | --- |
|
|
237
|
+
| [docs/SDK.md](docs/SDK.md) | Installation, entry points, the `Loom` API, plugins, authentication, limits. |
|
|
238
|
+
| [docs/SITE_CONTRACT.md](docs/SITE_CONTRACT.md) | The `loom/site@1` schema, guarantees, discovery policy, typed module, versioning. |
|
|
239
|
+
| [docs/CONFIGURATION.md](docs/CONFIGURATION.md) | Every config key, defaults, validation, triggers, webhook and server settings. |
|
|
240
|
+
| [docs/VERIFICATION.md](docs/VERIFICATION.md) | How to run the checks, the measured outputs, and what they do not prove. |
|
|
241
|
+
| [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | Artifacts, CI, the webhook service, environment, recovery, and observability. |
|
|
242
|
+
| [docs/ar/](docs/ar/) | Arabic editions of the five deep documents, one page per English page. |
|
|
243
|
+
|
|
244
|
+
## What it does not do
|
|
245
|
+
|
|
246
|
+
- **Polling, not streaming.** GitHub has no push channel for repository
|
|
247
|
+
metadata. `watch` and `serve` use conditional requests, but a cold run still
|
|
248
|
+
costs a request per endpoint.
|
|
249
|
+
- **No private repositories.** Private and internal responses are rejected by
|
|
250
|
+
policy. Authentication is a bearer token, not a GitHub App or OAuth flow.
|
|
251
|
+
- **One writer per store.** The lock is local to one host. It is not a
|
|
252
|
+
distributed lock across machines.
|
|
253
|
+
- **At-least-once trigger delivery.** The outbox and a snapshot idempotency key
|
|
254
|
+
make a retry safe; exactly-once is not claimed across an arbitrary network
|
|
255
|
+
partition.
|
|
256
|
+
- **The browser entry does not persist.** It reads and derives. A browser keeps
|
|
257
|
+
the record in memory or in whatever storage the site already uses.
|
|
258
|
+
|
|
259
|
+
<p align="center"><picture><source media="(prefers-color-scheme: light)" srcset="assets/brand/lockup-horizontal-light.svg"><img src="assets/brand/lockup-horizontal-dark.svg" alt="Sifr" width="240"></picture><br><sub><a href="https://sifr.is-a.dev/p/loom/">Loom</a> · part of <a href="https://sifr.is-a.dev">Sifr</a></sub></p>
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT, Copyright 2026 Mohamed Salahy. See [LICENSE](LICENSE).
|