@crewx/sdk 0.9.0-rc.160 → 0.9.0-rc.161
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/app/app.d.ts +10 -1
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.js +10 -10
- package/dist/app/schedule-contract.d.ts +59 -0
- package/dist/esm/app/index.js +10 -10
- package/dist/esm/index.js +295 -295
- package/dist/esm/publish/index.js +2 -2
- package/dist/esm/skills/index.js +2 -2
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.js +4 -4
- package/dist/index.d.ts +8 -2
- package/dist/index.js +223 -223
- package/dist/mcp-app/app-icon-read.d.ts +7 -0
- package/dist/mcp-app/app-schedule.d.ts +85 -0
- package/dist/mcp-app/dev-checks.d.ts +2 -0
- package/dist/mcp-app/discovery.d.ts +3 -0
- package/dist/mcp-app/index.d.ts +5 -1
- package/dist/mcp-app/skill-backend.d.ts +5 -2
- package/dist/mcp-app/workspace-snapshot.d.ts +3 -0
- package/dist/publish/errors.d.ts +1 -1
- package/dist/publish/index.d.ts +5 -0
- package/dist/publish/index.js +2 -2
- package/dist/skills/index.js +2 -2
- package/dist/ui-instance/types.d.ts +8 -0
- package/dist/ui-plugin/app-icon.d.ts +50 -0
- package/dist/ui-plugin/index.d.ts +2 -0
- package/dist/ui-plugin/types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppScheduleDirective, AppScheduleIntervalMinutes, AppScheduleSnapshot } from '../app/schedule-contract.js';
|
|
1
2
|
import type { ContentFrame, UiActionContentDeclaration, UiContentChannelPort, UiContentRangeRequest } from '../mcp-app/content-channel.js';
|
|
2
3
|
export type JsonPrimitive = string | number | boolean | null;
|
|
3
4
|
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
@@ -23,6 +24,11 @@ export interface UiDefinitionAction {
|
|
|
23
24
|
readonly resultProjection?: UiProjectionPolicy;
|
|
24
25
|
readonly content?: UiActionContentDeclaration;
|
|
25
26
|
readonly env?: readonly UiSkillBackendEnvironmentKey[];
|
|
27
|
+
readonly schedule?: UiDefinitionActionSchedule;
|
|
28
|
+
}
|
|
29
|
+
export interface UiDefinitionActionSchedule {
|
|
30
|
+
readonly everyMinutes: AppScheduleIntervalMinutes;
|
|
31
|
+
readonly timeoutMs: number;
|
|
26
32
|
}
|
|
27
33
|
export interface UiProjectionPolicy {
|
|
28
34
|
allow: readonly string[];
|
|
@@ -234,11 +240,13 @@ export interface UiActionHandlerContext {
|
|
|
234
240
|
readonly range?: UiContentRangeRequest;
|
|
235
241
|
};
|
|
236
242
|
};
|
|
243
|
+
schedule?: AppScheduleSnapshot;
|
|
237
244
|
}
|
|
238
245
|
export type UiActionHandlerResult = {
|
|
239
246
|
state?: JsonObject;
|
|
240
247
|
result?: JsonObject;
|
|
241
248
|
content?: ContentFrame;
|
|
249
|
+
schedule?: AppScheduleDirective;
|
|
242
250
|
} | {
|
|
243
251
|
outcome: 'rejected' | 'failed';
|
|
244
252
|
errorCode: string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const APP_ICON_MAX_BYTES = 262144;
|
|
2
|
+
export type AppIconContentType = 'image/svg+xml' | 'image/png' | 'image/jpeg';
|
|
3
|
+
export type AppIconReason = 'missing' | 'bad-path' | 'bad-type' | 'bytes-mismatch' | 'too-large' | 'unsafe-svg';
|
|
4
|
+
export interface AppIconDiagnostic {
|
|
5
|
+
readonly code: 'ICON_INVALID' | 'ICON_NOT_FILE' | 'ICON_NOT_SQUARE';
|
|
6
|
+
readonly severity: 'error' | 'warning';
|
|
7
|
+
readonly reason?: AppIconReason;
|
|
8
|
+
readonly declared?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AppIconFileBytes {
|
|
11
|
+
readonly path: string;
|
|
12
|
+
readonly contentType: AppIconContentType;
|
|
13
|
+
readonly byteLength: number;
|
|
14
|
+
readonly bytes: Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
export interface AppIconFile {
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly sha256: string;
|
|
19
|
+
readonly contentType: AppIconContentType;
|
|
20
|
+
readonly byteLength: number;
|
|
21
|
+
}
|
|
22
|
+
export type AppIconDeclaration = {
|
|
23
|
+
readonly kind: 'none';
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: 'file';
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly contentType: AppIconContentType;
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: 'url';
|
|
30
|
+
readonly declared: string;
|
|
31
|
+
} | {
|
|
32
|
+
readonly kind: 'invalid';
|
|
33
|
+
readonly reason: 'bad-path' | 'bad-type';
|
|
34
|
+
readonly declared?: string;
|
|
35
|
+
};
|
|
36
|
+
export type AppIconReadFailure = 'missing' | 'bad-path' | 'too-large';
|
|
37
|
+
export interface ResolvedAppIcon {
|
|
38
|
+
readonly file?: AppIconFileBytes;
|
|
39
|
+
readonly diagnostics: readonly AppIconDiagnostic[];
|
|
40
|
+
}
|
|
41
|
+
export declare function classifyAppIconDeclaration(value: unknown): AppIconDeclaration;
|
|
42
|
+
export declare function resolveAppIcon(value: unknown, read: (path: string) => Promise<Uint8Array | AppIconReadFailure>): Promise<ResolvedAppIcon>;
|
|
43
|
+
export type AppIconInspection = {
|
|
44
|
+
readonly ok: true;
|
|
45
|
+
readonly square: boolean | undefined;
|
|
46
|
+
} | {
|
|
47
|
+
readonly ok: false;
|
|
48
|
+
readonly reason: AppIconReason;
|
|
49
|
+
};
|
|
50
|
+
export declare function inspectAppIconBytes(contentType: AppIconContentType, bytes: Uint8Array): AppIconInspection;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { canonicalManifestJson, manifestHash } from './manifest.js';
|
|
2
2
|
export { APP_MANIFEST_FILE, APP_MANIFEST_FILES, APP_MANIFEST_PASSTHROUGH_KEYS, APP_MANIFEST_REQUIRED_KEYS, CREWX_META_NAMESPACE, CREWX_META_OPTIONAL_KEYS, CREWX_META_REQUIRED_KEYS, LEGACY_APP_MANIFEST_FILE, MCPB_MANIFEST_KEYS, MCPB_MANIFEST_VERSION, appManifestDefinitionHash, APP_TOOLS_FILE, claimsCrewxNamespace, isAppSemver, resolveAppManifest, } from './app-manifest.js';
|
|
3
3
|
export type { AppManifestFailure, AppManifestFileBytes, AppManifestFileName, AppManifestFileResult, AppManifestIdentity, AppManifestOptions, AppManifestReason, AppManifestRejection, AppManifestRejectionCode, AppManifestResult, AppManifestSource, AppToolsFileName, } from './app-manifest.js';
|
|
4
|
+
export { APP_ICON_MAX_BYTES, classifyAppIconDeclaration, inspectAppIconBytes, resolveAppIcon, } from './app-icon.js';
|
|
5
|
+
export type { AppIconContentType, AppIconDeclaration, AppIconDiagnostic, AppIconFile, AppIconFileBytes, AppIconInspection, AppIconReadFailure, AppIconReason, ResolvedAppIcon, } from './app-icon.js';
|
|
4
6
|
export { UiPluginValidationError, normalizeManifest, validateInitialState, validateManifest, validatePayload, } from './validator.js';
|
|
5
7
|
export { UI_PLUGIN_CAPABILITY_PATTERN, UI_PLUGIN_HANDLER_PATTERN, UI_PLUGIN_IDENTIFIER_PATTERN, UI_PLUGIN_MAX_ACTIONS, UI_PLUGIN_MAX_ARRAY_LENGTH, UI_PLUGIN_MAX_CANDIDATE_DEPTH, UI_PLUGIN_MAX_COMMAND_LENGTH, UI_PLUGIN_MAX_COMMAND_PARTS, UI_PLUGIN_MAX_DISCOVERED_APPS, UI_PLUGIN_MAX_DISCOVERY_TIME_MS, UI_PLUGIN_MAX_HEIGHT, UI_PLUGIN_MAX_INITIAL_STATE_BYTES, UI_PLUGIN_MAX_JSON_DEPTH, UI_PLUGIN_MAX_MANIFEST_BYTES, UI_PLUGIN_MAX_PROJECTION_PATHS, UI_PLUGIN_MAX_SCHEMA_DEPTH, UI_PLUGIN_MAX_SCHEMA_PROPERTIES, UI_PLUGIN_MAX_STRING_LENGTH, UI_PLUGIN_MAX_SUBTREE_BYTES, UI_PLUGIN_MAX_SURFACES, UI_PLUGIN_RESERVED_STATE_KEYS, UI_PLUGIN_SAFE_PATH_PATTERN, UI_PLUGIN_SAFE_PATH_SEGMENT_PATTERN, UI_PLUGIN_SKILL_TOKEN_PATTERN, UI_PLUGIN_SURFACES, UI_PLUGIN_TONES, isUiPluginReservedStateKey, } from './limits.js';
|
|
6
8
|
export type { UiPluginActivation, UiPluginAction, UiPluginBackend, UiPluginCardShellNode, UiPluginCoreBackend, UiPluginFieldSchema, UiPluginHeadingNode, UiPluginInputSchema, UiPluginJsonSchema, UiPluginJsonSchemaType, UiPluginLabeledTextNode, UiPluginLayoutNode, UiPluginLayout, UiPluginManifest, UiPluginManifestMode, UiPluginManifestV1, UiPluginManifestV2, UiPluginCspRequest, UiPluginRuntimeRequest, UiPluginMetaBannerNode, UiPluginNormalizedManifestV2, UiPluginNormalizedV2, UiPluginPayload, UiPluginPayloadValue, UiPluginPrimitive, UiPluginProjectionPolicy, UiPluginResourceMetadata, UiPluginResourceRef, UiPluginSchemaType, UiPluginSchema, UiPluginSize, UiPluginSkillBackend, UiPluginStep, UiPluginStepFlowNode, UiPluginStepListSchema, UiPluginTextListNode, UiPluginTextListSchema, UiPluginTextSchema, UiPluginSurface, UiPluginTone, UiPluginHandlerMetadata, UiPluginValidationErrorCode, UiPluginValidationOptions, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonObject, JsonValue, UiActionConfirmation, UiDefinitionInput } from '../ui-instance/types.js';
|
|
1
|
+
import type { JsonObject, JsonValue, UiActionConfirmation, UiDefinitionActionSchedule, UiDefinitionInput } from '../ui-instance/types.js';
|
|
2
2
|
import type { APP_TOOL_ENTRY } from '../app/tool-mode.js';
|
|
3
3
|
import type { UiSkillBackendEnvironmentKey } from '../ui-instance/types.js';
|
|
4
4
|
import type { UiActionContentDeclaration } from '../mcp-app/content-channel.js';
|
|
@@ -123,6 +123,7 @@ export interface UiPluginAction {
|
|
|
123
123
|
readonly content?: UiActionContentDeclaration;
|
|
124
124
|
readonly dataInputs?: readonly string[];
|
|
125
125
|
readonly confirmation?: UiActionConfirmation;
|
|
126
|
+
readonly schedule?: UiDefinitionActionSchedule;
|
|
126
127
|
readonly _meta?: JsonObject;
|
|
127
128
|
}
|
|
128
129
|
export interface UiPluginResourceRef {
|