@vfarcic/dot-ai 1.22.0 → 1.23.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/core/user-prompts-loader.d.ts +120 -1
- package/dist/core/user-prompts-loader.d.ts.map +1 -1
- package/dist/core/user-prompts-loader.js +522 -57
- package/dist/interfaces/mcp.d.ts +22 -0
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +118 -4
- package/dist/interfaces/openapi-generator.d.ts.map +1 -1
- package/dist/interfaces/openapi-generator.js +11 -5
- package/dist/interfaces/rest-api.d.ts +18 -4
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/interfaces/rest-api.js +138 -9
- package/dist/interfaces/routes/index.d.ts.map +1 -1
- package/dist/interfaces/routes/index.js +35 -0
- package/dist/interfaces/schemas/common.d.ts +33 -0
- package/dist/interfaces/schemas/common.d.ts.map +1 -1
- package/dist/interfaces/schemas/common.js +20 -1
- package/dist/interfaces/schemas/index.d.ts +2 -2
- package/dist/interfaces/schemas/index.d.ts.map +1 -1
- package/dist/interfaces/schemas/index.js +14 -3
- package/dist/interfaces/schemas/prompts.d.ts +155 -0
- package/dist/interfaces/schemas/prompts.d.ts.map +1 -1
- package/dist/interfaces/schemas/prompts.js +134 -1
- package/dist/tools/prompts.d.ts.map +1 -1
- package/dist/tools/prompts.js +37 -2
- package/package.json +6 -4
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.InternalServerErrorSchema = exports.ServiceUnavailableErrorSchema = exports.MethodNotAllowedErrorSchema = exports.BadRequestErrorSchema = exports.NotFoundErrorSchema = exports.ErrorResponseSchema = exports.RestApiResponseSchema = exports.ErrorDetailsSchema = exports.MetaSchema = void 0;
|
|
9
|
+
exports.InternalServerErrorSchema = exports.BadGatewayErrorSchema = exports.ServiceUnavailableErrorSchema = exports.PayloadTooLargeErrorSchema = exports.MethodNotAllowedErrorSchema = exports.BadRequestErrorSchema = exports.NotFoundErrorSchema = exports.ErrorResponseSchema = exports.RestApiResponseSchema = exports.ErrorDetailsSchema = exports.MetaSchema = void 0;
|
|
10
10
|
exports.createSuccessResponseSchema = createSuccessResponseSchema;
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
/**
|
|
@@ -80,6 +80,15 @@ exports.MethodNotAllowedErrorSchema = exports.ErrorResponseSchema.extend({
|
|
|
80
80
|
code: zod_1.z.literal('METHOD_NOT_ALLOWED'),
|
|
81
81
|
}),
|
|
82
82
|
});
|
|
83
|
+
/**
|
|
84
|
+
* 413 returned when a request body exceeds a per-route raw-body cap (PRD #647:
|
|
85
|
+
* the 512 KiB prompts source ingest cap). The handler emits PAYLOAD_TOO_LARGE.
|
|
86
|
+
*/
|
|
87
|
+
exports.PayloadTooLargeErrorSchema = exports.ErrorResponseSchema.extend({
|
|
88
|
+
error: exports.ErrorDetailsSchema.extend({
|
|
89
|
+
code: zod_1.z.literal('PAYLOAD_TOO_LARGE'),
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
83
92
|
exports.ServiceUnavailableErrorSchema = exports.ErrorResponseSchema.extend({
|
|
84
93
|
error: exports.ErrorDetailsSchema.extend({
|
|
85
94
|
code: zod_1.z.enum([
|
|
@@ -90,6 +99,15 @@ exports.ServiceUnavailableErrorSchema = exports.ErrorResponseSchema.extend({
|
|
|
90
99
|
]),
|
|
91
100
|
}),
|
|
92
101
|
});
|
|
102
|
+
exports.BadGatewayErrorSchema = exports.ErrorResponseSchema.extend({
|
|
103
|
+
error: exports.ErrorDetailsSchema.extend({
|
|
104
|
+
code: zod_1.z.enum([
|
|
105
|
+
// A per-request prompts-repo override (?repo=) whose source could not be
|
|
106
|
+
// cloned — bad/missing forwarded credential or unreachable host (issue #575).
|
|
107
|
+
'PROMPTS_SOURCE_ERROR',
|
|
108
|
+
]),
|
|
109
|
+
}),
|
|
110
|
+
});
|
|
93
111
|
exports.InternalServerErrorSchema = exports.ErrorResponseSchema.extend({
|
|
94
112
|
error: exports.ErrorDetailsSchema.extend({
|
|
95
113
|
code: zod_1.z.enum([
|
|
@@ -111,6 +129,7 @@ exports.InternalServerErrorSchema = exports.ErrorResponseSchema.extend({
|
|
|
111
129
|
'SESSION_RETRIEVAL_ERROR',
|
|
112
130
|
'MIGRATION_ERROR',
|
|
113
131
|
'PROMPTS_CACHE_REFRESH_ERROR',
|
|
132
|
+
'PROMPTS_SOURCE_INGEST_ERROR',
|
|
114
133
|
'USER_MANAGEMENT_ERROR',
|
|
115
134
|
]),
|
|
116
135
|
}),
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
* import { VisualizationResponseSchema, ToolDiscoveryResponseSchema } from '../schemas';
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
export { MetaSchema, ErrorDetailsSchema, RestApiResponseSchema, ErrorResponseSchema, NotFoundErrorSchema, BadRequestErrorSchema, MethodNotAllowedErrorSchema, ServiceUnavailableErrorSchema, InternalServerErrorSchema, createSuccessResponseSchema, type Meta, type ErrorDetails, type RestApiResponse, type ErrorResponse, } from './common';
|
|
12
|
+
export { MetaSchema, ErrorDetailsSchema, RestApiResponseSchema, ErrorResponseSchema, NotFoundErrorSchema, BadRequestErrorSchema, MethodNotAllowedErrorSchema, PayloadTooLargeErrorSchema, ServiceUnavailableErrorSchema, InternalServerErrorSchema, createSuccessResponseSchema, type Meta, type ErrorDetails, type RestApiResponse, type ErrorResponse, } from './common';
|
|
13
13
|
export { ToolParameterSchema, ToolInfoSchema, ToolDiscoveryDataSchema, ToolDiscoveryResponseSchema, ToolExecutionDataSchema, ToolExecutionResponseSchema, ToolNotFoundErrorSchema, InvalidToolRequestErrorSchema, ToolExecutionErrorSchema, ToolDiscoveryErrorSchema, type ToolParameter, type ToolInfo, type ToolDiscoveryData, type ToolDiscoveryResponse, type ToolExecutionData, type ToolExecutionResponse, } from './tools';
|
|
14
14
|
export { VisualizationTypeSchema, CodeContentSchema, TableContentSchema, CardItemSchema, CardsContentSchema, DiffContentSchema, BarChartDataItemSchema, BarChartContentSchema, VisualizationContentSchema, VisualizationSchema, VisualizationResponseDataSchema, VisualizationResponseSchema, VisualizationNotFoundErrorSchema, VisualizationServiceUnavailableErrorSchema, VisualizationInternalErrorSchema, type VisualizationType, type CodeContent, type TableContent, type CardItem, type CardsContent, type DiffContent, type BarChartDataItem, type BarChartContent, type VisualizationContent, type Visualization, type VisualizationResponseData, type VisualizationResponse, } from './visualization';
|
|
15
15
|
export { ResourceKindSchema, ResourceKindsDataSchema, ResourceKindsResponseSchema, ResourceSummarySchema, ResourceSearchDataSchema, ResourceSearchResponseSchema, ResourceListDataSchema, ResourceListResponseSchema, SingleResourceDataSchema, SingleResourceResponseSchema, NamespacesDataSchema, NamespacesResponseSchema, ResourceSyncRequestSchema, ResourceSyncDataSchema, ResourceSyncResponseSchema, ResourceNotFoundErrorSchema, ResourceBadRequestErrorSchema, ResourcePluginUnavailableErrorSchema, ResourceKindsErrorSchema, ResourceSearchErrorSchema, ResourceListErrorSchema, SingleResourceErrorSchema, NamespacesErrorSchema, ResourceSyncErrorSchema, type ResourceKind, type ResourceKindsData, type ResourceKindsResponse, type ResourceSummary, type ResourceSearchData, type ResourceSearchResponse, type ResourceListData, type ResourceListResponse, type SingleResourceData, type SingleResourceResponse, type NamespacesData, type NamespacesResponse, type ResourceSyncRequest, type ResourceSyncData, type ResourceSyncResponse, } from './resources';
|
|
16
16
|
export { EventInvolvedObjectSchema, KubernetesEventSchema, EventsDataSchema, EventsResponseSchema, EventsBadRequestErrorSchema, EventsPluginUnavailableErrorSchema, EventsErrorSchema, type EventInvolvedObject, type KubernetesEvent, type EventsData, type EventsResponse, } from './events';
|
|
17
17
|
export { LogsDataSchema, LogsResponseSchema, LogsBadRequestErrorSchema, LogsPluginUnavailableErrorSchema, LogsErrorSchema, type LogsData, type LogsResponse, } from './logs';
|
|
18
18
|
export { SessionMetadataSchema, SessionDataSchema, SessionResponseDataSchema, SessionResponseSchema, SessionNotFoundErrorSchema, SessionRetrievalErrorSchema, SessionListQuerySchema, SessionSummarySchema, SessionListDataSchema, SessionListResponseSchema, SessionListErrorSchema, RemediationSSEEventSchema, type SessionMetadata, type SessionData, type SessionResponseData, type SessionResponse, type SessionListQuery, type SessionSummary, type SessionListData, type SessionListResponse, type RemediationSSEEvent, } from './sessions';
|
|
19
|
-
export { PromptArgumentSchema, PromptInfoSchema, PromptsListDataSchema, PromptsListResponseSchema, PromptMessageSchema, PromptFileSchema, PromptGetDataSchema, PromptGetResponseSchema, PromptGetRequestSchema, PromptNotFoundErrorSchema, PromptValidationErrorSchema, PromptsListErrorSchema, PromptGetErrorSchema, PromptsCacheRefreshDataSchema, PromptsCacheRefreshResponseSchema, PromptsCacheRefreshErrorSchema, type PromptArgument, type PromptInfo, type PromptsListData, type PromptsListResponse, type PromptMessage, type PromptFileData, type PromptGetData, type PromptGetResponse, type PromptGetRequest, type PromptsCacheRefreshData, type PromptsCacheRefreshResponse, } from './prompts';
|
|
19
|
+
export { PromptArgumentSchema, PromptInfoSchema, PromptsListDataSchema, PromptsListResponseSchema, PromptMessageSchema, PromptFileSchema, PromptGetDataSchema, PromptGetResponseSchema, PromptGetRequestSchema, PromptNotFoundErrorSchema, PromptValidationErrorSchema, PromptsListErrorSchema, PromptGetErrorSchema, PromptsSourceErrorSchema, PromptsCacheRefreshDataSchema, PromptsCacheRefreshResponseSchema, PromptsCacheRefreshErrorSchema, PromptsSourceIngestFileSchema, PromptsSourceIngestRequestSchema, PromptsSourceIngestDataSchema, PromptsSourceIngestResponseSchema, PromptsSourceIngestErrorSchema, PromptsSourceIngestPayloadTooLargeErrorSchema, PromptsSourceIngestServerErrorSchema, PromptGetQuerySchema, PromptsListQuerySchema, type PromptArgument, type PromptInfo, type PromptsListData, type PromptsListResponse, type PromptMessage, type PromptFileData, type PromptGetData, type PromptGetResponse, type PromptGetRequest, type PromptGetQuery, type PromptsListQuery, type PromptsCacheRefreshData, type PromptsCacheRefreshResponse, type PromptsSourceIngestFile, type PromptsSourceIngestRequest, type PromptsSourceIngestData, type PromptsSourceIngestResponse, } from './prompts';
|
|
20
20
|
export { DeleteBySourceDataSchema, DeleteBySourceResponseSchema, DeleteBySourceBadRequestErrorSchema, DeleteBySourcePluginUnavailableErrorSchema, DeleteBySourceErrorSchema, KnowledgeAskRequestSchema, KnowledgeAskSourceSchema, KnowledgeAskChunkSchema, KnowledgeAskDataSchema, KnowledgeAskResponseSchema, KnowledgeAskBadRequestErrorSchema, KnowledgeAskAIUnavailableErrorSchema, KnowledgeAskPluginUnavailableErrorSchema, KnowledgeAskErrorSchema, type DeleteBySourceData, type DeleteBySourceResponse, type KnowledgeAskRequest, type KnowledgeAskSource, type KnowledgeAskChunk, type KnowledgeAskData, type KnowledgeAskResponse, } from './knowledge';
|
|
21
21
|
export { EmbeddingMigrationRequestSchema, CollectionMigrationResultSchema, EmbeddingMigrationDataSchema, EmbeddingMigrationResponseSchema, EmbeddingMigrationBadRequestErrorSchema, EmbeddingMigrationServiceUnavailableErrorSchema, EmbeddingMigrationErrorSchema, type EmbeddingMigrationRequest, type CollectionMigrationResult, type EmbeddingMigrationData, type EmbeddingMigrationResponse, } from './embeddings';
|
|
22
22
|
export { UserCreateRequestSchema, UserCreateDataSchema, UserCreateResponseSchema, UserListDataSchema, UserListResponseSchema, UserDeleteDataSchema, UserDeleteResponseSchema, UserEntrySchema, UserEmailParamsSchema, UserConflictErrorSchema, UserNotFoundErrorSchema, UserBadRequestErrorSchema, UserManagementErrorSchema, type UserCreateRequest, type UserCreateData, type UserCreateResponse, type UserListData, type UserListResponse, type UserDeleteData, type UserDeleteResponse, } from './users';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAG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AqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,2BAA2B,EAC3B,KAAK,IAAI,EACT,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,+BAA+B,EAC/B,2BAA2B,EAC3B,gCAAgC,EAChC,0CAA0C,EAC1C,gCAAgC,EAChC,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAA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AAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,iCAAiC,EACjC,oCAAoC,EACpC,wCAAwC,EACxC,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,gCAAgC,EAChC,uCAAuC,EACvC,+CAA+C,EAC/C,6BAA6B,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.UserManagementErrorSchema = exports.UserBadRequestErrorSchema = exports.UserNotFoundErrorSchema = exports.UserConflictErrorSchema = exports.UserEmailParamsSchema = exports.UserEntrySchema = exports.UserDeleteResponseSchema = exports.UserDeleteDataSchema = exports.UserListResponseSchema = exports.UserListDataSchema = exports.UserCreateResponseSchema = exports.UserCreateDataSchema = exports.UserCreateRequestSchema = exports.EmbeddingMigrationErrorSchema = exports.EmbeddingMigrationServiceUnavailableErrorSchema = exports.EmbeddingMigrationBadRequestErrorSchema = exports.EmbeddingMigrationResponseSchema = exports.EmbeddingMigrationDataSchema = exports.CollectionMigrationResultSchema = exports.EmbeddingMigrationRequestSchema = exports.KnowledgeAskErrorSchema = exports.KnowledgeAskPluginUnavailableErrorSchema = exports.KnowledgeAskAIUnavailableErrorSchema = exports.KnowledgeAskBadRequestErrorSchema = exports.KnowledgeAskResponseSchema = exports.KnowledgeAskDataSchema = exports.KnowledgeAskChunkSchema = exports.KnowledgeAskSourceSchema = exports.KnowledgeAskRequestSchema = exports.DeleteBySourceErrorSchema = exports.DeleteBySourcePluginUnavailableErrorSchema = exports.DeleteBySourceBadRequestErrorSchema = exports.DeleteBySourceResponseSchema = void 0;
|
|
14
|
+
exports.ResourceSyncDataSchema = exports.ResourceSyncRequestSchema = exports.NamespacesResponseSchema = exports.NamespacesDataSchema = exports.SingleResourceResponseSchema = exports.SingleResourceDataSchema = exports.ResourceListResponseSchema = exports.ResourceListDataSchema = exports.ResourceSearchResponseSchema = exports.ResourceSearchDataSchema = exports.ResourceSummarySchema = exports.ResourceKindsResponseSchema = exports.ResourceKindsDataSchema = exports.ResourceKindSchema = exports.VisualizationInternalErrorSchema = exports.VisualizationServiceUnavailableErrorSchema = exports.VisualizationNotFoundErrorSchema = exports.VisualizationResponseSchema = exports.VisualizationResponseDataSchema = exports.VisualizationSchema = exports.VisualizationContentSchema = exports.BarChartContentSchema = exports.BarChartDataItemSchema = exports.DiffContentSchema = exports.CardsContentSchema = exports.CardItemSchema = exports.TableContentSchema = exports.CodeContentSchema = exports.VisualizationTypeSchema = exports.ToolDiscoveryErrorSchema = exports.ToolExecutionErrorSchema = exports.InvalidToolRequestErrorSchema = exports.ToolNotFoundErrorSchema = exports.ToolExecutionResponseSchema = exports.ToolExecutionDataSchema = exports.ToolDiscoveryResponseSchema = exports.ToolDiscoveryDataSchema = exports.ToolInfoSchema = exports.ToolParameterSchema = exports.createSuccessResponseSchema = exports.InternalServerErrorSchema = exports.ServiceUnavailableErrorSchema = exports.PayloadTooLargeErrorSchema = exports.MethodNotAllowedErrorSchema = exports.BadRequestErrorSchema = exports.NotFoundErrorSchema = exports.ErrorResponseSchema = exports.RestApiResponseSchema = exports.ErrorDetailsSchema = exports.MetaSchema = void 0;
|
|
15
|
+
exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptsSourceErrorSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptFileSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = exports.RemediationSSEEventSchema = exports.SessionListErrorSchema = exports.SessionListResponseSchema = exports.SessionListDataSchema = exports.SessionSummarySchema = exports.SessionListQuerySchema = exports.SessionRetrievalErrorSchema = exports.SessionNotFoundErrorSchema = exports.SessionResponseSchema = exports.SessionResponseDataSchema = exports.SessionDataSchema = exports.SessionMetadataSchema = exports.LogsErrorSchema = exports.LogsPluginUnavailableErrorSchema = exports.LogsBadRequestErrorSchema = exports.LogsResponseSchema = exports.LogsDataSchema = exports.EventsErrorSchema = exports.EventsPluginUnavailableErrorSchema = exports.EventsBadRequestErrorSchema = exports.EventsResponseSchema = exports.EventsDataSchema = exports.KubernetesEventSchema = exports.EventInvolvedObjectSchema = exports.ResourceSyncErrorSchema = exports.NamespacesErrorSchema = exports.SingleResourceErrorSchema = exports.ResourceListErrorSchema = exports.ResourceSearchErrorSchema = exports.ResourceKindsErrorSchema = exports.ResourcePluginUnavailableErrorSchema = exports.ResourceBadRequestErrorSchema = exports.ResourceNotFoundErrorSchema = exports.ResourceSyncResponseSchema = void 0;
|
|
16
|
+
exports.UserManagementErrorSchema = exports.UserBadRequestErrorSchema = exports.UserNotFoundErrorSchema = exports.UserConflictErrorSchema = exports.UserEmailParamsSchema = exports.UserEntrySchema = exports.UserDeleteResponseSchema = exports.UserDeleteDataSchema = exports.UserListResponseSchema = exports.UserListDataSchema = exports.UserCreateResponseSchema = exports.UserCreateDataSchema = exports.UserCreateRequestSchema = exports.EmbeddingMigrationErrorSchema = exports.EmbeddingMigrationServiceUnavailableErrorSchema = exports.EmbeddingMigrationBadRequestErrorSchema = exports.EmbeddingMigrationResponseSchema = exports.EmbeddingMigrationDataSchema = exports.CollectionMigrationResultSchema = exports.EmbeddingMigrationRequestSchema = exports.KnowledgeAskErrorSchema = exports.KnowledgeAskPluginUnavailableErrorSchema = exports.KnowledgeAskAIUnavailableErrorSchema = exports.KnowledgeAskBadRequestErrorSchema = exports.KnowledgeAskResponseSchema = exports.KnowledgeAskDataSchema = exports.KnowledgeAskChunkSchema = exports.KnowledgeAskSourceSchema = exports.KnowledgeAskRequestSchema = exports.DeleteBySourceErrorSchema = exports.DeleteBySourcePluginUnavailableErrorSchema = exports.DeleteBySourceBadRequestErrorSchema = exports.DeleteBySourceResponseSchema = exports.DeleteBySourceDataSchema = exports.PromptsListQuerySchema = exports.PromptGetQuerySchema = exports.PromptsSourceIngestServerErrorSchema = exports.PromptsSourceIngestPayloadTooLargeErrorSchema = exports.PromptsSourceIngestErrorSchema = exports.PromptsSourceIngestResponseSchema = exports.PromptsSourceIngestDataSchema = exports.PromptsSourceIngestRequestSchema = exports.PromptsSourceIngestFileSchema = exports.PromptsCacheRefreshErrorSchema = void 0;
|
|
17
17
|
// Common schemas
|
|
18
18
|
var common_1 = require("./common");
|
|
19
19
|
Object.defineProperty(exports, "MetaSchema", { enumerable: true, get: function () { return common_1.MetaSchema; } });
|
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "ErrorResponseSchema", { enumerable: true, get: f
|
|
|
23
23
|
Object.defineProperty(exports, "NotFoundErrorSchema", { enumerable: true, get: function () { return common_1.NotFoundErrorSchema; } });
|
|
24
24
|
Object.defineProperty(exports, "BadRequestErrorSchema", { enumerable: true, get: function () { return common_1.BadRequestErrorSchema; } });
|
|
25
25
|
Object.defineProperty(exports, "MethodNotAllowedErrorSchema", { enumerable: true, get: function () { return common_1.MethodNotAllowedErrorSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "PayloadTooLargeErrorSchema", { enumerable: true, get: function () { return common_1.PayloadTooLargeErrorSchema; } });
|
|
26
27
|
Object.defineProperty(exports, "ServiceUnavailableErrorSchema", { enumerable: true, get: function () { return common_1.ServiceUnavailableErrorSchema; } });
|
|
27
28
|
Object.defineProperty(exports, "InternalServerErrorSchema", { enumerable: true, get: function () { return common_1.InternalServerErrorSchema; } });
|
|
28
29
|
Object.defineProperty(exports, "createSuccessResponseSchema", { enumerable: true, get: function () { return common_1.createSuccessResponseSchema; } });
|
|
@@ -126,9 +127,19 @@ Object.defineProperty(exports, "PromptNotFoundErrorSchema", { enumerable: true,
|
|
|
126
127
|
Object.defineProperty(exports, "PromptValidationErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptValidationErrorSchema; } });
|
|
127
128
|
Object.defineProperty(exports, "PromptsListErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsListErrorSchema; } });
|
|
128
129
|
Object.defineProperty(exports, "PromptGetErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptGetErrorSchema; } });
|
|
130
|
+
Object.defineProperty(exports, "PromptsSourceErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceErrorSchema; } });
|
|
129
131
|
Object.defineProperty(exports, "PromptsCacheRefreshDataSchema", { enumerable: true, get: function () { return prompts_1.PromptsCacheRefreshDataSchema; } });
|
|
130
132
|
Object.defineProperty(exports, "PromptsCacheRefreshResponseSchema", { enumerable: true, get: function () { return prompts_1.PromptsCacheRefreshResponseSchema; } });
|
|
131
133
|
Object.defineProperty(exports, "PromptsCacheRefreshErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsCacheRefreshErrorSchema; } });
|
|
134
|
+
Object.defineProperty(exports, "PromptsSourceIngestFileSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestFileSchema; } });
|
|
135
|
+
Object.defineProperty(exports, "PromptsSourceIngestRequestSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestRequestSchema; } });
|
|
136
|
+
Object.defineProperty(exports, "PromptsSourceIngestDataSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestDataSchema; } });
|
|
137
|
+
Object.defineProperty(exports, "PromptsSourceIngestResponseSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestResponseSchema; } });
|
|
138
|
+
Object.defineProperty(exports, "PromptsSourceIngestErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestErrorSchema; } });
|
|
139
|
+
Object.defineProperty(exports, "PromptsSourceIngestPayloadTooLargeErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestPayloadTooLargeErrorSchema; } });
|
|
140
|
+
Object.defineProperty(exports, "PromptsSourceIngestServerErrorSchema", { enumerable: true, get: function () { return prompts_1.PromptsSourceIngestServerErrorSchema; } });
|
|
141
|
+
Object.defineProperty(exports, "PromptGetQuerySchema", { enumerable: true, get: function () { return prompts_1.PromptGetQuerySchema; } });
|
|
142
|
+
Object.defineProperty(exports, "PromptsListQuerySchema", { enumerable: true, get: function () { return prompts_1.PromptsListQuerySchema; } });
|
|
132
143
|
// Knowledge schemas
|
|
133
144
|
var knowledge_1 = require("./knowledge");
|
|
134
145
|
Object.defineProperty(exports, "DeleteBySourceDataSchema", { enumerable: true, get: function () { return knowledge_1.DeleteBySourceDataSchema; } });
|
|
@@ -198,6 +198,24 @@ export declare const PromptGetErrorSchema: z.ZodObject<{
|
|
|
198
198
|
details: z.ZodOptional<z.ZodAny>;
|
|
199
199
|
}, z.core.$strip>;
|
|
200
200
|
}, z.core.$strip>;
|
|
201
|
+
/**
|
|
202
|
+
* 502 returned when a per-request prompts-repo override (?repo= / body.repo)
|
|
203
|
+
* could not be cloned — e.g. a missing/wrong forwarded X-Dot-AI-Git-Token or an
|
|
204
|
+
* unreachable host (issue #575). The message is credential-scrubbed.
|
|
205
|
+
*/
|
|
206
|
+
export declare const PromptsSourceErrorSchema: z.ZodObject<{
|
|
207
|
+
success: z.ZodLiteral<false>;
|
|
208
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
timestamp: z.ZodString;
|
|
210
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
211
|
+
version: z.ZodString;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
error: z.ZodObject<{
|
|
214
|
+
code: z.ZodLiteral<"PROMPTS_SOURCE_ERROR">;
|
|
215
|
+
message: z.ZodString;
|
|
216
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
}, z.core.$strip>;
|
|
201
219
|
/**
|
|
202
220
|
* Prompts cache refresh response data
|
|
203
221
|
* POST /api/v1/prompts/refresh
|
|
@@ -235,4 +253,141 @@ export declare const PromptsCacheRefreshErrorSchema: z.ZodObject<{
|
|
|
235
253
|
details: z.ZodOptional<z.ZodAny>;
|
|
236
254
|
}, z.core.$strip>;
|
|
237
255
|
}, z.core.$strip>;
|
|
256
|
+
/**
|
|
257
|
+
* Source ingestion (PRD #647 M2)
|
|
258
|
+
* POST /api/v1/prompts/sources
|
|
259
|
+
*
|
|
260
|
+
* A single file in the uploaded manifest: a relative path, base64-encoded
|
|
261
|
+
* content, and an optional POSIX mode string.
|
|
262
|
+
*/
|
|
263
|
+
export declare const PromptsSourceIngestFileSchema: z.ZodObject<{
|
|
264
|
+
path: z.ZodString;
|
|
265
|
+
content: z.ZodString;
|
|
266
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
export type PromptsSourceIngestFile = z.infer<typeof PromptsSourceIngestFileSchema>;
|
|
269
|
+
/**
|
|
270
|
+
* Source ingestion request body — the CLI-uploaded skill source manifest.
|
|
271
|
+
*/
|
|
272
|
+
export declare const PromptsSourceIngestRequestSchema: z.ZodObject<{
|
|
273
|
+
source: z.ZodString;
|
|
274
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
275
|
+
files: z.ZodArray<z.ZodObject<{
|
|
276
|
+
path: z.ZodString;
|
|
277
|
+
content: z.ZodString;
|
|
278
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
export type PromptsSourceIngestRequest = z.infer<typeof PromptsSourceIngestRequestSchema>;
|
|
282
|
+
/**
|
|
283
|
+
* Source ingestion response data — the cached source echoed back (scrubbed).
|
|
284
|
+
*/
|
|
285
|
+
export declare const PromptsSourceIngestDataSchema: z.ZodObject<{
|
|
286
|
+
source: z.ZodString;
|
|
287
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
288
|
+
fileCount: z.ZodNumber;
|
|
289
|
+
status: z.ZodEnum<{
|
|
290
|
+
ingested: "ingested";
|
|
291
|
+
unchanged: "unchanged";
|
|
292
|
+
}>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
export type PromptsSourceIngestData = z.infer<typeof PromptsSourceIngestDataSchema>;
|
|
295
|
+
export declare const PromptsSourceIngestResponseSchema: z.ZodObject<{
|
|
296
|
+
success: z.ZodLiteral<true>;
|
|
297
|
+
data: z.ZodObject<{
|
|
298
|
+
source: z.ZodString;
|
|
299
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
300
|
+
fileCount: z.ZodNumber;
|
|
301
|
+
status: z.ZodEnum<{
|
|
302
|
+
ingested: "ingested";
|
|
303
|
+
unchanged: "unchanged";
|
|
304
|
+
}>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
timestamp: z.ZodString;
|
|
308
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
309
|
+
version: z.ZodString;
|
|
310
|
+
}, z.core.$strip>>;
|
|
311
|
+
}, z.core.$strip>;
|
|
312
|
+
export type PromptsSourceIngestResponse = z.infer<typeof PromptsSourceIngestResponseSchema>;
|
|
313
|
+
export declare const PromptsSourceIngestErrorSchema: z.ZodObject<{
|
|
314
|
+
success: z.ZodLiteral<false>;
|
|
315
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
timestamp: z.ZodString;
|
|
317
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
318
|
+
version: z.ZodString;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
error: z.ZodObject<{
|
|
321
|
+
code: z.ZodLiteral<"VALIDATION_ERROR">;
|
|
322
|
+
message: z.ZodString;
|
|
323
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
/**
|
|
327
|
+
* PRD #647 A7 (CodeRabbit) — 413 returned when the ingest raw body exceeds the
|
|
328
|
+
* 512 KiB cap (enforced in mcp.ts parseRequestBody before route dispatch). The
|
|
329
|
+
* handler emits code PAYLOAD_TOO_LARGE.
|
|
330
|
+
*/
|
|
331
|
+
export declare const PromptsSourceIngestPayloadTooLargeErrorSchema: z.ZodObject<{
|
|
332
|
+
success: z.ZodLiteral<false>;
|
|
333
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
334
|
+
timestamp: z.ZodString;
|
|
335
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
336
|
+
version: z.ZodString;
|
|
337
|
+
}, z.core.$strip>>;
|
|
338
|
+
error: z.ZodObject<{
|
|
339
|
+
message: z.ZodString;
|
|
340
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
341
|
+
code: z.ZodLiteral<"PAYLOAD_TOO_LARGE">;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
/**
|
|
345
|
+
* PRD #647 A8 (CodeRabbit) — endpoint-specific 500 for the ingest route. The
|
|
346
|
+
* handler only ever emits PROMPTS_SOURCE_INGEST_ERROR for non-validation
|
|
347
|
+
* failures (rest-api.ts handlePromptsSourceIngest), so the contract is narrowed
|
|
348
|
+
* from the shared InternalServerErrorSchema union to exactly that code to avoid
|
|
349
|
+
* misleading client SDK unions.
|
|
350
|
+
*/
|
|
351
|
+
export declare const PromptsSourceIngestServerErrorSchema: z.ZodObject<{
|
|
352
|
+
success: z.ZodLiteral<false>;
|
|
353
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
timestamp: z.ZodString;
|
|
355
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
356
|
+
version: z.ZodString;
|
|
357
|
+
}, z.core.$strip>>;
|
|
358
|
+
error: z.ZodObject<{
|
|
359
|
+
code: z.ZodLiteral<"PROMPTS_SOURCE_INGEST_ERROR">;
|
|
360
|
+
message: z.ZodString;
|
|
361
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
/**
|
|
365
|
+
* PRD #647 A6 (CodeRabbit) — query parameters the render endpoint
|
|
366
|
+
* (POST /api/v1/prompts/:promptName) accepts. These were previously undeclared
|
|
367
|
+
* by convention; declaring them makes the new `?source=` ingest-render contract
|
|
368
|
+
* (and its `?repo=`/`?path=`/`?branch=` siblings) discoverable in the OpenAPI
|
|
369
|
+
* spec. All are optional and additive — absent means the env-var/built-in path.
|
|
370
|
+
*/
|
|
371
|
+
export declare const PromptGetQuerySchema: z.ZodObject<{
|
|
372
|
+
source: z.ZodOptional<z.ZodString>;
|
|
373
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
374
|
+
path: z.ZodOptional<z.ZodString>;
|
|
375
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
export type PromptGetQuery = z.infer<typeof PromptGetQuerySchema>;
|
|
378
|
+
/**
|
|
379
|
+
* PRD #647 list-by-source — query parameters the list endpoint
|
|
380
|
+
* (GET /api/v1/prompts) accepts. Mirrors PromptGetQuerySchema: `?source=`
|
|
381
|
+
* enumerates a previously-ingested (CLI-uploaded) source with no git clone, and
|
|
382
|
+
* its `?repo=`/`?path=`/`?branch=` siblings select a per-request git override.
|
|
383
|
+
* All are optional and additive — absent means the env-var/built-in set, so the
|
|
384
|
+
* no-query behavior is byte-identical to before.
|
|
385
|
+
*/
|
|
386
|
+
export declare const PromptsListQuerySchema: z.ZodObject<{
|
|
387
|
+
source: z.ZodOptional<z.ZodString>;
|
|
388
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
389
|
+
path: z.ZodOptional<z.ZodString>;
|
|
390
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
391
|
+
}, z.core.$strip>;
|
|
392
|
+
export type PromptsListQuery = z.infer<typeof PromptsListQuerySchema>;
|
|
238
393
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;iBAI3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAEhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAAqD,CAAC;AAE5F,MAAM,MAAM,mBAA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AAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;iBAaxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;iBAE7C,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;iBAMzC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;iBAC9B,CAAC;AAE7B;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;iBAO7C,CAAC;AAEL;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;iBAmB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;;;iBAmBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.PromptsCacheRefreshErrorSchema = exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptFileSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = void 0;
|
|
9
|
+
exports.PromptsListQuerySchema = exports.PromptGetQuerySchema = exports.PromptsSourceIngestServerErrorSchema = exports.PromptsSourceIngestPayloadTooLargeErrorSchema = exports.PromptsSourceIngestErrorSchema = exports.PromptsSourceIngestResponseSchema = exports.PromptsSourceIngestDataSchema = exports.PromptsSourceIngestRequestSchema = exports.PromptsSourceIngestFileSchema = exports.PromptsCacheRefreshErrorSchema = exports.PromptsCacheRefreshResponseSchema = exports.PromptsCacheRefreshDataSchema = exports.PromptsSourceErrorSchema = exports.PromptGetErrorSchema = exports.PromptsListErrorSchema = exports.PromptValidationErrorSchema = exports.PromptNotFoundErrorSchema = exports.PromptGetRequestSchema = exports.PromptGetResponseSchema = exports.PromptGetDataSchema = exports.PromptFileSchema = exports.PromptMessageSchema = exports.PromptsListResponseSchema = exports.PromptsListDataSchema = exports.PromptInfoSchema = exports.PromptArgumentSchema = void 0;
|
|
10
10
|
const zod_1 = require("zod");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
/**
|
|
@@ -97,6 +97,18 @@ exports.PromptGetErrorSchema = common_1.InternalServerErrorSchema.extend({
|
|
|
97
97
|
details: zod_1.z.any().optional(),
|
|
98
98
|
}),
|
|
99
99
|
});
|
|
100
|
+
/**
|
|
101
|
+
* 502 returned when a per-request prompts-repo override (?repo= / body.repo)
|
|
102
|
+
* could not be cloned — e.g. a missing/wrong forwarded X-Dot-AI-Git-Token or an
|
|
103
|
+
* unreachable host (issue #575). The message is credential-scrubbed.
|
|
104
|
+
*/
|
|
105
|
+
exports.PromptsSourceErrorSchema = common_1.BadGatewayErrorSchema.extend({
|
|
106
|
+
error: zod_1.z.object({
|
|
107
|
+
code: zod_1.z.literal('PROMPTS_SOURCE_ERROR'),
|
|
108
|
+
message: zod_1.z.string(),
|
|
109
|
+
details: zod_1.z.any().optional(),
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
100
112
|
/**
|
|
101
113
|
* Prompts cache refresh response data
|
|
102
114
|
* POST /api/v1/prompts/refresh
|
|
@@ -114,3 +126,124 @@ exports.PromptsCacheRefreshErrorSchema = common_1.InternalServerErrorSchema.exte
|
|
|
114
126
|
details: zod_1.z.any().optional(),
|
|
115
127
|
}),
|
|
116
128
|
});
|
|
129
|
+
/**
|
|
130
|
+
* Source ingestion (PRD #647 M2)
|
|
131
|
+
* POST /api/v1/prompts/sources
|
|
132
|
+
*
|
|
133
|
+
* A single file in the uploaded manifest: a relative path, base64-encoded
|
|
134
|
+
* content, and an optional POSIX mode string.
|
|
135
|
+
*/
|
|
136
|
+
exports.PromptsSourceIngestFileSchema = zod_1.z.object({
|
|
137
|
+
path: zod_1.z.string().describe('Relative path within the uploaded skill source'),
|
|
138
|
+
content: zod_1.z.string().describe('Base64-encoded file content'),
|
|
139
|
+
mode: zod_1.z.string().optional().describe('POSIX file mode (e.g., "0644")'),
|
|
140
|
+
});
|
|
141
|
+
/**
|
|
142
|
+
* Source ingestion request body — the CLI-uploaded skill source manifest.
|
|
143
|
+
*/
|
|
144
|
+
exports.PromptsSourceIngestRequestSchema = zod_1.z.object({
|
|
145
|
+
source: zod_1.z
|
|
146
|
+
.string()
|
|
147
|
+
.describe('Stable source identifier (e.g., "local:team-dev" or a git URL the server cannot reach)'),
|
|
148
|
+
contentHash: zod_1.z
|
|
149
|
+
.string()
|
|
150
|
+
.optional()
|
|
151
|
+
.describe('CLI-computed content hash (enables future re-upload dedup)'),
|
|
152
|
+
files: zod_1.z
|
|
153
|
+
.array(exports.PromptsSourceIngestFileSchema)
|
|
154
|
+
.describe('Uploaded files with base64-encoded content'),
|
|
155
|
+
});
|
|
156
|
+
/**
|
|
157
|
+
* Source ingestion response data — the cached source echoed back (scrubbed).
|
|
158
|
+
*/
|
|
159
|
+
exports.PromptsSourceIngestDataSchema = zod_1.z.object({
|
|
160
|
+
source: zod_1.z
|
|
161
|
+
.string()
|
|
162
|
+
.describe('Credential-scrubbed identifier the cached source is keyed by'),
|
|
163
|
+
contentHash: zod_1.z.string().optional().describe('Echoed content hash, if provided'),
|
|
164
|
+
fileCount: zod_1.z.number().describe('Number of files cached'),
|
|
165
|
+
// PRD #647 N16: the runtime only ever returns 'ingested' (decoded+written) or
|
|
166
|
+
// 'unchanged' (D3 dedup short-circuit), so pin the contract to that union.
|
|
167
|
+
status: zod_1.z
|
|
168
|
+
.enum(['ingested', 'unchanged'])
|
|
169
|
+
.describe('Ingestion status: "ingested" (decoded and cached) or "unchanged" (content-hash dedup short-circuit)'),
|
|
170
|
+
});
|
|
171
|
+
exports.PromptsSourceIngestResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.PromptsSourceIngestDataSchema);
|
|
172
|
+
exports.PromptsSourceIngestErrorSchema = common_1.BadRequestErrorSchema.extend({
|
|
173
|
+
error: zod_1.z.object({
|
|
174
|
+
code: zod_1.z.literal('VALIDATION_ERROR'),
|
|
175
|
+
message: zod_1.z.string(),
|
|
176
|
+
details: zod_1.z.any().optional(),
|
|
177
|
+
}),
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* PRD #647 A7 (CodeRabbit) — 413 returned when the ingest raw body exceeds the
|
|
181
|
+
* 512 KiB cap (enforced in mcp.ts parseRequestBody before route dispatch). The
|
|
182
|
+
* handler emits code PAYLOAD_TOO_LARGE.
|
|
183
|
+
*/
|
|
184
|
+
exports.PromptsSourceIngestPayloadTooLargeErrorSchema = common_1.PayloadTooLargeErrorSchema;
|
|
185
|
+
/**
|
|
186
|
+
* PRD #647 A8 (CodeRabbit) — endpoint-specific 500 for the ingest route. The
|
|
187
|
+
* handler only ever emits PROMPTS_SOURCE_INGEST_ERROR for non-validation
|
|
188
|
+
* failures (rest-api.ts handlePromptsSourceIngest), so the contract is narrowed
|
|
189
|
+
* from the shared InternalServerErrorSchema union to exactly that code to avoid
|
|
190
|
+
* misleading client SDK unions.
|
|
191
|
+
*/
|
|
192
|
+
exports.PromptsSourceIngestServerErrorSchema = common_1.InternalServerErrorSchema.extend({
|
|
193
|
+
error: zod_1.z.object({
|
|
194
|
+
code: zod_1.z.literal('PROMPTS_SOURCE_INGEST_ERROR'),
|
|
195
|
+
message: zod_1.z.string(),
|
|
196
|
+
details: zod_1.z.any().optional(),
|
|
197
|
+
}),
|
|
198
|
+
});
|
|
199
|
+
/**
|
|
200
|
+
* PRD #647 A6 (CodeRabbit) — query parameters the render endpoint
|
|
201
|
+
* (POST /api/v1/prompts/:promptName) accepts. These were previously undeclared
|
|
202
|
+
* by convention; declaring them makes the new `?source=` ingest-render contract
|
|
203
|
+
* (and its `?repo=`/`?path=`/`?branch=` siblings) discoverable in the OpenAPI
|
|
204
|
+
* spec. All are optional and additive — absent means the env-var/built-in path.
|
|
205
|
+
*/
|
|
206
|
+
exports.PromptGetQuerySchema = zod_1.z.object({
|
|
207
|
+
source: zod_1.z
|
|
208
|
+
.string()
|
|
209
|
+
.optional()
|
|
210
|
+
.describe('Render a previously-ingested (CLI-uploaded) source by its identifier with no git clone (PRD #647). Takes precedence over repo/path/branch.'),
|
|
211
|
+
repo: zod_1.z
|
|
212
|
+
.string()
|
|
213
|
+
.optional()
|
|
214
|
+
.describe('Per-request git repository URL override (PRD #581)'),
|
|
215
|
+
path: zod_1.z
|
|
216
|
+
.string()
|
|
217
|
+
.optional()
|
|
218
|
+
.describe('Subdirectory within the override repo (PRD #621)'),
|
|
219
|
+
branch: zod_1.z
|
|
220
|
+
.string()
|
|
221
|
+
.optional()
|
|
222
|
+
.describe('Branch of the override repo (PRD #621)'),
|
|
223
|
+
});
|
|
224
|
+
/**
|
|
225
|
+
* PRD #647 list-by-source — query parameters the list endpoint
|
|
226
|
+
* (GET /api/v1/prompts) accepts. Mirrors PromptGetQuerySchema: `?source=`
|
|
227
|
+
* enumerates a previously-ingested (CLI-uploaded) source with no git clone, and
|
|
228
|
+
* its `?repo=`/`?path=`/`?branch=` siblings select a per-request git override.
|
|
229
|
+
* All are optional and additive — absent means the env-var/built-in set, so the
|
|
230
|
+
* no-query behavior is byte-identical to before.
|
|
231
|
+
*/
|
|
232
|
+
exports.PromptsListQuerySchema = zod_1.z.object({
|
|
233
|
+
source: zod_1.z
|
|
234
|
+
.string()
|
|
235
|
+
.optional()
|
|
236
|
+
.describe('Enumerate a previously-ingested (CLI-uploaded) source by its identifier with no git clone (PRD #647). An unknown/evicted identifier returns 400 with re-upload guidance. Takes precedence over repo/path/branch.'),
|
|
237
|
+
repo: zod_1.z
|
|
238
|
+
.string()
|
|
239
|
+
.optional()
|
|
240
|
+
.describe('Per-request git repository URL override (PRD #581)'),
|
|
241
|
+
path: zod_1.z
|
|
242
|
+
.string()
|
|
243
|
+
.optional()
|
|
244
|
+
.describe('Subdirectory within the override repo (PRD #621)'),
|
|
245
|
+
branch: zod_1.z
|
|
246
|
+
.string()
|
|
247
|
+
.optional()
|
|
248
|
+
.describe('Branch of the override repo (PRD #621)'),
|
|
249
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/tools/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;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AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,eAAe,GAAG,SAAS,EACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,gCAAgC,EAAE,mBAAmB,GACtE,OAAO,CAAC,mBAAmB,CAAC,CAyE9B;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,OAAO,gCAAgC,EAAE,mBAAmB,GACtE,OAAO,CAAC,kBAAkB,CAAC,CA2H7B"}
|
package/dist/tools/prompts.js
CHANGED
|
@@ -221,6 +221,23 @@ async function loadAllPrompts(logger, baseDir, forceRefresh = false, override) {
|
|
|
221
221
|
userPrompts = await loadUserPrompts(logger, forceRefresh, override);
|
|
222
222
|
}
|
|
223
223
|
catch (error) {
|
|
224
|
+
// Surface two classes of explicit, caller-actionable failures instead of
|
|
225
|
+
// silently degrading to built-in prompts:
|
|
226
|
+
// - UserPromptsOverrideError (issue #575): a per-request ?repo=/body.repo
|
|
227
|
+
// override (PRD #581/#621) whose source failed to clone. Env-var-repo
|
|
228
|
+
// failures never reach here (loadUserPrompts returns [] for those).
|
|
229
|
+
// - IngestedSourceNotFoundError (PRD #647 D2): a render that names a
|
|
230
|
+
// missing ingested ?source= identifier — re-throw so the REST handler
|
|
231
|
+
// maps it to a 400 with re-upload guidance instead of the generic
|
|
232
|
+
// "Prompt not found".
|
|
233
|
+
// Matched by name to avoid a circular import — the loader imports from this
|
|
234
|
+
// module. Other errors (e.g. the dynamic import itself failing) stay
|
|
235
|
+
// non-fatal.
|
|
236
|
+
if (error instanceof Error &&
|
|
237
|
+
(error.name === 'UserPromptsOverrideError' ||
|
|
238
|
+
error.name === 'IngestedSourceNotFoundError')) {
|
|
239
|
+
throw error;
|
|
240
|
+
}
|
|
224
241
|
logger.debug('User prompts loader not available or failed', {
|
|
225
242
|
error: error instanceof Error ? error.message : 'Unknown error',
|
|
226
243
|
});
|
|
@@ -272,6 +289,18 @@ async function handlePromptsListRequest(args, logger, requestId, override) {
|
|
|
272
289
|
};
|
|
273
290
|
}
|
|
274
291
|
catch (error) {
|
|
292
|
+
// Surface explicit, caller-actionable override failures unchanged so the
|
|
293
|
+
// REST layer can map them precisely:
|
|
294
|
+
// - UserPromptsOverrideError → 502 (issue #575): a ?repo= override clone
|
|
295
|
+
// that failed.
|
|
296
|
+
// - IngestedSourceNotFoundError → 400 (PRD #647 list-by-source / D2): a
|
|
297
|
+
// ?source= identifier that is unknown/evicted, so the caller gets the
|
|
298
|
+
// re-upload guidance instead of a generic 500 or a silent builtin set.
|
|
299
|
+
if (error instanceof Error &&
|
|
300
|
+
(error.name === 'UserPromptsOverrideError' ||
|
|
301
|
+
error.name === 'IngestedSourceNotFoundError')) {
|
|
302
|
+
throw error;
|
|
303
|
+
}
|
|
275
304
|
logger.error('Prompts list request failed', error);
|
|
276
305
|
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.OPERATION, error_handling_1.ErrorSeverity.HIGH, error instanceof Error ? error.message : 'Unknown error in prompts list', {
|
|
277
306
|
operation: 'prompts_list',
|
|
@@ -356,8 +385,14 @@ async function handlePromptsGetRequest(args, logger, requestId, override) {
|
|
|
356
385
|
}
|
|
357
386
|
catch (error) {
|
|
358
387
|
logger.error('Prompts get request failed', error);
|
|
359
|
-
//
|
|
360
|
-
|
|
388
|
+
// Surface explicit, caller-actionable failures unchanged so the REST layer
|
|
389
|
+
// can map them precisely: UserPromptsOverrideError → 502 (issue #575) and
|
|
390
|
+
// IngestedSourceNotFoundError → 400 with re-upload guidance (PRD #647 D2);
|
|
391
|
+
// likewise re-throw if already an AppError.
|
|
392
|
+
if (error instanceof Error &&
|
|
393
|
+
(error.name === 'UserPromptsOverrideError' ||
|
|
394
|
+
error.name === 'IngestedSourceNotFoundError' ||
|
|
395
|
+
'category' in error)) {
|
|
361
396
|
throw error;
|
|
362
397
|
}
|
|
363
398
|
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.OPERATION, error_handling_1.ErrorSeverity.HIGH, error instanceof Error ? error.message : 'Unknown error in prompts get', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
122
122
|
"@openrouter/ai-sdk-provider": "^2.2.5",
|
|
123
123
|
"@opentelemetry/api": "^1.9.0",
|
|
124
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
124
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
|
125
125
|
"@opentelemetry/resources": "^2.2.0",
|
|
126
|
-
"@opentelemetry/sdk-node": "^0.
|
|
126
|
+
"@opentelemetry/sdk-node": "^0.219.0",
|
|
127
127
|
"@opentelemetry/sdk-trace-node": "^2.2.0",
|
|
128
128
|
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
129
129
|
"@qdrant/js-client-rest": "^1.15.0",
|
|
@@ -140,7 +140,9 @@
|
|
|
140
140
|
"express-rate-limit": "^8.2.2",
|
|
141
141
|
"fast-uri": ">=3.1.2",
|
|
142
142
|
"protobufjs": "^8.2.0",
|
|
143
|
-
"esbuild": "^0.28.1"
|
|
143
|
+
"esbuild": "^0.28.1",
|
|
144
|
+
"dompurify": "^3.4.11",
|
|
145
|
+
"undici": "^6.27.0"
|
|
144
146
|
},
|
|
145
147
|
"optionalDependencies": {
|
|
146
148
|
"@rollup/rollup-linux-x64-gnu": "4.60.3"
|