@shipfox/api-agent-dto 6.0.0 → 8.0.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/inter-module.d.ts +60 -0
- package/dist/inter-module.d.ts.map +1 -1
- package/dist/inter-module.js +21 -0
- package/dist/inter-module.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +1 -9
- package/src/inter-module.ts +25 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 11 files with swc (
|
|
2
|
+
Successfully compiled: 11 files with swc (272.78ms)
|
package/CHANGELOG.md
CHANGED
package/dist/inter-module.d.ts
CHANGED
|
@@ -1,8 +1,67 @@
|
|
|
1
1
|
import { type InterModuleClient } from '@shipfox/inter-module';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
declare const agentValidationCatalogSchema: z.ZodObject<{
|
|
4
|
+
version: z.ZodLiteral<1>;
|
|
5
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
support_status: z.ZodEnum<{
|
|
8
|
+
supported: "supported";
|
|
9
|
+
unsupported: "unsupported";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strip>>;
|
|
12
|
+
harnesses: z.ZodArray<z.ZodObject<{
|
|
13
|
+
id: z.ZodEnum<{
|
|
14
|
+
pi: "pi";
|
|
15
|
+
claude: "claude";
|
|
16
|
+
}>;
|
|
17
|
+
supported_provider_ids: z.ZodArray<z.ZodString>;
|
|
18
|
+
thinking_levels: z.ZodArray<z.ZodEnum<{
|
|
19
|
+
off: "off";
|
|
20
|
+
minimal: "minimal";
|
|
21
|
+
low: "low";
|
|
22
|
+
medium: "medium";
|
|
23
|
+
high: "high";
|
|
24
|
+
xhigh: "xhigh";
|
|
25
|
+
max: "max";
|
|
26
|
+
}>>;
|
|
27
|
+
effective_tools: z.ZodArray<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type AgentValidationCatalog = z.infer<typeof agentValidationCatalogSchema>;
|
|
3
31
|
export declare const agentInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
|
|
4
32
|
readonly module: "agent";
|
|
5
33
|
readonly methods: {
|
|
34
|
+
readonly getValidationCatalog: {
|
|
35
|
+
readonly input: z.ZodObject<{}, z.core.$strip>;
|
|
36
|
+
readonly output: z.ZodObject<{
|
|
37
|
+
version: z.ZodLiteral<1>;
|
|
38
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
support_status: z.ZodEnum<{
|
|
41
|
+
supported: "supported";
|
|
42
|
+
unsupported: "unsupported";
|
|
43
|
+
}>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
harnesses: z.ZodArray<z.ZodObject<{
|
|
46
|
+
id: z.ZodEnum<{
|
|
47
|
+
pi: "pi";
|
|
48
|
+
claude: "claude";
|
|
49
|
+
}>;
|
|
50
|
+
supported_provider_ids: z.ZodArray<z.ZodString>;
|
|
51
|
+
thinking_levels: z.ZodArray<z.ZodEnum<{
|
|
52
|
+
off: "off";
|
|
53
|
+
minimal: "minimal";
|
|
54
|
+
low: "low";
|
|
55
|
+
medium: "medium";
|
|
56
|
+
high: "high";
|
|
57
|
+
xhigh: "xhigh";
|
|
58
|
+
max: "max";
|
|
59
|
+
}>>;
|
|
60
|
+
effective_tools: z.ZodArray<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
readonly errors: {};
|
|
64
|
+
};
|
|
6
65
|
readonly resolveAgentConfig: {
|
|
7
66
|
readonly input: z.ZodObject<{
|
|
8
67
|
workspaceId: z.ZodNullable<z.ZodString>;
|
|
@@ -113,4 +172,5 @@ export declare const agentInterModuleContract: import("@shipfox/inter-module").I
|
|
|
113
172
|
};
|
|
114
173
|
}>;
|
|
115
174
|
export type AgentInterModuleClient = InterModuleClient<typeof agentInterModuleContract>;
|
|
175
|
+
export {};
|
|
116
176
|
//# sourceMappingURL=inter-module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAQtB,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAgBlF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/inter-module.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { defineInterModuleContract } from '@shipfox/inter-module';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { agentRuntimeCredentialsResponseSchema, agentThinkingSchema, harnessSchema, modelProviderRefSchema } from '#schemas/index.js';
|
|
4
|
+
const agentValidationCatalogSchema = z.object({
|
|
5
|
+
version: z.literal(1),
|
|
6
|
+
providers: z.array(z.object({
|
|
7
|
+
id: z.string().min(1),
|
|
8
|
+
support_status: z.enum([
|
|
9
|
+
'supported',
|
|
10
|
+
'unsupported'
|
|
11
|
+
])
|
|
12
|
+
})),
|
|
13
|
+
harnesses: z.array(z.object({
|
|
14
|
+
id: harnessSchema,
|
|
15
|
+
supported_provider_ids: z.array(z.string().min(1)),
|
|
16
|
+
thinking_levels: z.array(agentThinkingSchema),
|
|
17
|
+
effective_tools: z.array(z.string().min(1))
|
|
18
|
+
}))
|
|
19
|
+
});
|
|
4
20
|
const agentConfigInputSchema = z.object({
|
|
5
21
|
harness: harnessSchema.optional(),
|
|
6
22
|
provider: modelProviderRefSchema.optional(),
|
|
@@ -16,6 +32,11 @@ const resolvedAgentConfigSchema = z.object({
|
|
|
16
32
|
export const agentInterModuleContract = defineInterModuleContract({
|
|
17
33
|
module: 'agent',
|
|
18
34
|
methods: {
|
|
35
|
+
getValidationCatalog: {
|
|
36
|
+
input: z.object({}),
|
|
37
|
+
output: agentValidationCatalogSchema,
|
|
38
|
+
errors: {}
|
|
39
|
+
},
|
|
19
40
|
resolveAgentConfig: {
|
|
20
41
|
input: z.object({
|
|
21
42
|
workspaceId: z.string().uuid().nullable(),
|
package/dist/inter-module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\nimport {\n agentRuntimeCredentialsResponseSchema,\n agentThinkingSchema,\n harnessSchema,\n modelProviderRefSchema,\n} from '#schemas/index.js';\n\nconst agentConfigInputSchema = z.object({\n harness: harnessSchema.optional(),\n provider: modelProviderRefSchema.optional(),\n model: z.string().optional(),\n thinking: agentThinkingSchema.optional(),\n});\n\nconst resolvedAgentConfigSchema = z.object({\n harness: harnessSchema,\n provider: modelProviderRefSchema,\n model: z.string(),\n thinking: agentThinkingSchema,\n});\n\nexport const agentInterModuleContract = defineInterModuleContract({\n module: 'agent',\n methods: {\n resolveAgentConfig: {\n input: z.object({workspaceId: z.string().uuid().nullable(), config: agentConfigInputSchema}),\n output: resolvedAgentConfigSchema,\n errors: {'agent-config-invalid': z.object({})},\n },\n resolveRuntimeCredentials: {\n input: z.object({\n workspaceId: z.string().uuid(),\n harness: harnessSchema,\n provider: modelProviderRefSchema,\n model: z.string(),\n thinking: agentThinkingSchema,\n }),\n output: agentRuntimeCredentialsResponseSchema,\n errors: {\n 'model-provider-not-configured': z.object({}),\n 'model-provider-credentials-invalid': z.object({}),\n },\n },\n },\n});\n\nexport type AgentInterModuleClient = InterModuleClient<typeof agentInterModuleContract>;\n"],"names":["defineInterModuleContract","z","agentRuntimeCredentialsResponseSchema","agentThinkingSchema","harnessSchema","modelProviderRefSchema","
|
|
1
|
+
{"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\nimport {\n agentRuntimeCredentialsResponseSchema,\n agentThinkingSchema,\n harnessSchema,\n modelProviderRefSchema,\n} from '#schemas/index.js';\n\nconst agentValidationCatalogSchema = z.object({\n version: z.literal(1),\n providers: z.array(\n z.object({\n id: z.string().min(1),\n support_status: z.enum(['supported', 'unsupported']),\n }),\n ),\n harnesses: z.array(\n z.object({\n id: harnessSchema,\n supported_provider_ids: z.array(z.string().min(1)),\n thinking_levels: z.array(agentThinkingSchema),\n effective_tools: z.array(z.string().min(1)),\n }),\n ),\n});\n\nexport type AgentValidationCatalog = z.infer<typeof agentValidationCatalogSchema>;\n\nconst agentConfigInputSchema = z.object({\n harness: harnessSchema.optional(),\n provider: modelProviderRefSchema.optional(),\n model: z.string().optional(),\n thinking: agentThinkingSchema.optional(),\n});\n\nconst resolvedAgentConfigSchema = z.object({\n harness: harnessSchema,\n provider: modelProviderRefSchema,\n model: z.string(),\n thinking: agentThinkingSchema,\n});\n\nexport const agentInterModuleContract = defineInterModuleContract({\n module: 'agent',\n methods: {\n getValidationCatalog: {\n input: z.object({}),\n output: agentValidationCatalogSchema,\n errors: {},\n },\n resolveAgentConfig: {\n input: z.object({workspaceId: z.string().uuid().nullable(), config: agentConfigInputSchema}),\n output: resolvedAgentConfigSchema,\n errors: {'agent-config-invalid': z.object({})},\n },\n resolveRuntimeCredentials: {\n input: z.object({\n workspaceId: z.string().uuid(),\n harness: harnessSchema,\n provider: modelProviderRefSchema,\n model: z.string(),\n thinking: agentThinkingSchema,\n }),\n output: agentRuntimeCredentialsResponseSchema,\n errors: {\n 'model-provider-not-configured': z.object({}),\n 'model-provider-credentials-invalid': z.object({}),\n },\n },\n },\n});\n\nexport type AgentInterModuleClient = InterModuleClient<typeof agentInterModuleContract>;\n"],"names":["defineInterModuleContract","z","agentRuntimeCredentialsResponseSchema","agentThinkingSchema","harnessSchema","modelProviderRefSchema","agentValidationCatalogSchema","object","version","literal","providers","array","id","string","min","support_status","enum","harnesses","supported_provider_ids","thinking_levels","effective_tools","agentConfigInputSchema","harness","optional","provider","model","thinking","resolvedAgentConfigSchema","agentInterModuleContract","module","methods","getValidationCatalog","input","output","errors","resolveAgentConfig","workspaceId","uuid","nullable","config","resolveRuntimeCredentials"],"mappings":"AAAA,SAAQA,yBAAyB,QAA+B,wBAAwB;AACxF,SAAQC,CAAC,QAAO,MAAM;AACtB,SACEC,qCAAqC,EACrCC,mBAAmB,EACnBC,aAAa,EACbC,sBAAsB,QACjB,oBAAoB;AAE3B,MAAMC,+BAA+BL,EAAEM,MAAM,CAAC;IAC5CC,SAASP,EAAEQ,OAAO,CAAC;IACnBC,WAAWT,EAAEU,KAAK,CAChBV,EAAEM,MAAM,CAAC;QACPK,IAAIX,EAAEY,MAAM,GAAGC,GAAG,CAAC;QACnBC,gBAAgBd,EAAEe,IAAI,CAAC;YAAC;YAAa;SAAc;IACrD;IAEFC,WAAWhB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