@lore-co/cli 0.1.10 → 0.1.11
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/README.md +41 -22
- package/dist/cli.d.ts +18 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +495 -82
- package/dist/cli.js.map +1 -1
- package/dist/demo.d.ts +2 -1
- package/dist/demo.d.ts.map +1 -1
- package/dist/demo.js.map +1 -1
- package/dist/devin.d.ts.map +1 -1
- package/dist/devin.js +4 -3
- package/dist/devin.js.map +1 -1
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.js +4 -4
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +11 -7
- package/dist/github.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +15 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +167 -26
- package/dist/runtime.js.map +1 -1
- package/dist/self-host.d.ts +1 -1
- package/dist/self-host.js +2 -2
- package/dist/update.js +3 -3
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Lore CLI
|
|
2
2
|
|
|
3
|
-
The Lore connector installs native Codex
|
|
4
|
-
the Lore OpenCode plugin. For each supported prompt, Lore
|
|
5
|
-
relevant engineering context. A first prompt is observed
|
|
6
|
-
prompts are paired with the previous assistant response when
|
|
7
|
-
state is available. Integration and network failures fail open so they
|
|
8
|
-
block the agent.
|
|
3
|
+
The Lore connector installs native Codex, Claude Code, Cursor, and Polytoken
|
|
4
|
+
lifecycle hooks plus the Lore OpenCode plugin. For each supported prompt, Lore
|
|
5
|
+
attempts to retrieve relevant engineering context. A first prompt is observed
|
|
6
|
+
on its own; later prompts are paired with the previous assistant response when
|
|
7
|
+
valid pending state is available. Integration and network failures fail open so they
|
|
8
|
+
do not block the agent.
|
|
9
9
|
|
|
10
10
|
## Install and connect
|
|
11
11
|
|
|
@@ -16,16 +16,29 @@ lore connect \
|
|
|
16
16
|
--token "$LORE_WORKSPACE_TOKEN" \
|
|
17
17
|
--agent claude \
|
|
18
18
|
--agent codex \
|
|
19
|
-
--agent
|
|
19
|
+
--agent cursor \
|
|
20
|
+
--agent opencode \
|
|
21
|
+
--agent polytoken
|
|
20
22
|
|
|
21
23
|
lore doctor
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
The package requires Node.js 22 or newer and installs the `lore` command.
|
|
25
27
|
|
|
26
|
-
`connect` auto-detects the `codex`, `claude`,
|
|
27
|
-
existing
|
|
28
|
-
|
|
28
|
+
`connect` auto-detects the `codex`, `claude`, `cursor`, `opencode`, and
|
|
29
|
+
`polytoken` executables plus existing Cursor, OpenCode, and Polytoken
|
|
30
|
+
configuration directories.
|
|
31
|
+
Repeat `--agent claude`, `--agent codex`, `--agent cursor`, or
|
|
32
|
+
`--agent opencode` for an explicit headless install. `--agent polytoken`
|
|
33
|
+
updates `$XDG_CONFIG_HOME/polytoken/hooks.json` (normally
|
|
34
|
+
`~/.config/polytoken/hooks.json`). `--agent t3code` detects and configures the
|
|
35
|
+
supported Claude, Codex, Cursor, or OpenCode provider instances that T3 Code
|
|
36
|
+
delegates to. It reads `$T3CODE_HOME/userdata/settings.json` or
|
|
37
|
+
`~/.t3/userdata/settings.json`, follows custom provider homes, and does not
|
|
38
|
+
modify T3 settings or secrets. External OpenCode servers must be configured on
|
|
39
|
+
the server. Cursor ACP sessions require a live canary because Cursor does not
|
|
40
|
+
guarantee lifecycle hooks in ACP mode. Lore does not install a duplicate T3
|
|
41
|
+
lifecycle layer.
|
|
29
42
|
Configuration is stored in `~/.lore/config.json` with mode `0600`.
|
|
30
43
|
Before writing that file or any agent integration, `connect` calls the
|
|
31
44
|
authenticated workspace identity endpoint and validates the strict response
|
|
@@ -44,7 +57,7 @@ For a review-first rollout in a personal vault or component catalog, follow the
|
|
|
44
57
|
|
|
45
58
|
```sh
|
|
46
59
|
lore update
|
|
47
|
-
lore update --version v0.1.
|
|
60
|
+
lore update --version v0.1.11
|
|
48
61
|
```
|
|
49
62
|
|
|
50
63
|
`update` resolves the latest release to an exact tag, or uses the exact
|
|
@@ -54,11 +67,12 @@ version before replacing the current target. `LORE_REPO` selects another
|
|
|
54
67
|
GitHub repository and `LORE_RELEASE_BASE_URL` selects an HTTPS release mirror;
|
|
55
68
|
`LORE_BIN_DIR` overrides the standalone install directory.
|
|
56
69
|
|
|
57
|
-
The command merges Lore-owned entries into `~/.codex/hooks.json
|
|
58
|
-
`~/.claude/settings.json`, and
|
|
59
|
-
`plugin` array in
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
The command merges Lore-owned entries into `~/.codex/hooks.json`,
|
|
71
|
+
`~/.claude/settings.json`, and `~/.cursor/hooks.json`, and merges
|
|
72
|
+
`@lore-co/opencode` into the `plugin` array in
|
|
73
|
+
`~/.config/opencode/opencode.json`. Existing settings, hooks, keys, and plugins
|
|
74
|
+
are retained. Changed agent config files receive timestamped backups, and
|
|
75
|
+
rerunning `connect` does not duplicate entries or backups.
|
|
62
76
|
|
|
63
77
|
## Inspect or remove
|
|
64
78
|
|
|
@@ -105,14 +119,19 @@ command has subcommand-specific `--help`, and `up`, `down`, and `status` support
|
|
|
105
119
|
|
|
106
120
|
## Runtime behavior
|
|
107
121
|
|
|
108
|
-
The Claude/Codex command-hook handler:
|
|
122
|
+
The Claude/Codex/Cursor/Polytoken command-hook handler:
|
|
109
123
|
|
|
110
|
-
- reads native hook JSON from standard input
|
|
124
|
+
- reads native hook JSON from standard input and normalizes Cursor and
|
|
125
|
+
Polytoken event names;
|
|
111
126
|
- observes and enriches the first prompt in a new session;
|
|
112
|
-
- uses `last_assistant_message`,
|
|
127
|
+
- uses `last_assistant_message`, Cursor's `afterAgentResponse`, or Polytoken's
|
|
128
|
+
`post_model_turn`, not a potentially stale transcript;
|
|
113
129
|
- stores pending state and failed turn requests under `~/.lore`;
|
|
114
130
|
- retries one queued request on a later prompt;
|
|
115
|
-
- redacts common
|
|
131
|
+
- redacts common and contextual credentials, authenticated URLs, authorization
|
|
132
|
+
headers, cookies, provider tokens, and private keys before transport;
|
|
133
|
+
- re-scans returned context immediately before Claude, Codex, Cursor, or Polytoken
|
|
134
|
+
injection and preserves `[REDACTED:<KIND>]` audit markers;
|
|
116
135
|
- times out network calls and always fails open without writing hook errors.
|
|
117
136
|
|
|
118
137
|
First prompts use `POST /v1/observations` and audited
|
|
@@ -129,7 +148,7 @@ all-repositories evidence may become organization-only and apply across
|
|
|
129
148
|
repositories. Native retrieval still requires a strong lexical, structural,
|
|
130
149
|
symbol, or semantic match. Observations, paired turns, OpenCode plugin events,
|
|
131
150
|
and deliveries are visible through Lore activity. OpenCode uses its plugin
|
|
132
|
-
lifecycle and never runs through the
|
|
151
|
+
lifecycle and never runs through the command-hook parser.
|
|
133
152
|
|
|
134
153
|
## External hosts
|
|
135
154
|
|
|
@@ -229,7 +248,7 @@ same-repository, non-draft pull requests bearing the corresponding
|
|
|
229
248
|
`lore:codex-review` or `lore:devin-review` label.
|
|
230
249
|
|
|
231
250
|
Generated jobs require a published standalone binary release and default to
|
|
232
|
-
`treadiehq/lore` at `v0.1.
|
|
251
|
+
`treadiehq/lore` at `v0.1.11`. Set `LORE_CLI_REPOSITORY` to the publicly
|
|
233
252
|
readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
|
|
234
253
|
when using another release source.
|
|
235
254
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type CommandHookAgentName } from "./runtime.js";
|
|
|
3
3
|
export declare const LORE_OPENCODE_PLUGIN = "@lore-co/opencode";
|
|
4
4
|
export declare const DEFAULT_HOSTED_API_URL = "https://api.uselore.co";
|
|
5
5
|
export declare const DEFAULT_HOSTED_DASHBOARD_URL = "https://uselore.co";
|
|
6
|
-
declare const CONFIGURED_AGENT_NAMES: readonly ["claude", "codex", "opencode"];
|
|
6
|
+
declare const CONFIGURED_AGENT_NAMES: readonly ["claude", "codex", "cursor", "opencode", "polytoken"];
|
|
7
7
|
export type ConfiguredAgentName = (typeof CONFIGURED_AGENT_NAMES)[number];
|
|
8
8
|
export interface LorePaths {
|
|
9
9
|
home: string;
|
|
@@ -16,7 +16,11 @@ export interface LorePaths {
|
|
|
16
16
|
queue: string;
|
|
17
17
|
codexHooks: string;
|
|
18
18
|
claudeSettings: string;
|
|
19
|
+
cursorHooks: string;
|
|
20
|
+
cursorUserData: string;
|
|
19
21
|
openCodeConfig: string;
|
|
22
|
+
polytokenHooks: string;
|
|
23
|
+
t3Settings: string;
|
|
20
24
|
}
|
|
21
25
|
export interface ConnectorConfig {
|
|
22
26
|
version: 1;
|
|
@@ -24,13 +28,20 @@ export interface ConnectorConfig {
|
|
|
24
28
|
dashboardUrl?: string;
|
|
25
29
|
token: string;
|
|
26
30
|
agents: ConfiguredAgentName[];
|
|
31
|
+
agentConfigPaths?: Partial<Record<ConfiguredAgentName, string[]>>;
|
|
27
32
|
connectedAt: string;
|
|
28
33
|
timeoutMs: number;
|
|
29
34
|
}
|
|
30
|
-
export declare function getLorePaths(home?: string): LorePaths;
|
|
35
|
+
export declare function getLorePaths(home?: string, environment?: NodeJS.ProcessEnv): LorePaths;
|
|
31
36
|
export declare function mergeLoreHooks(input: Record<string, unknown>, agent: CommandHookAgentName, paths: LorePaths): Record<string, unknown>;
|
|
32
37
|
export declare function removeLoreHooks(input: Record<string, unknown>): Record<string, unknown>;
|
|
33
38
|
export declare function countLoreHooks(input: Record<string, unknown>): number;
|
|
39
|
+
export declare function mergeLoreCursorHooks(input: Record<string, unknown>, paths: LorePaths): Record<string, unknown>;
|
|
40
|
+
export declare function removeLoreCursorHooks(input: Record<string, unknown>): Record<string, unknown>;
|
|
41
|
+
export declare function countLoreCursorHooks(input: Record<string, unknown>): number;
|
|
42
|
+
export declare function mergeLorePolytokenHooks(input: unknown, paths: LorePaths): unknown[];
|
|
43
|
+
export declare function removeLorePolytokenHooks(input: unknown): unknown[];
|
|
44
|
+
export declare function countLorePolytokenHooks(input: unknown): number;
|
|
34
45
|
export declare function mergeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
35
46
|
export declare function removeLoreOpenCodePlugin(input: Record<string, unknown>): Record<string, unknown>;
|
|
36
47
|
export declare function countLoreOpenCodePlugins(input: Record<string, unknown>): number;
|
|
@@ -41,6 +52,11 @@ export declare function resolveConnectEndpoints(options?: {
|
|
|
41
52
|
existing?: Pick<ConnectorConfig, "apiUrl" | "dashboardUrl"> | null;
|
|
42
53
|
preferHostedDefault?: boolean;
|
|
43
54
|
}): Pick<ConnectorConfig, "apiUrl" | "dashboardUrl">;
|
|
55
|
+
export interface AgentInstallation {
|
|
56
|
+
agent: ConfiguredAgentName;
|
|
57
|
+
configPath: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function t3CodeProviderInstallations(settings: unknown, paths: LorePaths): AgentInstallation[];
|
|
44
60
|
export declare function runCli(args?: readonly string[]): Promise<void>;
|
|
45
61
|
export {};
|
|
46
62
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAyBA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AAUtB,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,QAAA,MAAM,sBAAsB,iEAA4B,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAgB1E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC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