@happyvertical/smrt-svelte 0.55.9 → 0.55.10
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/AGENTS.md +1 -1
- package/agents/overview-surfaces.md +122 -17
- package/agents/workspace.md +6 -0
- package/dist/components/activity/ActivityList.svelte +35 -0
- package/dist/components/activity/ActivityList.svelte.d.ts +11 -0
- package/dist/components/activity/ActivityList.svelte.d.ts.map +1 -0
- package/dist/components/activity/index.d.ts +3 -0
- package/dist/components/activity/index.d.ts.map +1 -0
- package/dist/components/activity/index.js +1 -0
- package/dist/components/activity/safe-href.d.ts +3 -0
- package/dist/components/activity/safe-href.d.ts.map +1 -0
- package/dist/components/activity/safe-href.js +12 -0
- package/dist/components/activity/types.d.ts +9 -0
- package/dist/components/activity/types.d.ts.map +1 -0
- package/dist/components/activity/types.js +1 -0
- package/dist/components/notifications/LocalizedNotifications.fixture.svelte +16 -0
- package/dist/components/notifications/LocalizedNotifications.fixture.svelte.d.ts +11 -0
- package/dist/components/notifications/LocalizedNotifications.fixture.svelte.d.ts.map +1 -0
- package/dist/components/notifications/NotificationBell.svelte +136 -0
- package/dist/components/notifications/NotificationBell.svelte.d.ts +13 -0
- package/dist/components/notifications/NotificationBell.svelte.d.ts.map +1 -0
- package/dist/components/notifications/index.d.ts +3 -0
- package/dist/components/notifications/index.d.ts.map +1 -0
- package/dist/components/notifications/index.js +1 -0
- package/dist/components/notifications/types.d.ts +27 -0
- package/dist/components/notifications/types.d.ts.map +1 -0
- package/dist/components/notifications/types.js +1 -0
- package/dist/components/overview/OverviewAssistantUndo.svelte +77 -0
- package/dist/components/overview/OverviewAssistantUndo.svelte.d.ts +13 -0
- package/dist/components/overview/OverviewAssistantUndo.svelte.d.ts.map +1 -0
- package/dist/components/overview/assistant-surface.d.ts +90 -0
- package/dist/components/overview/assistant-surface.d.ts.map +1 -0
- package/dist/components/overview/assistant-surface.js +65 -0
- package/dist/components/overview/assistant.svelte.d.ts +115 -0
- package/dist/components/overview/assistant.svelte.d.ts.map +1 -0
- package/dist/components/overview/assistant.svelte.js +260 -0
- package/dist/components/overview/controller.svelte.d.ts +8 -0
- package/dist/components/overview/controller.svelte.d.ts.map +1 -1
- package/dist/components/overview/controller.svelte.js +76 -13
- package/dist/components/overview/index.d.ts +2 -0
- package/dist/components/overview/index.d.ts.map +1 -1
- package/dist/components/overview/index.js +2 -0
- package/dist/components/overview/operations.d.ts +169 -0
- package/dist/components/overview/operations.d.ts.map +1 -0
- package/dist/components/overview/operations.js +358 -0
- package/dist/components/overview/server.d.ts +2 -0
- package/dist/components/overview/server.d.ts.map +1 -1
- package/dist/components/overview/server.js +2 -0
- package/dist/components/workspace/admin-shell/settings-delta.d.ts +21 -0
- package/dist/components/workspace/admin-shell/settings-delta.d.ts.map +1 -0
- package/dist/components/workspace/admin-shell/settings-delta.js +142 -0
- package/dist/components/workspace/index.d.ts +1 -0
- package/dist/components/workspace/index.d.ts.map +1 -1
- package/dist/components/workspace/index.js +1 -0
- package/dist/components/workspace/server/index.d.ts +6 -2
- package/dist/components/workspace/server/index.d.ts.map +1 -1
- package/dist/components/workspace/server/index.js +5 -2
- package/dist/i18n/server.d.ts +1 -0
- package/dist/i18n/server.d.ts.map +1 -1
- package/dist/i18n/server.js +1 -0
- package/dist/i18n/strings.notifications.d.ts +12 -0
- package/dist/i18n/strings.notifications.d.ts.map +1 -0
- package/dist/i18n/strings.notifications.js +13 -0
- package/dist/i18n/strings.overview.d.ts +6 -0
- package/dist/i18n/strings.overview.d.ts.map +1 -1
- package/dist/i18n/strings.overview.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +20 -14
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The server half of the overview assistant (#3727 phase 4): one overview, for
|
|
3
|
+
* one principal, as the adapter `@happyvertical/smrt-chat`'s
|
|
4
|
+
* `createOverviewTools()` operates on. The chat package depends on no UI
|
|
5
|
+
* package, so it types this object structurally; this module is the
|
|
6
|
+
* implementation a host returns from its `open(run, pageId)`.
|
|
7
|
+
*
|
|
8
|
+
* Every plan and every restore runs through the phase-1 model and
|
|
9
|
+
* `checkOverviewOverride`, so the assistant can only store an override the
|
|
10
|
+
* save endpoint would accept. Persistence stays the host's (phase 3): the
|
|
11
|
+
* surface calls `persist` with the canonical override and keeps its own copy
|
|
12
|
+
* of the value it last persisted.
|
|
13
|
+
*
|
|
14
|
+
* Svelte-free; on `./overview/server`.
|
|
15
|
+
*/
|
|
16
|
+
import { type OverviewOverrideCheck } from './model.js';
|
|
17
|
+
import { type DescribeOverviewInput, type OverviewDescription, type OverviewPlan } from './operations.js';
|
|
18
|
+
import { type WidgetRegistry } from './registry.js';
|
|
19
|
+
import type { OverviewDefinition, OverviewOverride } from './types.js';
|
|
20
|
+
export interface OverviewAssistantSurfaceOptions {
|
|
21
|
+
/** The page's declaration (allowed set, models, defaults, cap). */
|
|
22
|
+
definition: OverviewDefinition;
|
|
23
|
+
/** Defaults to the shared registry. */
|
|
24
|
+
registry?: WidgetRegistry;
|
|
25
|
+
/**
|
|
26
|
+
* The principal's stored override for this page (untrusted JSON; `null`
|
|
27
|
+
* for none), as the host loaded it for this request.
|
|
28
|
+
*/
|
|
29
|
+
override: unknown;
|
|
30
|
+
/**
|
|
31
|
+
* The concurrency token of the stored row the host loaded `override` from
|
|
32
|
+
* (`null` when it loaded no row), echoed back to `persist`. With the
|
|
33
|
+
* phase-3 store (`createOverviewStore` of `@happyvertical/smrt-preferences`)
|
|
34
|
+
* this is `state.user.revision` from its `load`.
|
|
35
|
+
*/
|
|
36
|
+
revision: string | null;
|
|
37
|
+
/** Whether this principal may customize this page (the role gate). */
|
|
38
|
+
canCustomize: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Store the canonical override (`null` = back to the defaults) in the
|
|
41
|
+
* principal's tier, CONDITIONALLY on `expected.revision` still being the
|
|
42
|
+
* stored one: a save that landed since must answer
|
|
43
|
+
* `{ ok: false, reason: 'conflict' }`, never be overwritten. The phase-3
|
|
44
|
+
* store plugs in directly:
|
|
45
|
+
* `(override, { revision }) => store.save(definition, registry, { scope: 'user', override, revision })`
|
|
46
|
+
* with `store = createOverviewStore({ db })` from `@happyvertical/smrt-preferences`.
|
|
47
|
+
*/
|
|
48
|
+
persist: (override: OverviewOverride | null, expected: {
|
|
49
|
+
revision: string | null;
|
|
50
|
+
}) => OverviewAssistantPersistResult | Promise<OverviewAssistantPersistResult>;
|
|
51
|
+
/** Turns titles and labels that are i18n keys into text. */
|
|
52
|
+
translate?: DescribeOverviewInput['translate'];
|
|
53
|
+
/** Batch cap (default 20). */
|
|
54
|
+
maxOperations?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A conditional write's outcome. `revision` is the stored row's new token
|
|
58
|
+
* (`null` when the write removed the row); omitted, the surface keeps the
|
|
59
|
+
* token it had. Structurally `OverviewSaveResult` of
|
|
60
|
+
* `@happyvertical/smrt-preferences`.
|
|
61
|
+
*/
|
|
62
|
+
export type OverviewAssistantPersistResult = {
|
|
63
|
+
ok: true;
|
|
64
|
+
revision?: string | null;
|
|
65
|
+
} | {
|
|
66
|
+
ok: false;
|
|
67
|
+
reason: 'conflict' | 'not_allowed' | 'invalid';
|
|
68
|
+
issues?: readonly unknown[];
|
|
69
|
+
};
|
|
70
|
+
/** One overview for one principal; what `createOverviewTools()` drives. */
|
|
71
|
+
export interface OverviewAssistantSurface {
|
|
72
|
+
readonly pageId: string;
|
|
73
|
+
readonly canCustomize: boolean;
|
|
74
|
+
/** Allowed widget types with their option fields, and the arrangement. */
|
|
75
|
+
describe(): OverviewDescription;
|
|
76
|
+
/** The canonical override in effect (`null` = defaults). */
|
|
77
|
+
current(): OverviewOverride | null;
|
|
78
|
+
/** Plan a batch against {@link current}. Applies nothing. */
|
|
79
|
+
plan(operations: unknown): OverviewPlan;
|
|
80
|
+
/** Validate an override (the Undo value) the way a save is validated. */
|
|
81
|
+
check(override: unknown): OverviewOverrideCheck;
|
|
82
|
+
/**
|
|
83
|
+
* Persist a canonical override if the stored row is still the loaded
|
|
84
|
+
* revision; on success {@link current} and the revision follow it.
|
|
85
|
+
*/
|
|
86
|
+
persist(override: OverviewOverride | null): Promise<OverviewAssistantPersistResult>;
|
|
87
|
+
}
|
|
88
|
+
/** Build the assistant adapter for one overview and one principal. */
|
|
89
|
+
export declare function createOverviewAssistantSurface(options: OverviewAssistantSurfaceOptions): OverviewAssistantSurface;
|
|
90
|
+
//# sourceMappingURL=assistant-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-surface.d.ts","sourceRoot":"","sources":["../../../src/components/overview/assistant-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,WAAW,+BAA+B;IAC9C,mEAAmE;IACnE,UAAU,EAAE,kBAAkB,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sEAAsE;IACtE,YAAY,EAAE,OAAO,CAAC;IACtB;;;;;;;;OAQG;IACH,OAAO,EAAE,CACP,QAAQ,EAAE,gBAAgB,GAAG,IAAI,EACjC,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,KAClC,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC9E,4DAA4D;IAC5D,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC/C,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GACtC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACtC;IACE,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC7B,CAAC;AAEN,2EAA2E;AAC3E,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,IAAI,mBAAmB,CAAC;IAChC,4DAA4D;IAC5D,OAAO,IAAI,gBAAgB,GAAG,IAAI,CAAC;IACnC,6DAA6D;IAC7D,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,YAAY,CAAC;IACxC,yEAAyE;IACzE,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,qBAAqB,CAAC;IAChD;;;OAGG;IACH,OAAO,CACL,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAChC,OAAO,CAAC,8BAA8B,CAAC,CAAC;CAC5C;AAED,sEAAsE;AACtE,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,+BAA+B,GACvC,wBAAwB,CA2C1B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The server half of the overview assistant (#3727 phase 4): one overview, for
|
|
3
|
+
* one principal, as the adapter `@happyvertical/smrt-chat`'s
|
|
4
|
+
* `createOverviewTools()` operates on. The chat package depends on no UI
|
|
5
|
+
* package, so it types this object structurally; this module is the
|
|
6
|
+
* implementation a host returns from its `open(run, pageId)`.
|
|
7
|
+
*
|
|
8
|
+
* Every plan and every restore runs through the phase-1 model and
|
|
9
|
+
* `checkOverviewOverride`, so the assistant can only store an override the
|
|
10
|
+
* save endpoint would accept. Persistence stays the host's (phase 3): the
|
|
11
|
+
* surface calls `persist` with the canonical override and keeps its own copy
|
|
12
|
+
* of the value it last persisted.
|
|
13
|
+
*
|
|
14
|
+
* Svelte-free; on `./overview/server`.
|
|
15
|
+
*/
|
|
16
|
+
import { checkOverviewOverride, diffOverview, resolveOverview, } from './model.js';
|
|
17
|
+
import { describeOverview, planOverviewOperations, } from './operations.js';
|
|
18
|
+
import { defaultWidgetRegistry } from './registry.js';
|
|
19
|
+
/** Build the assistant adapter for one overview and one principal. */
|
|
20
|
+
export function createOverviewAssistantSurface(options) {
|
|
21
|
+
const registry = options.registry ?? defaultWidgetRegistry;
|
|
22
|
+
const { definition } = options;
|
|
23
|
+
const initial = checkOverviewOverride(definition, options.override, registry);
|
|
24
|
+
// A stored value the model no longer accepts resolves leniently on load;
|
|
25
|
+
// its canonical form is whatever survives sanitizing.
|
|
26
|
+
let current = initial.ok
|
|
27
|
+
? initial.override
|
|
28
|
+
: sanitizedCurrent(definition, registry, options.override);
|
|
29
|
+
let revision = options.revision;
|
|
30
|
+
return {
|
|
31
|
+
pageId: definition.id,
|
|
32
|
+
canCustomize: options.canCustomize,
|
|
33
|
+
describe: () => describeOverview({
|
|
34
|
+
definition,
|
|
35
|
+
registry,
|
|
36
|
+
override: current,
|
|
37
|
+
canCustomize: options.canCustomize,
|
|
38
|
+
translate: options.translate,
|
|
39
|
+
maxOperations: options.maxOperations,
|
|
40
|
+
}),
|
|
41
|
+
current: () => current,
|
|
42
|
+
plan: (operations) => planOverviewOperations({
|
|
43
|
+
definition,
|
|
44
|
+
registry,
|
|
45
|
+
override: current,
|
|
46
|
+
operations,
|
|
47
|
+
maxOperations: options.maxOperations,
|
|
48
|
+
}),
|
|
49
|
+
check: (override) => checkOverviewOverride(definition, override, registry),
|
|
50
|
+
async persist(override) {
|
|
51
|
+
const result = await options.persist(override, { revision });
|
|
52
|
+
if (result.ok) {
|
|
53
|
+
current = override;
|
|
54
|
+
if ('revision' in result && result.revision !== undefined) {
|
|
55
|
+
revision = result.revision;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function sanitizedCurrent(definition, registry, override) {
|
|
63
|
+
const resolved = resolveOverview(definition, override, registry);
|
|
64
|
+
return diffOverview(resolved.base, resolved.document);
|
|
65
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overview assistant in the browser (#3727 phase 4): the structured
|
|
3
|
+
* operations an in-page assistant (the AssistantDock) applies to a mounted
|
|
4
|
+
* overview, with a single-step Undo.
|
|
5
|
+
*
|
|
6
|
+
* A batch is planned with {@link planOverviewOperations} against the
|
|
7
|
+
* controller's definition and current override, so it is atomic (one invalid
|
|
8
|
+
* operation rejects the batch and nothing changes) and can only produce an
|
|
9
|
+
* override the save endpoint accepts. A valid batch lands through
|
|
10
|
+
* `controller.restore`, so the grid updates live and the host's `onchange`
|
|
11
|
+
* persists it like any other edit. The override before the batch is kept for
|
|
12
|
+
* Undo; Undo restores it exactly, and refuses once the overview changed in
|
|
13
|
+
* between (it would discard that edit).
|
|
14
|
+
*
|
|
15
|
+
* The browser tools (`overview_describe`, `overview_apply`, `overview_undo`)
|
|
16
|
+
* register on the page's WebMCP registry through `useWebMcpTool`, the same
|
|
17
|
+
* path every bespoke page tool takes, so the dock offers and runs them like
|
|
18
|
+
* any other page tool (a `write` waits for the person's Allow unless the host
|
|
19
|
+
* policy says otherwise). The browser session is the principal: the
|
|
20
|
+
* controller only holds this viewer's override, and `canCustomize` gates every
|
|
21
|
+
* apply and undo.
|
|
22
|
+
*/
|
|
23
|
+
import type { Toaster } from '@happyvertical/smrt-ui/feedback';
|
|
24
|
+
import type { WebMcpToolSpec } from '../../web/webmcp.svelte.js';
|
|
25
|
+
import type { OverviewController } from './controller.svelte.js';
|
|
26
|
+
import { type OverviewDescription, type OverviewOperationIssue, type OverviewOperationKind, type OverviewOperationResult } from './operations.js';
|
|
27
|
+
import type { OverviewOverride } from './types.js';
|
|
28
|
+
/** One applied batch, kept for Undo. */
|
|
29
|
+
export interface OverviewAssistantBatch {
|
|
30
|
+
/** Opaque id; `undo(id)` only undoes this batch. */
|
|
31
|
+
id: string;
|
|
32
|
+
results: OverviewOperationResult[];
|
|
33
|
+
/** How many operations of each kind the batch applied. */
|
|
34
|
+
counts: Partial<Record<OverviewOperationKind, number>>;
|
|
35
|
+
/** The override before the batch (what Undo restores). */
|
|
36
|
+
before: OverviewOverride | null;
|
|
37
|
+
/** The override the batch produced. */
|
|
38
|
+
after: OverviewOverride | null;
|
|
39
|
+
}
|
|
40
|
+
export type OverviewAssistantApplyResult = {
|
|
41
|
+
ok: true;
|
|
42
|
+
/** `null` when the batch changed nothing (no Undo is offered). */
|
|
43
|
+
batchId: string | null;
|
|
44
|
+
results: OverviewOperationResult[];
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
reason: 'not_allowed' | 'invalid';
|
|
48
|
+
issues: OverviewOperationIssue[];
|
|
49
|
+
};
|
|
50
|
+
export type OverviewAssistantUndoResult = {
|
|
51
|
+
ok: true;
|
|
52
|
+
} | {
|
|
53
|
+
ok: false;
|
|
54
|
+
reason: 'not_allowed' | 'nothing_to_undo' | 'changed_since';
|
|
55
|
+
};
|
|
56
|
+
export interface OverviewAssistantOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Tool name prefix (default `overview`): tools are `<prefix>_describe`,
|
|
59
|
+
* `<prefix>_apply` and `<prefix>_undo`. Give each overview on one page its
|
|
60
|
+
* own prefix.
|
|
61
|
+
*/
|
|
62
|
+
toolPrefix?: string;
|
|
63
|
+
/** Turns widget titles and labels that are i18n keys into text. */
|
|
64
|
+
translate?: (key: string) => string;
|
|
65
|
+
/**
|
|
66
|
+
* Also show each applied batch as a toast with an Undo action (the host
|
|
67
|
+
* mounts a smrt-ui `ToastViewport` for it). `OverviewAssistantUndo` is the
|
|
68
|
+
* inline alternative.
|
|
69
|
+
*/
|
|
70
|
+
toaster?: Toaster;
|
|
71
|
+
/** Toast and inline message text; receives the batch. */
|
|
72
|
+
message?: (batch: OverviewAssistantBatch) => string;
|
|
73
|
+
/** Undo button label (default `Undo`). */
|
|
74
|
+
undoLabel?: string;
|
|
75
|
+
/** Called after a batch applies. */
|
|
76
|
+
onapply?: (batch: OverviewAssistantBatch) => void;
|
|
77
|
+
/** Batch cap (default 20). */
|
|
78
|
+
maxOperations?: number;
|
|
79
|
+
}
|
|
80
|
+
export declare class OverviewAssistant {
|
|
81
|
+
#private;
|
|
82
|
+
readonly controller: OverviewController;
|
|
83
|
+
constructor(controller: OverviewController, options?: OverviewAssistantOptions);
|
|
84
|
+
/** The last applied batch while it can still be undone. */
|
|
85
|
+
get lastBatch(): OverviewAssistantBatch | null;
|
|
86
|
+
/** Text for the Undo affordance. */
|
|
87
|
+
message(batch: OverviewAssistantBatch): string;
|
|
88
|
+
get undoLabel(): string;
|
|
89
|
+
/** What the overview allows and shows now. */
|
|
90
|
+
describe(): OverviewDescription;
|
|
91
|
+
/** Apply a batch atomically; the grid updates through the controller. */
|
|
92
|
+
apply(operations: unknown): OverviewAssistantApplyResult;
|
|
93
|
+
/**
|
|
94
|
+
* Restore the override from before the last batch. Refused when the
|
|
95
|
+
* overview changed after that batch (the person edited it), or when `id`
|
|
96
|
+
* names another batch.
|
|
97
|
+
*/
|
|
98
|
+
undo(id?: string): OverviewAssistantUndoResult;
|
|
99
|
+
/** Forget the last batch (hides the Undo affordance). */
|
|
100
|
+
dismiss(): void;
|
|
101
|
+
/** The browser tool specs (register with `useOverviewAssistantTools`). */
|
|
102
|
+
tools(): WebMcpToolSpec[];
|
|
103
|
+
}
|
|
104
|
+
/** Create the browser overview assistant for a controller. */
|
|
105
|
+
export declare function createOverviewAssistant(controller: OverviewController, options?: OverviewAssistantOptions): OverviewAssistant;
|
|
106
|
+
/**
|
|
107
|
+
* Register the assistant's browser tools on the page's WebMCP registry for
|
|
108
|
+
* the calling component's lifetime. Call during component initialization.
|
|
109
|
+
* `apply` and `undo` are `write` tools: the nearest Provider's
|
|
110
|
+
* `webmcp.effects` must allow `write`, or only `describe` is exposed.
|
|
111
|
+
*/
|
|
112
|
+
export declare function useOverviewAssistantTools(assistant: OverviewAssistant, options?: {
|
|
113
|
+
effects?: readonly ('read' | 'write' | 'destructive')[];
|
|
114
|
+
}): void;
|
|
115
|
+
//# sourceMappingURL=assistant.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/overview/assistant.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAE7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wCAAwC;AACxC,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,0DAA0D;IAC1D,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChC,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EAAE,sBAAsB,GAAG,MAAM;IAI9C,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,8CAA8C;IAC9C,QAAQ,IAAI,mBAAmB;IAW/B,yEAAyE;IACzE,KAAK,CAAC,UAAU,EAAE,OAAO,GAAG,4BAA4B;IA4CxD;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,2BAA2B;IAmB9C,yDAAyD;IACzD,OAAO,IAAI,IAAI;IAkBf,0EAA0E;IAC1E,KAAK,IAAI,cAAc,EAAE;CAyF1B;AAED,8DAA8D;AAC9D,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,wBAAwB,GACjC,iBAAiB,CAEnB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,iBAAiB,EAC5B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC,EAAE,CAAA;CAAO,GACxE,IAAI,CAMN"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overview assistant in the browser (#3727 phase 4): the structured
|
|
3
|
+
* operations an in-page assistant (the AssistantDock) applies to a mounted
|
|
4
|
+
* overview, with a single-step Undo.
|
|
5
|
+
*
|
|
6
|
+
* A batch is planned with {@link planOverviewOperations} against the
|
|
7
|
+
* controller's definition and current override, so it is atomic (one invalid
|
|
8
|
+
* operation rejects the batch and nothing changes) and can only produce an
|
|
9
|
+
* override the save endpoint accepts. A valid batch lands through
|
|
10
|
+
* `controller.restore`, so the grid updates live and the host's `onchange`
|
|
11
|
+
* persists it like any other edit. The override before the batch is kept for
|
|
12
|
+
* Undo; Undo restores it exactly, and refuses once the overview changed in
|
|
13
|
+
* between (it would discard that edit).
|
|
14
|
+
*
|
|
15
|
+
* The browser tools (`overview_describe`, `overview_apply`, `overview_undo`)
|
|
16
|
+
* register on the page's WebMCP registry through `useWebMcpTool`, the same
|
|
17
|
+
* path every bespoke page tool takes, so the dock offers and runs them like
|
|
18
|
+
* any other page tool (a `write` waits for the person's Allow unless the host
|
|
19
|
+
* policy says otherwise). The browser session is the principal: the
|
|
20
|
+
* controller only holds this viewer's override, and `canCustomize` gates every
|
|
21
|
+
* apply and undo.
|
|
22
|
+
*/
|
|
23
|
+
import { useWebMcpTool } from '../../web/webmcp.svelte.js';
|
|
24
|
+
import { describeOverview, OVERVIEW_MAX_OPERATIONS, OVERVIEW_OPERATION_SCHEMA, planOverviewOperations, } from './operations.js';
|
|
25
|
+
const TOOL_PREFIX = /^[a-z][a-z0-9_]{0,40}$/;
|
|
26
|
+
let batchSeq = 0;
|
|
27
|
+
function sameJson(a, b) {
|
|
28
|
+
return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
29
|
+
}
|
|
30
|
+
function defaultMessage(batch) {
|
|
31
|
+
void batch;
|
|
32
|
+
return 'The assistant updated this overview.';
|
|
33
|
+
}
|
|
34
|
+
export class OverviewAssistant {
|
|
35
|
+
controller;
|
|
36
|
+
#options;
|
|
37
|
+
#prefix;
|
|
38
|
+
#last = $state.raw(null);
|
|
39
|
+
#toastId = null;
|
|
40
|
+
constructor(controller, options = {}) {
|
|
41
|
+
const prefix = options.toolPrefix ?? 'overview';
|
|
42
|
+
if (!TOOL_PREFIX.test(prefix)) {
|
|
43
|
+
throw new Error(`createOverviewAssistant: invalid toolPrefix "${prefix}"`);
|
|
44
|
+
}
|
|
45
|
+
this.controller = controller;
|
|
46
|
+
this.#options = options;
|
|
47
|
+
this.#prefix = prefix;
|
|
48
|
+
}
|
|
49
|
+
/** The last applied batch while it can still be undone. */
|
|
50
|
+
get lastBatch() {
|
|
51
|
+
return this.#last;
|
|
52
|
+
}
|
|
53
|
+
/** Text for the Undo affordance. */
|
|
54
|
+
message(batch) {
|
|
55
|
+
return (this.#options.message ?? defaultMessage)(batch);
|
|
56
|
+
}
|
|
57
|
+
get undoLabel() {
|
|
58
|
+
return this.#options.undoLabel ?? 'Undo';
|
|
59
|
+
}
|
|
60
|
+
/** What the overview allows and shows now. */
|
|
61
|
+
describe() {
|
|
62
|
+
return describeOverview({
|
|
63
|
+
definition: this.controller.definition,
|
|
64
|
+
registry: this.controller.registry,
|
|
65
|
+
override: this.controller.committedOverride,
|
|
66
|
+
canCustomize: this.controller.canCustomize,
|
|
67
|
+
translate: this.#options.translate,
|
|
68
|
+
maxOperations: this.#options.maxOperations,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/** Apply a batch atomically; the grid updates through the controller. */
|
|
72
|
+
apply(operations) {
|
|
73
|
+
const controller = this.controller;
|
|
74
|
+
if (!controller.canCustomize) {
|
|
75
|
+
return { ok: false, reason: 'not_allowed', issues: [] };
|
|
76
|
+
}
|
|
77
|
+
// What the controller last committed, even if the host has not fed it
|
|
78
|
+
// back yet.
|
|
79
|
+
const before = controller.committedOverride;
|
|
80
|
+
const plan = planOverviewOperations({
|
|
81
|
+
definition: controller.definition,
|
|
82
|
+
registry: controller.registry,
|
|
83
|
+
override: before,
|
|
84
|
+
operations,
|
|
85
|
+
maxOperations: this.#options.maxOperations,
|
|
86
|
+
});
|
|
87
|
+
if (!plan.ok)
|
|
88
|
+
return { ok: false, reason: 'invalid', issues: plan.issues };
|
|
89
|
+
if (plan.unchanged) {
|
|
90
|
+
return { ok: true, batchId: null, results: plan.results };
|
|
91
|
+
}
|
|
92
|
+
const restored = controller.restore(plan.override);
|
|
93
|
+
if (!restored.ok) {
|
|
94
|
+
if (restored.reason === 'unchanged') {
|
|
95
|
+
return { ok: true, batchId: null, results: plan.results };
|
|
96
|
+
}
|
|
97
|
+
return { ok: false, reason: 'not_allowed', issues: [] };
|
|
98
|
+
}
|
|
99
|
+
const counts = {};
|
|
100
|
+
for (const result of plan.results) {
|
|
101
|
+
counts[result.op] = (counts[result.op] ?? 0) + 1;
|
|
102
|
+
}
|
|
103
|
+
batchSeq += 1;
|
|
104
|
+
const batch = {
|
|
105
|
+
id: `b${batchSeq}`,
|
|
106
|
+
results: plan.results,
|
|
107
|
+
counts,
|
|
108
|
+
before,
|
|
109
|
+
after: plan.override,
|
|
110
|
+
};
|
|
111
|
+
this.#last = batch;
|
|
112
|
+
this.#showToast(batch);
|
|
113
|
+
this.#options.onapply?.(batch);
|
|
114
|
+
return { ok: true, batchId: batch.id, results: plan.results };
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Restore the override from before the last batch. Refused when the
|
|
118
|
+
* overview changed after that batch (the person edited it), or when `id`
|
|
119
|
+
* names another batch.
|
|
120
|
+
*/
|
|
121
|
+
undo(id) {
|
|
122
|
+
const batch = this.#last;
|
|
123
|
+
if (!batch || (id !== undefined && id !== batch.id)) {
|
|
124
|
+
return { ok: false, reason: 'nothing_to_undo' };
|
|
125
|
+
}
|
|
126
|
+
const controller = this.controller;
|
|
127
|
+
if (!controller.canCustomize)
|
|
128
|
+
return { ok: false, reason: 'not_allowed' };
|
|
129
|
+
if (!sameJson(controller.committedOverride, batch.after)) {
|
|
130
|
+
this.dismiss();
|
|
131
|
+
return { ok: false, reason: 'changed_since' };
|
|
132
|
+
}
|
|
133
|
+
const restored = controller.restore(batch.before);
|
|
134
|
+
if (!restored.ok && restored.reason !== 'unchanged') {
|
|
135
|
+
return { ok: false, reason: 'not_allowed' };
|
|
136
|
+
}
|
|
137
|
+
this.dismiss();
|
|
138
|
+
return { ok: true };
|
|
139
|
+
}
|
|
140
|
+
/** Forget the last batch (hides the Undo affordance). */
|
|
141
|
+
dismiss() {
|
|
142
|
+
this.#last = null;
|
|
143
|
+
if (this.#toastId)
|
|
144
|
+
this.#options.toaster?.dismiss(this.#toastId);
|
|
145
|
+
this.#toastId = null;
|
|
146
|
+
}
|
|
147
|
+
#showToast(batch) {
|
|
148
|
+
const toaster = this.#options.toaster;
|
|
149
|
+
if (!toaster)
|
|
150
|
+
return;
|
|
151
|
+
if (this.#toastId)
|
|
152
|
+
toaster.dismiss(this.#toastId);
|
|
153
|
+
this.#toastId = toaster.show({
|
|
154
|
+
message: this.message(batch),
|
|
155
|
+
variant: 'info',
|
|
156
|
+
duration: 10_000,
|
|
157
|
+
action: { label: this.undoLabel, run: () => void this.undo(batch.id) },
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/** The browser tool specs (register with `useOverviewAssistantTools`). */
|
|
161
|
+
tools() {
|
|
162
|
+
const p = this.#prefix;
|
|
163
|
+
const json = (value) => JSON.stringify(value);
|
|
164
|
+
return [
|
|
165
|
+
{
|
|
166
|
+
name: `${p}_describe`,
|
|
167
|
+
description: 'Describe this overview page: the widget types it allows (with their option fields, allowed values and span range) and the widgets it shows now, in order. Call before changing it; never invent types, option keys or models.',
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
properties: {},
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
},
|
|
173
|
+
annotations: { readOnlyHint: true },
|
|
174
|
+
execute: () => json(this.describe()),
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: `${p}_apply`,
|
|
178
|
+
description: 'Change this overview with a batch of structured operations (add, configure, move, resize, remove). The batch is all-or-nothing: if any operation is invalid nothing changes and the issues are returned to fix. The person can undo the batch.',
|
|
179
|
+
inputSchema: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
required: ['operations'],
|
|
182
|
+
additionalProperties: false,
|
|
183
|
+
properties: {
|
|
184
|
+
operations: {
|
|
185
|
+
type: 'array',
|
|
186
|
+
minItems: 1,
|
|
187
|
+
maxItems: this.#options.maxOperations ?? OVERVIEW_MAX_OPERATIONS,
|
|
188
|
+
items: OVERVIEW_OPERATION_SCHEMA,
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
annotations: {
|
|
193
|
+
readOnlyHint: false,
|
|
194
|
+
destructiveHint: false,
|
|
195
|
+
idempotentHint: false,
|
|
196
|
+
openWorldHint: false,
|
|
197
|
+
},
|
|
198
|
+
execute: (args) => {
|
|
199
|
+
const result = this.apply(args.operations);
|
|
200
|
+
if (result.ok) {
|
|
201
|
+
return json({
|
|
202
|
+
ok: true,
|
|
203
|
+
changed: result.batchId !== null,
|
|
204
|
+
undoToken: result.batchId,
|
|
205
|
+
applied: result.results,
|
|
206
|
+
widgets: this.describe().widgets,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return json({
|
|
210
|
+
ok: false,
|
|
211
|
+
error: result.reason === 'not_allowed'
|
|
212
|
+
? 'You may not change this overview.'
|
|
213
|
+
: 'The batch was rejected and nothing changed. Fix the listed operations and call again.',
|
|
214
|
+
issues: result.issues,
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: `${p}_undo`,
|
|
220
|
+
description: 'Undo the last batch you applied to this overview (pass its undoToken). Single step; refused if the overview changed since.',
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: 'object',
|
|
223
|
+
required: ['undoToken'],
|
|
224
|
+
additionalProperties: false,
|
|
225
|
+
properties: { undoToken: { type: 'string' } },
|
|
226
|
+
},
|
|
227
|
+
annotations: {
|
|
228
|
+
readOnlyHint: false,
|
|
229
|
+
destructiveHint: false,
|
|
230
|
+
idempotentHint: false,
|
|
231
|
+
openWorldHint: false,
|
|
232
|
+
},
|
|
233
|
+
execute: (args) => {
|
|
234
|
+
const token = typeof args.undoToken === 'string' ? args.undoToken : '';
|
|
235
|
+
const result = this.undo(token);
|
|
236
|
+
return json(result.ok
|
|
237
|
+
? { ok: true, widgets: this.describe().widgets }
|
|
238
|
+
: { ok: false, error: result.reason });
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/** Create the browser overview assistant for a controller. */
|
|
245
|
+
export function createOverviewAssistant(controller, options) {
|
|
246
|
+
return new OverviewAssistant(controller, options);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Register the assistant's browser tools on the page's WebMCP registry for
|
|
250
|
+
* the calling component's lifetime. Call during component initialization.
|
|
251
|
+
* `apply` and `undo` are `write` tools: the nearest Provider's
|
|
252
|
+
* `webmcp.effects` must allow `write`, or only `describe` is exposed.
|
|
253
|
+
*/
|
|
254
|
+
export function useOverviewAssistantTools(assistant, options = {}) {
|
|
255
|
+
for (const spec of assistant.tools()) {
|
|
256
|
+
useWebMcpTool(() => spec, {
|
|
257
|
+
...(options.effects ? { effects: options.effects } : {}),
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -47,6 +47,14 @@ export declare class OverviewController {
|
|
|
47
47
|
get base(): OverviewDocument;
|
|
48
48
|
/** The canonical override currently applied; `null` when on defaults. */
|
|
49
49
|
get override(): OverviewOverride | null;
|
|
50
|
+
/**
|
|
51
|
+
* The override this controller last committed: {@link override}, or, while
|
|
52
|
+
* a host-owned getter still answers the value from before the last edit
|
|
53
|
+
* (the host has not fed it back yet), the value handed to `onchange`. An
|
|
54
|
+
* Undo compares against this so a pending save is not mistaken for a
|
|
55
|
+
* change made elsewhere.
|
|
56
|
+
*/
|
|
57
|
+
get committedOverride(): OverviewOverride | null;
|
|
50
58
|
/** What was dropped or reported while resolving. */
|
|
51
59
|
get issues(): readonly OverviewIssue[];
|
|
52
60
|
/** True when the viewer has changed anything from the defaults. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/overview/controller.svelte.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,sCAAsC;AACtC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAED,MAAM,MAAM,gBAAgB,GACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACxB;IACE,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EACF,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,OAAO,GACP,WAAW,CAAC;IAChB,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC9B,CAAC;AAEN,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;IACzB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,uEAAuE;IACvE,MAAM,CAAC,EAAE,cAAc,GAAG,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC,CAAC;IAC7D;;;;OAIG;IACH,UAAU,CAAC,EAAE,CACX,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,OAAO,CAAC,CAAC;CACvB;AAUD,qBAAa,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/overview/controller.svelte.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,c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