@gadicc/loom 0.0.0-oidc-bootstrap.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/LICENSE +201 -0
- package/NOTICE +6 -0
- package/README.md +448 -0
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/db/drizzle-config.d.ts +20 -0
- package/db/drizzle-config.js +34 -0
- package/db/fixtures.d.ts +31 -0
- package/db/fixtures.js +52 -0
- package/db/neon.d.ts +3 -0
- package/db/neon.js +20 -0
- package/db/neonFull.d.ts +12 -0
- package/db/neonFull.js +33 -0
- package/db/package.json +3 -0
- package/db/testing.d.ts +26 -0
- package/db/testing.js +76 -0
- package/db/testing.test.ts +28 -0
- package/db/valibot.d.ts +23 -0
- package/db/valibot.js +8 -0
- package/esm/_dnt.polyfills.d.ts +149 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +163 -0
- package/esm/_dnt.shims.d.ts +2 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +57 -0
- package/esm/bin/loom.d.ts +2 -0
- package/esm/bin/loom.d.ts.map +1 -0
- package/esm/bin/loom.js +11 -0
- package/esm/mod.d.ts +9 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +8 -0
- package/esm/package.json +3 -0
- package/esm/src/apiKeys/authorize.d.ts +4 -0
- package/esm/src/apiKeys/authorize.d.ts.map +1 -0
- package/esm/src/apiKeys/authorize.js +184 -0
- package/esm/src/apiKeys/country.d.ts +3 -0
- package/esm/src/apiKeys/country.d.ts.map +1 -0
- package/esm/src/apiKeys/country.js +7 -0
- package/esm/src/apiKeys/credentials.d.ts +4 -0
- package/esm/src/apiKeys/credentials.d.ts.map +1 -0
- package/esm/src/apiKeys/credentials.js +55 -0
- package/esm/src/apiKeys/fingerprint.d.ts +3 -0
- package/esm/src/apiKeys/fingerprint.d.ts.map +1 -0
- package/esm/src/apiKeys/fingerprint.js +5 -0
- package/esm/src/apiKeys/mod.d.ts +9 -0
- package/esm/src/apiKeys/mod.d.ts.map +1 -0
- package/esm/src/apiKeys/mod.js +8 -0
- package/esm/src/apiKeys/policy.d.ts +59 -0
- package/esm/src/apiKeys/policy.d.ts.map +1 -0
- package/esm/src/apiKeys/policy.js +88 -0
- package/esm/src/apiKeys/retention.d.ts +55 -0
- package/esm/src/apiKeys/retention.d.ts.map +1 -0
- package/esm/src/apiKeys/retention.js +65 -0
- package/esm/src/apiKeys/types.d.ts +175 -0
- package/esm/src/apiKeys/types.d.ts.map +1 -0
- package/esm/src/apiKeys/types.js +1 -0
- package/esm/src/cli/externalSkills.d.ts +39 -0
- package/esm/src/cli/externalSkills.d.ts.map +1 -0
- package/esm/src/cli/externalSkills.js +177 -0
- package/esm/src/cli/mod.d.ts +337 -0
- package/esm/src/cli/mod.d.ts.map +1 -0
- package/esm/src/cli/mod.js +9268 -0
- package/esm/src/cli/projectSkills.d.ts +102 -0
- package/esm/src/cli/projectSkills.d.ts.map +1 -0
- package/esm/src/cli/projectSkills.js +592 -0
- package/esm/src/files/client.d.ts +29 -0
- package/esm/src/files/client.d.ts.map +1 -0
- package/esm/src/files/client.js +41 -0
- package/esm/src/files/errors.d.ts +37 -0
- package/esm/src/files/errors.d.ts.map +1 -0
- package/esm/src/files/errors.js +66 -0
- package/esm/src/files/hash.d.ts +15 -0
- package/esm/src/files/hash.d.ts.map +1 -0
- package/esm/src/files/hash.js +82 -0
- package/esm/src/files/memory.d.ts +29 -0
- package/esm/src/files/memory.d.ts.map +1 -0
- package/esm/src/files/memory.js +109 -0
- package/esm/src/files/metadata.d.ts +10 -0
- package/esm/src/files/metadata.d.ts.map +1 -0
- package/esm/src/files/metadata.js +186 -0
- package/esm/src/files/mod.d.ts +10 -0
- package/esm/src/files/mod.d.ts.map +1 -0
- package/esm/src/files/mod.js +9 -0
- package/esm/src/files/s3.d.ts +29 -0
- package/esm/src/files/s3.d.ts.map +1 -0
- package/esm/src/files/s3.js +107 -0
- package/esm/src/files/service.d.ts +27 -0
- package/esm/src/files/service.d.ts.map +1 -0
- package/esm/src/files/service.js +136 -0
- package/esm/src/files/types.d.ts +134 -0
- package/esm/src/files/types.d.ts.map +1 -0
- package/esm/src/files/types.js +1 -0
- package/esm/src/jobs/catalog.d.ts +32 -0
- package/esm/src/jobs/catalog.d.ts.map +1 -0
- package/esm/src/jobs/catalog.js +208 -0
- package/esm/src/jobs/controller.d.ts +28 -0
- package/esm/src/jobs/controller.d.ts.map +1 -0
- package/esm/src/jobs/controller.js +95 -0
- package/esm/src/jobs/direct.d.ts +36 -0
- package/esm/src/jobs/direct.d.ts.map +1 -0
- package/esm/src/jobs/direct.js +122 -0
- package/esm/src/jobs/events.d.ts +15 -0
- package/esm/src/jobs/events.d.ts.map +1 -0
- package/esm/src/jobs/events.js +30 -0
- package/esm/src/jobs/format.d.ts +16 -0
- package/esm/src/jobs/format.d.ts.map +1 -0
- package/esm/src/jobs/format.js +183 -0
- package/esm/src/jobs/http.d.ts +22 -0
- package/esm/src/jobs/http.d.ts.map +1 -0
- package/esm/src/jobs/http.js +44 -0
- package/esm/src/jobs/log.d.ts +2 -0
- package/esm/src/jobs/log.d.ts.map +1 -0
- package/esm/src/jobs/log.js +10 -0
- package/esm/src/jobs/mod.d.ts +10 -0
- package/esm/src/jobs/mod.d.ts.map +1 -0
- package/esm/src/jobs/mod.js +9 -0
- package/esm/src/jobs/run.d.ts +20 -0
- package/esm/src/jobs/run.d.ts.map +1 -0
- package/esm/src/jobs/run.js +57 -0
- package/esm/src/jobs/types.d.ts +31 -0
- package/esm/src/jobs/types.d.ts.map +1 -0
- package/esm/src/jobs/types.js +1 -0
- package/esm/src/mui/apiKeys.d.ts +65 -0
- package/esm/src/mui/apiKeys.d.ts.map +1 -0
- package/esm/src/mui/apiKeys.js +301 -0
- package/esm/src/mui/apiKeysView.d.ts +48 -0
- package/esm/src/mui/apiKeysView.d.ts.map +1 -0
- package/esm/src/mui/apiKeysView.js +34 -0
- package/esm/src/mui/confirm.d.ts +12 -0
- package/esm/src/mui/confirm.d.ts.map +1 -0
- package/esm/src/mui/confirm.js +78 -0
- package/esm/src/mui/mod.d.ts +4 -0
- package/esm/src/mui/mod.d.ts.map +1 -0
- package/esm/src/mui/mod.js +2 -0
- package/esm/src/next/apiKeys/mod.d.ts +64 -0
- package/esm/src/next/apiKeys/mod.d.ts.map +1 -0
- package/esm/src/next/apiKeys/mod.js +217 -0
- package/esm/src/next/auth/config.d.ts +34 -0
- package/esm/src/next/auth/config.d.ts.map +1 -0
- package/esm/src/next/auth/config.js +103 -0
- package/esm/src/next/auth/mod.d.ts +3 -0
- package/esm/src/next/auth/mod.d.ts.map +1 -0
- package/esm/src/next/auth/mod.js +2 -0
- package/esm/src/next/auth/server.d.ts +28 -0
- package/esm/src/next/auth/server.d.ts.map +1 -0
- package/esm/src/next/auth/server.js +24 -0
- package/esm/src/next/files/mod.d.ts +3 -0
- package/esm/src/next/files/mod.d.ts.map +1 -0
- package/esm/src/next/files/mod.js +2 -0
- package/esm/src/next/files/route.d.ts +99 -0
- package/esm/src/next/files/route.d.ts.map +1 -0
- package/esm/src/next/files/route.js +349 -0
- package/esm/src/next/jobs/list.d.ts +25 -0
- package/esm/src/next/jobs/list.d.ts.map +1 -0
- package/esm/src/next/jobs/list.js +39 -0
- package/esm/src/next/jobs/mod.d.ts +6 -0
- package/esm/src/next/jobs/mod.d.ts.map +1 -0
- package/esm/src/next/jobs/mod.js +5 -0
- package/esm/src/next/jobs/paths.d.ts +14 -0
- package/esm/src/next/jobs/paths.d.ts.map +1 -0
- package/esm/src/next/jobs/paths.js +40 -0
- package/esm/src/next/jobs/route.d.ts +48 -0
- package/esm/src/next/jobs/route.d.ts.map +1 -0
- package/esm/src/next/jobs/route.js +101 -0
- package/esm/src/next/jobs/run.d.ts +51 -0
- package/esm/src/next/jobs/run.d.ts.map +1 -0
- package/esm/src/next/jobs/run.js +563 -0
- package/esm/src/next/jobs/stream.d.ts +3 -0
- package/esm/src/next/jobs/stream.d.ts.map +1 -0
- package/esm/src/next/jobs/stream.js +25 -0
- package/esm/src/next/pwa/mod.d.ts +104 -0
- package/esm/src/next/pwa/mod.d.ts.map +1 -0
- package/esm/src/next/pwa/mod.js +169 -0
- package/esm/src/next/pwa/worker.d.ts +27 -0
- package/esm/src/next/pwa/worker.d.ts.map +1 -0
- package/esm/src/next/pwa/worker.js +27 -0
- package/package.json +293 -0
- package/script/_dnt.polyfills.d.ts +149 -0
- package/script/_dnt.polyfills.d.ts.map +1 -0
- package/script/_dnt.polyfills.js +166 -0
- package/script/_dnt.shims.d.ts +2 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +60 -0
- package/script/bin/loom.d.ts +2 -0
- package/script/bin/loom.d.ts.map +1 -0
- package/script/bin/loom.js +17 -0
- package/script/mod.d.ts +9 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +24 -0
- package/script/package.json +3 -0
- package/script/src/apiKeys/authorize.d.ts +4 -0
- package/script/src/apiKeys/authorize.d.ts.map +1 -0
- package/script/src/apiKeys/authorize.js +187 -0
- package/script/src/apiKeys/country.d.ts +3 -0
- package/script/src/apiKeys/country.d.ts.map +1 -0
- package/script/src/apiKeys/country.js +10 -0
- package/script/src/apiKeys/credentials.d.ts +4 -0
- package/script/src/apiKeys/credentials.d.ts.map +1 -0
- package/script/src/apiKeys/credentials.js +58 -0
- package/script/src/apiKeys/fingerprint.d.ts +3 -0
- package/script/src/apiKeys/fingerprint.d.ts.map +1 -0
- package/script/src/apiKeys/fingerprint.js +8 -0
- package/script/src/apiKeys/mod.d.ts +9 -0
- package/script/src/apiKeys/mod.d.ts.map +1 -0
- package/script/src/apiKeys/mod.js +24 -0
- package/script/src/apiKeys/policy.d.ts +59 -0
- package/script/src/apiKeys/policy.d.ts.map +1 -0
- package/script/src/apiKeys/policy.js +92 -0
- package/script/src/apiKeys/retention.d.ts +55 -0
- package/script/src/apiKeys/retention.d.ts.map +1 -0
- package/script/src/apiKeys/retention.js +70 -0
- package/script/src/apiKeys/types.d.ts +175 -0
- package/script/src/apiKeys/types.d.ts.map +1 -0
- package/script/src/apiKeys/types.js +2 -0
- package/script/src/cli/externalSkills.d.ts +39 -0
- package/script/src/cli/externalSkills.d.ts.map +1 -0
- package/script/src/cli/externalSkills.js +181 -0
- package/script/src/cli/mod.d.ts +337 -0
- package/script/src/cli/mod.d.ts.map +1 -0
- package/script/src/cli/mod.js +9337 -0
- package/script/src/cli/projectSkills.d.ts +102 -0
- package/script/src/cli/projectSkills.d.ts.map +1 -0
- package/script/src/cli/projectSkills.js +606 -0
- package/script/src/files/client.d.ts +29 -0
- package/script/src/files/client.d.ts.map +1 -0
- package/script/src/files/client.js +45 -0
- package/script/src/files/errors.d.ts +37 -0
- package/script/src/files/errors.d.ts.map +1 -0
- package/script/src/files/errors.js +76 -0
- package/script/src/files/hash.d.ts +15 -0
- package/script/src/files/hash.d.ts.map +1 -0
- package/script/src/files/hash.js +89 -0
- package/script/src/files/memory.d.ts +29 -0
- package/script/src/files/memory.d.ts.map +1 -0
- package/script/src/files/memory.js +113 -0
- package/script/src/files/metadata.d.ts +10 -0
- package/script/src/files/metadata.d.ts.map +1 -0
- package/script/src/files/metadata.js +189 -0
- package/script/src/files/mod.d.ts +10 -0
- package/script/src/files/mod.d.ts.map +1 -0
- package/script/src/files/mod.js +25 -0
- package/script/src/files/s3.d.ts +29 -0
- package/script/src/files/s3.d.ts.map +1 -0
- package/script/src/files/s3.js +110 -0
- package/script/src/files/service.d.ts +27 -0
- package/script/src/files/service.d.ts.map +1 -0
- package/script/src/files/service.js +139 -0
- package/script/src/files/types.d.ts +134 -0
- package/script/src/files/types.d.ts.map +1 -0
- package/script/src/files/types.js +2 -0
- package/script/src/jobs/catalog.d.ts +32 -0
- package/script/src/jobs/catalog.d.ts.map +1 -0
- package/script/src/jobs/catalog.js +223 -0
- package/script/src/jobs/controller.d.ts +28 -0
- package/script/src/jobs/controller.d.ts.map +1 -0
- package/script/src/jobs/controller.js +100 -0
- package/script/src/jobs/direct.d.ts +36 -0
- package/script/src/jobs/direct.d.ts.map +1 -0
- package/script/src/jobs/direct.js +128 -0
- package/script/src/jobs/events.d.ts +15 -0
- package/script/src/jobs/events.d.ts.map +1 -0
- package/script/src/jobs/events.js +37 -0
- package/script/src/jobs/format.d.ts +16 -0
- package/script/src/jobs/format.d.ts.map +1 -0
- package/script/src/jobs/format.js +193 -0
- package/script/src/jobs/http.d.ts +22 -0
- package/script/src/jobs/http.d.ts.map +1 -0
- package/script/src/jobs/http.js +50 -0
- package/script/src/jobs/log.d.ts +2 -0
- package/script/src/jobs/log.d.ts.map +1 -0
- package/script/src/jobs/log.js +13 -0
- package/script/src/jobs/mod.d.ts +10 -0
- package/script/src/jobs/mod.d.ts.map +1 -0
- package/script/src/jobs/mod.js +25 -0
- package/script/src/jobs/run.d.ts +20 -0
- package/script/src/jobs/run.d.ts.map +1 -0
- package/script/src/jobs/run.js +61 -0
- package/script/src/jobs/types.d.ts +31 -0
- package/script/src/jobs/types.d.ts.map +1 -0
- package/script/src/jobs/types.js +2 -0
- package/script/src/mui/apiKeys.d.ts +65 -0
- package/script/src/mui/apiKeys.d.ts.map +1 -0
- package/script/src/mui/apiKeys.js +327 -0
- package/script/src/mui/apiKeysView.d.ts +48 -0
- package/script/src/mui/apiKeysView.d.ts.map +1 -0
- package/script/src/mui/apiKeysView.js +40 -0
- package/script/src/mui/confirm.d.ts +12 -0
- package/script/src/mui/confirm.d.ts.map +1 -0
- package/script/src/mui/confirm.js +85 -0
- package/script/src/mui/mod.d.ts +4 -0
- package/script/src/mui/mod.d.ts.map +1 -0
- package/script/src/mui/mod.js +19 -0
- package/script/src/next/apiKeys/mod.d.ts +64 -0
- package/script/src/next/apiKeys/mod.d.ts.map +1 -0
- package/script/src/next/apiKeys/mod.js +224 -0
- package/script/src/next/auth/config.d.ts +34 -0
- package/script/src/next/auth/config.d.ts.map +1 -0
- package/script/src/next/auth/config.js +142 -0
- package/script/src/next/auth/mod.d.ts +3 -0
- package/script/src/next/auth/mod.d.ts.map +1 -0
- package/script/src/next/auth/mod.js +18 -0
- package/script/src/next/auth/server.d.ts +28 -0
- package/script/src/next/auth/server.d.ts.map +1 -0
- package/script/src/next/auth/server.js +27 -0
- package/script/src/next/files/mod.d.ts +3 -0
- package/script/src/next/files/mod.d.ts.map +1 -0
- package/script/src/next/files/mod.js +18 -0
- package/script/src/next/files/route.d.ts +99 -0
- package/script/src/next/files/route.d.ts.map +1 -0
- package/script/src/next/files/route.js +353 -0
- package/script/src/next/jobs/list.d.ts +25 -0
- package/script/src/next/jobs/list.d.ts.map +1 -0
- package/script/src/next/jobs/list.js +48 -0
- package/script/src/next/jobs/mod.d.ts +6 -0
- package/script/src/next/jobs/mod.d.ts.map +1 -0
- package/script/src/next/jobs/mod.js +21 -0
- package/script/src/next/jobs/paths.d.ts +14 -0
- package/script/src/next/jobs/paths.d.ts.map +1 -0
- package/script/src/next/jobs/paths.js +47 -0
- package/script/src/next/jobs/route.d.ts +48 -0
- package/script/src/next/jobs/route.d.ts.map +1 -0
- package/script/src/next/jobs/route.js +105 -0
- package/script/src/next/jobs/run.d.ts +51 -0
- package/script/src/next/jobs/run.d.ts.map +1 -0
- package/script/src/next/jobs/run.js +570 -0
- package/script/src/next/jobs/stream.d.ts +3 -0
- package/script/src/next/jobs/stream.d.ts.map +1 -0
- package/script/src/next/jobs/stream.js +28 -0
- package/script/src/next/pwa/mod.d.ts +104 -0
- package/script/src/next/pwa/mod.d.ts.map +1 -0
- package/script/src/next/pwa/mod.js +192 -0
- package/script/src/next/pwa/worker.d.ts +27 -0
- package/script/src/next/pwa/worker.d.ts.map +1 -0
- package/script/src/next/pwa/worker.js +33 -0
- package/skills/loom/SKILL.md +200 -0
- package/skills/loom-api-keys/SKILL.md +123 -0
- package/skills/loom-auth/SKILL.md +70 -0
- package/skills/loom-db/SKILL.md +94 -0
- package/skills/loom-db/references/db-stack.md +39 -0
- package/skills/loom-files/SKILL.md +97 -0
- package/skills/loom-jobs/SKILL.md +148 -0
- package/skills/upgrade-deps/SKILL.md +165 -0
- package/skills/upgrade-deps/agents/openai.yaml +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
# loom
|
|
2
|
+
|
|
3
|
+
Deno-first shared helpers for extracting common code from multiple Next.js apps.
|
|
4
|
+
|
|
5
|
+
This repo currently still lives in the `gadicc` directory, but the package name
|
|
6
|
+
is `@gadicc/loom` and the intended CLI name is `loom`.
|
|
7
|
+
|
|
8
|
+
## Project status and support
|
|
9
|
+
|
|
10
|
+
Loom is primarily developed for the maintainer's own commercial and open source
|
|
11
|
+
applications. Others are welcome to use it, but it is provided without warranty
|
|
12
|
+
and without any commitment to support, compatibility, maintenance periods, or a
|
|
13
|
+
particular roadmap. Releases follow semantic versioning so independently pinned
|
|
14
|
+
consumer apps can upgrade deliberately.
|
|
15
|
+
|
|
16
|
+
Security issues should be reported privately as described in
|
|
17
|
+
[`SECURITY.md`](SECURITY.md), not through a public issue.
|
|
18
|
+
|
|
19
|
+
Current feature set:
|
|
20
|
+
|
|
21
|
+
- shared DB stack scaffolding for Neon/Drizzle/Valibot/PGlite consumers
|
|
22
|
+
- shared jobs framework primitives for app-local `src/jobs` implementations
|
|
23
|
+
- shared Next.js App Router jobs adapters for list pages, run pages, and route
|
|
24
|
+
handlers
|
|
25
|
+
- auditable, scope-agnostic API-key authorization with an app-owned Better Auth
|
|
26
|
+
adapter, managed audit schema, explicit jobs integration, optional MUI UI,
|
|
27
|
+
Vercel country/IP snapshots, and bounded retention
|
|
28
|
+
- a Loom-managed env runner for non-Next commands that need the same `.env*`
|
|
29
|
+
semantics as Next
|
|
30
|
+
- Deno tests with BDD-style assertions
|
|
31
|
+
- npm package generation via `dnt`
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
Copyright © 2026 Gadi Cohen. Licensed under the [Apache License 2.0](LICENSE).
|
|
36
|
+
|
|
37
|
+
The license includes warranty disclaimers and a limitation of liability;
|
|
38
|
+
consumers remain responsible for determining whether Loom is appropriate for
|
|
39
|
+
their applications.
|
|
40
|
+
|
|
41
|
+
Loom does not redistribute third-party agent skills. Its metadata-only catalog
|
|
42
|
+
records reviewed upstream revisions and license evidence; consumer projects
|
|
43
|
+
choose and cache the corresponding content directly from upstream.
|
|
44
|
+
|
|
45
|
+
## Public npm package
|
|
46
|
+
|
|
47
|
+
Loom's public distribution is `@gadicc/loom` on npm:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pnpm add @gadicc/loom
|
|
51
|
+
# or: npm install @gadicc/loom
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Consumer projects do not need registry mappings or package-read tokens.
|
|
55
|
+
|
|
56
|
+
Maintainer bootstrap, trusted-publisher configuration, release verification, and
|
|
57
|
+
consumer migration are documented in
|
|
58
|
+
[`docs/npm-publishing.md`](docs/npm-publishing.md).
|
|
59
|
+
|
|
60
|
+
## CLI
|
|
61
|
+
|
|
62
|
+
`loom` now includes a small bootstrap CLI and feature-scaffolding entrypoint.
|
|
63
|
+
|
|
64
|
+
- `loom init` adds `@gadicc/loom` to `package.json`, creates or updates
|
|
65
|
+
`loom.json`, refreshes the managed Loom bootstrap block in `AGENTS.md`, and
|
|
66
|
+
ensures the managed `.agents/skills/*` links point at the installed
|
|
67
|
+
`@gadicc/loom` package, activates skills exposed by installed npm packages,
|
|
68
|
+
and configures version-matched Next.js guidance when supported by the
|
|
69
|
+
installed Next version.
|
|
70
|
+
- `loom add` lists the shared features that the CLI can activate and shows a
|
|
71
|
+
short description for each one.
|
|
72
|
+
- `loom add <feature>` activates one shared feature in `loom.json` and applies
|
|
73
|
+
that feature's scaffolding without overwriting app-local wrappers.
|
|
74
|
+
- `loom add jobs` activates the shared jobs feature in `loom.json` and scaffolds
|
|
75
|
+
any missing local jobs/admin route files without overwriting existing
|
|
76
|
+
app-local wrappers, while also enabling the `loom-jobs` skill link.
|
|
77
|
+
- `loom add db` activates the shared DB feature in `loom.json`, adds the managed
|
|
78
|
+
DB dependencies and scripts to `package.json`, rewrites the standard `neon.ts`
|
|
79
|
+
/ `neonFull.ts` / `drizzle.config.ts` / PGlite test harness files into
|
|
80
|
+
Loom-managed thin wrappers, scaffolds the app-local fixture script entrypoint,
|
|
81
|
+
and enables the `loom-db` skill link.
|
|
82
|
+
- `loom add files` activates the shared files schema contract after the DB
|
|
83
|
+
feature is active. It materializes the Loom-managed Drizzle schema blueprint
|
|
84
|
+
into an app-local committed schema file, records the blueprint version and
|
|
85
|
+
hash in `loom.json`, scaffolds app-local repository/storage/access/route
|
|
86
|
+
files, and leaves migration generation to the app's normal `db:generate`
|
|
87
|
+
review flow.
|
|
88
|
+
- `loom files r2 setup` creates or reuses private Cloudflare R2 buckets for
|
|
89
|
+
Production and Preview, records the explicit Cloudflare account and storage
|
|
90
|
+
policy in `loom.json`, replaces only the untouched generated storage stub,
|
|
91
|
+
configures canonical `FILES_S3_*` values in Vercel, and configures local MinIO
|
|
92
|
+
in `.env.local` by default. Use `--local-provider r2` for deliberately shared
|
|
93
|
+
development storage or `--local-provider none` to leave local storage unwired.
|
|
94
|
+
Existing custom storage modules and credentials are preserved.
|
|
95
|
+
- `loom files r2 check` verifies the selected Cloudflare account, bucket
|
|
96
|
+
existence and private access, exact non-secret Vercel values in Production and
|
|
97
|
+
Preview, the absence of Files credentials in Vercel Development, and the
|
|
98
|
+
configured local MinIO endpoint/bucket. The same checks run through
|
|
99
|
+
`loom check --network`.
|
|
100
|
+
- `loom add api-keys` requires active auth and DB features, materializes the
|
|
101
|
+
versioned audit schema, scaffolds fail-safe policy/verifier/repository/action
|
|
102
|
+
boundaries and user/admin pages, and links the `loom-api-keys` skill. It does
|
|
103
|
+
not authorize existing routes, change jobs, or generate migrations.
|
|
104
|
+
- `@gadicc/loom/apiKeys` provides typed scope registries, exact-match policy
|
|
105
|
+
dispatch, credential extraction, fingerprints, authorization/audit contracts,
|
|
106
|
+
country normalization, and bounded audit retention.
|
|
107
|
+
`@gadicc/loom/next/apiKeys` adds App Router authorization, session-or-key
|
|
108
|
+
composition, completion auditing, and explicit Vercel request context.
|
|
109
|
+
`@gadicc/loom/mui/apiKeys` provides optional lifecycle and audit UI.
|
|
110
|
+
- `loom api-keys integrate jobs --resource <name> --action <name>` records an
|
|
111
|
+
explicit additive jobs authorization integration after the app has protected
|
|
112
|
+
its HTTP jobs route with fresh session/admin policy. Direct local runners are
|
|
113
|
+
unchanged and remain API-key-free.
|
|
114
|
+
- `loom api-keys retention enable` records the default 180-day/5,000-request
|
|
115
|
+
retention policy. The app must transactionally implement the retention
|
|
116
|
+
repository and schedule the shared runner; Loom does not silently create or
|
|
117
|
+
modify jobs. Use `retention disable` for an app-owned legal-hold workflow.
|
|
118
|
+
- `@gadicc/loom/files` provides the shared files runtime primitives: SHA-256
|
|
119
|
+
hashing, digest verification, metadata detection, repository/storage adapter
|
|
120
|
+
contracts, in-memory test adapters, and headless upload helpers.
|
|
121
|
+
- `@gadicc/loom/files/s3` adapts an app-provided AWS SDK v3 S3 client to the
|
|
122
|
+
shared storage contract without making AWS SDK packages Loom dependencies.
|
|
123
|
+
- `@gadicc/loom/next/files` provides App Router route-handler factories for
|
|
124
|
+
uploads, metadata lookup, and downloads over app-provided persistence and
|
|
125
|
+
storage adapters.
|
|
126
|
+
- `loom add pwa` activates the shared Serwist PWA feature, adds the Serwist
|
|
127
|
+
dependencies and build script, scaffolds configurator-mode
|
|
128
|
+
`serwist.config.mjs` plus worker/provider files, records whether the update
|
|
129
|
+
prompt should use the MUI adapter or browser fallback, adds a 60-second update
|
|
130
|
+
check interval for MUI installs, and ignores generated service-worker output.
|
|
131
|
+
- `loom add skills` adopts matching reviewed external skills into the gitignored
|
|
132
|
+
`.loom/skills` cache, records exact revisions and content hashes in
|
|
133
|
+
`loom-skills.lock.json`, and activates package-provided skills.
|
|
134
|
+
- `loom status` summarizes the installed Loom package, `loom.json` state, active
|
|
135
|
+
features, local-dev sync state, and managed/recommended skill links.
|
|
136
|
+
- `loom env -- <command> [...args]` loads the consumer project `.env*` files
|
|
137
|
+
with Next-compatible `@next/env` semantics, preserves existing shell env
|
|
138
|
+
precedence, then runs the command from the consumer project root. Use it for
|
|
139
|
+
non-Next commands such as direct job runners, Drizzle, ad hoc DB inspection,
|
|
140
|
+
and app scripts that need env. Next commands such as `next dev` and
|
|
141
|
+
`next build` already load `.env*` themselves.
|
|
142
|
+
- `loom skills check` validates the project lock, external cache, and activation
|
|
143
|
+
links.
|
|
144
|
+
- `loom skills update` updates adopted external skills to Loom's current
|
|
145
|
+
reviewed immutable revisions.
|
|
146
|
+
- `loom skills disable <name>` opts out of automatic activation; `enable` clears
|
|
147
|
+
the opt-out and `sync` reactivates the skill.
|
|
148
|
+
- `loom db fixtures` runs the Loom-managed DB fixture dump entrypoint for the
|
|
149
|
+
active DB feature, using the configured `scripts/dump-test-tables.ts` and
|
|
150
|
+
scripts tsconfig.
|
|
151
|
+
- `loom db schema-gen` runs the Loom-managed `vs_tocode` workflow for the active
|
|
152
|
+
DB feature and then refreshes the Valibot barrel file. Pass extra generator
|
|
153
|
+
flags after `--`, for example `loom db schema-gen -- --watch`.
|
|
154
|
+
- `loom db schemas sync` re-materializes active Loom-managed schema blueprints
|
|
155
|
+
into app-local schema files only when the file still matches the last recorded
|
|
156
|
+
Loom hash. It refuses to overwrite local edits, updates simple schema barrel
|
|
157
|
+
exports, and never generates Drizzle migrations.
|
|
158
|
+
- `loom db neon setup` provisions a Vercel-managed Neon database for the active
|
|
159
|
+
DB feature, connects it to the linked Vercel project for Production and
|
|
160
|
+
Preview only, skips local env pulling, and records the provider policy in
|
|
161
|
+
`loom.json`.
|
|
162
|
+
- `loom db neon check` runs only the DB/Neon network checks: Vercel CLI
|
|
163
|
+
availability, project linking, Neon resource connection, Production/Preview DB
|
|
164
|
+
env vars, and the absence of DB env vars in Development.
|
|
165
|
+
- `loom db release setup-github` creates/updates the GitHub `production`
|
|
166
|
+
environment for staged Vercel releases: it stores `VERCEL_ORG_ID` and
|
|
167
|
+
`VERCEL_PROJECT_ID`, creates a Vercel token scoped to the linked Vercel team,
|
|
168
|
+
and saves that token as the GitHub `VERCEL_TOKEN` environment secret.
|
|
169
|
+
- `loom dev local /path/to/loom` enables local unpublished Loom development in a
|
|
170
|
+
pnpm app by adding a managed `file:` marker override for `@gadicc/loom` to
|
|
171
|
+
`pnpm-workspace.yaml`, then running the local-dev sync flow when needed.
|
|
172
|
+
- `loom dev sync` rebuilds the local Loom package when source files are newer
|
|
173
|
+
than the generated npm output, then refreshes the consuming app with
|
|
174
|
+
`pnpm update --no-save @gadicc/loom@file:/...` and `pnpm install` when the
|
|
175
|
+
installed file dependency is stale. Other Loom commands also run this sync
|
|
176
|
+
automatically when the managed local-dev override is active; pass `--no-sync`
|
|
177
|
+
to skip it. Each sync records the Loom source commit in the managed
|
|
178
|
+
`pnpm-workspace.yaml` block and gitignored `.loom/dev-state.json` when the
|
|
179
|
+
local package path points at a Loom git checkout.
|
|
180
|
+
- `loom dev published` removes that managed local-dev override so the app can
|
|
181
|
+
return to the published package version. When a prior sync recorded a Loom
|
|
182
|
+
source commit, this command verifies that the commit is reachable from
|
|
183
|
+
`origin/main` and either included in a semver release tag or
|
|
184
|
+
package-equivalent to the latest semver release because only non-package files
|
|
185
|
+
changed after that tag. It then switches the app to the exact published
|
|
186
|
+
`@gadicc/loom` version that covers the sync. If no recorded commit exists, the
|
|
187
|
+
command preserves the older compatibility behavior and switches back to the
|
|
188
|
+
existing published dependency with an explicit warning. The command also
|
|
189
|
+
notices stale lockfiles that still resolve Loom to a local package even after
|
|
190
|
+
the workspace override has been removed.
|
|
191
|
+
- `loom check` verifies `package.json`, `loom.json`, the managed `AGENTS.md`
|
|
192
|
+
block and `.agents/skills/*` links, and then runs feature-specific checks for
|
|
193
|
+
active entries in `loom.json`, including jobs-wrapper validation plus DB
|
|
194
|
+
runtime, script, Valibot-barrel wiring, and the production migration release
|
|
195
|
+
flow for active DB installs, managed local schema validation for active files
|
|
196
|
+
installs, and Serwist package, worker, provider, update-check interval,
|
|
197
|
+
MUI-confirm, and build-script wiring for active PWA installs. The DB
|
|
198
|
+
release-flow check expects Vercel automatic production Git deployments to be
|
|
199
|
+
disabled in `vercel.json` and a GitHub Actions workflow to pull Vercel
|
|
200
|
+
production settings, build, upload a staged prebuilt production deployment,
|
|
201
|
+
run `db:migrate` through `vercel env run -e production`, then promote the
|
|
202
|
+
staged deployment. `loom check --network` also verifies the required GitHub
|
|
203
|
+
release secret/variables when that workflow exists. When
|
|
204
|
+
`.github/workflows/*.yml|yaml` still contains Loom's obsolete GitHub Packages
|
|
205
|
+
registry/auth setup, `loom check` recommends removing it. The command also
|
|
206
|
+
activates newly discovered npm package skills with a notice, warns when the
|
|
207
|
+
managed local dev override is active, reports inline `dotenv`/`@next/env`
|
|
208
|
+
imports or DB/jobs scripts that bypass `loom env --`, and warns when
|
|
209
|
+
`pnpm-lock.yaml` still resolves Loom to local source. If
|
|
210
|
+
`.loom/dev-state.json` records a synced Loom commit, `loom check` also
|
|
211
|
+
explains whether that commit is unpublished or published in a newer exact Loom
|
|
212
|
+
version than the app is pinned to. Pass `--strict-skills` to turn missing
|
|
213
|
+
skill recommendations into check failures. Pass `--production` to make local
|
|
214
|
+
Loom dev overrides, local lockfile resolutions, unresolved synced Loom
|
|
215
|
+
commits, and DB migration release-flow gaps release-blocking failures. Pass
|
|
216
|
+
`--network` to also run registered feature network checks after the local
|
|
217
|
+
project checks.
|
|
218
|
+
|
|
219
|
+
The current CLI scope is project bootstrap, validation, and feature-specific
|
|
220
|
+
scaffolding. Extracted feature hooks are added behind the same `init`, `add`,
|
|
221
|
+
feature subcommand, and `check` flows.
|
|
222
|
+
|
|
223
|
+
### Consumer app release workflow
|
|
224
|
+
|
|
225
|
+
Consumer apps may stay in local Loom development mode during normal feature
|
|
226
|
+
work:
|
|
227
|
+
|
|
228
|
+
```sh
|
|
229
|
+
loom dev local /home/dragon/www/npm/loom
|
|
230
|
+
loom dev sync
|
|
231
|
+
loom check
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Before pushing or releasing a consumer app, switch back to the published Loom
|
|
235
|
+
package and run the production gate:
|
|
236
|
+
|
|
237
|
+
```sh
|
|
238
|
+
loom dev published
|
|
239
|
+
pnpm update --no-save @gadicc/loom@<version-from-loom-output>
|
|
240
|
+
pnpm install
|
|
241
|
+
loom check --production
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Publishing Loom is only required when the app was synced against
|
|
245
|
+
package-relevant Loom changes that are not already covered by a published semver
|
|
246
|
+
tag. Publishing a new Loom version does not move other consumer apps; each app
|
|
247
|
+
remains on its committed `package.json` and lockfile until that app deliberately
|
|
248
|
+
upgrades.
|
|
249
|
+
|
|
250
|
+
### New app DB bootstrap
|
|
251
|
+
|
|
252
|
+
For a new Vercel app that needs the shared DB stack:
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
loom init
|
|
256
|
+
loom add db
|
|
257
|
+
vercel link
|
|
258
|
+
loom db neon setup
|
|
259
|
+
loom check --network
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
`loom db neon setup` runs the Vercel Marketplace install through the Vercel CLI
|
|
263
|
+
using Production and Preview environments only. It intentionally avoids
|
|
264
|
+
Development and uses `--no-env-pull` so local `.env*` files are not populated by
|
|
265
|
+
the integration. Pass `--name <resource-name>` to override the default
|
|
266
|
+
`<project>-db` resource name, `--region <region>` to select a supported Neon
|
|
267
|
+
Marketplace region such as `sin1`, or `--plan <plan-id>` if a new Marketplace
|
|
268
|
+
installation requires a specific plan id. When Neon is already installed for the
|
|
269
|
+
team, Loom omits `--plan` and preserves that installation's current plan. Neon
|
|
270
|
+
Auth is explicitly disabled by default because Loom's auth feature uses Better
|
|
271
|
+
Auth; pass `--neon-auth` only when the app intentionally wants Neon Auth too.
|
|
272
|
+
|
|
273
|
+
Network checks are line-based for now so they remain readable in CI logs:
|
|
274
|
+
|
|
275
|
+
```text
|
|
276
|
+
[1/6] Checking Vercel CLI is available ......................... ok ✓
|
|
277
|
+
Using vercel.
|
|
278
|
+
[2/6] Checking Project is linked to Vercel ..................... ok ✓
|
|
279
|
+
Linked to Vercel project prj_...
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
When stdout is an interactive terminal, Loom uses an updating progress line with
|
|
283
|
+
a progress bar and prints only problem checks at the end. This is disabled
|
|
284
|
+
automatically in CI and can be disabled explicitly with `--no-progress`. Use
|
|
285
|
+
`--no-color` to disable colored status output.
|
|
286
|
+
|
|
287
|
+
See [`docs/network-checks.md`](docs/network-checks.md) for the hook design and
|
|
288
|
+
future expansion notes.
|
|
289
|
+
|
|
290
|
+
## AI skills
|
|
291
|
+
|
|
292
|
+
The package now publishes Codex skill folders under `skills/`.
|
|
293
|
+
|
|
294
|
+
- `skills/loom` provides global loom guidance for consumer apps, centered on
|
|
295
|
+
`loom.json`, feature activation, shared-vs-local ownership boundaries, and a
|
|
296
|
+
small set of shared consumer-repo policies such as verification,
|
|
297
|
+
documentation/comments, and commit-message expectations. Consumer repos keep
|
|
298
|
+
`AGENTS.md` small and use a managed Loom block there to route work into this
|
|
299
|
+
shared skill.
|
|
300
|
+
- `skills/upgrade-deps` provides a staged Deno and JavaScript/TypeScript
|
|
301
|
+
dependency-upgrade workflow covering compatibility groups, rollback safety,
|
|
302
|
+
failure isolation, major migrations, reviewable commits, and exact-tree final
|
|
303
|
+
verification.
|
|
304
|
+
- `skills/loom-db` provides DB-feature guidance for Neon/Drizzle wiring, managed
|
|
305
|
+
local schema blueprints, Valibot generation, and the shared PGlite harness.
|
|
306
|
+
- `skills/loom-jobs` provides jobs-feature guidance for app-local catalogs,
|
|
307
|
+
admin route wrappers, and shared helper wiring.
|
|
308
|
+
- `skills/loom-api-keys` provides API-key adoption, authorization, audit, Vercel
|
|
309
|
+
geolocation, UI mapping, jobs integration, and retention guidance.
|
|
310
|
+
|
|
311
|
+
Projects do not need to copy these files manually. `loom init`, `loom add db`,
|
|
312
|
+
`loom add jobs`, and `loom check` manage a small project-local `AGENTS.md` Loom
|
|
313
|
+
block plus `.agents/skills/*` symlinks that point to the installed
|
|
314
|
+
`node_modules/@gadicc/loom/skills/*` folders. The global `loom` and
|
|
315
|
+
`upgrade-deps` skills are linked for every initialized project; feature skills
|
|
316
|
+
are linked when their matching feature is active.
|
|
317
|
+
|
|
318
|
+
Third-party skills are not packaged with Loom. Loom carries a metadata-only
|
|
319
|
+
catalog containing source URLs, immutable commits, content hashes, and license
|
|
320
|
+
evidence. `loom add skills` installs applicable reviewed skills directly into a
|
|
321
|
+
consumer project's gitignored `.loom/skills` cache and records the selection in
|
|
322
|
+
the committed `loom-skills.lock.json`. Missing or unclear licenses require the
|
|
323
|
+
explicit `--accept-unknown-license <name>` flag. `loom skills migrate` replaces
|
|
324
|
+
legacy symlinks from older Loom releases, while preserving custom local skill
|
|
325
|
+
directories.
|
|
326
|
+
|
|
327
|
+
Loom also scans installed npm packages for a root `SKILL.md`, `skills/*`, or
|
|
328
|
+
`.agents/skills/*`. New package-provided skills are activated automatically by
|
|
329
|
+
`loom init`, `loom skills sync`, and ordinary `loom check`, with a notice that
|
|
330
|
+
includes `loom skills disable <name>` as the opt-out path.
|
|
331
|
+
|
|
332
|
+
For local Loom package development, prefer `loom dev local` and the managed
|
|
333
|
+
`file:` marker flow over `pnpm link`. `loom dev sync` owns the rebuild and pnpm
|
|
334
|
+
refresh step for that local package. When it refreshes the installed package at
|
|
335
|
+
the start of another Loom command, rerun that original command so the current
|
|
336
|
+
process uses the refreshed CLI code. This keeps the committed dependency on the
|
|
337
|
+
published version while still resolving peer dependencies correctly during local
|
|
338
|
+
development. Treat this as a workaround for current pnpm behavior rather than a
|
|
339
|
+
permanent preference; if pnpm's local-link behavior changes, this flow can be
|
|
340
|
+
simplified or removed later.
|
|
341
|
+
|
|
342
|
+
The managed local-dev block also records the Loom source commit that was synced
|
|
343
|
+
when the local package path points at a Loom git checkout, and the same state is
|
|
344
|
+
persisted in gitignored `.loom/dev-state.json` so Loom can still diagnose stale
|
|
345
|
+
local lockfiles after the workspace override has been removed.
|
|
346
|
+
`loom dev published` uses that record as a release gate: clean commits that have
|
|
347
|
+
reached `origin/main` and are either included in a semver release tag or have no
|
|
348
|
+
package-relevant changes after the latest semver tag can be switched to the
|
|
349
|
+
exact published version, while dirty or unreleased package changes block the
|
|
350
|
+
switch. Existing apps with older local-dev blocks that lack this metadata can
|
|
351
|
+
still switch back to their current published dependency, but new syncs should be
|
|
352
|
+
used before relying on the release gate.
|
|
353
|
+
|
|
354
|
+
Loom's external catalog currently recommends these defaults:
|
|
355
|
+
|
|
356
|
+
- `ai-sdk`
|
|
357
|
+
- `find-skills`
|
|
358
|
+
- `frontend-design`
|
|
359
|
+
- `vercel-composition-patterns`
|
|
360
|
+
- `vercel-react-best-practices`
|
|
361
|
+
|
|
362
|
+
It adds these dependency-matched recommendations:
|
|
363
|
+
|
|
364
|
+
- `better-auth-best-practices` for projects that depend on Better Auth packages
|
|
365
|
+
- `pnpm` for projects that use pnpm
|
|
366
|
+
- `vitest` for projects that use Vitest
|
|
367
|
+
|
|
368
|
+
Next.js is handled separately because current Next releases ship documentation
|
|
369
|
+
matching the installed framework version under `node_modules/next/dist/docs`.
|
|
370
|
+
Loom adds a managed `AGENTS.md` pointer to those docs. Older Next releases can
|
|
371
|
+
use the official `npx @next/codemod@latest agents-md` fallback; migration
|
|
372
|
+
removes the retired `next-best-practices` symlink.
|
|
373
|
+
|
|
374
|
+
See [`docs/project-skills.md`](docs/project-skills.md) for lock/cache semantics,
|
|
375
|
+
package discovery, opt-outs, collision behavior, and migration details.
|
|
376
|
+
|
|
377
|
+
## Jobs framework
|
|
378
|
+
|
|
379
|
+
The shared jobs code is designed so each app keeps its own jobs in
|
|
380
|
+
`src/jobs/*.ts`, while the shared package owns the common controller, catalog,
|
|
381
|
+
execution, formatting, and direct-run helpers. Keep metadata in a
|
|
382
|
+
dependency-free module and use `createLazyJob` in the executable catalog so
|
|
383
|
+
constructing an HTTP or direct-run catalog does not initialize every job's
|
|
384
|
+
transitive dependencies.
|
|
385
|
+
|
|
386
|
+
Example app-local job:
|
|
387
|
+
|
|
388
|
+
```ts
|
|
389
|
+
import type { Job } from "@gadicc/loom/jobs";
|
|
390
|
+
import { testMeta as meta } from "./indexWithMetaOnly";
|
|
391
|
+
|
|
392
|
+
export { meta };
|
|
393
|
+
|
|
394
|
+
export const handler: Job["handler"] = async (job) => {
|
|
395
|
+
job.log("hello");
|
|
396
|
+
};
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Example dependency-free metadata and lazy catalog entry:
|
|
400
|
+
|
|
401
|
+
```ts
|
|
402
|
+
// indexWithMetaOnly.ts
|
|
403
|
+
import type { Job } from "@gadicc/loom/jobs";
|
|
404
|
+
|
|
405
|
+
export const testMeta: Job["meta"] = {
|
|
406
|
+
id: "test",
|
|
407
|
+
desc: "Example job",
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
// index.ts
|
|
411
|
+
import { createLazyJob } from "@gadicc/loom/jobs";
|
|
412
|
+
import { testMeta } from "./indexWithMetaOnly";
|
|
413
|
+
|
|
414
|
+
export const test = createLazyJob(testMeta, () => import("./test"));
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
For the strongest Next.js deployment boundary, mount jobs in static route files
|
|
418
|
+
with `createJobRouteHandler({ job })`. A dynamic `[id]` route is one serverless
|
|
419
|
+
function and therefore still traces every implementation reachable from its
|
|
420
|
+
catalog, even when `createLazyJob` prevents unrelated modules from evaluating at
|
|
421
|
+
runtime.
|
|
422
|
+
|
|
423
|
+
Loom can manage those file-based entrypoints from the Jobs config in
|
|
424
|
+
`loom.json`:
|
|
425
|
+
|
|
426
|
+
```json
|
|
427
|
+
{
|
|
428
|
+
"staticRoutes": {
|
|
429
|
+
"handlerFactoryExport": "createHttpJobRouteHandler",
|
|
430
|
+
"jobs": {
|
|
431
|
+
"example": "@/jobs/example",
|
|
432
|
+
"short-example": {
|
|
433
|
+
"module": "@/jobs/short-example",
|
|
434
|
+
"maxDuration": 300
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"maxDuration": 1800,
|
|
438
|
+
"routeDirectory": "src/app/admin/jobs"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Run `loom add jobs` after changing the map. Loom creates, updates, and removes
|
|
444
|
+
only wrappers bearing its managed marker; an existing unmanaged route is
|
|
445
|
+
preserved and reported. `loom check` verifies the generated set and its direct
|
|
446
|
+
literal `maxDuration` exports. The default is Vercel's current 30-minute maximum
|
|
447
|
+
of `1800`, while `staticRoutes.maxDuration` and each job's optional
|
|
448
|
+
`maxDuration` override keep shorter limits explicit and checkable.
|