@caplets/core 0.18.9 → 0.19.0
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/attach/options.d.ts +10 -0
- package/dist/attach/server.d.ts +5 -0
- package/dist/caplet-files-bundle.d.ts +415 -0
- package/dist/caplet-files.d.ts +3 -266
- package/dist/caplet-source/bundle.d.ts +7 -0
- package/dist/caplet-source/filesystem.d.ts +7 -0
- package/dist/caplet-source/filesystem.js +2 -0
- package/dist/caplet-source/index.d.ts +4 -0
- package/dist/caplet-source/parse.d.ts +35 -0
- package/dist/caplet-source/types.d.ts +9 -0
- package/dist/caplet-source.js +11231 -0
- package/dist/cli/commands.d.ts +6 -1
- package/dist/cli/doctor.d.ts +18 -0
- package/dist/cli/setup-caplet.d.ts +12 -0
- package/dist/cli/setup.d.ts +4 -0
- package/dist/cli.d.ts +7 -1
- package/dist/cloud/apply.d.ts +36 -0
- package/dist/cloud/client.d.ts +30 -0
- package/dist/cloud/presence.d.ts +29 -0
- package/dist/cloud/project-root.d.ts +2 -0
- package/dist/cloud/runtime-adapter.d.ts +23 -0
- package/dist/cloud/runtime-http.d.ts +6 -0
- package/dist/cloud/sync.d.ts +10 -0
- package/dist/cloud-auth/client.d.ts +42 -0
- package/dist/cloud-auth/errors.d.ts +11 -0
- package/dist/cloud-auth/open-url.d.ts +7 -0
- package/dist/cloud-auth/store.d.ts +35 -0
- package/dist/cloud-auth/types.d.ts +66 -0
- package/dist/{completion-RqzHpHRY.js → completion-brgziz4L.js} +17 -1
- package/dist/config-runtime.d.ts +174 -0
- package/dist/config-runtime.js +392 -0
- package/dist/config.d.ts +42 -0
- package/dist/filesystem-Kkg32TOJ.js +66 -0
- package/dist/generated-tool-input-schema.js +161 -1
- package/dist/index.d.ts +35 -0
- package/dist/index.js +2999 -266
- package/dist/native/options.d.ts +22 -3
- package/dist/native/remote.d.ts +2 -1
- package/dist/native/service.d.ts +7 -3
- package/dist/native.js +2 -430
- package/dist/project-binding/attach.d.ts +46 -0
- package/dist/project-binding/errors.d.ts +17 -0
- package/dist/project-binding/gitignore.d.ts +5 -0
- package/dist/project-binding/mutagen.d.ts +65 -0
- package/dist/project-binding/routes.d.ts +9 -0
- package/dist/project-binding/session.d.ts +82 -0
- package/dist/project-binding/sync-filter.d.ts +19 -0
- package/dist/project-binding/sync-size.d.ts +27 -0
- package/dist/project-binding/transport.d.ts +21 -0
- package/dist/project-binding/types.d.ts +31 -0
- package/dist/project-binding/workspaces.d.ts +60 -0
- package/dist/remote/options.d.ts +42 -0
- package/dist/remote/selection.d.ts +26 -0
- package/dist/runtime-plan/features.d.ts +7 -0
- package/dist/runtime-plan/index.d.ts +4 -0
- package/dist/runtime-plan/planner.d.ts +5 -0
- package/dist/runtime-plan/resources.d.ts +11 -0
- package/dist/runtime-plan/types.d.ts +82 -0
- package/dist/runtime-plan.js +275 -0
- package/dist/{generated-tool-input-schema--kVuUNc5.js → schemas-BZ6BBrh7.js} +1 -161
- package/dist/serve/daemon/config.d.ts +8 -0
- package/dist/serve/daemon/index.d.ts +16 -0
- package/dist/serve/daemon/paths.d.ts +3 -0
- package/dist/serve/daemon/platform-darwin.d.ts +2 -0
- package/dist/serve/daemon/platform-linux.d.ts +2 -0
- package/dist/serve/daemon/platform-windows.d.ts +2 -0
- package/dist/serve/daemon/platform.d.ts +9 -0
- package/dist/serve/daemon/process.d.ts +5 -0
- package/dist/serve/daemon/types.d.ts +86 -0
- package/dist/serve/http.d.ts +8 -0
- package/dist/serve/index.d.ts +5 -1
- package/dist/serve/native-session.d.ts +19 -0
- package/dist/serve/options.d.ts +1 -0
- package/dist/server/options.d.ts +1 -1
- package/dist/{options-DnOUjft1.js → service-BXcE4Rv8.js} +9891 -2182
- package/dist/setup/hash.d.ts +3 -0
- package/dist/setup/local-store.d.ts +34 -0
- package/dist/setup/runner.d.ts +40 -0
- package/dist/setup/types.d.ts +52 -0
- package/dist/tools.d.ts +16 -1
- package/dist/validation-BBG4skZf.js +153 -0
- package/package.json +20 -4
|
@@ -1,2 +1,162 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as any, d as literal, m as object, o as array, p as number, r as _enum, v as string, y as union } from "./schemas-BZ6BBrh7.js";
|
|
2
|
+
//#region src/generated-tool-input-schema.ts
|
|
3
|
+
const operations = [
|
|
4
|
+
"inspect",
|
|
5
|
+
"check_backend",
|
|
6
|
+
"list_tools",
|
|
7
|
+
"search_tools",
|
|
8
|
+
"get_tool",
|
|
9
|
+
"call_tool"
|
|
10
|
+
];
|
|
11
|
+
const mcpOperations = [
|
|
12
|
+
...operations,
|
|
13
|
+
"list_resources",
|
|
14
|
+
"search_resources",
|
|
15
|
+
"list_resource_templates",
|
|
16
|
+
"read_resource",
|
|
17
|
+
"list_prompts",
|
|
18
|
+
"search_prompts",
|
|
19
|
+
"get_prompt",
|
|
20
|
+
"complete"
|
|
21
|
+
];
|
|
22
|
+
const generatedToolInputDescriptions = {
|
|
23
|
+
operation: "Wrapper operation: inspect, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.",
|
|
24
|
+
query: "Required for search operations only.",
|
|
25
|
+
limit: "Optional list/search result limit.",
|
|
26
|
+
tool: "Exact downstream tool name for get_tool or call_tool.",
|
|
27
|
+
arguments: "JSON object for call_tool arguments/downstream inputs or get_prompt arguments.",
|
|
28
|
+
fields: "Optional call_tool structured output paths when outputSchema allows it.",
|
|
29
|
+
uri: "Exact downstream resource URI for read_resource.",
|
|
30
|
+
prompt: "Exact downstream prompt name for get_prompt.",
|
|
31
|
+
ref: "Completion target reference for complete.",
|
|
32
|
+
argument: "Completion argument object for complete."
|
|
33
|
+
};
|
|
34
|
+
const completionRefSchema = union([object({
|
|
35
|
+
type: literal("prompt"),
|
|
36
|
+
name: string().min(1)
|
|
37
|
+
}).strict(), object({
|
|
38
|
+
type: literal("resourceTemplate"),
|
|
39
|
+
uri: string().min(1)
|
|
40
|
+
}).strict()]);
|
|
41
|
+
const completionArgumentSchema = object({
|
|
42
|
+
name: string().min(1),
|
|
43
|
+
value: string()
|
|
44
|
+
}).strict();
|
|
45
|
+
const baseShape = {
|
|
46
|
+
query: string().optional().describe(generatedToolInputDescriptions.query),
|
|
47
|
+
limit: number().int().positive().optional().describe(generatedToolInputDescriptions.limit),
|
|
48
|
+
tool: string().optional().describe(generatedToolInputDescriptions.tool),
|
|
49
|
+
arguments: object({}).catchall(any()).optional().describe(generatedToolInputDescriptions.arguments),
|
|
50
|
+
fields: array(string().min(1)).min(1).optional().describe(generatedToolInputDescriptions.fields)
|
|
51
|
+
};
|
|
52
|
+
function generatedToolInputSchemaForCaplet(caplet) {
|
|
53
|
+
return object({
|
|
54
|
+
operation: (caplet.backend === "mcp" ? _enum(mcpOperations) : _enum(operations)).describe(generatedToolInputDescriptions.operation),
|
|
55
|
+
...baseShape,
|
|
56
|
+
...caplet.backend === "mcp" ? {
|
|
57
|
+
uri: string().optional().describe(generatedToolInputDescriptions.uri),
|
|
58
|
+
prompt: string().optional().describe(generatedToolInputDescriptions.prompt),
|
|
59
|
+
ref: completionRefSchema.optional().describe(generatedToolInputDescriptions.ref),
|
|
60
|
+
argument: completionArgumentSchema.optional().describe(generatedToolInputDescriptions.argument)
|
|
61
|
+
} : {}
|
|
62
|
+
}).strict();
|
|
63
|
+
}
|
|
64
|
+
const generatedToolInputSchema = object({
|
|
65
|
+
operation: _enum(operations).describe(generatedToolInputDescriptions.operation),
|
|
66
|
+
...baseShape
|
|
67
|
+
}).strict();
|
|
68
|
+
function generatedToolInputJsonSchemaForCaplet(caplet) {
|
|
69
|
+
const mcp = caplet.backend === "mcp";
|
|
70
|
+
return {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
operation: {
|
|
74
|
+
type: "string",
|
|
75
|
+
enum: mcp ? mcpOperations : operations,
|
|
76
|
+
description: generatedToolInputDescriptions.operation
|
|
77
|
+
},
|
|
78
|
+
query: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: generatedToolInputDescriptions.query
|
|
81
|
+
},
|
|
82
|
+
limit: {
|
|
83
|
+
type: "integer",
|
|
84
|
+
minimum: 1,
|
|
85
|
+
description: generatedToolInputDescriptions.limit
|
|
86
|
+
},
|
|
87
|
+
tool: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: generatedToolInputDescriptions.tool
|
|
90
|
+
},
|
|
91
|
+
arguments: {
|
|
92
|
+
type: "object",
|
|
93
|
+
description: generatedToolInputDescriptions.arguments
|
|
94
|
+
},
|
|
95
|
+
fields: {
|
|
96
|
+
type: "array",
|
|
97
|
+
items: {
|
|
98
|
+
type: "string",
|
|
99
|
+
minLength: 1
|
|
100
|
+
},
|
|
101
|
+
minItems: 1,
|
|
102
|
+
description: generatedToolInputDescriptions.fields
|
|
103
|
+
},
|
|
104
|
+
...mcp ? {
|
|
105
|
+
uri: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: generatedToolInputDescriptions.uri
|
|
108
|
+
},
|
|
109
|
+
prompt: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: generatedToolInputDescriptions.prompt
|
|
112
|
+
},
|
|
113
|
+
ref: {
|
|
114
|
+
oneOf: [{
|
|
115
|
+
type: "object",
|
|
116
|
+
properties: {
|
|
117
|
+
type: { const: "prompt" },
|
|
118
|
+
name: {
|
|
119
|
+
type: "string",
|
|
120
|
+
minLength: 1
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
required: ["type", "name"],
|
|
124
|
+
additionalProperties: false
|
|
125
|
+
}, {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
type: { const: "resourceTemplate" },
|
|
129
|
+
uri: {
|
|
130
|
+
type: "string",
|
|
131
|
+
minLength: 1
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
required: ["type", "uri"],
|
|
135
|
+
additionalProperties: false
|
|
136
|
+
}],
|
|
137
|
+
description: generatedToolInputDescriptions.ref
|
|
138
|
+
},
|
|
139
|
+
argument: {
|
|
140
|
+
type: "object",
|
|
141
|
+
properties: {
|
|
142
|
+
name: {
|
|
143
|
+
type: "string",
|
|
144
|
+
minLength: 1
|
|
145
|
+
},
|
|
146
|
+
value: { type: "string" }
|
|
147
|
+
},
|
|
148
|
+
required: ["name", "value"],
|
|
149
|
+
additionalProperties: false,
|
|
150
|
+
description: generatedToolInputDescriptions.argument
|
|
151
|
+
}
|
|
152
|
+
} : {}
|
|
153
|
+
},
|
|
154
|
+
required: ["operation"],
|
|
155
|
+
additionalProperties: false
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function generatedToolInputJsonSchema() {
|
|
159
|
+
return generatedToolInputJsonSchemaForCaplet({ backend: "tool" });
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
2
162
|
export { completionArgumentSchema, completionRefSchema, generatedToolInputDescriptions, generatedToolInputJsonSchema, generatedToolInputJsonSchemaForCaplet, generatedToolInputSchema, generatedToolInputSchemaForCaplet, mcpOperations, operations };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
export { CapletsRuntime } from "./runtime";
|
|
2
2
|
export { runCli, createProgram } from "./cli";
|
|
3
3
|
export { parseConfig, loadConfig } from "./config";
|
|
4
|
+
export { BundleCapletSource, parseCapletSource } from "./caplet-source";
|
|
5
|
+
export { FilesystemCapletSource } from "./caplet-source/filesystem";
|
|
6
|
+
export { classifyCapletRuntimeRoute, planCapletRuntimeRoute, planCapletRuntimeRoutes, } from "./runtime-plan";
|
|
7
|
+
export type { CapletSource, CapletSourceFile, CapletSourceParseMessage, CapletSourceParseResult, CapletSourceReference, ParsedCapletSourceCaplet, } from "./caplet-source";
|
|
8
|
+
export type { CapletRuntimePlan, RuntimePlanDeployment, RuntimePlanOptions, RuntimeRouteKind, SetupTargetKind as RuntimePlanSetupTargetKind, } from "./runtime-plan";
|
|
4
9
|
export { capabilityDescription, ServerRegistry } from "./registry";
|
|
5
10
|
export { generatedToolInputSchema, handleServerTool } from "./tools";
|
|
11
|
+
export type { CapletExecutionMetadata, CapletResultMetadata } from "./tools";
|
|
12
|
+
export type { CapletSetupCommandConfig, CapletSetupConfig } from "./config";
|
|
13
|
+
export { capletSetupContentHash, stableJson } from "./setup/hash";
|
|
14
|
+
export { LocalSetupStore } from "./setup/local-store";
|
|
15
|
+
export { runCapletSetup } from "./setup/runner";
|
|
16
|
+
export { CloudAuthClient } from "./cloud-auth/client";
|
|
17
|
+
export { openBrowserUrl } from "./cloud-auth/open-url";
|
|
18
|
+
export { CloudAuthStore, cloudAuthPath, migrateCredentials, redactedCloudAuthStatus, } from "./cloud-auth/store";
|
|
19
|
+
export type { CloudAuthCredentials, CloudAuthStoreOptions } from "./cloud-auth/store";
|
|
20
|
+
export type { CloudAuthLoginPollResult, CloudAuthLoginStart, CloudAuthScope, CloudAuthState, CloudAuthTokenResponse, CloudAuthWorkspace, RedactedCloudAuthStatus, } from "./cloud-auth/types";
|
|
21
|
+
export type { SetupActor, SetupApproval, SetupAttempt, SetupAttemptStatus, SetupPlan, SetupTargetKind, } from "./setup/types";
|
|
6
22
|
export { hasRenderableStructuredContent, markdownCallToolResultContent, markdownStructuredContent, } from "./result-content";
|
|
7
23
|
export type { ResultMarkdownContext } from "./result-content";
|
|
8
24
|
export { serveCaplets, serveHttp, serveResolvedCaplets, serveStdio } from "./serve";
|
|
9
25
|
export type { HttpServeOptions, RawServeOptions, ServeOptions, StdioServeOptions } from "./serve";
|
|
26
|
+
export { PROJECT_BINDING_STATES, PROJECT_BINDING_SYNC_STATES } from "./project-binding/types";
|
|
27
|
+
export type { BindingTerminalReason, ProjectBindingLease, ProjectBindingSetupReceipt, ProjectBindingState, ProjectBindingSyncState, ProjectBindingWorkspaceMetadata, } from "./project-binding/types";
|
|
28
|
+
export { PROJECT_BINDING_ERROR_CODES, ProjectBindingError, projectBindingError, projectBindingRecovery, } from "./project-binding/errors";
|
|
29
|
+
export type { ProjectBindingErrorCode, ProjectBindingRecovery } from "./project-binding/errors";
|
|
30
|
+
export { buildProjectSyncManifest } from "./project-binding/sync-filter";
|
|
31
|
+
export type { ProjectSyncExclusionSource, ProjectSyncExclusionSummary, ProjectSyncManifest, ProjectSyncManifestFile, } from "./project-binding/sync-filter";
|
|
32
|
+
export { DEFAULT_SYNC_LIMITS, enforceProjectSyncSizeLimits } from "./project-binding/sync-size";
|
|
33
|
+
export type { ProjectSyncLimits, ProjectSyncSizeResult, ProjectSyncTier, } from "./project-binding/sync-size";
|
|
34
|
+
export { PROJECT_BINDING_CONNECT_PATH, PROJECT_BINDINGS_CONTROL_PATH, projectBindingConnectPath, projectBindingConnectUrl, projectBindingStatusPath, projectBindingStatusUrl, } from "./project-binding/routes";
|
|
35
|
+
export { attachProjectOnce, attachProjectSession, resolveAttachOptions, } from "./project-binding/attach";
|
|
36
|
+
export type { AttachSessionEvent, RawAttachOptions, ResolvedAttachOptions, } from "./project-binding/attach";
|
|
37
|
+
export { runProjectBindingSession } from "./project-binding/session";
|
|
38
|
+
export type { ProjectBindingSessionEvent, ProjectBindingSocketClientMessage, ProjectBindingSocketServerMessage, RunProjectBindingSessionInput, } from "./project-binding/session";
|
|
39
|
+
export { defaultProjectBindingWebSocketFactory } from "./project-binding/transport";
|
|
40
|
+
export type { ProjectBindingWebSocket, ProjectBindingWebSocketFactory, } from "./project-binding/transport";
|
|
41
|
+
export { ProjectBindingWorkspaceStore, projectBindingWorkspacePaths, projectBindingWorkspaceRoot, } from "./project-binding/workspaces";
|
|
42
|
+
export type { EnsureProjectBindingWorkspaceInput, ProjectBindingCleanupResult, ProjectBindingWorkspacePaths, ProjectBindingWorkspaceRootOptions, ProjectBindingWorkspaceStoreOptions, } from "./project-binding/workspaces";
|
|
43
|
+
export { ManagedMutagenProjectSync, mutagenProjectSyncDoctorData, mutagenSyncName, parseMutagenVersionOutput as parseManagedMutagenVersionOutput, planMutagenSyncCreateCommand, planMutagenSyncListCommand, planMutagenSyncTerminateCommand, planMutagenVersionCommand, } from "./project-binding/mutagen";
|
|
44
|
+
export type { ManagedMutagenProjectSyncOptions, ManagedSyncDiagnosticCode, ManagedSyncState, ManagedSyncStateSnapshot, MutagenCommandPlan, MutagenLastCommandStatus, MutagenProcessResult, MutagenProcessRunner, MutagenProjectSyncBindingInput, MutagenProjectSyncDoctorData, StartMutagenProjectSyncInput, } from "./project-binding/mutagen";
|