@ikenga/contract 0.3.0 → 0.4.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/engine.d.ts +509 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +79 -1
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.d.ts +829 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +10 -0
- package/dist/manifest.js.map +1 -1
- package/package.json +10 -10
- package/src/engine.test.ts +205 -0
- package/src/engine.ts +428 -0
- package/src/index.ts +1 -1
- package/src/manifest.ts +12 -0
package/dist/manifest.d.ts
CHANGED
|
@@ -717,6 +717,118 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
717
717
|
}, {
|
|
718
718
|
key_prefixes?: string[] | undefined;
|
|
719
719
|
}>>;
|
|
720
|
+
/**
|
|
721
|
+
* Engine-adapter manifest block. Present iff this pkg is an engine-*
|
|
722
|
+
* adapter. Declares the agent id, display name, capability snapshot,
|
|
723
|
+
* and onboarding hints surfaced by the first-run wizard.
|
|
724
|
+
* See `@ikenga/contract/engine` for the source-of-truth schema.
|
|
725
|
+
*/
|
|
726
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
727
|
+
agentId: z.ZodString;
|
|
728
|
+
display: z.ZodOptional<z.ZodString>;
|
|
729
|
+
capabilities: z.ZodObject<{
|
|
730
|
+
streaming: z.ZodBoolean;
|
|
731
|
+
toolUse: z.ZodBoolean;
|
|
732
|
+
thinking: z.ZodBoolean;
|
|
733
|
+
artifacts: z.ZodBoolean;
|
|
734
|
+
fileAttachments: z.ZodBoolean;
|
|
735
|
+
imageInput: z.ZodBoolean;
|
|
736
|
+
slashCommands: z.ZodBoolean;
|
|
737
|
+
modelSwitching: z.ZodBoolean;
|
|
738
|
+
promptCaching: z.ZodBoolean;
|
|
739
|
+
agenticTools: z.ZodBoolean;
|
|
740
|
+
mcp: z.ZodBoolean;
|
|
741
|
+
sessionResume: z.ZodBoolean;
|
|
742
|
+
}, "strip", z.ZodTypeAny, {
|
|
743
|
+
mcp: boolean;
|
|
744
|
+
streaming: boolean;
|
|
745
|
+
toolUse: boolean;
|
|
746
|
+
thinking: boolean;
|
|
747
|
+
artifacts: boolean;
|
|
748
|
+
fileAttachments: boolean;
|
|
749
|
+
imageInput: boolean;
|
|
750
|
+
slashCommands: boolean;
|
|
751
|
+
modelSwitching: boolean;
|
|
752
|
+
promptCaching: boolean;
|
|
753
|
+
agenticTools: boolean;
|
|
754
|
+
sessionResume: boolean;
|
|
755
|
+
}, {
|
|
756
|
+
mcp: boolean;
|
|
757
|
+
streaming: boolean;
|
|
758
|
+
toolUse: boolean;
|
|
759
|
+
thinking: boolean;
|
|
760
|
+
artifacts: boolean;
|
|
761
|
+
fileAttachments: boolean;
|
|
762
|
+
imageInput: boolean;
|
|
763
|
+
slashCommands: boolean;
|
|
764
|
+
modelSwitching: boolean;
|
|
765
|
+
promptCaching: boolean;
|
|
766
|
+
agenticTools: boolean;
|
|
767
|
+
sessionResume: boolean;
|
|
768
|
+
}>;
|
|
769
|
+
onboarding: z.ZodDefault<z.ZodObject<{
|
|
770
|
+
requiredVaultKeys: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
771
|
+
requiredEnvVars: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
772
|
+
authCommand: z.ZodOptional<z.ZodString>;
|
|
773
|
+
docsUrl: z.ZodOptional<z.ZodString>;
|
|
774
|
+
}, "strip", z.ZodTypeAny, {
|
|
775
|
+
requiredVaultKeys: string[];
|
|
776
|
+
requiredEnvVars: string[];
|
|
777
|
+
authCommand?: string | undefined;
|
|
778
|
+
docsUrl?: string | undefined;
|
|
779
|
+
}, {
|
|
780
|
+
requiredVaultKeys?: string[] | undefined;
|
|
781
|
+
requiredEnvVars?: string[] | undefined;
|
|
782
|
+
authCommand?: string | undefined;
|
|
783
|
+
docsUrl?: string | undefined;
|
|
784
|
+
}>>;
|
|
785
|
+
}, "strip", z.ZodTypeAny, {
|
|
786
|
+
capabilities: {
|
|
787
|
+
mcp: boolean;
|
|
788
|
+
streaming: boolean;
|
|
789
|
+
toolUse: boolean;
|
|
790
|
+
thinking: boolean;
|
|
791
|
+
artifacts: boolean;
|
|
792
|
+
fileAttachments: boolean;
|
|
793
|
+
imageInput: boolean;
|
|
794
|
+
slashCommands: boolean;
|
|
795
|
+
modelSwitching: boolean;
|
|
796
|
+
promptCaching: boolean;
|
|
797
|
+
agenticTools: boolean;
|
|
798
|
+
sessionResume: boolean;
|
|
799
|
+
};
|
|
800
|
+
agentId: string;
|
|
801
|
+
onboarding: {
|
|
802
|
+
requiredVaultKeys: string[];
|
|
803
|
+
requiredEnvVars: string[];
|
|
804
|
+
authCommand?: string | undefined;
|
|
805
|
+
docsUrl?: string | undefined;
|
|
806
|
+
};
|
|
807
|
+
display?: string | undefined;
|
|
808
|
+
}, {
|
|
809
|
+
capabilities: {
|
|
810
|
+
mcp: boolean;
|
|
811
|
+
streaming: boolean;
|
|
812
|
+
toolUse: boolean;
|
|
813
|
+
thinking: boolean;
|
|
814
|
+
artifacts: boolean;
|
|
815
|
+
fileAttachments: boolean;
|
|
816
|
+
imageInput: boolean;
|
|
817
|
+
slashCommands: boolean;
|
|
818
|
+
modelSwitching: boolean;
|
|
819
|
+
promptCaching: boolean;
|
|
820
|
+
agenticTools: boolean;
|
|
821
|
+
sessionResume: boolean;
|
|
822
|
+
};
|
|
823
|
+
agentId: string;
|
|
824
|
+
display?: string | undefined;
|
|
825
|
+
onboarding?: {
|
|
826
|
+
requiredVaultKeys?: string[] | undefined;
|
|
827
|
+
requiredEnvVars?: string[] | undefined;
|
|
828
|
+
authCommand?: string | undefined;
|
|
829
|
+
docsUrl?: string | undefined;
|
|
830
|
+
} | undefined;
|
|
831
|
+
}>>;
|
|
720
832
|
}, "strip", z.ZodTypeAny, {
|
|
721
833
|
mcp: {
|
|
722
834
|
args: string[];
|
|
@@ -812,6 +924,30 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
812
924
|
decorations?: boolean | undefined;
|
|
813
925
|
menu?: string | undefined;
|
|
814
926
|
} | undefined;
|
|
927
|
+
engine?: {
|
|
928
|
+
capabilities: {
|
|
929
|
+
mcp: boolean;
|
|
930
|
+
streaming: boolean;
|
|
931
|
+
toolUse: boolean;
|
|
932
|
+
thinking: boolean;
|
|
933
|
+
artifacts: boolean;
|
|
934
|
+
fileAttachments: boolean;
|
|
935
|
+
imageInput: boolean;
|
|
936
|
+
slashCommands: boolean;
|
|
937
|
+
modelSwitching: boolean;
|
|
938
|
+
promptCaching: boolean;
|
|
939
|
+
agenticTools: boolean;
|
|
940
|
+
sessionResume: boolean;
|
|
941
|
+
};
|
|
942
|
+
agentId: string;
|
|
943
|
+
onboarding: {
|
|
944
|
+
requiredVaultKeys: string[];
|
|
945
|
+
requiredEnvVars: string[];
|
|
946
|
+
authCommand?: string | undefined;
|
|
947
|
+
docsUrl?: string | undefined;
|
|
948
|
+
};
|
|
949
|
+
display?: string | undefined;
|
|
950
|
+
} | undefined;
|
|
815
951
|
}, {
|
|
816
952
|
id: string;
|
|
817
953
|
name: string;
|
|
@@ -907,8 +1043,701 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
907
1043
|
decorations?: boolean | undefined;
|
|
908
1044
|
menu?: string | undefined;
|
|
909
1045
|
} | undefined;
|
|
1046
|
+
engine?: {
|
|
1047
|
+
capabilities: {
|
|
1048
|
+
mcp: boolean;
|
|
1049
|
+
streaming: boolean;
|
|
1050
|
+
toolUse: boolean;
|
|
1051
|
+
thinking: boolean;
|
|
1052
|
+
artifacts: boolean;
|
|
1053
|
+
fileAttachments: boolean;
|
|
1054
|
+
imageInput: boolean;
|
|
1055
|
+
slashCommands: boolean;
|
|
1056
|
+
modelSwitching: boolean;
|
|
1057
|
+
promptCaching: boolean;
|
|
1058
|
+
agenticTools: boolean;
|
|
1059
|
+
sessionResume: boolean;
|
|
1060
|
+
};
|
|
1061
|
+
agentId: string;
|
|
1062
|
+
display?: string | undefined;
|
|
1063
|
+
onboarding?: {
|
|
1064
|
+
requiredVaultKeys?: string[] | undefined;
|
|
1065
|
+
requiredEnvVars?: string[] | undefined;
|
|
1066
|
+
authCommand?: string | undefined;
|
|
1067
|
+
docsUrl?: string | undefined;
|
|
1068
|
+
} | undefined;
|
|
1069
|
+
} | undefined;
|
|
910
1070
|
}>;
|
|
911
1071
|
export type Manifest = z.infer<typeof ManifestSchema>;
|
|
1072
|
+
/** Alias retained for symmetry with the Rust side / external consumers. */
|
|
1073
|
+
export declare const PkgManifestSchema: z.ZodObject<{
|
|
1074
|
+
/** Reverse-DNS, e.g. `com.ikenga.studio`. */
|
|
1075
|
+
id: z.ZodString;
|
|
1076
|
+
name: z.ZodString;
|
|
1077
|
+
version: z.ZodString;
|
|
1078
|
+
/** Numeric string — host accepts versions in [MIN, CURRENT]. */
|
|
1079
|
+
ikenga_api: z.ZodString;
|
|
1080
|
+
/** Hint, not enforced: "skill" | "embedded" | "windowed" | "engine". */
|
|
1081
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
1083
|
+
name: z.ZodString;
|
|
1084
|
+
key: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
}, "strip", z.ZodTypeAny, {
|
|
1086
|
+
name: string;
|
|
1087
|
+
key?: string | undefined;
|
|
1088
|
+
}, {
|
|
1089
|
+
name: string;
|
|
1090
|
+
key?: string | undefined;
|
|
1091
|
+
}>>;
|
|
1092
|
+
/** Rust target triples; empty = host-agnostic. */
|
|
1093
|
+
targets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1094
|
+
skills: z.ZodOptional<z.ZodString>;
|
|
1095
|
+
commands: z.ZodOptional<z.ZodString>;
|
|
1096
|
+
agents: z.ZodOptional<z.ZodString>;
|
|
1097
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1098
|
+
name: z.ZodString;
|
|
1099
|
+
command: z.ZodString;
|
|
1100
|
+
args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1101
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1102
|
+
/** "per-call" (default) | "long-lived" */
|
|
1103
|
+
lifecycle: z.ZodOptional<z.ZodEnum<["per-call", "long-lived"]>>;
|
|
1104
|
+
}, "strip", z.ZodTypeAny, {
|
|
1105
|
+
args: string[];
|
|
1106
|
+
name: string;
|
|
1107
|
+
command: string;
|
|
1108
|
+
env: Record<string, string>;
|
|
1109
|
+
lifecycle?: "per-call" | "long-lived" | undefined;
|
|
1110
|
+
}, {
|
|
1111
|
+
name: string;
|
|
1112
|
+
command: string;
|
|
1113
|
+
args?: string[] | undefined;
|
|
1114
|
+
env?: Record<string, string> | undefined;
|
|
1115
|
+
lifecycle?: "per-call" | "long-lived" | undefined;
|
|
1116
|
+
}>, "many">>;
|
|
1117
|
+
sidecars: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1118
|
+
/** Must start with `pa-<pkg-slug>-` (slug = id with `.` → `-`). */
|
|
1119
|
+
name: z.ZodString;
|
|
1120
|
+
/** Path inside pkg dir; may contain `{target}` (host triple). */
|
|
1121
|
+
bin: z.ZodString;
|
|
1122
|
+
/** "json" (default) | "raw" */
|
|
1123
|
+
stdio: z.ZodDefault<z.ZodString>;
|
|
1124
|
+
}, "strip", z.ZodTypeAny, {
|
|
1125
|
+
name: string;
|
|
1126
|
+
bin: string;
|
|
1127
|
+
stdio: string;
|
|
1128
|
+
}, {
|
|
1129
|
+
name: string;
|
|
1130
|
+
bin: string;
|
|
1131
|
+
stdio?: string | undefined;
|
|
1132
|
+
}>, "many">>;
|
|
1133
|
+
permissions: z.ZodDefault<z.ZodObject<{
|
|
1134
|
+
'shell.execute': z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1135
|
+
'fs.read': z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1136
|
+
'fs.write': z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1137
|
+
net: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1138
|
+
'supabase.tables': z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1139
|
+
'vault.keys': z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1140
|
+
}, "strip", z.ZodTypeAny, {
|
|
1141
|
+
'shell.execute': string[];
|
|
1142
|
+
'fs.read': string[];
|
|
1143
|
+
'fs.write': string[];
|
|
1144
|
+
net: string[];
|
|
1145
|
+
'supabase.tables': string[];
|
|
1146
|
+
'vault.keys': string[];
|
|
1147
|
+
}, {
|
|
1148
|
+
'shell.execute'?: string[] | undefined;
|
|
1149
|
+
'fs.read'?: string[] | undefined;
|
|
1150
|
+
'fs.write'?: string[] | undefined;
|
|
1151
|
+
net?: string[] | undefined;
|
|
1152
|
+
'supabase.tables'?: string[] | undefined;
|
|
1153
|
+
'vault.keys'?: string[] | undefined;
|
|
1154
|
+
}>>;
|
|
1155
|
+
migrations: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
1157
|
+
schema: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1158
|
+
key: z.ZodString;
|
|
1159
|
+
type: z.ZodEnum<["string", "number", "boolean", "secret"]>;
|
|
1160
|
+
label: z.ZodString;
|
|
1161
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
1162
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1163
|
+
}, "strip", z.ZodTypeAny, {
|
|
1164
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1165
|
+
label: string;
|
|
1166
|
+
key: string;
|
|
1167
|
+
description?: string | undefined;
|
|
1168
|
+
default?: unknown;
|
|
1169
|
+
}, {
|
|
1170
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1171
|
+
label: string;
|
|
1172
|
+
key: string;
|
|
1173
|
+
description?: string | undefined;
|
|
1174
|
+
default?: unknown;
|
|
1175
|
+
}>, "many">>;
|
|
1176
|
+
}, "strip", z.ZodTypeAny, {
|
|
1177
|
+
schema: {
|
|
1178
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1179
|
+
label: string;
|
|
1180
|
+
key: string;
|
|
1181
|
+
description?: string | undefined;
|
|
1182
|
+
default?: unknown;
|
|
1183
|
+
}[];
|
|
1184
|
+
}, {
|
|
1185
|
+
schema?: {
|
|
1186
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1187
|
+
label: string;
|
|
1188
|
+
key: string;
|
|
1189
|
+
description?: string | undefined;
|
|
1190
|
+
default?: unknown;
|
|
1191
|
+
}[] | undefined;
|
|
1192
|
+
}>>;
|
|
1193
|
+
ui: z.ZodDefault<z.ZodObject<{
|
|
1194
|
+
nav: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1195
|
+
id: z.ZodString;
|
|
1196
|
+
label: z.ZodString;
|
|
1197
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1198
|
+
section: z.ZodOptional<z.ZodString>;
|
|
1199
|
+
route: z.ZodString;
|
|
1200
|
+
}, "strip", z.ZodTypeAny, {
|
|
1201
|
+
label: string;
|
|
1202
|
+
id: string;
|
|
1203
|
+
route: string;
|
|
1204
|
+
section?: string | undefined;
|
|
1205
|
+
icon?: string | undefined;
|
|
1206
|
+
}, {
|
|
1207
|
+
label: string;
|
|
1208
|
+
id: string;
|
|
1209
|
+
route: string;
|
|
1210
|
+
section?: string | undefined;
|
|
1211
|
+
icon?: string | undefined;
|
|
1212
|
+
}>, "many">>;
|
|
1213
|
+
routes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1214
|
+
path: z.ZodString;
|
|
1215
|
+
/** "iframe" | "component" (component is builtin-only) */
|
|
1216
|
+
kind: z.ZodEnum<["iframe", "component"]>;
|
|
1217
|
+
/** iframe: URL or pkg-relative html path. component: identifier. */
|
|
1218
|
+
source: z.ZodString;
|
|
1219
|
+
}, "strip", z.ZodTypeAny, {
|
|
1220
|
+
path: string;
|
|
1221
|
+
kind: "iframe" | "component";
|
|
1222
|
+
source: string;
|
|
1223
|
+
}, {
|
|
1224
|
+
path: string;
|
|
1225
|
+
kind: "iframe" | "component";
|
|
1226
|
+
source: string;
|
|
1227
|
+
}>, "many">>;
|
|
1228
|
+
command_palette: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1229
|
+
id: z.ZodString;
|
|
1230
|
+
label: z.ZodString;
|
|
1231
|
+
shortcut: z.ZodOptional<z.ZodString>;
|
|
1232
|
+
action: z.ZodUnknown;
|
|
1233
|
+
}, "strip", z.ZodTypeAny, {
|
|
1234
|
+
label: string;
|
|
1235
|
+
id: string;
|
|
1236
|
+
shortcut?: string | undefined;
|
|
1237
|
+
action?: unknown;
|
|
1238
|
+
}, {
|
|
1239
|
+
label: string;
|
|
1240
|
+
id: string;
|
|
1241
|
+
shortcut?: string | undefined;
|
|
1242
|
+
action?: unknown;
|
|
1243
|
+
}>, "many">>;
|
|
1244
|
+
side_pane_viewers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1245
|
+
id: z.ZodString;
|
|
1246
|
+
label: z.ZodString;
|
|
1247
|
+
route: z.ZodString;
|
|
1248
|
+
}, "strip", z.ZodTypeAny, {
|
|
1249
|
+
label: string;
|
|
1250
|
+
id: string;
|
|
1251
|
+
route: string;
|
|
1252
|
+
}, {
|
|
1253
|
+
label: string;
|
|
1254
|
+
id: string;
|
|
1255
|
+
route: string;
|
|
1256
|
+
}>, "many">>;
|
|
1257
|
+
/** Per-directive CSP overrides for the iframe content. */
|
|
1258
|
+
csp: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1259
|
+
/** Per-directive Permission-Policy values. */
|
|
1260
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
1261
|
+
}, "strip", z.ZodTypeAny, {
|
|
1262
|
+
nav: {
|
|
1263
|
+
label: string;
|
|
1264
|
+
id: string;
|
|
1265
|
+
route: string;
|
|
1266
|
+
section?: string | undefined;
|
|
1267
|
+
icon?: string | undefined;
|
|
1268
|
+
}[];
|
|
1269
|
+
routes: {
|
|
1270
|
+
path: string;
|
|
1271
|
+
kind: "iframe" | "component";
|
|
1272
|
+
source: string;
|
|
1273
|
+
}[];
|
|
1274
|
+
command_palette: {
|
|
1275
|
+
label: string;
|
|
1276
|
+
id: string;
|
|
1277
|
+
shortcut?: string | undefined;
|
|
1278
|
+
action?: unknown;
|
|
1279
|
+
}[];
|
|
1280
|
+
side_pane_viewers: {
|
|
1281
|
+
label: string;
|
|
1282
|
+
id: string;
|
|
1283
|
+
route: string;
|
|
1284
|
+
}[];
|
|
1285
|
+
csp?: Record<string, string[]> | undefined;
|
|
1286
|
+
permissions?: Record<string, string[]> | undefined;
|
|
1287
|
+
}, {
|
|
1288
|
+
nav?: {
|
|
1289
|
+
label: string;
|
|
1290
|
+
id: string;
|
|
1291
|
+
route: string;
|
|
1292
|
+
section?: string | undefined;
|
|
1293
|
+
icon?: string | undefined;
|
|
1294
|
+
}[] | undefined;
|
|
1295
|
+
routes?: {
|
|
1296
|
+
path: string;
|
|
1297
|
+
kind: "iframe" | "component";
|
|
1298
|
+
source: string;
|
|
1299
|
+
}[] | undefined;
|
|
1300
|
+
command_palette?: {
|
|
1301
|
+
label: string;
|
|
1302
|
+
id: string;
|
|
1303
|
+
shortcut?: string | undefined;
|
|
1304
|
+
action?: unknown;
|
|
1305
|
+
}[] | undefined;
|
|
1306
|
+
side_pane_viewers?: {
|
|
1307
|
+
label: string;
|
|
1308
|
+
id: string;
|
|
1309
|
+
route: string;
|
|
1310
|
+
}[] | undefined;
|
|
1311
|
+
csp?: Record<string, string[]> | undefined;
|
|
1312
|
+
permissions?: Record<string, string[]> | undefined;
|
|
1313
|
+
}>>;
|
|
1314
|
+
iyke: z.ZodOptional<z.ZodObject<{
|
|
1315
|
+
routes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1316
|
+
method: z.ZodEnum<["GET", "POST"]>;
|
|
1317
|
+
/** Must start with `/pkg/<id>/`. */
|
|
1318
|
+
path: z.ZodString;
|
|
1319
|
+
/** `sidecar:<name> <sub>` | `event:<name>` */
|
|
1320
|
+
handler: z.ZodString;
|
|
1321
|
+
}, "strip", z.ZodTypeAny, {
|
|
1322
|
+
path: string;
|
|
1323
|
+
method: "GET" | "POST";
|
|
1324
|
+
handler: string;
|
|
1325
|
+
}, {
|
|
1326
|
+
path: string;
|
|
1327
|
+
method: "GET" | "POST";
|
|
1328
|
+
handler: string;
|
|
1329
|
+
}>, "many">>;
|
|
1330
|
+
events: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1331
|
+
}, "strip", z.ZodTypeAny, {
|
|
1332
|
+
routes: {
|
|
1333
|
+
path: string;
|
|
1334
|
+
method: "GET" | "POST";
|
|
1335
|
+
handler: string;
|
|
1336
|
+
}[];
|
|
1337
|
+
events: string[];
|
|
1338
|
+
}, {
|
|
1339
|
+
routes?: {
|
|
1340
|
+
path: string;
|
|
1341
|
+
method: "GET" | "POST";
|
|
1342
|
+
handler: string;
|
|
1343
|
+
}[] | undefined;
|
|
1344
|
+
events?: string[] | undefined;
|
|
1345
|
+
}>>;
|
|
1346
|
+
cron: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1347
|
+
id: z.ZodString;
|
|
1348
|
+
/** 6-field cron expression: sec min hour day month dow */
|
|
1349
|
+
expr: z.ZodString;
|
|
1350
|
+
handler: z.ZodString;
|
|
1351
|
+
env_from_settings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1352
|
+
}, "strip", z.ZodTypeAny, {
|
|
1353
|
+
id: string;
|
|
1354
|
+
handler: string;
|
|
1355
|
+
expr: string;
|
|
1356
|
+
env_from_settings: string[];
|
|
1357
|
+
}, {
|
|
1358
|
+
id: string;
|
|
1359
|
+
handler: string;
|
|
1360
|
+
expr: string;
|
|
1361
|
+
env_from_settings?: string[] | undefined;
|
|
1362
|
+
}>, "many">>;
|
|
1363
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
1364
|
+
label: z.ZodString;
|
|
1365
|
+
url: z.ZodString;
|
|
1366
|
+
size: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1367
|
+
decorations: z.ZodOptional<z.ZodBoolean>;
|
|
1368
|
+
menu: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
}, "strip", z.ZodTypeAny, {
|
|
1370
|
+
url: string;
|
|
1371
|
+
label: string;
|
|
1372
|
+
size?: [number, number] | undefined;
|
|
1373
|
+
decorations?: boolean | undefined;
|
|
1374
|
+
menu?: string | undefined;
|
|
1375
|
+
}, {
|
|
1376
|
+
url: string;
|
|
1377
|
+
label: string;
|
|
1378
|
+
size?: [number, number] | undefined;
|
|
1379
|
+
decorations?: boolean | undefined;
|
|
1380
|
+
menu?: string | undefined;
|
|
1381
|
+
}>>;
|
|
1382
|
+
queries: z.ZodOptional<z.ZodObject<{
|
|
1383
|
+
key_prefixes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1384
|
+
}, "strip", z.ZodTypeAny, {
|
|
1385
|
+
key_prefixes: string[];
|
|
1386
|
+
}, {
|
|
1387
|
+
key_prefixes?: string[] | undefined;
|
|
1388
|
+
}>>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Engine-adapter manifest block. Present iff this pkg is an engine-*
|
|
1391
|
+
* adapter. Declares the agent id, display name, capability snapshot,
|
|
1392
|
+
* and onboarding hints surfaced by the first-run wizard.
|
|
1393
|
+
* See `@ikenga/contract/engine` for the source-of-truth schema.
|
|
1394
|
+
*/
|
|
1395
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
1396
|
+
agentId: z.ZodString;
|
|
1397
|
+
display: z.ZodOptional<z.ZodString>;
|
|
1398
|
+
capabilities: z.ZodObject<{
|
|
1399
|
+
streaming: z.ZodBoolean;
|
|
1400
|
+
toolUse: z.ZodBoolean;
|
|
1401
|
+
thinking: z.ZodBoolean;
|
|
1402
|
+
artifacts: z.ZodBoolean;
|
|
1403
|
+
fileAttachments: z.ZodBoolean;
|
|
1404
|
+
imageInput: z.ZodBoolean;
|
|
1405
|
+
slashCommands: z.ZodBoolean;
|
|
1406
|
+
modelSwitching: z.ZodBoolean;
|
|
1407
|
+
promptCaching: z.ZodBoolean;
|
|
1408
|
+
agenticTools: z.ZodBoolean;
|
|
1409
|
+
mcp: z.ZodBoolean;
|
|
1410
|
+
sessionResume: z.ZodBoolean;
|
|
1411
|
+
}, "strip", z.ZodTypeAny, {
|
|
1412
|
+
mcp: boolean;
|
|
1413
|
+
streaming: boolean;
|
|
1414
|
+
toolUse: boolean;
|
|
1415
|
+
thinking: boolean;
|
|
1416
|
+
artifacts: boolean;
|
|
1417
|
+
fileAttachments: boolean;
|
|
1418
|
+
imageInput: boolean;
|
|
1419
|
+
slashCommands: boolean;
|
|
1420
|
+
modelSwitching: boolean;
|
|
1421
|
+
promptCaching: boolean;
|
|
1422
|
+
agenticTools: boolean;
|
|
1423
|
+
sessionResume: boolean;
|
|
1424
|
+
}, {
|
|
1425
|
+
mcp: boolean;
|
|
1426
|
+
streaming: boolean;
|
|
1427
|
+
toolUse: boolean;
|
|
1428
|
+
thinking: boolean;
|
|
1429
|
+
artifacts: boolean;
|
|
1430
|
+
fileAttachments: boolean;
|
|
1431
|
+
imageInput: boolean;
|
|
1432
|
+
slashCommands: boolean;
|
|
1433
|
+
modelSwitching: boolean;
|
|
1434
|
+
promptCaching: boolean;
|
|
1435
|
+
agenticTools: boolean;
|
|
1436
|
+
sessionResume: boolean;
|
|
1437
|
+
}>;
|
|
1438
|
+
onboarding: z.ZodDefault<z.ZodObject<{
|
|
1439
|
+
requiredVaultKeys: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1440
|
+
requiredEnvVars: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1441
|
+
authCommand: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
docsUrl: z.ZodOptional<z.ZodString>;
|
|
1443
|
+
}, "strip", z.ZodTypeAny, {
|
|
1444
|
+
requiredVaultKeys: string[];
|
|
1445
|
+
requiredEnvVars: string[];
|
|
1446
|
+
authCommand?: string | undefined;
|
|
1447
|
+
docsUrl?: string | undefined;
|
|
1448
|
+
}, {
|
|
1449
|
+
requiredVaultKeys?: string[] | undefined;
|
|
1450
|
+
requiredEnvVars?: string[] | undefined;
|
|
1451
|
+
authCommand?: string | undefined;
|
|
1452
|
+
docsUrl?: string | undefined;
|
|
1453
|
+
}>>;
|
|
1454
|
+
}, "strip", z.ZodTypeAny, {
|
|
1455
|
+
capabilities: {
|
|
1456
|
+
mcp: boolean;
|
|
1457
|
+
streaming: boolean;
|
|
1458
|
+
toolUse: boolean;
|
|
1459
|
+
thinking: boolean;
|
|
1460
|
+
artifacts: boolean;
|
|
1461
|
+
fileAttachments: boolean;
|
|
1462
|
+
imageInput: boolean;
|
|
1463
|
+
slashCommands: boolean;
|
|
1464
|
+
modelSwitching: boolean;
|
|
1465
|
+
promptCaching: boolean;
|
|
1466
|
+
agenticTools: boolean;
|
|
1467
|
+
sessionResume: boolean;
|
|
1468
|
+
};
|
|
1469
|
+
agentId: string;
|
|
1470
|
+
onboarding: {
|
|
1471
|
+
requiredVaultKeys: string[];
|
|
1472
|
+
requiredEnvVars: string[];
|
|
1473
|
+
authCommand?: string | undefined;
|
|
1474
|
+
docsUrl?: string | undefined;
|
|
1475
|
+
};
|
|
1476
|
+
display?: string | undefined;
|
|
1477
|
+
}, {
|
|
1478
|
+
capabilities: {
|
|
1479
|
+
mcp: boolean;
|
|
1480
|
+
streaming: boolean;
|
|
1481
|
+
toolUse: boolean;
|
|
1482
|
+
thinking: boolean;
|
|
1483
|
+
artifacts: boolean;
|
|
1484
|
+
fileAttachments: boolean;
|
|
1485
|
+
imageInput: boolean;
|
|
1486
|
+
slashCommands: boolean;
|
|
1487
|
+
modelSwitching: boolean;
|
|
1488
|
+
promptCaching: boolean;
|
|
1489
|
+
agenticTools: boolean;
|
|
1490
|
+
sessionResume: boolean;
|
|
1491
|
+
};
|
|
1492
|
+
agentId: string;
|
|
1493
|
+
display?: string | undefined;
|
|
1494
|
+
onboarding?: {
|
|
1495
|
+
requiredVaultKeys?: string[] | undefined;
|
|
1496
|
+
requiredEnvVars?: string[] | undefined;
|
|
1497
|
+
authCommand?: string | undefined;
|
|
1498
|
+
docsUrl?: string | undefined;
|
|
1499
|
+
} | undefined;
|
|
1500
|
+
}>>;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
mcp: {
|
|
1503
|
+
args: string[];
|
|
1504
|
+
name: string;
|
|
1505
|
+
command: string;
|
|
1506
|
+
env: Record<string, string>;
|
|
1507
|
+
lifecycle?: "per-call" | "long-lived" | undefined;
|
|
1508
|
+
}[];
|
|
1509
|
+
id: string;
|
|
1510
|
+
name: string;
|
|
1511
|
+
version: string;
|
|
1512
|
+
permissions: {
|
|
1513
|
+
'shell.execute': string[];
|
|
1514
|
+
'fs.read': string[];
|
|
1515
|
+
'fs.write': string[];
|
|
1516
|
+
net: string[];
|
|
1517
|
+
'supabase.tables': string[];
|
|
1518
|
+
'vault.keys': string[];
|
|
1519
|
+
};
|
|
1520
|
+
ikenga_api: string;
|
|
1521
|
+
targets: string[];
|
|
1522
|
+
sidecars: {
|
|
1523
|
+
name: string;
|
|
1524
|
+
bin: string;
|
|
1525
|
+
stdio: string;
|
|
1526
|
+
}[];
|
|
1527
|
+
ui: {
|
|
1528
|
+
nav: {
|
|
1529
|
+
label: string;
|
|
1530
|
+
id: string;
|
|
1531
|
+
route: string;
|
|
1532
|
+
section?: string | undefined;
|
|
1533
|
+
icon?: string | undefined;
|
|
1534
|
+
}[];
|
|
1535
|
+
routes: {
|
|
1536
|
+
path: string;
|
|
1537
|
+
kind: "iframe" | "component";
|
|
1538
|
+
source: string;
|
|
1539
|
+
}[];
|
|
1540
|
+
command_palette: {
|
|
1541
|
+
label: string;
|
|
1542
|
+
id: string;
|
|
1543
|
+
shortcut?: string | undefined;
|
|
1544
|
+
action?: unknown;
|
|
1545
|
+
}[];
|
|
1546
|
+
side_pane_viewers: {
|
|
1547
|
+
label: string;
|
|
1548
|
+
id: string;
|
|
1549
|
+
route: string;
|
|
1550
|
+
}[];
|
|
1551
|
+
csp?: Record<string, string[]> | undefined;
|
|
1552
|
+
permissions?: Record<string, string[]> | undefined;
|
|
1553
|
+
};
|
|
1554
|
+
cron: {
|
|
1555
|
+
id: string;
|
|
1556
|
+
handler: string;
|
|
1557
|
+
expr: string;
|
|
1558
|
+
env_from_settings: string[];
|
|
1559
|
+
}[];
|
|
1560
|
+
queries?: {
|
|
1561
|
+
key_prefixes: string[];
|
|
1562
|
+
} | undefined;
|
|
1563
|
+
author?: {
|
|
1564
|
+
name: string;
|
|
1565
|
+
key?: string | undefined;
|
|
1566
|
+
} | undefined;
|
|
1567
|
+
kind?: string | undefined;
|
|
1568
|
+
skills?: string | undefined;
|
|
1569
|
+
commands?: string | undefined;
|
|
1570
|
+
agents?: string | undefined;
|
|
1571
|
+
migrations?: string | undefined;
|
|
1572
|
+
settings?: {
|
|
1573
|
+
schema: {
|
|
1574
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1575
|
+
label: string;
|
|
1576
|
+
key: string;
|
|
1577
|
+
description?: string | undefined;
|
|
1578
|
+
default?: unknown;
|
|
1579
|
+
}[];
|
|
1580
|
+
} | undefined;
|
|
1581
|
+
iyke?: {
|
|
1582
|
+
routes: {
|
|
1583
|
+
path: string;
|
|
1584
|
+
method: "GET" | "POST";
|
|
1585
|
+
handler: string;
|
|
1586
|
+
}[];
|
|
1587
|
+
events: string[];
|
|
1588
|
+
} | undefined;
|
|
1589
|
+
window?: {
|
|
1590
|
+
url: string;
|
|
1591
|
+
label: string;
|
|
1592
|
+
size?: [number, number] | undefined;
|
|
1593
|
+
decorations?: boolean | undefined;
|
|
1594
|
+
menu?: string | undefined;
|
|
1595
|
+
} | undefined;
|
|
1596
|
+
engine?: {
|
|
1597
|
+
capabilities: {
|
|
1598
|
+
mcp: boolean;
|
|
1599
|
+
streaming: boolean;
|
|
1600
|
+
toolUse: boolean;
|
|
1601
|
+
thinking: boolean;
|
|
1602
|
+
artifacts: boolean;
|
|
1603
|
+
fileAttachments: boolean;
|
|
1604
|
+
imageInput: boolean;
|
|
1605
|
+
slashCommands: boolean;
|
|
1606
|
+
modelSwitching: boolean;
|
|
1607
|
+
promptCaching: boolean;
|
|
1608
|
+
agenticTools: boolean;
|
|
1609
|
+
sessionResume: boolean;
|
|
1610
|
+
};
|
|
1611
|
+
agentId: string;
|
|
1612
|
+
onboarding: {
|
|
1613
|
+
requiredVaultKeys: string[];
|
|
1614
|
+
requiredEnvVars: string[];
|
|
1615
|
+
authCommand?: string | undefined;
|
|
1616
|
+
docsUrl?: string | undefined;
|
|
1617
|
+
};
|
|
1618
|
+
display?: string | undefined;
|
|
1619
|
+
} | undefined;
|
|
1620
|
+
}, {
|
|
1621
|
+
id: string;
|
|
1622
|
+
name: string;
|
|
1623
|
+
version: string;
|
|
1624
|
+
ikenga_api: string;
|
|
1625
|
+
mcp?: {
|
|
1626
|
+
name: string;
|
|
1627
|
+
command: string;
|
|
1628
|
+
args?: string[] | undefined;
|
|
1629
|
+
env?: Record<string, string> | undefined;
|
|
1630
|
+
lifecycle?: "per-call" | "long-lived" | undefined;
|
|
1631
|
+
}[] | undefined;
|
|
1632
|
+
queries?: {
|
|
1633
|
+
key_prefixes?: string[] | undefined;
|
|
1634
|
+
} | undefined;
|
|
1635
|
+
author?: {
|
|
1636
|
+
name: string;
|
|
1637
|
+
key?: string | undefined;
|
|
1638
|
+
} | undefined;
|
|
1639
|
+
kind?: string | undefined;
|
|
1640
|
+
permissions?: {
|
|
1641
|
+
'shell.execute'?: string[] | undefined;
|
|
1642
|
+
'fs.read'?: string[] | undefined;
|
|
1643
|
+
'fs.write'?: string[] | undefined;
|
|
1644
|
+
net?: string[] | undefined;
|
|
1645
|
+
'supabase.tables'?: string[] | undefined;
|
|
1646
|
+
'vault.keys'?: string[] | undefined;
|
|
1647
|
+
} | undefined;
|
|
1648
|
+
targets?: string[] | undefined;
|
|
1649
|
+
skills?: string | undefined;
|
|
1650
|
+
commands?: string | undefined;
|
|
1651
|
+
agents?: string | undefined;
|
|
1652
|
+
sidecars?: {
|
|
1653
|
+
name: string;
|
|
1654
|
+
bin: string;
|
|
1655
|
+
stdio?: string | undefined;
|
|
1656
|
+
}[] | undefined;
|
|
1657
|
+
migrations?: string | undefined;
|
|
1658
|
+
settings?: {
|
|
1659
|
+
schema?: {
|
|
1660
|
+
type: "string" | "number" | "boolean" | "secret";
|
|
1661
|
+
label: string;
|
|
1662
|
+
key: string;
|
|
1663
|
+
description?: string | undefined;
|
|
1664
|
+
default?: unknown;
|
|
1665
|
+
}[] | undefined;
|
|
1666
|
+
} | undefined;
|
|
1667
|
+
ui?: {
|
|
1668
|
+
nav?: {
|
|
1669
|
+
label: string;
|
|
1670
|
+
id: string;
|
|
1671
|
+
route: string;
|
|
1672
|
+
section?: string | undefined;
|
|
1673
|
+
icon?: string | undefined;
|
|
1674
|
+
}[] | undefined;
|
|
1675
|
+
routes?: {
|
|
1676
|
+
path: string;
|
|
1677
|
+
kind: "iframe" | "component";
|
|
1678
|
+
source: string;
|
|
1679
|
+
}[] | undefined;
|
|
1680
|
+
command_palette?: {
|
|
1681
|
+
label: string;
|
|
1682
|
+
id: string;
|
|
1683
|
+
shortcut?: string | undefined;
|
|
1684
|
+
action?: unknown;
|
|
1685
|
+
}[] | undefined;
|
|
1686
|
+
side_pane_viewers?: {
|
|
1687
|
+
label: string;
|
|
1688
|
+
id: string;
|
|
1689
|
+
route: string;
|
|
1690
|
+
}[] | undefined;
|
|
1691
|
+
csp?: Record<string, string[]> | undefined;
|
|
1692
|
+
permissions?: Record<string, string[]> | undefined;
|
|
1693
|
+
} | undefined;
|
|
1694
|
+
iyke?: {
|
|
1695
|
+
routes?: {
|
|
1696
|
+
path: string;
|
|
1697
|
+
method: "GET" | "POST";
|
|
1698
|
+
handler: string;
|
|
1699
|
+
}[] | undefined;
|
|
1700
|
+
events?: string[] | undefined;
|
|
1701
|
+
} | undefined;
|
|
1702
|
+
cron?: {
|
|
1703
|
+
id: string;
|
|
1704
|
+
handler: string;
|
|
1705
|
+
expr: string;
|
|
1706
|
+
env_from_settings?: string[] | undefined;
|
|
1707
|
+
}[] | undefined;
|
|
1708
|
+
window?: {
|
|
1709
|
+
url: string;
|
|
1710
|
+
label: string;
|
|
1711
|
+
size?: [number, number] | undefined;
|
|
1712
|
+
decorations?: boolean | undefined;
|
|
1713
|
+
menu?: string | undefined;
|
|
1714
|
+
} | undefined;
|
|
1715
|
+
engine?: {
|
|
1716
|
+
capabilities: {
|
|
1717
|
+
mcp: boolean;
|
|
1718
|
+
streaming: boolean;
|
|
1719
|
+
toolUse: boolean;
|
|
1720
|
+
thinking: boolean;
|
|
1721
|
+
artifacts: boolean;
|
|
1722
|
+
fileAttachments: boolean;
|
|
1723
|
+
imageInput: boolean;
|
|
1724
|
+
slashCommands: boolean;
|
|
1725
|
+
modelSwitching: boolean;
|
|
1726
|
+
promptCaching: boolean;
|
|
1727
|
+
agenticTools: boolean;
|
|
1728
|
+
sessionResume: boolean;
|
|
1729
|
+
};
|
|
1730
|
+
agentId: string;
|
|
1731
|
+
display?: string | undefined;
|
|
1732
|
+
onboarding?: {
|
|
1733
|
+
requiredVaultKeys?: string[] | undefined;
|
|
1734
|
+
requiredEnvVars?: string[] | undefined;
|
|
1735
|
+
authCommand?: string | undefined;
|
|
1736
|
+
docsUrl?: string | undefined;
|
|
1737
|
+
} | undefined;
|
|
1738
|
+
} | undefined;
|
|
1739
|
+
}>;
|
|
1740
|
+
export type PkgManifest = Manifest;
|
|
912
1741
|
/** Convert a reverse-DNS id to a slug: `com.ikenga.studio` → `com-ikenga-studio`. */
|
|
913
1742
|
export declare function pkgSlug(id: string): string;
|
|
914
1743
|
/** Sidecar names must start with `pa-<pkg-slug>-`. */
|