@crewai-ts/core 0.1.1 → 0.1.3

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 (90) hide show
  1. package/dist/a2a.d.ts +1684 -0
  2. package/dist/a2ui-schemas.d.ts +3312 -0
  3. package/dist/a2ui.d.ts +379 -0
  4. package/dist/agent-adapters.d.ts +178 -0
  5. package/dist/agent-executors.d.ts +508 -0
  6. package/dist/agent-parser.d.ts +44 -0
  7. package/dist/agent-planning.d.ts +358 -0
  8. package/dist/agent-utils.d.ts +210 -0
  9. package/dist/agent.d.ts +444 -0
  10. package/dist/auth.d.ts +179 -0
  11. package/dist/config-utils.d.ts +5 -0
  12. package/dist/content-processor.d.ts +12 -0
  13. package/dist/context.d.ts +157 -0
  14. package/dist/converter.d.ts +97 -0
  15. package/dist/crew-chat.d.ts +97 -0
  16. package/dist/crew.d.ts +424 -0
  17. package/dist/decorators.d.ts +20 -0
  18. package/dist/env.d.ts +13 -0
  19. package/dist/errors.d.ts +27 -0
  20. package/dist/evaluators.d.ts +477 -0
  21. package/dist/events.d.ts +2657 -0
  22. package/dist/execution-utils.d.ts +85 -0
  23. package/dist/experimental-conversational.d.ts +181 -0
  24. package/dist/file-handler.d.ts +36 -0
  25. package/dist/file-store.d.ts +37 -0
  26. package/dist/files.d.ts +554 -0
  27. package/dist/flow-conversation.d.ts +90 -0
  28. package/dist/flow-definition.d.ts +195 -0
  29. package/dist/flow-persistence.d.ts +107 -0
  30. package/dist/flow-visualization.d.ts +77 -0
  31. package/dist/flow.d.ts +927 -0
  32. package/dist/formatter.d.ts +7 -0
  33. package/dist/guardrail.d.ts +95 -0
  34. package/dist/hooks.d.ts +241 -0
  35. package/dist/human-input.d.ts +74 -0
  36. package/dist/i18n.d.ts +26 -0
  37. package/dist/index.d.ts +99 -13004
  38. package/dist/input-files.d.ts +24 -0
  39. package/dist/input-provider.d.ts +22 -0
  40. package/dist/knowledge.d.ts +353 -0
  41. package/dist/lite-agent-output.d.ts +69 -0
  42. package/dist/lite-agent.d.ts +154 -0
  43. package/dist/llm.d.ts +630 -0
  44. package/dist/llms-hooks-transport.d.ts +1 -2
  45. package/dist/lock-store.d.ts +14 -0
  46. package/dist/logger.d.ts +55 -0
  47. package/dist/mcp.d.ts +315 -0
  48. package/dist/memory.d.ts +915 -0
  49. package/dist/metadata.d.ts +9 -0
  50. package/dist/misc-compat.d.ts +125 -0
  51. package/dist/openai-completion.d.ts +324 -0
  52. package/dist/outputs.d.ts +69 -0
  53. package/dist/planning.d.ts +60 -0
  54. package/dist/plus-api.d.ts +194 -0
  55. package/dist/project-compat.d.ts +133 -0
  56. package/dist/project.d.ts +221 -0
  57. package/dist/prompts.d.ts +66 -0
  58. package/dist/provider-completions.d.ts +593 -0
  59. package/dist/rag.d.ts +1074 -0
  60. package/dist/rpm.d.ts +27 -0
  61. package/dist/rw-lock.d.ts +21 -0
  62. package/dist/schema-utils.d.ts +121 -0
  63. package/dist/security.d.ts +66 -0
  64. package/dist/settings.d.ts +103 -0
  65. package/dist/skills.d.ts +145 -0
  66. package/dist/state-provider-core.d.ts +1 -1
  67. package/dist/state.d.ts +204 -0
  68. package/dist/step-execution-context.d.ts +36 -0
  69. package/dist/streaming.d.ts +153 -0
  70. package/dist/string-utils.d.ts +12 -0
  71. package/dist/task-output-storage.d.ts +62 -0
  72. package/dist/task.d.ts +305 -0
  73. package/dist/telemetry.d.ts +91 -0
  74. package/dist/token-counter-callback.d.ts +36 -0
  75. package/dist/tools.d.ts +563 -0
  76. package/dist/tracing-utils.d.ts +56 -0
  77. package/dist/training-converter.d.ts +36 -0
  78. package/dist/training-handler.d.ts +10 -0
  79. package/dist/types.d.ts +72 -0
  80. package/dist/utilities.d.ts +130 -0
  81. package/dist/utility-types.d.ts +10 -0
  82. package/dist/version.d.ts +12 -0
  83. package/package.json +326 -4904
  84. package/dist/index.d.cts +0 -13068
  85. package/dist/llms-hooks-transport-ChGiFBiU.d.ts +0 -233
  86. package/dist/llms-hooks-transport-DZlurMUQ.d.cts +0 -233
  87. package/dist/llms-hooks-transport.d.cts +0 -2
  88. package/dist/state-provider-core-Be9RKRAm.d.cts +0 -4876
  89. package/dist/state-provider-core-Be9RKRAm.d.ts +0 -4876
  90. package/dist/state-provider-core.d.cts +0 -1
package/dist/rpm.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ export declare class RpmController {
2
+ readonly maxRpm: number;
3
+ private nextRequestAt;
4
+ private queue;
5
+ constructor(maxRpm: number);
6
+ waitForSlot(): Promise<void>;
7
+ reset(): void;
8
+ }
9
+ export declare class RPMController extends RpmController {
10
+ readonly max_rpm: number | null;
11
+ _current_rpm: number;
12
+ private rpmResetTimer;
13
+ private rpmShutdownFlag;
14
+ constructor(options?: number | {
15
+ maxRpm?: number | null;
16
+ max_rpm?: number | null;
17
+ });
18
+ checkOrWait(): boolean;
19
+ check_or_wait(): boolean;
20
+ _check_and_increment(): boolean;
21
+ resetCounter(): this;
22
+ reset_counter(): this;
23
+ stopRpmCounter(): void;
24
+ stop_rpm_counter(): void;
25
+ _wait_for_next_minute(): Promise<void>;
26
+ _reset_request_count(): void;
27
+ }
@@ -0,0 +1,21 @@
1
+ export declare class RWLock {
2
+ private readers;
3
+ private writer;
4
+ private readonly waiters;
5
+ rAcquire(): Promise<void>;
6
+ r_acquire(): Promise<void>;
7
+ rRelease(): void;
8
+ r_release(): void;
9
+ wAcquire(): Promise<void>;
10
+ w_acquire(): Promise<void>;
11
+ wRelease(): void;
12
+ w_release(): void;
13
+ withReadLock<T>(fn: () => T | Promise<T>): Promise<T>;
14
+ r_locked<T>(fn: () => T | Promise<T>): Promise<T>;
15
+ withWriteLock<T>(fn: () => T | Promise<T>): Promise<T>;
16
+ w_locked<T>(fn: () => T | Promise<T>): Promise<T>;
17
+ get activeReaders(): number;
18
+ get hasWriter(): boolean;
19
+ private hasWaitingWriter;
20
+ private drainWaiters;
21
+ }
@@ -0,0 +1,121 @@
1
+ export type JsonSchema = Record<string, unknown>;
2
+ export interface JsonSchemaInfo {
3
+ name: string;
4
+ strict: true;
5
+ schema: JsonSchema;
6
+ }
7
+ export interface ModelDescription {
8
+ type: "json_schema";
9
+ json_schema: JsonSchemaInfo;
10
+ }
11
+ export declare const JsonSchemaInfo: {
12
+ new (options: {
13
+ name: string;
14
+ schema: JsonSchema;
15
+ strict?: true;
16
+ }): {
17
+ readonly name: string;
18
+ readonly strict: true;
19
+ readonly schema: JsonSchema;
20
+ };
21
+ };
22
+ export declare const ModelDescription: {
23
+ new (options: {
24
+ json_schema: InstanceType<typeof JsonSchemaInfo> | {
25
+ name: string;
26
+ schema: JsonSchema;
27
+ strict?: true;
28
+ };
29
+ }): {
30
+ readonly type: "json_schema";
31
+ readonly json_schema: InstanceType<typeof JsonSchemaInfo>;
32
+ };
33
+ };
34
+ export declare const FORMAT_TYPE_MAP: {
35
+ readonly "date-time": "string";
36
+ readonly date: "string";
37
+ readonly time: "string";
38
+ readonly duration: "string";
39
+ };
40
+ export declare const OPENAI_SUPPORTED_FORMATS: Set<"time" | "date" | "date-time" | "duration">;
41
+ export declare function resolveRefs(schema: JsonSchema): JsonSchema;
42
+ export declare function addKeyInDictRecursively(schema: JsonSchema, key: string, value: unknown, criteria: (schema: JsonSchema) => boolean): JsonSchema;
43
+ export declare function forceAdditionalPropertiesFalse<T>(schema: T): T;
44
+ export declare function stripUnsupportedFormats<T>(schema: T): T;
45
+ export declare function ensureTypeInSchemas<T>(schema: T): T;
46
+ export declare function fixDiscriminatorMappings(schema: JsonSchema): JsonSchema;
47
+ export declare function addConstToOneOfVariants(schema: JsonSchema): JsonSchema;
48
+ export declare function convertOneOfToAnyOf(schema: JsonSchema): JsonSchema;
49
+ export declare function ensureAllPropertiesRequired(schema: JsonSchema): JsonSchema;
50
+ export declare function stripNullFromTypes(schema: JsonSchema): JsonSchema;
51
+ declare function stripKeysRecursive<T>(schema: T, keys: readonly string[]): T;
52
+ export declare const _strip_keys_recursive: typeof stripKeysRecursive;
53
+ export declare function liftTopLevelAnyOf(schema: JsonSchema): JsonSchema;
54
+ declare function commonStrictPipeline(params: JsonSchema): JsonSchema;
55
+ export declare const _common_strict_pipeline: typeof commonStrictPipeline;
56
+ export declare function sanitizeToolParamsForOpenAIStrict<T>(params: T): T;
57
+ export declare function sanitizeToolParamsForAnthropicStrict<T>(params: T): T;
58
+ export declare function sanitizeToolParamsForBedrockStrict<T>(params: T): T;
59
+ export declare function buildRichFieldDescription(propSchema: JsonSchema): string;
60
+ export declare function _inline_top_level_ref(schema: JsonSchema, rootSchema?: JsonSchema): JsonSchema;
61
+ export declare function _process_oneof(schema: JsonSchema): JsonSchema;
62
+ export declare function generateModelDescription(name: string, schema: JsonSchema, options?: {
63
+ stripNullTypes?: boolean;
64
+ }): ModelDescription;
65
+ export declare const resolve_refs: typeof resolveRefs;
66
+ export declare const add_key_in_dict_recursively: typeof addKeyInDictRecursively;
67
+ export declare const force_additional_properties_false: typeof forceAdditionalPropertiesFalse;
68
+ export declare const strip_unsupported_formats: typeof stripUnsupportedFormats;
69
+ export declare const ensure_type_in_schemas: typeof ensureTypeInSchemas;
70
+ export declare const fix_discriminator_mappings: typeof fixDiscriminatorMappings;
71
+ export declare const add_const_to_oneof_variants: typeof addConstToOneOfVariants;
72
+ export declare const convert_oneof_to_anyof: typeof convertOneOfToAnyOf;
73
+ export declare const ensure_all_properties_required: typeof ensureAllPropertiesRequired;
74
+ export declare const strip_null_from_types: typeof stripNullFromTypes;
75
+ export declare const lift_top_level_anyof: typeof liftTopLevelAnyOf;
76
+ export declare const sanitize_tool_params_for_openai_strict: typeof sanitizeToolParamsForOpenAIStrict;
77
+ export declare const sanitize_tool_params_for_anthropic_strict: typeof sanitizeToolParamsForAnthropicStrict;
78
+ export declare const sanitize_tool_params_for_bedrock_strict: typeof sanitizeToolParamsForBedrockStrict;
79
+ export declare const build_rich_field_description: typeof buildRichFieldDescription;
80
+ export declare const generate_model_description: typeof generateModelDescription;
81
+ export declare function serializeModelClass(model: unknown): JsonSchema;
82
+ export declare const serialize_model_class: typeof serializeModelClass;
83
+ export type SchemaModelField = {
84
+ name: string;
85
+ required: boolean;
86
+ description: string | null;
87
+ schema: JsonSchema;
88
+ annotation?: CreatedSchemaModel;
89
+ };
90
+ export type CreatedSchemaModel = {
91
+ name: string;
92
+ __name__: string;
93
+ schema: JsonSchema;
94
+ model_fields: Record<string, SchemaModelField>;
95
+ modelFields: Record<string, SchemaModelField>;
96
+ modelValidate(value: unknown): unknown;
97
+ model_validate(value: unknown): unknown;
98
+ };
99
+ type CreateModelOptions = {
100
+ rootSchema?: JsonSchema | null;
101
+ root_schema?: JsonSchema | null;
102
+ modelName?: string | null;
103
+ model_name?: string | null;
104
+ enrichDescriptions?: boolean;
105
+ enrich_descriptions?: boolean;
106
+ };
107
+ export declare function createModelFromSchema(schemaOrName: JsonSchema | string, schemaOrOptions?: JsonSchema | CreateModelOptions, maybeOptions?: CreateModelOptions): CreatedSchemaModel;
108
+ export declare const create_model_from_schema: typeof createModelFromSchema;
109
+ export declare function _resolve_ref(ref: string, rootSchema: JsonSchema): JsonSchema;
110
+ export declare function _merge_all_of_schemas(schemas: readonly JsonSchema[], rootSchema?: JsonSchema): JsonSchema;
111
+ export declare function _json_schema_to_pydantic_type(schema: JsonSchema): string;
112
+ export declare function _json_schema_to_pydantic_field(name: string, schema: JsonSchema, required?: readonly string[]): {
113
+ name: string;
114
+ type: string;
115
+ required: boolean;
116
+ schema: JsonSchema;
117
+ };
118
+ export declare function _build_model_from_schema(schema: JsonSchema, _effectiveRoot?: JsonSchema, options?: {
119
+ model_name?: string | null;
120
+ }): ReturnType<typeof createModelFromSchema>;
121
+ export {};
@@ -0,0 +1,66 @@
1
+ export declare const CREW_AI_NAMESPACE = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
2
+ export type FingerprintMetadata = Record<string, unknown>;
3
+ export type FingerprintOptions = {
4
+ metadata?: FingerprintMetadata;
5
+ };
6
+ export type FingerprintDict = {
7
+ uuid_str?: string;
8
+ uuidStr?: string;
9
+ created_at?: string;
10
+ createdAt?: string;
11
+ metadata?: FingerprintMetadata;
12
+ };
13
+ export declare class Fingerprint {
14
+ private uuidValue;
15
+ private createdAtValue;
16
+ metadata: FingerprintMetadata;
17
+ constructor(options?: FingerprintOptions);
18
+ get uuidStr(): string;
19
+ get uuid_str(): string;
20
+ get createdAt(): Date;
21
+ get created_at(): Date;
22
+ get uuid(): string;
23
+ static generate(seed?: string | null, metadata?: FingerprintMetadata | null): Fingerprint;
24
+ static generateUuid(seed: string): string;
25
+ static _generate_uuid(seed: string): string;
26
+ static fromDict(data: FingerprintDict | null | undefined): Fingerprint;
27
+ static from_dict(data: FingerprintDict | null | undefined): Fingerprint;
28
+ toDict(): Required<Pick<FingerprintDict, "metadata">> & {
29
+ uuid_str: string;
30
+ created_at: string;
31
+ };
32
+ to_dict(): Required<Pick<FingerprintDict, "metadata">> & {
33
+ uuid_str: string;
34
+ created_at: string;
35
+ };
36
+ equals(other: unknown): boolean;
37
+ __eq__(other: unknown): boolean;
38
+ __hash__(): number;
39
+ toString(): string;
40
+ __str__(): string;
41
+ }
42
+ export type SecurityConfigOptions = {
43
+ fingerprint?: Fingerprint | FingerprintDict | string | null;
44
+ };
45
+ export declare class SecurityConfig {
46
+ fingerprint: Fingerprint;
47
+ constructor(options?: SecurityConfigOptions);
48
+ static validateFingerprint(value?: Fingerprint | FingerprintDict | string | null): Fingerprint;
49
+ static validate_fingerprint(value?: Fingerprint | FingerprintDict | string | null): Fingerprint;
50
+ static fromDict(data: {
51
+ fingerprint?: FingerprintDict | null;
52
+ } | null | undefined): SecurityConfig;
53
+ static from_dict(data: {
54
+ fingerprint?: FingerprintDict | null;
55
+ } | null | undefined): SecurityConfig;
56
+ cloneWithNewFingerprint(): SecurityConfig;
57
+ toDict(): {
58
+ fingerprint: ReturnType<Fingerprint["toDict"]>;
59
+ };
60
+ to_dict(): {
61
+ fingerprint: ReturnType<Fingerprint["toDict"]>;
62
+ };
63
+ }
64
+ export declare function coerceSecurityConfig(value?: SecurityConfig | SecurityConfigOptions | null): SecurityConfig;
65
+ export declare function validateMetadata(metadata: unknown): FingerprintMetadata;
66
+ export declare const _validate_metadata: typeof validateMetadata;
@@ -0,0 +1,103 @@
1
+ import { TokenManager } from "./auth.js";
2
+ export declare const CREWAI_TRAINED_AGENTS_FILE_ENV = "CREWAI_TRAINED_AGENTS_FILE";
3
+ export declare const TRAINING_DATA_FILE = "training_data.pkl";
4
+ export declare const TRAINED_AGENTS_DATA_FILE = "trained_agents_data.pkl";
5
+ export declare const KNOWLEDGE_DIRECTORY = "knowledge";
6
+ export declare const MAX_FILE_NAME_LENGTH = 255;
7
+ export declare const EMITTER_COLOR = "bold_blue";
8
+ export declare const CC_ENV_VAR = "CLAUDECODE";
9
+ export declare const CODEX_ENV_VARS: readonly ["CODEX_CI", "CODEX_MANAGED_BY_NPM", "CODEX_SANDBOX", "CODEX_SANDBOX_NETWORK_DISABLED", "CODEX_THREAD_ID"];
10
+ export declare const CURSOR_ENV_VARS: readonly ["CURSOR_AGENT", "CURSOR_EXTENSION_HOST_ROLE", "CURSOR_SANDBOX", "CURSOR_TRACE_ID", "CURSOR_WORKSPACE_LABEL"];
11
+ export declare class _NotSpecified {
12
+ toString(): string;
13
+ toJSON(): string;
14
+ static __get_pydantic_core_schema__(): {
15
+ type: "plain-validator";
16
+ validator: (value: unknown) => _NotSpecified;
17
+ serialization: {
18
+ type: "plain-serializer";
19
+ serializer: () => string;
20
+ };
21
+ };
22
+ }
23
+ export declare const NotSpecified: typeof _NotSpecified;
24
+ export declare const NOT_SPECIFIED: _NotSpecified;
25
+ export declare const DEFAULT_CREWAI_ENTERPRISE_URL = "https://app.crewai.com";
26
+ export declare const CREWAI_ENTERPRISE_DEFAULT_OAUTH2_PROVIDER = "workos";
27
+ export declare const CREWAI_ENTERPRISE_DEFAULT_OAUTH2_AUDIENCE = "client_01JNJQWBJ4SPFN3SWJM5T7BDG8";
28
+ export declare const CREWAI_ENTERPRISE_DEFAULT_OAUTH2_CLIENT_ID = "client_01JYT06R59SP0NXYGD994NFXXX";
29
+ export declare const CREWAI_ENTERPRISE_DEFAULT_OAUTH2_DOMAIN = "login.crewai.com";
30
+ export declare const DEFAULT_CONFIG_PATH: string;
31
+ export declare const USER_SETTINGS_KEYS: readonly ["tool_repository_username", "tool_repository_password", "org_name", "org_uuid"];
32
+ export declare const CLI_SETTINGS_KEYS: readonly ["enterprise_base_url", "oauth2_provider", "oauth2_audience", "oauth2_client_id", "oauth2_domain", "oauth2_extra"];
33
+ export declare const DEFAULT_CLI_SETTINGS: {
34
+ readonly enterprise_base_url: "https://app.crewai.com";
35
+ readonly oauth2_provider: "workos";
36
+ readonly oauth2_audience: "client_01JNJQWBJ4SPFN3SWJM5T7BDG8";
37
+ readonly oauth2_client_id: "client_01JYT06R59SP0NXYGD994NFXXX";
38
+ readonly oauth2_domain: "login.crewai.com";
39
+ readonly oauth2_extra: {};
40
+ };
41
+ export declare const READONLY_SETTINGS_KEYS: readonly ["org_name", "org_uuid"];
42
+ export declare const HIDDEN_SETTINGS_KEYS: readonly ["config_path", "tool_repository_username", "tool_repository_password"];
43
+ export type SettingsData = {
44
+ enterprise_base_url?: string | null;
45
+ tool_repository_username?: string | null;
46
+ tool_repository_password?: string | null;
47
+ org_name?: string | null;
48
+ org_uuid?: string | null;
49
+ oauth2_provider?: string;
50
+ oauth2_audience?: string | null;
51
+ oauth2_client_id?: string;
52
+ oauth2_domain?: string;
53
+ oauth2_extra?: Record<string, unknown>;
54
+ };
55
+ export type SettingsOptions = SettingsData & {
56
+ configPath?: string | null;
57
+ config_path?: string | null;
58
+ tokenManager?: TokenManager;
59
+ token_manager?: TokenManager;
60
+ };
61
+ export declare class Settings {
62
+ enterprise_base_url: string | null;
63
+ tool_repository_username: string | null;
64
+ tool_repository_password: string | null;
65
+ org_name: string | null;
66
+ org_uuid: string | null;
67
+ readonly config_path: string;
68
+ readonly configPath: string;
69
+ oauth2_provider: string;
70
+ oauth2_audience: string | null;
71
+ oauth2_client_id: string;
72
+ oauth2_domain: string;
73
+ oauth2_extra: Record<string, unknown>;
74
+ private readonly tokenManager;
75
+ constructor(options?: SettingsOptions);
76
+ clearUserSettings(): void;
77
+ clear_user_settings(): void;
78
+ reset(): void;
79
+ dump(): void;
80
+ toJSON(): SettingsData;
81
+ private resetUserSettings;
82
+ private resetCliSettings;
83
+ private clearAuthTokens;
84
+ }
85
+ export declare function getWritableConfigPath(): string | null;
86
+ export declare const get_writable_config_path: typeof getWritableConfigPath;
87
+ export declare function getProjectDirectoryName(): string;
88
+ export declare const get_project_directory_name: typeof getProjectDirectoryName;
89
+ export declare function dbStoragePath(): string;
90
+ export declare const db_storage_path: typeof dbStoragePath;
91
+ export type UserData = Record<string, unknown>;
92
+ export declare function userDataFile(): string;
93
+ export declare const user_data_file: typeof userDataFile;
94
+ export declare function loadUserData(): UserData;
95
+ export declare const load_user_data: typeof loadUserData;
96
+ export declare function saveUserData(data: UserData): void;
97
+ export declare const save_user_data: typeof saveUserData;
98
+ export declare function updateUserData(updates: UserData): void;
99
+ export declare const update_user_data: typeof updateUserData;
100
+ export declare function hasUserDeclinedTracing(): boolean;
101
+ export declare const has_user_declined_tracing: typeof hasUserDeclinedTracing;
102
+ export declare function isTracingEnabled(): boolean;
103
+ export declare const is_tracing_enabled: typeof isTracingEnabled;
@@ -0,0 +1,145 @@
1
+ export declare const SKILL_FILENAME = "SKILL.md";
2
+ export declare const MAX_SKILL_NAME_LENGTH = 64;
3
+ export declare const MIN_SKILL_NAME_LENGTH = 1;
4
+ export declare const MAX_DESCRIPTION_LENGTH = 1024;
5
+ export declare const SKILL_NAME_PATTERN: RegExp;
6
+ export declare const METADATA = 1;
7
+ export declare const INSTRUCTIONS = 2;
8
+ export declare const RESOURCES = 3;
9
+ export declare const ENV_VAR = "CREWAI_EXPERIMENTAL";
10
+ export type DisclosureLevel = typeof METADATA | typeof INSTRUCTIONS | typeof RESOURCES;
11
+ export declare const DisclosureLevel: Readonly<{
12
+ METADATA: 1;
13
+ INSTRUCTIONS: 2;
14
+ RESOURCES: 3;
15
+ }>;
16
+ export type ResourceDirName = "scripts" | "references" | "assets";
17
+ export declare const ResourceDirName: readonly ["scripts", "references", "assets"];
18
+ export type SkillMetadata = {
19
+ org: string;
20
+ name: string;
21
+ version: string | null;
22
+ installed_at: string;
23
+ };
24
+ export declare const SkillMetadata: Readonly<{
25
+ kind: "SkillMetadata";
26
+ }>;
27
+ export type SkillFrontmatterOptions = {
28
+ name: string;
29
+ description: string;
30
+ license?: string | null;
31
+ compatibility?: string | null;
32
+ metadata?: Record<string, string> | null;
33
+ allowedTools?: readonly string[] | string | null;
34
+ allowed_tools?: readonly string[] | string | null;
35
+ "allowed-tools"?: readonly string[] | string | null;
36
+ version?: string | null;
37
+ };
38
+ export declare class SkillParseError extends Error {
39
+ constructor(message: string, options?: ErrorOptions);
40
+ }
41
+ export declare class SkillNotCachedError extends Error {
42
+ readonly ref: string;
43
+ constructor(ref: string);
44
+ }
45
+ export declare class ExperimentalFeatureDisabledError extends Error {
46
+ constructor();
47
+ }
48
+ export declare class SkillFrontmatter {
49
+ readonly name: string;
50
+ readonly description: string;
51
+ readonly license: string | null;
52
+ readonly compatibility: string | null;
53
+ readonly metadata: Record<string, string> | null;
54
+ readonly allowedTools: readonly string[] | null;
55
+ readonly allowed_tools: readonly string[] | null;
56
+ readonly version: string | null;
57
+ constructor(options: SkillFrontmatterOptions);
58
+ static parseAllowedTools<TValues extends Record<string, unknown>>(values: TValues): TValues & {
59
+ "allowed-tools"?: readonly string[] | null;
60
+ };
61
+ static parse_allowed_tools<TValues extends Record<string, unknown>>(values: TValues): TValues & {
62
+ "allowed-tools"?: readonly string[] | null;
63
+ };
64
+ }
65
+ export declare class Skill {
66
+ readonly frontmatter: SkillFrontmatter;
67
+ readonly instructions: string | null;
68
+ readonly path: string;
69
+ readonly disclosureLevel: DisclosureLevel;
70
+ readonly disclosure_level: DisclosureLevel;
71
+ readonly resourceFiles: Partial<Record<ResourceDirName, readonly string[]>> | null;
72
+ readonly resource_files: Partial<Record<ResourceDirName, readonly string[]>> | null;
73
+ constructor(options: {
74
+ frontmatter: SkillFrontmatter;
75
+ path: string;
76
+ instructions?: string | null;
77
+ disclosureLevel?: DisclosureLevel;
78
+ disclosure_level?: DisclosureLevel;
79
+ resourceFiles?: Partial<Record<ResourceDirName, readonly string[]>> | null;
80
+ resource_files?: Partial<Record<ResourceDirName, readonly string[]>> | null;
81
+ });
82
+ get name(): string;
83
+ get description(): string;
84
+ get scriptsDir(): string;
85
+ get scripts_dir(): string;
86
+ get referencesDir(): string;
87
+ get references_dir(): string;
88
+ get assetsDir(): string;
89
+ get assets_dir(): string;
90
+ withDisclosureLevel(level: DisclosureLevel, options?: {
91
+ instructions?: string | null;
92
+ resourceFiles?: Partial<Record<ResourceDirName, readonly string[]>> | null;
93
+ resource_files?: Partial<Record<ResourceDirName, readonly string[]>> | null;
94
+ }): Skill;
95
+ with_disclosure_level(level: DisclosureLevel, instructions?: string | null, resource_files?: Partial<Record<ResourceDirName, readonly string[]>> | null): Skill;
96
+ }
97
+ export declare class SkillCacheManager {
98
+ private readonly root;
99
+ constructor(cacheRoot?: string | null);
100
+ getCachedPath(org: string, name: string): string | null;
101
+ get_cached_path(org: string, name: string): string | null;
102
+ _skill_dir(org: string, name: string): string;
103
+ storeDirectory(org: string, name: string, version: string | null, sourceDirectory: string): string;
104
+ store_directory(org: string, name: string, version: string | null, source_directory: string): string;
105
+ store(org: string, name: string, version: string | null, archiveBytes: Uint8Array): string;
106
+ listCached(): SkillMetadata[];
107
+ list_cached(): SkillMetadata[];
108
+ invalidate(org: string, name: string): boolean;
109
+ private skillDir;
110
+ private writeMetadata;
111
+ }
112
+ export declare function parseFrontmatter(content: string): [frontmatter: Record<string, unknown>, body: string];
113
+ export declare const parse_frontmatter: typeof parseFrontmatter;
114
+ export declare function parseSkillMd(path: string): [frontmatter: SkillFrontmatter, body: string];
115
+ export declare const parse_skill_md: typeof parseSkillMd;
116
+ export declare function loadSkillMetadata(skillDir: string): Skill;
117
+ export declare const load_skill_metadata: typeof loadSkillMetadata;
118
+ export declare function loadSkillInstructions(skill: Skill): Skill;
119
+ export declare const load_skill_instructions: typeof loadSkillInstructions;
120
+ export declare function loadSkillResources(skill: Skill): Skill;
121
+ export declare const load_skill_resources: typeof loadSkillResources;
122
+ export declare const loadResources: typeof loadSkillResources;
123
+ export declare const load_resources: typeof loadSkillResources;
124
+ export declare function discoverSkills(searchPath: string, source?: unknown): Skill[];
125
+ export declare const discover_skills: typeof discoverSkills;
126
+ export declare function activateSkill(skill: Skill, source?: unknown): Skill;
127
+ export declare const activate_skill: typeof activateSkill;
128
+ export declare function formatSkillContext(skill: Skill): string;
129
+ export declare const format_skill_context: typeof formatSkillContext;
130
+ export declare function validateDirectoryName(skillDir: string, skillName: string): void;
131
+ export declare const validate_directory_name: typeof validateDirectoryName;
132
+ export declare function isRegistryRef(value: unknown): value is string;
133
+ export declare const is_registry_ref: typeof isRegistryRef;
134
+ export declare function is_enabled(): boolean;
135
+ export declare function _is_noninteractive(): boolean;
136
+ export declare function require_experimental_skills(): void;
137
+ export declare function parseRegistryRef(ref: string): [org: string, name: string];
138
+ export declare const parse_registry_ref: typeof parseRegistryRef;
139
+ export declare function resolveRegistryRef(ref: string, source?: unknown, options?: {
140
+ cacheRoot?: string | null;
141
+ cwd?: string;
142
+ }): Skill;
143
+ export declare const resolve_registry_ref: typeof resolveRegistryRef;
144
+ export declare function _safe_extractall(archiveBytes: Uint8Array, destination: string): void;
145
+ export declare function _safe_extract_zip(zipArchive: Uint8Array, destination: string): void;
@@ -1 +1 @@
1
- export { aq as BaseProvider } from './state-provider-core-Be9RKRAm.js';
1
+ export { BaseProvider } from "./state.js";