ctxr-cli 0.36.0 → 0.37.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 +21 -201
- package/README.md +14 -9
- package/dist/commands/plugin-build.d.ts +21 -11
- package/dist/commands/plugin-build.d.ts.map +1 -1
- package/dist/commands/plugin-build.js +45 -24
- package/dist/commands/plugin-build.js.map +1 -1
- package/dist/core/command.d.ts +5 -3
- package/dist/core/command.d.ts.map +1 -1
- package/dist/core/mcp/surface.js +1 -1
- package/dist/core/mcp/surface.js.map +1 -1
- package/dist/core/mcp/sync.d.ts +4 -1
- package/dist/core/mcp/sync.d.ts.map +1 -1
- package/dist/core/mcp/sync.js +6 -5
- package/dist/core/mcp/sync.js.map +1 -1
- package/dist/core/mcp/tool-map.d.ts +13 -11
- package/dist/core/mcp/tool-map.d.ts.map +1 -1
- package/dist/core/mcp/tool-map.js +13 -11
- package/dist/core/mcp/tool-map.js.map +1 -1
- package/dist/core/mcp/tools/gather.d.ts.map +1 -1
- package/dist/core/mcp/tools/gather.js +5 -4
- package/dist/core/mcp/tools/gather.js.map +1 -1
- package/dist/core/mcp/tools/index.d.ts +9 -1
- package/dist/core/mcp/tools/index.d.ts.map +1 -1
- package/dist/core/mcp/tools/index.js +20 -3
- package/dist/core/mcp/tools/index.js.map +1 -1
- package/dist/core/plugin/build.d.ts +53 -26
- package/dist/core/plugin/build.d.ts.map +1 -1
- package/dist/core/plugin/build.js +153 -50
- package/dist/core/plugin/build.js.map +1 -1
- package/dist/core/plugin/commands.d.ts +11 -0
- package/dist/core/plugin/commands.d.ts.map +1 -0
- package/dist/core/plugin/commands.js +23 -0
- package/dist/core/plugin/commands.js.map +1 -0
- package/dist/core/plugin/routes.d.ts +11 -7
- package/dist/core/plugin/routes.d.ts.map +1 -1
- package/dist/core/plugin/routes.js +27 -24
- package/dist/core/plugin/routes.js.map +1 -1
- package/dist/core/session/submit.d.ts.map +1 -1
- package/dist/core/session/submit.js +6 -3
- package/dist/core/session/submit.js.map +1 -1
- package/dist/core/shared-stores.d.ts +5 -0
- package/dist/core/shared-stores.d.ts.map +1 -1
- package/dist/core/shared-stores.js +10 -0
- package/dist/core/shared-stores.js.map +1 -1
- package/dist/core/skill-placeholders.d.ts +51 -0
- package/dist/core/skill-placeholders.d.ts.map +1 -0
- package/dist/core/skill-placeholders.js +55 -0
- package/dist/core/skill-placeholders.js.map +1 -0
- package/dist/core/skills.d.ts +37 -12
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +78 -89
- package/dist/core/skills.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +25 -6
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/templates/mcp/server-instructions.md +16 -0
- package/templates/plugin/README.md +30 -8
- package/templates/plugin/chatgpt-README.md +16 -0
- package/templates/plugin/claude-plugin.json +9 -1
- package/templates/plugin/command.md +7 -0
- package/templates/plugin/page.html +19 -8
- package/templates/skills/_surfaces.md +30 -0
- package/templates/skills/ctxr-placement.md +1 -1
- package/templates/skills/ctxr-session-lifecycle.md +6 -5
- package/templates/skills/mcp/_layer-step.md +18 -0
- package/templates/skills/mcp/_relation-grouping-step.md +5 -0
- package/templates/plugin/claude-mcp.json +0 -8
- package/templates/skills/mcp/_preamble.md +0 -44
|
@@ -22,10 +22,11 @@ session's worktree is gone. The name becomes a git ref and a directory, so keep
|
|
|
22
22
|
that should not be written down.
|
|
23
23
|
|
|
24
24
|
Before starting, bring the store's canonical clone up to date — the repository's main worktree, not
|
|
25
|
-
whichever checkout you are standing in.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
whichever checkout you are standing in. In a shell, run `ctxr sync`; through the store's server, skip
|
|
26
|
+
this step, because the server keeps its own clone current. It fetches `__DEFAULT_BRANCH__` and
|
|
27
|
+
fast-forwards the canonical clone, and leaves it alone when it is on another branch, carries uncommitted
|
|
28
|
+
changes, or has diverged from origin. If it reports that, report exactly that and start the session
|
|
29
|
+
anyway — never check it out, reset it, stash, or force the merge to make it comply. The
|
|
29
30
|
session's base is unaffected either way, because `ctxr session start` branches from the
|
|
30
31
|
`origin/__DEFAULT_BRANCH__` it fetches itself. What a stale clone costs is the context you read out of
|
|
31
32
|
it: notes, catalog sections, the graph document, and AGENTS.md would all be the versions it last had.
|
|
@@ -56,7 +57,7 @@ It reports each session with its open pull request and the decision made on the
|
|
|
56
57
|
|
|
57
58
|
Skip this section when the store mounts no other stores under `shared/`.
|
|
58
59
|
|
|
59
|
-
- After you bring the canonical clone up to date, run `ctxr shared-stores sync
|
|
60
|
+
- After you bring the canonical clone up to date, run `ctxr shared-stores sync` in a shell; through the store's server, skip this step, because the server keeps no mounts. It clones a missing mount and fast-forwards the others.
|
|
60
61
|
- Report a mount that sync left alone, with its reason. Do not reset, stash or force it. Why: local work in a mount is somebody's session.
|
|
61
62
|
- To write into a mount for the work of this store's session, change into `shared/<name>`. Run `ctxr session start --joins <session>` there, with this store's session name. Why: the mount's session then joins this one, and one decision covers both pull requests.
|
|
62
63
|
- The command refuses outside a mount, or for a session this store does not have. Report the refusal. Do not start a plain session instead.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## 1. Which layer?
|
|
2
|
+
|
|
3
|
+
The connector's instructions list this store's layers, each with its description, under *This store*;
|
|
4
|
+
AGENTS.md's "Placing a new note" section lists them too. Choose by what the content fundamentally IS, not by
|
|
5
|
+
surface keywords; a label on a location says nothing about what is actually kept there.
|
|
6
|
+
|
|
7
|
+
- A layer whose description names an end state, a finish line or a deadline takes only what has a finish
|
|
8
|
+
line: if it never closes, it does not belong there. An item in that layer that can never close is a smell
|
|
9
|
+
— it either clutters the layer as open-forever or gets retired prematurely. Never create one on purpose;
|
|
10
|
+
an ongoing responsibility with a standard to maintain belongs in a layer whose description says so.
|
|
11
|
+
- A layer whose description says it holds completed, abandoned or inactive items is where the other layers'
|
|
12
|
+
finished or dropped items go — never a first placement. Retire a note with `ctxr archive <path>` (a
|
|
13
|
+
tracked move; frontmatter untouched).
|
|
14
|
+
|
|
15
|
+
If the store lists no layers, there is no layer decision: place the note next to the notes it will link to
|
|
16
|
+
most (`ctxr graph query neighbors <path>` on the closest existing note shows that cluster) and let wikilinks
|
|
17
|
+
carry the structure. If no layer fits, use the catch-all location AGENTS.md names and revisit the placement
|
|
18
|
+
later.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
5. Group proposals by the relation vocabulary the connector's instructions list under *This store*, each
|
|
2
|
+
with its definition. The section headings carrying these names are what `ctxr graph build` types edges
|
|
3
|
+
from, so a link written under the right heading becomes a typed edge on the next build. Format each item
|
|
4
|
+
as `[[Note]]` — reason. Choose between two adjacent relations by their definitions, not their names, and
|
|
5
|
+
remember that an edge is recorded only on the note carrying the link.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
## Before this skill: the store's tools stand in for a checkout
|
|
2
|
-
|
|
3
|
-
You are working through this store's server, not in a checkout of it. Nothing runs a shell here, so no
|
|
4
|
-
`git`, `gh` or `ctxr` command runs as written. The skill below was written for an agent with a checkout:
|
|
5
|
-
follow it as written, and take each step it names through the tool these tables give.
|
|
6
|
-
|
|
7
|
-
### Commands
|
|
8
|
-
|
|
9
|
-
__COMMAND_TABLE__
|
|
10
|
-
|
|
11
|
-
A command marked none has no counterpart here: skip that step and say nothing about it. Each other tool takes its command's options as fields, each named for its option without the leading
|
|
12
|
-
dashes, and the session the command names as `session`: the session worktree's directory name, which
|
|
13
|
-
`session_start` returns and `session_list` lists. `session_start` takes the session's name as `label`.
|
|
14
|
-
|
|
15
|
-
Every other `ctxr` step runs through the `ctxr` tool when the command only reads, and through `ctxr_write`
|
|
16
|
-
when it writes. Pass the words after `ctxr` as `args`, one word per entry: a step that says to run
|
|
17
|
-
`ctxr lint` is the `ctxr` tool with `args` set to `["lint"]`. Name a session as `session` to run the command
|
|
18
|
-
in that session's working tree; `ctxr_write` always needs one. When a command reads a file you prepared,
|
|
19
|
-
pass the file's text as `input` and write `@input` in `args` where its path goes.
|
|
20
|
-
|
|
21
|
-
### Git steps
|
|
22
|
-
|
|
23
|
-
__GIT_STEP_TABLE__
|
|
24
|
-
|
|
25
|
-
Commits, pushes and pull requests happen only in `session_submit`. A step marked none is the server's own
|
|
26
|
-
work: it keeps the store's clone current, and `session_start` branches from the freshly fetched default
|
|
27
|
-
branch. Skip that step and say nothing about it.
|
|
28
|
-
|
|
29
|
-
### Paths
|
|
30
|
-
|
|
31
|
-
`session_start` returns the session's root, a path such as `__WORKTREES_PATH__<directory>/`. Every path the
|
|
32
|
-
skill names is relative to the store; inside a session it goes under that root, so the note `work/a.md` in
|
|
33
|
-
that session is `__WORKTREES_PATH__<directory>/work/a.md` for `Read`, `Edit`, `Write`, `Move`, `Delete`,
|
|
34
|
-
`Grep` and `Glob`. A path without a session root reads the store as it was last approved, and a write to one
|
|
35
|
-
is refused. A change rests uncommitted in its session until `session_submit`.
|
|
36
|
-
|
|
37
|
-
### Sessions across conversations
|
|
38
|
-
|
|
39
|
-
The server keeps a session between conversations, but it cannot tell two conversations apart. At the
|
|
40
|
-
start of a conversation, call `session_list` and mention each open session: what it holds uncommitted,
|
|
41
|
-
and any requested changes on its pull request. Work in the session the person names, or start one.
|
|
42
|
-
|
|
43
|
-
Where the skill hands off to a skill this environment does not carry, such as landing or upgrading, or
|
|
44
|
-
asks you to work inside a store mounted under `shared/`, that step is not yours here: a person lands an approved change from the store's approval page.
|