@hasna/mementos 0.16.0 → 0.17.1
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 +110 -14
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/consolidation.d.ts.map +1 -1
- package/dist/cli/commands/decisions.d.ts +5 -0
- package/dist/cli/commands/decisions.d.ts.map +1 -0
- package/dist/cli/commands/io-export.d.ts.map +1 -1
- package/dist/cli/commands/io-restore.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-list.d.ts +1 -1
- package/dist/cli/commands/memory-cmd-list.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-recall.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-remove.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-search.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-view.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +1 -1
- package/dist/cli/commands/project.d.ts.map +1 -1
- package/dist/cli/commands/system-status.d.ts.map +1 -1
- package/dist/cli/helpers.d.ts +3 -1
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.js +990 -113
- package/dist/cli/register-all.d.ts.map +1 -1
- package/dist/cli/structured-json.d.ts +54 -0
- package/dist/cli/structured-json.d.ts.map +1 -0
- package/dist/decisions/index.d.ts +17 -0
- package/dist/decisions/index.d.ts.map +1 -0
- package/dist/decisions/openrouter.d.ts +12 -0
- package/dist/decisions/openrouter.d.ts.map +1 -0
- package/dist/decisions/settings.d.ts +11 -0
- package/dist/decisions/settings.d.ts.map +1 -0
- package/dist/decisions/types.d.ts +70 -0
- package/dist/decisions/types.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +305 -13
- package/dist/lib/conversations-transport.d.ts +21 -0
- package/dist/lib/conversations-transport.d.ts.map +1 -0
- package/dist/lib/export-v1.d.ts +2 -0
- package/dist/lib/export-v1.d.ts.map +1 -1
- package/dist/mcp/index.js +275 -70
- package/dist/mcp/memory-broadcast.d.ts +6 -8
- package/dist/mcp/memory-broadcast.d.ts.map +1 -1
- package/dist/mcp/tools/bounded-output.d.ts +27 -0
- package/dist/mcp/tools/bounded-output.d.ts.map +1 -0
- package/dist/mcp/tools/lock-tools.d.ts.map +1 -1
- package/dist/mcp/tools/memory-inject.d.ts.map +1 -1
- package/dist/mcp/tools/memory-io.d.ts.map +1 -1
- package/dist/mcp/tools/utility-tools.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +348 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,95 @@ without a project it has no effect. Omitting it keeps an exact project match.
|
|
|
75
75
|
|
|
76
76
|
## CLI
|
|
77
77
|
|
|
78
|
+
### Optional decision assistance
|
|
79
|
+
|
|
80
|
+
Decision assistance is **off by default**. No provider account or key is needed
|
|
81
|
+
for ordinary Mementos commands. Configure and enable the features you want from
|
|
82
|
+
the CLI; there is no web setup. This adds no service-side configuration and does
|
|
83
|
+
not change ordinary `search`, context injection, or consolidation.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
mementos decisions status --json
|
|
87
|
+
mementos decisions configure --provider openrouter --model typesafe/jev-1.13
|
|
88
|
+
mementos decisions enable --retrieval --relationships
|
|
89
|
+
# Supply OPENROUTER_API_KEY through your secret manager's process environment.
|
|
90
|
+
mementos --project my-project decisions search "release approval policy" --limit 10 --json
|
|
91
|
+
mementos decisions evaluate --input pair.json --json
|
|
92
|
+
mementos decisions disable
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`configure` always leaves assistance disabled. `enable` permits only the selected
|
|
96
|
+
features and explicitly permits sending their text to the configured provider.
|
|
97
|
+
The key is read from `OPENROUTER_API_KEY`; it is never saved in decision settings.
|
|
98
|
+
`status` reports key presence without verifying or calling the provider. Settings
|
|
99
|
+
are versioned client preferences in the Mementos data root's `decisions.json`;
|
|
100
|
+
updates reject concurrent changes. `status`, configuration, and `evaluate` do not
|
|
101
|
+
open a memory store or require a hosted Mementos account.
|
|
102
|
+
|
|
103
|
+
`decisions search` retrieves a bounded candidate set using the existing project,
|
|
104
|
+
agent, session, scope, category, and tag filters, then optionally reranks it. Every
|
|
105
|
+
candidate is retained; ties preserve the original order. On a missing key,
|
|
106
|
+
timeout, invalid answer, oversized input, or provider failure, the original
|
|
107
|
+
ordering is returned with an explicit assessment reason. This command has no
|
|
108
|
+
pagination cursor: its receipt names `ranking_scope: "returned_candidates"` and
|
|
109
|
+
reports `has_more`. Use ordinary `search` for pagination. JSON includes compact
|
|
110
|
+
snippets and source IDs/versions, with a 128 KiB output ceiling.
|
|
111
|
+
|
|
112
|
+
`evaluate` accepts a JSON file or stdin (`--input -`). A relationship input is:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"task": "relationship",
|
|
117
|
+
"candidates": [
|
|
118
|
+
{ "id": "a", "text": "Production deployment requires approval." },
|
|
119
|
+
{ "id": "b", "text": "Production deployment does not require approval." }
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
For relevance, use `"task": "relevance"`, a non-empty `"query"`, and a
|
|
125
|
+
`"candidates"` array of the same `{id,text}` shape. Relationship suggestions are
|
|
126
|
+
`equivalent`, `complementary`, `contradictory`, `unrelated`, or `uncertain`.
|
|
127
|
+
Evaluation is read-only: suggestions never authorize writes or replace source
|
|
128
|
+
authority, human review, or version checks. An unavailable evaluation exits 2;
|
|
129
|
+
a disabled evaluation exits 0 with an explicit `disabled` receipt.
|
|
130
|
+
|
|
131
|
+
The built-in adapter calls OpenRouter's Decisions API with a pinned model ID,
|
|
132
|
+
no automatic retries, and provider fallback disabled. Defaults bound each
|
|
133
|
+
assessment to 20 candidates, 16,000 serialized input characters, and five
|
|
134
|
+
seconds; configure these with `--max-candidates`, `--max-input-chars`, and
|
|
135
|
+
`--timeout-ms`. Input files are limited to 256 KiB and provider responses to
|
|
136
|
+
64 KiB. Only query and candidate text go to OpenRouter; arbitrary metadata and
|
|
137
|
+
candidate IDs are excluded. Known secret patterns and credential-bearing URLs
|
|
138
|
+
are redacted before transmission. Redaction is heuristic: enable this only for
|
|
139
|
+
content you are permitted to send to your chosen provider.
|
|
140
|
+
|
|
141
|
+
Jev returns judgments, not generated memories or embeddings. Its confidence is
|
|
142
|
+
distribution concentration, **not a probability of correctness**. Pinning the
|
|
143
|
+
model and criteria makes requests reproducible but does not promise deterministic
|
|
144
|
+
provider answers. Keep structural validation and authorization deterministic.
|
|
145
|
+
|
|
146
|
+
Other providers, including local implementations, can implement the public
|
|
147
|
+
`DecisionProvider` interface; no OpenRouter dependency is required by callers:
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
import { assessDecisions, rankDecisionCandidates } from "@hasna/mementos/sdk";
|
|
151
|
+
import type { DecisionProvider } from "@hasna/mementos/sdk";
|
|
152
|
+
|
|
153
|
+
// `provider` is your adapter implementing DecisionProvider.
|
|
154
|
+
async function rank(provider: DecisionProvider, query: string,
|
|
155
|
+
candidates: Array<{ id: string; text: string }>) {
|
|
156
|
+
const assessment = await assessDecisions({ task: "relevance", query, candidates }, {
|
|
157
|
+
enabled: true, retrieval: true, provider: provider.id, model: provider.model,
|
|
158
|
+
}, { provider });
|
|
159
|
+
return { assessment, candidates: rankDecisionCandidates(candidates, assessment) };
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Knowledge consumers can reuse this contract to assess already authorized
|
|
164
|
+
retrieval candidates or flag potentially conflicting passages. Source citations,
|
|
165
|
+
review state, and guarded publication remain the consumer's responsibility.
|
|
166
|
+
|
|
78
167
|
```bash
|
|
79
168
|
mementos --help
|
|
80
169
|
mementos <command> --help
|
|
@@ -84,13 +173,14 @@ Human-readable list and search commands are compact and paginated by default.
|
|
|
84
173
|
Use `--limit` with `--cursor` or `--offset`, `--verbose` for wider snippets, and
|
|
85
174
|
`mementos show <id>` for a full record.
|
|
86
175
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`
|
|
92
|
-
|
|
93
|
-
|
|
176
|
+
JSON collection output is intentionally envelope-based in this minor release.
|
|
177
|
+
`projects --json`, `agents --json`, `list --json`, and `search --json` no longer
|
|
178
|
+
return bare arrays: each returns a compact collection plus truthful `_meta`
|
|
179
|
+
continuation fields. `--agent-json` remains an alias for the list receipt.
|
|
180
|
+
`--full` changes row detail inside the envelope; `--all` exhausts the query
|
|
181
|
+
inside the envelope (up to 100,000 rows / 64 MiB). Neither flag restores a bare
|
|
182
|
+
array for these four commands. The sole legacy bare-array escape is
|
|
183
|
+
`export --all`, because export is an explicitly bulk-oriented command.
|
|
94
184
|
|
|
95
185
|
Agent JSON uses offset pagination. Stable ID tie-breakers prevent overlap for
|
|
96
186
|
equal timestamps and importance while the result set is unchanged; writes
|
|
@@ -98,12 +188,15 @@ between page requests can shift offsets, so restart traversal when a stable
|
|
|
98
188
|
snapshot is required.
|
|
99
189
|
|
|
100
190
|
```bash
|
|
101
|
-
mementos list --json #
|
|
102
|
-
mementos list --
|
|
103
|
-
mementos list --
|
|
104
|
-
mementos list --
|
|
105
|
-
mementos
|
|
106
|
-
mementos
|
|
191
|
+
mementos list --json # compact 20-row receipt, <=32 KiB
|
|
192
|
+
mementos list --json --cursor 20
|
|
193
|
+
mementos list --json --full --limit 5 # explicit full detail, still bounded
|
|
194
|
+
mementos list --json --all # exhaustive receipt, still an envelope
|
|
195
|
+
mementos projects --json # compact continuation receipt
|
|
196
|
+
mementos agents --json # compact continuation receipt
|
|
197
|
+
mementos search "deploy" --json # compact byte-capped search receipt
|
|
198
|
+
mementos export # truthful paginated export receipt
|
|
199
|
+
mementos export --all # explicit exhaustive legacy array
|
|
107
200
|
mementos storage mode --json
|
|
108
201
|
```
|
|
109
202
|
|
|
@@ -143,7 +236,10 @@ bounded list/get tools instead.
|
|
|
143
236
|
|
|
144
237
|
MCP `tools/list` remains the authoritative schema source. `search_tools` returns
|
|
145
238
|
a bounded names-only page for active-profile tools, and `describe_tools`
|
|
146
|
-
requires one to ten explicit names.
|
|
239
|
+
requires one to ten explicit names. `memory_context` defaults to ten ranked
|
|
240
|
+
~240-character previews under a 32 KiB ceiling; use `detail="full"` explicitly.
|
|
241
|
+
`memory_inject` defaults to lightweight hints and preserves complete injection
|
|
242
|
+
behind `mode="full"`. `memory_export` is paginated and receipt-bearing. See the [MCP reference](docs/MCP.md) for
|
|
147
243
|
profile membership and compatibility details.
|
|
148
244
|
|
|
149
245
|
## REST API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsP5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/consolidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BzC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"consolidation.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/consolidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BzC,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiHpE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { MemorySearchResult } from "../../types/index.js";
|
|
3
|
+
export declare function decisionSearchResult(result: MemorySearchResult): Record<string, unknown>;
|
|
4
|
+
export declare function registerDecisionCommands(program: Command): void;
|
|
5
|
+
//# sourceMappingURL=decisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decisions.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/decisions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWzC,OAAO,KAAK,EAA+B,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI5F,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAaxF;AAsBD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwI/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io-export.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/io-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"io-export.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/io-export.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4E5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io-restore.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/io-restore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"io-restore.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/io-restore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8FzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsN7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-crud.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-crud.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-cmd-crud.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-crud.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4CzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAssB3D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
2
|
import type { Memory } from "../../types/index.js";
|
|
3
3
|
export declare const STRUCTURED_PAGE_MAX_ROWS = 1000;
|
|
4
|
-
export declare const STRUCTURED_ALL_MAX_ROWS =
|
|
4
|
+
export declare const STRUCTURED_ALL_MAX_ROWS = 100000;
|
|
5
5
|
export declare const STRUCTURED_DEFAULT_MAX_BYTES: number;
|
|
6
6
|
export declare const STRUCTURED_FULL_MAX_BYTES: number;
|
|
7
7
|
export declare const STRUCTURED_ALL_MAX_BYTES: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,KAAK,EAAE,MAAM,EAA2D,MAAM,sBAAsB,CAAC;AAkB5G,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAC9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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-recall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"memory-cmd-recall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgG5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-remove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"memory-cmd-remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-remove.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsD5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-search.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-cmd-search.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+BzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8L5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-view.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-cmd-view.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyM3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-cmd-when-to-use.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-when-to-use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"memory-cmd-when-to-use.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/memory-cmd-when-to-use.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4C/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+CzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsd9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/system-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAAC;IAC7C,4EAA4E;IAC5E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAUD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,MAA4B,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"system-status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/system-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,UAAU,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,CAAC;IAC7C,4EAA4E;IAC5E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAUD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,MAA4B,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CA0D3H;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6C5D"}
|
package/dist/cli/helpers.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare function colorImportance(importance: number): string;
|
|
|
9
9
|
export declare function colorEntityType(type: string, suffix?: string): string;
|
|
10
10
|
export declare function resolveEntityArg(nameOrId: string, type?: EntityType): Entity;
|
|
11
11
|
export declare function outputJson(data: unknown): void;
|
|
12
|
+
/** Emit terminal JSON and preserve the requested exit status after drain. */
|
|
13
|
+
export declare function outputJsonAndExit(data: unknown, code: number): Promise<never>;
|
|
12
14
|
export declare const DEFAULT_COMPACT_LIMIT = 20;
|
|
13
15
|
export declare const DEFAULT_SEARCH_LIMIT = 10;
|
|
14
16
|
export declare const DEFAULT_SNIPPET_LENGTH = 72;
|
|
@@ -70,7 +72,7 @@ export declare function formatMemoryLine(m: Memory, opts?: {
|
|
|
70
72
|
preferSummary?: boolean;
|
|
71
73
|
}): string;
|
|
72
74
|
export declare function formatMemoryDetail(m: Memory): string;
|
|
73
|
-
export declare function makeHandleError(program: Command): (e: unknown) => never;
|
|
75
|
+
export declare function makeHandleError(program: Command): (e: unknown) => Promise<never> | never;
|
|
74
76
|
export declare function resolveMemoryId(partialId: string): string;
|
|
75
77
|
/**
|
|
76
78
|
* Resolve an `--agent` filter value to the agent id the store actually indexes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/cli/helpers.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KA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