@matterfact/embed 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -0
- package/dist/{chunk-URGQBG4I.js → chunk-4AE5WINC.js} +209 -17
- package/dist/chunk-4AE5WINC.js.map +1 -0
- package/dist/{chunk-6EM7T2JV.js → chunk-CFDPCZO3.js} +208 -15
- package/dist/chunk-CFDPCZO3.js.map +1 -0
- package/dist/{chunk-BKKXHSYU.js → chunk-DXLHTFB4.js} +2 -2
- package/dist/chunk-RL6VIGWK.js +2 -0
- package/dist/chunk-TWMHQF7O.js +3 -0
- package/dist/chunk-TWMHQF7O.js.map +7 -0
- package/dist/{context-U2HJJN2S.js → context-HOOW63MO.js} +4 -2
- package/dist/context-SSQ4HUP3.js +3 -0
- package/dist/{context-ACFBWIFH.js.map → context-SSQ4HUP3.js.map} +1 -1
- package/dist/embed.js +1 -1
- package/dist/embed.js.map +2 -2
- package/dist/index.cjs +214 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +260 -15
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +124 -1
- package/dist/react.d.ts +124 -1
- package/dist/react.js +46 -3
- package/dist/react.js.map +1 -1
- package/dist/{snapshot-Y75SCGCM.js → snapshot-CRY2IBX6.js} +3 -3
- package/dist/{snapshot-Y75SCGCM.js.map → snapshot-CRY2IBX6.js.map} +1 -1
- package/dist/{snapshot-4GXT6PKZ.js → snapshot-EYRXPLRC.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-6EM7T2JV.js.map +0 -1
- package/dist/chunk-FEXG4LQJ.js +0 -3
- package/dist/chunk-FEXG4LQJ.js.map +0 -7
- package/dist/chunk-NWNMS34P.js +0 -2
- package/dist/chunk-URGQBG4I.js.map +0 -1
- package/dist/context-ACFBWIFH.js +0 -3
- /package/dist/{chunk-BKKXHSYU.js.map → chunk-DXLHTFB4.js.map} +0 -0
- /package/dist/{chunk-NWNMS34P.js.map → chunk-RL6VIGWK.js.map} +0 -0
- /package/dist/{context-U2HJJN2S.js.map → context-HOOW63MO.js.map} +0 -0
- /package/dist/{snapshot-4GXT6PKZ.js.map → snapshot-EYRXPLRC.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -102,6 +102,38 @@ interface ArtifactGrant {
|
|
|
102
102
|
owner: string;
|
|
103
103
|
token: string;
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A DECLARED artifact grant — the `<MatterfactAgent artifacts>` prop (or
|
|
107
|
+
* `window.matterfact.artifacts`). Same wire shape as a grant discovered by scanning
|
|
108
|
+
* co-embedded `<MatterfactArtifact>` iframes, plus an optional `label`; it feeds the
|
|
109
|
+
* SAME `host.artifactGrants` channel. This is how a host makes a board reachable from
|
|
110
|
+
* a route where its iframe ISN'T mounted, without hidden zero-size iframes smuggling
|
|
111
|
+
* the token into the DOM. The token stays in the grant channel, never in message text.
|
|
112
|
+
*/
|
|
113
|
+
interface DeclaredArtifact {
|
|
114
|
+
slug: string;
|
|
115
|
+
owner: string;
|
|
116
|
+
token: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* One host-tool lifecycle event, surfaced to the host via `onToolEvent` (and the dev
|
|
121
|
+
* panel) — the host's own telemetry hook. Fired loader-side; a throwing or slow
|
|
122
|
+
* callback here NEVER blocks or breaks the call path.
|
|
123
|
+
*
|
|
124
|
+
* - `advertise` — the merged tool list changed (fired with the new set's names).
|
|
125
|
+
* - `call` — a tool call is about to run (`args` present).
|
|
126
|
+
* - `result` — the call settled (`ok`/`error`/`ms`).
|
|
127
|
+
*/
|
|
128
|
+
interface ToolEvent {
|
|
129
|
+
phase: 'advertise' | 'call' | 'result';
|
|
130
|
+
name: string;
|
|
131
|
+
toolClass: 'hoist' | 'mf' | 'app';
|
|
132
|
+
args?: unknown;
|
|
133
|
+
ok?: boolean;
|
|
134
|
+
error?: string;
|
|
135
|
+
ms?: number;
|
|
136
|
+
}
|
|
105
137
|
/**
|
|
106
138
|
* A snapshot of the page as the agent sees it.
|
|
107
139
|
*
|
|
@@ -661,4 +693,4 @@ declare class EmbedHost {
|
|
|
661
693
|
*/
|
|
662
694
|
declare function mount(config: LoaderConfig): EmbedHost;
|
|
663
695
|
|
|
664
|
-
export { type ActivityEvent, type ArtifactGrant, CHANNEL, type ContentClass, type DomSnapshot, type ElementRef, EmbedHost, type Envelope, type FocusContext, type HostToWidget, type HostTool, type LoaderConfig, PROTOCOL_VERSION, type PageContext, type PageEntity, type SiteMapEntry, type ToolCall, type WidgetToHost, envelope, isEnvelope, mount, readConfig };
|
|
696
|
+
export { type ActivityEvent, type ArtifactGrant, CHANNEL, type ContentClass, type DeclaredArtifact, type DomSnapshot, type ElementRef, EmbedHost, type Envelope, type FocusContext, type HostToWidget, type HostTool, type LoaderConfig, PROTOCOL_VERSION, type PageContext, type PageEntity, type SiteMapEntry, type ToolCall, type ToolEvent, type WidgetToHost, envelope, isEnvelope, mount, readConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,38 @@ interface ArtifactGrant {
|
|
|
102
102
|
owner: string;
|
|
103
103
|
token: string;
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* A DECLARED artifact grant — the `<MatterfactAgent artifacts>` prop (or
|
|
107
|
+
* `window.matterfact.artifacts`). Same wire shape as a grant discovered by scanning
|
|
108
|
+
* co-embedded `<MatterfactArtifact>` iframes, plus an optional `label`; it feeds the
|
|
109
|
+
* SAME `host.artifactGrants` channel. This is how a host makes a board reachable from
|
|
110
|
+
* a route where its iframe ISN'T mounted, without hidden zero-size iframes smuggling
|
|
111
|
+
* the token into the DOM. The token stays in the grant channel, never in message text.
|
|
112
|
+
*/
|
|
113
|
+
interface DeclaredArtifact {
|
|
114
|
+
slug: string;
|
|
115
|
+
owner: string;
|
|
116
|
+
token: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* One host-tool lifecycle event, surfaced to the host via `onToolEvent` (and the dev
|
|
121
|
+
* panel) — the host's own telemetry hook. Fired loader-side; a throwing or slow
|
|
122
|
+
* callback here NEVER blocks or breaks the call path.
|
|
123
|
+
*
|
|
124
|
+
* - `advertise` — the merged tool list changed (fired with the new set's names).
|
|
125
|
+
* - `call` — a tool call is about to run (`args` present).
|
|
126
|
+
* - `result` — the call settled (`ok`/`error`/`ms`).
|
|
127
|
+
*/
|
|
128
|
+
interface ToolEvent {
|
|
129
|
+
phase: 'advertise' | 'call' | 'result';
|
|
130
|
+
name: string;
|
|
131
|
+
toolClass: 'hoist' | 'mf' | 'app';
|
|
132
|
+
args?: unknown;
|
|
133
|
+
ok?: boolean;
|
|
134
|
+
error?: string;
|
|
135
|
+
ms?: number;
|
|
136
|
+
}
|
|
105
137
|
/**
|
|
106
138
|
* A snapshot of the page as the agent sees it.
|
|
107
139
|
*
|
|
@@ -661,4 +693,4 @@ declare class EmbedHost {
|
|
|
661
693
|
*/
|
|
662
694
|
declare function mount(config: LoaderConfig): EmbedHost;
|
|
663
695
|
|
|
664
|
-
export { type ActivityEvent, type ArtifactGrant, CHANNEL, type ContentClass, type DomSnapshot, type ElementRef, EmbedHost, type Envelope, type FocusContext, type HostToWidget, type HostTool, type LoaderConfig, PROTOCOL_VERSION, type PageContext, type PageEntity, type SiteMapEntry, type ToolCall, type WidgetToHost, envelope, isEnvelope, mount, readConfig };
|
|
696
|
+
export { type ActivityEvent, type ArtifactGrant, CHANNEL, type ContentClass, type DeclaredArtifact, type DomSnapshot, type ElementRef, EmbedHost, type Envelope, type FocusContext, type HostToWidget, type HostTool, type LoaderConfig, PROTOCOL_VERSION, type PageContext, type PageEntity, type SiteMapEntry, type ToolCall, type ToolEvent, type WidgetToHost, envelope, isEnvelope, mount, readConfig };
|
package/dist/index.js
CHANGED
|
@@ -718,7 +718,7 @@ var EmbedHost = class {
|
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
loadContext() {
|
|
721
|
-
this.context ?? (this.context = import('./context-
|
|
721
|
+
this.context ?? (this.context = import('./context-SSQ4HUP3.js').then((m) => {
|
|
722
722
|
m.start(
|
|
723
723
|
this.send,
|
|
724
724
|
this.config.origin,
|