@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.
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.9.0-rc.160",
3
+ "version": "0.9.0-rc.161",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"