@crewx/sdk 0.9.0-rc.140 → 0.9.0-rc.141

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.
Files changed (37) hide show
  1. package/dist/app/app.d.ts +49 -1
  2. package/dist/app/content-media-types.d.ts +2 -0
  3. package/dist/app/context.d.ts +2 -0
  4. package/dist/app/frame.d.ts +56 -0
  5. package/dist/app/index.d.ts +4 -2
  6. package/dist/app/index.js +10 -9
  7. package/dist/app/protocol.d.ts +9 -0
  8. package/dist/app/runtime.d.ts +4 -2
  9. package/dist/app/tool-mode.d.ts +3 -0
  10. package/dist/esm/app/index.js +10 -9
  11. package/dist/esm/index.js +321 -288
  12. package/dist/esm/plugins/index.js +54 -54
  13. package/dist/esm/publish/index.js +2 -2
  14. package/dist/esm/repository/index.js +73 -73
  15. package/dist/esm/skills/index.js +2 -2
  16. package/dist/index.browser.js +3 -3
  17. package/dist/index.d.ts +5 -4
  18. package/dist/index.js +322 -289
  19. package/dist/mcp-app/content-channel.d.ts +3 -6
  20. package/dist/mcp-app/content-declarations.d.ts +4 -2
  21. package/dist/mcp-app/skill-backend.d.ts +3 -4
  22. package/dist/migrations/0036_ui_definition_archive.sql +8 -0
  23. package/dist/migrations/meta/0036_snapshot.json +3591 -0
  24. package/dist/migrations/meta/_journal.json +7 -0
  25. package/dist/plugins/index.js +53 -53
  26. package/dist/publish/index.js +2 -2
  27. package/dist/repository/index.js +70 -70
  28. package/dist/schema/index.d.ts +1 -0
  29. package/dist/schema/ui-definition-archive.d.ts +63 -0
  30. package/dist/skills/index.js +2 -2
  31. package/dist/ui-instance/index.d.ts +3 -3
  32. package/dist/ui-instance/lineage.d.ts +2 -0
  33. package/dist/ui-instance/store.d.ts +14 -0
  34. package/dist/ui-plugin/app-manifest.d.ts +7 -2
  35. package/dist/ui-plugin/index.d.ts +2 -2
  36. package/dist/ui-plugin/types.d.ts +10 -1
  37. package/package.json +1 -1
@@ -1,9 +1,8 @@
1
- import { UI_CONTENT_MEDIA_TYPES, isUiContentMediaType, isValidUiAppInstanceId } from './content-declarations.js';
1
+ import { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, sha256Content } from '../app/protocol.js';
2
+ import { isUiContentMediaType, isValidUiAppInstanceId } from './content-declarations.js';
2
3
  import type { UiContentMediaType } from './content-declarations.js';
3
- export { UI_CONTENT_MEDIA_TYPES, isUiContentMediaType, isValidUiAppInstanceId };
4
+ export { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, isUiContentMediaType, isValidUiAppInstanceId, sha256Content, };
4
5
  export type { UiContentMediaType };
5
- export declare const UI_CONTENT_MAX_BYTES: number;
6
- export declare const UI_CONTENT_MAX_LINES = 20000;
7
6
  export declare const UI_CONTENT_TICKET_TTL_MS = 120000;
8
7
  export declare const UI_CONTENT_OUTPUT_TTL_MS = 120000;
9
8
  export declare const UI_CONTENT_MAX_MEMORY_BYTES: number;
@@ -66,8 +65,6 @@ export declare class UiContentChannelError extends Error {
66
65
  readonly name = "UiContentChannelError";
67
66
  constructor(code: UiContentErrorCode);
68
67
  }
69
- export declare function sha256Content(bytes: Uint8Array): string;
70
- export declare function countContentLines(bytes: Uint8Array): number;
71
68
  export declare function decodeContentUtf8(bytes: Uint8Array): string;
72
69
  export declare function validateContentBytes(value: unknown, mediaType: unknown): {
73
70
  readonly bytes: Uint8Array;
@@ -1,6 +1,8 @@
1
+ import { UI_CONTENT_MEDIA_TYPES } from '../app/content-media-types.js';
2
+ import type { UiContentMediaType } from '../app/content-media-types.js';
1
3
  import type { UiDefinition, UiDefinitionRef } from '../ui-instance/types.js';
2
- export declare const UI_CONTENT_MEDIA_TYPES: readonly ["text/plain", "application/json"];
3
- export type UiContentMediaType = (typeof UI_CONTENT_MEDIA_TYPES)[number];
4
+ export { UI_CONTENT_MEDIA_TYPES };
5
+ export type { UiContentMediaType };
4
6
  export interface McpAppContentActionDeclaration {
5
7
  readonly actionId: string;
6
8
  readonly in?: {
@@ -1,11 +1,10 @@
1
+ import { SKILL_BACKEND_CONTENT_SCHEMA_VERSION, SKILL_BACKEND_MAX_INPUT_BYTES, SKILL_BACKEND_MAX_OUTPUT_BYTES } from '../app/protocol.js';
1
2
  import type { ContentFrame, UiContentMediaType, UiContentRangeRequest } from './content-channel.js';
2
3
  import type { JsonObject, UiExternalActionHandlerRegistration, UiSkillBackendEnvironmentKey } from '../ui-instance/types.js';
3
4
  import type { UiPluginNormalizedManifestV2 } from '../ui-plugin/types.js';
4
5
  import type { ProductAppBundleProvenance, WorkspaceAppCandidate, WorkspaceAppSource } from './discovery.js';
5
6
  export declare const SKILL_BACKEND_SCHEMA_VERSION: 1;
6
- export declare const SKILL_BACKEND_CONTENT_SCHEMA_VERSION: 2;
7
- export declare const SKILL_BACKEND_MAX_INPUT_BYTES = 524288;
8
- export declare const SKILL_BACKEND_MAX_OUTPUT_BYTES = 524288;
7
+ export { SKILL_BACKEND_CONTENT_SCHEMA_VERSION, SKILL_BACKEND_MAX_INPUT_BYTES, SKILL_BACKEND_MAX_OUTPUT_BYTES, };
9
8
  export declare const SKILL_BACKEND_DEFAULT_TIMEOUT_MS = 15000;
10
9
  export declare const SKILL_BACKEND_INHERITED_ENV_ALLOWLIST: readonly ["CREWX_HOME", "CREWX_DB", "XDG_CONFIG_HOME"];
11
10
  export type SkillBackendInfrastructureErrorCode = 'EXEC_DENIED' | 'EXEC_TIMEOUT' | 'EXEC_OUTPUT_INVALID' | 'EXECUTION_FAILED' | 'ACTION_IN_FLIGHT' | 'INPUT_INVALID';
@@ -59,6 +58,7 @@ interface SkillBackendExecutionRequestBase {
59
58
  readonly actionId: string;
60
59
  readonly relativePath: string;
61
60
  readonly command: readonly string[];
61
+ readonly entry?: string;
62
62
  readonly payload: SkillBackendPayload;
63
63
  readonly content?: {
64
64
  readonly in?: ContentFrame;
@@ -130,4 +130,3 @@ export type SkillBackendHandlerBuildInput = SkillBackendHandlerBuildInputBase &
130
130
  export declare function buildSkillBackendHandler(normalized: UiPluginNormalizedManifestV2, actionId: string, source: WorkspaceAppSource, relativePath: string, execute: SkillBackendExecutionPort): UiExternalActionHandlerRegistration | undefined;
131
131
  export declare function buildSkillBackendHandler(input: SkillBackendHandlerBuildInput): UiExternalActionHandlerRegistration | undefined;
132
132
  export declare function buildVerifiedBundleSkillBackendHandler(input: VerifiedBundleSkillBackendBuildInput): UiExternalActionHandlerRegistration | undefined;
133
- export {};
@@ -0,0 +1,8 @@
1
+ CREATE TABLE IF NOT EXISTS `ui_definition_archive` (
2
+ `definition_hash` text PRIMARY KEY NOT NULL,
3
+ `definition_json` text NOT NULL,
4
+ `created_at` integer NOT NULL,
5
+ CONSTRAINT "ui_definition_archive_definition_hash_ck" CHECK(length("ui_definition_archive"."definition_hash") = 64 AND "ui_definition_archive"."definition_hash" NOT GLOB '*[^0-9a-f]*'),
6
+ CONSTRAINT "ui_definition_archive_definition_json_ck" CHECK(json_valid("ui_definition_archive"."definition_json") AND json_type("ui_definition_archive"."definition_json") = 'object'),
7
+ CONSTRAINT "ui_definition_archive_created_at_ck" CHECK("ui_definition_archive"."created_at" >= 0)
8
+ );