@jitera/connect 1.5.0 → 2.1.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +51 -13
- package/content/instructions.md +7 -4
- package/content/session-start-unbound.md +12 -0
- package/content/session-start.md +14 -5
- package/dist/bin/cli.js +101 -93
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/connect.js +3 -0
- package/dist/bin/connect.js.map +1 -1
- package/dist/bin/init.js +122 -119
- package/dist/bin/init.js.map +1 -1
- package/dist/bin/login.js +221 -211
- package/dist/bin/login.js.map +1 -1
- package/dist/bin/proxy.js +2 -1
- package/dist/bin/proxy.js.map +1 -1
- package/dist/bin/set-agent.d.ts +3 -0
- package/dist/bin/set-agent.d.ts.map +1 -0
- package/dist/bin/set-agent.js +165 -0
- package/dist/bin/set-agent.js.map +1 -0
- package/dist/bin/statusline.js +6 -1
- package/dist/bin/statusline.js.map +1 -1
- package/dist/cli-session.d.ts +12 -0
- package/dist/cli-session.d.ts.map +1 -1
- package/dist/cli-session.js +25 -0
- package/dist/cli-session.js.map +1 -1
- package/dist/exit.d.ts +8 -0
- package/dist/exit.d.ts.map +1 -0
- package/dist/exit.js +32 -0
- package/dist/exit.js.map +1 -0
- package/dist/graphql.d.ts +6 -0
- package/dist/graphql.d.ts.map +1 -1
- package/dist/graphql.js +24 -0
- package/dist/graphql.js.map +1 -1
- package/dist/hook-io.d.ts +2 -0
- package/dist/hook-io.d.ts.map +1 -1
- package/dist/hook-io.js +3 -0
- package/dist/hook-io.js.map +1 -1
- package/dist/hooks/session-start.js +19 -5
- package/dist/hooks/session-start.js.map +1 -1
- package/dist/hooks/stop.js +7 -1
- package/dist/hooks/stop.js.map +1 -1
- package/dist/hooks/user-prompt-submit.js +78 -20
- package/dist/hooks/user-prompt-submit.js.map +1 -1
- package/dist/project-marker.d.ts +1 -0
- package/dist/project-marker.d.ts.map +1 -1
- package/dist/project-marker.js +40 -2
- package/dist/project-marker.js.map +1 -1
- package/dist/proxy.d.ts +5 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +42 -2
- package/dist/proxy.js.map +1 -1
- package/dist/select.d.ts +17 -0
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +164 -3
- package/dist/select.js.map +1 -1
- package/dist/statusline.d.ts +2 -1
- package/dist/statusline.d.ts.map +1 -1
- package/dist/statusline.js +6 -1
- package/dist/statusline.js.map +1 -1
- package/package.json +1 -1
- package/skills/jitera-context/SKILL.md +22 -0
- package/skills/jitera-memory/SKILL.md +20 -2
- package/templates/AGENTS.md.tmpl +10 -4
package/dist/statusline.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { SessionStatus } from "./session-status.ts";
|
|
|
2
2
|
export interface StatusLineInput {
|
|
3
3
|
readonly status?: SessionStatus | undefined;
|
|
4
4
|
readonly markerEnvironment?: string | undefined;
|
|
5
|
+
readonly bound?: boolean | undefined;
|
|
5
6
|
}
|
|
6
|
-
export declare function renderStatusLine({ status, markerEnvironment }: StatusLineInput): string;
|
|
7
|
+
export declare function renderStatusLine({ status, markerEnvironment, bound, }: StatusLineInput): string;
|
|
7
8
|
//# sourceMappingURL=statusline.d.ts.map
|
package/dist/statusline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../src/statusline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"statusline.d.ts","sourceRoot":"","sources":["../src/statusline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAGhD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC;AAUD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,iBAAiB,EACjB,KAAK,GACN,EAAE,eAAe,GAAG,MAAM,CAwB1B"}
|
package/dist/statusline.js
CHANGED
|
@@ -8,11 +8,16 @@ function compactChars(chars) {
|
|
|
8
8
|
function compactMs(ms) {
|
|
9
9
|
return ms >= 1000 ? `${(ms / 1000).toFixed(1)}s` : `${ms}ms`;
|
|
10
10
|
}
|
|
11
|
-
export function renderStatusLine({ status, markerEnvironment }) {
|
|
11
|
+
export function renderStatusLine({ status, markerEnvironment, bound, }) {
|
|
12
12
|
if (!status)
|
|
13
13
|
return `${DIM}○${RESET} jitera`;
|
|
14
14
|
if (!status.configured)
|
|
15
15
|
return `${DIM}○${RESET} jitera · not connected`;
|
|
16
|
+
// Connected, but this repository is not bound to a project, so the hooks
|
|
17
|
+
// deliberately do nothing here. Carry the command that fixes it.
|
|
18
|
+
if (bound === false) {
|
|
19
|
+
return `${YELLOW}○${RESET} jitera · not initialised · npx @jitera/connect init`;
|
|
20
|
+
}
|
|
16
21
|
const dot = status.recallError ? `${YELLOW}●${RESET}` : `${GREEN}●${RESET}`;
|
|
17
22
|
const parts = [`${dot} jitera`];
|
|
18
23
|
if (status.environment)
|
package/dist/statusline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusline.js","sourceRoot":"","sources":["../src/statusline.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG,OAAO,CAAC;AACtB,MAAM,MAAM,GAAG,OAAO,CAAC;AACvB,MAAM,GAAG,GAAG,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,SAAS,CAAC,CAAC;IAChC,IAAI,MAAM,CAAC,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAEvD,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC9B,CAAC;SAAM,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;QACzF,KAAK,CAAC,IAAI,CAAC,UAAU,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,iBAAiB,IAAI,MAAM,CAAC,WAAW,IAAI,iBAAiB,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC;QACxF,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,cAAc,iBAAiB,GAAG,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -17,6 +17,24 @@ Three virtual domains:
|
|
|
17
17
|
| `sources/` | Project source code | no |
|
|
18
18
|
| `uploads/` | Uploaded files | no |
|
|
19
19
|
|
|
20
|
+
## Start with the whole picture
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
gather_jitera_context(task="how do refunds get issued", budget=6000)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Recalls project memory and searches documentation and source in one call,
|
|
27
|
+
running the widening fallbacks itself: memory falls back to every stored entity
|
|
28
|
+
when keywords match nothing, and search falls back to fuzzy matching when exact
|
|
29
|
+
matching is dry. It also lists the project's agents, so a recalled fact can be
|
|
30
|
+
attributed. Use it before planning or answering, then narrow with the tools
|
|
31
|
+
below.
|
|
32
|
+
|
|
33
|
+
It is not a once-per-session lookup. Call it again whenever the work reaches
|
|
34
|
+
something you have not gathered context for yet: a subsystem you have not
|
|
35
|
+
touched, a name you do not recognise, or a decision about how something should
|
|
36
|
+
work. Checking costs one call; guessing costs the rest of the session.
|
|
37
|
+
|
|
20
38
|
## Searching
|
|
21
39
|
|
|
22
40
|
```
|
|
@@ -27,6 +45,10 @@ resource_search(pattern="documents/**/*.md", content="refund", limit=30, offset=
|
|
|
27
45
|
domain prefix to search every domain: `resource_search(pattern="**/checkout*.*")`
|
|
28
46
|
- `content` — a grep-style match inside files, supporting boolean expressions:
|
|
29
47
|
`content="(api OR rest) AND controller"`
|
|
48
|
+
- `mode` — how `content` is matched. `default` is a case-insensitive substring;
|
|
49
|
+
`regex` treats `content` as a case-insensitive regular expression; `full-text`
|
|
50
|
+
matches fuzzily by trigram similarity, for when you are unsure of the exact
|
|
51
|
+
wording. `pattern` is always a glob, whatever the mode
|
|
30
52
|
- Results are grouped by domain. Open a match with `resource_read`
|
|
31
53
|
|
|
32
54
|
Search before reading. Do not guess paths.
|
|
@@ -31,17 +31,35 @@ failed.
|
|
|
31
31
|
|
|
32
32
|
### When the first recall comes back thin
|
|
33
33
|
|
|
34
|
-
`
|
|
35
|
-
|
|
34
|
+
`gather_jitera_context` runs this ladder for you and says when it widened, so
|
|
35
|
+
prefer it for a first look. Reach for `recall_jitera_memory` directly when you
|
|
36
|
+
want memory alone, and work down the ladder yourself:
|
|
36
37
|
|
|
37
38
|
1. `recall_jitera_memory(query="<specific terms from the task>")`
|
|
38
39
|
2. `recall_jitera_memory(query="<the subsystem or domain>")`
|
|
39
40
|
3. `recall_jitera_memory()` with no query — returns every stored entity
|
|
40
41
|
|
|
42
|
+
Keywords are combined with OR, so *more* terms match more entities. There is no
|
|
43
|
+
narrower rung below step 1 — when it comes back empty, widen rather than
|
|
44
|
+
refine.
|
|
45
|
+
|
|
41
46
|
Do not conclude that memory is empty until step 3 returns nothing. Results
|
|
42
47
|
containing `[[id]]` references mean related entities exist, and a broader query
|
|
43
48
|
will surface them.
|
|
44
49
|
|
|
50
|
+
### Whose memory you are reading
|
|
51
|
+
|
|
52
|
+
Each agent in a project writes to its own partition. A project-level key reads
|
|
53
|
+
across all of them, so a recalled fact may have been written by any agent;
|
|
54
|
+
`list_jitera_agents` names them. A key pinned to one agent sees only that
|
|
55
|
+
agent's own partition.
|
|
56
|
+
|
|
57
|
+
A repository can narrow that itself: `.jitera.json` may carry an `agents` list,
|
|
58
|
+
written by `npx @jitera/connect set-agent`, and sessions there read only those
|
|
59
|
+
agents plus anything written project-wide. Pass `agents` to
|
|
60
|
+
`recall_jitera_memory` or `gather_jitera_context` to narrow a single call the
|
|
61
|
+
same way. Omit it to read every agent.
|
|
62
|
+
|
|
45
63
|
## Remember when knowledge is created
|
|
46
64
|
|
|
47
65
|
Persist with `remember_jitera_memory(name, type, attrs)` when:
|
package/templates/AGENTS.md.tmpl
CHANGED
|
@@ -4,16 +4,22 @@
|
|
|
4
4
|
This repository is connected to a {{BRAND}} project. Documentation, source, and a
|
|
5
5
|
shared project memory are available through the `jitera` MCP server.
|
|
6
6
|
|
|
7
|
-
Before planning or implementing anything,
|
|
8
|
-
|
|
7
|
+
Before planning or implementing anything, and before answering a question about
|
|
8
|
+
this project, call `gather_jitera_context` with the task in your own words. It
|
|
9
|
+
recalls project memory and searches documentation and source in one pass. An
|
|
10
|
+
empty result is normal and is not an error.
|
|
11
|
+
|
|
12
|
+
Keep using it as the work moves. It is not a once-per-session lookup: call it
|
|
13
|
+
again whenever you reach an area you have not gathered context for yet.
|
|
9
14
|
|
|
10
15
|
Before writing a spec or design, search `documents/` with `resource_search` and
|
|
11
16
|
read any match with `resource_read`. Update the existing document rather than
|
|
12
17
|
creating a second one.
|
|
13
18
|
|
|
14
19
|
When a decision is made, a constraint is discovered, or you are corrected,
|
|
15
|
-
persist it with `remember_jitera_memory`. Recall the entity first
|
|
16
|
-
full attribute list, because entities are
|
|
20
|
+
persist it with `remember_jitera_memory`. Recall the entity first with
|
|
21
|
+
`recall_jitera_memory` and re-send its full attribute list, because entities are
|
|
22
|
+
keyed on name plus type.
|
|
17
23
|
|
|
18
24
|
`documents/` is readable and writable. `sources/` and `uploads/` are read-only.
|
|
19
25
|
|