@xnetjs/plugins 0.4.0 → 0.6.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/dist/index.d.ts +231 -18
- package/dist/index.js +347 -4
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -563,29 +563,38 @@ interface SchemaContribution {
|
|
|
563
563
|
schema: unknown;
|
|
564
564
|
}
|
|
565
565
|
/**
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* command palette. Same progressive-disclosure grammar as the devtools
|
|
566
|
+
* Slot prominence (0273, generalized in 0280). `hero` views render in
|
|
567
|
+
* their region's one-tap strip; `secondary` views live behind "More" and
|
|
568
|
+
* the command palette. Same progressive-disclosure grammar as the devtools
|
|
569
569
|
* panel registry (packages/devtools/src/panels/panel-registry.ts), lifted
|
|
570
570
|
* to an app-level contribution point.
|
|
571
571
|
*/
|
|
572
572
|
type SurfaceDockTier = 'hero' | 'secondary';
|
|
573
573
|
/**
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
574
|
+
* The shell's region skeleton a slot view may occupy (exploration 0280).
|
|
575
|
+
* Mirrors the app's LayoutTree regions: edge strips (`rail`, `status`)
|
|
576
|
+
* and the four docks. The `surface` center is not a slot target — views
|
|
577
|
+
* there are routes/tabs, not panels.
|
|
578
578
|
*/
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
type SlotRegion = 'rail' | 'status' | 'dock.left' | 'dock.right' | 'dock.bottom' | 'dock.corner';
|
|
580
|
+
/**
|
|
581
|
+
* A view contributed to the shell's slot system (exploration 0280 —
|
|
582
|
+
* generalizing the 0273 SurfaceDock contract to every region). Where the
|
|
583
|
+
* view actually sits is the user's layout tree; `defaultRegion` only says
|
|
584
|
+
* where it lands until the user (or their agent) moves it, and
|
|
585
|
+
* `allowedRegions` bounds where it may go. A plugin places only its OWN
|
|
586
|
+
* views; moving anyone else's is the user's (or consented agent's) call.
|
|
587
|
+
*/
|
|
588
|
+
interface SlotContribution {
|
|
589
|
+
/** Unique view ID, preferably plugin-scoped */
|
|
581
590
|
id: string;
|
|
582
|
-
/** Display name in
|
|
591
|
+
/** Display name in strips / menus / palette */
|
|
583
592
|
label: string;
|
|
584
593
|
/** Lucide icon name or component */
|
|
585
594
|
icon?: string | ComponentType;
|
|
586
|
-
/**
|
|
595
|
+
/** Prominence within the region: hero = strip, secondary = More + palette */
|
|
587
596
|
tier: SurfaceDockTier;
|
|
588
|
-
/** Grouping key for
|
|
597
|
+
/** Grouping key for menus (e.g. 'capture', 'activity', 'tools') */
|
|
589
598
|
group?: string;
|
|
590
599
|
/** Extra palette search terms */
|
|
591
600
|
keywords?: string[];
|
|
@@ -595,9 +604,18 @@ interface SurfaceDockContribution {
|
|
|
595
604
|
priority?: number;
|
|
596
605
|
/** Dynamic badge (e.g. unread count); null hides it */
|
|
597
606
|
badge?: () => string | number | null;
|
|
598
|
-
/** The
|
|
607
|
+
/** The view body, rendered inside its region's host */
|
|
599
608
|
component: ComponentType;
|
|
609
|
+
/** Where the view lands if the user hasn't placed it (default: dock.corner) */
|
|
610
|
+
defaultRegion?: SlotRegion;
|
|
611
|
+
/** Regions the view may occupy (empty/undefined = any region) */
|
|
612
|
+
allowedRegions?: SlotRegion[];
|
|
600
613
|
}
|
|
614
|
+
/**
|
|
615
|
+
* @deprecated Since 0280 — use {@link SlotContribution}. The dock was the
|
|
616
|
+
* first slot region; the contract is now region-agnostic.
|
|
617
|
+
*/
|
|
618
|
+
type SurfaceDockContribution = SlotContribution;
|
|
601
619
|
type CanvasPreviewTier = 'summary' | 'thumbnail' | 'shell' | 'live';
|
|
602
620
|
type CanvasIngestInputKind = 'url' | 'file' | 'data-transfer' | 'text' | 'node' | 'custom';
|
|
603
621
|
type CanvasToolGroup = 'select' | 'create' | 'connect' | 'annotate' | 'layout' | 'custom';
|
|
@@ -763,7 +781,9 @@ declare class ContributionRegistry {
|
|
|
763
781
|
readonly importers: TypedRegistry<ImporterContribution>;
|
|
764
782
|
readonly mentionProviders: TypedRegistry<MentionProviderContribution>;
|
|
765
783
|
readonly agentTools: TypedRegistry<AgentToolContribution>;
|
|
766
|
-
readonly
|
|
784
|
+
readonly slots: TypedRegistry<SlotContribution>;
|
|
785
|
+
/** @deprecated Since 0280 — the dock registry is the slot registry. */
|
|
786
|
+
get surfaceDock(): TypedRegistry<SlotContribution>;
|
|
767
787
|
/**
|
|
768
788
|
* Clear all registries (for cleanup/testing)
|
|
769
789
|
*/
|
|
@@ -868,6 +888,14 @@ interface ModuleCapabilities {
|
|
|
868
888
|
network?: string[];
|
|
869
889
|
/** Host APIs the client sandbox should expose to the module's code. */
|
|
870
890
|
endowments?: string[];
|
|
891
|
+
/**
|
|
892
|
+
* Whether the module may capture the machine's system audio (meeting
|
|
893
|
+
* transcription, exploration 0279). Renders as a prominent consent line and
|
|
894
|
+
* gates the desktop loopback-capture IPC — a module without this grant never
|
|
895
|
+
* reaches the capture service. Microphone access is NOT covered here: the
|
|
896
|
+
* mic goes through the platform's own `getUserMedia` permission prompt.
|
|
897
|
+
*/
|
|
898
|
+
systemAudio?: boolean;
|
|
871
899
|
}
|
|
872
900
|
/**
|
|
873
901
|
* A two-sided feature module. Inherits all client `contributes` (including the
|
|
@@ -1028,6 +1056,8 @@ interface ExtensionContext {
|
|
|
1028
1056
|
registerMentionProvider(provider: MentionProviderContribution): Disposable$1;
|
|
1029
1057
|
/** Register a model-facing agent tool (exploration 0196) */
|
|
1030
1058
|
registerAgentTool(tool: AgentToolContribution): Disposable$1;
|
|
1059
|
+
/** Register a shell slot view (exploration 0280) */
|
|
1060
|
+
registerSlotView(view: SlotContribution): Disposable$1;
|
|
1031
1061
|
/** Add middleware to NodeStore */
|
|
1032
1062
|
addMiddleware(middleware: NodeStoreMiddleware): Disposable$1;
|
|
1033
1063
|
/** Plugin-private storage */
|
|
@@ -1159,6 +1189,12 @@ interface PluginContributions {
|
|
|
1159
1189
|
mentionProviders?: MentionProviderContribution[];
|
|
1160
1190
|
/** Model-facing agent tools — what a Connector exposes (exploration 0196). */
|
|
1161
1191
|
agentTools?: AgentToolContribution[];
|
|
1192
|
+
/**
|
|
1193
|
+
* Shell slot views (exploration 0280): panels the shell hosts in its
|
|
1194
|
+
* docks/strips. A plugin's views land at their `defaultRegion` (default:
|
|
1195
|
+
* the corner dock) and move with the user's layout tree thereafter.
|
|
1196
|
+
*/
|
|
1197
|
+
slots?: SlotContribution[];
|
|
1162
1198
|
}
|
|
1163
1199
|
declare class PluginValidationError extends Error {
|
|
1164
1200
|
readonly issues: string[];
|
|
@@ -1174,6 +1210,105 @@ declare function validateManifest(manifest: unknown): XNetExtension;
|
|
|
1174
1210
|
*/
|
|
1175
1211
|
declare function defineExtension(manifest: XNetExtension): XNetExtension;
|
|
1176
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* LayoutTree — the shell as data (exploration 0280).
|
|
1215
|
+
*
|
|
1216
|
+
* One tree of regions → slots → view references replaces the hard fork
|
|
1217
|
+
* between the calm shell and the workbench grid. The former shells become
|
|
1218
|
+
* *presets*: named, data-only configurations of the same tree (`quiet`,
|
|
1219
|
+
* `calm`, `bench`). Components never branch on which preset is loaded —
|
|
1220
|
+
* only on the tree's axes (chrome posture, slot tiers, tabsEnabled); the
|
|
1221
|
+
* source-grep tripwire in layout-tree.test.ts enforces this.
|
|
1222
|
+
*
|
|
1223
|
+
* The module is pure (no DOM, no zustand) so presets round-trip through
|
|
1224
|
+
* the `xnet:workspace` node payload and unit tests without a shell.
|
|
1225
|
+
*/
|
|
1226
|
+
|
|
1227
|
+
type ChromePosture = 'pinned' | 'quiet';
|
|
1228
|
+
/**
|
|
1229
|
+
* The fixed region skeleton (the Zed/VS Code lesson: regions never
|
|
1230
|
+
* multiply, only their contents move). `surface` is the center and always
|
|
1231
|
+
* exists; the slot regions (docks + edge strips) come from the
|
|
1232
|
+
* contribution contract.
|
|
1233
|
+
*/
|
|
1234
|
+
type RegionId = 'surface' | SlotRegion;
|
|
1235
|
+
declare const REGION_IDS: RegionId[];
|
|
1236
|
+
/**
|
|
1237
|
+
* Disclosure tier of a placed view: `pinned` renders in the frame at rest,
|
|
1238
|
+
* `summoned` is reachable from its region's launcher/chord/palette,
|
|
1239
|
+
* `hidden` only from the palette.
|
|
1240
|
+
*/
|
|
1241
|
+
type SlotTier = 'pinned' | 'summoned' | 'hidden';
|
|
1242
|
+
interface SlotPlacement {
|
|
1243
|
+
/** Contribution id from the slot registry (e.g. 'navigator', 'shelf'). */
|
|
1244
|
+
viewId: string;
|
|
1245
|
+
tier: SlotTier;
|
|
1246
|
+
/** Sort key within the region (lower = earlier). */
|
|
1247
|
+
order: number;
|
|
1248
|
+
}
|
|
1249
|
+
interface LayoutTree {
|
|
1250
|
+
/** Which workspace (preset or saved node) this tree was loaded from. */
|
|
1251
|
+
workspaceId: string;
|
|
1252
|
+
regions: Record<RegionId, SlotPlacement[]>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Surface capabilities. Tabs/split groups are content state and stay in
|
|
1255
|
+
* the workbench store; the tree only says whether the surface *shows*
|
|
1256
|
+
* them (the bench's tab strip vs the calm bare surface).
|
|
1257
|
+
*/
|
|
1258
|
+
surface: {
|
|
1259
|
+
tabsEnabled: boolean;
|
|
1260
|
+
};
|
|
1261
|
+
/** Chrome posture axis (0273) — orthogonal to placements. */
|
|
1262
|
+
chrome: ChromePosture;
|
|
1263
|
+
}
|
|
1264
|
+
/** Built-in presets — read-only system workspaces (0280 phase 3). */
|
|
1265
|
+
type PresetId = 'quiet' | 'calm' | 'bench';
|
|
1266
|
+
declare const PRESET_IDS: PresetId[];
|
|
1267
|
+
/** Deterministic node ids for the seeded system workspaces. */
|
|
1268
|
+
declare const PRESET_WORKSPACE_ID_PREFIX = "workspace-preset-";
|
|
1269
|
+
declare function presetWorkspaceId(preset: PresetId): string;
|
|
1270
|
+
/** Whether a workspace id denotes a built-in preset (not a saved node). */
|
|
1271
|
+
declare function isPresetWorkspaceId(workspaceId: string): boolean;
|
|
1272
|
+
declare function presetForWorkspaceId(workspaceId: string): PresetId | null;
|
|
1273
|
+
/**
|
|
1274
|
+
* Build the tree for a built-in preset. Presets are data ONLY — every
|
|
1275
|
+
* difference between the former shells must be expressible here, or it
|
|
1276
|
+
* does not exist.
|
|
1277
|
+
*/
|
|
1278
|
+
declare function createPresetTree(preset: PresetId): LayoutTree;
|
|
1279
|
+
/** The region currently holding a view, if any. */
|
|
1280
|
+
declare function regionOf(tree: LayoutTree, viewId: string): RegionId | null;
|
|
1281
|
+
/** The placement record for a view, if any. */
|
|
1282
|
+
declare function placementOf(tree: LayoutTree, viewId: string): SlotPlacement | null;
|
|
1283
|
+
/**
|
|
1284
|
+
* Move a view to another region (appended last), keeping its tier.
|
|
1285
|
+
* No-op when the view is absent or already there.
|
|
1286
|
+
*/
|
|
1287
|
+
declare function moveSlot(tree: LayoutTree, viewId: string, to: RegionId): LayoutTree;
|
|
1288
|
+
/** Change a placed view's disclosure tier. No-op when absent/unchanged. */
|
|
1289
|
+
declare function setSlotTier(tree: LayoutTree, viewId: string, tier: SlotTier): LayoutTree;
|
|
1290
|
+
/** Placements of a region, sorted, optionally filtered to a tier. */
|
|
1291
|
+
declare function slotsIn(tree: LayoutTree, region: RegionId, tier?: SlotTier): SlotPlacement[];
|
|
1292
|
+
/**
|
|
1293
|
+
* Portable workspace payload: the tree plus a human name. Device-local
|
|
1294
|
+
* state (pixel sizes, monitor splits) deliberately stays OUT of the node —
|
|
1295
|
+
* it lives in the local store keyed by workspaceId.
|
|
1296
|
+
*/
|
|
1297
|
+
interface WorkspacePayload {
|
|
1298
|
+
name: string;
|
|
1299
|
+
/** Preset provenance, for "Reset to preset". Null = built from scratch. */
|
|
1300
|
+
preset: PresetId | null;
|
|
1301
|
+
tree: LayoutTree;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Parse an untrusted payload (a synced node) back into a tree. Unknown
|
|
1305
|
+
* regions are dropped, missing regions become empty, malformed placements
|
|
1306
|
+
* are skipped — a shared workspace must never crash the shell.
|
|
1307
|
+
*/
|
|
1308
|
+
declare function parseWorkspacePayload(value: unknown): WorkspacePayload | null;
|
|
1309
|
+
/** Serialize for the node payload. Inverse of {@link parseWorkspacePayload}. */
|
|
1310
|
+
declare function serializeWorkspacePayload(payload: WorkspacePayload): WorkspacePayload;
|
|
1311
|
+
|
|
1177
1312
|
/**
|
|
1178
1313
|
* @xnetjs/plugins — importer resolution (exploration 0189).
|
|
1179
1314
|
*
|
|
@@ -2276,6 +2411,13 @@ declare function runConnectorSync(def: ConnectorDefinition, ports: RunConnectorS
|
|
|
2276
2411
|
* renders on top of this; the view itself is app-side.
|
|
2277
2412
|
*/
|
|
2278
2413
|
|
|
2414
|
+
/**
|
|
2415
|
+
* What a marketplace listing distributes (exploration 0280). `plugin` is
|
|
2416
|
+
* the default (code, install-gated); `workspace` is a shared bench — a
|
|
2417
|
+
* `xnet:Workspace` node payload, pure data: importing one never runs code,
|
|
2418
|
+
* so it needs no sandbox tier, only the normal node import path.
|
|
2419
|
+
*/
|
|
2420
|
+
type MarketplaceListingKind = 'plugin' | 'workspace';
|
|
2279
2421
|
/** A single entry in the marketplace index (`registry.json`). */
|
|
2280
2422
|
interface MarketplaceEntry {
|
|
2281
2423
|
id: string;
|
|
@@ -2283,6 +2425,8 @@ interface MarketplaceEntry {
|
|
|
2283
2425
|
description: string;
|
|
2284
2426
|
version: string;
|
|
2285
2427
|
author: string;
|
|
2428
|
+
/** Listing kind (default `plugin`). `workspace` = a shared bench (0280). */
|
|
2429
|
+
kind?: MarketplaceListingKind;
|
|
2286
2430
|
/** Search keywords / tags. */
|
|
2287
2431
|
keywords?: string[];
|
|
2288
2432
|
/** Coarse category for filtering (`productivity`, `finance`, `social`, …). */
|
|
@@ -2291,6 +2435,11 @@ interface MarketplaceEntry {
|
|
|
2291
2435
|
capabilities?: ModuleCapabilities;
|
|
2292
2436
|
/** URL the full manifest is fetched from at install. */
|
|
2293
2437
|
manifestUrl: string;
|
|
2438
|
+
/**
|
|
2439
|
+
* For `kind: 'workspace'` listings: URL of the workspace payload JSON
|
|
2440
|
+
* (the portable tree — parsed by `parseWorkspacePayload` on import).
|
|
2441
|
+
*/
|
|
2442
|
+
workspaceUrl?: string;
|
|
2294
2443
|
/** Lifetime install count (trust signal). */
|
|
2295
2444
|
installs?: number;
|
|
2296
2445
|
/** GitHub stars / community signal. */
|
|
@@ -2631,6 +2780,63 @@ interface RssConnectorOptions {
|
|
|
2631
2780
|
*/
|
|
2632
2781
|
declare function buildRssConnector(options: RssConnectorOptions): DefinedConnector;
|
|
2633
2782
|
|
|
2783
|
+
/**
|
|
2784
|
+
* Google Calendar connector (exploration 0279, phase 4).
|
|
2785
|
+
*
|
|
2786
|
+
* Pulls upcoming calendar events into `Meeting` nodes so the recorder can
|
|
2787
|
+
* prompt "your 3pm is starting — take notes?" and pre-fill the title +
|
|
2788
|
+
* attendee names (which also seed speaker attribution). Follows the 0213
|
|
2789
|
+
* connector shape: hub-side sync with broker-held `GOOGLE_CALENDAR_TOKEN`,
|
|
2790
|
+
* egress limited to the Google APIs host, writes limited to the Meeting
|
|
2791
|
+
* schema.
|
|
2792
|
+
*
|
|
2793
|
+
* Only *detection metadata* syncs — a calendar-created Meeting has no
|
|
2794
|
+
* transcript until the user actually records; capture/transcription remain
|
|
2795
|
+
* fully on-device (0279 privacy posture).
|
|
2796
|
+
*/
|
|
2797
|
+
|
|
2798
|
+
declare const GOOGLE_CALENDAR_CONNECTOR_ID = "dev.xnet.connector.google-calendar";
|
|
2799
|
+
/** The slice of a Google Calendar `events.list` item this connector reads. */
|
|
2800
|
+
interface GoogleCalendarEvent {
|
|
2801
|
+
id?: string;
|
|
2802
|
+
status?: string;
|
|
2803
|
+
summary?: string;
|
|
2804
|
+
start?: {
|
|
2805
|
+
dateTime?: string;
|
|
2806
|
+
date?: string;
|
|
2807
|
+
};
|
|
2808
|
+
end?: {
|
|
2809
|
+
dateTime?: string;
|
|
2810
|
+
date?: string;
|
|
2811
|
+
};
|
|
2812
|
+
attendees?: Array<{
|
|
2813
|
+
displayName?: string;
|
|
2814
|
+
email?: string;
|
|
2815
|
+
self?: boolean;
|
|
2816
|
+
}>;
|
|
2817
|
+
}
|
|
2818
|
+
interface GoogleCalendarConnectorOptions {
|
|
2819
|
+
/** Override the connector id (tests, multiple accounts). */
|
|
2820
|
+
id?: string;
|
|
2821
|
+
/** Calendar to read. Default `primary`. */
|
|
2822
|
+
calendarId?: string;
|
|
2823
|
+
/** Clock injection for tests (epoch ms). */
|
|
2824
|
+
now?: () => number;
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
* The "start notes?" prompt decision (pure — the recorder UI polls this):
|
|
2828
|
+
* returns the meeting starting within `windowMs` of `now`, if any.
|
|
2829
|
+
*/
|
|
2830
|
+
declare function detectUpcomingMeeting(events: GoogleCalendarEvent[], now: number, windowMs?: number): GoogleCalendarEvent | undefined;
|
|
2831
|
+
/**
|
|
2832
|
+
* Google Calendar → `Meeting` nodes. Events materialize with a stable
|
|
2833
|
+
* `calendarEventId`, so re-syncs converge by lookup-then-update instead of
|
|
2834
|
+
* duplicating (the connector store exposes get-by-id only, so the pull keeps
|
|
2835
|
+
* its own event→node map per run and dedups against prior runs via the
|
|
2836
|
+
* deterministic node id derived from the event id).
|
|
2837
|
+
*/
|
|
2838
|
+
declare function buildGoogleCalendarConnector(options?: GoogleCalendarConnectorOptions): DefinedConnector;
|
|
2839
|
+
|
|
2634
2840
|
/**
|
|
2635
2841
|
* @xnetjs/plugins — API pull connectors: GitHub, Notion, Airtable
|
|
2636
2842
|
* (exploration 0213).
|
|
@@ -3091,9 +3297,9 @@ declare class PluginRegistry {
|
|
|
3091
3297
|
/** Thrown when a plugin tries to act outside its declared capability grant. */
|
|
3092
3298
|
declare class CapabilityError extends Error {
|
|
3093
3299
|
readonly pluginId: string;
|
|
3094
|
-
readonly capability: 'schemaWrite' | 'schemaRead' | 'network';
|
|
3300
|
+
readonly capability: 'schemaWrite' | 'schemaRead' | 'network' | 'systemAudio';
|
|
3095
3301
|
readonly target: string;
|
|
3096
|
-
constructor(message: string, pluginId: string, capability: 'schemaWrite' | 'schemaRead' | 'network', target: string);
|
|
3302
|
+
constructor(message: string, pluginId: string, capability: 'schemaWrite' | 'schemaRead' | 'network' | 'systemAudio', target: string);
|
|
3097
3303
|
}
|
|
3098
3304
|
/**
|
|
3099
3305
|
* Match a schema IRI against a capability pattern. Supports:
|
|
@@ -3118,6 +3324,13 @@ declare function isSchemaReadAllowed(caps: ModuleCapabilities | undefined, iri:
|
|
|
3118
3324
|
* egress permitted (closed by default).
|
|
3119
3325
|
*/
|
|
3120
3326
|
declare function isNetworkAllowed(caps: ModuleCapabilities | undefined, urlOrHost: string): boolean;
|
|
3327
|
+
/**
|
|
3328
|
+
* Whether the grant permits capturing system audio (exploration 0279). Closed
|
|
3329
|
+
* by default: only an explicit `systemAudio: true` opens the capture IPC.
|
|
3330
|
+
*/
|
|
3331
|
+
declare function isSystemAudioAllowed(caps: ModuleCapabilities | undefined): boolean;
|
|
3332
|
+
/** Assert system-audio capture is permitted, or throw {@link CapabilityError}. */
|
|
3333
|
+
declare function assertSystemAudio(caps: ModuleCapabilities | undefined, pluginId: string): void;
|
|
3121
3334
|
/** Assert a schema write is permitted, or throw {@link CapabilityError}. */
|
|
3122
3335
|
declare function assertSchemaWrite(caps: ModuleCapabilities | undefined, iri: string, pluginId: string): void;
|
|
3123
3336
|
/** Assert a network request is permitted, or throw {@link CapabilityError}. */
|
|
@@ -3358,7 +3571,7 @@ declare function createTestPluginHarness(options?: TestHarnessOptions): TestPlug
|
|
|
3358
3571
|
* (0196 — sync an external service into governed nodes + expose agent tools).
|
|
3359
3572
|
*/
|
|
3360
3573
|
|
|
3361
|
-
type ScaffoldTemplate = 'client' | 'two-sided' | 'ai-script' | 'connector';
|
|
3574
|
+
type ScaffoldTemplate = 'client' | 'two-sided' | 'ai-script' | 'connector' | 'slot-view';
|
|
3362
3575
|
interface ScaffoldSpec {
|
|
3363
3576
|
/** Reverse-domain plugin id, e.g. `com.acme.kanban`. */
|
|
3364
3577
|
id: string;
|
|
@@ -5820,4 +6033,4 @@ declare function leaveWithEverything(ports: RightToLeavePorts, opts: {
|
|
|
5820
6033
|
*/
|
|
5821
6034
|
declare function deleteDay(ports: RightToLeavePorts, opts: DeleteDayOptions): Promise<DeleteDayResult>;
|
|
5822
6035
|
|
|
5823
|
-
export { type AIComplexityLevel, type AICostModel, type AIGenerateRequest, type AIGenerateResponse, AIGenerationError, type AIMessage, type AIMessageRole, type AIModelCapabilities, type AIModelQuality, type AIPrivacyLevel, type AIProvider, type AIProviderConfig, type AIProviderOptions, AIProviderRouter, type AIProviderRouterOptions, type AIProviderType, type AIProviderUsage, AIRTABLE_CONNECTOR_ID, type AIRiskLevel, type AIScriptRequest, type AIScriptResponse, type AIStreamChunk, type AIToolCall, type AIToolSpec, type AIUsage, AI_GENERATED_PROVENANCE, AI_RISK_LEVELS, AI_SCOPES, AI_TARGET_KINDS, ALLOWED_PLUGIN_LICENSES, type ActionContext, type ActionDefinition, ActionDefinitionError, ActionDispatchError, type ActionEvent, ActionSsrfError, type ActionTrigger, type AgentToolContribution, type AgentToolInputSchema, type AiAgentApproval, type AiAgentApprovalRequestInput, type AiAgentApprovalResolveInput, type AiAgentApprovalStatus, type AiAgentBackgroundJob, type AiAgentBackgroundJobInput, type AiAgentBackgroundJobRunner, type AiAgentBackgroundJobStatus, type AiAgentDisplayState, type AiAgentDisplayStateKind, type AiAgentEvent, type AiAgentEventType, type AiAgentOrchestratorMode, type AiAgentRunSelectionTurnInput, type AiAgentRunTurnInput, type AiAgentRunTurnResult, AiAgentRuntime, type AiAgentRuntimeConfig, type AiAgentRuntimeListener, type AiAgentRuntimeSnapshot, type AiAgentRuntimeStorage, type AiAgentSelectionContext, type AiAgentSelectionKind, type AiAgentTelemetrySnapshot, type AiAgentThread, type AiAgentThreadCreateInput, type AiAgentThreadStatus, type AiAgentTurn, type AiAgentTurnRole, type AiAgentTurnStatus, type AiAssistMode, type AiAuditEvent, type AiAuthoredPlugin, AiAuthoringError, AiBudgetError, type AiCallableTool, type AiChangeSet, type AiCommandExposure, type AiContextPack, type AiContextPackResource, type AiContextRetriever, type AiContextSeed, type AiDatabaseMutationApplyResult, type AiExtraTool, type AiJsonSchema, type AiJsonSchemaType, type AiMutationPlan, type AiMutationPlanStatus, type AiOperation, type AiPageMarkdownApplyAdapter, type AiPageMarkdownApplyAdapterInput, type AiPageMarkdownApplyAdapterResult, type AiPageMarkdownApplyResult, type AiPageMarkdownRollbackResult, type AiPluginPipelineInput, type AiPluginPipelinePorts, type AiPluginPipelineResult, type AiResource, type AiResourceContent, type AiRetrievedNode, type AiRiskLevel, type AiScope, type AiSearchOptions, type AiSearchResult, type AiSurfaceLimits, AiSurfaceService, type AiSurfaceServiceConfig, type AiTargetKind, type AiToolCallResult, type AiToolDefinition, type AiValidationResult, type AirtableConnectorOptions, type AllowedPluginLicense, AnthropicProvider, type ArrayHelpers, type BlockContribution, type BlockProps, CANVAS_PLUGIN_FIXTURES, CHANNEL_SCHEMA, CHAT_MESSAGE_SCHEMA, CONNECTOR_CATEGORY, CONNECTOR_META, CRM_CANVAS_PLUGIN_FIXTURE, type CanvasCardContribution, type CanvasContribution, type CanvasContributionBase, type CanvasContributionPermission, type CanvasEdgeContribution, type CanvasErpPrototypeAuditEntry, type CanvasErpPrototypeAuditOperation, type CanvasErpPrototypeAuditSource, type CanvasErpPrototypeCard, type CanvasErpPrototypeCommand, type CanvasErpPrototypeEdge, type CanvasErpPrototypeEntityKind, type CanvasErpPrototypeLayoutKind, type CanvasErpPrototypeQueryFrame, type CanvasErpPrototypeQueryPredicate, type CanvasErpPrototypeRect, type CanvasErpPrototypeRisk, type CanvasErpPrototypeRiskSummary, type CanvasErpPrototypeScenario, type CanvasErpPrototypeStatus, type CanvasIngestInputKind, type CanvasIngestorContribution, type CanvasInspectorContribution, type CanvasInspectorPlacement, type CanvasLayoutContribution, type CanvasLayoutScope, type CanvasPluginFixture, type CanvasPluginFixtureCardSample, type CanvasPluginFixtureKind, type CanvasPluginPermissionDecisionStatus, type CanvasPluginPermissionGateDecision, type CanvasPluginPermissionGateInput, type CanvasPluginPermissionPrompt, type CanvasPluginPermissionPromptOption, type CanvasPluginPromptMode, type CanvasPluginSandboxDecision, type CanvasPluginSandboxDomAccess, type CanvasPluginSandboxKind, type CanvasPluginSandboxMutationAccess, type CanvasPluginSandboxNetworkAccess, type CanvasPluginSandboxOutput, type CanvasPluginSandboxOutputKind, type CanvasPluginSandboxOutputValidation, type CanvasPluginSandboxPolicy, type CanvasPluginSandboxRequest, type CanvasPluginWorkspacePolicy, type CanvasPreviewTier, type CanvasRendererSandboxContribution, type CanvasTemplateCategory, type CanvasTemplateContribution, type CanvasToolContribution, type CanvasToolGroup, CapabilityError, type CommandContext, type CommandContribution, CommandRegistry, type CommandScope, type ConnectorArtifacts, type ConnectorCadence, type ConnectorDefinition, ConnectorDefinitionError, type ConnectorDetection, type ConnectorEnv, type ConnectorFetch, type ConnectorInstallGate, type ConnectorStore, type ConnectorSyncContext, ConnectorSyncError, type ConnectorSyncResult, type ConnectorSyncSpec, type ConnectorTier, type ConnectorToolDescriptor, type ConsentDecision, type ConsentLine, ContributionRegistry, DEFAULT_PLUGIN_LICENSE, type DefinedAction, type DefinedConnector, type DeleteDayOptions, type DeleteDayResult, type DeliveryResult, DependencyCycleError, type DependencyNode, type Disposable$1 as Disposable, ERP_CANVAS_PLUGIN_FIXTURE, EXTERNAL_ITEM_SCHEMA, type EditorContribution, type EditorSchemaRisk, type EmailActionOptions, type ExtensionContext, type ExtensionStorage, FEED_ITEM_SCHEMA, type FeatureModule, type FeedEntry, type FetchJson, type FetchLike, type FlatNode, type FormatHelpers, GITHUB_CONNECTOR_ID, type GeneratedScript, type GithubConnectorOptions, type GuardableConnectorStore, type IProcessManager, type ImporterContribution, type InstallOptions, LEAVE_README, LINEAR_CONNECTOR_ID, type LabRunOutcome, type LadderRuntimeTier, type LanguageModelLike, type LanguageModelMonitor, type LanguageModelSessionLike, type LeaveBundle, type LicenseCheckResult, LicenseRequiredError, type LinearConnectorOptions, type LocalAPIConfig, type LocalAPITokenConfig, type LocalAPITokenScope, type LocalAPITokenSummary, type LocalServerProbe, MARKETPLACE_PROVENANCE, type MCPPropertySchema, type MCPRequest, type MCPResource, type MCPResponse, type MCPServerConfig, type MCPTool, MEDIA_PROVIDER_CANVAS_PLUGIN_FIXTURE, type ManagedBudgetSnapshot, ManagedProvider, type ManagedProviderOptions, MarketplaceClient, type MarketplaceClientOptions, type MarketplaceEntry, type MarketplaceSort, type MathHelpers, type MentionProviderContribution, type MentionSuggestion, MiddlewareChain, type MissingDependency, type ModuleCapabilities, NOTION_CONNECTOR_ID, type NodeChangeEvent, type NodeChangeEventData, type NodeData, type NodeStoreAPI, type NodeStoreMiddleware, type NotionConnectorOptions, OllamaProvider, OpenAICompatibleProvider, type OpenAICompatibleProviderOptions, OpenAIProvider, type PendingChange, type Platform, type PlatformCapabilities, type PluginContributions, PluginError, type PluginNode, type PluginNodeChangeEvent, type PluginNodeChangeListener, type PluginPermissions, type PluginPricing, type PluginRating, PluginRegistry, type PluginRunInput, type PluginRunResult, PluginRuntimeError, type PluginRuntimeLadder, PluginSchema, type PluginStatus, PluginValidationError, type ProcessManagerEvents, type PromptApiAvailability, PromptApiProvider, type PromptApiProviderOptions, type PropertyCellProps, type PropertyEditorProps, type PropertyHandler, type PropertyHandlerContribution, type Provenance, type ProvenanceResult, type ProvenanceVerifier, type QueryFilter, RSS_CONNECTOR_ID, type RatingSummary, type RecommendOptions, type RegisteredPlugin, type ResolveMentionOptions, type RightToLeavePorts, type RssConnectorOptions, type RunActionPorts, type RunConnectorSyncPorts, type RunPluginCodeInput, SCAFFOLD_SYSTEM_GUARD, SERVICE_IPC_CHANNELS, SLACK_CONNECTOR_ID, type SandboxOptions, ScaffoldError, type ScaffoldResult, type ScaffoldSpec, type ScaffoldTemplate, type SchemaContribution, type SchemaData, type SchemaDefinition, type SchemaProperty, type SchemaRegistryAPI, type ScriptContext, ScriptError, type ScriptExecutionResult, type ScriptExecutor, ScriptGenerationError, ScriptGenerator, type ScriptGeneratorOptions, type ScriptNode, type ScriptNodeChangeEvent, type ScriptOutputType, ScriptRunner, type ScriptRunnerOptions, ScriptSandbox, ScriptSchema, type ScriptStore, ScriptTimeoutError, type ScriptToManifestInput, type ScriptTriggerType, ScriptValidationError, type SemVer, type ServiceClient, type ServiceCommunication, type ServiceDefinition, type ServiceHealthCheck, type ServiceLifecycle, type ServiceOutputEvent, type ServiceProcessConfig, type ServiceProvides, type ServiceState, type ServiceStatus, type ServiceStatusEvent, type SettingContribution, type SettingsPanelProps, ShortcutManager, type SidebarContribution, type SlackConnectorOptions, type SlashCommandContext, type SlashCommandContribution, type StatusBarContribution, type SurfaceDockContribution, type SurfaceDockTier, type TelemetryReporter, type TestHarnessOptions, type TestNodeStore, type TestPluginHarness, type TextHelpers, type ToolCallingFidelity, type ToolbarContribution, TypedRegistry, type UsageSignal, type ValidationResult, type VerifyProvenanceInput, type ViewContribution, type ViewProps, type WebLLMEngineLike, WebLLMProvider, type WebLLMProviderOptions, type WebhookConfig, WebhookEmitter, type WebhookOutOptions, type WebhookPayload, type WidgetContribution, type WidgetContributionConfigField, type WidgetContributionProps, type WorkspaceCommand, type WrapCliConnectorOptions, type WriteMode, XNET_MARKDOWN_DIRECTIVE_SPECS, type XNetExtension, type XNetMarkdownDiffLine, type XNetMarkdownDiffLineKind, type XNetMarkdownDirective, type XNetMarkdownDirectiveSpec, type XNetMarkdownReviewDiff, type XNetPageMarkdownFrontmatter, type XNetPageMarkdownValidation, type XNetPageMarkdownValidationOptions, agentToolToExtraTool, agentToolsAsExtraTools, aggregateRatings, assertNetwork, assertPublicUrl, assertSchemaWrite, assistTurnProvenance, attachAiPlanValidation, buildAirtableConnector, buildDiscordAction, buildEmailAction, buildGithubConnector, buildLinearConnector, buildNotionConnector, buildRetryPrompt, buildRssConnector, buildScriptPrompt, buildSlackConnector, buildSlackWebhookAction, buildTelegramAction, buildWebhookOutAction, classifyAiAgentDisplayState, compareVersions, composeAssistSystemPrompt, connectorAsImporter, connectorMarketplaceEntry, contributionsAsAiTools, createAIProvider, createAIProviderRouter, createAiAgentRuntime, createAiChangeSet, createAiOperation, createAiSurfaceService, createAiValidationResult, createCanvasErpPrototypeRiskSummary, createCanvasErpPrototypeScenario, createCanvasPluginFixtureCards, createCanvasPluginFixtureManifests, createCanvasPluginPermissionPrompt, createCanvasPluginSandboxPolicy, createCanvasPreviewSandboxRequest, createCanvasRendererSandboxRequest, createExtensionContext, createExtensionStorage, createManagedProvider, createMemoryAiAgentRuntimeStorage, createPromptApiProvider, createScriptContext, createServiceClient, createTestNodeStore, createTestPluginHarness, createWebLLMProvider, createWebhookEmitter, defaultLocalServerProbes, defineAction, defineConnector, defineExtension, defineFeatureModule, deleteDay, describeCapabilities, detectConnectors, downloadPromptApiModel, emitConnectorArtifacts, evaluateCanvasPluginPermissionGate, evaluateCanvasPluginSandboxRequest, evaluateConnectorInstall, evaluateInstallConsent, executeScript, failClosedVerifier, filterByCategory, findEditorSchemaRisks, findMissingDependencies, generateScript, getCanvasErpPrototypeAuditEntriesForCard, getCanvasErpPrototypeCardsForFrame, getCanvasPluginFixture, getCommandRegistry, getPlatformCapabilities, getShortcutManager, getXNetMarkdownDirectiveSpecs, guardStore, guardedActionFetch, guardedFetch, hasUpdate, importerAdapters, installCommandHandler, installShortcutHandler, isAiRiskLevel, isAiScope, isAiTargetKind, isAllowedPluginLicense, isHostCompatible, isNetworkAllowed, isOllamaAvailable, isPaidPricing, isSchemaDefiningExtension, isSchemaReadAllowed, isSchemaWriteAllowed, isScriptNode, isServiceClientAvailable, ladderTierForTrust, leaveWithEverything, listOllamaModels, matchSchemaIri, normalizeCanvasPluginWorkspacePolicy, packageName, parseAiMutationPlan, parseFeed, parseVersion, parseXNetPageFrontmatter, pascalCase, pickBestConnector, pluginLicenseText, probeOpenAiCompatible, promptApiAvailability, quickSafetyCheck, recommendExtensions, renderEvent, renderMarkdownLineDiff, renderMarkdownReviewDiff, renderSelectionPrompt, resolveImporters, resolveInstallOrder, resolveMentionProviders, runAction, runAiPluginPipeline, runConnectorSync, runPluginCode, satisfiesRange, scaffoldPlugin, scriptToPluginManifest, searchMarketplace, serializeAiMutationPlan, shortSchemaName, shouldDispatch, sortMarketplace, stripXNetPageFrontmatter, summarizeProvenance, validateAiMutationPlan, validateCanvasPluginSandboxOutput, validateManifest, validateScript, validateScriptAST, validateXNetPageMarkdown, verifyProvenance, warnOnEditorSchemaRisks, wrapCliConnector, writeModeFor };
|
|
6036
|
+
export { type AIComplexityLevel, type AICostModel, type AIGenerateRequest, type AIGenerateResponse, AIGenerationError, type AIMessage, type AIMessageRole, type AIModelCapabilities, type AIModelQuality, type AIPrivacyLevel, type AIProvider, type AIProviderConfig, type AIProviderOptions, AIProviderRouter, type AIProviderRouterOptions, type AIProviderType, type AIProviderUsage, AIRTABLE_CONNECTOR_ID, type AIRiskLevel, type AIScriptRequest, type AIScriptResponse, type AIStreamChunk, type AIToolCall, type AIToolSpec, type AIUsage, AI_GENERATED_PROVENANCE, AI_RISK_LEVELS, AI_SCOPES, AI_TARGET_KINDS, ALLOWED_PLUGIN_LICENSES, type ActionContext, type ActionDefinition, ActionDefinitionError, ActionDispatchError, type ActionEvent, ActionSsrfError, type ActionTrigger, type AgentToolContribution, type AgentToolInputSchema, type AiAgentApproval, type AiAgentApprovalRequestInput, type AiAgentApprovalResolveInput, type AiAgentApprovalStatus, type AiAgentBackgroundJob, type AiAgentBackgroundJobInput, type AiAgentBackgroundJobRunner, type AiAgentBackgroundJobStatus, type AiAgentDisplayState, type AiAgentDisplayStateKind, type AiAgentEvent, type AiAgentEventType, type AiAgentOrchestratorMode, type AiAgentRunSelectionTurnInput, type AiAgentRunTurnInput, type AiAgentRunTurnResult, AiAgentRuntime, type AiAgentRuntimeConfig, type AiAgentRuntimeListener, type AiAgentRuntimeSnapshot, type AiAgentRuntimeStorage, type AiAgentSelectionContext, type AiAgentSelectionKind, type AiAgentTelemetrySnapshot, type AiAgentThread, type AiAgentThreadCreateInput, type AiAgentThreadStatus, type AiAgentTurn, type AiAgentTurnRole, type AiAgentTurnStatus, type AiAssistMode, type AiAuditEvent, type AiAuthoredPlugin, AiAuthoringError, AiBudgetError, type AiCallableTool, type AiChangeSet, type AiCommandExposure, type AiContextPack, type AiContextPackResource, type AiContextRetriever, type AiContextSeed, type AiDatabaseMutationApplyResult, type AiExtraTool, type AiJsonSchema, type AiJsonSchemaType, type AiMutationPlan, type AiMutationPlanStatus, type AiOperation, type AiPageMarkdownApplyAdapter, type AiPageMarkdownApplyAdapterInput, type AiPageMarkdownApplyAdapterResult, type AiPageMarkdownApplyResult, type AiPageMarkdownRollbackResult, type AiPluginPipelineInput, type AiPluginPipelinePorts, type AiPluginPipelineResult, type AiResource, type AiResourceContent, type AiRetrievedNode, type AiRiskLevel, type AiScope, type AiSearchOptions, type AiSearchResult, type AiSurfaceLimits, AiSurfaceService, type AiSurfaceServiceConfig, type AiTargetKind, type AiToolCallResult, type AiToolDefinition, type AiValidationResult, type AirtableConnectorOptions, type AllowedPluginLicense, AnthropicProvider, type ArrayHelpers, type BlockContribution, type BlockProps, CANVAS_PLUGIN_FIXTURES, CHANNEL_SCHEMA, CHAT_MESSAGE_SCHEMA, CONNECTOR_CATEGORY, CONNECTOR_META, CRM_CANVAS_PLUGIN_FIXTURE, type CanvasCardContribution, type CanvasContribution, type CanvasContributionBase, type CanvasContributionPermission, type CanvasEdgeContribution, type CanvasErpPrototypeAuditEntry, type CanvasErpPrototypeAuditOperation, type CanvasErpPrototypeAuditSource, type CanvasErpPrototypeCard, type CanvasErpPrototypeCommand, type CanvasErpPrototypeEdge, type CanvasErpPrototypeEntityKind, type CanvasErpPrototypeLayoutKind, type CanvasErpPrototypeQueryFrame, type CanvasErpPrototypeQueryPredicate, type CanvasErpPrototypeRect, type CanvasErpPrototypeRisk, type CanvasErpPrototypeRiskSummary, type CanvasErpPrototypeScenario, type CanvasErpPrototypeStatus, type CanvasIngestInputKind, type CanvasIngestorContribution, type CanvasInspectorContribution, type CanvasInspectorPlacement, type CanvasLayoutContribution, type CanvasLayoutScope, type CanvasPluginFixture, type CanvasPluginFixtureCardSample, type CanvasPluginFixtureKind, type CanvasPluginPermissionDecisionStatus, type CanvasPluginPermissionGateDecision, type CanvasPluginPermissionGateInput, type CanvasPluginPermissionPrompt, type CanvasPluginPermissionPromptOption, type CanvasPluginPromptMode, type CanvasPluginSandboxDecision, type CanvasPluginSandboxDomAccess, type CanvasPluginSandboxKind, type CanvasPluginSandboxMutationAccess, type CanvasPluginSandboxNetworkAccess, type CanvasPluginSandboxOutput, type CanvasPluginSandboxOutputKind, type CanvasPluginSandboxOutputValidation, type CanvasPluginSandboxPolicy, type CanvasPluginSandboxRequest, type CanvasPluginWorkspacePolicy, type CanvasPreviewTier, type CanvasRendererSandboxContribution, type CanvasTemplateCategory, type CanvasTemplateContribution, type CanvasToolContribution, type CanvasToolGroup, CapabilityError, type ChromePosture, type CommandContext, type CommandContribution, CommandRegistry, type CommandScope, type ConnectorArtifacts, type ConnectorCadence, type ConnectorDefinition, ConnectorDefinitionError, type ConnectorDetection, type ConnectorEnv, type ConnectorFetch, type ConnectorInstallGate, type ConnectorStore, type ConnectorSyncContext, ConnectorSyncError, type ConnectorSyncResult, type ConnectorSyncSpec, type ConnectorTier, type ConnectorToolDescriptor, type ConsentDecision, type ConsentLine, ContributionRegistry, DEFAULT_PLUGIN_LICENSE, type DefinedAction, type DefinedConnector, type DeleteDayOptions, type DeleteDayResult, type DeliveryResult, DependencyCycleError, type DependencyNode, type Disposable$1 as Disposable, ERP_CANVAS_PLUGIN_FIXTURE, EXTERNAL_ITEM_SCHEMA, type EditorContribution, type EditorSchemaRisk, type EmailActionOptions, type ExtensionContext, type ExtensionStorage, FEED_ITEM_SCHEMA, type FeatureModule, type FeedEntry, type FetchJson, type FetchLike, type FlatNode, type FormatHelpers, GITHUB_CONNECTOR_ID, GOOGLE_CALENDAR_CONNECTOR_ID, type GeneratedScript, type GithubConnectorOptions, type GuardableConnectorStore, type IProcessManager, type ImporterContribution, type InstallOptions, LEAVE_README, LINEAR_CONNECTOR_ID, type LabRunOutcome, type LadderRuntimeTier, type LanguageModelLike, type LanguageModelMonitor, type LanguageModelSessionLike, type LayoutTree, type LeaveBundle, type LicenseCheckResult, LicenseRequiredError, type LinearConnectorOptions, type LocalAPIConfig, type LocalAPITokenConfig, type LocalAPITokenScope, type LocalAPITokenSummary, type LocalServerProbe, MARKETPLACE_PROVENANCE, type MCPPropertySchema, type MCPRequest, type MCPResource, type MCPResponse, type MCPServerConfig, type MCPTool, MEDIA_PROVIDER_CANVAS_PLUGIN_FIXTURE, type ManagedBudgetSnapshot, ManagedProvider, type ManagedProviderOptions, MarketplaceClient, type MarketplaceClientOptions, type MarketplaceEntry, type MarketplaceSort, type MathHelpers, type MentionProviderContribution, type MentionSuggestion, MiddlewareChain, type MissingDependency, type ModuleCapabilities, NOTION_CONNECTOR_ID, type NodeChangeEvent, type NodeChangeEventData, type NodeData, type NodeStoreAPI, type NodeStoreMiddleware, type NotionConnectorOptions, OllamaProvider, OpenAICompatibleProvider, type OpenAICompatibleProviderOptions, OpenAIProvider, PRESET_IDS, PRESET_WORKSPACE_ID_PREFIX, type PendingChange, type Platform, type PlatformCapabilities, type PluginContributions, PluginError, type PluginNode, type PluginNodeChangeEvent, type PluginNodeChangeListener, type PluginPermissions, type PluginPricing, type PluginRating, PluginRegistry, type PluginRunInput, type PluginRunResult, PluginRuntimeError, type PluginRuntimeLadder, PluginSchema, type PluginStatus, PluginValidationError, type PresetId, type ProcessManagerEvents, type PromptApiAvailability, PromptApiProvider, type PromptApiProviderOptions, type PropertyCellProps, type PropertyEditorProps, type PropertyHandler, type PropertyHandlerContribution, type Provenance, type ProvenanceResult, type ProvenanceVerifier, type QueryFilter, REGION_IDS, RSS_CONNECTOR_ID, type RatingSummary, type RecommendOptions, type RegionId, type RegisteredPlugin, type ResolveMentionOptions, type RightToLeavePorts, type RssConnectorOptions, type RunActionPorts, type RunConnectorSyncPorts, type RunPluginCodeInput, SCAFFOLD_SYSTEM_GUARD, SERVICE_IPC_CHANNELS, SLACK_CONNECTOR_ID, type SandboxOptions, ScaffoldError, type ScaffoldResult, type ScaffoldSpec, type ScaffoldTemplate, type SchemaContribution, type SchemaData, type SchemaDefinition, type SchemaProperty, type SchemaRegistryAPI, type ScriptContext, ScriptError, type ScriptExecutionResult, type ScriptExecutor, ScriptGenerationError, ScriptGenerator, type ScriptGeneratorOptions, type ScriptNode, type ScriptNodeChangeEvent, type ScriptOutputType, ScriptRunner, type ScriptRunnerOptions, ScriptSandbox, ScriptSchema, type ScriptStore, ScriptTimeoutError, type ScriptToManifestInput, type ScriptTriggerType, ScriptValidationError, type SemVer, type ServiceClient, type ServiceCommunication, type ServiceDefinition, type ServiceHealthCheck, type ServiceLifecycle, type ServiceOutputEvent, type ServiceProcessConfig, type ServiceProvides, type ServiceState, type ServiceStatus, type ServiceStatusEvent, type SettingContribution, type SettingsPanelProps, ShortcutManager, type SidebarContribution, type SlackConnectorOptions, type SlashCommandContext, type SlashCommandContribution, type SlotContribution, type SlotPlacement, type SlotRegion, type SlotTier, type StatusBarContribution, type SurfaceDockContribution, type SurfaceDockTier, type TelemetryReporter, type TestHarnessOptions, type TestNodeStore, type TestPluginHarness, type TextHelpers, type ToolCallingFidelity, type ToolbarContribution, TypedRegistry, type UsageSignal, type ValidationResult, type VerifyProvenanceInput, type ViewContribution, type ViewProps, type WebLLMEngineLike, WebLLMProvider, type WebLLMProviderOptions, type WebhookConfig, WebhookEmitter, type WebhookOutOptions, type WebhookPayload, type WidgetContribution, type WidgetContributionConfigField, type WidgetContributionProps, type WorkspaceCommand, type WorkspacePayload, type WrapCliConnectorOptions, type WriteMode, XNET_MARKDOWN_DIRECTIVE_SPECS, type XNetExtension, type XNetMarkdownDiffLine, type XNetMarkdownDiffLineKind, type XNetMarkdownDirective, type XNetMarkdownDirectiveSpec, type XNetMarkdownReviewDiff, type XNetPageMarkdownFrontmatter, type XNetPageMarkdownValidation, type XNetPageMarkdownValidationOptions, agentToolToExtraTool, agentToolsAsExtraTools, aggregateRatings, assertNetwork, assertPublicUrl, assertSchemaWrite, assertSystemAudio, assistTurnProvenance, attachAiPlanValidation, buildAirtableConnector, buildDiscordAction, buildEmailAction, buildGithubConnector, buildGoogleCalendarConnector, buildLinearConnector, buildNotionConnector, buildRetryPrompt, buildRssConnector, buildScriptPrompt, buildSlackConnector, buildSlackWebhookAction, buildTelegramAction, buildWebhookOutAction, classifyAiAgentDisplayState, compareVersions, composeAssistSystemPrompt, connectorAsImporter, connectorMarketplaceEntry, contributionsAsAiTools, createAIProvider, createAIProviderRouter, createAiAgentRuntime, createAiChangeSet, createAiOperation, createAiSurfaceService, createAiValidationResult, createCanvasErpPrototypeRiskSummary, createCanvasErpPrototypeScenario, createCanvasPluginFixtureCards, createCanvasPluginFixtureManifests, createCanvasPluginPermissionPrompt, createCanvasPluginSandboxPolicy, createCanvasPreviewSandboxRequest, createCanvasRendererSandboxRequest, createExtensionContext, createExtensionStorage, createManagedProvider, createMemoryAiAgentRuntimeStorage, createPresetTree, createPromptApiProvider, createScriptContext, createServiceClient, createTestNodeStore, createTestPluginHarness, createWebLLMProvider, createWebhookEmitter, defaultLocalServerProbes, defineAction, defineConnector, defineExtension, defineFeatureModule, deleteDay, describeCapabilities, detectConnectors, detectUpcomingMeeting, downloadPromptApiModel, emitConnectorArtifacts, evaluateCanvasPluginPermissionGate, evaluateCanvasPluginSandboxRequest, evaluateConnectorInstall, evaluateInstallConsent, executeScript, failClosedVerifier, filterByCategory, findEditorSchemaRisks, findMissingDependencies, generateScript, getCanvasErpPrototypeAuditEntriesForCard, getCanvasErpPrototypeCardsForFrame, getCanvasPluginFixture, getCommandRegistry, getPlatformCapabilities, getShortcutManager, getXNetMarkdownDirectiveSpecs, guardStore, guardedActionFetch, guardedFetch, hasUpdate, importerAdapters, installCommandHandler, installShortcutHandler, isAiRiskLevel, isAiScope, isAiTargetKind, isAllowedPluginLicense, isHostCompatible, isNetworkAllowed, isOllamaAvailable, isPaidPricing, isPresetWorkspaceId, isSchemaDefiningExtension, isSchemaReadAllowed, isSchemaWriteAllowed, isScriptNode, isServiceClientAvailable, isSystemAudioAllowed, ladderTierForTrust, leaveWithEverything, listOllamaModels, matchSchemaIri, moveSlot, normalizeCanvasPluginWorkspacePolicy, packageName, parseAiMutationPlan, parseFeed, parseVersion, parseWorkspacePayload, parseXNetPageFrontmatter, pascalCase, pickBestConnector, placementOf, pluginLicenseText, presetForWorkspaceId, presetWorkspaceId, probeOpenAiCompatible, promptApiAvailability, quickSafetyCheck, recommendExtensions, regionOf, renderEvent, renderMarkdownLineDiff, renderMarkdownReviewDiff, renderSelectionPrompt, resolveImporters, resolveInstallOrder, resolveMentionProviders, runAction, runAiPluginPipeline, runConnectorSync, runPluginCode, satisfiesRange, scaffoldPlugin, scriptToPluginManifest, searchMarketplace, serializeAiMutationPlan, serializeWorkspacePayload, setSlotTier, shortSchemaName, shouldDispatch, slotsIn, sortMarketplace, stripXNetPageFrontmatter, summarizeProvenance, validateAiMutationPlan, validateCanvasPluginSandboxOutput, validateManifest, validateScript, validateScriptAST, validateXNetPageMarkdown, verifyProvenance, warnOnEditorSchemaRisks, wrapCliConnector, writeModeFor };
|
package/dist/index.js
CHANGED
|
@@ -516,7 +516,11 @@ var ContributionRegistry = class {
|
|
|
516
516
|
importers = new TypedRegistry();
|
|
517
517
|
mentionProviders = new TypedRegistry();
|
|
518
518
|
agentTools = new TypedRegistry();
|
|
519
|
-
|
|
519
|
+
slots = new TypedRegistry();
|
|
520
|
+
/** @deprecated Since 0280 — the dock registry is the slot registry. */
|
|
521
|
+
get surfaceDock() {
|
|
522
|
+
return this.slots;
|
|
523
|
+
}
|
|
520
524
|
/**
|
|
521
525
|
* Clear all registries (for cleanup/testing)
|
|
522
526
|
*/
|
|
@@ -541,10 +545,201 @@ var ContributionRegistry = class {
|
|
|
541
545
|
this.importers.clear();
|
|
542
546
|
this.mentionProviders.clear();
|
|
543
547
|
this.agentTools.clear();
|
|
544
|
-
this.
|
|
548
|
+
this.slots.clear();
|
|
545
549
|
}
|
|
546
550
|
};
|
|
547
551
|
|
|
552
|
+
// src/workspace/layout-tree.ts
|
|
553
|
+
var REGION_IDS = [
|
|
554
|
+
"surface",
|
|
555
|
+
"rail",
|
|
556
|
+
"status",
|
|
557
|
+
"dock.left",
|
|
558
|
+
"dock.right",
|
|
559
|
+
"dock.bottom",
|
|
560
|
+
"dock.corner"
|
|
561
|
+
];
|
|
562
|
+
var PRESET_IDS = ["quiet", "calm", "bench"];
|
|
563
|
+
var PRESET_WORKSPACE_ID_PREFIX = "workspace-preset-";
|
|
564
|
+
function presetWorkspaceId(preset) {
|
|
565
|
+
return `${PRESET_WORKSPACE_ID_PREFIX}${preset}`;
|
|
566
|
+
}
|
|
567
|
+
function isPresetWorkspaceId(workspaceId) {
|
|
568
|
+
return presetForWorkspaceId(workspaceId) !== null;
|
|
569
|
+
}
|
|
570
|
+
function presetForWorkspaceId(workspaceId) {
|
|
571
|
+
if (!workspaceId.startsWith(PRESET_WORKSPACE_ID_PREFIX)) return null;
|
|
572
|
+
const rest = workspaceId.slice(PRESET_WORKSPACE_ID_PREFIX.length);
|
|
573
|
+
return PRESET_IDS.includes(rest) ? rest : null;
|
|
574
|
+
}
|
|
575
|
+
function place(viewId, tier, order) {
|
|
576
|
+
return { viewId, tier, order };
|
|
577
|
+
}
|
|
578
|
+
function emptyRegions() {
|
|
579
|
+
return {
|
|
580
|
+
surface: [],
|
|
581
|
+
rail: [],
|
|
582
|
+
status: [],
|
|
583
|
+
"dock.left": [],
|
|
584
|
+
"dock.right": [],
|
|
585
|
+
"dock.bottom": [],
|
|
586
|
+
"dock.corner": []
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function cornerResidents() {
|
|
590
|
+
return [
|
|
591
|
+
place("shelf", "summoned", 0),
|
|
592
|
+
place("capture", "summoned", 1),
|
|
593
|
+
place("notifications", "summoned", 2),
|
|
594
|
+
place("sync", "summoned", 3),
|
|
595
|
+
place("console", "summoned", 4)
|
|
596
|
+
];
|
|
597
|
+
}
|
|
598
|
+
function createPresetTree(preset) {
|
|
599
|
+
const regions = emptyRegions();
|
|
600
|
+
switch (preset) {
|
|
601
|
+
case "quiet":
|
|
602
|
+
regions.rail = [place("modes", "summoned", 0)];
|
|
603
|
+
regions["dock.left"] = [place("navigator", "summoned", 0)];
|
|
604
|
+
regions["dock.right"] = [place("context", "summoned", 0)];
|
|
605
|
+
regions["dock.corner"] = cornerResidents();
|
|
606
|
+
return {
|
|
607
|
+
workspaceId: presetWorkspaceId("quiet"),
|
|
608
|
+
regions,
|
|
609
|
+
surface: { tabsEnabled: false },
|
|
610
|
+
chrome: "quiet"
|
|
611
|
+
};
|
|
612
|
+
case "calm":
|
|
613
|
+
regions.rail = [place("modes", "pinned", 0)];
|
|
614
|
+
regions["dock.left"] = [place("navigator", "pinned", 0)];
|
|
615
|
+
regions["dock.right"] = [place("context", "summoned", 0)];
|
|
616
|
+
regions["dock.corner"] = cornerResidents();
|
|
617
|
+
return {
|
|
618
|
+
workspaceId: presetWorkspaceId("calm"),
|
|
619
|
+
regions,
|
|
620
|
+
surface: { tabsEnabled: false },
|
|
621
|
+
chrome: "pinned"
|
|
622
|
+
};
|
|
623
|
+
case "bench":
|
|
624
|
+
regions.rail = [place("rail", "pinned", 0)];
|
|
625
|
+
regions.status = [place("status", "pinned", 0)];
|
|
626
|
+
regions["dock.left"] = [
|
|
627
|
+
place("explorer", "pinned", 0),
|
|
628
|
+
place("chats", "summoned", 1),
|
|
629
|
+
place("tasks", "summoned", 2),
|
|
630
|
+
place("today", "summoned", 3),
|
|
631
|
+
place("data", "summoned", 4),
|
|
632
|
+
place("ai-chat", "summoned", 5)
|
|
633
|
+
];
|
|
634
|
+
regions["dock.right"] = [place("context", "summoned", 0)];
|
|
635
|
+
regions["dock.bottom"] = [
|
|
636
|
+
place("shelf", "summoned", 0),
|
|
637
|
+
place("capture", "summoned", 1),
|
|
638
|
+
place("notifications", "summoned", 2),
|
|
639
|
+
place("sync", "summoned", 3),
|
|
640
|
+
place("console", "summoned", 4)
|
|
641
|
+
];
|
|
642
|
+
regions["dock.corner"] = [];
|
|
643
|
+
return {
|
|
644
|
+
workspaceId: presetWorkspaceId("bench"),
|
|
645
|
+
regions,
|
|
646
|
+
surface: { tabsEnabled: true },
|
|
647
|
+
chrome: "pinned"
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
function cloneRegions(regions) {
|
|
652
|
+
return Object.fromEntries(
|
|
653
|
+
Object.entries(regions).map(([region, placements]) => [
|
|
654
|
+
region,
|
|
655
|
+
placements.map((placement) => ({ ...placement }))
|
|
656
|
+
])
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
function regionOf(tree, viewId) {
|
|
660
|
+
for (const region of REGION_IDS) {
|
|
661
|
+
if (tree.regions[region].some((placement) => placement.viewId === viewId)) return region;
|
|
662
|
+
}
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
function placementOf(tree, viewId) {
|
|
666
|
+
const region = regionOf(tree, viewId);
|
|
667
|
+
if (!region) return null;
|
|
668
|
+
return tree.regions[region].find((placement) => placement.viewId === viewId) ?? null;
|
|
669
|
+
}
|
|
670
|
+
function renumber(placements) {
|
|
671
|
+
return [...placements].sort((a, b) => a.order - b.order).map((placement, index) => ({ ...placement, order: index }));
|
|
672
|
+
}
|
|
673
|
+
function moveSlot(tree, viewId, to) {
|
|
674
|
+
const from = regionOf(tree, viewId);
|
|
675
|
+
if (!from || from === to) return tree;
|
|
676
|
+
const placement = tree.regions[from].find((entry) => entry.viewId === viewId);
|
|
677
|
+
if (!placement) return tree;
|
|
678
|
+
const regions = cloneRegions(tree.regions);
|
|
679
|
+
regions[from] = renumber(regions[from].filter((entry) => entry.viewId !== viewId));
|
|
680
|
+
regions[to] = renumber([...regions[to], { ...placement, order: Number.MAX_SAFE_INTEGER }]);
|
|
681
|
+
return { ...tree, regions };
|
|
682
|
+
}
|
|
683
|
+
function setSlotTier(tree, viewId, tier) {
|
|
684
|
+
const region = regionOf(tree, viewId);
|
|
685
|
+
if (!region) return tree;
|
|
686
|
+
const current = tree.regions[region].find((entry) => entry.viewId === viewId);
|
|
687
|
+
if (!current || current.tier === tier) return tree;
|
|
688
|
+
const regions = cloneRegions(tree.regions);
|
|
689
|
+
regions[region] = regions[region].map(
|
|
690
|
+
(entry) => entry.viewId === viewId ? { ...entry, tier } : entry
|
|
691
|
+
);
|
|
692
|
+
return { ...tree, regions };
|
|
693
|
+
}
|
|
694
|
+
function slotsIn(tree, region, tier) {
|
|
695
|
+
const placements = [...tree.regions[region]].sort((a, b) => a.order - b.order);
|
|
696
|
+
return tier ? placements.filter((placement) => placement.tier === tier) : placements;
|
|
697
|
+
}
|
|
698
|
+
var TIERS = ["pinned", "summoned", "hidden"];
|
|
699
|
+
function isPlacement(value) {
|
|
700
|
+
if (typeof value !== "object" || value === null) return false;
|
|
701
|
+
const p = value;
|
|
702
|
+
return typeof p.viewId === "string" && typeof p.order === "number" && TIERS.includes(p.tier);
|
|
703
|
+
}
|
|
704
|
+
function parseWorkspacePayload(value) {
|
|
705
|
+
if (typeof value !== "object" || value === null) return null;
|
|
706
|
+
const payload = value;
|
|
707
|
+
if (typeof payload.name !== "string") return null;
|
|
708
|
+
const rawTree = payload.tree;
|
|
709
|
+
if (typeof rawTree !== "object" || rawTree === null) return null;
|
|
710
|
+
if (typeof rawTree.workspaceId !== "string") return null;
|
|
711
|
+
const chrome = rawTree.chrome === "quiet" ? "quiet" : "pinned";
|
|
712
|
+
const rawSurface = rawTree.surface;
|
|
713
|
+
const tabsEnabled = rawSurface?.tabsEnabled === true;
|
|
714
|
+
const regions = emptyRegions();
|
|
715
|
+
const rawRegions = rawTree.regions;
|
|
716
|
+
if (typeof rawRegions === "object" && rawRegions !== null) {
|
|
717
|
+
for (const region of REGION_IDS) {
|
|
718
|
+
const entries = rawRegions[region];
|
|
719
|
+
if (!Array.isArray(entries)) continue;
|
|
720
|
+
regions[region] = renumber(entries.filter(isPlacement));
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
const preset = PRESET_IDS.includes(payload.preset) ? payload.preset : null;
|
|
724
|
+
return {
|
|
725
|
+
name: payload.name,
|
|
726
|
+
preset,
|
|
727
|
+
tree: { workspaceId: rawTree.workspaceId, regions, surface: { tabsEnabled }, chrome }
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
function serializeWorkspacePayload(payload) {
|
|
731
|
+
return {
|
|
732
|
+
name: payload.name,
|
|
733
|
+
preset: payload.preset,
|
|
734
|
+
tree: {
|
|
735
|
+
workspaceId: payload.tree.workspaceId,
|
|
736
|
+
regions: cloneRegions(payload.tree.regions),
|
|
737
|
+
surface: { tabsEnabled: payload.tree.surface.tabsEnabled },
|
|
738
|
+
chrome: payload.tree.chrome
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
|
|
548
743
|
// src/feature-module.ts
|
|
549
744
|
function defineFeatureModule(module) {
|
|
550
745
|
return module;
|
|
@@ -1838,6 +2033,19 @@ function isNetworkAllowed(caps, urlOrHost) {
|
|
|
1838
2033
|
return host === a;
|
|
1839
2034
|
});
|
|
1840
2035
|
}
|
|
2036
|
+
function isSystemAudioAllowed(caps) {
|
|
2037
|
+
return caps?.systemAudio === true;
|
|
2038
|
+
}
|
|
2039
|
+
function assertSystemAudio(caps, pluginId) {
|
|
2040
|
+
if (!isSystemAudioAllowed(caps)) {
|
|
2041
|
+
throw new CapabilityError(
|
|
2042
|
+
`Plugin '${pluginId}' lacks systemAudio capability`,
|
|
2043
|
+
pluginId,
|
|
2044
|
+
"systemAudio",
|
|
2045
|
+
"system-audio"
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
1841
2049
|
function assertSchemaWrite(caps, iri, pluginId) {
|
|
1842
2050
|
if (!isSchemaWriteAllowed(caps, iri)) {
|
|
1843
2051
|
throw new CapabilityError(
|
|
@@ -2165,6 +2373,9 @@ function describeCapabilities(caps) {
|
|
|
2165
2373
|
for (const endowment of caps.endowments ?? []) {
|
|
2166
2374
|
lines.push({ icon: "plug", text: `Use host API: ${endowment}`, danger: false });
|
|
2167
2375
|
}
|
|
2376
|
+
if (caps.systemAudio) {
|
|
2377
|
+
lines.push({ icon: "plug", text: "Capture system audio during meetings", danger: true });
|
|
2378
|
+
}
|
|
2168
2379
|
return lines;
|
|
2169
2380
|
}
|
|
2170
2381
|
function evaluateInstallConsent(provenance, caps) {
|
|
@@ -2490,6 +2701,80 @@ function buildRssConnector(options) {
|
|
|
2490
2701
|
});
|
|
2491
2702
|
}
|
|
2492
2703
|
|
|
2704
|
+
// src/connectors/calendar.ts
|
|
2705
|
+
var GOOGLE_CALENDAR_CONNECTOR_ID = "dev.xnet.connector.google-calendar";
|
|
2706
|
+
var MEETING_SCHEMA = "xnet://xnet.fyi/Meeting@1.0.0";
|
|
2707
|
+
var LOOKAHEAD_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
2708
|
+
var MAX_EVENTS = 250;
|
|
2709
|
+
function attendeeNames(event) {
|
|
2710
|
+
return (event.attendees ?? []).filter((a) => !a.self).map((a) => a.displayName || a.email || "").filter((name) => name.length > 0);
|
|
2711
|
+
}
|
|
2712
|
+
var eventStartMs = (event) => {
|
|
2713
|
+
const raw = event.start?.dateTime ?? event.start?.date;
|
|
2714
|
+
if (!raw) return void 0;
|
|
2715
|
+
const parsed = Date.parse(raw);
|
|
2716
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
2717
|
+
};
|
|
2718
|
+
function detectUpcomingMeeting(events, now, windowMs = 5 * 60 * 1e3) {
|
|
2719
|
+
return events.filter((e) => e.status !== "cancelled" && eventStartMs(e) !== void 0).sort((a, b) => (eventStartMs(a) ?? 0) - (eventStartMs(b) ?? 0)).find((e) => {
|
|
2720
|
+
const start = eventStartMs(e) ?? 0;
|
|
2721
|
+
return start - now <= windowMs && start - now > -windowMs;
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
function buildGoogleCalendarConnector(options = {}) {
|
|
2725
|
+
const id = options.id ?? GOOGLE_CALENDAR_CONNECTOR_ID;
|
|
2726
|
+
const calendarId = options.calendarId ?? "primary";
|
|
2727
|
+
const now = options.now ?? Date.now;
|
|
2728
|
+
return defineConnector({
|
|
2729
|
+
id,
|
|
2730
|
+
name: "Google Calendar",
|
|
2731
|
+
description: "Detect upcoming meetings from your calendar and pre-create meeting notes with title + attendees.",
|
|
2732
|
+
capabilities: {
|
|
2733
|
+
secrets: ["GOOGLE_CALENDAR_TOKEN"],
|
|
2734
|
+
schemaWrite: [MEETING_SCHEMA],
|
|
2735
|
+
network: ["www.googleapis.com"]
|
|
2736
|
+
},
|
|
2737
|
+
sync: {
|
|
2738
|
+
schemas: [MEETING_SCHEMA],
|
|
2739
|
+
cadence: "hourly",
|
|
2740
|
+
async pull(ctx) {
|
|
2741
|
+
const token = ctx.env.GOOGLE_CALENDAR_TOKEN;
|
|
2742
|
+
if (!token) {
|
|
2743
|
+
throw new Error(`${id}: missing GOOGLE_CALENDAR_TOKEN (hub secret broker)`);
|
|
2744
|
+
}
|
|
2745
|
+
const timeMin = new Date(now()).toISOString();
|
|
2746
|
+
const timeMax = new Date(now() + LOOKAHEAD_MS).toISOString();
|
|
2747
|
+
const url = `https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events?singleEvents=true&orderBy=startTime&maxResults=${MAX_EVENTS}&timeMin=${encodeURIComponent(timeMin)}&timeMax=${encodeURIComponent(timeMax)}`;
|
|
2748
|
+
const response = await ctx.fetch(url, {
|
|
2749
|
+
headers: { Authorization: `Bearer ${token}` }
|
|
2750
|
+
});
|
|
2751
|
+
if (response && response.ok === false) {
|
|
2752
|
+
throw new Error(`${id}: events.list \u2192 HTTP ${response.status}`);
|
|
2753
|
+
}
|
|
2754
|
+
const body = typeof response?.json === "function" ? await response.json() : response;
|
|
2755
|
+
let written = 0;
|
|
2756
|
+
for (const event of body?.items ?? []) {
|
|
2757
|
+
if (!event.id || event.status === "cancelled") continue;
|
|
2758
|
+
const startedAt = eventStartMs(event);
|
|
2759
|
+
const title = event.summary?.trim();
|
|
2760
|
+
if (!title || startedAt === void 0) continue;
|
|
2761
|
+
await ctx.store.create({
|
|
2762
|
+
schemaId: MEETING_SCHEMA,
|
|
2763
|
+
properties: {
|
|
2764
|
+
title,
|
|
2765
|
+
startedAt,
|
|
2766
|
+
calendarEventId: `google:${calendarId}:${event.id}`,
|
|
2767
|
+
attendees: attendeeNames(event)
|
|
2768
|
+
}
|
|
2769
|
+
});
|
|
2770
|
+
written++;
|
|
2771
|
+
}
|
|
2772
|
+
return { written };
|
|
2773
|
+
}
|
|
2774
|
+
}
|
|
2775
|
+
});
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2493
2778
|
// src/connectors/api-connectors.ts
|
|
2494
2779
|
var EXTERNAL_ITEM_SCHEMA = "xnet://xnet.fyi/ExternalItem@1.0.0";
|
|
2495
2780
|
var MAX_PAGES = 20;
|
|
@@ -3224,6 +3509,11 @@ function createExtensionContext(options) {
|
|
|
3224
3509
|
disposables.push(d);
|
|
3225
3510
|
return d;
|
|
3226
3511
|
},
|
|
3512
|
+
registerSlotView(view) {
|
|
3513
|
+
const d = contributions.slots.register(view);
|
|
3514
|
+
disposables.push(d);
|
|
3515
|
+
return d;
|
|
3516
|
+
},
|
|
3227
3517
|
addMiddleware(middleware) {
|
|
3228
3518
|
if (!middlewareChain) {
|
|
3229
3519
|
console.warn(`[Plugin ${pluginId}] Middleware not available on this platform`);
|
|
@@ -3743,6 +4033,11 @@ var PluginRegistry = class {
|
|
|
3743
4033
|
ctx.registerAgentTool(tool);
|
|
3744
4034
|
}
|
|
3745
4035
|
}
|
|
4036
|
+
if (c.slots) {
|
|
4037
|
+
for (const view of c.slots) {
|
|
4038
|
+
ctx.registerSlotView(view);
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
3746
4041
|
}
|
|
3747
4042
|
// ─── Load from Store ───────────────────────────────────────────────────
|
|
3748
4043
|
/**
|
|
@@ -4113,7 +4408,13 @@ var ScaffoldError = class extends Error {
|
|
|
4113
4408
|
}
|
|
4114
4409
|
};
|
|
4115
4410
|
var ID_RE3 = /^[a-z][a-z0-9]*(\.[a-z][a-z0-9-]*)+$/i;
|
|
4116
|
-
var TEMPLATES = [
|
|
4411
|
+
var TEMPLATES = [
|
|
4412
|
+
"client",
|
|
4413
|
+
"two-sided",
|
|
4414
|
+
"ai-script",
|
|
4415
|
+
"connector",
|
|
4416
|
+
"slot-view"
|
|
4417
|
+
];
|
|
4117
4418
|
function validateSpec(spec) {
|
|
4118
4419
|
if (!spec.id || !ID_RE3.test(spec.id)) {
|
|
4119
4420
|
throw new ScaffoldError(`id must be reverse-domain (got: ${JSON.stringify(spec.id)})`);
|
|
@@ -4194,6 +4495,21 @@ var MODULE_BODIES = {
|
|
|
4194
4495
|
}
|
|
4195
4496
|
]
|
|
4196
4497
|
}`,
|
|
4498
|
+
// A dockable shell panel (exploration 0280). Capability-scoped: the default
|
|
4499
|
+
// manifest declares NO network and NO schemas — the essay's consent form
|
|
4500
|
+
// starts empty and every grant is an explicit, visible addition.
|
|
4501
|
+
"slot-view": (s) => ` capabilities: ${JSON.stringify(s.capabilities ?? { network: [] })},
|
|
4502
|
+
contributes: {
|
|
4503
|
+
slots: [
|
|
4504
|
+
{
|
|
4505
|
+
id: '${packageName(s.id)}',
|
|
4506
|
+
label: '${s.name}',
|
|
4507
|
+
tier: 'secondary',
|
|
4508
|
+
defaultRegion: 'dock.corner',
|
|
4509
|
+
component: ${pascalCase(s.id)}Panel
|
|
4510
|
+
}
|
|
4511
|
+
]
|
|
4512
|
+
}`,
|
|
4197
4513
|
"ai-script": (s) => ` contributes: {
|
|
4198
4514
|
commands: [
|
|
4199
4515
|
{
|
|
@@ -4292,9 +4608,17 @@ function indexSource(spec) {
|
|
|
4292
4608
|
pricing: ${JSON.stringify(spec.pricing)},` : "";
|
|
4293
4609
|
const publisher = spec.publisherDid ? `
|
|
4294
4610
|
publisherDid: '${spec.publisherDid}',` : "";
|
|
4611
|
+
const slotPanel = spec.template === "slot-view" ? `import { createElement } from 'react'
|
|
4612
|
+
|
|
4613
|
+
/** The panel body \u2014 replace with your view (createElement keeps it JSX-free). */
|
|
4614
|
+
function ${ctor}Panel() {
|
|
4615
|
+
return createElement('div', { style: { padding: 12 } }, '${spec.name} panel')
|
|
4616
|
+
}
|
|
4617
|
+
|
|
4618
|
+
` : "";
|
|
4295
4619
|
return `import { defineFeatureModule } from '@xnetjs/plugins'
|
|
4296
4620
|
|
|
4297
|
-
export const ${ctor}Module = defineFeatureModule({
|
|
4621
|
+
${slotPanel}export const ${ctor}Module = defineFeatureModule({
|
|
4298
4622
|
id: '${spec.id}',
|
|
4299
4623
|
name: '${spec.name}',
|
|
4300
4624
|
version: '0.1.0',${spec.author ? `
|
|
@@ -12026,6 +12350,7 @@ export {
|
|
|
12026
12350
|
EXTERNAL_ITEM_SCHEMA,
|
|
12027
12351
|
FEED_ITEM_SCHEMA,
|
|
12028
12352
|
GITHUB_CONNECTOR_ID,
|
|
12353
|
+
GOOGLE_CALENDAR_CONNECTOR_ID,
|
|
12029
12354
|
LEAVE_README,
|
|
12030
12355
|
LINEAR_CONNECTOR_ID,
|
|
12031
12356
|
LicenseRequiredError,
|
|
@@ -12038,12 +12363,15 @@ export {
|
|
|
12038
12363
|
OllamaProvider,
|
|
12039
12364
|
OpenAICompatibleProvider,
|
|
12040
12365
|
OpenAIProvider,
|
|
12366
|
+
PRESET_IDS,
|
|
12367
|
+
PRESET_WORKSPACE_ID_PREFIX,
|
|
12041
12368
|
PluginError,
|
|
12042
12369
|
PluginRegistry,
|
|
12043
12370
|
PluginRuntimeError,
|
|
12044
12371
|
PluginSchema,
|
|
12045
12372
|
PluginValidationError,
|
|
12046
12373
|
PromptApiProvider,
|
|
12374
|
+
REGION_IDS,
|
|
12047
12375
|
RSS_CONNECTOR_ID,
|
|
12048
12376
|
SCAFFOLD_SYSTEM_GUARD,
|
|
12049
12377
|
SERVICE_IPC_CHANNELS,
|
|
@@ -12068,12 +12396,14 @@ export {
|
|
|
12068
12396
|
assertNetwork,
|
|
12069
12397
|
assertPublicUrl,
|
|
12070
12398
|
assertSchemaWrite,
|
|
12399
|
+
assertSystemAudio,
|
|
12071
12400
|
assistTurnProvenance,
|
|
12072
12401
|
attachAiPlanValidation,
|
|
12073
12402
|
buildAirtableConnector,
|
|
12074
12403
|
buildDiscordAction,
|
|
12075
12404
|
buildEmailAction,
|
|
12076
12405
|
buildGithubConnector,
|
|
12406
|
+
buildGoogleCalendarConnector,
|
|
12077
12407
|
buildLinearConnector,
|
|
12078
12408
|
buildNotionConnector,
|
|
12079
12409
|
buildRetryPrompt,
|
|
@@ -12108,6 +12438,7 @@ export {
|
|
|
12108
12438
|
createExtensionStorage,
|
|
12109
12439
|
createManagedProvider,
|
|
12110
12440
|
createMemoryAiAgentRuntimeStorage,
|
|
12441
|
+
createPresetTree,
|
|
12111
12442
|
createPromptApiProvider,
|
|
12112
12443
|
createScriptContext,
|
|
12113
12444
|
createServiceClient,
|
|
@@ -12124,6 +12455,7 @@ export {
|
|
|
12124
12455
|
deriveTrustTier,
|
|
12125
12456
|
describeCapabilities,
|
|
12126
12457
|
detectConnectors,
|
|
12458
|
+
detectUpcomingMeeting,
|
|
12127
12459
|
downloadPromptApiModel,
|
|
12128
12460
|
emitConnectorArtifacts,
|
|
12129
12461
|
evaluateCanvasPluginPermissionGate,
|
|
@@ -12158,28 +12490,36 @@ export {
|
|
|
12158
12490
|
isNetworkAllowed,
|
|
12159
12491
|
isOllamaAvailable,
|
|
12160
12492
|
isPaidPricing,
|
|
12493
|
+
isPresetWorkspaceId,
|
|
12161
12494
|
isSchemaDefiningExtension,
|
|
12162
12495
|
isSchemaReadAllowed,
|
|
12163
12496
|
isSchemaWriteAllowed,
|
|
12164
12497
|
isScriptNode,
|
|
12165
12498
|
isServiceClientAvailable,
|
|
12499
|
+
isSystemAudioAllowed,
|
|
12166
12500
|
ladderTierForTrust,
|
|
12167
12501
|
leaveWithEverything,
|
|
12168
12502
|
listOllamaModels,
|
|
12169
12503
|
matchSchemaIri,
|
|
12504
|
+
moveSlot,
|
|
12170
12505
|
normalizeCanvasPluginWorkspacePolicy,
|
|
12171
12506
|
packageName,
|
|
12172
12507
|
parseAiMutationPlan,
|
|
12173
12508
|
parseFeed,
|
|
12174
12509
|
parseVersion,
|
|
12510
|
+
parseWorkspacePayload,
|
|
12175
12511
|
parseXNetPageFrontmatter,
|
|
12176
12512
|
pascalCase,
|
|
12177
12513
|
pickBestConnector,
|
|
12514
|
+
placementOf,
|
|
12178
12515
|
pluginLicenseText,
|
|
12516
|
+
presetForWorkspaceId,
|
|
12517
|
+
presetWorkspaceId,
|
|
12179
12518
|
probeOpenAiCompatible,
|
|
12180
12519
|
promptApiAvailability,
|
|
12181
12520
|
quickSafetyCheck,
|
|
12182
12521
|
recommendExtensions,
|
|
12522
|
+
regionOf,
|
|
12183
12523
|
renderEvent,
|
|
12184
12524
|
renderMarkdownLineDiff,
|
|
12185
12525
|
renderMarkdownReviewDiff,
|
|
@@ -12198,8 +12538,11 @@ export {
|
|
|
12198
12538
|
scriptToPluginManifest,
|
|
12199
12539
|
searchMarketplace,
|
|
12200
12540
|
serializeAiMutationPlan,
|
|
12541
|
+
serializeWorkspacePayload,
|
|
12542
|
+
setSlotTier,
|
|
12201
12543
|
shortSchemaName,
|
|
12202
12544
|
shouldDispatch,
|
|
12545
|
+
slotsIn,
|
|
12203
12546
|
sortMarketplace,
|
|
12204
12547
|
stripXNetPageFrontmatter,
|
|
12205
12548
|
summarizeProvenance,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnetjs/plugins",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"acorn": "^8.15.0",
|
|
33
|
-
"@xnetjs/abuse": "0.
|
|
34
|
-
"@xnetjs/core": "0.
|
|
33
|
+
"@xnetjs/abuse": "0.6.0",
|
|
34
|
+
"@xnetjs/core": "0.6.0",
|
|
35
35
|
"@xnetjs/trust": "0.0.2",
|
|
36
|
-
"@xnetjs/data": "0.
|
|
36
|
+
"@xnetjs/data": "0.6.0",
|
|
37
37
|
"@xnetjs/slack-compat": "0.0.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsup": "^8.0.0",
|
|
49
49
|
"typescript": "^5.4.0",
|
|
50
50
|
"vitest": "^4.0.0",
|
|
51
|
-
"@xnetjs/licenses": "0.0.
|
|
51
|
+
"@xnetjs/licenses": "0.0.10"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsup",
|