@owlmeans/viable-common 0.0.5 → 0.0.7
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/README.md +1 -68
- package/build/areas/consts.d.ts +1 -1
- package/build/areas/consts.js +1 -1
- package/build/connect/consts.d.ts +6 -94
- package/build/connect/consts.d.ts.map +1 -1
- package/build/connect/consts.js +2 -91
- package/build/connect/consts.js.map +1 -1
- package/build/connect/entrypoints.d.ts +3 -3
- package/build/connect/entrypoints.d.ts.map +1 -1
- package/build/connect/entrypoints.js +54 -95
- package/build/connect/entrypoints.js.map +1 -1
- package/build/connect/ops.d.ts +2 -46
- package/build/connect/ops.d.ts.map +1 -1
- package/build/connect/references.d.ts +63 -117
- package/build/connect/references.d.ts.map +1 -1
- package/build/connect/references.js +0 -16
- package/build/connect/references.js.map +1 -1
- package/build/connect/schemas.d.ts +2 -17
- package/build/connect/schemas.d.ts.map +1 -1
- package/build/connect/schemas.js +7 -91
- package/build/connect/schemas.js.map +1 -1
- package/build/connect/types.d.ts +1 -125
- package/build/connect/types.d.ts.map +1 -1
- package/build/dev/types.d.ts +3 -2
- package/build/dev/types.d.ts.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/skills/catalogue.d.ts.map +1 -1
- package/build/skills/catalogue.js +109 -103
- package/build/skills/catalogue.js.map +1 -1
- package/build/slot/consts.d.ts +2 -73
- package/build/slot/consts.d.ts.map +1 -1
- package/build/slot/consts.js +5 -105
- package/build/slot/consts.js.map +1 -1
- package/build/slot/schemas.d.ts +1 -9
- package/build/slot/schemas.d.ts.map +1 -1
- package/build/slot/schemas.js +0 -18
- package/build/slot/schemas.js.map +1 -1
- package/build/slot/types.d.ts +0 -71
- package/build/slot/types.d.ts.map +1 -1
- package/package.json +7 -15
- package/src/areas/consts.ts +1 -1
- package/src/connect/consts.ts +2 -94
- package/src/connect/entrypoints.ts +69 -139
- package/src/connect/ops.ts +2 -50
- package/src/connect/references.ts +56 -32
- package/src/connect/schemas.ts +13 -102
- package/src/connect/types.ts +2 -130
- package/src/dev/types.ts +3 -2
- package/src/index.ts +0 -1
- package/src/skills/catalogue.ts +109 -103
- package/src/slot/consts.ts +6 -112
- package/src/slot/schemas.ts +1 -20
- package/src/slot/types.ts +0 -80
- package/agent-meta/manifest.json +0 -16
- package/agent-meta/skills/viable-common/SKILL.md +0 -179
- package/build/convert/consts.d.ts +0 -539
- package/build/convert/consts.d.ts.map +0 -1
- package/build/convert/consts.js +0 -630
- package/build/convert/consts.js.map +0 -1
- package/build/convert/helpers.d.ts +0 -91
- package/build/convert/helpers.d.ts.map +0 -1
- package/build/convert/helpers.js +0 -301
- package/build/convert/helpers.js.map +0 -1
- package/build/convert/index.d.ts +0 -11
- package/build/convert/index.d.ts.map +0 -1
- package/build/convert/index.js +0 -4
- package/build/convert/index.js.map +0 -1
- package/build/convert/schemas.d.ts +0 -62
- package/build/convert/schemas.d.ts.map +0 -1
- package/build/convert/schemas.js +0 -626
- package/build/convert/schemas.js.map +0 -1
- package/build/convert/types.d.ts +0 -683
- package/build/convert/types.d.ts.map +0 -1
- package/build/convert/types.js +0 -2
- package/build/convert/types.js.map +0 -1
- package/src/convert/consts.ts +0 -672
- package/src/convert/helpers.ts +0 -340
- package/src/convert/index.ts +0 -10
- package/src/convert/schemas.ts +0 -663
- package/src/convert/types.ts +0 -741
- package/tests/connect-convert.spec.ts +0 -161
- package/tests/convert.spec.ts +0 -318
- /package/tests/{design.spec.ts → design.test.ts} +0 -0
|
@@ -1,141 +1,100 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contract, openProtocol, protocol, typed } from '@owlmeans/entrypoint';
|
|
2
2
|
import { route, RouteMethod, socket } from '@owlmeans/route';
|
|
3
|
-
import { ConverterProjectLlmBodySchema } from '../convert/schemas.js';
|
|
4
3
|
import { connect } from './consts.js';
|
|
5
|
-
import { ConnectAttachBodySchema, ConnectConfirmBodySchema,
|
|
4
|
+
import { ConnectAttachBodySchema, ConnectConfirmBodySchema, ConnectCreateBodySchema, ConnectJobParamsSchema, ConnectModifyBodySchema, ConnectOpParamsSchema, ConnectOpResultSchema, ConnectPipelineParamsSchema, ConnectPipelineResumeBodySchema, ConnectProjectIdSchema, ConnectProjectLlmBodySchema, ConnectSessionOpenSchema, ConnectSessionParamsSchema, ConnectStoryBodySchema, ConnectStoryParamsSchema, ConnectStoryQuerySchema, ConnectWaitQuerySchema } from './schemas.js';
|
|
6
5
|
/**
|
|
7
6
|
* Declare the connector's HTTP and socket surface.
|
|
8
7
|
*
|
|
9
|
-
* One list, spread into the platform's own entrypoints. Handlers are
|
|
8
|
+
* One list, spread into the platform's own entrypoints. Handlers are bound to these protocols
|
|
10
9
|
* server-side and onto client entrypoints in the SDK — the same declarations both times, which is
|
|
11
10
|
* what makes a path or a schema impossible to get wrong on one side only.
|
|
12
11
|
*/
|
|
13
12
|
export const connectEntrypoints = (opts) => {
|
|
14
13
|
const prefix = opts.path ?? '/connect';
|
|
15
14
|
const ownership = opts.gate != null
|
|
16
|
-
?
|
|
17
|
-
:
|
|
15
|
+
? { guards: opts.guard, gate: opts.gate }
|
|
16
|
+
: { guards: opts.guard };
|
|
18
17
|
const paid = opts.localLlm != null
|
|
19
|
-
? gate
|
|
18
|
+
? { gate: opts.localLlm }
|
|
20
19
|
: undefined;
|
|
21
20
|
return [
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
openProtocol(route(connect.base, prefix), ownership),
|
|
22
|
+
openProtocol(route(connect.capabilities, '/capabilities', {
|
|
24
23
|
parent: connect.base, method: RouteMethod.GET
|
|
25
24
|
})),
|
|
26
25
|
// --- session ---------------------------------------------------------------------------
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
protocol(route(connect.session.open, '/session', { parent: connect.base, method: RouteMethod.POST }), contract.request({ body: typed(ConnectSessionOpenSchema) }, typed())),
|
|
27
|
+
protocol(route(connect.session.openDelegated, '/session/delegated', {
|
|
29
28
|
parent: connect.base, method: RouteMethod.POST
|
|
30
|
-
}),
|
|
31
|
-
|
|
29
|
+
}), contract.request({ body: typed(ConnectSessionOpenSchema) }, typed()), paid),
|
|
30
|
+
protocol(route(connect.session.get, '/session/:sessionId', {
|
|
32
31
|
parent: connect.base, method: RouteMethod.GET
|
|
33
|
-
}),
|
|
34
|
-
|
|
32
|
+
}), contract.request({ params: typed(ConnectSessionParamsSchema) }, typed())),
|
|
33
|
+
protocol(route(connect.session.heartbeat, '/session/:sessionId/heartbeat', {
|
|
35
34
|
parent: connect.base, method: RouteMethod.POST
|
|
36
|
-
}),
|
|
37
|
-
|
|
35
|
+
}), contract.request({ params: typed(ConnectSessionParamsSchema) }, typed())),
|
|
36
|
+
protocol(route(connect.session.close, '/session/:sessionId/close', {
|
|
38
37
|
parent: connect.base, method: RouteMethod.POST
|
|
39
|
-
}),
|
|
40
|
-
|
|
38
|
+
}), contract.request({ params: typed(ConnectSessionParamsSchema) }, typed())),
|
|
39
|
+
protocol(route(connect.session.socket, '/connect/:sessionId', socket(opts.updateBase)), contract.request({ params: typed(ConnectSessionParamsSchema) }, typed())),
|
|
41
40
|
// --- operations ------------------------------------------------------------------------
|
|
42
|
-
|
|
41
|
+
protocol(route(connect.op.pull, '/session/:sessionId/ops', {
|
|
43
42
|
parent: connect.base, method: RouteMethod.GET
|
|
44
|
-
}),
|
|
45
|
-
|
|
43
|
+
}), contract.request({ params: typed(ConnectSessionParamsSchema), query: typed(ConnectWaitQuerySchema) }, typed())),
|
|
44
|
+
protocol(route(connect.op.submit, '/session/:sessionId/ops/:opId', {
|
|
46
45
|
parent: connect.base, method: RouteMethod.POST
|
|
47
|
-
}),
|
|
46
|
+
}), contract.request({ params: typed(ConnectOpParamsSchema), body: typed(ConnectOpResultSchema) }, typed())),
|
|
48
47
|
// --- project ---------------------------------------------------------------------------
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
protocol(route(connect.project.create, '/project', { parent: connect.base, method: RouteMethod.POST }), contract.request({ body: typed(ConnectCreateBodySchema) }, typed())),
|
|
49
|
+
openProtocol(route(connect.project.list, '/project', {
|
|
51
50
|
parent: connect.base, method: RouteMethod.GET
|
|
52
51
|
})),
|
|
53
|
-
|
|
52
|
+
protocol(route(connect.project.attach, '/project/attach', {
|
|
54
53
|
parent: connect.base, method: RouteMethod.POST
|
|
55
|
-
}),
|
|
56
|
-
|
|
54
|
+
}), contract.request({ body: typed(ConnectAttachBodySchema) }, typed())),
|
|
55
|
+
protocol(route(connect.project.confirm, '/project/:id/confirm', {
|
|
57
56
|
parent: connect.base, method: RouteMethod.POST
|
|
58
|
-
}),
|
|
59
|
-
|
|
57
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema), body: typed(ConnectConfirmBodySchema) }, typed())),
|
|
58
|
+
protocol(route(connect.project.status, '/project/:id/status', {
|
|
60
59
|
parent: connect.base, method: RouteMethod.GET
|
|
61
|
-
}),
|
|
62
|
-
|
|
60
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema) }, typed())),
|
|
61
|
+
protocol(route(connect.project.reinit, '/project/:id/reinit', {
|
|
63
62
|
parent: connect.base, method: RouteMethod.POST
|
|
64
|
-
}),
|
|
65
|
-
|
|
63
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema) }, typed())),
|
|
64
|
+
protocol(route(connect.project.modify, '/project/:id/modify', {
|
|
66
65
|
parent: connect.base, method: RouteMethod.POST
|
|
67
|
-
}),
|
|
68
|
-
|
|
66
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema), body: typed(ConnectModifyBodySchema) }, typed())),
|
|
67
|
+
protocol(route(connect.project.settings, '/project/:id/settings', {
|
|
69
68
|
parent: connect.base, method: RouteMethod.GET
|
|
70
|
-
}),
|
|
71
|
-
|
|
69
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema) }, typed())),
|
|
70
|
+
protocol(route(connect.project.llm, '/project/:id/llm', {
|
|
72
71
|
parent: connect.base, method: RouteMethod.POST
|
|
73
|
-
}),
|
|
74
|
-
|
|
72
|
+
}), contract.request({ params: typed(ConnectProjectIdSchema), body: typed(ConnectProjectLlmBodySchema) }, typed()), paid),
|
|
73
|
+
protocol(route(connect.project.job, '/project/:id/job/:jobId', {
|
|
75
74
|
parent: connect.base, method: RouteMethod.GET
|
|
76
|
-
}),
|
|
75
|
+
}), contract.request({ params: typed(ConnectJobParamsSchema), query: typed(ConnectWaitQuerySchema) }, typed())),
|
|
77
76
|
// --- stories ---------------------------------------------------------------------------
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
protocol(route(connect.story.list, '/story/:id', { parent: connect.base, method: RouteMethod.GET }), contract.request({ params: typed(ConnectProjectIdSchema), query: typed(ConnectStoryQuerySchema) }, typed())),
|
|
78
|
+
protocol(route(connect.story.create, '/story/:id', { parent: connect.base, method: RouteMethod.POST }), contract.request({ params: typed(ConnectProjectIdSchema), body: typed(ConnectStoryBodySchema) }, typed())),
|
|
79
|
+
protocol(route(connect.story.get, '/story/:id/:storyId', {
|
|
81
80
|
parent: connect.base, method: RouteMethod.GET
|
|
82
|
-
}),
|
|
83
|
-
|
|
81
|
+
}), contract.request({ params: typed(ConnectStoryParamsSchema) }, typed())),
|
|
82
|
+
protocol(route(connect.story.update, '/story/:id/:storyId', {
|
|
84
83
|
parent: connect.base, method: RouteMethod.PUT
|
|
85
|
-
}),
|
|
86
|
-
|
|
84
|
+
}), contract.request({ params: typed(ConnectStoryParamsSchema), body: typed(ConnectStoryBodySchema) }, typed())),
|
|
85
|
+
protocol(route(connect.story.delete, '/story/:id/:storyId', {
|
|
87
86
|
parent: connect.base, method: RouteMethod.DELETE
|
|
88
|
-
}),
|
|
89
|
-
|
|
87
|
+
}), contract.request({ params: typed(ConnectStoryParamsSchema) }, typed())),
|
|
88
|
+
protocol(route(connect.story.develop, '/story/:id/:storyId/develop', {
|
|
90
89
|
parent: connect.base, method: RouteMethod.POST
|
|
91
|
-
}),
|
|
92
|
-
// --- generated files -------------------------------------------------------------------
|
|
93
|
-
entrypoint(route(connect.files.list, '/project/:id/files', {
|
|
94
|
-
parent: connect.base, method: RouteMethod.GET
|
|
95
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
96
|
-
entrypoint(route(connect.project.converterLlm, '/project/:id/converter-llm', {
|
|
97
|
-
parent: connect.base, method: RouteMethod.POST
|
|
98
|
-
}),
|
|
99
|
-
// No paid gate, unlike `project.llm`: delegated inference is the DEFAULT for a conversion,
|
|
100
|
-
// not an experimental capability. A conversion reads somebody else's whole repository, and
|
|
101
|
-
// handing those calls to the parent agent is what makes it affordable at all.
|
|
102
|
-
filter(params(ConnectProjectIdSchema, body(ConverterProjectLlmBodySchema)))),
|
|
103
|
-
// --- conversion ------------------------------------------------------------------------
|
|
104
|
-
entrypoint(route(connect.convert.create, '/convert', {
|
|
105
|
-
parent: connect.base, method: RouteMethod.POST
|
|
106
|
-
}), filter(body(ConnectConvertCreateBodySchema))),
|
|
107
|
-
entrypoint(route(connect.convert.check, '/convert/:id/check', {
|
|
108
|
-
parent: connect.base, method: RouteMethod.GET
|
|
109
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
110
|
-
entrypoint(route(connect.convert.start, '/convert/:id/start', {
|
|
111
|
-
parent: connect.base, method: RouteMethod.POST
|
|
112
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
113
|
-
entrypoint(route(connect.convert.proceed, '/convert/:id/proceed', {
|
|
114
|
-
parent: connect.base, method: RouteMethod.POST
|
|
115
|
-
}), filter(params(ConnectProjectIdSchema, body(ConnectConvertProceedBodySchema)))),
|
|
116
|
-
entrypoint(route(connect.convert.cancel, '/convert/:id/cancel', {
|
|
117
|
-
parent: connect.base, method: RouteMethod.POST
|
|
118
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
119
|
-
entrypoint(route(connect.convert.status, '/convert/:id', {
|
|
120
|
-
parent: connect.base, method: RouteMethod.GET
|
|
121
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
122
|
-
entrypoint(route(connect.convert.purge, '/convert/:id/purge', {
|
|
123
|
-
parent: connect.base, method: RouteMethod.POST
|
|
124
|
-
}), filter(params(ConnectProjectIdSchema))),
|
|
125
|
-
// --- inquiries -------------------------------------------------------------------------
|
|
126
|
-
// The fallback answer path: a connector answers through its own op id while it holds the
|
|
127
|
-
// question, but a run that parked while nobody was attached has no op to answer, and the
|
|
128
|
-
// question is then reachable only by its own id.
|
|
129
|
-
entrypoint(route(connect.inquiry.answer, '/project/:id/inquiry/:inquiryId', {
|
|
130
|
-
parent: connect.base, method: RouteMethod.POST
|
|
131
|
-
}), filter(params(ConnectInquiryParamsSchema, body(InquiryAnswerSchema)))),
|
|
90
|
+
}), contract.request({ params: typed(ConnectStoryParamsSchema) }, typed())),
|
|
132
91
|
// --- pipelines -------------------------------------------------------------------------
|
|
133
|
-
|
|
92
|
+
protocol(route(connect.pipeline.state, '/pipeline/:id/:runId', {
|
|
134
93
|
parent: connect.base, method: RouteMethod.GET
|
|
135
|
-
}),
|
|
136
|
-
|
|
94
|
+
}), contract.request({ params: typed(ConnectPipelineParamsSchema) }, typed())),
|
|
95
|
+
protocol(route(connect.pipeline.resume, '/pipeline/:id/:runId/resume', {
|
|
137
96
|
parent: connect.base, method: RouteMethod.POST
|
|
138
|
-
}),
|
|
97
|
+
}), contract.request({ params: typed(ConnectPipelineParamsSchema), body: typed(ConnectPipelineResumeBodySchema) }, typed())),
|
|
139
98
|
];
|
|
140
99
|
};
|
|
141
100
|
//# sourceMappingURL=entrypoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../../src/connect/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../../src/connect/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAE9E,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C,CAAC,EACF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAwB,2BAA2B,CAAC,EAAE,IAAI,EAAE,KAAK,CAA4B,+BAA+B,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAC1K;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/build/connect/ops.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SlotCommandPayload } from '../slot/index.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConnectOpErrorKind, ConnectOpKind, ModelTaskMode, ModelTaskResultKind, ModelTaskRole, ModelTier } from './consts.js';
|
|
3
3
|
import type { ConnectServices } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* One thing the platform asks a connector to do.
|
|
@@ -14,7 +14,7 @@ export interface ConnectOp {
|
|
|
14
14
|
projectId: string;
|
|
15
15
|
sessionId: string;
|
|
16
16
|
kind: ConnectOpKind;
|
|
17
|
-
payload: SlotCommandPayload | ModelTask | ConfigurePayload
|
|
17
|
+
payload: SlotCommandPayload | ModelTask | ConfigurePayload;
|
|
18
18
|
createdAt: string;
|
|
19
19
|
/** When the asker stops waiting. A connector past this may skip the work and say so. */
|
|
20
20
|
deadlineAt: string;
|
|
@@ -145,48 +145,4 @@ export interface ModelTaskUsage {
|
|
|
145
145
|
inputTokens?: number;
|
|
146
146
|
outputTokens?: number;
|
|
147
147
|
}
|
|
148
|
-
/** One option a {@link ConnectInquiryKind.Choice} question offers. */
|
|
149
|
-
export interface ConnectInquiryOption {
|
|
150
|
-
value: string;
|
|
151
|
-
label: string;
|
|
152
|
-
description?: string;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* One question put to the person the connector is working for.
|
|
156
|
-
*
|
|
157
|
-
* It carries where it came from — the job, the run and the step — because an answer is recorded
|
|
158
|
-
* against the run that asked and re-read when that run resumes. `expiresAt` is what makes an
|
|
159
|
-
* unanswered question fail its step instead of parking a project lock forever.
|
|
160
|
-
*/
|
|
161
|
-
export interface InquiryPayload {
|
|
162
|
-
id: string;
|
|
163
|
-
projectId: string;
|
|
164
|
-
jobId?: string;
|
|
165
|
-
runId?: string;
|
|
166
|
-
/** The pipeline step that asked, so a resumed run can match the answer to the place it belongs. */
|
|
167
|
-
step?: string;
|
|
168
|
-
kind: ConnectInquiryKind;
|
|
169
|
-
question: string;
|
|
170
|
-
/** What the asker already knows, so the person is not asked to go and find it out. */
|
|
171
|
-
context?: string;
|
|
172
|
-
options?: ConnectInquiryOption[];
|
|
173
|
-
multiple?: boolean;
|
|
174
|
-
/** Whether a choice question also accepts text the options do not cover. */
|
|
175
|
-
allowText?: boolean;
|
|
176
|
-
/** What the asker will assume if nobody answers. Recorded as an assumption when it is used. */
|
|
177
|
-
default?: string | string[];
|
|
178
|
-
expiresAt: string;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* The answer to one question.
|
|
182
|
-
*
|
|
183
|
-
* `declined` is a real answer and not an absence: it says a person saw the question and chose not
|
|
184
|
-
* to decide, which the asker records as an assumption rather than waiting out the timeout.
|
|
185
|
-
*/
|
|
186
|
-
export interface InquiryAnswerPayload {
|
|
187
|
-
inquiryId: string;
|
|
188
|
-
value?: string | string[];
|
|
189
|
-
text?: string;
|
|
190
|
-
declined?: boolean;
|
|
191
|
-
}
|
|
192
148
|
//# sourceMappingURL=ops.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/connect/ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/connect/ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAAE,aA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E,MAAM,CAAA;CAAE,CAAA;AAEpE,MAAM,WAAW,iBAAiB;IAChC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAED,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,mBAAmB,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC/B,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oFAAoF;IACpF,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -1,194 +1,140 @@
|
|
|
1
|
+
import type { RegisteredEntrypoint, RequestShape } from '@owlmeans/entrypoint';
|
|
2
|
+
import type { EntrypointReference } from '@owlmeans/context';
|
|
1
3
|
import type { ConnectOp, ConnectOpResult } from './ops.js';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* export protocol objects instead; an adapter may use this compact form because it never exposes
|
|
7
|
-
* aliases to UI or domain code.
|
|
8
|
-
*/
|
|
9
|
-
export declare const connectRef: {
|
|
10
|
-
capabilities: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{}, ConnectCapabilitiesView>>;
|
|
4
|
+
import type { ConnectAttachBody, ConnectCapabilitiesView, ConnectConfirmBody, ConnectCreateBody, ConnectJob, ConnectJobParams, ConnectModifyBody, ConnectOpSubmission, ConnectPipelineParams, ConnectPipelineResumeBody, ConnectPipelineState, ConnectProjectLlmBody, ConnectProjectSettings, ConnectProjectStatus, ConnectProjectSummary, ConnectSessionOpen, ConnectSessionParams, ConnectSessionView, ConnectStoryBody, ConnectStoryDeletion, ConnectStoryItem, ConnectStoryList, ConnectStoryMutation, ConnectStoryQuery, ConnectWaitQuery } from './types.js';
|
|
5
|
+
type ConnectReference<Request extends RequestShape, Response> = EntrypointReference<RegisteredEntrypoint<Request, Response>>;
|
|
6
|
+
export interface ConnectReferences {
|
|
7
|
+
capabilities: ConnectReference<{}, ConnectCapabilitiesView>;
|
|
11
8
|
session: {
|
|
12
|
-
open:
|
|
9
|
+
open: ConnectReference<{
|
|
13
10
|
body: ConnectSessionOpen;
|
|
14
|
-
}, ConnectSessionView
|
|
15
|
-
openDelegated:
|
|
11
|
+
}, ConnectSessionView>;
|
|
12
|
+
openDelegated: ConnectReference<{
|
|
16
13
|
body: ConnectSessionOpen;
|
|
17
|
-
}, ConnectSessionView
|
|
18
|
-
get:
|
|
14
|
+
}, ConnectSessionView>;
|
|
15
|
+
get: ConnectReference<{
|
|
19
16
|
params: ConnectSessionParams;
|
|
20
|
-
}, ConnectSessionView
|
|
21
|
-
heartbeat:
|
|
17
|
+
}, ConnectSessionView>;
|
|
18
|
+
heartbeat: ConnectReference<{
|
|
22
19
|
params: ConnectSessionParams;
|
|
23
|
-
}, ConnectSessionView
|
|
24
|
-
close:
|
|
20
|
+
}, ConnectSessionView>;
|
|
21
|
+
close: ConnectReference<{
|
|
25
22
|
params: ConnectSessionParams;
|
|
26
|
-
}, ConnectSessionView
|
|
23
|
+
}, ConnectSessionView>;
|
|
27
24
|
};
|
|
28
25
|
op: {
|
|
29
|
-
pull:
|
|
26
|
+
pull: ConnectReference<{
|
|
30
27
|
params: ConnectSessionParams;
|
|
31
28
|
query: ConnectWaitQuery;
|
|
32
|
-
}, ConnectOp[]
|
|
33
|
-
submit:
|
|
29
|
+
}, ConnectOp[]>;
|
|
30
|
+
submit: ConnectReference<{
|
|
34
31
|
params: {
|
|
35
32
|
sessionId: string;
|
|
36
33
|
opId: string;
|
|
37
34
|
};
|
|
38
35
|
body: ConnectOpResult;
|
|
39
|
-
}, ConnectOpSubmission
|
|
36
|
+
}, ConnectOpSubmission>;
|
|
40
37
|
};
|
|
41
38
|
project: {
|
|
42
|
-
create:
|
|
39
|
+
create: ConnectReference<{
|
|
43
40
|
body: ConnectCreateBody;
|
|
44
|
-
}, ConnectJob
|
|
45
|
-
confirm:
|
|
41
|
+
}, ConnectJob>;
|
|
42
|
+
confirm: ConnectReference<{
|
|
46
43
|
params: {
|
|
47
44
|
id: string;
|
|
48
45
|
};
|
|
49
46
|
body: ConnectConfirmBody;
|
|
50
|
-
}, ConnectJob
|
|
51
|
-
list:
|
|
52
|
-
status:
|
|
47
|
+
}, ConnectJob>;
|
|
48
|
+
list: ConnectReference<{}, ConnectProjectSummary[]>;
|
|
49
|
+
status: ConnectReference<{
|
|
53
50
|
params: {
|
|
54
51
|
id: string;
|
|
55
52
|
};
|
|
56
|
-
}, ConnectProjectStatus
|
|
57
|
-
attach:
|
|
53
|
+
}, ConnectProjectStatus>;
|
|
54
|
+
attach: ConnectReference<{
|
|
58
55
|
body: ConnectAttachBody;
|
|
59
|
-
}, ConnectProjectStatus
|
|
60
|
-
reinit:
|
|
56
|
+
}, ConnectProjectStatus>;
|
|
57
|
+
reinit: ConnectReference<{
|
|
61
58
|
params: {
|
|
62
59
|
id: string;
|
|
63
60
|
};
|
|
64
|
-
}, ConnectJob
|
|
65
|
-
modify:
|
|
61
|
+
}, ConnectJob>;
|
|
62
|
+
modify: ConnectReference<{
|
|
66
63
|
params: {
|
|
67
64
|
id: string;
|
|
68
65
|
};
|
|
69
66
|
body: ConnectModifyBody;
|
|
70
|
-
}, ConnectJob
|
|
71
|
-
settings:
|
|
67
|
+
}, ConnectJob>;
|
|
68
|
+
settings: ConnectReference<{
|
|
72
69
|
params: {
|
|
73
70
|
id: string;
|
|
74
71
|
};
|
|
75
|
-
}, ConnectProjectSettings
|
|
76
|
-
llm:
|
|
72
|
+
}, ConnectProjectSettings>;
|
|
73
|
+
llm: ConnectReference<{
|
|
77
74
|
params: {
|
|
78
75
|
id: string;
|
|
79
76
|
};
|
|
80
77
|
body: ConnectProjectLlmBody;
|
|
81
|
-
}, ConnectProjectSettings
|
|
82
|
-
|
|
83
|
-
params: {
|
|
84
|
-
id: string;
|
|
85
|
-
};
|
|
86
|
-
body: ConverterProjectLlmBody;
|
|
87
|
-
}, ConnectProjectSettings>>;
|
|
88
|
-
job: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
78
|
+
}, ConnectProjectSettings>;
|
|
79
|
+
job: ConnectReference<{
|
|
89
80
|
params: ConnectJobParams;
|
|
90
81
|
query: ConnectWaitQuery;
|
|
91
|
-
}, ConnectJob
|
|
92
|
-
};
|
|
93
|
-
convert: {
|
|
94
|
-
create: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
95
|
-
body: ConnectConvertCreateBody;
|
|
96
|
-
}, ConnectJob>>;
|
|
97
|
-
check: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
98
|
-
params: {
|
|
99
|
-
id: string;
|
|
100
|
-
};
|
|
101
|
-
}, ConvertCheck>>;
|
|
102
|
-
start: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
103
|
-
params: {
|
|
104
|
-
id: string;
|
|
105
|
-
};
|
|
106
|
-
}, ConnectJob>>;
|
|
107
|
-
proceed: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
108
|
-
params: {
|
|
109
|
-
id: string;
|
|
110
|
-
};
|
|
111
|
-
body: ConnectConvertProceedBody;
|
|
112
|
-
}, ConnectJob>>;
|
|
113
|
-
cancel: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
114
|
-
params: {
|
|
115
|
-
id: string;
|
|
116
|
-
};
|
|
117
|
-
}, ConnectJob>>;
|
|
118
|
-
status: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
119
|
-
params: {
|
|
120
|
-
id: string;
|
|
121
|
-
};
|
|
122
|
-
}, ConversionStatusView>>;
|
|
123
|
-
purge: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
124
|
-
params: {
|
|
125
|
-
id: string;
|
|
126
|
-
};
|
|
127
|
-
}, ConnectJob>>;
|
|
128
|
-
};
|
|
129
|
-
inquiry: {
|
|
130
|
-
answer: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
131
|
-
params: {
|
|
132
|
-
id: string;
|
|
133
|
-
inquiryId: string;
|
|
134
|
-
};
|
|
135
|
-
body: ConnectInquiryAnswerBody;
|
|
136
|
-
}, unknown>>;
|
|
82
|
+
}, ConnectJob>;
|
|
137
83
|
};
|
|
138
84
|
story: {
|
|
139
|
-
list:
|
|
85
|
+
list: ConnectReference<{
|
|
140
86
|
params: {
|
|
141
87
|
id: string;
|
|
142
88
|
};
|
|
143
89
|
query: ConnectStoryQuery;
|
|
144
|
-
}, ConnectStoryList
|
|
145
|
-
get:
|
|
90
|
+
}, ConnectStoryList>;
|
|
91
|
+
get: ConnectReference<{
|
|
146
92
|
params: {
|
|
147
93
|
id: string;
|
|
148
94
|
storyId: string;
|
|
149
95
|
};
|
|
150
|
-
}, ConnectStoryItem
|
|
151
|
-
create:
|
|
96
|
+
}, ConnectStoryItem>;
|
|
97
|
+
create: ConnectReference<{
|
|
152
98
|
params: {
|
|
153
99
|
id: string;
|
|
154
100
|
};
|
|
155
101
|
body: ConnectStoryBody;
|
|
156
|
-
}, ConnectStoryMutation
|
|
157
|
-
update:
|
|
102
|
+
}, ConnectStoryMutation>;
|
|
103
|
+
update: ConnectReference<{
|
|
158
104
|
params: {
|
|
159
105
|
id: string;
|
|
160
106
|
storyId: string;
|
|
161
107
|
};
|
|
162
108
|
body: ConnectStoryBody;
|
|
163
|
-
}, ConnectStoryMutation
|
|
164
|
-
delete:
|
|
109
|
+
}, ConnectStoryMutation>;
|
|
110
|
+
delete: ConnectReference<{
|
|
165
111
|
params: {
|
|
166
112
|
id: string;
|
|
167
113
|
storyId: string;
|
|
168
114
|
};
|
|
169
|
-
}, ConnectStoryDeletion
|
|
170
|
-
develop:
|
|
115
|
+
}, ConnectStoryDeletion>;
|
|
116
|
+
develop: ConnectReference<{
|
|
171
117
|
params: {
|
|
172
118
|
id: string;
|
|
173
119
|
storyId: string;
|
|
174
120
|
};
|
|
175
|
-
}, ConnectJob
|
|
176
|
-
};
|
|
177
|
-
files: {
|
|
178
|
-
list: import("@owlmeans/context").EntrypointReference<import("@owlmeans/entrypoint").RegisteredEntrypoint<{
|
|
179
|
-
params: {
|
|
180
|
-
id: string;
|
|
181
|
-
};
|
|
182
|
-
}, string[]>>;
|
|
121
|
+
}, ConnectJob>;
|
|
183
122
|
};
|
|
184
123
|
pipeline: {
|
|
185
|
-
state:
|
|
124
|
+
state: ConnectReference<{
|
|
186
125
|
params: ConnectPipelineParams;
|
|
187
|
-
}, ConnectPipelineState
|
|
188
|
-
resume:
|
|
126
|
+
}, ConnectPipelineState>;
|
|
127
|
+
resume: ConnectReference<{
|
|
189
128
|
params: ConnectPipelineParams;
|
|
190
129
|
body: ConnectPipelineResumeBody;
|
|
191
|
-
}, ConnectJob
|
|
130
|
+
}, ConnectJob>;
|
|
192
131
|
};
|
|
193
|
-
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Typed references for adapter packages that address the connector dynamically. Applications
|
|
135
|
+
* export protocol objects instead; an adapter may use this compact form because it never exposes
|
|
136
|
+
* aliases to UI or domain code.
|
|
137
|
+
*/
|
|
138
|
+
export declare const connectRef: ConnectReferences;
|
|
139
|
+
export {};
|
|
194
140
|
//# sourceMappingURL=references.d.ts.map
|