@digital-gravy/etch-public-api 0.8.0 → 0.8.2
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.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1048,7 +1048,7 @@ interface EtchComponentsApi {
|
|
|
1048
1048
|
* - `loop-manager` — the loop manager
|
|
1049
1049
|
* - `asset-manager` — the asset (media) library
|
|
1050
1050
|
*/
|
|
1051
|
-
type NavigationPlace = 'builder' | 'templates' | 'style-manager' | 'content-hub' | 'loop-manager' | 'asset-manager';
|
|
1051
|
+
type NavigationPlace = 'builder' | 'templates' | 'style-manager' | 'content-hub' | 'loop-manager' | 'data-manager' | 'asset-manager';
|
|
1052
1052
|
/** Lightweight post entry returned by `navigation.listPostsAsync()`. */
|
|
1053
1053
|
interface PostSummary {
|
|
1054
1054
|
/** Post id. */
|
|
@@ -1290,6 +1290,38 @@ interface EtchSkillsApi {
|
|
|
1290
1290
|
getReference(name: string, file: string): string | undefined;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* External AI agent presence (`etch.ai`).
|
|
1295
|
+
*
|
|
1296
|
+
* Lets a connected agent advertise that it is working in this tab and what
|
|
1297
|
+
* phase it is in, driving the builder's presence overlay. Intended to be set
|
|
1298
|
+
* from a bridge connection (see `connectAs`), where pushed scripts reach only
|
|
1299
|
+
* `window.etch` — so this is the supported way to toggle the overlay.
|
|
1300
|
+
*/
|
|
1301
|
+
/**
|
|
1302
|
+
* The phase an external agent reports.
|
|
1303
|
+
*
|
|
1304
|
+
* - `idle` — agent not present; the presence overlay is hidden.
|
|
1305
|
+
* - `working` — agent is actively editing the canvas.
|
|
1306
|
+
* - `waiting` — agent is waiting on the human (input, approval).
|
|
1307
|
+
* - `thinking` — agent is reasoning before it acts.
|
|
1308
|
+
*/
|
|
1309
|
+
type ExternalAiState = 'idle' | 'working' | 'waiting' | 'thinking';
|
|
1310
|
+
/** Advertise external AI agent presence and phase to the builder. */
|
|
1311
|
+
interface EtchAiApi {
|
|
1312
|
+
/** The agent's current presence phase (`idle` when not present). */
|
|
1313
|
+
getState(): ExternalAiState;
|
|
1314
|
+
/**
|
|
1315
|
+
* Set the agent's presence phase. Any non-`idle` value shows the presence
|
|
1316
|
+
* overlay; `idle` hides it.
|
|
1317
|
+
*
|
|
1318
|
+
* @throws `EtchApiError` (`INVALID_ARGUMENT`) for an unknown state.
|
|
1319
|
+
*/
|
|
1320
|
+
setState(state: ExternalAiState): void;
|
|
1321
|
+
/** Clear presence — shorthand for `setState('idle')`. */
|
|
1322
|
+
hide(): void;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1293
1325
|
/**
|
|
1294
1326
|
* Builder chrome controls (`etch.ui`) and undo/redo (`etch.history`).
|
|
1295
1327
|
*/
|
|
@@ -1425,6 +1457,8 @@ interface Etch {
|
|
|
1425
1457
|
history: EtchHistoryApi;
|
|
1426
1458
|
/** Bundled, read-only authoring skills (guides + reference subskills). */
|
|
1427
1459
|
skills: EtchSkillsApi;
|
|
1460
|
+
/** External AI agent presence: advertise that an agent is working here. */
|
|
1461
|
+
ai: EtchAiApi;
|
|
1428
1462
|
/** Persist everything (blocks, loops, styles, UI). */
|
|
1429
1463
|
saveAsync(): Promise<void>;
|
|
1430
1464
|
/**
|
|
@@ -1520,4 +1554,4 @@ declare function isEtchApiError(value: unknown): value is EtchApiError;
|
|
|
1520
1554
|
*/
|
|
1521
1555
|
declare const ETCH_API_VERSION = "0.x";
|
|
1522
1556
|
|
|
1523
|
-
export { type ArrayComponentProperty, type BlockLoopBinding, type BlockPatch, type BooleanComponentProperty, type BooleanParam, type BridgeConnectOptions, type ClassComponentProperty, type ColorScheme, type ComponentPatch, type ComponentProperty, type ComponentPropertyBase, type ConditionComponentProperty, type ConnectOptions, type CopyObject, type CustomField, type CustomFieldAssignment, type CustomFieldGroup, type CustomFieldType, ETCH_API_VERSION, type Etch, EtchApiError, type EtchApiErrorCode, type EtchBlockCommon, type EtchBlockContext, type EtchBlockJson, type EtchBlockOptions, type EtchBlockScript, type EtchBlockType, type EtchBlockTypeName, type EtchBlocksApi, type EtchBridgeConnection, type EtchComponentBlockJson, type EtchComponentsApi, type EtchConditionBlockJson, type EtchDynamicElementBlockJson, type EtchDynamicImageBlockJson, type EtchElementBlockJson, type EtchFieldsApi, type EtchHistoryApi, type EtchHtmlAttributes, type EtchLoop, type EtchLoopBlockJson, type EtchLoopConfig, type EtchLoopObj, type EtchLoopsApi, type EtchNavigationApi, type EtchPassthroughBlockJson, type EtchPostContentBlockJson, type EtchRawHtmlBlockJson, type EtchSkillsApi, type EtchSlotContentBlockJson, type EtchSlotPlaceholderBlockJson, type EtchStylesApi, type EtchStylesheetsApi, type EtchSvgBlockJson, type EtchTextBlockJson, type EtchUiApi, type FindBlocksPredicate, type GroupComponentProperty, type GutenbergBlock, type LoopParamRef, type MetaQueryItem, type NavigationPlace, type NumberComponentProperty, type NumericParam, type ObjectComponentProperty, type PostCustomFieldGroupEntry, type PostCustomFieldValueEntry, type PostCustomFieldValueResponse, type PostCustomFieldValuesResponse, type PostSummary, type PublicBlockJson, type PublicComponentJson, type PublicComponentSummary, type RepeaterComponentProperty, type ResolvedCustomField, type SelectOptionsString, type SkillDetail, type SkillSummary, type StringComponentProperty, type StyleListFilter, type StylePatch, type StyleSelectorType, type StyleSummary, type StylesheetInput, type StylesheetPatch, type StylesheetSummary, type StylesheetType, type TaxQueryItem, type TemplateSummary, type WpQueryArgs, type WpTermsArgs, type WpUsersArgs, getEtch, isEtchApiError, isEtchAvailable };
|
|
1557
|
+
export { type ArrayComponentProperty, type BlockLoopBinding, type BlockPatch, type BooleanComponentProperty, type BooleanParam, type BridgeConnectOptions, type ClassComponentProperty, type ColorScheme, type ComponentPatch, type ComponentProperty, type ComponentPropertyBase, type ConditionComponentProperty, type ConnectOptions, type CopyObject, type CustomField, type CustomFieldAssignment, type CustomFieldGroup, type CustomFieldType, ETCH_API_VERSION, type Etch, type EtchAiApi, EtchApiError, type EtchApiErrorCode, type EtchBlockCommon, type EtchBlockContext, type EtchBlockJson, type EtchBlockOptions, type EtchBlockScript, type EtchBlockType, type EtchBlockTypeName, type EtchBlocksApi, type EtchBridgeConnection, type EtchComponentBlockJson, type EtchComponentsApi, type EtchConditionBlockJson, type EtchDynamicElementBlockJson, type EtchDynamicImageBlockJson, type EtchElementBlockJson, type EtchFieldsApi, type EtchHistoryApi, type EtchHtmlAttributes, type EtchLoop, type EtchLoopBlockJson, type EtchLoopConfig, type EtchLoopObj, type EtchLoopsApi, type EtchNavigationApi, type EtchPassthroughBlockJson, type EtchPostContentBlockJson, type EtchRawHtmlBlockJson, type EtchSkillsApi, type EtchSlotContentBlockJson, type EtchSlotPlaceholderBlockJson, type EtchStylesApi, type EtchStylesheetsApi, type EtchSvgBlockJson, type EtchTextBlockJson, type EtchUiApi, type ExternalAiState, type FindBlocksPredicate, type GroupComponentProperty, type GutenbergBlock, type LoopParamRef, type MetaQueryItem, type NavigationPlace, type NumberComponentProperty, type NumericParam, type ObjectComponentProperty, type PostCustomFieldGroupEntry, type PostCustomFieldValueEntry, type PostCustomFieldValueResponse, type PostCustomFieldValuesResponse, type PostSummary, type PublicBlockJson, type PublicComponentJson, type PublicComponentSummary, type RepeaterComponentProperty, type ResolvedCustomField, type SelectOptionsString, type SkillDetail, type SkillSummary, type StringComponentProperty, type StyleListFilter, type StylePatch, type StyleSelectorType, type StyleSummary, type StylesheetInput, type StylesheetPatch, type StylesheetSummary, type StylesheetType, type TaxQueryItem, type TemplateSummary, type WpQueryArgs, type WpTermsArgs, type WpUsersArgs, getEtch, isEtchApiError, isEtchAvailable };
|
package/dist/index.d.ts
CHANGED
|
@@ -1048,7 +1048,7 @@ interface EtchComponentsApi {
|
|
|
1048
1048
|
* - `loop-manager` — the loop manager
|
|
1049
1049
|
* - `asset-manager` — the asset (media) library
|
|
1050
1050
|
*/
|
|
1051
|
-
type NavigationPlace = 'builder' | 'templates' | 'style-manager' | 'content-hub' | 'loop-manager' | 'asset-manager';
|
|
1051
|
+
type NavigationPlace = 'builder' | 'templates' | 'style-manager' | 'content-hub' | 'loop-manager' | 'data-manager' | 'asset-manager';
|
|
1052
1052
|
/** Lightweight post entry returned by `navigation.listPostsAsync()`. */
|
|
1053
1053
|
interface PostSummary {
|
|
1054
1054
|
/** Post id. */
|
|
@@ -1290,6 +1290,38 @@ interface EtchSkillsApi {
|
|
|
1290
1290
|
getReference(name: string, file: string): string | undefined;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* External AI agent presence (`etch.ai`).
|
|
1295
|
+
*
|
|
1296
|
+
* Lets a connected agent advertise that it is working in this tab and what
|
|
1297
|
+
* phase it is in, driving the builder's presence overlay. Intended to be set
|
|
1298
|
+
* from a bridge connection (see `connectAs`), where pushed scripts reach only
|
|
1299
|
+
* `window.etch` — so this is the supported way to toggle the overlay.
|
|
1300
|
+
*/
|
|
1301
|
+
/**
|
|
1302
|
+
* The phase an external agent reports.
|
|
1303
|
+
*
|
|
1304
|
+
* - `idle` — agent not present; the presence overlay is hidden.
|
|
1305
|
+
* - `working` — agent is actively editing the canvas.
|
|
1306
|
+
* - `waiting` — agent is waiting on the human (input, approval).
|
|
1307
|
+
* - `thinking` — agent is reasoning before it acts.
|
|
1308
|
+
*/
|
|
1309
|
+
type ExternalAiState = 'idle' | 'working' | 'waiting' | 'thinking';
|
|
1310
|
+
/** Advertise external AI agent presence and phase to the builder. */
|
|
1311
|
+
interface EtchAiApi {
|
|
1312
|
+
/** The agent's current presence phase (`idle` when not present). */
|
|
1313
|
+
getState(): ExternalAiState;
|
|
1314
|
+
/**
|
|
1315
|
+
* Set the agent's presence phase. Any non-`idle` value shows the presence
|
|
1316
|
+
* overlay; `idle` hides it.
|
|
1317
|
+
*
|
|
1318
|
+
* @throws `EtchApiError` (`INVALID_ARGUMENT`) for an unknown state.
|
|
1319
|
+
*/
|
|
1320
|
+
setState(state: ExternalAiState): void;
|
|
1321
|
+
/** Clear presence — shorthand for `setState('idle')`. */
|
|
1322
|
+
hide(): void;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1293
1325
|
/**
|
|
1294
1326
|
* Builder chrome controls (`etch.ui`) and undo/redo (`etch.history`).
|
|
1295
1327
|
*/
|
|
@@ -1425,6 +1457,8 @@ interface Etch {
|
|
|
1425
1457
|
history: EtchHistoryApi;
|
|
1426
1458
|
/** Bundled, read-only authoring skills (guides + reference subskills). */
|
|
1427
1459
|
skills: EtchSkillsApi;
|
|
1460
|
+
/** External AI agent presence: advertise that an agent is working here. */
|
|
1461
|
+
ai: EtchAiApi;
|
|
1428
1462
|
/** Persist everything (blocks, loops, styles, UI). */
|
|
1429
1463
|
saveAsync(): Promise<void>;
|
|
1430
1464
|
/**
|
|
@@ -1520,4 +1554,4 @@ declare function isEtchApiError(value: unknown): value is EtchApiError;
|
|
|
1520
1554
|
*/
|
|
1521
1555
|
declare const ETCH_API_VERSION = "0.x";
|
|
1522
1556
|
|
|
1523
|
-
export { type ArrayComponentProperty, type BlockLoopBinding, type BlockPatch, type BooleanComponentProperty, type BooleanParam, type BridgeConnectOptions, type ClassComponentProperty, type ColorScheme, type ComponentPatch, type ComponentProperty, type ComponentPropertyBase, type ConditionComponentProperty, type ConnectOptions, type CopyObject, type CustomField, type CustomFieldAssignment, type CustomFieldGroup, type CustomFieldType, ETCH_API_VERSION, type Etch, EtchApiError, type EtchApiErrorCode, type EtchBlockCommon, type EtchBlockContext, type EtchBlockJson, type EtchBlockOptions, type EtchBlockScript, type EtchBlockType, type EtchBlockTypeName, type EtchBlocksApi, type EtchBridgeConnection, type EtchComponentBlockJson, type EtchComponentsApi, type EtchConditionBlockJson, type EtchDynamicElementBlockJson, type EtchDynamicImageBlockJson, type EtchElementBlockJson, type EtchFieldsApi, type EtchHistoryApi, type EtchHtmlAttributes, type EtchLoop, type EtchLoopBlockJson, type EtchLoopConfig, type EtchLoopObj, type EtchLoopsApi, type EtchNavigationApi, type EtchPassthroughBlockJson, type EtchPostContentBlockJson, type EtchRawHtmlBlockJson, type EtchSkillsApi, type EtchSlotContentBlockJson, type EtchSlotPlaceholderBlockJson, type EtchStylesApi, type EtchStylesheetsApi, type EtchSvgBlockJson, type EtchTextBlockJson, type EtchUiApi, type FindBlocksPredicate, type GroupComponentProperty, type GutenbergBlock, type LoopParamRef, type MetaQueryItem, type NavigationPlace, type NumberComponentProperty, type NumericParam, type ObjectComponentProperty, type PostCustomFieldGroupEntry, type PostCustomFieldValueEntry, type PostCustomFieldValueResponse, type PostCustomFieldValuesResponse, type PostSummary, type PublicBlockJson, type PublicComponentJson, type PublicComponentSummary, type RepeaterComponentProperty, type ResolvedCustomField, type SelectOptionsString, type SkillDetail, type SkillSummary, type StringComponentProperty, type StyleListFilter, type StylePatch, type StyleSelectorType, type StyleSummary, type StylesheetInput, type StylesheetPatch, type StylesheetSummary, type StylesheetType, type TaxQueryItem, type TemplateSummary, type WpQueryArgs, type WpTermsArgs, type WpUsersArgs, getEtch, isEtchApiError, isEtchAvailable };
|
|
1557
|
+
export { type ArrayComponentProperty, type BlockLoopBinding, type BlockPatch, type BooleanComponentProperty, type BooleanParam, type BridgeConnectOptions, type ClassComponentProperty, type ColorScheme, type ComponentPatch, type ComponentProperty, type ComponentPropertyBase, type ConditionComponentProperty, type ConnectOptions, type CopyObject, type CustomField, type CustomFieldAssignment, type CustomFieldGroup, type CustomFieldType, ETCH_API_VERSION, type Etch, type EtchAiApi, EtchApiError, type EtchApiErrorCode, type EtchBlockCommon, type EtchBlockContext, type EtchBlockJson, type EtchBlockOptions, type EtchBlockScript, type EtchBlockType, type EtchBlockTypeName, type EtchBlocksApi, type EtchBridgeConnection, type EtchComponentBlockJson, type EtchComponentsApi, type EtchConditionBlockJson, type EtchDynamicElementBlockJson, type EtchDynamicImageBlockJson, type EtchElementBlockJson, type EtchFieldsApi, type EtchHistoryApi, type EtchHtmlAttributes, type EtchLoop, type EtchLoopBlockJson, type EtchLoopConfig, type EtchLoopObj, type EtchLoopsApi, type EtchNavigationApi, type EtchPassthroughBlockJson, type EtchPostContentBlockJson, type EtchRawHtmlBlockJson, type EtchSkillsApi, type EtchSlotContentBlockJson, type EtchSlotPlaceholderBlockJson, type EtchStylesApi, type EtchStylesheetsApi, type EtchSvgBlockJson, type EtchTextBlockJson, type EtchUiApi, type ExternalAiState, type FindBlocksPredicate, type GroupComponentProperty, type GutenbergBlock, type LoopParamRef, type MetaQueryItem, type NavigationPlace, type NumberComponentProperty, type NumericParam, type ObjectComponentProperty, type PostCustomFieldGroupEntry, type PostCustomFieldValueEntry, type PostCustomFieldValueResponse, type PostCustomFieldValuesResponse, type PostSummary, type PublicBlockJson, type PublicComponentJson, type PublicComponentSummary, type RepeaterComponentProperty, type ResolvedCustomField, type SelectOptionsString, type SkillDetail, type SkillSummary, type StringComponentProperty, type StyleListFilter, type StylePatch, type StyleSelectorType, type StyleSummary, type StylesheetInput, type StylesheetPatch, type StylesheetSummary, type StylesheetType, type TaxQueryItem, type TemplateSummary, type WpQueryArgs, type WpTermsArgs, type WpUsersArgs, getEtch, isEtchApiError, isEtchAvailable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-gravy/etch-public-api",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "MIT-licensed typed client and contract for the Etch builder scripting API (window.etch). Etch itself is a separate proprietary product governed by its own commercial terms.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|