@lorekit/cli 1.46.0 → 1.47.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/README.md CHANGED
@@ -466,9 +466,9 @@ that lesson's detail sheet. It sets **both** the `lesson` param (which opens the
466
466
  sheet) and `scope` — not because scope is needed to find the lesson (the sidebar
467
467
  reads one unfiltered recent set), but so the Explorer list *behind* the sheet is
468
468
  filtered to the lesson's own scope. Filter flags mirror the Explorer: `--q`
469
- (search), `--owner <all|personal|orgId>`, `--tags <a,b,c>` (label filter, AND
469
+ (search), `--owner <all|personal|org-slug>`, `--tags <a,b,c>` (label filter, AND
470
470
  across labels; comma-separated or a JSON array), `--range`/`--from`/`--to`,
471
- `--archived`, `--view <scope|time>`.
471
+ `--archived`.
472
472
 
473
473
  Every param is `encodeURIComponent(JSON.stringify(value))` — the exact inverse of
474
474
  how the dashboard's `useUrlState` reads it back (`JSON.parse`, falling back to the
package/bin/lorekit.mjs CHANGED
@@ -88,7 +88,7 @@ ${c.bold('Commands')}
88
88
  link (url) Print a shareable dashboard deep-link URL for the current context,
89
89
  a scope, or a specific lesson (opens its detail sheet). No args
90
90
  links to the cwd's most-specific scope. Filter flags mirror the
91
- Explorer (--q / --owner / --tags / --range / --archived / --view);
91
+ Explorer (--q / --owner / --tags / --range / --archived);
92
92
  --base or LOREKIT_APP_URL override the dashboard host. --json. Pipe it:
93
93
  lorekit link | pbcopy.
94
94
  bootstrap Apply the BYOD schema to a user-supplied Supabase database.
@@ -585,13 +585,12 @@ ${c.bold('Options')}
585
585
  --key <key> Name the key explicitly — the way to link to a key
586
586
  that itself contains \`::\`
587
587
  --q <text> Pre-fill the Explorer search box
588
- --owner <o> Ownership filter: all | personal | <orgId>
588
+ --owner <o> Ownership filter: all | personal | <org-slug>
589
589
  --tags <a,b,c> Label filter (AND across labels); comma-separated or a JSON array
590
590
  --range <json> Date range as {"from":"YYYY-MM-DD","to":"YYYY-MM-DD"}
591
591
  --from <date> Range start (shorthand for --range)
592
592
  --to <date> Range end (shorthand for --range)
593
593
  --archived Include archived memories
594
- --view <mode> Explorer view: scope | time
595
594
  --base <url> Dashboard base URL (else LOREKIT_APP_URL, default https://lorekit.io)
596
595
  --json Machine-readable { url, surface, base, params }
597
596
 
@@ -658,7 +657,13 @@ const KNOWN_FLAGS = [
658
657
  'from', 'to', 'apply', 'yes', 'hooks', 'no-hooks', 'mcp-json', 'force', 'deep', 'adapter',
659
658
  'event', 'json', 'scope', 'key', 'threshold', 'help', 'version', 'telemetry',
660
659
  'value', 'tags', 'source-agent', 'trigger', 'kind', 'host', 'ttl-days', 'clear-ttl', 'org', 'remote', 'local',
661
- 'link', 'base', 'q', 'owner', 'range', 'view', 'archived',
660
+ // `view` is accepted-and-IGNORED, not documented: the Explorer dropped the
661
+ // scope/time tab so the flag is a no-op, but `link` is a HUMAN_COMMAND that
662
+ // rejects UNKNOWN options — so keeping `view` listed for a release stops an
663
+ // existing `lorekit link --view time` from hard-failing on an unknown-option
664
+ // error. It is parsed and discarded (nothing reads `args.view`). Remove it once
665
+ // 1.x links have aged out.
666
+ 'link', 'base', 'q', 'owner', 'range', 'archived', 'view',
662
667
  'origin-repo', 'origin-branch', 'origin-commit', 'origin-pr', 'no-origin',
663
668
  // Scale-aware survey flags
664
669
  'all', 'max', 'since', 'until', 'key-prefix', 'cluster-by-key',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorekit/cli",
3
- "version": "1.46.0",
3
+ "version": "1.47.0",
4
4
  "description": "Install the LoreKit shared-memory skill and run health checks for the LoreKit MCP server.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,7 +36,7 @@ export const LORE_PARAM_DEFAULTS = {
36
36
  // accepts ISO instants in that arm and a relative { preset: '7d' } arm
37
37
  // (packages/web/src/lib/time-range.ts); neither has a CLI flag yet.
38
38
  range: null,
39
- owner: 'all', // 'all' | 'personal' | { orgId }
39
+ owner: 'all', // 'all' | 'personal' | '<org-slug>' folds into an owner filter (00064)
40
40
  // Filter[] | null — the Explorer's multi-dimension filter bar (label / agent /
41
41
  // trigger / repo / branch / pr). `null`, NOT `[]`, is the default on purpose:
42
42
  // the app has to tell "the param is absent" from "the bar is explicitly
@@ -46,7 +46,6 @@ export const LORE_PARAM_DEFAULTS = {
46
46
  // "unfiltered".
47
47
  filters: null,
48
48
  tags: [], // string[] — legacy label filter (AND across labels); [] means "no filter". Still READ by the app, superseded by `filters`
49
- view: 'scope', // 'scope' | 'time'
50
49
  // 'active' | 'archived' | 'expiring' | null — the Explorer's Status control.
51
50
  // `null`, NOT 'active', is the default for `filters`' reason: the app has to
52
51
  // tell "absent" from an explicit choice, because an absent `status` falls back
@@ -60,9 +59,9 @@ export const LORE_PARAM_DEFAULTS = {
60
59
 
61
60
  // A stable, readable param order (also makes URLs deterministic for tests).
62
61
  // Mirrors the `useUrlState` call order in `LoreExplorer.tsx` (+ the `lesson`
63
- // param last), so `filters` and `tags` sit between `owner` and `view`. `scope`
62
+ // param last), so `filters` and `tags` sit between `owner` and `status`. `scope`
64
63
  // precedes `lesson` so a lesson link reads `?scope=…&lesson=…`.
65
- const PARAM_ORDER = ['scope', 'q', 'range', 'owner', 'filters', 'tags', 'view', 'status', 'archived', 'lesson'];
64
+ const PARAM_ORDER = ['scope', 'q', 'range', 'owner', 'filters', 'tags', 'status', 'archived', 'lesson'];
66
65
 
67
66
  // Strip trailing slashes from a base URL, falling back to the default when the
68
67
  // input is empty/absent. Pure.
@@ -148,18 +147,18 @@ export { resolveScopeArg, resolveScopeKeyArgs, isScopeString, scopeIssue } from
148
147
 
149
148
  // ── Flag → param coercion (pure, shared by the `link` command) ────────────────
150
149
 
151
- // Coerce the `--owner` flag to an `OwnerFilter`: 'all' (default) / 'personal' /
152
- // any other non-empty string`{ orgId }`. Pure.
150
+ // Coerce the `--owner` flag to the legacy `owner` param value: `personal`, an
151
+ // org SLUG, or `all` (default omitted). Returns the STRING the app folds into
152
+ // an owner filter (`filtersFromLegacyOwner`) when the `filters` param is absent
153
+ // — which is why the CLI keeps writing the legacy param rather than `filters`:
154
+ // `owner` and the legacy `tags` param fold together, so `--owner acme --tags
155
+ // perf` yields BOTH, whereas a `filters` param would make the app ignore the
156
+ // legacy tags. NOT the old `{orgId}` OBJECT: the owner facet keys on the SLUG,
157
+ // and the app cannot resolve a uuid to a slug in this pure path, so the object
158
+ // form silently dropped the filter it named (00064). A slug lands verbatim. Pure.
153
159
  export function parseOwnerArg(owner) {
154
- if (typeof owner !== 'string' || !owner || owner === 'all') return 'all';
155
- if (owner === 'personal') return 'personal';
156
- return { orgId: owner };
157
- }
158
-
159
- // Coerce the `--view` flag to a `ViewMode`: only 'time' is non-default; anything
160
- // else (incl. absent/invalid) → 'scope'. Pure.
161
- export function parseViewArg(view) {
162
- return view === 'time' ? 'time' : 'scope';
160
+ if (typeof owner !== 'string' || !owner) return 'all';
161
+ return owner;
163
162
  }
164
163
 
165
164
  // Coerce the `--tags` flag to a normalized `string[]` label filter, mirroring the
package/src/link.mjs CHANGED
@@ -22,7 +22,6 @@ import {
22
22
  buildLoreUrl,
23
23
  mostSpecificScope,
24
24
  parseOwnerArg,
25
- parseViewArg,
26
25
  parseRangeArg,
27
26
  parseTagsArg,
28
27
  resolveScopeKeyArgs,
@@ -55,7 +54,6 @@ export async function link(args) {
55
54
  // Filter flags (all optional; each JSON-encoded + default-omitted downstream).
56
55
  const q = typeof args.q === 'string' ? args.q : '';
57
56
  const owner = parseOwnerArg(args.owner);
58
- const view = parseViewArg(args.view);
59
57
  const range = parseRangeArg(args);
60
58
  const tags = parseTagsArg(args.tags);
61
59
  const archived = Boolean(args.archived);
@@ -65,7 +63,6 @@ export async function link(args) {
65
63
  (typeof args.scope === 'string' && Boolean(args.scope)) ||
66
64
  Boolean(q) ||
67
65
  owner !== 'all' ||
68
- view !== 'scope' ||
69
66
  range !== null ||
70
67
  tags.length > 0 ||
71
68
  archived;
@@ -84,7 +81,6 @@ export async function link(args) {
84
81
  if (q) params.q = q;
85
82
  if (owner !== 'all') params.owner = owner;
86
83
  if (tags.length) params.tags = tags;
87
- if (view !== 'scope') params.view = view;
88
84
  if (range !== null) params.range = range;
89
85
  if (archived) params.archived = true;
90
86