@shipfox/api-agent-dto 5.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 +17 -0
- package/dist/inter-module.d.ts +176 -0
- package/dist/inter-module.d.ts.map +1 -0
- package/dist/inter-module.js +67 -0
- package/dist/inter-module.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +6 -9
- package/src/inter-module.ts +74 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled:
|
|
2
|
+
Successfully compiled: 11 files with swc (272.78ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @shipfox/api-agent-dto
|
|
2
2
|
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- de559bb: Moves Agent validation policy behind a versioned inter-module catalog and injects it into Definitions normalization.
|
|
8
|
+
|
|
9
|
+
## 6.0.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 0bb82a4: Adds the Agent and Integrations inter-module APIs, moving Workflows agent configuration, runtime credential resolution, and integration consumers behind producer-owned clients.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [81f9544]
|
|
18
|
+
- @shipfox/inter-module@0.2.0
|
|
19
|
+
|
|
3
20
|
## 5.0.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { type InterModuleClient } from '@shipfox/inter-module';
|
|
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>;
|
|
31
|
+
export declare const agentInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
|
|
32
|
+
readonly module: "agent";
|
|
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
|
+
};
|
|
65
|
+
readonly resolveAgentConfig: {
|
|
66
|
+
readonly input: z.ZodObject<{
|
|
67
|
+
workspaceId: z.ZodNullable<z.ZodString>;
|
|
68
|
+
config: z.ZodObject<{
|
|
69
|
+
harness: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
pi: "pi";
|
|
71
|
+
claude: "claude";
|
|
72
|
+
}>>;
|
|
73
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
74
|
+
model: z.ZodOptional<z.ZodString>;
|
|
75
|
+
thinking: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
off: "off";
|
|
77
|
+
minimal: "minimal";
|
|
78
|
+
low: "low";
|
|
79
|
+
medium: "medium";
|
|
80
|
+
high: "high";
|
|
81
|
+
xhigh: "xhigh";
|
|
82
|
+
max: "max";
|
|
83
|
+
}>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
readonly output: z.ZodObject<{
|
|
87
|
+
harness: z.ZodEnum<{
|
|
88
|
+
pi: "pi";
|
|
89
|
+
claude: "claude";
|
|
90
|
+
}>;
|
|
91
|
+
provider: z.ZodString;
|
|
92
|
+
model: z.ZodString;
|
|
93
|
+
thinking: z.ZodEnum<{
|
|
94
|
+
off: "off";
|
|
95
|
+
minimal: "minimal";
|
|
96
|
+
low: "low";
|
|
97
|
+
medium: "medium";
|
|
98
|
+
high: "high";
|
|
99
|
+
xhigh: "xhigh";
|
|
100
|
+
max: "max";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
readonly errors: {
|
|
104
|
+
readonly 'agent-config-invalid': z.ZodObject<{}, z.core.$strip>;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
readonly resolveRuntimeCredentials: {
|
|
108
|
+
readonly input: z.ZodObject<{
|
|
109
|
+
workspaceId: z.ZodString;
|
|
110
|
+
harness: z.ZodEnum<{
|
|
111
|
+
pi: "pi";
|
|
112
|
+
claude: "claude";
|
|
113
|
+
}>;
|
|
114
|
+
provider: z.ZodString;
|
|
115
|
+
model: z.ZodString;
|
|
116
|
+
thinking: z.ZodEnum<{
|
|
117
|
+
off: "off";
|
|
118
|
+
minimal: "minimal";
|
|
119
|
+
low: "low";
|
|
120
|
+
medium: "medium";
|
|
121
|
+
high: "high";
|
|
122
|
+
xhigh: "xhigh";
|
|
123
|
+
max: "max";
|
|
124
|
+
}>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
readonly output: z.ZodObject<{
|
|
127
|
+
harness: z.ZodEnum<{
|
|
128
|
+
pi: "pi";
|
|
129
|
+
claude: "claude";
|
|
130
|
+
}>;
|
|
131
|
+
provider_id: z.ZodString;
|
|
132
|
+
model: z.ZodString;
|
|
133
|
+
thinking: z.ZodEnum<{
|
|
134
|
+
off: "off";
|
|
135
|
+
minimal: "minimal";
|
|
136
|
+
low: "low";
|
|
137
|
+
medium: "medium";
|
|
138
|
+
high: "high";
|
|
139
|
+
xhigh: "xhigh";
|
|
140
|
+
max: "max";
|
|
141
|
+
}>;
|
|
142
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
143
|
+
custom_provider: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
api: z.ZodEnum<{
|
|
145
|
+
"openai-completions": "openai-completions";
|
|
146
|
+
"openai-responses": "openai-responses";
|
|
147
|
+
"anthropic-messages": "anthropic-messages";
|
|
148
|
+
"google-generative-ai": "google-generative-ai";
|
|
149
|
+
}>;
|
|
150
|
+
base_url: z.ZodString;
|
|
151
|
+
headers: z.ZodArray<z.ZodObject<{
|
|
152
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
153
|
+
value: z.ZodString;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
secret_header_names: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
156
|
+
models: z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
label: z.ZodString;
|
|
159
|
+
context_window: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
input_image: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
+
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
requires_api_key: z.ZodBoolean;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
readonly errors: {
|
|
168
|
+
readonly 'model-provider-not-configured': z.ZodObject<{}, z.core.$strip>;
|
|
169
|
+
readonly 'model-provider-credentials-invalid': z.ZodObject<{}, z.core.$strip>;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
}>;
|
|
174
|
+
export type AgentInterModuleClient = InterModuleClient<typeof agentInterModuleContract>;
|
|
175
|
+
export {};
|
|
176
|
+
//# sourceMappingURL=inter-module.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineInterModuleContract } from '@shipfox/inter-module';
|
|
2
|
+
import { z } from 'zod';
|
|
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
|
+
});
|
|
20
|
+
const agentConfigInputSchema = z.object({
|
|
21
|
+
harness: harnessSchema.optional(),
|
|
22
|
+
provider: modelProviderRefSchema.optional(),
|
|
23
|
+
model: z.string().optional(),
|
|
24
|
+
thinking: agentThinkingSchema.optional()
|
|
25
|
+
});
|
|
26
|
+
const resolvedAgentConfigSchema = z.object({
|
|
27
|
+
harness: harnessSchema,
|
|
28
|
+
provider: modelProviderRefSchema,
|
|
29
|
+
model: z.string(),
|
|
30
|
+
thinking: agentThinkingSchema
|
|
31
|
+
});
|
|
32
|
+
export const agentInterModuleContract = defineInterModuleContract({
|
|
33
|
+
module: 'agent',
|
|
34
|
+
methods: {
|
|
35
|
+
getValidationCatalog: {
|
|
36
|
+
input: z.object({}),
|
|
37
|
+
output: agentValidationCatalogSchema,
|
|
38
|
+
errors: {}
|
|
39
|
+
},
|
|
40
|
+
resolveAgentConfig: {
|
|
41
|
+
input: z.object({
|
|
42
|
+
workspaceId: z.string().uuid().nullable(),
|
|
43
|
+
config: agentConfigInputSchema
|
|
44
|
+
}),
|
|
45
|
+
output: resolvedAgentConfigSchema,
|
|
46
|
+
errors: {
|
|
47
|
+
'agent-config-invalid': z.object({})
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
resolveRuntimeCredentials: {
|
|
51
|
+
input: z.object({
|
|
52
|
+
workspaceId: z.string().uuid(),
|
|
53
|
+
harness: harnessSchema,
|
|
54
|
+
provider: modelProviderRefSchema,
|
|
55
|
+
model: z.string(),
|
|
56
|
+
thinking: agentThinkingSchema
|
|
57
|
+
}),
|
|
58
|
+
output: agentRuntimeCredentialsResponseSchema,
|
|
59
|
+
errors: {
|
|
60
|
+
'model-provider-not-configured': z.object({}),
|
|
61
|
+
'model-provider-credentials-invalid': z.object({})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=inter-module.js.map
|
|
@@ -0,0 +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 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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