@lore-co/cli 0.1.17 → 0.1.19
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 +99 -17
- package/dist/ask.d.ts.map +1 -1
- package/dist/ask.js +3 -26
- package/dist/ask.js.map +1 -1
- package/dist/cli.d.ts +37 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1071 -80
- package/dist/cli.js.map +1 -1
- package/dist/context-fallback.d.ts +37 -0
- package/dist/context-fallback.d.ts.map +1 -0
- package/dist/context-fallback.js +259 -0
- package/dist/context-fallback.js.map +1 -0
- package/dist/generated-assets.d.ts +4 -4
- package/dist/generated-assets.d.ts.map +1 -1
- package/dist/generated-assets.js +4 -4
- package/dist/generated-assets.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/invocation-health-writer.d.ts +19 -0
- package/dist/invocation-health-writer.d.ts.map +1 -0
- package/dist/invocation-health-writer.js +131 -0
- package/dist/invocation-health-writer.js.map +1 -0
- package/dist/reliability-store.d.ts +283 -0
- package/dist/reliability-store.d.ts.map +1 -0
- package/dist/reliability-store.js +1913 -0
- package/dist/reliability-store.js.map +1 -0
- package/dist/runtime-version.d.ts +2 -0
- package/dist/runtime-version.d.ts.map +1 -0
- package/dist/runtime-version.js +5 -0
- package/dist/runtime-version.js.map +1 -0
- package/dist/runtime.d.ts +9 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1113 -153
- package/dist/runtime.js.map +1 -1
- package/dist/self-host.d.ts +15 -2
- package/dist/self-host.d.ts.map +1 -1
- package/dist/self-host.js +55 -8
- package/dist/self-host.js.map +1 -1
- package/dist/signed-snapshot.d.ts +59 -0
- package/dist/signed-snapshot.d.ts.map +1 -0
- package/dist/signed-snapshot.js +303 -0
- package/dist/signed-snapshot.js.map +1 -0
- package/dist/update.js +3 -3
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ do not block the agent.
|
|
|
13
13
|
pnpm install --global @lore-co/cli
|
|
14
14
|
|
|
15
15
|
lore connect \
|
|
16
|
-
--
|
|
16
|
+
--login \
|
|
17
17
|
--agent claude \
|
|
18
18
|
--agent codex \
|
|
19
19
|
--agent cursor \
|
|
@@ -38,9 +38,14 @@ delegates to. It reads `$T3CODE_HOME/userdata/settings.json` or
|
|
|
38
38
|
modify T3 settings or secrets. External OpenCode servers must be configured on
|
|
39
39
|
the server. Cursor ACP sessions require a live canary because Cursor does not
|
|
40
40
|
guarantee lifecycle hooks in ACP mode. Lore does not install a duplicate T3
|
|
41
|
-
lifecycle layer.
|
|
41
|
+
lifecycle layer. `--agent cowork` is credential-only: it prepares the secure
|
|
42
|
+
CLI config consumed by the separately uploaded Cowork MCP plugin without
|
|
43
|
+
installing lifecycle hooks.
|
|
42
44
|
Configuration is stored in `~/.lore/config.json` with mode `0600`.
|
|
43
|
-
|
|
45
|
+
`--login` opens a 10-minute dashboard approval and mints an attributed,
|
|
46
|
+
revocable 90-day credential without exposing it in terminal or agent output.
|
|
47
|
+
Use `--no-open` to print the approval URL without launching a browser.
|
|
48
|
+
Before writing the local config or any agent integration, `connect` calls the
|
|
44
49
|
authenticated workspace identity endpoint and validates the strict response
|
|
45
50
|
and server version. Revoked credentials, unreachable servers, timeouts, and
|
|
46
51
|
incompatible servers leave local configuration untouched. Either
|
|
@@ -50,6 +55,34 @@ New token connections default to `https://api.uselore.co` and use
|
|
|
50
55
|
`https://uselore.co` for receipt links. Self-hosted deployments must pass
|
|
51
56
|
`--url` and may pass `--dashboard-url`; reconnecting without a new token keeps
|
|
52
57
|
the existing self-hosted endpoints.
|
|
58
|
+
Manual `--token` and environment credentials remain supported for CI and
|
|
59
|
+
non-interactive hosts, and for users who prefer copying a token from the
|
|
60
|
+
dashboard:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
lore connect \
|
|
64
|
+
--token "your_workspace_token" \
|
|
65
|
+
--agent claude
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Keep manual tokens out of agent prompts and use a separate revocable token per
|
|
69
|
+
machine or integration. For copy-paste hosted and self-host prompts, human
|
|
70
|
+
approval points, verification, and rollback, see the
|
|
71
|
+
[agent-driven setup guide](../../docs/agent-setup.md).
|
|
72
|
+
|
|
73
|
+
For a fully local API-only deployment, the CLI can keep its generated bootstrap
|
|
74
|
+
credential internal while connecting agents:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
lore self-host up --headless --connect --agent claude --agent codex
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Dashboard self-hosting uses `lore self-host up`, human signup, then:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
lore connect --login --url http://127.0.0.1:3001 \
|
|
84
|
+
--dashboard-url http://127.0.0.1:3000
|
|
85
|
+
```
|
|
53
86
|
For a review-first rollout in a personal vault or component catalog, follow the
|
|
54
87
|
[OpenCode pilot runbook](../../docs/opencode-pilot.md).
|
|
55
88
|
|
|
@@ -61,9 +94,10 @@ lore ask "What did the previous agent already try?" --repo acme/billing
|
|
|
61
94
|
lore ask "What constraints apply here?" --json
|
|
62
95
|
```
|
|
63
96
|
|
|
64
|
-
`ask` queries durable knowledge and prior work sessions together. Results
|
|
65
|
-
each memory
|
|
66
|
-
|
|
97
|
+
`ask` queries durable knowledge and prior work sessions together. Results
|
|
98
|
+
explain why each memory matched and show its scope, status, freshness, category,
|
|
99
|
+
source agent, and source session, followed by matching prior sessions with
|
|
100
|
+
excerpts. `--repo` and
|
|
67
101
|
`--project` rank knowledge and sessions for that repository or project,
|
|
68
102
|
`--agent` identifies the caller, `--limit` caps knowledge results (1-20),
|
|
69
103
|
`--no-sessions` skips session context, and `--json` prints the machine-readable
|
|
@@ -88,14 +122,16 @@ In `enforce` mode, actions that conflict with a learning marked as a
|
|
|
88
122
|
dialog, while Cursor and OpenCode block the call and include the
|
|
89
123
|
`lore guard approve` command in the message. Changing modes requires an
|
|
90
124
|
owner- or admin-attributed credential; `status` and `approve` work for every
|
|
91
|
-
member. All subcommands support `--json`. Guard
|
|
92
|
-
|
|
125
|
+
member. All subcommands support `--json`. Guard output uses the same relevance,
|
|
126
|
+
provenance, scope, status, and freshness explanation as `ask`. Every decision,
|
|
127
|
+
including Off, plus confirmations and policy changes is recorded as a
|
|
128
|
+
content-free `guard_check` audit event.
|
|
93
129
|
|
|
94
130
|
## Update the standalone CLI
|
|
95
131
|
|
|
96
132
|
```sh
|
|
97
133
|
lore update
|
|
98
|
-
lore update --version v0.1.
|
|
134
|
+
lore update --version v0.1.19
|
|
99
135
|
```
|
|
100
136
|
|
|
101
137
|
`update` resolves the latest release to an exact tag, or uses the exact
|
|
@@ -122,11 +158,53 @@ lore disconnect
|
|
|
122
158
|
|
|
123
159
|
The three commands above also support `--json`. `doctor` checks public
|
|
124
160
|
`/health/ready` separately from authenticated workspace identity so unreachable,
|
|
125
|
-
unready, and unauthorized states remain distinct.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
agent
|
|
161
|
+
unready, and unauthorized states remain distinct.
|
|
162
|
+
|
|
163
|
+
`status` and `doctor` report the durable outbox, oldest pending capture,
|
|
164
|
+
verified snapshots and their local age, trust keys, local Guard coverage and
|
|
165
|
+
latency, context fallback rate, declared agent capabilities, exact installation
|
|
166
|
+
state, and last invocation health. `doctor` also reads the authenticated
|
|
167
|
+
workspace operational aggregate: server capture/embedding backlog, dead
|
|
168
|
+
letters, Guard failures/latency, retrieval corrections, and the zero-target
|
|
169
|
+
durable silent-failure invariant. Checks compare every expected
|
|
170
|
+
event, matcher, command, timeout, and plugin entry; equal hook counts do not
|
|
171
|
+
hide a missing, changed, or duplicate unit. Copied hook files also carry their
|
|
172
|
+
Lore runtime version and SHA-256 installation manifest, so old, modified,
|
|
173
|
+
oversized, non-regular, or symlinked runtime files are reported as `stale`.
|
|
174
|
+
Inspection does not create missing store directories or repair unsafe
|
|
175
|
+
permissions before reporting them.
|
|
176
|
+
|
|
177
|
+
`status --json` is versioned as `lore-cli-status-v1`. Invocation states are
|
|
178
|
+
`never_observed`, `successful`, `failed`, `incomplete`, or `unknown`. They come
|
|
179
|
+
from actual hook/plugin calls, not heartbeats. Lore stores only an integration
|
|
180
|
+
ID, random local attempt ID, timestamps, runtime version, and fixed failure
|
|
181
|
+
code—never prompts, responses, commands, files, repositories, sessions,
|
|
182
|
+
credentials, hostnames, or raw errors. Idle event-driven agents do not become
|
|
183
|
+
unhealthy solely because time passed. Per-integration locks keep optional
|
|
184
|
+
health updates separate from capture and cache work. A disposable helper
|
|
185
|
+
process imposes a hard write deadline, so telemetry cannot indefinitely stall
|
|
186
|
+
an agent hook. It runs detached, receives metadata through a private pipe, and
|
|
187
|
+
does not inherit host credentials. Invalid health state is reported as
|
|
188
|
+
`unknown` and quarantined on the next invocation; a mismatched observed
|
|
189
|
+
OpenCode version is reported as stale.
|
|
190
|
+
|
|
191
|
+
These machine-local counters are never uploaded as mandatory telemetry.
|
|
192
|
+
Hosted and self-hosted servers expose only their own content-free aggregates;
|
|
193
|
+
prompts, commands, memory content, paths, credentials, hostnames, and raw
|
|
194
|
+
errors are excluded.
|
|
195
|
+
|
|
196
|
+
`disconnect` removes only hook handlers marked as Lore-owned and Lore's
|
|
197
|
+
OpenCode plugin entry, then deletes Lore's credential, legacy hook runtime,
|
|
198
|
+
legacy pending state, and legacy retry queue. The Reliability v1 store is
|
|
199
|
+
retained so acknowledged local work and visible dead letters are never silently
|
|
200
|
+
discarded. It does not remove the installed `lore` binary or restore a whole
|
|
201
|
+
backup over newer agent settings.
|
|
202
|
+
|
|
203
|
+
During a live retrieval outage, connected native hooks and OpenCode can use one
|
|
204
|
+
relevant, reverified workspace context snapshot when the current repository is
|
|
205
|
+
known. Repository and path scopes are reapplied before injection. Cached
|
|
206
|
+
context is clearly labeled fresh or stale, expires from Assist eligibility
|
|
207
|
+
after seven days, and is never used to authorize offline Guard enforcement.
|
|
130
208
|
|
|
131
209
|
## One-command self-hosting
|
|
132
210
|
|
|
@@ -177,8 +255,12 @@ The Claude/Codex/Cursor/Polytoken command-hook handler:
|
|
|
177
255
|
- observes and enriches the first prompt in a new session;
|
|
178
256
|
- uses `last_assistant_message`, Cursor's `afterAgentResponse`, or Polytoken's
|
|
179
257
|
`post_model_turn`, not a potentially stale transcript;
|
|
180
|
-
-
|
|
181
|
-
-
|
|
258
|
+
- writes redacted captures and stable idempotency keys to the crash-safe
|
|
259
|
+
`~/.lore/store-v1` outbox before the first network attempt;
|
|
260
|
+
- retries FIFO captures with bounded backoff, preserving authentication failures
|
|
261
|
+
and permanent dead letters for inspection;
|
|
262
|
+
- verifies workspace-bound Ed25519 context and Guard snapshots before caching
|
|
263
|
+
them for later reliability steps;
|
|
182
264
|
- runs Context Guard checks at `PreToolUse` (Cursor: `beforeShellExecution`)
|
|
183
265
|
boundaries when the workspace enables guard, with local mode and cooldown
|
|
184
266
|
caches so repeated actions stay quiet;
|
|
@@ -302,7 +384,7 @@ same-repository, non-draft pull requests bearing the corresponding
|
|
|
302
384
|
`lore:codex-review` or `lore:devin-review` label.
|
|
303
385
|
|
|
304
386
|
Generated jobs require a published standalone binary release and default to
|
|
305
|
-
`treadiehq/lore-releases` at `v0.1.
|
|
387
|
+
`treadiehq/lore-releases` at `v0.1.19`. Set `LORE_CLI_REPOSITORY` to the publicly
|
|
306
388
|
readable `owner/repository` and `LORE_CLI_VERSION` to an existing release tag
|
|
307
389
|
when using another release source.
|
|
308
390
|
|
package/dist/ask.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../src/ask.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ask.d.ts","sourceRoot":"","sources":["../src/ask.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA0IhD,wBAAsB,aAAa,CACjC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,eAAe,GAAG,IAAI,GAC7B,OAAO,CAAC,IAAI,CAAC,CA6Df"}
|
package/dist/ask.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AskResponseSchema, } from "@lore-co/core";
|
|
1
|
+
import { AskResponseSchema, formatRetrievalExplanation, } from "@lore-co/core";
|
|
2
2
|
const ASK_HELP = `lore ask
|
|
3
3
|
Query Lore's shared context: durable knowledge plus prior work sessions.
|
|
4
4
|
|
|
@@ -80,38 +80,15 @@ function parseAskArguments(args) {
|
|
|
80
80
|
}
|
|
81
81
|
return parsed;
|
|
82
82
|
}
|
|
83
|
-
function formatScope(memory) {
|
|
84
|
-
const parts = [];
|
|
85
|
-
if (memory.scope.organization !== undefined) {
|
|
86
|
-
parts.push(`org ${memory.scope.organization}`);
|
|
87
|
-
}
|
|
88
|
-
if (memory.scope.project !== undefined) {
|
|
89
|
-
parts.push(`project ${memory.scope.project}`);
|
|
90
|
-
}
|
|
91
|
-
if (memory.scope.repo !== undefined) {
|
|
92
|
-
parts.push(`repo ${memory.scope.repo}`);
|
|
93
|
-
}
|
|
94
|
-
if (memory.scope.path !== undefined) {
|
|
95
|
-
parts.push(`path ${memory.scope.path}`);
|
|
96
|
-
}
|
|
97
|
-
if (memory.scope.component !== undefined) {
|
|
98
|
-
parts.push(`component ${memory.scope.component}`);
|
|
99
|
-
}
|
|
100
|
-
return parts.length === 0 ? "workspace-wide" : parts.join(" · ");
|
|
101
|
-
}
|
|
102
83
|
function formatDate(value) {
|
|
103
84
|
return value.slice(0, 10);
|
|
104
85
|
}
|
|
105
86
|
function formatHit(hit, index) {
|
|
106
87
|
const memory = hit.memory;
|
|
107
|
-
const sourceParts = [memory.source.agent];
|
|
108
|
-
if (memory.source.sessionId !== undefined) {
|
|
109
|
-
sourceParts.push(`session ${memory.source.sessionId}`);
|
|
110
|
-
}
|
|
111
88
|
return [
|
|
112
89
|
`${index + 1}. ${memory.content}`,
|
|
113
|
-
`
|
|
114
|
-
`
|
|
90
|
+
` ${formatRetrievalExplanation(hit)}`,
|
|
91
|
+
` category: ${memory.category} · learned ${formatDate(memory.createdAt)}`,
|
|
115
92
|
].join("\n");
|
|
116
93
|
}
|
|
117
94
|
function formatResponse(response) {
|
package/dist/ask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../src/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../src/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,0BAA0B,GAG3B,MAAM,eAAe,CAAC;AAGvB,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;CAmBhB,CAAC;AAYF,SAAS,iBAAiB,CAAC,IAAuB;IAChD,MAAM,MAAM,GAAiB;QAC3B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,IAAI;QACrB,IAAI,EAAE,KAAK;KACZ,CAAC;IACF,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC/B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;YACnB,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,KAAK,eAAe,EAAE,CAAC;YACjC,M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AC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CACb,qEAAqE,CACtE,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,4EAA4E,CAC7E,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,6BAA6B,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAChD,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAClC,CAAC;IACF,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO;IACT,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { type WorkspaceIdentityResponse } from "@lore-co/core";
|
|
2
3
|
import { type CommandHookAgentName } from "./runtime.js";
|
|
3
4
|
export declare const LORE_OPENCODE_PLUGIN = "@lore-co/opencode";
|
|
4
5
|
export declare const DEFAULT_HOSTED_API_URL = "https://api.uselore.co";
|
|
5
6
|
export declare const DEFAULT_HOSTED_DASHBOARD_URL = "https://uselore.co";
|
|
6
|
-
declare const CONFIGURED_AGENT_NAMES: readonly ["claude", "codex", "cursor", "opencode", "polytoken"];
|
|
7
|
+
declare const CONFIGURED_AGENT_NAMES: readonly ["claude", "codex", "copilot-cli", "copilot-vscode", "cursor", "opencode", "polytoken"];
|
|
7
8
|
export type ConfiguredAgentName = (typeof CONFIGURED_AGENT_NAMES)[number];
|
|
9
|
+
export type ConnectAgentName = ConfiguredAgentName | "copilot" | "cowork" | "t3code";
|
|
8
10
|
export interface LorePaths {
|
|
9
11
|
home: string;
|
|
10
12
|
loreDirectory: string;
|
|
11
13
|
config: string;
|
|
12
14
|
runtime: string;
|
|
13
15
|
runtimeRepository: string;
|
|
16
|
+
runtimeReliabilityStore: string;
|
|
17
|
+
runtimeSignedSnapshot: string;
|
|
18
|
+
runtimeCanonicalJson: string;
|
|
19
|
+
runtimeContextFallback: string;
|
|
20
|
+
runtimeInvocationHealthWriter: string;
|
|
21
|
+
runtimeVersion: string;
|
|
14
22
|
runtimePackage: string;
|
|
15
23
|
state: string;
|
|
16
24
|
queue: string;
|
|
17
25
|
codexHooks: string;
|
|
26
|
+
copilotCliHooks: string;
|
|
27
|
+
copilotVscodeHooks: string;
|
|
18
28
|
claudeSettings: string;
|
|
19
29
|
cursorHooks: string;
|
|
20
30
|
cursorUserData: string;
|
|
@@ -23,9 +33,10 @@ export interface LorePaths {
|
|
|
23
33
|
t3Settings: string;
|
|
24
34
|
}
|
|
25
35
|
export interface ConnectorConfig {
|
|
26
|
-
version:
|
|
36
|
+
version: 2;
|
|
27
37
|
apiUrl: string;
|
|
28
38
|
dashboardUrl?: string;
|
|
39
|
+
workspaceId?: string;
|
|
29
40
|
token: string;
|
|
30
41
|
agents: ConfiguredAgentName[];
|
|
31
42
|
agentConfigPaths?: Partial<Record<ConfiguredAgentName, string[]>>;
|
|
@@ -39,6 +50,12 @@ export declare function countLoreHooks(input: Record<string, unknown>): number;
|
|
|
39
50
|
export declare function mergeLoreCursorHooks(input: Record<string, unknown>, paths: LorePaths): Record<string, unknown>;
|
|
40
51
|
export declare function removeLoreCursorHooks(input: Record<string, unknown>): Record<string, unknown>;
|
|
41
52
|
export declare function countLoreCursorHooks(input: Record<string, unknown>): number;
|
|
53
|
+
export declare function mergeLoreCopilotCliHooks(input: Record<string, unknown>, paths: LorePaths): Record<string, unknown>;
|
|
54
|
+
export declare function removeLoreCopilotCliHooks(input: Record<string, unknown>): Record<string, unknown>;
|
|
55
|
+
export declare function countLoreCopilotCliHooks(input: Record<string, unknown>): number;
|
|
56
|
+
export declare function mergeLoreCopilotVscodeHooks(input: Record<string, unknown>, paths: LorePaths): Record<string, unknown>;
|
|
57
|
+
export declare function removeLoreCopilotVscodeHooks(input: Record<string, unknown>): Record<string, unknown>;
|
|
58
|
+
export declare function countLoreCopilotVscodeHooks(input: Record<string, unknown>): number;
|
|
42
59
|
export declare function mergeLorePolytokenHooks(input: unknown, paths: LorePaths): unknown[];
|
|
43
60
|
export declare function removeLorePolytokenHooks(input: unknown): unknown[];
|
|
44
61
|
export declare function countLorePolytokenHooks(input: unknown): number;
|
|
@@ -57,6 +74,24 @@ export interface AgentInstallation {
|
|
|
57
74
|
configPath: string;
|
|
58
75
|
}
|
|
59
76
|
export declare function t3CodeProviderInstallations(settings: unknown, paths: LorePaths): AgentInstallation[];
|
|
77
|
+
export interface ConnectWithCredentialOptions {
|
|
78
|
+
apiUrl: string;
|
|
79
|
+
dashboardUrl?: string;
|
|
80
|
+
token: string;
|
|
81
|
+
agents: readonly ConnectAgentName[];
|
|
82
|
+
timeoutMs?: number;
|
|
83
|
+
}
|
|
84
|
+
export interface ConnectResult {
|
|
85
|
+
connected: true;
|
|
86
|
+
apiUrl: string;
|
|
87
|
+
identity: WorkspaceIdentityResponse;
|
|
88
|
+
agents: ConnectAgentName[];
|
|
89
|
+
config: string;
|
|
90
|
+
changedHookFiles: string[];
|
|
91
|
+
backups: string[];
|
|
92
|
+
warnings: string[];
|
|
93
|
+
}
|
|
94
|
+
export declare function connectWithCredential(options: ConnectWithCredentialOptions): Promise<ConnectResult>;
|
|
60
95
|
export declare function runCli(args?: readonly string[]): Promise<void>;
|
|
61
96
|
export {};
|
|
62
97
|
//# 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":";AAsBA,OAAO,EAwBL,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAC;AA6BtB,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AACxD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AACjE,QAAA,MAAM,sBAAsB,kGAA4B,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GACxB,mBAAmB,GACnB,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AA+Bb,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,6BAA6B,EAAE,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