@autohq/cli 0.1.572 → 0.1.574
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 +234 -179
- package/dist/index.js +614 -190
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30880,7 +30880,7 @@ Object.assign(lookup, {
|
|
|
30880
30880
|
// package.json
|
|
30881
30881
|
var package_default = {
|
|
30882
30882
|
name: "@autohq/cli",
|
|
30883
|
-
version: "0.1.
|
|
30883
|
+
version: "0.1.574",
|
|
30884
30884
|
license: "SEE LICENSE IN README.md",
|
|
30885
30885
|
publishConfig: {
|
|
30886
30886
|
access: "public"
|
|
@@ -32327,39 +32327,54 @@ var ChatReactionEventPayloadSchema = external_exports.object({
|
|
|
32327
32327
|
});
|
|
32328
32328
|
var ChatMessageContentSchema = external_exports.string().trim().min(1).or(external_exports.object({ markdown: external_exports.string().trim().min(1) })).or(external_exports.object({ raw: external_exports.string().trim().min(1) }));
|
|
32329
32329
|
var ChatThreadSelectorSchema = external_exports.literal("current").or(external_exports.string().trim().min(1));
|
|
32330
|
-
var
|
|
32331
|
-
|
|
32330
|
+
var ChatThreadDestinationFields = {
|
|
32331
|
+
thread: ChatThreadSelectorSchema.optional().describe(
|
|
32332
|
+
"Thread target, including a provider-prefixed threadId returned by chat.send."
|
|
32333
|
+
),
|
|
32334
|
+
threadId: ChatThreadSelectorSchema.optional().describe(
|
|
32335
|
+
"Alias for thread so a chat.send result can be reused directly. If both are supplied, they must match."
|
|
32336
|
+
)
|
|
32337
|
+
};
|
|
32338
|
+
var SlackChatDestinationFields = {
|
|
32332
32339
|
workspace: external_exports.string().trim().min(1).optional(),
|
|
32333
|
-
channel: external_exports.string().trim().min(1).optional()
|
|
32334
|
-
|
|
32335
|
-
|
|
32336
|
-
var LinearChatDestinationSchema = external_exports.object({
|
|
32337
|
-
provider: external_exports.literal("linear"),
|
|
32340
|
+
channel: external_exports.string().trim().min(1).optional()
|
|
32341
|
+
};
|
|
32342
|
+
var LinearChatDestinationFields = {
|
|
32338
32343
|
workspace: external_exports.string().trim().min(1).optional(),
|
|
32339
32344
|
team: external_exports.string().trim().min(1).optional(),
|
|
32340
|
-
issue: external_exports.string().trim().min(1).optional()
|
|
32341
|
-
|
|
32342
|
-
|
|
32343
|
-
var TelegramChatDestinationSchema = external_exports.object({
|
|
32344
|
-
provider: external_exports.literal("telegram"),
|
|
32345
|
+
issue: external_exports.string().trim().min(1).optional()
|
|
32346
|
+
};
|
|
32347
|
+
var TelegramChatDestinationFields = {
|
|
32345
32348
|
/** The Telegram connection (manager-bot grant) name. */
|
|
32346
32349
|
workspace: external_exports.string().trim().min(1).optional(),
|
|
32347
32350
|
/** A Telegram chat id (e.g. "-1001234") or a known group/channel title. */
|
|
32348
|
-
channel: external_exports.string().trim().min(1).optional()
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
var DiscordChatDestinationSchema = external_exports.object({
|
|
32352
|
-
provider: external_exports.literal("discord"),
|
|
32351
|
+
channel: external_exports.string().trim().min(1).optional()
|
|
32352
|
+
};
|
|
32353
|
+
var DiscordChatDestinationFields = {
|
|
32353
32354
|
/** The Discord connection name or installed guild (server) name. */
|
|
32354
32355
|
workspace: external_exports.string().trim().min(1).optional(),
|
|
32355
32356
|
/** A Discord channel id (snowflake) or a guild channel name (e.g. "#general"). */
|
|
32356
|
-
channel: external_exports.string().trim().min(1).optional()
|
|
32357
|
-
|
|
32358
|
-
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
32362
|
-
|
|
32357
|
+
channel: external_exports.string().trim().min(1).optional()
|
|
32358
|
+
};
|
|
32359
|
+
var SlackChatDestinationSchema = chatDestinationSchema({
|
|
32360
|
+
provider: external_exports.literal("slack"),
|
|
32361
|
+
...SlackChatDestinationFields,
|
|
32362
|
+
...ChatThreadDestinationFields
|
|
32363
|
+
});
|
|
32364
|
+
var LinearChatDestinationSchema = chatDestinationSchema({
|
|
32365
|
+
provider: external_exports.literal("linear"),
|
|
32366
|
+
...LinearChatDestinationFields,
|
|
32367
|
+
...ChatThreadDestinationFields
|
|
32368
|
+
});
|
|
32369
|
+
var TelegramChatDestinationSchema = chatDestinationSchema({
|
|
32370
|
+
provider: external_exports.literal("telegram"),
|
|
32371
|
+
...TelegramChatDestinationFields,
|
|
32372
|
+
...ChatThreadDestinationFields
|
|
32373
|
+
});
|
|
32374
|
+
var DiscordChatDestinationSchema = chatDestinationSchema({
|
|
32375
|
+
provider: external_exports.literal("discord"),
|
|
32376
|
+
...DiscordChatDestinationFields,
|
|
32377
|
+
...ChatThreadDestinationFields
|
|
32363
32378
|
});
|
|
32364
32379
|
var ChatDestinationSchema = external_exports.discriminatedUnion("provider", [
|
|
32365
32380
|
SlackChatDestinationSchema,
|
|
@@ -32417,25 +32432,33 @@ var ChatRecipientSchema = external_exports.discriminatedUnion("provider", [
|
|
|
32417
32432
|
]);
|
|
32418
32433
|
var SlackChatAddressSchema = external_exports.object({
|
|
32419
32434
|
provider: external_exports.literal("slack"),
|
|
32420
|
-
destination:
|
|
32435
|
+
destination: chatDestinationSchema({
|
|
32436
|
+
...SlackChatDestinationFields,
|
|
32437
|
+
...ChatThreadDestinationFields
|
|
32438
|
+
}).optional(),
|
|
32421
32439
|
to: SlackChatRecipientSchema.optional()
|
|
32422
32440
|
});
|
|
32423
32441
|
var LinearChatAddressSchema = external_exports.object({
|
|
32424
32442
|
provider: external_exports.literal("linear"),
|
|
32425
|
-
destination:
|
|
32443
|
+
destination: chatDestinationSchema({
|
|
32444
|
+
...LinearChatDestinationFields,
|
|
32445
|
+
...ChatThreadDestinationFields
|
|
32446
|
+
}).optional(),
|
|
32426
32447
|
to: LinearChatRecipientSchema.optional()
|
|
32427
32448
|
});
|
|
32428
32449
|
var TelegramChatAddressSchema = external_exports.object({
|
|
32429
32450
|
provider: external_exports.literal("telegram"),
|
|
32430
|
-
destination:
|
|
32431
|
-
|
|
32451
|
+
destination: chatDestinationSchema({
|
|
32452
|
+
...TelegramChatDestinationFields,
|
|
32453
|
+
...ChatThreadDestinationFields
|
|
32432
32454
|
}).optional(),
|
|
32433
32455
|
to: TelegramChatRecipientSchema.optional()
|
|
32434
32456
|
});
|
|
32435
32457
|
var DiscordChatAddressSchema = external_exports.object({
|
|
32436
32458
|
provider: external_exports.literal("discord"),
|
|
32437
|
-
destination:
|
|
32438
|
-
|
|
32459
|
+
destination: chatDestinationSchema({
|
|
32460
|
+
...DiscordChatDestinationFields,
|
|
32461
|
+
...ChatThreadDestinationFields
|
|
32439
32462
|
}).optional(),
|
|
32440
32463
|
to: DiscordChatRecipientSchema.optional()
|
|
32441
32464
|
});
|
|
@@ -32721,6 +32744,25 @@ var ChatSearchToolOutputSchema = external_exports.object({
|
|
|
32721
32744
|
results: external_exports.array(ChatSearchResultSchema),
|
|
32722
32745
|
warnings: external_exports.array(external_exports.string().trim().min(1)).default([])
|
|
32723
32746
|
});
|
|
32747
|
+
function chatDestinationSchema(shape) {
|
|
32748
|
+
return external_exports.object(shape).superRefine((destination, context) => {
|
|
32749
|
+
const aliasedDestination = destination;
|
|
32750
|
+
if (aliasedDestination.thread !== void 0 && aliasedDestination.threadId !== void 0 && aliasedDestination.thread !== aliasedDestination.threadId) {
|
|
32751
|
+
context.addIssue({
|
|
32752
|
+
code: "custom",
|
|
32753
|
+
path: ["threadId"],
|
|
32754
|
+
message: "destination.thread and destination.threadId must match when both are provided"
|
|
32755
|
+
});
|
|
32756
|
+
}
|
|
32757
|
+
}).overwrite((parsedDestination) => {
|
|
32758
|
+
const aliasedDestination = parsedDestination;
|
|
32759
|
+
const { threadId, ...destination } = aliasedDestination;
|
|
32760
|
+
return {
|
|
32761
|
+
...destination,
|
|
32762
|
+
...destination.thread === void 0 && threadId !== void 0 ? { thread: threadId } : {}
|
|
32763
|
+
};
|
|
32764
|
+
});
|
|
32765
|
+
}
|
|
32724
32766
|
|
|
32725
32767
|
// ../../packages/schemas/src/chatgpt-codex.ts
|
|
32726
32768
|
var CHATGPT_CODEX_BACKEND_BASE_URL = "https://chatgpt.com/backend-api/codex";
|
|
@@ -34373,6 +34415,150 @@ var ConnectionRemoveResponseSchema = external_exports.object({
|
|
|
34373
34415
|
message: external_exports.string().trim().min(1)
|
|
34374
34416
|
});
|
|
34375
34417
|
|
|
34418
|
+
// ../../packages/schemas/src/mounts.ts
|
|
34419
|
+
var AbsoluteMountPathSchema = external_exports.string().trim().min(1).refine((value2) => value2.startsWith("/"), {
|
|
34420
|
+
message: "Mount paths must be absolute"
|
|
34421
|
+
});
|
|
34422
|
+
var GITHUB_MOUNT_CAPABILITY_LEVELS = [
|
|
34423
|
+
"none",
|
|
34424
|
+
"read",
|
|
34425
|
+
"write"
|
|
34426
|
+
];
|
|
34427
|
+
var GithubMountCapabilityLevelSchema = external_exports.enum(
|
|
34428
|
+
GITHUB_MOUNT_CAPABILITY_LEVELS
|
|
34429
|
+
);
|
|
34430
|
+
var GithubMountCapabilitySchema = external_exports.union([
|
|
34431
|
+
GithubMountCapabilityLevelSchema,
|
|
34432
|
+
external_exports.object({
|
|
34433
|
+
level: GithubMountCapabilityLevelSchema,
|
|
34434
|
+
unattributed: GithubMountCapabilityLevelSchema
|
|
34435
|
+
}).strict().superRefine((capability, context) => {
|
|
34436
|
+
if (!capabilityLevelAtMost({
|
|
34437
|
+
floor: capability.unattributed,
|
|
34438
|
+
grant: capability.level,
|
|
34439
|
+
levels: GITHUB_MOUNT_CAPABILITY_LEVELS
|
|
34440
|
+
})) {
|
|
34441
|
+
context.addIssue({
|
|
34442
|
+
code: external_exports.ZodIssueCode.custom,
|
|
34443
|
+
message: "unattributed capability level must not exceed level",
|
|
34444
|
+
path: ["unattributed"]
|
|
34445
|
+
});
|
|
34446
|
+
}
|
|
34447
|
+
})
|
|
34448
|
+
]);
|
|
34449
|
+
var GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS = ["none", "write"];
|
|
34450
|
+
var GithubMountMergeCapabilityLevelSchema = external_exports.enum(
|
|
34451
|
+
GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS
|
|
34452
|
+
);
|
|
34453
|
+
var GithubMountMergeCapabilitySchema = external_exports.union([
|
|
34454
|
+
GithubMountMergeCapabilityLevelSchema,
|
|
34455
|
+
external_exports.object({
|
|
34456
|
+
level: GithubMountMergeCapabilityLevelSchema,
|
|
34457
|
+
unattributed: GithubMountMergeCapabilityLevelSchema
|
|
34458
|
+
}).strict().superRefine((capability, context) => {
|
|
34459
|
+
if (!capabilityLevelAtMost({
|
|
34460
|
+
floor: capability.unattributed,
|
|
34461
|
+
grant: capability.level,
|
|
34462
|
+
levels: GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS
|
|
34463
|
+
})) {
|
|
34464
|
+
context.addIssue({
|
|
34465
|
+
code: external_exports.ZodIssueCode.custom,
|
|
34466
|
+
message: "unattributed capability level must not exceed level",
|
|
34467
|
+
path: ["unattributed"]
|
|
34468
|
+
});
|
|
34469
|
+
}
|
|
34470
|
+
})
|
|
34471
|
+
]);
|
|
34472
|
+
var DEFAULT_GITHUB_MOUNT_CAPABILITIES = {
|
|
34473
|
+
contents: "write",
|
|
34474
|
+
pullRequests: "write",
|
|
34475
|
+
issues: "write",
|
|
34476
|
+
checks: "read",
|
|
34477
|
+
actions: "read",
|
|
34478
|
+
workflows: "none",
|
|
34479
|
+
secrets: "none",
|
|
34480
|
+
merge: "none"
|
|
34481
|
+
};
|
|
34482
|
+
var GitMountAuthSchema = external_exports.discriminatedUnion("kind", [
|
|
34483
|
+
external_exports.object({
|
|
34484
|
+
kind: external_exports.literal("none")
|
|
34485
|
+
}),
|
|
34486
|
+
external_exports.object({
|
|
34487
|
+
kind: external_exports.literal("githubApp"),
|
|
34488
|
+
installationId: external_exports.string().trim().min(1).optional(),
|
|
34489
|
+
commitAuthor: external_exports.object({
|
|
34490
|
+
name: external_exports.string().trim().min(1),
|
|
34491
|
+
email: external_exports.string().trim().min(1).refine((value2) => value2.includes("@"), {
|
|
34492
|
+
message: "Git commit author email must contain @"
|
|
34493
|
+
})
|
|
34494
|
+
}).optional(),
|
|
34495
|
+
capabilities: external_exports.object({
|
|
34496
|
+
contents: GithubMountCapabilitySchema.default("write"),
|
|
34497
|
+
pullRequests: GithubMountCapabilitySchema.default("write"),
|
|
34498
|
+
issues: GithubMountCapabilitySchema.default("write"),
|
|
34499
|
+
checks: GithubMountCapabilitySchema.default("read"),
|
|
34500
|
+
actions: GithubMountCapabilitySchema.default("read"),
|
|
34501
|
+
workflows: GithubMountCapabilitySchema.default("none"),
|
|
34502
|
+
// Grants the GitHub Actions secrets API (repository and environment
|
|
34503
|
+
// secrets). Secret values are write-only on GitHub's side; read grants
|
|
34504
|
+
// listing secret names, never values.
|
|
34505
|
+
secrets: GithubMountCapabilitySchema.default("none"),
|
|
34506
|
+
merge: GithubMountMergeCapabilitySchema.default("none")
|
|
34507
|
+
}).strict().superRefine((capabilities, context) => {
|
|
34508
|
+
if (grantedCapabilityLevel(capabilities.merge) === "write" && (grantedCapabilityLevel(capabilities.contents) !== "write" || grantedCapabilityLevel(capabilities.pullRequests) !== "write")) {
|
|
34509
|
+
context.addIssue({
|
|
34510
|
+
code: external_exports.ZodIssueCode.custom,
|
|
34511
|
+
message: "merge: write requires contents: write and pullRequests: write",
|
|
34512
|
+
path: ["merge"]
|
|
34513
|
+
});
|
|
34514
|
+
}
|
|
34515
|
+
const unattributed = effectiveGithubMountCapabilities(
|
|
34516
|
+
capabilities,
|
|
34517
|
+
false
|
|
34518
|
+
);
|
|
34519
|
+
if (unattributed.merge === "write" && (unattributed.contents !== "write" || unattributed.pullRequests !== "write")) {
|
|
34520
|
+
context.addIssue({
|
|
34521
|
+
code: external_exports.ZodIssueCode.custom,
|
|
34522
|
+
message: "unattributed merge: write requires unattributed contents: write and pullRequests: write",
|
|
34523
|
+
path: ["merge"]
|
|
34524
|
+
});
|
|
34525
|
+
}
|
|
34526
|
+
}).default({ ...DEFAULT_GITHUB_MOUNT_CAPABILITIES })
|
|
34527
|
+
})
|
|
34528
|
+
]);
|
|
34529
|
+
var GitMountSchema = external_exports.object({
|
|
34530
|
+
kind: external_exports.literal("git"),
|
|
34531
|
+
repository: external_exports.string().trim().min(1),
|
|
34532
|
+
mountPath: AbsoluteMountPathSchema,
|
|
34533
|
+
ref: external_exports.string().trim().min(1).optional(),
|
|
34534
|
+
depth: external_exports.number().int().positive().optional(),
|
|
34535
|
+
auth: GitMountAuthSchema.default({
|
|
34536
|
+
kind: "none"
|
|
34537
|
+
})
|
|
34538
|
+
});
|
|
34539
|
+
var AgentMountSchema = external_exports.discriminatedUnion("kind", [GitMountSchema]);
|
|
34540
|
+
function effectiveGithubMountCapabilities(capabilities, requesterEligible) {
|
|
34541
|
+
return {
|
|
34542
|
+
actions: effectiveCapabilityLevel(capabilities.actions, requesterEligible),
|
|
34543
|
+
checks: effectiveCapabilityLevel(capabilities.checks, requesterEligible),
|
|
34544
|
+
contents: effectiveCapabilityLevel(
|
|
34545
|
+
capabilities.contents,
|
|
34546
|
+
requesterEligible
|
|
34547
|
+
),
|
|
34548
|
+
issues: effectiveCapabilityLevel(capabilities.issues, requesterEligible),
|
|
34549
|
+
merge: effectiveCapabilityLevel(capabilities.merge, requesterEligible),
|
|
34550
|
+
pullRequests: effectiveCapabilityLevel(
|
|
34551
|
+
capabilities.pullRequests,
|
|
34552
|
+
requesterEligible
|
|
34553
|
+
),
|
|
34554
|
+
secrets: effectiveCapabilityLevel(capabilities.secrets, requesterEligible),
|
|
34555
|
+
workflows: effectiveCapabilityLevel(
|
|
34556
|
+
capabilities.workflows,
|
|
34557
|
+
requesterEligible
|
|
34558
|
+
)
|
|
34559
|
+
};
|
|
34560
|
+
}
|
|
34561
|
+
|
|
34376
34562
|
// ../../packages/schemas/src/default-agent.ts
|
|
34377
34563
|
var BUILT_IN_DEFAULT_AGENT_TEMPLATE_NAME = "@auto/default";
|
|
34378
34564
|
var BUILT_IN_DEFAULT_AGENT_TEMPLATE_VERSION = "1.2.0";
|
|
@@ -34708,150 +34894,6 @@ var githubMcpActionsWriteToolSet = new Set(
|
|
|
34708
34894
|
GITHUB_MCP_ACTIONS_WRITE_TOOLS
|
|
34709
34895
|
);
|
|
34710
34896
|
|
|
34711
|
-
// ../../packages/schemas/src/mounts.ts
|
|
34712
|
-
var AbsoluteMountPathSchema = external_exports.string().trim().min(1).refine((value2) => value2.startsWith("/"), {
|
|
34713
|
-
message: "Mount paths must be absolute"
|
|
34714
|
-
});
|
|
34715
|
-
var GITHUB_MOUNT_CAPABILITY_LEVELS = [
|
|
34716
|
-
"none",
|
|
34717
|
-
"read",
|
|
34718
|
-
"write"
|
|
34719
|
-
];
|
|
34720
|
-
var GithubMountCapabilityLevelSchema = external_exports.enum(
|
|
34721
|
-
GITHUB_MOUNT_CAPABILITY_LEVELS
|
|
34722
|
-
);
|
|
34723
|
-
var GithubMountCapabilitySchema = external_exports.union([
|
|
34724
|
-
GithubMountCapabilityLevelSchema,
|
|
34725
|
-
external_exports.object({
|
|
34726
|
-
level: GithubMountCapabilityLevelSchema,
|
|
34727
|
-
unattributed: GithubMountCapabilityLevelSchema
|
|
34728
|
-
}).strict().superRefine((capability, context) => {
|
|
34729
|
-
if (!capabilityLevelAtMost({
|
|
34730
|
-
floor: capability.unattributed,
|
|
34731
|
-
grant: capability.level,
|
|
34732
|
-
levels: GITHUB_MOUNT_CAPABILITY_LEVELS
|
|
34733
|
-
})) {
|
|
34734
|
-
context.addIssue({
|
|
34735
|
-
code: external_exports.ZodIssueCode.custom,
|
|
34736
|
-
message: "unattributed capability level must not exceed level",
|
|
34737
|
-
path: ["unattributed"]
|
|
34738
|
-
});
|
|
34739
|
-
}
|
|
34740
|
-
})
|
|
34741
|
-
]);
|
|
34742
|
-
var GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS = ["none", "write"];
|
|
34743
|
-
var GithubMountMergeCapabilityLevelSchema = external_exports.enum(
|
|
34744
|
-
GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS
|
|
34745
|
-
);
|
|
34746
|
-
var GithubMountMergeCapabilitySchema = external_exports.union([
|
|
34747
|
-
GithubMountMergeCapabilityLevelSchema,
|
|
34748
|
-
external_exports.object({
|
|
34749
|
-
level: GithubMountMergeCapabilityLevelSchema,
|
|
34750
|
-
unattributed: GithubMountMergeCapabilityLevelSchema
|
|
34751
|
-
}).strict().superRefine((capability, context) => {
|
|
34752
|
-
if (!capabilityLevelAtMost({
|
|
34753
|
-
floor: capability.unattributed,
|
|
34754
|
-
grant: capability.level,
|
|
34755
|
-
levels: GITHUB_MOUNT_MERGE_CAPABILITY_LEVELS
|
|
34756
|
-
})) {
|
|
34757
|
-
context.addIssue({
|
|
34758
|
-
code: external_exports.ZodIssueCode.custom,
|
|
34759
|
-
message: "unattributed capability level must not exceed level",
|
|
34760
|
-
path: ["unattributed"]
|
|
34761
|
-
});
|
|
34762
|
-
}
|
|
34763
|
-
})
|
|
34764
|
-
]);
|
|
34765
|
-
var DEFAULT_GITHUB_MOUNT_CAPABILITIES = {
|
|
34766
|
-
contents: "write",
|
|
34767
|
-
pullRequests: "write",
|
|
34768
|
-
issues: "write",
|
|
34769
|
-
checks: "read",
|
|
34770
|
-
actions: "read",
|
|
34771
|
-
workflows: "none",
|
|
34772
|
-
secrets: "none",
|
|
34773
|
-
merge: "none"
|
|
34774
|
-
};
|
|
34775
|
-
var GitMountAuthSchema = external_exports.discriminatedUnion("kind", [
|
|
34776
|
-
external_exports.object({
|
|
34777
|
-
kind: external_exports.literal("none")
|
|
34778
|
-
}),
|
|
34779
|
-
external_exports.object({
|
|
34780
|
-
kind: external_exports.literal("githubApp"),
|
|
34781
|
-
installationId: external_exports.string().trim().min(1).optional(),
|
|
34782
|
-
commitAuthor: external_exports.object({
|
|
34783
|
-
name: external_exports.string().trim().min(1),
|
|
34784
|
-
email: external_exports.string().trim().min(1).refine((value2) => value2.includes("@"), {
|
|
34785
|
-
message: "Git commit author email must contain @"
|
|
34786
|
-
})
|
|
34787
|
-
}).optional(),
|
|
34788
|
-
capabilities: external_exports.object({
|
|
34789
|
-
contents: GithubMountCapabilitySchema.default("write"),
|
|
34790
|
-
pullRequests: GithubMountCapabilitySchema.default("write"),
|
|
34791
|
-
issues: GithubMountCapabilitySchema.default("write"),
|
|
34792
|
-
checks: GithubMountCapabilitySchema.default("read"),
|
|
34793
|
-
actions: GithubMountCapabilitySchema.default("read"),
|
|
34794
|
-
workflows: GithubMountCapabilitySchema.default("none"),
|
|
34795
|
-
// Grants the GitHub Actions secrets API (repository and environment
|
|
34796
|
-
// secrets). Secret values are write-only on GitHub's side; read grants
|
|
34797
|
-
// listing secret names, never values.
|
|
34798
|
-
secrets: GithubMountCapabilitySchema.default("none"),
|
|
34799
|
-
merge: GithubMountMergeCapabilitySchema.default("none")
|
|
34800
|
-
}).strict().superRefine((capabilities, context) => {
|
|
34801
|
-
if (grantedCapabilityLevel(capabilities.merge) === "write" && (grantedCapabilityLevel(capabilities.contents) !== "write" || grantedCapabilityLevel(capabilities.pullRequests) !== "write")) {
|
|
34802
|
-
context.addIssue({
|
|
34803
|
-
code: external_exports.ZodIssueCode.custom,
|
|
34804
|
-
message: "merge: write requires contents: write and pullRequests: write",
|
|
34805
|
-
path: ["merge"]
|
|
34806
|
-
});
|
|
34807
|
-
}
|
|
34808
|
-
const unattributed = effectiveGithubMountCapabilities(
|
|
34809
|
-
capabilities,
|
|
34810
|
-
false
|
|
34811
|
-
);
|
|
34812
|
-
if (unattributed.merge === "write" && (unattributed.contents !== "write" || unattributed.pullRequests !== "write")) {
|
|
34813
|
-
context.addIssue({
|
|
34814
|
-
code: external_exports.ZodIssueCode.custom,
|
|
34815
|
-
message: "unattributed merge: write requires unattributed contents: write and pullRequests: write",
|
|
34816
|
-
path: ["merge"]
|
|
34817
|
-
});
|
|
34818
|
-
}
|
|
34819
|
-
}).default({ ...DEFAULT_GITHUB_MOUNT_CAPABILITIES })
|
|
34820
|
-
})
|
|
34821
|
-
]);
|
|
34822
|
-
var GitMountSchema = external_exports.object({
|
|
34823
|
-
kind: external_exports.literal("git"),
|
|
34824
|
-
repository: external_exports.string().trim().min(1),
|
|
34825
|
-
mountPath: AbsoluteMountPathSchema,
|
|
34826
|
-
ref: external_exports.string().trim().min(1).optional(),
|
|
34827
|
-
depth: external_exports.number().int().positive().optional(),
|
|
34828
|
-
auth: GitMountAuthSchema.default({
|
|
34829
|
-
kind: "none"
|
|
34830
|
-
})
|
|
34831
|
-
});
|
|
34832
|
-
var AgentMountSchema = external_exports.discriminatedUnion("kind", [GitMountSchema]);
|
|
34833
|
-
function effectiveGithubMountCapabilities(capabilities, requesterEligible) {
|
|
34834
|
-
return {
|
|
34835
|
-
actions: effectiveCapabilityLevel(capabilities.actions, requesterEligible),
|
|
34836
|
-
checks: effectiveCapabilityLevel(capabilities.checks, requesterEligible),
|
|
34837
|
-
contents: effectiveCapabilityLevel(
|
|
34838
|
-
capabilities.contents,
|
|
34839
|
-
requesterEligible
|
|
34840
|
-
),
|
|
34841
|
-
issues: effectiveCapabilityLevel(capabilities.issues, requesterEligible),
|
|
34842
|
-
merge: effectiveCapabilityLevel(capabilities.merge, requesterEligible),
|
|
34843
|
-
pullRequests: effectiveCapabilityLevel(
|
|
34844
|
-
capabilities.pullRequests,
|
|
34845
|
-
requesterEligible
|
|
34846
|
-
),
|
|
34847
|
-
secrets: effectiveCapabilityLevel(capabilities.secrets, requesterEligible),
|
|
34848
|
-
workflows: effectiveCapabilityLevel(
|
|
34849
|
-
capabilities.workflows,
|
|
34850
|
-
requesterEligible
|
|
34851
|
-
)
|
|
34852
|
-
};
|
|
34853
|
-
}
|
|
34854
|
-
|
|
34855
34897
|
// ../../packages/schemas/src/secrets.ts
|
|
34856
34898
|
var SECRET_ENCRYPTION_ALGORITHM = "AES-256-GCM";
|
|
34857
34899
|
var SecretEnvNameSchema = external_exports.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);
|
|
@@ -37451,6 +37493,7 @@ var SESSION_RUNTIME_PHASES = [
|
|
|
37451
37493
|
"running"
|
|
37452
37494
|
];
|
|
37453
37495
|
var SESSION_DISPLAY_TITLE_MAX_LENGTH = 64;
|
|
37496
|
+
var SESSION_ATTENTION_PREVIEW_MAX_LENGTH = 160;
|
|
37454
37497
|
var SESSION_MESSAGE_ROLES = ["system", "user", "assistant"];
|
|
37455
37498
|
var SESSION_MESSAGE_STATUSES = [
|
|
37456
37499
|
"in_progress",
|
|
@@ -37480,6 +37523,12 @@ var SessionCheckConclusionSchema = external_exports.enum(SESSION_CHECK_CONCLUSIO
|
|
|
37480
37523
|
var SessionCheckTimeoutPhaseSchema = external_exports.enum(
|
|
37481
37524
|
SESSION_CHECK_TIMEOUT_PHASES
|
|
37482
37525
|
);
|
|
37526
|
+
var SessionAttentionSchema = external_exports.object({
|
|
37527
|
+
kind: external_exports.literal("question"),
|
|
37528
|
+
toolCallId: external_exports.string().trim().min(1),
|
|
37529
|
+
since: external_exports.string().datetime(),
|
|
37530
|
+
preview: external_exports.string().trim().min(1).max(SESSION_ATTENTION_PREVIEW_MAX_LENGTH)
|
|
37531
|
+
});
|
|
37483
37532
|
var ManualSessionRequestSchema = external_exports.object({
|
|
37484
37533
|
message: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
37485
37534
|
harness: AgentHarnessSchema.optional(),
|
|
@@ -37548,6 +37597,9 @@ var SessionRecordSchema = external_exports.object({
|
|
|
37548
37597
|
// Defaulted, not just nullable: sessions persisted before requester shipped
|
|
37549
37598
|
// lack the key, and replay-path parsing must keep accepting them.
|
|
37550
37599
|
requester: RequesterSchema.nullable().default(null),
|
|
37600
|
+
// Optional only for persisted session.upsert payloads written before the
|
|
37601
|
+
// attention projection shipped. Canonical reads always include null.
|
|
37602
|
+
attention: SessionAttentionSchema.nullable().optional(),
|
|
37551
37603
|
// Trusted non-human origin/actor. Defaulted for legacy session.upsert
|
|
37552
37604
|
// payloads persisted before work provenance shipped.
|
|
37553
37605
|
workProvenance: WorkProvenanceSchema.nullable().default(null),
|
|
@@ -38377,7 +38429,10 @@ var ProjectHomeReadModelSchema = external_exports.object({
|
|
|
38377
38429
|
])
|
|
38378
38430
|
)
|
|
38379
38431
|
}).strict();
|
|
38380
|
-
var PROJECT_DEFAULT_AGENT_SOURCES = [
|
|
38432
|
+
var PROJECT_DEFAULT_AGENT_SOURCES = [
|
|
38433
|
+
"built_in",
|
|
38434
|
+
"front_of_house"
|
|
38435
|
+
];
|
|
38381
38436
|
var ProjectDefaultAgentSourceSchema = external_exports.enum(
|
|
38382
38437
|
PROJECT_DEFAULT_AGENT_SOURCES
|
|
38383
38438
|
);
|
|
@@ -39027,9 +39082,9 @@ var SessionUsageResponseSchema = external_exports.object({
|
|
|
39027
39082
|
firstUsageAt: external_exports.string().datetime().nullable(),
|
|
39028
39083
|
lastUsageAt: external_exports.string().datetime().nullable()
|
|
39029
39084
|
}).strip();
|
|
39030
|
-
var PROJECT_USAGE_RANGE_KEYS = ["7d", "30d", "all"];
|
|
39085
|
+
var PROJECT_USAGE_RANGE_KEYS = ["24h", "7d", "30d", "all"];
|
|
39031
39086
|
var ProjectUsageRangeKeySchema = external_exports.enum(PROJECT_USAGE_RANGE_KEYS);
|
|
39032
|
-
var
|
|
39087
|
+
var UsageBucketKeySchema = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}(T([01]\d|2[0-3]))?$/);
|
|
39033
39088
|
var ProjectUsageTotalsSchema = UsageTotalsSchema.extend({
|
|
39034
39089
|
sessionCount: NonNegativeTokenCountSchema,
|
|
39035
39090
|
// Share of all tokens served from prompt-cache reads (0..1); 0 when the
|
|
@@ -39076,7 +39131,7 @@ var ProjectUsageDayModelSliceSchema = external_exports.object({
|
|
|
39076
39131
|
billedCostUsd: NonNegativeUsdSchema2
|
|
39077
39132
|
});
|
|
39078
39133
|
var ProjectUsageDayPointSchema = UsageTotalsSchema.extend({
|
|
39079
|
-
date:
|
|
39134
|
+
date: UsageBucketKeySchema,
|
|
39080
39135
|
byAgent: external_exports.array(ProjectUsageDayAgentSliceSchema),
|
|
39081
39136
|
byModel: external_exports.array(ProjectUsageDayModelSliceSchema)
|
|
39082
39137
|
});
|