Rename loom → norn
The project is now norn: .loom/ is .norn/, loomctl is nornctl (NORNCTL_* env vars, ~/.config/nornctl), and the Gitea org is norn. Event logs moved with the directory but their text is unchanged — they are a record of what was decided at the time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6354c95fa
commit
dde7183528
36 files changed
+216
-216
No files matched your search
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
# cart v1: a cart is not committed. Ignored, gone means gone.
|
# cart v1: a cart is not committed. Ignored, gone means gone.
|
||||||
.loom/cart/
|
.norn/cart/
|
||||||
|
|
||||||
# build output
|
# build output
|
||||||
/loomctl
|
/nornctl
|
||||||
Vendored
-14
@@ -1,14 +0,0 @@
|
|||||||
# loomctl locks — one record per adopted document.
|
|
||||||
# path<TAB>url<TAB>etag[<TAB>visibility]
|
|
||||||
# The url is resolved: a short form would follow whatever the default branch
|
|
||||||
# is at the time you ask. visibility is what the source could be read as when
|
|
||||||
# it was fetched, because that is checked once and the copy is durable.
|
|
||||||
git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.md https://git.hypertheory-labs.dev/jeffry/homelab-cluster/raw/branch/main/.loom/published/gitea.md "530c5bef62bbd325956ed170bb2decf37975e4b9" public
|
|
||||||
git.hypertheory-labs.dev/loom/annotating/annotating.md https://git.hypertheory-labs.dev/loom/annotating/raw/branch/main/.loom/published/annotating.md "9b1f7e6ca92f2339b2d433686c27845362944bdb" public
|
|
||||||
git.hypertheory-labs.dev/loom/bedrock/loom-directory.md https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/loom-directory.md "ee0f49cb900c0812678061971194325d9cba366a" public
|
|
||||||
git.hypertheory-labs.dev/loom/bedrock/publication.md https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/publication.md "c0d9231aa8eed3041c60b72da5735585457fbc90" public
|
|
||||||
git.hypertheory-labs.dev/loom/bedrock/recording-decisions.md https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/recording-decisions.md "d190eeae7929b9a99ecf09211d94e7e5b32635bd" public
|
|
||||||
git.hypertheory-labs.dev/loom/bedrock/sibling-facets.md https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/sibling-facets.md "a46446a34ccb8bfc533d3cce19f4c88548c4fa04" public
|
|
||||||
git.hypertheory-labs.dev/loom/bedrock/starting.md https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/starting.md "b9eefba0f4668a496ccfc6a1377277f0721456d2" public
|
|
||||||
git.hypertheory-labs.dev/loom/cart/cart.md https://git.hypertheory-labs.dev/loom/cart/raw/branch/main/.loom/published/cart.md "15331f1a9cc81bf61a44830cfbb7c274f4c2b119" public
|
|
||||||
git.hypertheory-labs.dev/loom/externals/externals.md https://git.hypertheory-labs.dev/loom/externals/raw/branch/main/.loom/published/externals.md "50673ccffc14d57150ac0a9027b0712d9dcf940d"
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
<!-- Generated by `loomctl orient`. Safe to overwrite; nobody typed it.
|
|
||||||
Regenerate after adopting a document or reconciling a change. -->
|
|
||||||
|
|
||||||
# What this repository depends on
|
|
||||||
|
|
||||||
Copies of other people's documents are kept under `.loom/externals/`, at a path
|
|
||||||
that says where each came from. **They are copies: do not edit them.** Anything
|
|
||||||
you want to say about one goes in a file *beside* it, never into it.
|
|
||||||
|
|
||||||
Three moves, and each has a document that owns the rule:
|
|
||||||
|
|
||||||
- **A copy is wrong, or you needed something it does not say** — write it in
|
|
||||||
`<name>.gaps.md` beside the copy.
|
|
||||||
- **What of ours depends on a copy** — write it in `<name>.usages.md` beside it.
|
|
||||||
- **A source changed** — `loomctl external check` says so and stages the new copy;
|
|
||||||
`loomctl external apply` takes it. Neither edits anything on its own.
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/jeffry/homelab-cluster/raw/branch/main/.loom/published/gitea.md
|
|
||||||
- what of ours depends on it: `.loom/externals/git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/annotating/annotating.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/annotating/raw/branch/main/.loom/published/annotating.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
- what we expected and did not find: `.loom/externals/git.hypertheory-labs.dev/loom/annotating/annotating.gaps.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/bedrock/loom-directory.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/loom-directory.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/bedrock/publication.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/publication.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/bedrock/recording-decisions.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/recording-decisions.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/bedrock/sibling-facets.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/sibling-facets.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/bedrock/starting.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/starting.md
|
|
||||||
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/cart/cart.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/cart/raw/branch/main/.loom/published/cart.md
|
|
||||||
- what of ours depends on it: `.loom/externals/git.hypertheory-labs.dev/loom/cart/cart.usages.md`
|
|
||||||
- what we expected and did not find: `.loom/externals/git.hypertheory-labs.dev/loom/cart/cart.gaps.md`
|
|
||||||
|
|
||||||
## `git.hypertheory-labs.dev/loom/externals/externals.md`
|
|
||||||
|
|
||||||
- source: https://git.hypertheory-labs.dev/loom/externals/raw/branch/main/.loom/published/externals.md
|
|
||||||
- what of ours depends on it: `.loom/externals/git.hypertheory-labs.dev/loom/externals/externals.usages.md`
|
|
||||||
|
|
||||||
## This repository publishes
|
|
||||||
|
|
||||||
See `.loom/published/`. What is handed over for others to depend on is
|
|
||||||
there; the rest of the repository is not hidden, it is simply not what
|
|
||||||
anybody depends on.
|
|
||||||
File renamed without changes.
Vendored
+14
@@ -0,0 +1,14 @@
|
|||||||
|
# nornctl locks — one record per adopted document.
|
||||||
|
# path<TAB>url<TAB>etag[<TAB>visibility]
|
||||||
|
# The url is resolved: a short form would follow whatever the default branch
|
||||||
|
# is at the time you ask. visibility is what the source could be read as when
|
||||||
|
# it was fetched, because that is checked once and the copy is durable.
|
||||||
|
git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.md https://git.hypertheory-labs.dev/jeffry/homelab-cluster/raw/branch/main/.norn/published/gitea.md "530c5bef62bbd325956ed170bb2decf37975e4b9" public
|
||||||
|
git.hypertheory-labs.dev/norn/annotating/annotating.md https://git.hypertheory-labs.dev/norn/annotating/raw/branch/main/.norn/published/annotating.md "9b1f7e6ca92f2339b2d433686c27845362944bdb" public
|
||||||
|
git.hypertheory-labs.dev/norn/bedrock/norn-directory.md https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/norn-directory.md "ee0f49cb900c0812678061971194325d9cba366a" public
|
||||||
|
git.hypertheory-labs.dev/norn/bedrock/publication.md https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/publication.md "c0d9231aa8eed3041c60b72da5735585457fbc90" public
|
||||||
|
git.hypertheory-labs.dev/norn/bedrock/recording-decisions.md https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/recording-decisions.md "d190eeae7929b9a99ecf09211d94e7e5b32635bd" public
|
||||||
|
git.hypertheory-labs.dev/norn/bedrock/sibling-facets.md https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/sibling-facets.md "a46446a34ccb8bfc533d3cce19f4c88548c4fa04" public
|
||||||
|
git.hypertheory-labs.dev/norn/bedrock/starting.md https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/starting.md "b9eefba0f4668a496ccfc6a1377277f0721456d2" public
|
||||||
|
git.hypertheory-labs.dev/norn/cart/cart.md https://git.hypertheory-labs.dev/norn/cart/raw/branch/main/.norn/published/cart.md "15331f1a9cc81bf61a44830cfbb7c274f4c2b119" public
|
||||||
|
git.hypertheory-labs.dev/norn/externals/externals.md https://git.hypertheory-labs.dev/norn/externals/raw/branch/main/.norn/published/externals.md "50673ccffc14d57150ac0a9027b0712d9dcf940d"
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# The git host
|
# The git host
|
||||||
|
|
||||||
**`git.hypertheory-labs.dev`**, on the public internet, with a real certificate.
|
**`git.hypertheory-labs.dev`**, on the public internet, with a real certificate.
|
||||||
**This is where the `loom/*` repositories live.**
|
**This is where the `norn/*` repositories live.**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@ problem rather than a wrong port."** *It named the failure before it happened.*
|
|||||||
## What we use
|
## What we use
|
||||||
|
|
||||||
**SSH is on `2222`, and a clone URL without the port fails as an auth error.**
|
**SSH is on `2222`, and a clone URL without the port fails as an auth error.**
|
||||||
*Used by anybody working in this repository by hand.* **Not used by `loomctl`** —
|
*Used by anybody working in this repository by hand.* **Not used by `nornctl`** —
|
||||||
*every transport it has is HTTPS on 443* — **which is worth saying, because it is
|
*every transport it has is HTTPS on 443* — **which is worth saying, because it is
|
||||||
the difference between a fact for people and a fact for the tool.**
|
the difference between a fact for people and a fact for the tool.**
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
# The `.loom` directory
|
# The `.norn` directory
|
||||||
|
|
||||||
**A repository that uses loom keeps everything in `.loom/` at its root.**
|
**A repository that uses norn keeps everything in `.norn/` at its root.**
|
||||||
|
|
||||||
> **Type is determined by location.** *The directory a file is in says what it
|
> **Type is determined by location.** *The directory a file is in says what it
|
||||||
> is.* **So frontmatter carries almost nothing, and often nothing at all.**
|
> is.* **So frontmatter carries almost nothing, and often nothing at all.**
|
||||||
@@ -15,8 +15,8 @@ fails on an unfamiliar directory is wrong.*
|
|||||||
|
|
||||||
## What is fixed
|
## What is fixed
|
||||||
|
|
||||||
**Only `.loom/` itself, and that a directory means a kind.** *Which kinds exist
|
**Only `.norn/` itself, and that a directory means a kind.** *Which kinds exist
|
||||||
is not fixed here — conventions built on this one declare their own, and a
|
is not fixed here — conventions built on this one declare their own, and a
|
||||||
repository has only the ones it uses.*
|
repository has only the ones it uses.*
|
||||||
|
|
||||||
**Nothing outside `.loom/` is loom's business.**
|
**Nothing outside `.norn/` is norn's business.**
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
# Publication
|
# Publication
|
||||||
|
|
||||||
**What a repository has handed over for others to depend on lives in
|
**What a repository has handed over for others to depend on lives in
|
||||||
`.loom/published/`.**
|
`.norn/published/`.**
|
||||||
|
|
||||||
> **Publishing is a change of kind, not a change of status.** *An unpublished
|
> **Publishing is a change of kind, not a change of status.** *An unpublished
|
||||||
> document is an implementation detail you may rename at will. **A published one
|
> document is an implementation detail you may rename at will. **A published one
|
||||||
@@ -12,12 +12,12 @@ is a diff that shows up in review.** *A flag in frontmatter is a line nobody
|
|||||||
notices; this is the moment a thing becomes somebody else's problem, and it
|
notices; this is the moment a thing becomes somebody else's problem, and it
|
||||||
should be unmissable.*
|
should be unmissable.*
|
||||||
|
|
||||||
**`ls .loom/published/` is *what have we committed to?*** — and it is the question
|
**`ls .norn/published/` is *what have we committed to?*** — and it is the question
|
||||||
to ask before changing anything.
|
to ask before changing anything.
|
||||||
|
|
||||||
## Publishing is not an act you can complete alone
|
## Publishing is not an act you can complete alone
|
||||||
|
|
||||||
**A file in `.loom/published/` that its intended readers cannot fetch is not
|
**A file in `.norn/published/` that its intended readers cannot fetch is not
|
||||||
published.** *The move is the act, but the act is not finished until somebody who
|
published.** *The move is the act, but the act is not finished until somebody who
|
||||||
is not you can perform the read.*
|
is not you can perform the read.*
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ copy without inheriting the visibility it was published under.*
|
|||||||
|
|
||||||
1. **Decide it is a contract and not a detail.** *This is the whole decision and
|
1. **Decide it is a contract and not a detail.** *This is the whole decision and
|
||||||
the rest is mechanics.*
|
the rest is mechanics.*
|
||||||
2. **Move the file into `.loom/published/`.** *One commit, so the diff carries it.*
|
2. **Move the file into `.norn/published/`.** *One commit, so the diff carries it.*
|
||||||
3. **Say who the readers are** — *if it is not obvious from where it landed.*
|
3. **Say who the readers are** — *if it is not obvious from where it landed.*
|
||||||
4. **Fetch it.** *From somewhere that is not your machine and not your account.*
|
4. **Fetch it.** *From somewhere that is not your machine and not your account.*
|
||||||
5. **Record the decision**, if you keep a log.
|
5. **Record the decision**, if you keep a log.
|
||||||
+1
-1
@@ -49,4 +49,4 @@ turned out false, or that somebody changed their mind.*
|
|||||||
|
|
||||||
## Where it lives
|
## Where it lives
|
||||||
|
|
||||||
`.loom/event-log.md`. **A stream, so a file.**
|
`.norn/event-log.md`. **A stream, so a file.**
|
||||||
File renamed without changes.
+9
-9
@@ -1,12 +1,12 @@
|
|||||||
# Starting one of these in a repository
|
# Starting one of these in a repository
|
||||||
|
|
||||||
**Make a `.loom/` directory. Everything else follows from two questions.**
|
**Make a `.norn/` directory. Everything else follows from two questions.**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## What can a reader not already know?
|
## What can a reader not already know?
|
||||||
|
|
||||||
**That is what you publish**, in `.loom/published/`, as ordinary documents.
|
**That is what you publish**, in `.norn/published/`, as ordinary documents.
|
||||||
|
|
||||||
**Not what your service does** — its code says that. **Not how Kubernetes or
|
**Not what your service does** — its code says that. **Not how Kubernetes or
|
||||||
Kafka or React work** — that is somebody else's documentation, and a copy of it
|
Kafka or React work** — that is somebody else's documentation, and a copy of it
|
||||||
@@ -22,7 +22,7 @@ looking.*
|
|||||||
|
|
||||||
## What do you need that nothing provides?
|
## What do you need that nothing provides?
|
||||||
|
|
||||||
**That is a gap**, in `.loom/gaps/`.
|
**That is a gap**, in `.norn/gaps/`.
|
||||||
|
|
||||||
**The test: could you say whose job it is?** *If yes, it is a claim against them
|
**The test: could you say whose job it is?** *If yes, it is a claim against them
|
||||||
and belongs with them. If no, it is a gap.*
|
and belongs with them. If no, it is a gap.*
|
||||||
@@ -34,23 +34,23 @@ and belongs with them. If no, it is a gap.*
|
|||||||
|
|
||||||
## Then, only if you have something to say
|
## Then, only if you have something to say
|
||||||
|
|
||||||
**`.loom/externals/`** — a copy of somebody's document you depend on, with what
|
**`.norn/externals/`** — a copy of somebody's document you depend on, with what
|
||||||
you use and what you expected and did not find, beside it. See
|
you use and what you expected and did not find, beside it. See
|
||||||
[externals](https://git.hypertheory-labs.dev/loom/externals).
|
[externals](https://git.hypertheory-labs.dev/norn/externals).
|
||||||
|
|
||||||
**`.loom/venues/`** — choices you made about something with no document to hang
|
**`.norn/venues/`** — choices you made about something with no document to hang
|
||||||
them on. *Kafka, React, HTTP.*
|
them on. *Kafka, React, HTTP.*
|
||||||
|
|
||||||
**`.loom/event-log.md`** — decisions, if you are keeping them here.
|
**`.norn/event-log.md`** — decisions, if you are keeping them here.
|
||||||
|
|
||||||
> **A file that carries no delta should not exist.** *If you do exactly what
|
> **A file that carries no delta should not exist.** *If you do exactly what
|
||||||
> somebody else's document says, write nothing — recording the adoption is
|
> somebody else's document says, write nothing — recording the adoption is
|
||||||
> ceremony.*
|
> ceremony.*
|
||||||
|
|
||||||
## Write a `.loom/README.md`
|
## Write a `.norn/README.md`
|
||||||
|
|
||||||
**Say what is in `published/` and why somebody would want it.** *Link the
|
**Say what is in `published/` and why somebody would want it.** *Link the
|
||||||
documents. One line for the curious about what `.loom` is.*
|
documents. One line for the curious about what `.norn` is.*
|
||||||
|
|
||||||
**Nobody should need to understand any of this to use it** — *they are documents
|
**Nobody should need to understand any of this to use it** — *they are documents
|
||||||
in a folder, and a reader who ignores the vocabulary entirely should still get
|
in a folder, and a reader who ignores the vocabulary entirely should still get
|
||||||
File renamed without changes.
+4
-4
@@ -143,7 +143,7 @@ chat, whatever you already have.* **This is not that channel and it does not sca
|
|||||||
into one.**
|
into one.**
|
||||||
|
|
||||||
> **So the cart is not committed.** *It lives in the working tree of the machine
|
> **So the cart is not committed.** *It lives in the working tree of the machine
|
||||||
> the two presences share, and `.loom/cart/` is ignored by version control.*
|
> the two presences share, and `.norn/cart/` is ignored by version control.*
|
||||||
|
|
||||||
**The reason is not tidiness. A committed cart grows a third file by itself.**
|
**The reason is not tidiness. A committed cart grows a third file by itself.**
|
||||||
*The rule above defends against somebody asking for one; **version control does
|
*The rule above defends against somebody asking for one; **version control does
|
||||||
@@ -298,9 +298,9 @@ the question someone who was not there actually asks.
|
|||||||
filed.**
|
filed.**
|
||||||
|
|
||||||
## Select: Where does a cart live?
|
## Select: Where does a cart live?
|
||||||
- `.loom/cart/`
|
- `.norn/cart/`
|
||||||
- somewhere else under `.loom/`
|
- somewhere else under `.norn/`
|
||||||
- outside `.loom/` entirely
|
- outside `.norn/` entirely
|
||||||
- there is no directory; carts happen somewhere that is not the repository
|
- there is no directory; carts happen somewhere that is not the repository
|
||||||
|
|
||||||
## Select: What is the durable record that declines go into?
|
## Select: What is the durable record that declines go into?
|
||||||
+8
-8
@@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
| role | cast with |
|
| role | cast with |
|
||||||
|---|---|
|
|---|---|
|
||||||
| where a round lives | `.loom/cart/` |
|
| where a round lives | `.norn/cart/` |
|
||||||
| what durable record declines go into | `.loom/event-log.md` |
|
| what durable record declines go into | `.norn/event-log.md` |
|
||||||
| who decides when the round ends | **loom** |
|
| who decides when the round ends | **norn** |
|
||||||
| what isolates work in progress | **yours to cast** |
|
| what isolates work in progress | **yours to cast** |
|
||||||
|
|
||||||
**The first two are what every other repository here does**, and differing would
|
**The first two are what every other repository here does**, and differing would
|
||||||
@@ -41,7 +41,7 @@ shown wrong in a way we could see**, and a preference could not have been.*
|
|||||||
**`v1` adds no role, so nothing above changed.** *It adds something an adopter
|
**`v1` adds no role, so nothing above changed.** *It adds something an adopter
|
||||||
gets wrong by default, and this file said nothing about it until now.*
|
gets wrong by default, and this file said nothing about it until now.*
|
||||||
|
|
||||||
**`.loom/cart/` is in `.gitignore`.** *Cast in this repository on 2026-09-07,
|
**`.norn/cart/` is in `.gitignore`.** *Cast in this repository on 2026-09-07,
|
||||||
after `v1` landed mid-round.*
|
after `v1` landed mid-round.*
|
||||||
|
|
||||||
> **We got this wrong before it was written down.** *Two rounds — `osprey` and
|
> **We got this wrong before it was written down.** *Two rounds — `osprey` and
|
||||||
@@ -52,7 +52,7 @@ after `v1` landed mid-round.*
|
|||||||
|
|
||||||
**What depends on this casting:** *`.gitignore`, and
|
**What depends on this casting:** *`.gitignore`, and
|
||||||
`internal/external/polad.go`* — **which stages a candidate into
|
`internal/external/polad.go`* — **which stages a candidate into
|
||||||
`.loom/cart/current/polad/` and therefore writes only into the untracked tree.**
|
`.norn/cart/current/polad/` and therefore writes only into the untracked tree.**
|
||||||
*If the cart were ever committed again, `check` would start proposing changes
|
*If the cart were ever committed again, `check` would start proposing changes
|
||||||
inside version control, which is the opposite of what a polad is for.*
|
inside version control, which is the opposite of what a polad is for.*
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ inside version control, which is the opposite of what a polad is for.*
|
|||||||
dissolving; git is the only archive of the conversation*.** *An ignored cart has
|
dissolving; git is the only archive of the conversation*.** *An ignored cart has
|
||||||
no archive*, **so dissolving a notes file destroys the annotations outright.**
|
no archive*, **so dissolving a notes file destroys the annotations outright.**
|
||||||
|
|
||||||
*Both documents are loom's. **Recorded here because the conflict is visible from
|
*Both documents are norn's. **Recorded here because the conflict is visible from
|
||||||
inside an adopter and not from inside either document.***
|
inside an adopter and not from inside either document.***
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -79,7 +79,7 @@ where an adopter looks for what this repository does about it.*
|
|||||||
> **What comes out before the `rm`:** *every answer to a `Question`, `Select` or
|
> **What comes out before the `rm`:** *every answer to a `Question`, `Select` or
|
||||||
> `Affirm`; every surviving write-ahead entry; and every fallback that quietly
|
> `Affirm`; every surviving write-ahead entry; and every fallback that quietly
|
||||||
> became the decision, said in those words.* **Destination is
|
> became the decision, said in those words.* **Destination is
|
||||||
> `.loom/event-log.md`**, *which is the durable record cast at the top of this
|
> `.norn/event-log.md`**, *which is the durable record cast at the top of this
|
||||||
> file.*
|
> file.*
|
||||||
|
|
||||||
**The status of our workaround changed and the code did not.** *Staging as we went
|
**The status of our workaround changed and the code did not.** *Staging as we went
|
||||||
@@ -89,7 +89,7 @@ specified behaviour** — *unchanged in practice, entirely changed in standing.*
|
|||||||
## Still uncast, because the document does not ask
|
## Still uncast, because the document does not ask
|
||||||
|
|
||||||
**Nothing here says what a cart's `name` file must agree with.** *This round
|
**Nothing here says what a cart's `name` file must agree with.** *This round
|
||||||
arrived as a daily headed `rowan`, in a file called `loom-osprey.md`, with no
|
arrived as a daily headed `rowan`, in a file called `norn-osprey.md`, with no
|
||||||
`name` file at all.* **The name is what tags durable entries** — *"everything
|
`name` file at all.* **The name is what tags durable entries** — *"everything
|
||||||
tagged with this name was considered in a single sphere of understanding"* — **so a
|
tagged with this name was considered in a single sphere of understanding"* — **so a
|
||||||
disagreement between the heading and the file mis-files the record, silently and
|
disagreement between the heading and the file mis-files the record, silently and
|
||||||
+4
-4
@@ -5,7 +5,7 @@
|
|||||||
## Pull what you use
|
## Pull what you use
|
||||||
|
|
||||||
**You fetch a copy of somebody's document and keep it** at
|
**You fetch a copy of somebody's document and keep it** at
|
||||||
`.loom/externals/<host>/<path>.md`.
|
`.norn/externals/<host>/<path>.md`.
|
||||||
|
|
||||||
> ~~*The path says where it came from, so nothing has to record an origin.*~~
|
> ~~*The path says where it came from, so nothing has to record an origin.*~~
|
||||||
> **This was false and it was load-bearing.** *A stored path is short enough to
|
> **This was false and it was load-bearing.** *A stored path is short enough to
|
||||||
@@ -58,7 +58,7 @@ what to decide are not.**
|
|||||||
|
|
||||||
## What a lock holds
|
## What a lock holds
|
||||||
|
|
||||||
**One record per adopted document, in `.loom/externals/.locks`:**
|
**One record per adopted document, in `.norn/externals/.locks`:**
|
||||||
|
|
||||||
- **where it was fetched from** — *resolved, as above*
|
- **where it was fetched from** — *resolved, as above*
|
||||||
- **the publisher's `ETag`** — *verbatim*
|
- **the publisher's `ETag`** — *verbatim*
|
||||||
@@ -149,7 +149,7 @@ you do not own.*
|
|||||||
|
|
||||||
## Venues, for things you cannot fetch
|
## Venues, for things you cannot fetch
|
||||||
|
|
||||||
**`.loom/venues/<name>.md`** — *Kafka, React, HTTP.* **Choices we made about
|
**`.norn/venues/<name>.md`** — *Kafka, React, HTTP.* **Choices we made about
|
||||||
something with no document to hang them on.**
|
something with no document to hang them on.**
|
||||||
|
|
||||||
*If there is a document, hang it there instead: **put a choice where
|
*If there is a document, hang it there instead: **put a choice where
|
||||||
@@ -157,7 +157,7 @@ reconciliation will look for it.***
|
|||||||
|
|
||||||
## Gaps that belong to nobody
|
## Gaps that belong to nobody
|
||||||
|
|
||||||
**`.loom/gaps/`** — *a need with no owner.* **The test: could you say whose job
|
**`.norn/gaps/`** — *a need with no owner.* **The test: could you say whose job
|
||||||
this is?** *If yes, it is a claim against them and belongs in their `.gaps.md`.*
|
this is?** *If yes, it is a claim against them and belongs in their `.gaps.md`.*
|
||||||
|
|
||||||
> **Moving a file from `gaps/` into an external's `.gaps.md` is how a gap gets
|
> **Moving a file from `gaps/` into an external's `.gaps.md` is how a gap gets
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
# Usages — `externals`
|
# Usages — `externals`
|
||||||
|
|
||||||
**This repository implements this document.** *That is an unusual usage: most
|
**This repository implements this document.** *That is an unusual usage: most
|
||||||
adopters use a convention, and `loomctl` is the convention's mechanism, so nearly
|
adopters use a convention, and `nornctl` is the convention's mechanism, so nearly
|
||||||
every rule here names a line of code.*
|
every rule here names a line of code.*
|
||||||
|
|
||||||
## What we use, and what implements it
|
## What we use, and what implements it
|
||||||
@@ -28,7 +28,7 @@ change**, *because it names the code to go and fix.* **It says so when there is
|
|||||||
none.*
|
none.*
|
||||||
|
|
||||||
**The published surface is what `list` reads** — *`internal/external/list.go`,*
|
**The published surface is what `list` reads** — *`internal/external/list.go`,*
|
||||||
`.loom/published` **only.** *What is not exported is not hidden; it is simply not
|
`.norn/published` **only.** *What is not exported is not hidden; it is simply not
|
||||||
what you depend on.*
|
what you depend on.*
|
||||||
|
|
||||||
**The path is for a person** — *`localPath` in `internal/external/external.go`.*
|
**The path is for a person** — *`localPath` in `internal/external/external.go`.*
|
||||||
@@ -44,7 +44,7 @@ the facet was deleted at reconciliation.*
|
|||||||
## Not yet implemented
|
## Not yet implemented
|
||||||
|
|
||||||
**"Confidentiality does not travel with the copy"**, *added 2026-09-07.* **Nothing
|
**"Confidentiality does not travel with the copy"**, *added 2026-09-07.* **Nothing
|
||||||
in `loomctl` detects it.** *The tool knows the half it can see — whether a fetch
|
in `nornctl` detects it.** *The tool knows the half it can see — whether a fetch
|
||||||
needed a credential — and does not yet say so.* **Reference-only adoption, which
|
needed a credential — and does not yet say so.* **Reference-only adoption, which
|
||||||
this document offers as the first way out, does not exist either.**
|
this document offers as the first way out, does not exist either.**
|
||||||
|
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<!-- Generated by `nornctl orient`. Safe to overwrite; nobody typed it.
|
||||||
|
Regenerate after adopting a document or reconciling a change. -->
|
||||||
|
|
||||||
|
# What this repository depends on
|
||||||
|
|
||||||
|
Copies of other people's documents are kept under `.norn/externals/`, at a path
|
||||||
|
that says where each came from. **They are copies: do not edit them.** Anything
|
||||||
|
you want to say about one goes in a file *beside* it, never into it.
|
||||||
|
|
||||||
|
Three moves, and each has a document that owns the rule:
|
||||||
|
|
||||||
|
- **A copy is wrong, or you needed something it does not say** — write it in
|
||||||
|
`<name>.gaps.md` beside the copy.
|
||||||
|
- **What of ours depends on a copy** — write it in `<name>.usages.md` beside it.
|
||||||
|
- **A source changed** — `nornctl external check` says so and stages the new copy;
|
||||||
|
`nornctl external apply` takes it. Neither edits anything on its own.
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/jeffry/homelab-cluster/raw/branch/main/.norn/published/gitea.md
|
||||||
|
- what of ours depends on it: `.norn/externals/git.hypertheory-labs.dev/jeffry/homelab-cluster/gitea.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/annotating/annotating.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/annotating/raw/branch/main/.norn/published/annotating.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
- what we expected and did not find: `.norn/externals/git.hypertheory-labs.dev/norn/annotating/annotating.gaps.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/bedrock/norn-directory.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/norn-directory.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/bedrock/publication.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/publication.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/bedrock/recording-decisions.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/recording-decisions.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/bedrock/sibling-facets.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/sibling-facets.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/bedrock/starting.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/starting.md
|
||||||
|
- what of ours depends on it: **nothing recorded** — no `.usages.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/cart/cart.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/cart/raw/branch/main/.norn/published/cart.md
|
||||||
|
- what of ours depends on it: `.norn/externals/git.hypertheory-labs.dev/norn/cart/cart.usages.md`
|
||||||
|
- what we expected and did not find: `.norn/externals/git.hypertheory-labs.dev/norn/cart/cart.gaps.md`
|
||||||
|
|
||||||
|
## `git.hypertheory-labs.dev/norn/externals/externals.md`
|
||||||
|
|
||||||
|
- source: https://git.hypertheory-labs.dev/norn/externals/raw/branch/main/.norn/published/externals.md
|
||||||
|
- what of ours depends on it: `.norn/externals/git.hypertheory-labs.dev/norn/externals/externals.usages.md`
|
||||||
|
|
||||||
|
## This repository publishes
|
||||||
|
|
||||||
|
See `.norn/published/`. What is handed over for others to depend on is
|
||||||
|
there; the rest of the repository is not hidden, it is simply not what
|
||||||
|
anybody depends on.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# What `loomctl` guarantees
|
# What `nornctl` guarantees
|
||||||
|
|
||||||
**Not what it does — `--help` says that, and the commands will change.** *This is
|
**Not what it does — `--help` says that, and the commands will change.** *This is
|
||||||
what will keep being true while they do.*
|
what will keep being true while they do.*
|
||||||
@@ -7,7 +7,7 @@ what will keep being true while they do.*
|
|||||||
|
|
||||||
## It grants no access, and records where the copy came from
|
## It grants no access, and records where the copy came from
|
||||||
|
|
||||||
**`loomctl` reads what your credentials already let you read.** *Everything it
|
**`nornctl` reads what your credentials already let you read.** *Everything it
|
||||||
does is possible with copy and paste.* **It is a mast, not a lock** — *the point
|
does is possible with copy and paste.* **It is a mast, not a lock** — *the point
|
||||||
is to make the wrong thing deliberate, not impossible.*
|
is to make the wrong thing deliberate, not impossible.*
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ is to make the wrong thing deliberate, not impossible.*
|
|||||||
it writes is a file in your working tree.* **Committing and pushing are yours**,
|
it writes is a file in your working tree.* **Committing and pushing are yours**,
|
||||||
*because the consequences of a push land on people a tool cannot experience.*
|
*because the consequences of a push land on people a tool cannot experience.*
|
||||||
|
|
||||||
**A credential given to `loomctl` should never carry write scope**, *and if one
|
**A credential given to `nornctl` should never carry write scope**, *and if one
|
||||||
does, nothing here will use it.*
|
does, nothing here will use it.*
|
||||||
|
|
||||||
## Freshness is a conditional request against the publisher's `ETag`
|
## Freshness is a conditional request against the publisher's `ETag`
|
||||||
@@ -29,7 +29,7 @@ does, nothing here will use it.*
|
|||||||
**Stored verbatim, opaque, never a hash we compute.** *A fetch that normalises
|
**Stored verbatim, opaque, never a hash we compute.** *A fetch that normalises
|
||||||
anything breaks a local digest and reports a change that did not happen.*
|
anything breaks a local digest and reports a change that did not happen.*
|
||||||
|
|
||||||
*This is `externals`' rule and `loomctl` is a second holder of it. **It is stated
|
*This is `externals`' rule and `nornctl` is a second holder of it. **It is stated
|
||||||
here so that the tool holding it is a fact somebody can find**, and so that
|
here so that the tool holding it is a fact somebody can find**, and so that
|
||||||
breaking it is visible rather than silent* — **a specimen was written in this
|
breaking it is visible rather than silent* — **a specimen was written in this
|
||||||
repository that computed a hash instead, and it was wrong within a day.**
|
repository that computed a hash instead, and it was wrong within a day.**
|
||||||
@@ -52,16 +52,16 @@ is verified rather than assumed.**
|
|||||||
|
|
||||||
## The lock file
|
## The lock file
|
||||||
|
|
||||||
**`.loom/externals/.locks`, one record per adopted document, tab-separated,
|
**`.norn/externals/.locks`, one record per adopted document, tab-separated,
|
||||||
ordered by path.**
|
ordered by path.**
|
||||||
|
|
||||||
```
|
```
|
||||||
path <TAB> url <TAB> etag [ <TAB> visibility ]
|
path <TAB> url <TAB> etag [ <TAB> visibility ]
|
||||||
```
|
```
|
||||||
|
|
||||||
- **`path`** — *relative to `.loom/externals/`, and **for a person to read**.* **It
|
- **`path`** — *relative to `.norn/externals/`, and **for a person to read**.* **It
|
||||||
does not round-trip to a URL**; *it drops the route, the branch, and the
|
does not round-trip to a URL**; *it drops the route, the branch, and the
|
||||||
publisher's `.loom/published/`.*
|
publisher's `.norn/published/`.*
|
||||||
- **`url`** — *the resolved origin, branch and all.*
|
- **`url`** — *the resolved origin, branch and all.*
|
||||||
- **`etag`** — *the publisher's, verbatim, including its quotes.*
|
- **`etag`** — *the publisher's, verbatim, including its quotes.*
|
||||||
- **`visibility`** — *optional. What the source could be read as **when it was
|
- **`visibility`** — *optional. What the source could be read as **when it was
|
||||||
@@ -92,7 +92,7 @@ schedule, and a document nobody checks is a document nobody is checking.*
|
|||||||
|
|
||||||
**The command surface may change. This page will say when it does.**
|
**The command surface may change. This page will say when it does.**
|
||||||
|
|
||||||
*A consumer whose README tells a person to type `loomctl external add loom/<repo>
|
*A consumer whose README tells a person to type `nornctl external add norn/<repo>
|
||||||
<doc>.md` depends on that command by name — **not by parsing it, which is why no
|
<doc>.md` depends on that command by name — **not by parsing it, which is why no
|
||||||
check would ever catch a rename**. The thing that moved would not be a document
|
check would ever catch a rename**. The thing that moved would not be a document
|
||||||
they adopted.*
|
they adopted.*
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
# loom-cli
|
# norn-cli
|
||||||
|
|
||||||
**`loomctl` fetches the documents this repository depends on, and tells you when
|
**`nornctl` fetches the documents this repository depends on, and tells you when
|
||||||
they change.** It reports; it never repairs.
|
they change.** It reports; it never repairs.
|
||||||
|
|
||||||
```
|
```
|
||||||
go build -o loomctl .
|
go build -o nornctl .
|
||||||
./loomctl --help
|
./nornctl --help
|
||||||
```
|
```
|
||||||
|
|
||||||
`check` only reads. Nothing here writes over the network, so a credential it is
|
`check` only reads. Nothing here writes over the network, so a credential it is
|
||||||
given never needs write scope.
|
given never needs write scope.
|
||||||
|
|
||||||
**Why it is the way it is:** [`.loom/event-log.md`](.loom/event-log.md). Every
|
**Why it is the way it is:** [`.norn/event-log.md`](.norn/event-log.md). Every
|
||||||
entry says what was decided and the belief that could turn out to be false.
|
entry says what was decided and the belief that could turn out to be false.
|
||||||
|
|
||||||
**What it depends on, and what we could not tell from those documents:**
|
**What it depends on, and what we could not tell from those documents:**
|
||||||
[`.loom/externals/`](.loom/externals/) — the `.gaps.md` files beside each one.
|
[`.norn/externals/`](.norn/externals/) — the `.gaps.md` files beside each one.
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
module git.hypertheory-labs.dev/loom/loom-cli
|
module git.hypertheory-labs.dev/norn/norn-cli
|
||||||
|
|
||||||
go 1.25
|
go 1.25
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Package config reads the per-host settings loomctl needs to talk to a git host.
|
// Package config reads the per-host settings nornctl needs to talk to a git host.
|
||||||
//
|
//
|
||||||
// The config is not only a secret. It is how you talk to a host at all — which
|
// The config is not only a secret. It is how you talk to a host at all — which
|
||||||
// is why it is a set of named contexts with one current, and why a host's URL
|
// is why it is a set of named contexts with one current, and why a host's URL
|
||||||
@@ -24,7 +24,7 @@ type Context struct {
|
|||||||
Host string `json:"host"`
|
Host string `json:"host"`
|
||||||
// Flavor selects the URL shapes: gitea, github or gitlab. Empty means gitea.
|
// Flavor selects the URL shapes: gitea, github or gitlab. Empty means gitea.
|
||||||
Flavor string `json:"flavor,omitempty"`
|
Flavor string `json:"flavor,omitempty"`
|
||||||
// Token is read-only. loomctl never writes over the network, so a token it
|
// Token is read-only. nornctl never writes over the network, so a token it
|
||||||
// is given should not carry write scope.
|
// is given should not carry write scope.
|
||||||
Token string `json:"token,omitempty"`
|
Token string `json:"token,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -36,17 +36,17 @@ type Config struct {
|
|||||||
|
|
||||||
// Path is where the config lives. Never inside a repository.
|
// Path is where the config lives. Never inside a repository.
|
||||||
func Path() string {
|
func Path() string {
|
||||||
if p := os.Getenv("LOOMCTL_CONFIG"); p != "" {
|
if p := os.Getenv("NORNCTL_CONFIG"); p != "" {
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
home, err := os.UserHomeDir()
|
home, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
return filepath.Join(home, ".config", "loomctl", "config.json")
|
return filepath.Join(home, ".config", "nornctl", "config.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load reads the config. A missing file is not an error: everything loomctl
|
// Load reads the config. A missing file is not an error: everything nornctl
|
||||||
// does against a public repository works with no credential and no context.
|
// does against a public repository works with no credential and no context.
|
||||||
func Load() (*Config, error) {
|
func Load() (*Config, error) {
|
||||||
c := &Config{Contexts: map[string]Context{}}
|
c := &Config{Contexts: map[string]Context{}}
|
||||||
@@ -90,10 +90,10 @@ func (c *Config) Current() (Context, error) {
|
|||||||
// An environment variable wins over the file, so a token can be supplied for
|
// An environment variable wins over the file, so a token can be supplied for
|
||||||
// one invocation without ever being written to disk.
|
// one invocation without ever being written to disk.
|
||||||
func (c *Config) TokenFor(host string) string {
|
func (c *Config) TokenFor(host string) string {
|
||||||
if t := os.Getenv("LOOMCTL_TOKEN_" + envKey(host)); t != "" {
|
if t := os.Getenv("NORNCTL_TOKEN_" + envKey(host)); t != "" {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
if t := os.Getenv("LOOMCTL_TOKEN"); t != "" {
|
if t := os.Getenv("NORNCTL_TOKEN"); t != "" {
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
for _, ctx := range c.Contexts {
|
for _, ctx := range c.Contexts {
|
||||||
|
|||||||
Vendored
+2
-2
@@ -9,13 +9,13 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/config"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AddByName adopts a document named the way `list` prints it, against the
|
// AddByName adopts a document named the way `list` prints it, against the
|
||||||
// current context.
|
// current context.
|
||||||
//
|
//
|
||||||
// loomctl external add loom/cart cart
|
// nornctl external add norn/cart cart
|
||||||
//
|
//
|
||||||
// Nobody should have to type a host's raw-file route to adopt a document. The
|
// Nobody should have to type a host's raw-file route to adopt a document. The
|
||||||
// route belongs to the host, so it lives in the context; the published
|
// route belongs to the host, so it lives in the context; the published
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// auditExposure reports documents adopted from a source that could not be read
|
// auditExposure reports documents adopted from a source that could not be read
|
||||||
|
|||||||
Vendored
+10
-10
@@ -19,26 +19,26 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/config"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/config"
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
var client = &http.Client{Timeout: 30 * time.Second}
|
var client = &http.Client{Timeout: 30 * time.Second}
|
||||||
|
|
||||||
// FindRoot walks up from dir looking for the .loom directory that marks a
|
// FindRoot walks up from dir looking for the .norn directory that marks a
|
||||||
// repository using loom.
|
// repository using norn.
|
||||||
func FindRoot(dir string) (string, error) {
|
func FindRoot(dir string) (string, error) {
|
||||||
d, err := filepath.Abs(dir)
|
d, err := filepath.Abs(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
for {
|
for {
|
||||||
if fi, err := os.Stat(filepath.Join(d, ".loom")); err == nil && fi.IsDir() {
|
if fi, err := os.Stat(filepath.Join(d, ".norn")); err == nil && fi.IsDir() {
|
||||||
return d, nil
|
return d, nil
|
||||||
}
|
}
|
||||||
parent := filepath.Dir(d)
|
parent := filepath.Dir(d)
|
||||||
if parent == d {
|
if parent == d {
|
||||||
return "", errors.New("no .loom directory found in this directory or any parent")
|
return "", errors.New("no .norn directory found in this directory or any parent")
|
||||||
}
|
}
|
||||||
d = parent
|
d = parent
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ func FindRoot(dir string) (string, error) {
|
|||||||
// localPath derives where an adopted document is kept from the URL it came from.
|
// localPath derives where an adopted document is kept from the URL it came from.
|
||||||
//
|
//
|
||||||
// The path is for a person: <host>/<owner>/<repo>/<basename>. It deliberately
|
// The path is for a person: <host>/<owner>/<repo>/<basename>. It deliberately
|
||||||
// does not encode the route, the branch, or .loom/published/ — which is why it
|
// does not encode the route, the branch, or .norn/published/ — which is why it
|
||||||
// cannot be turned back into a URL, and why the lock records the origin.
|
// cannot be turned back into a URL, and why the lock records the origin.
|
||||||
func localPath(raw string) (string, error) {
|
func localPath(raw string) (string, error) {
|
||||||
u, err := url.Parse(raw)
|
u, err := url.Parse(raw)
|
||||||
@@ -109,7 +109,7 @@ func Add(root, raw, override string, out io.Writer) error {
|
|||||||
_, isLocked := locks.Get(rel)
|
_, isLocked := locks.Get(rel)
|
||||||
|
|
||||||
if isLocked {
|
if isLocked {
|
||||||
return fmt.Errorf("%s is already adopted — `loomctl external check` is what notices it moving", rel)
|
return fmt.Errorf("%s is already adopted — `nornctl external check` is what notices it moving", rel)
|
||||||
}
|
}
|
||||||
|
|
||||||
body, etag, err := fetch(cfg, raw, "")
|
body, etag, err := fetch(cfg, raw, "")
|
||||||
@@ -250,7 +250,7 @@ func warnIfNotPublic(root, raw, vis string, out io.Writer) {
|
|||||||
fmt.Fprintf(out, " readable than the repository you are adopting into.\n")
|
fmt.Fprintf(out, " readable than the repository you are adopting into.\n")
|
||||||
fmt.Fprintf(out, " Two ways out: ask them to publish it — usually the thing you\n")
|
fmt.Fprintf(out, " Two ways out: ask them to publish it — usually the thing you\n")
|
||||||
fmt.Fprintf(out, " needed was not the confidential part — or keep no copy and\n")
|
fmt.Fprintf(out, " needed was not the confidential part — or keep no copy and\n")
|
||||||
fmt.Fprintf(out, " record only the dependency, which loomctl cannot do yet.\n")
|
fmt.Fprintf(out, " record only the dependency, which nornctl cannot do yet.\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
// NotFoundError is a 404, which over HTTP carries more than one reading.
|
// NotFoundError is a 404, which over HTTP carries more than one reading.
|
||||||
@@ -407,7 +407,7 @@ func checkUnlocked(cfg *config.Config, root, rel string, locks *lock.Set, open b
|
|||||||
// Without a lock we have no origin, and the path does not round-trip to a
|
// Without a lock we have no origin, and the path does not round-trip to a
|
||||||
// URL, so there is nothing to ask and nowhere to ask it. Supplying the URL
|
// URL, so there is nothing to ask and nowhere to ask it. Supplying the URL
|
||||||
// through add is the only way out.
|
// through add is the only way out.
|
||||||
return Status{rel, "unlocked", "no origin recorded — `loomctl external add <url>` supplies it without rewriting this copy"}, 0
|
return Status{rel, "unlocked", "no origin recorded — `nornctl external add <url>` supplies it without rewriting this copy"}, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func usagesNote(root, rel string) string {
|
func usagesNote(root, rel string) string {
|
||||||
|
|||||||
Vendored
+7
-7
@@ -13,8 +13,8 @@ func TestLocalPath(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "gitea raw, published document",
|
name: "gitea raw, published document",
|
||||||
url: "https://git.hypertheory-labs.dev/loom/bedrock/raw/branch/main/.loom/published/starting.md",
|
url: "https://git.hypertheory-labs.dev/norn/bedrock/raw/branch/main/.norn/published/starting.md",
|
||||||
want: "git.hypertheory-labs.dev/loom/bedrock/starting.md",
|
want: "git.hypertheory-labs.dev/norn/bedrock/starting.md",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "github raw host",
|
name: "github raw host",
|
||||||
@@ -28,7 +28,7 @@ func TestLocalPath(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "not absolute",
|
name: "not absolute",
|
||||||
url: "/loom/bedrock/starting.md",
|
url: "/norn/bedrock/starting.md",
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
@@ -54,13 +54,13 @@ func TestIsFacet(t *testing.T) {
|
|||||||
// A facet is something we wrote beside an adopted document. check must not
|
// A facet is something we wrote beside an adopted document. check must not
|
||||||
// report our own writing as an unlocked external.
|
// report our own writing as an unlocked external.
|
||||||
facets := []string{
|
facets := []string{
|
||||||
"host/loom/cart/cart.usages.md",
|
"host/norn/cart/cart.usages.md",
|
||||||
"host/loom/externals/externals.gaps.md",
|
"host/norn/externals/externals.gaps.md",
|
||||||
"host/o/r/plan.notes.md",
|
"host/o/r/plan.notes.md",
|
||||||
}
|
}
|
||||||
documents := []string{
|
documents := []string{
|
||||||
"host/loom/cart/cart.md",
|
"host/norn/cart/cart.md",
|
||||||
"host/loom/bedrock/recording-decisions.md", // a hyphen is not a facet
|
"host/norn/bedrock/recording-decisions.md", // a hyphen is not a facet
|
||||||
"host/o/r/starting.md",
|
"host/o/r/starting.md",
|
||||||
}
|
}
|
||||||
for _, p := range facets {
|
for _, p := range facets {
|
||||||
|
|||||||
Vendored
+3
-3
@@ -8,13 +8,13 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/config"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PublishedDir is the only directory in somebody else's repository that list
|
// PublishedDir is the only directory in somebody else's repository that list
|
||||||
// looks at. What is not exported is not hidden — it is simply not what you
|
// looks at. What is not exported is not hidden — it is simply not what you
|
||||||
// depend on.
|
// depend on.
|
||||||
const PublishedDir = ".loom/published"
|
const PublishedDir = ".norn/published"
|
||||||
|
|
||||||
// List enumerates a publisher's published surface.
|
// List enumerates a publisher's published surface.
|
||||||
//
|
//
|
||||||
@@ -29,7 +29,7 @@ func List(repoURL string, out io.Writer) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
dir, err := os.MkdirTemp("", "loomctl-list-")
|
dir, err := os.MkdirTemp("", "nornctl-list-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-2
@@ -7,13 +7,13 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CartDir is where a round happens. A cart is not committed — it lives in the
|
// CartDir is where a round happens. A cart is not committed — it lives in the
|
||||||
// working tree of the machine the two presences share — so everything staged
|
// working tree of the machine the two presences share — so everything staged
|
||||||
// here is deliberately outside version control.
|
// here is deliberately outside version control.
|
||||||
const CartDir = ".loom/cart/current"
|
const CartDir = ".norn/cart/current"
|
||||||
|
|
||||||
// PoladDir is where a changed external waits for somebody to decide.
|
// PoladDir is where a changed external waits for somebody to decide.
|
||||||
//
|
//
|
||||||
|
|||||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// apply used to write the staged record verbatim, and a staged record carried no
|
// apply used to write the staged record verbatim, and a staged record carried no
|
||||||
|
|||||||
Vendored
+2
-2
@@ -7,8 +7,8 @@ func TestSplitRemote(t *testing.T) {
|
|||||||
remote, host, ownerRepo string
|
remote, host, ownerRepo string
|
||||||
ok bool
|
ok bool
|
||||||
}{
|
}{
|
||||||
{"ssh://git@git.hypertheory-labs.dev:2222/loom/loom-cli.git", "git.hypertheory-labs.dev", "loom/loom-cli", true},
|
{"ssh://git@git.hypertheory-labs.dev:2222/norn/norn-cli.git", "git.hypertheory-labs.dev", "norn/norn-cli", true},
|
||||||
{"ssh://git@git.hypertheory-labs.dev/loom/loom-cli.git", "git.hypertheory-labs.dev", "loom/loom-cli", true},
|
{"ssh://git@git.hypertheory-labs.dev/norn/norn-cli.git", "git.hypertheory-labs.dev", "norn/norn-cli", true},
|
||||||
{"git@github.com:octocat/Hello-World.git", "github.com", "octocat/Hello-World", true},
|
{"git@github.com:octocat/Hello-World.git", "github.com", "octocat/Hello-World", true},
|
||||||
{"https://gitlab.com/gitlab-org/gitlab-svgs.git", "gitlab.com", "gitlab-org/gitlab-svgs", true},
|
{"https://gitlab.com/gitlab-org/gitlab-svgs.git", "gitlab.com", "gitlab-org/gitlab-svgs", true},
|
||||||
{"https://gitlab.com/gitlab-org/gitlab-svgs", "gitlab.com", "gitlab-org/gitlab-svgs", true},
|
{"https://gitlab.com/gitlab-org/gitlab-svgs", "gitlab.com", "gitlab-org/gitlab-svgs", true},
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// Package lock reads and writes .loom/externals/.locks.
|
// Package lock reads and writes .norn/externals/.locks.
|
||||||
//
|
//
|
||||||
// One record per adopted document: where it was fetched from, resolved, and the
|
// One record per adopted document: where it was fetched from, resolved, and the
|
||||||
// ETag the publisher served with it. The ETag is opaque and is never a hash we
|
// ETag the publisher served with it. The ETag is opaque and is never a hash we
|
||||||
// compute — on gitea it happens to equal the git blob hash and on GitHub it does
|
// compute — on gitea it happens to equal the git blob hash and on GitHub it does
|
||||||
// not, so a design that compares a local hash to a remote ETag works on exactly
|
// not, so a design that compares a local hash to a remote ETag works on exactly
|
||||||
// one host by coincidence. See .loom/event-log.md.
|
// one host by coincidence. See .norn/event-log.md.
|
||||||
package lock
|
package lock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -19,12 +19,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Dir is where adopted documents live, relative to the repository root.
|
// Dir is where adopted documents live, relative to the repository root.
|
||||||
const Dir = ".loom/externals"
|
const Dir = ".norn/externals"
|
||||||
|
|
||||||
// File is the lock file, inside Dir.
|
// File is the lock file, inside Dir.
|
||||||
const File = ".locks"
|
const File = ".locks"
|
||||||
|
|
||||||
const header = "# loomctl locks — one record per adopted document.\n" +
|
const header = "# nornctl locks — one record per adopted document.\n" +
|
||||||
"# path<TAB>url<TAB>etag[<TAB>visibility]\n" +
|
"# path<TAB>url<TAB>etag[<TAB>visibility]\n" +
|
||||||
"# The url is resolved: a short form would follow whatever the default branch\n" +
|
"# The url is resolved: a short form would follow whatever the default branch\n" +
|
||||||
"# is at the time you ask. visibility is what the source could be read as when\n" +
|
"# is at the time you ask. visibility is what the source could be read as when\n" +
|
||||||
@@ -34,7 +34,7 @@ const header = "# loomctl locks — one record per adopted document.\n" +
|
|||||||
type Record struct {
|
type Record struct {
|
||||||
// Path is relative to Dir, and is for a person to read. The origin is the
|
// Path is relative to Dir, and is for a person to read. The origin is the
|
||||||
// URL: the path does not round-trip, because it drops the route, the
|
// URL: the path does not round-trip, because it drops the route, the
|
||||||
// branch, and .loom/published/.
|
// branch, and .norn/published/.
|
||||||
Path string
|
Path string
|
||||||
// URL is the resolved origin, branch and all.
|
// URL is the resolved origin, branch and all.
|
||||||
URL string
|
URL string
|
||||||
|
|||||||
@@ -16,23 +16,23 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// File is where the orientation lives, relative to the repository root.
|
// File is where the orientation lives, relative to the repository root.
|
||||||
//
|
//
|
||||||
// Beside .loom/event-log.md rather than inside .loom/externals/, because
|
// Beside .norn/event-log.md rather than inside .norn/externals/, because
|
||||||
// everything in that directory is somebody else's document — which is what makes
|
// everything in that directory is somebody else's document — which is what makes
|
||||||
// "do not edit these" a rule you can state in four words — and because `check`
|
// "do not edit these" a rule you can state in four words — and because `check`
|
||||||
// walks it and would report a generated file as an unlocked external forever.
|
// walks it and would report a generated file as an unlocked external forever.
|
||||||
const File = ".loom/orientation.md"
|
const File = ".norn/orientation.md"
|
||||||
|
|
||||||
const preamble = `<!-- Generated by ` + "`loomctl orient`" + `. Safe to overwrite; nobody typed it.
|
const preamble = `<!-- Generated by ` + "`nornctl orient`" + `. Safe to overwrite; nobody typed it.
|
||||||
Regenerate after adopting a document or reconciling a change. -->
|
Regenerate after adopting a document or reconciling a change. -->
|
||||||
|
|
||||||
# What this repository depends on
|
# What this repository depends on
|
||||||
|
|
||||||
Copies of other people's documents are kept under ` + "`.loom/externals/`" + `, at a path
|
Copies of other people's documents are kept under ` + "`.norn/externals/`" + `, at a path
|
||||||
that says where each came from. **They are copies: do not edit them.** Anything
|
that says where each came from. **They are copies: do not edit them.** Anything
|
||||||
you want to say about one goes in a file *beside* it, never into it.
|
you want to say about one goes in a file *beside* it, never into it.
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@ Three moves, and each has a document that owns the rule:
|
|||||||
- **A copy is wrong, or you needed something it does not say** — write it in
|
- **A copy is wrong, or you needed something it does not say** — write it in
|
||||||
` + "`<name>.gaps.md`" + ` beside the copy.
|
` + "`<name>.gaps.md`" + ` beside the copy.
|
||||||
- **What of ours depends on a copy** — write it in ` + "`<name>.usages.md`" + ` beside it.
|
- **What of ours depends on a copy** — write it in ` + "`<name>.usages.md`" + ` beside it.
|
||||||
- **A source changed** — ` + "`loomctl external check`" + ` says so and stages the new copy;
|
- **A source changed** — ` + "`nornctl external check`" + ` says so and stages the new copy;
|
||||||
` + "`loomctl external apply`" + ` takes it. Neither edits anything on its own.
|
` + "`nornctl external apply`" + ` takes it. Neither edits anything on its own.
|
||||||
`
|
`
|
||||||
|
|
||||||
// Generate writes the orientation for the repository at root.
|
// Generate writes the orientation for the repository at root.
|
||||||
@@ -72,9 +72,9 @@ func Generate(root, out string) (string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if dir := filepath.Join(root, ".loom", "published"); isDir(dir) {
|
if dir := filepath.Join(root, ".norn", "published"); isDir(dir) {
|
||||||
b.WriteString("\n## This repository publishes\n\n")
|
b.WriteString("\n## This repository publishes\n\n")
|
||||||
b.WriteString("See `.loom/published/`. What is handed over for others to depend on is\n")
|
b.WriteString("See `.norn/published/`. What is handed over for others to depend on is\n")
|
||||||
b.WriteString("there; the rest of the repository is not hidden, it is simply not what\n")
|
b.WriteString("there; the rest of the repository is not hidden, it is simply not what\n")
|
||||||
b.WriteString("anybody depends on.\n")
|
b.WriteString("anybody depends on.\n")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/lock"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/lock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A generated file that churns produces diffs nobody reads, and the diff is most
|
// A generated file that churns produces diffs nobody reads, and the diff is most
|
||||||
@@ -51,7 +51,7 @@ func TestGenerateIsDeterministic(t *testing.T) {
|
|||||||
t.Error("entries are not ordered by path")
|
t.Error("entries are not ordered by path")
|
||||||
}
|
}
|
||||||
if strings.Contains(first, "publishes") {
|
if strings.Contains(first, "publishes") {
|
||||||
t.Error("claimed the repository publishes with no .loom/published")
|
t.Error("claimed the repository publishes with no .norn/published")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// loomctl fetches documents this repository depends on, and finds out when they
|
// nornctl fetches documents this repository depends on, and finds out when they
|
||||||
// change.
|
// change.
|
||||||
//
|
//
|
||||||
// It reports and never repairs. Everything it writes, it writes to the working
|
// It reports and never repairs. Everything it writes, it writes to the working
|
||||||
@@ -14,27 +14,27 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/config"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/config"
|
||||||
|
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/external"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/external"
|
||||||
"git.hypertheory-labs.dev/loom/loom-cli/internal/orient"
|
"git.hypertheory-labs.dev/norn/norn-cli/internal/orient"
|
||||||
)
|
)
|
||||||
|
|
||||||
const usage = `loomctl — fetch what you depend on, and find out when it changed.
|
const usage = `nornctl — fetch what you depend on, and find out when it changed.
|
||||||
|
|
||||||
loomctl external list <owner/repo> what a repository publishes
|
nornctl external list <owner/repo> what a repository publishes
|
||||||
loomctl external add <owner/repo> <doc> adopt one document and lock it
|
nornctl external add <owner/repo> <doc> adopt one document and lock it
|
||||||
loomctl external add <url> [--path p] ... or by its full raw URL
|
nornctl external add <url> [--path p] ... or by its full raw URL
|
||||||
loomctl external check ask every publisher whether theirs moved
|
nornctl external check ask every publisher whether theirs moved
|
||||||
loomctl external apply [path...] move a staged polad into place, lock and all
|
nornctl external apply [path...] move a staged polad into place, lock and all
|
||||||
|
|
||||||
check reports and does not fix. A document that moved is staged as a polad in
|
check reports and does not fix. A document that moved is staged as a polad in
|
||||||
.loom/cart/current/polad/ — a candidate shaped exactly like what it would
|
.norn/cart/current/polad/ — a candidate shaped exactly like what it would
|
||||||
become — and somebody decides. Its exits are apply or discard; nothing there
|
become — and somebody decides. Its exits are apply or discard; nothing there
|
||||||
drifts into being kept. With no cart open, check says what moved and stages
|
drifts into being kept. With no cart open, check says what moved and stages
|
||||||
nothing, because opening a round is somebody's act and not a side effect.
|
nothing, because opening a round is somebody's act and not a side effect.
|
||||||
|
|
||||||
loomctl grants no access. It reads what your credentials already let you read,
|
nornctl grants no access. It reads what your credentials already let you read,
|
||||||
and records where the copy came from — which is the part copy-and-paste loses.
|
and records where the copy came from — which is the part copy-and-paste loses.
|
||||||
It warns rather than refuses: adopting from a source less readable than the
|
It warns rather than refuses: adopting from a source less readable than the
|
||||||
repository you are adopting into is yours to decide, and the check only tells
|
repository you are adopting into is yours to decide, and the check only tells
|
||||||
@@ -47,17 +47,17 @@ it supplies the missing origin: identical bytes lock it, differing bytes are
|
|||||||
staged, and the local copy is never overwritten, because a copy that differs is
|
staged, and the local copy is never overwritten, because a copy that differs is
|
||||||
the only evidence that anything moved while nothing was watching.
|
the only evidence that anything moved while nothing was watching.
|
||||||
|
|
||||||
Adopted documents live in .loom/externals/<host>/<owner>/<repo>/<name>.md, and
|
Adopted documents live in .norn/externals/<host>/<owner>/<repo>/<name>.md, and
|
||||||
their origins in .loom/externals/.locks. The path is for a person to read; the
|
their origins in .norn/externals/.locks. The path is for a person to read; the
|
||||||
lock is what a machine uses, because the path does not round-trip to a URL.
|
lock is what a machine uses, because the path does not round-trip to a URL.
|
||||||
|
|
||||||
loomctl orient [--out path] write .loom/orientation.md for whoever arrives next
|
nornctl orient [--out path] write .norn/orientation.md for whoever arrives next
|
||||||
loomctl config which context is current, and from where
|
nornctl config which context is current, and from where
|
||||||
|
|
||||||
A bare owner/repo is resolved against the current context in
|
A bare owner/repo is resolved against the current context in
|
||||||
~/.config/loomctl/config.json, which holds a host, its flavor and a read-only
|
~/.config/nornctl/config.json, which holds a host, its flavor and a read-only
|
||||||
token. The host's raw-file route lives there so that nobody has to type it, and
|
token. The host's raw-file route lives there so that nobody has to type it, and
|
||||||
LOOMCTL_TOKEN_<HOST> overrides the file for one invocation. loomctl never writes
|
NORNCTL_TOKEN_<HOST> overrides the file for one invocation. nornctl never writes
|
||||||
over the network, so a token it is given should never carry write scope.
|
over the network, so a token it is given should never carry write scope.
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -76,7 +76,7 @@ Requires git on PATH, for list only.
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := run(os.Args[1:]); err != nil {
|
if err := run(os.Args[1:]); err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "loomctl: "+err.Error())
|
fmt.Fprintln(os.Stderr, "nornctl: "+err.Error())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ func runExternal(args []string) error {
|
|||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "list":
|
case "list":
|
||||||
if len(args) != 2 {
|
if len(args) != 2 {
|
||||||
return fmt.Errorf("usage: loomctl external list <owner/repo>")
|
return fmt.Errorf("usage: nornctl external list <owner/repo>")
|
||||||
}
|
}
|
||||||
if strings.Contains(args[1], "://") {
|
if strings.Contains(args[1], "://") {
|
||||||
return external.List(args[1], os.Stdout)
|
return external.List(args[1], os.Stdout)
|
||||||
@@ -128,7 +128,7 @@ func runExternal(args []string) error {
|
|||||||
|
|
||||||
case "add":
|
case "add":
|
||||||
fs := flag.NewFlagSet("add", flag.ContinueOnError)
|
fs := flag.NewFlagSet("add", flag.ContinueOnError)
|
||||||
path := fs.String("path", "", "where to keep it, relative to .loom/externals (default: derived from the URL)")
|
path := fs.String("path", "", "where to keep it, relative to .norn/externals (default: derived from the URL)")
|
||||||
if err := fs.Parse(args[1:]); err != nil {
|
if err := fs.Parse(args[1:]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -140,14 +140,14 @@ func runExternal(args []string) error {
|
|||||||
case 1:
|
case 1:
|
||||||
if !strings.Contains(fs.Arg(0), "://") {
|
if !strings.Contains(fs.Arg(0), "://") {
|
||||||
return fmt.Errorf("adopting by name needs the document too: " +
|
return fmt.Errorf("adopting by name needs the document too: " +
|
||||||
"loomctl external add <owner/repo> <doc>")
|
"nornctl external add <owner/repo> <doc>")
|
||||||
}
|
}
|
||||||
return external.Add(root, fs.Arg(0), *path, os.Stdout)
|
return external.Add(root, fs.Arg(0), *path, os.Stdout)
|
||||||
case 2:
|
case 2:
|
||||||
return external.AddByName(root, fs.Arg(0), fs.Arg(1), os.Stdout)
|
return external.AddByName(root, fs.Arg(0), fs.Arg(1), os.Stdout)
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("usage: loomctl external add <owner/repo> <doc>, " +
|
return fmt.Errorf("usage: nornctl external add <owner/repo> <doc>, " +
|
||||||
"or loomctl external add <url> [--path p]")
|
"or nornctl external add <url> [--path p]")
|
||||||
}
|
}
|
||||||
|
|
||||||
case "check":
|
case "check":
|
||||||
@@ -205,8 +205,8 @@ func showConfig(out io.Writer) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func credential(cfg *config.Config, c config.Context) string {
|
func credential(cfg *config.Config, c config.Context) string {
|
||||||
if os.Getenv("LOOMCTL_TOKEN") != "" {
|
if os.Getenv("NORNCTL_TOKEN") != "" {
|
||||||
return "token from LOOMCTL_TOKEN"
|
return "token from NORNCTL_TOKEN"
|
||||||
}
|
}
|
||||||
if cfg.TokenFor(c.Host) != "" {
|
if cfg.TokenFor(c.Host) != "" {
|
||||||
if c.Token == "" {
|
if c.Token == "" {
|
||||||
|
|||||||
Reference in new issue
Block a user