@shipfox/api-agent-dto 5.0.0 → 6.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 +11 -0
- package/dist/inter-module.d.ts +116 -0
- package/dist/inter-module.d.ts.map +1 -0
- package/dist/inter-module.js +46 -0
- package/dist/inter-module.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +6 -1
- package/src/inter-module.ts +49 -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 (267.32ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @shipfox/api-agent-dto
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0bb82a4: Adds the Agent and Integrations inter-module APIs, moving Workflows agent configuration, runtime credential resolution, and integration consumers behind producer-owned clients.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [81f9544]
|
|
12
|
+
- @shipfox/inter-module@0.2.0
|
|
13
|
+
|
|
3
14
|
## 5.0.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { type InterModuleClient } from '@shipfox/inter-module';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const agentInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
|
|
4
|
+
readonly module: "agent";
|
|
5
|
+
readonly methods: {
|
|
6
|
+
readonly resolveAgentConfig: {
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
workspaceId: z.ZodNullable<z.ZodString>;
|
|
9
|
+
config: z.ZodObject<{
|
|
10
|
+
harness: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
pi: "pi";
|
|
12
|
+
claude: "claude";
|
|
13
|
+
}>>;
|
|
14
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
15
|
+
model: z.ZodOptional<z.ZodString>;
|
|
16
|
+
thinking: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
off: "off";
|
|
18
|
+
minimal: "minimal";
|
|
19
|
+
low: "low";
|
|
20
|
+
medium: "medium";
|
|
21
|
+
high: "high";
|
|
22
|
+
xhigh: "xhigh";
|
|
23
|
+
max: "max";
|
|
24
|
+
}>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
readonly output: z.ZodObject<{
|
|
28
|
+
harness: z.ZodEnum<{
|
|
29
|
+
pi: "pi";
|
|
30
|
+
claude: "claude";
|
|
31
|
+
}>;
|
|
32
|
+
provider: z.ZodString;
|
|
33
|
+
model: z.ZodString;
|
|
34
|
+
thinking: z.ZodEnum<{
|
|
35
|
+
off: "off";
|
|
36
|
+
minimal: "minimal";
|
|
37
|
+
low: "low";
|
|
38
|
+
medium: "medium";
|
|
39
|
+
high: "high";
|
|
40
|
+
xhigh: "xhigh";
|
|
41
|
+
max: "max";
|
|
42
|
+
}>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
readonly errors: {
|
|
45
|
+
readonly 'agent-config-invalid': z.ZodObject<{}, z.core.$strip>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly resolveRuntimeCredentials: {
|
|
49
|
+
readonly input: z.ZodObject<{
|
|
50
|
+
workspaceId: z.ZodString;
|
|
51
|
+
harness: z.ZodEnum<{
|
|
52
|
+
pi: "pi";
|
|
53
|
+
claude: "claude";
|
|
54
|
+
}>;
|
|
55
|
+
provider: z.ZodString;
|
|
56
|
+
model: z.ZodString;
|
|
57
|
+
thinking: z.ZodEnum<{
|
|
58
|
+
off: "off";
|
|
59
|
+
minimal: "minimal";
|
|
60
|
+
low: "low";
|
|
61
|
+
medium: "medium";
|
|
62
|
+
high: "high";
|
|
63
|
+
xhigh: "xhigh";
|
|
64
|
+
max: "max";
|
|
65
|
+
}>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
readonly output: z.ZodObject<{
|
|
68
|
+
harness: z.ZodEnum<{
|
|
69
|
+
pi: "pi";
|
|
70
|
+
claude: "claude";
|
|
71
|
+
}>;
|
|
72
|
+
provider_id: z.ZodString;
|
|
73
|
+
model: z.ZodString;
|
|
74
|
+
thinking: z.ZodEnum<{
|
|
75
|
+
off: "off";
|
|
76
|
+
minimal: "minimal";
|
|
77
|
+
low: "low";
|
|
78
|
+
medium: "medium";
|
|
79
|
+
high: "high";
|
|
80
|
+
xhigh: "xhigh";
|
|
81
|
+
max: "max";
|
|
82
|
+
}>;
|
|
83
|
+
credentials: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
84
|
+
custom_provider: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
api: z.ZodEnum<{
|
|
86
|
+
"openai-completions": "openai-completions";
|
|
87
|
+
"openai-responses": "openai-responses";
|
|
88
|
+
"anthropic-messages": "anthropic-messages";
|
|
89
|
+
"google-generative-ai": "google-generative-ai";
|
|
90
|
+
}>;
|
|
91
|
+
base_url: z.ZodString;
|
|
92
|
+
headers: z.ZodArray<z.ZodObject<{
|
|
93
|
+
name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
94
|
+
value: z.ZodString;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
secret_header_names: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
97
|
+
models: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
label: z.ZodString;
|
|
100
|
+
context_window: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
max_output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
input_image: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
requires_api_key: z.ZodBoolean;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
readonly errors: {
|
|
109
|
+
readonly 'model-provider-not-configured': z.ZodObject<{}, z.core.$strip>;
|
|
110
|
+
readonly 'model-provider-credentials-invalid': z.ZodObject<{}, z.core.$strip>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
115
|
+
export type AgentInterModuleClient = InterModuleClient<typeof agentInterModuleContract>;
|
|
116
|
+
//# 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;AAsBtB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBnC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineInterModuleContract } from '@shipfox/inter-module';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { agentRuntimeCredentialsResponseSchema, agentThinkingSchema, harnessSchema, modelProviderRefSchema } from '#schemas/index.js';
|
|
4
|
+
const agentConfigInputSchema = z.object({
|
|
5
|
+
harness: harnessSchema.optional(),
|
|
6
|
+
provider: modelProviderRefSchema.optional(),
|
|
7
|
+
model: z.string().optional(),
|
|
8
|
+
thinking: agentThinkingSchema.optional()
|
|
9
|
+
});
|
|
10
|
+
const resolvedAgentConfigSchema = z.object({
|
|
11
|
+
harness: harnessSchema,
|
|
12
|
+
provider: modelProviderRefSchema,
|
|
13
|
+
model: z.string(),
|
|
14
|
+
thinking: agentThinkingSchema
|
|
15
|
+
});
|
|
16
|
+
export const agentInterModuleContract = defineInterModuleContract({
|
|
17
|
+
module: 'agent',
|
|
18
|
+
methods: {
|
|
19
|
+
resolveAgentConfig: {
|
|
20
|
+
input: z.object({
|
|
21
|
+
workspaceId: z.string().uuid().nullable(),
|
|
22
|
+
config: agentConfigInputSchema
|
|
23
|
+
}),
|
|
24
|
+
output: resolvedAgentConfigSchema,
|
|
25
|
+
errors: {
|
|
26
|
+
'agent-config-invalid': z.object({})
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
resolveRuntimeCredentials: {
|
|
30
|
+
input: z.object({
|
|
31
|
+
workspaceId: z.string().uuid(),
|
|
32
|
+
harness: harnessSchema,
|
|
33
|
+
provider: modelProviderRefSchema,
|
|
34
|
+
model: z.string(),
|
|
35
|
+
thinking: agentThinkingSchema
|
|
36
|
+
}),
|
|
37
|
+
output: agentRuntimeCredentialsResponseSchema,
|
|
38
|
+
errors: {
|
|
39
|
+
'model-provider-not-configured': z.object({}),
|
|
40
|
+
'model-provider-credentials-invalid': z.object({})
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# 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 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","agentConfigInputSchema","object","harness","optional","provider","model","string","thinking","resolvedAgentConfigSchema","agentInterModuleContract","module","methods","resolveAgentConfig","input","workspaceId","uuid","nullable","config","output","errors","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,yBAAyBL,EAAEM,MAAM,CAAC;IACtCC,SAASJ,cAAcK,QAAQ;IAC/BC,UAAUL,uBAAuBI,QAAQ;IACzCE,OAAOV,EAAEW,MAAM,GAAGH,QAAQ;IAC1BI,UAAUV,oBAAoBM,QAAQ;AACxC;AAEA,MAAMK,4BAA4Bb,EAAEM,MAAM,CAAC;IACzCC,SAASJ;IACTM,UAAUL;IACVM,OAAOV,EAAEW,MAAM;IACfC,UAAUV;AACZ;AAEA,OAAO,MAAMY,2BAA2Bf,0BAA0B;IAChEgB,QAAQ;IACRC,SAAS;QACPC,oBAAoB;YAClBC,OAAOlB,EAAEM,MAAM,CAAC;gBAACa,aAAanB,EAAEW,MAAM,GAAGS,IAAI,GAAGC,QAAQ;gBAAIC,QAAQjB;YAAsB;YAC1FkB,QAAQV;YACRW,QAAQ;gBAAC,wBAAwBxB,EAAEM,MAAM,CAAC,CAAC;YAAE;QAC/C;QACAmB,2BAA2B;YACzBP,OAAOlB,EAAEM,MAAM,CAAC;gBACda,aAAanB,EAAEW,MAAM,GAAGS,IAAI;gBAC5Bb,SAASJ;gBACTM,UAAUL;gBACVM,OAAOV,EAAEW,MAAM;gBACfC,UAAUV;YACZ;YACAqB,QAAQtB;YACRuB,QAAQ;gBACN,iCAAiCxB,EAAEM,MAAM,CAAC,CAAC;gBAC3C,sCAAsCN,EAAEM,MAAM,CAAC,CAAC;YAClD;QACF;IACF;AACF,GAAG"}
|