@autohq/cli 0.1.305 → 0.1.307
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/agent-bridge.js +47 -7
- package/dist/index.js +105 -11
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23399,7 +23399,7 @@ Object.assign(lookup, {
|
|
|
23399
23399
|
// package.json
|
|
23400
23400
|
var package_default = {
|
|
23401
23401
|
name: "@autohq/cli",
|
|
23402
|
-
version: "0.1.
|
|
23402
|
+
version: "0.1.307",
|
|
23403
23403
|
license: "SEE LICENSE IN README.md",
|
|
23404
23404
|
publishConfig: {
|
|
23405
23405
|
access: "public"
|
|
@@ -27181,7 +27181,11 @@ var SessionRecordSchema = external_exports.object({
|
|
|
27181
27181
|
});
|
|
27182
27182
|
var SessionMessageOriginSchema = external_exports.object({
|
|
27183
27183
|
eventKey: external_exports.string().trim().min(1),
|
|
27184
|
-
provider: external_exports.string().trim().min(1).nullable().default(null)
|
|
27184
|
+
provider: external_exports.string().trim().min(1).nullable().default(null),
|
|
27185
|
+
// A link to the external artifact behind the routed event when one is
|
|
27186
|
+
// resolvable — the GitHub PR/comment/check page, or the Slack thread —
|
|
27187
|
+
// computed server-side from the event payload at read time.
|
|
27188
|
+
externalUrl: external_exports.string().trim().url().nullable().default(null)
|
|
27185
27189
|
});
|
|
27186
27190
|
var SessionUiMessageRecordSchema = external_exports.object({
|
|
27187
27191
|
id: external_exports.string().trim().min(1),
|
|
@@ -27314,6 +27318,33 @@ function openAiTier(rates) {
|
|
|
27314
27318
|
};
|
|
27315
27319
|
}
|
|
27316
27320
|
|
|
27321
|
+
// ../../packages/schemas/src/project-config.ts
|
|
27322
|
+
var RESOURCE_KIND_CONFIG = "config";
|
|
27323
|
+
var ProjectConfigSpecSchema = external_exports.object({
|
|
27324
|
+
defaultAgent: ResourceNameSchema.optional()
|
|
27325
|
+
}).strict();
|
|
27326
|
+
var ProjectConfigResourceSchema = resourceEnvelopeSchema(
|
|
27327
|
+
ProjectConfigSpecSchema
|
|
27328
|
+
);
|
|
27329
|
+
var ProjectConfigApplyRequestSchema = resourceApplySchema(
|
|
27330
|
+
ProjectConfigSpecSchema
|
|
27331
|
+
);
|
|
27332
|
+
var PROJECT_DEFAULT_AGENT_SOURCES = [
|
|
27333
|
+
"config",
|
|
27334
|
+
"setting",
|
|
27335
|
+
"first_agent"
|
|
27336
|
+
];
|
|
27337
|
+
var ProjectDefaultAgentSourceSchema = external_exports.enum(
|
|
27338
|
+
PROJECT_DEFAULT_AGENT_SOURCES
|
|
27339
|
+
);
|
|
27340
|
+
var ProjectDefaultAgentSchema = external_exports.object({
|
|
27341
|
+
agentName: ResourceNameSchema,
|
|
27342
|
+
source: ProjectDefaultAgentSourceSchema
|
|
27343
|
+
});
|
|
27344
|
+
var UpdateProjectSettingsRequestSchema = external_exports.object({
|
|
27345
|
+
defaultAgentName: ResourceNameSchema.nullable()
|
|
27346
|
+
}).strict();
|
|
27347
|
+
|
|
27317
27348
|
// ../../packages/schemas/src/project-service-accounts.ts
|
|
27318
27349
|
var ProjectServiceAccountSchema = external_exports.object({
|
|
27319
27350
|
id: ServiceAccountIdSchema,
|
|
@@ -27358,22 +27389,29 @@ var AgentApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
|
27358
27389
|
RESOURCE_KIND_AGENT,
|
|
27359
27390
|
AgentApplyRequestSchema.shape.spec
|
|
27360
27391
|
);
|
|
27392
|
+
var ConfigApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
27393
|
+
RESOURCE_KIND_CONFIG,
|
|
27394
|
+
ProjectConfigApplyRequestSchema.shape.spec
|
|
27395
|
+
);
|
|
27361
27396
|
var ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
|
|
27362
27397
|
EnvironmentApplyDocumentSchema,
|
|
27363
27398
|
IdentityApplyDocumentSchema,
|
|
27364
|
-
AgentApplyDocumentSchema
|
|
27399
|
+
AgentApplyDocumentSchema,
|
|
27400
|
+
ConfigApplyDocumentSchema
|
|
27365
27401
|
]);
|
|
27366
27402
|
var PROJECT_RESOURCE_APPLY_ORDER = [
|
|
27367
27403
|
RESOURCE_KIND_CONNECTION,
|
|
27368
27404
|
RESOURCE_KIND_IDENTITY,
|
|
27369
27405
|
RESOURCE_KIND_ENVIRONMENT,
|
|
27370
|
-
RESOURCE_KIND_AGENT
|
|
27406
|
+
RESOURCE_KIND_AGENT,
|
|
27407
|
+
RESOURCE_KIND_CONFIG
|
|
27371
27408
|
];
|
|
27372
27409
|
var PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
27373
27410
|
var PROJECT_APPLY_RESOURCE_KINDS = [
|
|
27374
27411
|
RESOURCE_KIND_IDENTITY,
|
|
27375
27412
|
RESOURCE_KIND_ENVIRONMENT,
|
|
27376
|
-
RESOURCE_KIND_AGENT
|
|
27413
|
+
RESOURCE_KIND_AGENT,
|
|
27414
|
+
RESOURCE_KIND_CONFIG
|
|
27377
27415
|
];
|
|
27378
27416
|
var PROJECT_APPLY_BUNDLE_VERSION = 1;
|
|
27379
27417
|
var MAX_PROJECT_APPLY_BUNDLE_BYTES = 64 * 1024 * 1024;
|
|
@@ -27484,7 +27522,8 @@ var ProjectAppliedResourceSchema = external_exports.union([
|
|
|
27484
27522
|
ProjectConnectionAllocationResourceSchema,
|
|
27485
27523
|
EnvironmentResourceSchema,
|
|
27486
27524
|
IdentityResourceSchema,
|
|
27487
|
-
AgentResourceSchema
|
|
27525
|
+
AgentResourceSchema,
|
|
27526
|
+
ProjectConfigResourceSchema
|
|
27488
27527
|
]);
|
|
27489
27528
|
var ProjectApplyDiagnosticSchema = external_exports.object({
|
|
27490
27529
|
// "info" is a non-blocking advisory (e.g. template-push capability/override
|
|
@@ -27499,7 +27538,8 @@ var ProjectApplyDiagnosticSchema = external_exports.object({
|
|
|
27499
27538
|
RESOURCE_KIND_CONNECTION,
|
|
27500
27539
|
RESOURCE_KIND_ENVIRONMENT,
|
|
27501
27540
|
RESOURCE_KIND_IDENTITY,
|
|
27502
|
-
RESOURCE_KIND_AGENT
|
|
27541
|
+
RESOURCE_KIND_AGENT,
|
|
27542
|
+
RESOURCE_KIND_CONFIG
|
|
27503
27543
|
]),
|
|
27504
27544
|
name: external_exports.string().min(1)
|
|
27505
27545
|
});
|
package/dist/index.js
CHANGED
|
@@ -18865,7 +18865,11 @@ var init_sessions = __esm({
|
|
|
18865
18865
|
});
|
|
18866
18866
|
SessionMessageOriginSchema = external_exports.object({
|
|
18867
18867
|
eventKey: external_exports.string().trim().min(1),
|
|
18868
|
-
provider: external_exports.string().trim().min(1).nullable().default(null)
|
|
18868
|
+
provider: external_exports.string().trim().min(1).nullable().default(null),
|
|
18869
|
+
// A link to the external artifact behind the routed event when one is
|
|
18870
|
+
// resolvable — the GitHub PR/comment/check page, or the Slack thread —
|
|
18871
|
+
// computed server-side from the event payload at read time.
|
|
18872
|
+
externalUrl: external_exports.string().trim().url().nullable().default(null)
|
|
18869
18873
|
});
|
|
18870
18874
|
SessionUiMessageRecordSchema = external_exports.object({
|
|
18871
18875
|
id: external_exports.string().trim().min(1),
|
|
@@ -19022,6 +19026,43 @@ var init_pricing = __esm({
|
|
|
19022
19026
|
}
|
|
19023
19027
|
});
|
|
19024
19028
|
|
|
19029
|
+
// ../../packages/schemas/src/project-config.ts
|
|
19030
|
+
var RESOURCE_KIND_CONFIG, PROJECT_CONFIG_RESOURCE_NAME, PROJECT_CONFIG_FILE_NAME, ProjectConfigSpecSchema, ProjectConfigResourceSchema, ProjectConfigApplyRequestSchema, PROJECT_DEFAULT_AGENT_SOURCES, ProjectDefaultAgentSourceSchema, ProjectDefaultAgentSchema, UpdateProjectSettingsRequestSchema;
|
|
19031
|
+
var init_project_config = __esm({
|
|
19032
|
+
"../../packages/schemas/src/project-config.ts"() {
|
|
19033
|
+
"use strict";
|
|
19034
|
+
init_zod();
|
|
19035
|
+
init_resources();
|
|
19036
|
+
RESOURCE_KIND_CONFIG = "config";
|
|
19037
|
+
PROJECT_CONFIG_RESOURCE_NAME = "project";
|
|
19038
|
+
PROJECT_CONFIG_FILE_NAME = "config.yaml";
|
|
19039
|
+
ProjectConfigSpecSchema = external_exports.object({
|
|
19040
|
+
defaultAgent: ResourceNameSchema.optional()
|
|
19041
|
+
}).strict();
|
|
19042
|
+
ProjectConfigResourceSchema = resourceEnvelopeSchema(
|
|
19043
|
+
ProjectConfigSpecSchema
|
|
19044
|
+
);
|
|
19045
|
+
ProjectConfigApplyRequestSchema = resourceApplySchema(
|
|
19046
|
+
ProjectConfigSpecSchema
|
|
19047
|
+
);
|
|
19048
|
+
PROJECT_DEFAULT_AGENT_SOURCES = [
|
|
19049
|
+
"config",
|
|
19050
|
+
"setting",
|
|
19051
|
+
"first_agent"
|
|
19052
|
+
];
|
|
19053
|
+
ProjectDefaultAgentSourceSchema = external_exports.enum(
|
|
19054
|
+
PROJECT_DEFAULT_AGENT_SOURCES
|
|
19055
|
+
);
|
|
19056
|
+
ProjectDefaultAgentSchema = external_exports.object({
|
|
19057
|
+
agentName: ResourceNameSchema,
|
|
19058
|
+
source: ProjectDefaultAgentSourceSchema
|
|
19059
|
+
});
|
|
19060
|
+
UpdateProjectSettingsRequestSchema = external_exports.object({
|
|
19061
|
+
defaultAgentName: ResourceNameSchema.nullable()
|
|
19062
|
+
}).strict();
|
|
19063
|
+
}
|
|
19064
|
+
});
|
|
19065
|
+
|
|
19025
19066
|
// ../../packages/schemas/src/project-service-accounts.ts
|
|
19026
19067
|
var ProjectServiceAccountSchema, ProjectServiceAccountCreateRequestSchema, ProjectServiceAccountUpdateRequestSchema, ProjectServiceAccountTokenResponseSchema, ProjectServiceAccountUpdateResponseSchema, ProjectServiceAccountRemoveResponseSchema, ProjectServiceAccountListResponseSchema;
|
|
19027
19068
|
var init_project_service_accounts = __esm({
|
|
@@ -19067,7 +19108,7 @@ var init_project_service_accounts = __esm({
|
|
|
19067
19108
|
function projectApplyBundleStorageKey(sha256) {
|
|
19068
19109
|
return `project-apply-bundles/${sha256}.json`;
|
|
19069
19110
|
}
|
|
19070
|
-
var EnvironmentApplyDocumentSchema, IdentityApplyDocumentSchema, AgentApplyDocumentSchema, ProjectApplyResourceSchema, PROJECT_RESOURCE_APPLY_ORDER, PROJECT_RESOURCE_KINDS, PROJECT_APPLY_RESOURCE_KINDS, PROJECT_APPLY_BUNDLE_VERSION, MAX_PROJECT_APPLY_BUNDLE_BYTES, PROJECT_APPLY_BUNDLE_CONTENT_TYPE, ProjectDeleteResourceBaseSchema, ProjectDeleteResourceSchema, AVATAR_ASSET_CONTENT_TYPES, MAX_AVATAR_ASSET_BASE64_LENGTH, ProjectApplyAssetSchema, ProjectApplyAssetsSchema, AvatarAssetUploadResponseSchema, ApplyBundlePathSchema, ProjectApplyBundleFileSchema, ProjectApplyBundleSchema, ProjectApplyBundleRefSchema, ProjectApplyBundleUploadRequestSchema, ProjectApplyBundleUploadResponseSchema, ProjectApplyBundleDirectoryEntrypointSchema, ProjectApplyBundleFileEntrypointSchema, ProjectApplyBundleEntrypointSchema, ProjectApplySourceSchema, ProjectApplySourceRequestSchema, ProjectApplyRequestSchema, ProjectApplySystemConfigSchema, ProjectAppliedResourceSchema, ProjectApplyDiagnosticSchema, ProjectApplyResponsePrunedSchema, ProjectApplyPlanDiffSchema, ProjectApplyResponseSchema, ProjectResourceApplyResultSchema, ProjectResourceApplyAuditActionSchema, ProjectResourceApplyOperationIdSchema, ProjectResourceApplyTriggerArtifactSchema, ProjectResourceApplyWorkflowErrorSchema, ProjectResourceApplyWorkflowInputSchema, ProjectResourceApplyWorkflowResultSchema;
|
|
19111
|
+
var EnvironmentApplyDocumentSchema, IdentityApplyDocumentSchema, AgentApplyDocumentSchema, ConfigApplyDocumentSchema, ProjectApplyResourceSchema, PROJECT_RESOURCE_APPLY_ORDER, PROJECT_RESOURCE_KINDS, PROJECT_APPLY_RESOURCE_KINDS, PROJECT_APPLY_BUNDLE_VERSION, MAX_PROJECT_APPLY_BUNDLE_BYTES, PROJECT_APPLY_BUNDLE_CONTENT_TYPE, ProjectDeleteResourceBaseSchema, ProjectDeleteResourceSchema, AVATAR_ASSET_CONTENT_TYPES, MAX_AVATAR_ASSET_BASE64_LENGTH, ProjectApplyAssetSchema, ProjectApplyAssetsSchema, AvatarAssetUploadResponseSchema, ApplyBundlePathSchema, ProjectApplyBundleFileSchema, ProjectApplyBundleSchema, ProjectApplyBundleRefSchema, ProjectApplyBundleUploadRequestSchema, ProjectApplyBundleUploadResponseSchema, ProjectApplyBundleDirectoryEntrypointSchema, ProjectApplyBundleFileEntrypointSchema, ProjectApplyBundleEntrypointSchema, ProjectApplySourceSchema, ProjectApplySourceRequestSchema, ProjectApplyRequestSchema, ProjectApplySystemConfigSchema, ProjectAppliedResourceSchema, ProjectApplyDiagnosticSchema, ProjectApplyResponsePrunedSchema, ProjectApplyPlanDiffSchema, ProjectApplyResponseSchema, ProjectResourceApplyResultSchema, ProjectResourceApplyAuditActionSchema, ProjectResourceApplyOperationIdSchema, ProjectResourceApplyTriggerArtifactSchema, ProjectResourceApplyWorkflowErrorSchema, ProjectResourceApplyWorkflowInputSchema, ProjectResourceApplyWorkflowResultSchema;
|
|
19071
19112
|
var init_project_resources = __esm({
|
|
19072
19113
|
"../../packages/schemas/src/project-resources.ts"() {
|
|
19073
19114
|
"use strict";
|
|
@@ -19079,6 +19120,7 @@ var init_project_resources = __esm({
|
|
|
19079
19120
|
init_identities();
|
|
19080
19121
|
init_ids();
|
|
19081
19122
|
init_primitives();
|
|
19123
|
+
init_project_config();
|
|
19082
19124
|
init_resources();
|
|
19083
19125
|
init_trigger_router();
|
|
19084
19126
|
EnvironmentApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
@@ -19093,22 +19135,29 @@ var init_project_resources = __esm({
|
|
|
19093
19135
|
RESOURCE_KIND_AGENT,
|
|
19094
19136
|
AgentApplyRequestSchema.shape.spec
|
|
19095
19137
|
);
|
|
19138
|
+
ConfigApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
19139
|
+
RESOURCE_KIND_CONFIG,
|
|
19140
|
+
ProjectConfigApplyRequestSchema.shape.spec
|
|
19141
|
+
);
|
|
19096
19142
|
ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
|
|
19097
19143
|
EnvironmentApplyDocumentSchema,
|
|
19098
19144
|
IdentityApplyDocumentSchema,
|
|
19099
|
-
AgentApplyDocumentSchema
|
|
19145
|
+
AgentApplyDocumentSchema,
|
|
19146
|
+
ConfigApplyDocumentSchema
|
|
19100
19147
|
]);
|
|
19101
19148
|
PROJECT_RESOURCE_APPLY_ORDER = [
|
|
19102
19149
|
RESOURCE_KIND_CONNECTION,
|
|
19103
19150
|
RESOURCE_KIND_IDENTITY,
|
|
19104
19151
|
RESOURCE_KIND_ENVIRONMENT,
|
|
19105
|
-
RESOURCE_KIND_AGENT
|
|
19152
|
+
RESOURCE_KIND_AGENT,
|
|
19153
|
+
RESOURCE_KIND_CONFIG
|
|
19106
19154
|
];
|
|
19107
19155
|
PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
19108
19156
|
PROJECT_APPLY_RESOURCE_KINDS = [
|
|
19109
19157
|
RESOURCE_KIND_IDENTITY,
|
|
19110
19158
|
RESOURCE_KIND_ENVIRONMENT,
|
|
19111
|
-
RESOURCE_KIND_AGENT
|
|
19159
|
+
RESOURCE_KIND_AGENT,
|
|
19160
|
+
RESOURCE_KIND_CONFIG
|
|
19112
19161
|
];
|
|
19113
19162
|
PROJECT_APPLY_BUNDLE_VERSION = 1;
|
|
19114
19163
|
MAX_PROJECT_APPLY_BUNDLE_BYTES = 64 * 1024 * 1024;
|
|
@@ -19216,7 +19265,8 @@ var init_project_resources = __esm({
|
|
|
19216
19265
|
ProjectConnectionAllocationResourceSchema,
|
|
19217
19266
|
EnvironmentResourceSchema,
|
|
19218
19267
|
IdentityResourceSchema,
|
|
19219
|
-
AgentResourceSchema
|
|
19268
|
+
AgentResourceSchema,
|
|
19269
|
+
ProjectConfigResourceSchema
|
|
19220
19270
|
]);
|
|
19221
19271
|
ProjectApplyDiagnosticSchema = external_exports.object({
|
|
19222
19272
|
// "info" is a non-blocking advisory (e.g. template-push capability/override
|
|
@@ -19231,7 +19281,8 @@ var init_project_resources = __esm({
|
|
|
19231
19281
|
RESOURCE_KIND_CONNECTION,
|
|
19232
19282
|
RESOURCE_KIND_ENVIRONMENT,
|
|
19233
19283
|
RESOURCE_KIND_IDENTITY,
|
|
19234
|
-
RESOURCE_KIND_AGENT
|
|
19284
|
+
RESOURCE_KIND_AGENT,
|
|
19285
|
+
RESOURCE_KIND_CONFIG
|
|
19235
19286
|
]),
|
|
19236
19287
|
name: external_exports.string().min(1)
|
|
19237
19288
|
});
|
|
@@ -22772,6 +22823,7 @@ var init_src = __esm({
|
|
|
22772
22823
|
init_mounts();
|
|
22773
22824
|
init_pricing();
|
|
22774
22825
|
init_provider_grants();
|
|
22826
|
+
init_project_config();
|
|
22775
22827
|
init_project_service_accounts();
|
|
22776
22828
|
init_project_resources();
|
|
22777
22829
|
init_primitives();
|
|
@@ -25527,7 +25579,7 @@ var init_package = __esm({
|
|
|
25527
25579
|
"package.json"() {
|
|
25528
25580
|
package_default = {
|
|
25529
25581
|
name: "@autohq/cli",
|
|
25530
|
-
version: "0.1.
|
|
25582
|
+
version: "0.1.307",
|
|
25531
25583
|
license: "SEE LICENSE IN README.md",
|
|
25532
25584
|
publishConfig: {
|
|
25533
25585
|
access: "public"
|
|
@@ -27397,7 +27449,7 @@ function mcpOAuthAgentToolConnectionsFromAppliedResources(resources) {
|
|
|
27397
27449
|
});
|
|
27398
27450
|
}
|
|
27399
27451
|
function isProjectApplyResourceKind(kind) {
|
|
27400
|
-
return kind === RESOURCE_KIND_CONNECTION || kind === RESOURCE_KIND_IDENTITY || kind === RESOURCE_KIND_ENVIRONMENT || kind === RESOURCE_KIND_AGENT;
|
|
27452
|
+
return kind === RESOURCE_KIND_CONNECTION || kind === RESOURCE_KIND_IDENTITY || kind === RESOURCE_KIND_ENVIRONMENT || kind === RESOURCE_KIND_AGENT || kind === RESOURCE_KIND_CONFIG;
|
|
27401
27453
|
}
|
|
27402
27454
|
function applyResourceKindError(request, response, plannedResources, index) {
|
|
27403
27455
|
const planLabels = plannedResources.map(
|
|
@@ -27445,6 +27497,7 @@ var init_apply_result = __esm({
|
|
|
27445
27497
|
init_connections();
|
|
27446
27498
|
init_environments();
|
|
27447
27499
|
init_identities();
|
|
27500
|
+
init_project_config();
|
|
27448
27501
|
}
|
|
27449
27502
|
});
|
|
27450
27503
|
|
|
@@ -27663,8 +27716,12 @@ function readProjectApplyDirectorySource(input) {
|
|
|
27663
27716
|
}))
|
|
27664
27717
|
);
|
|
27665
27718
|
}
|
|
27666
|
-
const
|
|
27667
|
-
|
|
27719
|
+
const configResource = readProjectConfigResource(input.files, resourceRoot);
|
|
27720
|
+
const resources = [
|
|
27721
|
+
...dedupeGeneratedResources(resourceRecords),
|
|
27722
|
+
...configResource ? [configResource] : []
|
|
27723
|
+
];
|
|
27724
|
+
if (agentFiles.length === 0 && !configResource && !input.allowEmpty) {
|
|
27668
27725
|
throw new Error(input.emptyMessage ?? "No resource files found");
|
|
27669
27726
|
}
|
|
27670
27727
|
return ProjectApplyRequestSchema.parse({
|
|
@@ -27707,6 +27764,42 @@ function readProjectApplyDocumentSourceFile(file2, options = {}) {
|
|
|
27707
27764
|
assets: {}
|
|
27708
27765
|
});
|
|
27709
27766
|
}
|
|
27767
|
+
function readProjectConfigResource(files, resourceRoot) {
|
|
27768
|
+
const configPaths = new Set(
|
|
27769
|
+
["config.yaml", "config.yml"].map(
|
|
27770
|
+
(name) => sourcePathJoin(resourceRoot, name)
|
|
27771
|
+
)
|
|
27772
|
+
);
|
|
27773
|
+
const configFiles = files.filter(
|
|
27774
|
+
(file3) => configPaths.has(normalizeSourcePath(file3.path))
|
|
27775
|
+
);
|
|
27776
|
+
if (configFiles.length === 0) {
|
|
27777
|
+
return void 0;
|
|
27778
|
+
}
|
|
27779
|
+
if (configFiles.length > 1) {
|
|
27780
|
+
throw new Error(
|
|
27781
|
+
`Multiple project config files found: ${configFiles.map((file3) => file3.path).join(", ")}. Keep exactly one ${PROJECT_CONFIG_FILE_NAME}.`
|
|
27782
|
+
);
|
|
27783
|
+
}
|
|
27784
|
+
const file2 = configFiles[0];
|
|
27785
|
+
const documents = readDocumentsFromSource(file2);
|
|
27786
|
+
if (documents.length > 1) {
|
|
27787
|
+
throw new Error(
|
|
27788
|
+
`Invalid project config ${file2.path}: expected a single document`
|
|
27789
|
+
);
|
|
27790
|
+
}
|
|
27791
|
+
const parsed = ProjectConfigSpecSchema.safeParse(documents[0] ?? {});
|
|
27792
|
+
if (!parsed.success) {
|
|
27793
|
+
throw new Error(
|
|
27794
|
+
`Invalid project config ${file2.path}: ${parsed.error.message}`
|
|
27795
|
+
);
|
|
27796
|
+
}
|
|
27797
|
+
return {
|
|
27798
|
+
kind: RESOURCE_KIND_CONFIG,
|
|
27799
|
+
metadata: { name: PROJECT_CONFIG_RESOURCE_NAME },
|
|
27800
|
+
spec: parsed.data
|
|
27801
|
+
};
|
|
27802
|
+
}
|
|
27710
27803
|
function assertNoLegacySessionSourceFiles(files, resourceRoot, displayResourceRoot2) {
|
|
27711
27804
|
const legacyFiles = files.filter(
|
|
27712
27805
|
(file2) => isResourceFileUnderDirectory(
|
|
@@ -27781,6 +27874,7 @@ var init_project_apply_files = __esm({
|
|
|
27781
27874
|
init_agents();
|
|
27782
27875
|
init_environments();
|
|
27783
27876
|
init_identities();
|
|
27877
|
+
init_project_config();
|
|
27784
27878
|
init_project_resources();
|
|
27785
27879
|
init_templates();
|
|
27786
27880
|
init_agent_authoring();
|