@panaversity/ksor 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @panaversity/ksor
|
|
2
2
|
|
|
3
|
+
## 0.0.47
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 00c99da: **The intake interview asks its three questions in the owner's words.** The
|
|
8
|
+
previous wording was precise and unanswerable: question 1 asked the owner to
|
|
9
|
+
finish "when someone here disagrees with this corpus, the corpus wins about
|
|
10
|
+
___", which is not a sentence unless you already know the ledger analogy the
|
|
11
|
+
README uses, and then explained what the answer would be used for inside the
|
|
12
|
+
question itself. An owner reported being unable to tell what it wanted at all.
|
|
13
|
+
|
|
14
|
+
Now: "What is this knowledge base about?", "What is close to that, but not part
|
|
15
|
+
of it?", and "Who signs off on a document, and who can take one down?" — each
|
|
16
|
+
with one too-vague example and one specific enough, and nothing about
|
|
17
|
+
`instance.md` or the MCP surface in the question. The reasoning that used to sit
|
|
18
|
+
inside the questions moved below them, where it explains the design to whoever
|
|
19
|
+
maintains the skill instead of blocking the person answering.
|
|
20
|
+
|
|
21
|
+
Nothing about what gets written changed.
|
|
22
|
+
|
|
23
|
+
## 0.0.46
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- a28fac9: **The Auth0 recipe now names the trap that costs the afternoon it warns about.**
|
|
28
|
+
Walked end to end against a live Auth0 tenant and a deployed door for the first
|
|
29
|
+
time (2026-08-26), and the recipe was right about what to type and silent about
|
|
30
|
+
the two things that actually go wrong.
|
|
31
|
+
|
|
32
|
+
The API **Identifier** must equal `KSOR_MCP_RESOURCE_URL` character for
|
|
33
|
+
character, `/mcp` path included — and **Auth0 does not let you edit it after the
|
|
34
|
+
API is created**, so a wrong one is fixed by making a new API, not by correcting
|
|
35
|
+
the field. Neither fact was written down.
|
|
36
|
+
|
|
37
|
+
Two Auth0 errors now have a table, because both arrive as a failed token request
|
|
38
|
+
and they mean opposite things: `Service not enabled within domain` is no API
|
|
39
|
+
with that Identifier, while `Client "…" is not authorized to access resource
|
|
40
|
+
server` means the Identifier is right and the grant from step 5 is missing.
|
|
41
|
+
Moving from the first to the second is progress.
|
|
42
|
+
|
|
43
|
+
And "Verify it" gains a step 0: ask the PROVIDER for a token before touching the
|
|
44
|
+
door. Half of these failures never reach ksor, and one `curl` at the token
|
|
45
|
+
endpoint separates the halves — which is how this diagnosis was actually made,
|
|
46
|
+
after several rounds of reasoning about dashboard toggles that turned out not to
|
|
47
|
+
be the cause.
|
|
48
|
+
|
|
49
|
+
**And it now says you need more than one Application.** The recipe never
|
|
50
|
+
mentioned the site's own sign-in control, never said its Application is a
|
|
51
|
+
different TYPE from an assistant's, and never said the two cannot be the same
|
|
52
|
+
registration — a public client with no secret and a confidential client that
|
|
53
|
+
sends one are different things, and using one for both returns a bare `401` at
|
|
54
|
+
the token endpoint that names nothing. A table at the top of the recipe now
|
|
55
|
+
gives one row per caller: what type, what token-endpoint auth, what callback,
|
|
56
|
+
and whether it needs the grant from step 5.
|
|
57
|
+
|
|
3
58
|
## 0.0.45
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/docs/authorization.md
CHANGED
|
@@ -298,6 +298,25 @@ Nothing else in this recipe makes sense until that lands. You are not building
|
|
|
298
298
|
an API; you are describing the one you already have so Auth0 can mint tokens
|
|
299
299
|
aimed at it.
|
|
300
300
|
|
|
301
|
+
**You will need MORE THAN ONE Application, and they are different types.** This
|
|
302
|
+
is the single thing most likely to waste your afternoon, because one application
|
|
303
|
+
configured for one caller returns a plain `401` to the other with nothing
|
|
304
|
+
naming the mismatch (found the hard way, 2026-08-26). One API, one caller per
|
|
305
|
+
row:
|
|
306
|
+
|
|
307
|
+
| The caller | Auth0 Application Type | Token endpoint auth | Callback | Needs step 5 |
|
|
308
|
+
| ------------------------------------------------- | --------------------------- | -------------------------- | ------------------------------------------------------------------- | ------------ |
|
|
309
|
+
| the SITE's sign-in control (`NEXT_PUBLIC_KSOR_*`) | **Single Page Application** | **None** — PKCE, no secret | `https://your-site/auth/callback` | no |
|
|
310
|
+
| an assistant a person logs into (Claude, an IDE) | **Regular Web Application** | client secret | the assistant's own, e.g. `https://claude.ai/api/mcp/auth_callback` | **yes** |
|
|
311
|
+
| a script, worker or backend agent | **Machine to Machine** | client secret | none | **yes** |
|
|
312
|
+
|
|
313
|
+
The site row is a different flow and not really part of this page: it requests
|
|
314
|
+
`openid profile email` and **no audience**, so it never touches your API and
|
|
315
|
+
needs no grant. It is here only so you do not try to serve it and an assistant
|
|
316
|
+
from one application — a public client with no secret and a confidential client
|
|
317
|
+
that sends one cannot be the same registration, and the failure is a `401` at
|
|
318
|
+
the token endpoint that says nothing about why.
|
|
319
|
+
|
|
301
320
|
### 1. Describe the door
|
|
302
321
|
|
|
303
322
|
**Applications → APIs → Create API.** The **Identifier** you type becomes the
|
|
@@ -309,6 +328,24 @@ Name: my-record
|
|
|
309
328
|
Identifier: https://your-host.example.com/mcp
|
|
310
329
|
```
|
|
311
330
|
|
|
331
|
+
**Type the whole URL, `/mcp` included, and get it right the first time.** The
|
|
332
|
+
Identifier must equal `KSOR_MCP_RESOURCE_URL` character for character — the host
|
|
333
|
+
alone is not enough, because that is not what the door will compare against. And
|
|
334
|
+
**Auth0 does not let you edit an Identifier after the API is created**: a wrong
|
|
335
|
+
one is fixed by creating a NEW API with the right string and granting your
|
|
336
|
+
application access to that one instead.
|
|
337
|
+
|
|
338
|
+
Two Auth0 errors tell you exactly where you are, and they are easy to confuse
|
|
339
|
+
because both arrive as a failed token request (reported by an adopter,
|
|
340
|
+
2026-08-26):
|
|
341
|
+
|
|
342
|
+
| Auth0 says | Means |
|
|
343
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
344
|
+
| `Service not enabled within domain: https://…/mcp` | **no API has that Identifier.** Yours was created with a different string — make a new one |
|
|
345
|
+
| `Client "…" is not authorized to access resource server "https://…/mcp"` | the API is right and the **grant** is missing — step 5 |
|
|
346
|
+
|
|
347
|
+
Moving from the first message to the second is progress, not a new problem.
|
|
348
|
+
|
|
312
349
|
Creating it also creates a machine-to-machine **test application** named
|
|
313
350
|
`<API> (Test Application)`. That is your first caller — you do not need to make
|
|
314
351
|
one.
|
|
@@ -447,9 +484,25 @@ Use the commands below when it did NOT work, or when the caller is a script
|
|
|
447
484
|
rather than a person. A token from your provider proves the provider works; it
|
|
448
485
|
does not prove the door does. Both halves matter, and the refusal matters more.
|
|
449
486
|
|
|
487
|
+
**0. Ask the provider for a token FIRST, before you touch the door.** Half the
|
|
488
|
+
failures on this page never reach ksor at all, and this one command separates
|
|
489
|
+
the two halves in a second:
|
|
490
|
+
|
|
491
|
+
```sh
|
|
492
|
+
curl -s -X POST https://YOUR_TENANT.us.auth0.com/oauth/token \
|
|
493
|
+
-H 'content-type: application/json' \
|
|
494
|
+
-d '{"grant_type":"client_credentials","client_id":"…","client_secret":"…",
|
|
495
|
+
"audience":"https://your-host.example.com/mcp"}'
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
An `error` here is the PROVIDER refusing, and no amount of ksor configuration
|
|
499
|
+
will change it — see the table in step 1 for what each message means. An
|
|
500
|
+
`access_token` here means the provider works, and anything still failing is the
|
|
501
|
+
door or the token's contents, which is what the rest of this section is for.
|
|
502
|
+
|
|
450
503
|
**1. Decode the token before using it.** This is the single most useful
|
|
451
|
-
debugging step
|
|
452
|
-
looks identical to a broken one:
|
|
504
|
+
debugging step once you have one, because a valid token audienced at the wrong
|
|
505
|
+
thing looks identical to a broken one:
|
|
453
506
|
|
|
454
507
|
```sh
|
|
455
508
|
echo "$TOKEN" | cut -d. -f2 | base64 -d 2>/dev/null | jq '{iss, aud, exp}'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panaversity/ksor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.47",
|
|
4
4
|
"description": "Knowledge System of Record — compile governed markdown into a static site for people and an MCP server for AI agents, with citations and measured abstention.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"abstention",
|
|
@@ -14,32 +14,55 @@ question at a time, and write down what they actually say.
|
|
|
14
14
|
|
|
15
15
|
## Ask THREE questions, one at a time
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
Ask them in the OWNER's words, not this project's. The vocabulary on this page
|
|
18
|
+
— record, corpus, abstention, governance act — is precise and it is ours; an
|
|
19
|
+
owner meeting it for the first time in a question cannot answer, and says so
|
|
20
|
+
(reported 2026-08-26, against the wording these replaced: "the corpus wins
|
|
21
|
+
about ___" asked them to complete a sentence that is not English unless you
|
|
22
|
+
already know the ledger analogy).
|
|
23
|
+
|
|
24
|
+
Ask exactly this much. Do not explain what the answer will be used for inside
|
|
25
|
+
the question — that is what made the last version unanswerable.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**1 of 3 — What is this knowledge base about?**
|
|
30
|
+
|
|
31
|
+
> Be specific enough that I would know what does NOT belong in it.
|
|
32
|
+
>
|
|
33
|
+
> Too vague: "our engineering docs" — I still could not tell what to leave out.
|
|
34
|
+
> Specific enough: "our leave, expense and conduct policies, current versions
|
|
35
|
+
> only."
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
**2 of 3 — What is close to that, but not part of it?**
|
|
40
|
+
|
|
41
|
+
> Things people will ask this and it should NOT answer. A confident wrong
|
|
42
|
+
> answer is worse than "I do not cover that."
|
|
43
|
+
>
|
|
44
|
+
> For the policies example: "not salaries, not individual HR cases, not last
|
|
45
|
+
> year's versions."
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**3 of 3 — Who signs off on a document, and who can take one down?**
|
|
50
|
+
|
|
51
|
+
> Names or handles, not job titles. If it is just you, say so.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
Follow up until each is concrete, but follow up in their words too: "what would
|
|
56
|
+
someone actually ask this?" gets further than "name the boundary".
|
|
57
|
+
|
|
58
|
+
**Why these three and no others.** The first two give the record an EDGE, and
|
|
59
|
+
the abstention gate is meaningless without one: a knowledge base that is
|
|
60
|
+
authoritative for everything has no outside, so an agent asked something the
|
|
61
|
+
owner never wrote about reaches for its training instead of declining. The
|
|
62
|
+
third cannot be guessed at all — the scaffold ships `human:you` in both
|
|
63
|
+
authority lists, and a placeholder that survives this conversation is a person
|
|
64
|
+
who was never there. Everything else has a sane default, and defaults are
|
|
65
|
+
stated rather than asked.
|
|
43
66
|
|
|
44
67
|
## Then STATE the defaults; do not ask them
|
|
45
68
|
|
|
@@ -14,32 +14,55 @@ question at a time, and write down what they actually say.
|
|
|
14
14
|
|
|
15
15
|
## Ask THREE questions, one at a time
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
Ask them in the OWNER's words, not this project's. The vocabulary on this page
|
|
18
|
+
— record, corpus, abstention, governance act — is precise and it is ours; an
|
|
19
|
+
owner meeting it for the first time in a question cannot answer, and says so
|
|
20
|
+
(reported 2026-08-26, against the wording these replaced: "the corpus wins
|
|
21
|
+
about ___" asked them to complete a sentence that is not English unless you
|
|
22
|
+
already know the ledger analogy).
|
|
23
|
+
|
|
24
|
+
Ask exactly this much. Do not explain what the answer will be used for inside
|
|
25
|
+
the question — that is what made the last version unanswerable.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**1 of 3 — What is this knowledge base about?**
|
|
30
|
+
|
|
31
|
+
> Be specific enough that I would know what does NOT belong in it.
|
|
32
|
+
>
|
|
33
|
+
> Too vague: "our engineering docs" — I still could not tell what to leave out.
|
|
34
|
+
> Specific enough: "our leave, expense and conduct policies, current versions
|
|
35
|
+
> only."
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
**2 of 3 — What is close to that, but not part of it?**
|
|
40
|
+
|
|
41
|
+
> Things people will ask this and it should NOT answer. A confident wrong
|
|
42
|
+
> answer is worse than "I do not cover that."
|
|
43
|
+
>
|
|
44
|
+
> For the policies example: "not salaries, not individual HR cases, not last
|
|
45
|
+
> year's versions."
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**3 of 3 — Who signs off on a document, and who can take one down?**
|
|
50
|
+
|
|
51
|
+
> Names or handles, not job titles. If it is just you, say so.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
Follow up until each is concrete, but follow up in their words too: "what would
|
|
56
|
+
someone actually ask this?" gets further than "name the boundary".
|
|
57
|
+
|
|
58
|
+
**Why these three and no others.** The first two give the record an EDGE, and
|
|
59
|
+
the abstention gate is meaningless without one: a knowledge base that is
|
|
60
|
+
authoritative for everything has no outside, so an agent asked something the
|
|
61
|
+
owner never wrote about reaches for its training instead of declining. The
|
|
62
|
+
third cannot be guessed at all — the scaffold ships `human:you` in both
|
|
63
|
+
authority lists, and a placeholder that survives this conversation is a person
|
|
64
|
+
who was never there. Everything else has a sane default, and defaults are
|
|
65
|
+
stated rather than asked.
|
|
43
66
|
|
|
44
67
|
## Then STATE the defaults; do not ask them
|
|
45
68
|
|