@xnetjs/plugins 0.5.0 → 0.7.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 +164 -16
- package/dist/index.js +262 -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
|
*/
|
|
@@ -1036,6 +1056,8 @@ interface ExtensionContext {
|
|
|
1036
1056
|
registerMentionProvider(provider: MentionProviderContribution): Disposable$1;
|
|
1037
1057
|
/** Register a model-facing agent tool (exploration 0196) */
|
|
1038
1058
|
registerAgentTool(tool: AgentToolContribution): Disposable$1;
|
|
1059
|
+
/** Register a shell slot view (exploration 0280) */
|
|
1060
|
+
registerSlotView(view: SlotContribution): Disposable$1;
|
|
1039
1061
|
/** Add middleware to NodeStore */
|
|
1040
1062
|
addMiddleware(middleware: NodeStoreMiddleware): Disposable$1;
|
|
1041
1063
|
/** Plugin-private storage */
|
|
@@ -1167,6 +1189,12 @@ interface PluginContributions {
|
|
|
1167
1189
|
mentionProviders?: MentionProviderContribution[];
|
|
1168
1190
|
/** Model-facing agent tools — what a Connector exposes (exploration 0196). */
|
|
1169
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[];
|
|
1170
1198
|
}
|
|
1171
1199
|
declare class PluginValidationError extends Error {
|
|
1172
1200
|
readonly issues: string[];
|
|
@@ -1182,6 +1210,112 @@ declare function validateManifest(manifest: unknown): XNetExtension;
|
|
|
1182
1210
|
*/
|
|
1183
1211
|
declare function defineExtension(manifest: XNetExtension): XNetExtension;
|
|
1184
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
|
+
* Insert a view into a region at a specific index (0282 phase 4),
|
|
1285
|
+
* keeping its tier. Works for cross-region moves AND within-region
|
|
1286
|
+
* reorders; the index is clamped, and orders stay dense on both sides.
|
|
1287
|
+
* No-op when the view is absent or nothing would change.
|
|
1288
|
+
*/
|
|
1289
|
+
declare function insertSlot(tree: LayoutTree, viewId: string, to: RegionId, index: number): LayoutTree;
|
|
1290
|
+
/**
|
|
1291
|
+
* Move a view to another region (appended last), keeping its tier.
|
|
1292
|
+
* No-op when the view is absent or already there.
|
|
1293
|
+
*/
|
|
1294
|
+
declare function moveSlot(tree: LayoutTree, viewId: string, to: RegionId): LayoutTree;
|
|
1295
|
+
/** Change a placed view's disclosure tier. No-op when absent/unchanged. */
|
|
1296
|
+
declare function setSlotTier(tree: LayoutTree, viewId: string, tier: SlotTier): LayoutTree;
|
|
1297
|
+
/** Placements of a region, sorted, optionally filtered to a tier. */
|
|
1298
|
+
declare function slotsIn(tree: LayoutTree, region: RegionId, tier?: SlotTier): SlotPlacement[];
|
|
1299
|
+
/**
|
|
1300
|
+
* Portable workspace payload: the tree plus a human name. Device-local
|
|
1301
|
+
* state (pixel sizes, monitor splits) deliberately stays OUT of the node —
|
|
1302
|
+
* it lives in the local store keyed by workspaceId.
|
|
1303
|
+
*/
|
|
1304
|
+
interface WorkspacePayload {
|
|
1305
|
+
name: string;
|
|
1306
|
+
/** Preset provenance, for "Reset to preset". Null = built from scratch. */
|
|
1307
|
+
preset: PresetId | null;
|
|
1308
|
+
tree: LayoutTree;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Parse an untrusted payload (a synced node) back into a tree. Unknown
|
|
1312
|
+
* regions are dropped, missing regions become empty, malformed placements
|
|
1313
|
+
* are skipped — a shared workspace must never crash the shell.
|
|
1314
|
+
*/
|
|
1315
|
+
declare function parseWorkspacePayload(value: unknown): WorkspacePayload | null;
|
|
1316
|
+
/** Serialize for the node payload. Inverse of {@link parseWorkspacePayload}. */
|
|
1317
|
+
declare function serializeWorkspacePayload(payload: WorkspacePayload): WorkspacePayload;
|
|
1318
|
+
|
|
1185
1319
|
/**
|
|
1186
1320
|
* @xnetjs/plugins — importer resolution (exploration 0189).
|
|
1187
1321
|
*
|
|
@@ -2284,6 +2418,13 @@ declare function runConnectorSync(def: ConnectorDefinition, ports: RunConnectorS
|
|
|
2284
2418
|
* renders on top of this; the view itself is app-side.
|
|
2285
2419
|
*/
|
|
2286
2420
|
|
|
2421
|
+
/**
|
|
2422
|
+
* What a marketplace listing distributes (exploration 0280). `plugin` is
|
|
2423
|
+
* the default (code, install-gated); `workspace` is a shared bench — a
|
|
2424
|
+
* `xnet:Workspace` node payload, pure data: importing one never runs code,
|
|
2425
|
+
* so it needs no sandbox tier, only the normal node import path.
|
|
2426
|
+
*/
|
|
2427
|
+
type MarketplaceListingKind = 'plugin' | 'workspace';
|
|
2287
2428
|
/** A single entry in the marketplace index (`registry.json`). */
|
|
2288
2429
|
interface MarketplaceEntry {
|
|
2289
2430
|
id: string;
|
|
@@ -2291,6 +2432,8 @@ interface MarketplaceEntry {
|
|
|
2291
2432
|
description: string;
|
|
2292
2433
|
version: string;
|
|
2293
2434
|
author: string;
|
|
2435
|
+
/** Listing kind (default `plugin`). `workspace` = a shared bench (0280). */
|
|
2436
|
+
kind?: MarketplaceListingKind;
|
|
2294
2437
|
/** Search keywords / tags. */
|
|
2295
2438
|
keywords?: string[];
|
|
2296
2439
|
/** Coarse category for filtering (`productivity`, `finance`, `social`, …). */
|
|
@@ -2299,6 +2442,11 @@ interface MarketplaceEntry {
|
|
|
2299
2442
|
capabilities?: ModuleCapabilities;
|
|
2300
2443
|
/** URL the full manifest is fetched from at install. */
|
|
2301
2444
|
manifestUrl: string;
|
|
2445
|
+
/**
|
|
2446
|
+
* For `kind: 'workspace'` listings: URL of the workspace payload JSON
|
|
2447
|
+
* (the portable tree — parsed by `parseWorkspacePayload` on import).
|
|
2448
|
+
*/
|
|
2449
|
+
workspaceUrl?: string;
|
|
2302
2450
|
/** Lifetime install count (trust signal). */
|
|
2303
2451
|
installs?: number;
|
|
2304
2452
|
/** GitHub stars / community signal. */
|
|
@@ -3430,7 +3578,7 @@ declare function createTestPluginHarness(options?: TestHarnessOptions): TestPlug
|
|
|
3430
3578
|
* (0196 — sync an external service into governed nodes + expose agent tools).
|
|
3431
3579
|
*/
|
|
3432
3580
|
|
|
3433
|
-
type ScaffoldTemplate = 'client' | 'two-sided' | 'ai-script' | 'connector';
|
|
3581
|
+
type ScaffoldTemplate = 'client' | 'two-sided' | 'ai-script' | 'connector' | 'slot-view';
|
|
3434
3582
|
interface ScaffoldSpec {
|
|
3435
3583
|
/** Reverse-domain plugin id, e.g. `com.acme.kanban`. */
|
|
3436
3584
|
id: string;
|
|
@@ -5892,4 +6040,4 @@ declare function leaveWithEverything(ports: RightToLeavePorts, opts: {
|
|
|
5892
6040
|
*/
|
|
5893
6041
|
declare function deleteDay(ports: RightToLeavePorts, opts: DeleteDayOptions): Promise<DeleteDayResult>;
|
|
5894
6042
|
|
|
5895
|
-
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, 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 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, 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, 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, isSchemaDefiningExtension, isSchemaReadAllowed, isSchemaWriteAllowed, isScriptNode, isServiceClientAvailable, isSystemAudioAllowed, 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 };
|
|
6043
|
+
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, insertSlot, 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,210 @@ 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 insertSlot(tree, viewId, to, index) {
|
|
674
|
+
const from = regionOf(tree, viewId);
|
|
675
|
+
if (!from) 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
|
+
const target = [...regions[to]].sort((a, b) => a.order - b.order);
|
|
681
|
+
const clamped = Math.max(0, Math.min(index, target.length));
|
|
682
|
+
target.splice(clamped, 0, { ...placement, order: 0 });
|
|
683
|
+
regions[to] = target.map((entry, position) => ({ ...entry, order: position }));
|
|
684
|
+
const changed = from !== to || regions[to].findIndex((entry) => entry.viewId === viewId) !== tree.regions[to].findIndex((entry) => entry.viewId === viewId);
|
|
685
|
+
return changed ? { ...tree, regions } : tree;
|
|
686
|
+
}
|
|
687
|
+
function moveSlot(tree, viewId, to) {
|
|
688
|
+
const from = regionOf(tree, viewId);
|
|
689
|
+
if (!from || from === to) return tree;
|
|
690
|
+
return insertSlot(tree, viewId, to, tree.regions[to].length);
|
|
691
|
+
}
|
|
692
|
+
function setSlotTier(tree, viewId, tier) {
|
|
693
|
+
const region = regionOf(tree, viewId);
|
|
694
|
+
if (!region) return tree;
|
|
695
|
+
const current = tree.regions[region].find((entry) => entry.viewId === viewId);
|
|
696
|
+
if (!current || current.tier === tier) return tree;
|
|
697
|
+
const regions = cloneRegions(tree.regions);
|
|
698
|
+
regions[region] = regions[region].map(
|
|
699
|
+
(entry) => entry.viewId === viewId ? { ...entry, tier } : entry
|
|
700
|
+
);
|
|
701
|
+
return { ...tree, regions };
|
|
702
|
+
}
|
|
703
|
+
function slotsIn(tree, region, tier) {
|
|
704
|
+
const placements = [...tree.regions[region]].sort((a, b) => a.order - b.order);
|
|
705
|
+
return tier ? placements.filter((placement) => placement.tier === tier) : placements;
|
|
706
|
+
}
|
|
707
|
+
var TIERS = ["pinned", "summoned", "hidden"];
|
|
708
|
+
function isPlacement(value) {
|
|
709
|
+
if (typeof value !== "object" || value === null) return false;
|
|
710
|
+
const p = value;
|
|
711
|
+
return typeof p.viewId === "string" && typeof p.order === "number" && TIERS.includes(p.tier);
|
|
712
|
+
}
|
|
713
|
+
function parseWorkspacePayload(value) {
|
|
714
|
+
if (typeof value !== "object" || value === null) return null;
|
|
715
|
+
const payload = value;
|
|
716
|
+
if (typeof payload.name !== "string") return null;
|
|
717
|
+
const rawTree = payload.tree;
|
|
718
|
+
if (typeof rawTree !== "object" || rawTree === null) return null;
|
|
719
|
+
if (typeof rawTree.workspaceId !== "string") return null;
|
|
720
|
+
const chrome = rawTree.chrome === "quiet" ? "quiet" : "pinned";
|
|
721
|
+
const rawSurface = rawTree.surface;
|
|
722
|
+
const tabsEnabled = rawSurface?.tabsEnabled === true;
|
|
723
|
+
const regions = emptyRegions();
|
|
724
|
+
const rawRegions = rawTree.regions;
|
|
725
|
+
if (typeof rawRegions === "object" && rawRegions !== null) {
|
|
726
|
+
for (const region of REGION_IDS) {
|
|
727
|
+
const entries = rawRegions[region];
|
|
728
|
+
if (!Array.isArray(entries)) continue;
|
|
729
|
+
regions[region] = renumber(entries.filter(isPlacement));
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
const preset = PRESET_IDS.includes(payload.preset) ? payload.preset : null;
|
|
733
|
+
return {
|
|
734
|
+
name: payload.name,
|
|
735
|
+
preset,
|
|
736
|
+
tree: { workspaceId: rawTree.workspaceId, regions, surface: { tabsEnabled }, chrome }
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
function serializeWorkspacePayload(payload) {
|
|
740
|
+
return {
|
|
741
|
+
name: payload.name,
|
|
742
|
+
preset: payload.preset,
|
|
743
|
+
tree: {
|
|
744
|
+
workspaceId: payload.tree.workspaceId,
|
|
745
|
+
regions: cloneRegions(payload.tree.regions),
|
|
746
|
+
surface: { tabsEnabled: payload.tree.surface.tabsEnabled },
|
|
747
|
+
chrome: payload.tree.chrome
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
|
|
548
752
|
// src/feature-module.ts
|
|
549
753
|
function defineFeatureModule(module) {
|
|
550
754
|
return module;
|
|
@@ -3314,6 +3518,11 @@ function createExtensionContext(options) {
|
|
|
3314
3518
|
disposables.push(d);
|
|
3315
3519
|
return d;
|
|
3316
3520
|
},
|
|
3521
|
+
registerSlotView(view) {
|
|
3522
|
+
const d = contributions.slots.register(view);
|
|
3523
|
+
disposables.push(d);
|
|
3524
|
+
return d;
|
|
3525
|
+
},
|
|
3317
3526
|
addMiddleware(middleware) {
|
|
3318
3527
|
if (!middlewareChain) {
|
|
3319
3528
|
console.warn(`[Plugin ${pluginId}] Middleware not available on this platform`);
|
|
@@ -3833,6 +4042,11 @@ var PluginRegistry = class {
|
|
|
3833
4042
|
ctx.registerAgentTool(tool);
|
|
3834
4043
|
}
|
|
3835
4044
|
}
|
|
4045
|
+
if (c.slots) {
|
|
4046
|
+
for (const view of c.slots) {
|
|
4047
|
+
ctx.registerSlotView(view);
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
3836
4050
|
}
|
|
3837
4051
|
// ─── Load from Store ───────────────────────────────────────────────────
|
|
3838
4052
|
/**
|
|
@@ -4203,7 +4417,13 @@ var ScaffoldError = class extends Error {
|
|
|
4203
4417
|
}
|
|
4204
4418
|
};
|
|
4205
4419
|
var ID_RE3 = /^[a-z][a-z0-9]*(\.[a-z][a-z0-9-]*)+$/i;
|
|
4206
|
-
var TEMPLATES = [
|
|
4420
|
+
var TEMPLATES = [
|
|
4421
|
+
"client",
|
|
4422
|
+
"two-sided",
|
|
4423
|
+
"ai-script",
|
|
4424
|
+
"connector",
|
|
4425
|
+
"slot-view"
|
|
4426
|
+
];
|
|
4207
4427
|
function validateSpec(spec) {
|
|
4208
4428
|
if (!spec.id || !ID_RE3.test(spec.id)) {
|
|
4209
4429
|
throw new ScaffoldError(`id must be reverse-domain (got: ${JSON.stringify(spec.id)})`);
|
|
@@ -4284,6 +4504,21 @@ var MODULE_BODIES = {
|
|
|
4284
4504
|
}
|
|
4285
4505
|
]
|
|
4286
4506
|
}`,
|
|
4507
|
+
// A dockable shell panel (exploration 0280). Capability-scoped: the default
|
|
4508
|
+
// manifest declares NO network and NO schemas — the essay's consent form
|
|
4509
|
+
// starts empty and every grant is an explicit, visible addition.
|
|
4510
|
+
"slot-view": (s) => ` capabilities: ${JSON.stringify(s.capabilities ?? { network: [] })},
|
|
4511
|
+
contributes: {
|
|
4512
|
+
slots: [
|
|
4513
|
+
{
|
|
4514
|
+
id: '${packageName(s.id)}',
|
|
4515
|
+
label: '${s.name}',
|
|
4516
|
+
tier: 'secondary',
|
|
4517
|
+
defaultRegion: 'dock.corner',
|
|
4518
|
+
component: ${pascalCase(s.id)}Panel
|
|
4519
|
+
}
|
|
4520
|
+
]
|
|
4521
|
+
}`,
|
|
4287
4522
|
"ai-script": (s) => ` contributes: {
|
|
4288
4523
|
commands: [
|
|
4289
4524
|
{
|
|
@@ -4382,9 +4617,17 @@ function indexSource(spec) {
|
|
|
4382
4617
|
pricing: ${JSON.stringify(spec.pricing)},` : "";
|
|
4383
4618
|
const publisher = spec.publisherDid ? `
|
|
4384
4619
|
publisherDid: '${spec.publisherDid}',` : "";
|
|
4620
|
+
const slotPanel = spec.template === "slot-view" ? `import { createElement } from 'react'
|
|
4621
|
+
|
|
4622
|
+
/** The panel body \u2014 replace with your view (createElement keeps it JSX-free). */
|
|
4623
|
+
function ${ctor}Panel() {
|
|
4624
|
+
return createElement('div', { style: { padding: 12 } }, '${spec.name} panel')
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4627
|
+
` : "";
|
|
4385
4628
|
return `import { defineFeatureModule } from '@xnetjs/plugins'
|
|
4386
4629
|
|
|
4387
|
-
export const ${ctor}Module = defineFeatureModule({
|
|
4630
|
+
${slotPanel}export const ${ctor}Module = defineFeatureModule({
|
|
4388
4631
|
id: '${spec.id}',
|
|
4389
4632
|
name: '${spec.name}',
|
|
4390
4633
|
version: '0.1.0',${spec.author ? `
|
|
@@ -12129,12 +12372,15 @@ export {
|
|
|
12129
12372
|
OllamaProvider,
|
|
12130
12373
|
OpenAICompatibleProvider,
|
|
12131
12374
|
OpenAIProvider,
|
|
12375
|
+
PRESET_IDS,
|
|
12376
|
+
PRESET_WORKSPACE_ID_PREFIX,
|
|
12132
12377
|
PluginError,
|
|
12133
12378
|
PluginRegistry,
|
|
12134
12379
|
PluginRuntimeError,
|
|
12135
12380
|
PluginSchema,
|
|
12136
12381
|
PluginValidationError,
|
|
12137
12382
|
PromptApiProvider,
|
|
12383
|
+
REGION_IDS,
|
|
12138
12384
|
RSS_CONNECTOR_ID,
|
|
12139
12385
|
SCAFFOLD_SYSTEM_GUARD,
|
|
12140
12386
|
SERVICE_IPC_CHANNELS,
|
|
@@ -12201,6 +12447,7 @@ export {
|
|
|
12201
12447
|
createExtensionStorage,
|
|
12202
12448
|
createManagedProvider,
|
|
12203
12449
|
createMemoryAiAgentRuntimeStorage,
|
|
12450
|
+
createPresetTree,
|
|
12204
12451
|
createPromptApiProvider,
|
|
12205
12452
|
createScriptContext,
|
|
12206
12453
|
createServiceClient,
|
|
@@ -12242,6 +12489,7 @@ export {
|
|
|
12242
12489
|
guardedFetch,
|
|
12243
12490
|
hasUpdate,
|
|
12244
12491
|
importerAdapters,
|
|
12492
|
+
insertSlot,
|
|
12245
12493
|
installCommandHandler,
|
|
12246
12494
|
installShortcutHandler,
|
|
12247
12495
|
isAiRiskLevel,
|
|
@@ -12252,6 +12500,7 @@ export {
|
|
|
12252
12500
|
isNetworkAllowed,
|
|
12253
12501
|
isOllamaAvailable,
|
|
12254
12502
|
isPaidPricing,
|
|
12503
|
+
isPresetWorkspaceId,
|
|
12255
12504
|
isSchemaDefiningExtension,
|
|
12256
12505
|
isSchemaReadAllowed,
|
|
12257
12506
|
isSchemaWriteAllowed,
|
|
@@ -12262,19 +12511,25 @@ export {
|
|
|
12262
12511
|
leaveWithEverything,
|
|
12263
12512
|
listOllamaModels,
|
|
12264
12513
|
matchSchemaIri,
|
|
12514
|
+
moveSlot,
|
|
12265
12515
|
normalizeCanvasPluginWorkspacePolicy,
|
|
12266
12516
|
packageName,
|
|
12267
12517
|
parseAiMutationPlan,
|
|
12268
12518
|
parseFeed,
|
|
12269
12519
|
parseVersion,
|
|
12520
|
+
parseWorkspacePayload,
|
|
12270
12521
|
parseXNetPageFrontmatter,
|
|
12271
12522
|
pascalCase,
|
|
12272
12523
|
pickBestConnector,
|
|
12524
|
+
placementOf,
|
|
12273
12525
|
pluginLicenseText,
|
|
12526
|
+
presetForWorkspaceId,
|
|
12527
|
+
presetWorkspaceId,
|
|
12274
12528
|
probeOpenAiCompatible,
|
|
12275
12529
|
promptApiAvailability,
|
|
12276
12530
|
quickSafetyCheck,
|
|
12277
12531
|
recommendExtensions,
|
|
12532
|
+
regionOf,
|
|
12278
12533
|
renderEvent,
|
|
12279
12534
|
renderMarkdownLineDiff,
|
|
12280
12535
|
renderMarkdownReviewDiff,
|
|
@@ -12293,8 +12548,11 @@ export {
|
|
|
12293
12548
|
scriptToPluginManifest,
|
|
12294
12549
|
searchMarketplace,
|
|
12295
12550
|
serializeAiMutationPlan,
|
|
12551
|
+
serializeWorkspacePayload,
|
|
12552
|
+
setSlotTier,
|
|
12296
12553
|
shortSchemaName,
|
|
12297
12554
|
shouldDispatch,
|
|
12555
|
+
slotsIn,
|
|
12298
12556
|
sortMarketplace,
|
|
12299
12557
|
stripXNetPageFrontmatter,
|
|
12300
12558
|
summarizeProvenance,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xnetjs/plugins",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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.7.0",
|
|
34
|
+
"@xnetjs/core": "0.7.0",
|
|
35
35
|
"@xnetjs/trust": "0.0.2",
|
|
36
|
-
"@xnetjs/data": "0.
|
|
36
|
+
"@xnetjs/data": "0.7.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.11"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "tsup",
|