@dam-agents/cli 0.2.13 → 0.2.14-rc1
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/bin.js +99 -236
- package/package.json +3 -3
package/dist/bin.js
CHANGED
|
@@ -26722,12 +26722,38 @@ function date4(params) {
|
|
|
26722
26722
|
config(en_default());
|
|
26723
26723
|
|
|
26724
26724
|
// ../api-server-api/src/modules/shared.ts
|
|
26725
|
+
var RESOURCE_NAME_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
26726
|
+
function resourceNameSchema(example) {
|
|
26727
|
+
return external_exports.string().min(1, "name is required").max(63, "name must be 63 characters or fewer").regex(
|
|
26728
|
+
RESOURCE_NAME_PATTERN,
|
|
26729
|
+
`name must be lowercase letters, digits, and single hyphens (e.g. ${example})`
|
|
26730
|
+
);
|
|
26731
|
+
}
|
|
26725
26732
|
var ENV_NAME_RE = /^[A-Z_][A-Z0-9_]*$/;
|
|
26726
26733
|
var envVarSchema = external_exports.object({
|
|
26727
26734
|
name: external_exports.string().min(1).max(255).regex(ENV_NAME_RE, "name must match [A-Z_][A-Z0-9_]*"),
|
|
26728
26735
|
value: external_exports.string().max(1e4)
|
|
26729
26736
|
});
|
|
26730
26737
|
|
|
26738
|
+
// ../api-server-api/src/modules/events/schemas.ts
|
|
26739
|
+
var liveEventSchema = external_exports.discriminatedUnion("topic", [
|
|
26740
|
+
external_exports.object({ topic: external_exports.literal("sync") }),
|
|
26741
|
+
external_exports.object({ topic: external_exports.literal("approvals"), agentId: external_exports.string().min(1) }),
|
|
26742
|
+
external_exports.object({ topic: external_exports.literal("agents"), agentId: external_exports.string().min(1) }),
|
|
26743
|
+
external_exports.object({ topic: external_exports.literal("schedules"), agentId: external_exports.string().min(1) }),
|
|
26744
|
+
external_exports.object({ topic: external_exports.literal("harnessConfig"), agentId: external_exports.string().min(1) }),
|
|
26745
|
+
external_exports.object({
|
|
26746
|
+
topic: external_exports.literal("experiments"),
|
|
26747
|
+
experimentId: external_exports.string().min(1),
|
|
26748
|
+
agentId: external_exports.string().min(1)
|
|
26749
|
+
}),
|
|
26750
|
+
external_exports.object({
|
|
26751
|
+
topic: external_exports.literal("artifacts"),
|
|
26752
|
+
artifactId: external_exports.string().min(1).optional(),
|
|
26753
|
+
agentId: external_exports.string().min(1).optional()
|
|
26754
|
+
})
|
|
26755
|
+
]);
|
|
26756
|
+
|
|
26731
26757
|
// ../api-server-api/src/modules/skills/schemas.ts
|
|
26732
26758
|
var skillSourcePathSchema = external_exports.string().transform((p2) => p2.trim().replace(/^\/+|\/+$/g, "")).refine((p2) => !p2.split("/").includes(".."), "path must not contain '..'");
|
|
26733
26759
|
var skillSourceSchema = external_exports.object({
|
|
@@ -26735,12 +26761,7 @@ var skillSourceSchema = external_exports.object({
|
|
|
26735
26761
|
name: external_exports.string(),
|
|
26736
26762
|
gitUrl: external_exports.string(),
|
|
26737
26763
|
path: external_exports.string().optional(),
|
|
26738
|
-
/** True when the source is managed by the cluster admin
|
|
26739
|
-
* (Helm-seeded). Users can't delete it. */
|
|
26740
26764
|
system: external_exports.boolean().optional(),
|
|
26741
|
-
/** Present when the source was declared by an agent template
|
|
26742
|
-
* (spec.skillSources). UI-only hint for the "Agent" badge —
|
|
26743
|
-
* backend treats template sources as read-only. */
|
|
26744
26765
|
fromTemplate: external_exports.object({ templateId: external_exports.string(), templateName: external_exports.string() }).optional(),
|
|
26745
26766
|
canPublish: external_exports.boolean().optional()
|
|
26746
26767
|
});
|
|
@@ -26754,18 +26775,12 @@ var skillSchema = external_exports.object({
|
|
|
26754
26775
|
description: external_exports.string(),
|
|
26755
26776
|
version: external_exports.string(),
|
|
26756
26777
|
contentHash: external_exports.string(),
|
|
26757
|
-
/** Repo-relative directory the skill was found in, whichever Source Root it
|
|
26758
|
-
* came from — what a raw-file URL needs. Distinct from `skillSourceSchema.path`,
|
|
26759
|
-
* which is the source's optional subdir; `dir` is this one skill's actual
|
|
26760
|
-
* location under it. Optional: the agent-runtime clone scan (private /
|
|
26761
|
-
* non-GitHub sources) doesn't report it. */
|
|
26762
26778
|
dir: external_exports.string().optional()
|
|
26763
26779
|
});
|
|
26764
26780
|
var skillListResultSchema = external_exports.object({
|
|
26765
26781
|
skills: external_exports.array(skillSchema),
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
scannedAt: external_exports.string().datetime()
|
|
26782
|
+
scannedAt: external_exports.string().datetime(),
|
|
26783
|
+
visibility: external_exports.enum(["public", "private"]).optional()
|
|
26769
26784
|
});
|
|
26770
26785
|
var scanFailureCodes = [
|
|
26771
26786
|
"needs_github_connection",
|
|
@@ -26776,35 +26791,21 @@ var scanFailureCodes = [
|
|
|
26776
26791
|
];
|
|
26777
26792
|
var scanFailureSchema = external_exports.object({
|
|
26778
26793
|
code: external_exports.enum(scanFailureCodes),
|
|
26779
|
-
/** Single line naming the cause. */
|
|
26780
26794
|
title: external_exports.string(),
|
|
26781
|
-
/** Single line naming the fix. */
|
|
26782
26795
|
detail: external_exports.string()
|
|
26783
26796
|
});
|
|
26784
26797
|
var skillRefSchema = external_exports.object({
|
|
26785
26798
|
source: external_exports.string(),
|
|
26786
26799
|
name: external_exports.string(),
|
|
26787
26800
|
version: external_exports.string(),
|
|
26788
|
-
/** Deterministic SHA-256 of the skill directory's file contents at
|
|
26789
|
-
* install time. Compared to the scanner's contentHash to flag drift.
|
|
26790
|
-
* Optional for backward compatibility with installs that pre-date
|
|
26791
|
-
* this field. */
|
|
26792
26801
|
contentHash: external_exports.string().optional(),
|
|
26793
|
-
/** Source subdir the skill was installed from, denormalized so the apply
|
|
26794
|
-
* path resolves the skill dir without re-reading the source. */
|
|
26795
26802
|
path: external_exports.string().optional()
|
|
26796
26803
|
});
|
|
26797
26804
|
var localSkillSchema = external_exports.object({
|
|
26798
26805
|
name: external_exports.string(),
|
|
26799
26806
|
description: external_exports.string(),
|
|
26800
26807
|
skillPath: external_exports.string(),
|
|
26801
|
-
/** Provenance vs. the image's pristine copy: shipped untouched, shipped
|
|
26802
|
-
* but diverged, or created at runtime. Absent on pre-provenance pods —
|
|
26803
|
-
* treat as `user`. */
|
|
26804
26808
|
origin: external_exports.enum(["system", "system-modified", "user"]).optional(),
|
|
26805
|
-
/** Deterministic SHA-256 of the skill directory, comparable with a scanned
|
|
26806
|
-
* skill's `contentHash`. Present only for skills the server asked the pod to
|
|
26807
|
-
* hash, and absent on pods predating this field (#3019). */
|
|
26808
26809
|
contentHash: external_exports.string().optional()
|
|
26809
26810
|
});
|
|
26810
26811
|
var skillPublishRecordSchema = external_exports.object({
|
|
@@ -26813,27 +26814,14 @@ var skillPublishRecordSchema = external_exports.object({
|
|
|
26813
26814
|
sourceName: external_exports.string(),
|
|
26814
26815
|
sourceGitUrl: external_exports.string(),
|
|
26815
26816
|
prUrl: external_exports.string(),
|
|
26816
|
-
/** ISO 8601 timestamp. */
|
|
26817
26817
|
publishedAt: external_exports.string(),
|
|
26818
|
-
/** Resolved outcome of `prUrl`, or null when it has never been
|
|
26819
|
-
* resolved — the source is private, the read was rate-limited, the
|
|
26820
|
-
* pull request is gone. `merged` and `closed` are terminal and are
|
|
26821
|
-
* never re-read (#3019). */
|
|
26822
26818
|
prState: external_exports.enum(["draft", "open", "merged", "closed"]).nullable(),
|
|
26823
|
-
/** ISO 8601 timestamp of the last resolution *attempt*, which is not
|
|
26824
|
-
* the same as the last success: an attempt that resolved nothing
|
|
26825
|
-
* still stamps it, because it doubles as the backoff clock. Null
|
|
26826
|
-
* until the first attempt. */
|
|
26827
26819
|
prStateCheckedAt: external_exports.string().nullable()
|
|
26828
26820
|
});
|
|
26829
26821
|
var skillStateOutputSchema = external_exports.object({
|
|
26830
26822
|
installed: external_exports.array(skillRefSchema),
|
|
26831
26823
|
standalone: external_exports.array(localSkillSchema),
|
|
26832
26824
|
instancePublishes: external_exports.array(skillPublishRecordSchema),
|
|
26833
|
-
/** Present only when `standalone` came from a recorded snapshot rather than a
|
|
26834
|
-
* live pod read — the sandbox is stopped. Absent while running, which is what
|
|
26835
|
-
* lets a reader tell live truth from a snapshot without a second field for
|
|
26836
|
-
* the running case. */
|
|
26837
26825
|
standaloneSnapshot: external_exports.object({ capturedAt: external_exports.string().datetime() }).optional()
|
|
26838
26826
|
});
|
|
26839
26827
|
var skillListSourcesInputSchema = external_exports.object({ agentId: external_exports.string().min(1).optional() }).optional();
|
|
@@ -26859,9 +26847,6 @@ var skillGetContentInputSchema = external_exports.object({
|
|
|
26859
26847
|
});
|
|
26860
26848
|
var skillContentSchema = external_exports.object({
|
|
26861
26849
|
content: external_exports.string(),
|
|
26862
|
-
/** Source-relative directory the SKILL.md was found in, when resolvable —
|
|
26863
|
-
* lets the UI build an accurate blob link instead of guessing the dir from
|
|
26864
|
-
* the (frontmatter) skill name. */
|
|
26865
26850
|
dir: external_exports.string().optional()
|
|
26866
26851
|
});
|
|
26867
26852
|
var skillInstallInputSchema = external_exports.object({
|
|
@@ -26876,6 +26861,61 @@ var skillUninstallInputSchema = external_exports.object({
|
|
|
26876
26861
|
source: external_exports.string().url(),
|
|
26877
26862
|
name: external_exports.string().min(1)
|
|
26878
26863
|
});
|
|
26864
|
+
var skillSetEntrySchema = external_exports.object({
|
|
26865
|
+
source: external_exports.string().url(),
|
|
26866
|
+
name: external_exports.string().min(1)
|
|
26867
|
+
});
|
|
26868
|
+
var skillSetNameSchema = resourceNameSchema("my-skill-set");
|
|
26869
|
+
var skillSetSchema = external_exports.object({
|
|
26870
|
+
id: external_exports.string(),
|
|
26871
|
+
name: external_exports.string(),
|
|
26872
|
+
skills: external_exports.array(skillSetEntrySchema),
|
|
26873
|
+
createdAt: external_exports.string()
|
|
26874
|
+
});
|
|
26875
|
+
var skillSetCreateInputSchema = external_exports.object({
|
|
26876
|
+
name: skillSetNameSchema,
|
|
26877
|
+
skills: external_exports.array(skillSetEntrySchema).min(1).max(500)
|
|
26878
|
+
});
|
|
26879
|
+
var skillSetDeleteInputSchema = external_exports.object({ id: external_exports.string().min(1) });
|
|
26880
|
+
var skillSetApplyInputSchema = external_exports.object({
|
|
26881
|
+
agentId: external_exports.string().min(1),
|
|
26882
|
+
setIds: external_exports.array(external_exports.string().min(1)).min(1).max(50)
|
|
26883
|
+
});
|
|
26884
|
+
var skillSetSkipReasonSchema = external_exports.enum([
|
|
26885
|
+
"source-not-connected",
|
|
26886
|
+
"source-unreadable",
|
|
26887
|
+
"not-in-source"
|
|
26888
|
+
]);
|
|
26889
|
+
var skillSetApplyResultSchema = external_exports.object({
|
|
26890
|
+
installed: external_exports.array(skillRefSchema),
|
|
26891
|
+
added: external_exports.number().int().nonnegative(),
|
|
26892
|
+
skipped: external_exports.array(
|
|
26893
|
+
skillSetEntrySchema.extend({ reason: skillSetSkipReasonSchema })
|
|
26894
|
+
)
|
|
26895
|
+
});
|
|
26896
|
+
var MAX_SKILL_BATCH_ENTRIES = 500;
|
|
26897
|
+
var skillApplyBatchInputSchema = external_exports.object({
|
|
26898
|
+
agentId: external_exports.string().min(1),
|
|
26899
|
+
install: external_exports.array(
|
|
26900
|
+
external_exports.object({
|
|
26901
|
+
source: external_exports.string().url(),
|
|
26902
|
+
name: external_exports.string().min(1),
|
|
26903
|
+
version: external_exports.string().min(1),
|
|
26904
|
+
contentHash: external_exports.string().optional()
|
|
26905
|
+
})
|
|
26906
|
+
).max(MAX_SKILL_BATCH_ENTRIES).default([]),
|
|
26907
|
+
uninstall: external_exports.array(
|
|
26908
|
+
external_exports.object({
|
|
26909
|
+
source: external_exports.string().url(),
|
|
26910
|
+
name: external_exports.string().min(1)
|
|
26911
|
+
})
|
|
26912
|
+
).max(MAX_SKILL_BATCH_ENTRIES).default([])
|
|
26913
|
+
}).refine(
|
|
26914
|
+
(v2) => v2.install.length + v2.uninstall.length <= MAX_SKILL_BATCH_ENTRIES,
|
|
26915
|
+
{
|
|
26916
|
+
message: `one batch carries at most ${MAX_SKILL_BATCH_ENTRIES} skills, install and uninstall combined`
|
|
26917
|
+
}
|
|
26918
|
+
);
|
|
26879
26919
|
var skillListLocalInputSchema = external_exports.object({
|
|
26880
26920
|
agentId: external_exports.string().min(1)
|
|
26881
26921
|
});
|
|
@@ -26958,14 +26998,7 @@ var templateSpecSchema = external_exports.object({
|
|
|
26958
26998
|
env: external_exports.array(envVarConfigMapSchema).optional(),
|
|
26959
26999
|
resources: resourcesSchema.optional(),
|
|
26960
27000
|
imagePullPolicy: external_exports.string().optional(),
|
|
26961
|
-
// Names a kubernetes.io/dockerconfigjson Secret in the agent namespace,
|
|
26962
|
-
// pre-created by the chart for templates that pull from a private registry
|
|
26963
|
-
// (e.g. experimental external agents). Carried onto the agent spec so the
|
|
26964
|
-
// pod can pull the image without the user entering registry credentials.
|
|
26965
27001
|
imagePullSecretRef: external_exports.string().optional(),
|
|
26966
|
-
// Seeds the created agent's per-agent hibernation override (Go duration):
|
|
26967
|
-
// "0s" never hibernates, omitted inherits the chart-wide default. A user's
|
|
26968
|
-
// explicit choice at create time still wins over this.
|
|
26969
27002
|
hibernationTimeout: external_exports.string().optional(),
|
|
26970
27003
|
storageSize: external_exports.string().optional(),
|
|
26971
27004
|
backend: external_exports.object({
|
|
@@ -26981,13 +27014,9 @@ var templateSpecSchema = external_exports.object({
|
|
|
26981
27014
|
var repoSchema = external_exports.object({
|
|
26982
27015
|
id: external_exports.string().min(1),
|
|
26983
27016
|
name: external_exports.string().min(1),
|
|
26984
|
-
/** HTTPS clone URL (".git" form). Cloned into the work dir at first run. */
|
|
26985
27017
|
url: external_exports.url(),
|
|
26986
|
-
/** Branch or tag to clone; omitted = the repo's default branch. */
|
|
26987
27018
|
ref: external_exports.string().min(1).optional(),
|
|
26988
27019
|
description: external_exports.string().optional(),
|
|
26989
|
-
/** Template ids this repo is compatible with; the UI filters by the chosen
|
|
26990
|
-
* harness. Empty means "offered for no harness". */
|
|
26991
27020
|
compatibleTemplates: external_exports.array(external_exports.string()).default([])
|
|
26992
27021
|
});
|
|
26993
27022
|
|
|
@@ -27000,21 +27029,10 @@ var spawnInvocationRequestSchema = external_exports.object({
|
|
|
27000
27029
|
templateId: external_exports.string().min(1).optional(),
|
|
27001
27030
|
connections: external_exports.array(external_exports.string().min(1)).optional(),
|
|
27002
27031
|
prompt: external_exports.string().min(1),
|
|
27003
|
-
// The result JSON Schema — arbitrary JSON, validated structurally by ajv
|
|
27004
|
-
// when the target reports (a malformed schema is rejected at spawn).
|
|
27005
27032
|
schema: external_exports.unknown(),
|
|
27006
|
-
// Optional liveness deadline for this target, in ms. Bounded server-side; a
|
|
27007
|
-
// shorter value fails a wedged/misconfigured target fast, a longer one lets
|
|
27008
|
-
// a heavy target run past the default hour.
|
|
27009
27033
|
ttlMs: external_exports.number().int().min(MIN_INVOCATION_TTL_MS).max(MAX_INVOCATION_TTL_MS).optional(),
|
|
27010
|
-
// Optional resource limits. A heavy Make (clone + install + build)
|
|
27011
|
-
// OOM-kills at the template's small default memory, so let the driver raise
|
|
27012
|
-
// it. Same grammar and floors as the agent size knob.
|
|
27013
27034
|
memory: external_exports.string().regex(/^\d+(Mi|Gi)$/, "memory must look like '512Mi' or '4Gi'").optional(),
|
|
27014
27035
|
cpu: external_exports.string().regex(/^\d+(\.\d+)?m?$/, "cpu must look like '2', '0.5' or '500m'").optional(),
|
|
27015
|
-
// Experiments v2 span attach: "<experimentId>/<spanId>" stamped by the
|
|
27016
|
-
// experiment SDK when the spawn happens inside a span, so the Trace Feed
|
|
27017
|
-
// shows this invocation under its stage. Opaque to invocations.
|
|
27018
27036
|
experimentSpanId: external_exports.string().min(1).max(300).optional()
|
|
27019
27037
|
}).refine((d2) => d2.image !== void 0 || d2.templateId !== void 0, {
|
|
27020
27038
|
message: "either image or templateId is required"
|
|
@@ -27052,9 +27070,6 @@ var fileRemoveInputSchema = external_exports.object({ path: pathSchema });
|
|
|
27052
27070
|
var fileUploadInputSchema = external_exports.object({
|
|
27053
27071
|
path: pathSchema,
|
|
27054
27072
|
contentBase64: external_exports.string(),
|
|
27055
|
-
/** Browser-reported MIME (File.type). Carried in the API for observability
|
|
27056
|
-
* and forward-compat; server-side reads still detect MIME from magic
|
|
27057
|
-
* bytes so we don't need to persist this. */
|
|
27058
27073
|
contentType: external_exports.string().max(255).optional(),
|
|
27059
27074
|
overwrite: external_exports.boolean().optional()
|
|
27060
27075
|
});
|
|
@@ -27081,14 +27096,9 @@ var skillPublishInputSchema2 = external_exports.object({
|
|
|
27081
27096
|
repo: external_exports.string().min(1),
|
|
27082
27097
|
title: external_exports.string().min(1),
|
|
27083
27098
|
body: external_exports.string(),
|
|
27084
|
-
// Source subdir the skill is published into; mirrors the scanner so a
|
|
27085
|
-
// subdir source's own scan finds what was published back to it.
|
|
27086
27099
|
path: external_exports.string().optional()
|
|
27087
27100
|
});
|
|
27088
27101
|
var skillListLocalInputSchema2 = external_exports.object({
|
|
27089
|
-
/** Names to compute `contentHash` for. Hashing walks the whole skill dir on
|
|
27090
|
-
* an NFS-backed PVC and this runs on every state poll, so the caller asks
|
|
27091
|
-
* only for the few skills it needs it for (#3019). */
|
|
27092
27102
|
hashNames: external_exports.array(external_exports.string()).optional()
|
|
27093
27103
|
});
|
|
27094
27104
|
var skillReadLocalInputSchema2 = external_exports.object({
|
|
@@ -27101,10 +27111,7 @@ var skillReadPullRequestInputSchema = external_exports.object({
|
|
|
27101
27111
|
});
|
|
27102
27112
|
var skillReadSkillFileInputSchema = external_exports.object({
|
|
27103
27113
|
source: external_exports.string().min(1),
|
|
27104
|
-
/** Commit SHA the scan pinned — the preview renders the revision the
|
|
27105
|
-
* catalog listed. */
|
|
27106
27114
|
version: external_exports.string().min(1),
|
|
27107
|
-
/** Repo-relative skill directory from the scan; `SKILL.md` is read inside it. */
|
|
27108
27115
|
dir: external_exports.string().min(1)
|
|
27109
27116
|
});
|
|
27110
27117
|
var skillDeleteLocalInputSchema2 = external_exports.object({
|
|
@@ -27113,9 +27120,7 @@ var skillDeleteLocalInputSchema2 = external_exports.object({
|
|
|
27113
27120
|
var skillWriteLocalInputSchema = external_exports.object({
|
|
27114
27121
|
skills: external_exports.array(
|
|
27115
27122
|
external_exports.object({
|
|
27116
|
-
/** Confirmed display name — becomes frontmatter `name:`; the dir is its slug. */
|
|
27117
27123
|
name: external_exports.string().min(1).max(128),
|
|
27118
|
-
/** Raw Markdown file content; lands as SKILL.md. */
|
|
27119
27124
|
content: external_exports.string()
|
|
27120
27125
|
})
|
|
27121
27126
|
).min(1).max(50)
|
|
@@ -27134,10 +27139,6 @@ var backgroundWorkItemSchema = external_exports.object({
|
|
|
27134
27139
|
command: advisory(500)
|
|
27135
27140
|
});
|
|
27136
27141
|
var backgroundWorkReportSchema = external_exports.object({
|
|
27137
|
-
// Also truncated rather than capped, for the same reason: a hold is per
|
|
27138
|
-
// session, so one surviving item holds it, whereas rejecting an over-long list
|
|
27139
|
-
// would hold nothing at all. Excess entries cost only detail in the status
|
|
27140
|
-
// payload.
|
|
27141
27142
|
items: external_exports.array(backgroundWorkItemSchema).transform((items) => items.slice(0, 64))
|
|
27142
27143
|
});
|
|
27143
27144
|
|
|
@@ -27191,17 +27192,10 @@ var egressInjectContribution = external_exports.object({
|
|
|
27191
27192
|
headerName: external_exports.string().min(1),
|
|
27192
27193
|
valueFormat: external_exports.string().min(1),
|
|
27193
27194
|
encoding: external_exports.literal("basic-x-access-token").optional(),
|
|
27194
|
-
// Moves the value into this query param instead of the header; restricted to unreserved chars since the Lua treats it as a trusted literal.
|
|
27195
27195
|
queryParamName: external_exports.string().regex(/^[A-Za-z0-9_.~-]+$/).optional(),
|
|
27196
|
-
// Terminate this host's gateway chain as HTTP/2 so injection lands on a gRPC
|
|
27197
|
-
// stream (e.g. Modal's x-modal-token-* metadata). Flows to the injection-hosts
|
|
27198
|
-
// annotation the controller reads. Omit for HTTP/1.1 REST hosts.
|
|
27199
27196
|
http2: external_exports.boolean().optional(),
|
|
27200
27197
|
port: egressPort,
|
|
27201
|
-
// Tunnel WebSocket/SPDY upgrades (kubectl streaming); keeps the chain h1.
|
|
27202
27198
|
upgrades: external_exports.boolean().optional(),
|
|
27203
|
-
// Validate the upstream against the CA in the connection Secret, not the
|
|
27204
|
-
// system store (self-signed cluster CAs).
|
|
27205
27199
|
upstreamCa: external_exports.boolean().optional()
|
|
27206
27200
|
});
|
|
27207
27201
|
var fileContribution = external_exports.object({
|
|
@@ -27257,7 +27251,6 @@ var scheduleResetEvent = external_exports.object({
|
|
|
27257
27251
|
});
|
|
27258
27252
|
var workspaceSeedEventPayload = external_exports.object({
|
|
27259
27253
|
url: external_exports.string().min(1),
|
|
27260
|
-
/** Branch or tag to clone; omitted = the repo's default branch. */
|
|
27261
27254
|
ref: external_exports.string().min(1).optional()
|
|
27262
27255
|
});
|
|
27263
27256
|
var workspaceSeedEvent = external_exports.object({
|
|
@@ -27315,18 +27308,14 @@ var harnessConfigChoice = external_exports.object({
|
|
|
27315
27308
|
description: external_exports.string().optional()
|
|
27316
27309
|
});
|
|
27317
27310
|
var harnessConfigOptionGroup = external_exports.object({
|
|
27318
|
-
// "model", "mode", or a configOption id (e.g. "effort").
|
|
27319
27311
|
id: external_exports.string().min(1),
|
|
27320
27312
|
name: external_exports.string().min(1),
|
|
27321
27313
|
description: external_exports.string().optional(),
|
|
27322
|
-
// ACP-style category: "model" | "mode" | "thought_level" | …
|
|
27323
27314
|
category: external_exports.string().min(1),
|
|
27324
27315
|
choices: external_exports.array(harnessConfigChoice)
|
|
27325
27316
|
});
|
|
27326
27317
|
var harnessConfigCatalog = external_exports.object({
|
|
27327
27318
|
options: external_exports.array(harnessConfigOptionGroup),
|
|
27328
|
-
// Per-model validity: allowed choice values per gated group. Model absent =
|
|
27329
|
-
// all allowed; empty array = group hidden for that model (e.g. Haiku effort).
|
|
27330
27319
|
modelConstraints: external_exports.record(external_exports.string().min(1), external_exports.record(external_exports.string().min(1), external_exports.array(external_exports.string()))).optional()
|
|
27331
27320
|
});
|
|
27332
27321
|
var harnessConfigCurrent = external_exports.object({
|
|
@@ -27338,10 +27327,7 @@ var harnessConfigCurrent = external_exports.object({
|
|
|
27338
27327
|
var capabilities = external_exports.object({
|
|
27339
27328
|
contributions: external_exports.array(contributionKind),
|
|
27340
27329
|
events: external_exports.array(eventKind),
|
|
27341
|
-
// Whether the harness declares a config mapping (gates the UI panel). Optional
|
|
27342
|
-
// for forward-compat with agents that predate it.
|
|
27343
27330
|
harnessConfig: external_exports.boolean().optional(),
|
|
27344
|
-
// The option catalog from the harness's manifest (absent → UI hides the panel).
|
|
27345
27331
|
harnessConfigCatalog: harnessConfigCatalog.optional()
|
|
27346
27332
|
});
|
|
27347
27333
|
var stateSlice = external_exports.object({
|
|
@@ -27358,19 +27344,14 @@ var driverFailure = external_exports.object({
|
|
|
27358
27344
|
message: external_exports.string().min(1)
|
|
27359
27345
|
});
|
|
27360
27346
|
var applyStateResult = external_exports.discriminatedUnion("status", [
|
|
27361
|
-
// Processed: resulting cursor + any per-driver failures (empty on a fully clean apply).
|
|
27362
27347
|
external_exports.object({
|
|
27363
27348
|
status: external_exports.literal("ok"),
|
|
27364
27349
|
appliedVersion: external_exports.number().int().nonnegative(),
|
|
27365
27350
|
appliedHash: external_exports.string().min(1).nullable(),
|
|
27366
|
-
// null until the first clean settle
|
|
27367
27351
|
failures: external_exports.array(driverFailure).default([]),
|
|
27368
27352
|
settledEvents: external_exports.array(external_exports.string()).default([]),
|
|
27369
|
-
// Absent from a pod predating this, or one whose manifest declares no
|
|
27370
|
-
// harness-config driver — the server then keeps whatever it holds.
|
|
27371
27353
|
harnessConfigCurrent: harnessConfigCurrent.optional()
|
|
27372
27354
|
}),
|
|
27373
|
-
// Contributions already at ≥ the requested version; worker reconciles. Events still apply (own version) — settledEvents reports which.
|
|
27374
27355
|
external_exports.object({
|
|
27375
27356
|
status: external_exports.literal("stale"),
|
|
27376
27357
|
appliedVersion: external_exports.number().int().nonnegative(),
|
|
@@ -27384,10 +27365,6 @@ var helloInput = external_exports.object({
|
|
|
27384
27365
|
protocolVersion: external_exports.literal("v1"),
|
|
27385
27366
|
agentRuntimeVersion: external_exports.string(),
|
|
27386
27367
|
capabilities,
|
|
27387
|
-
// The config file as it stands at boot, with no discovered model list: `hello`
|
|
27388
|
-
// is what delivers capabilities, and the worker won't dispatch an apply until
|
|
27389
|
-
// they land, so waiting on the provider here delays the first apply after
|
|
27390
|
-
// every boot and wake. The apply reply carries the list instead.
|
|
27391
27368
|
harnessConfigCurrent: harnessConfigCurrent.optional()
|
|
27392
27369
|
});
|
|
27393
27370
|
var helloResult = external_exports.object({
|
|
@@ -27419,22 +27396,12 @@ var harnessConfigSnapshotSchema = external_exports.object({
|
|
|
27419
27396
|
model: external_exports.string().nullable(),
|
|
27420
27397
|
mode: external_exports.string().nullable(),
|
|
27421
27398
|
configOptions: agentConfigOptionsSchema,
|
|
27422
|
-
/** Models the provider offered when it was last successfully asked; null when
|
|
27423
|
-
* the harness declares no discovery source. A failed attempt leaves this
|
|
27424
|
-
* alone, so it can be older than the rest of the snapshot. */
|
|
27425
27399
|
availableModels: external_exports.array(harnessConfigChoice).nullable(),
|
|
27426
27400
|
capturedAt: external_exports.string().datetime(),
|
|
27427
|
-
/** The model that was in effect when `availableModels` was observed. Comparing
|
|
27428
|
-
* the two is only meaningful while this still equals `model`: a model changed
|
|
27429
|
-
* since the list was read proves nothing about whether the provider offers it.
|
|
27430
|
-
* Absent on rows written before this field existed — treat as unpaired. */
|
|
27431
27401
|
modelAtDiscovery: external_exports.string().nullable().optional(),
|
|
27432
|
-
/** False while the only source is an apply the pod has not reported back. */
|
|
27433
27402
|
confirmed: external_exports.boolean()
|
|
27434
27403
|
});
|
|
27435
27404
|
var harnessConfigSnapshotResultSchema = external_exports.object({
|
|
27436
|
-
/** The agent has sent `hello` at least once, so a snapshot is possible.
|
|
27437
|
-
* False means "never run" — genuinely nothing to show, not a miss. */
|
|
27438
27405
|
hasRun: external_exports.boolean(),
|
|
27439
27406
|
snapshot: harnessConfigSnapshotSchema.nullable()
|
|
27440
27407
|
});
|
|
@@ -27455,7 +27422,6 @@ var egressRuleCurrentPresetInputSchema = external_exports.object({
|
|
|
27455
27422
|
var egressRuleCreateInputSchema = external_exports.object({
|
|
27456
27423
|
agentId: external_exports.string().min(1),
|
|
27457
27424
|
host: egressHostSchema,
|
|
27458
|
-
// Upstream port; omit for 443. Promotes the host onto the L7 chain.
|
|
27459
27425
|
port: external_exports.number().int().min(1).max(65535).optional(),
|
|
27460
27426
|
method: external_exports.string().min(1).default("*"),
|
|
27461
27427
|
pathPattern: external_exports.string().min(1).default("*"),
|
|
@@ -27515,38 +27481,12 @@ var agentCreateInputSchema = external_exports.object({
|
|
|
27515
27481
|
password: external_exports.string().min(1)
|
|
27516
27482
|
}).optional(),
|
|
27517
27483
|
egressPreset: egressPresetSchema.optional(),
|
|
27518
|
-
// Per-agent idle timeout override in minutes (0 = never hibernate); omit to inherit the global default.
|
|
27519
27484
|
hibernationTimeoutMin: external_exports.number().int().min(0).optional(),
|
|
27520
|
-
// Optional: clone this public repo (optionally a branch/tag via `ref`) into
|
|
27521
|
-
// the work dir once, via a one-shot `workspace-seed` event. Not enforced
|
|
27522
|
-
// against the `gitRepos` catalog server-side — the clone runs in the
|
|
27523
|
-
// egress-gated agent pod, so this reaches no URL the agent couldn't already
|
|
27524
|
-
// reach itself.
|
|
27525
27485
|
gitRepo: external_exports.object({ url: external_exports.url(), ref: external_exports.string().min(1).optional() }).optional(),
|
|
27526
|
-
// Initial connection grants, settled into the spec at create so credentials
|
|
27527
|
-
// ride the first snapshot and the gateway renders its chains once (no
|
|
27528
|
-
// readiness flap).
|
|
27529
27486
|
connectionIds: external_exports.array(external_exports.string()).optional(),
|
|
27530
|
-
// The agent's size (#1900): CPU/memory limits, the user-facing "power"
|
|
27531
|
-
// knob the Budget bounds (the UI renders it as sliders). Omitted
|
|
27532
|
-
// dimensions inherit the template's limits, else the chart default.
|
|
27533
|
-
// Requests are derived server-side — never a user concept. Floors match
|
|
27534
|
-
// the chart's derivation floors; the budget gate is the only ceiling.
|
|
27535
27487
|
size: agentSizeSchema.optional(),
|
|
27536
|
-
// Sweepable (#2816): mark this agent for automatic deletion by the Agent
|
|
27537
|
-
// Sweep once it hibernates. Set on ephemeral agents (Invocation targets);
|
|
27538
|
-
// durable owned agents omit it. Stamped as an annotation at create.
|
|
27539
27488
|
sweepable: external_exports.boolean().optional(),
|
|
27540
|
-
// Agent Lifetime (#2816): optional grace in ms a Sweepable agent may stay
|
|
27541
|
-
// hibernated before the Sweep deletes it. Default zero — deleted as soon
|
|
27542
|
-
// as it hibernates. Ignored unless `sweepable`.
|
|
27543
27489
|
lifetimeMs: external_exports.number().int().min(0).optional()
|
|
27544
|
-
// Agent Kind is deliberately NOT part of this schema: it is a
|
|
27545
|
-
// service-level field (see AgentCreateInput) set only by an owning module's
|
|
27546
|
-
// create path (knowledge-bases, experiments). A `kind` passed to the public
|
|
27547
|
-
// agents.create is stripped, so a caller cannot mint a marked agent that
|
|
27548
|
-
// skipped that module's setup — a KB or experiment sandbox whose Install
|
|
27549
|
-
// Command never ran.
|
|
27550
27490
|
}).refine((d2) => d2.templateId !== void 0 || d2.image !== void 0, {
|
|
27551
27491
|
message: "Either templateId or image is required"
|
|
27552
27492
|
});
|
|
@@ -27556,17 +27496,12 @@ var agentUpdateInputSchema = external_exports.object({
|
|
|
27556
27496
|
description: external_exports.string().optional(),
|
|
27557
27497
|
env: external_exports.array(envVarSchema).max(64).optional(),
|
|
27558
27498
|
secretRef: external_exports.string().optional(),
|
|
27559
|
-
// Per-agent idle timeout override in minutes (0 = never hibernate); null clears it back to the global default.
|
|
27560
27499
|
hibernationTimeoutMin: external_exports.number().int().min(0).nullable().optional(),
|
|
27561
|
-
// Resize (#1900). On a sleeping sandbox the new Size rides the next start
|
|
27562
|
-
// through the budget gate; on a running one the increase is gated
|
|
27563
|
-
// server-side and the pod restarts to apply it.
|
|
27564
27500
|
size: agentSizeSchema.optional()
|
|
27565
27501
|
});
|
|
27566
27502
|
var agentConnectSlackInputSchema = external_exports.object({
|
|
27567
27503
|
id: external_exports.string().min(1),
|
|
27568
27504
|
slackChannelId: external_exports.string().min(1),
|
|
27569
|
-
// Ambient mode; absent = off. Mutable: re-connecting updates it in place.
|
|
27570
27505
|
ambient: external_exports.boolean().optional()
|
|
27571
27506
|
});
|
|
27572
27507
|
var agentListTelegramChatsInputSchema = external_exports.object({
|
|
@@ -27578,12 +27513,10 @@ var agentUnbindTelegramChatInputSchema = external_exports.object({
|
|
|
27578
27513
|
});
|
|
27579
27514
|
var agentBindTelegramChatInputSchema = external_exports.object({
|
|
27580
27515
|
agentId: external_exports.string().min(1),
|
|
27581
|
-
// Opaque bind-flow id minted by the Telegram OAuth callback.
|
|
27582
27516
|
flowId: external_exports.string().min(1)
|
|
27583
27517
|
});
|
|
27584
27518
|
var agentBindSlackChannelInputSchema = external_exports.object({
|
|
27585
27519
|
agentId: external_exports.string().min(1),
|
|
27586
|
-
// Opaque bind-flow id minted by the Slack in-chat bind OAuth callback.
|
|
27587
27520
|
flowId: external_exports.string().min(1)
|
|
27588
27521
|
});
|
|
27589
27522
|
|
|
@@ -27683,14 +27616,12 @@ var skeletonSchema = external_exports.object({
|
|
|
27683
27616
|
stages: external_exports.array(
|
|
27684
27617
|
external_exports.object({
|
|
27685
27618
|
id: stageIdSchema,
|
|
27686
|
-
/** Stage ids this stage runs after (edges of the graph). */
|
|
27687
27619
|
after: external_exports.array(stageIdSchema).max(20).default([])
|
|
27688
27620
|
})
|
|
27689
27621
|
).max(50).default([]),
|
|
27690
27622
|
loops: external_exports.array(
|
|
27691
27623
|
external_exports.object({
|
|
27692
27624
|
id: stageIdSchema,
|
|
27693
|
-
/** Member stages, iterated together. */
|
|
27694
27625
|
stages: external_exports.array(stageIdSchema).min(1).max(50)
|
|
27695
27626
|
})
|
|
27696
27627
|
).max(10).default([])
|
|
@@ -27699,15 +27630,10 @@ var planRegisterRequestSchema = external_exports.object({
|
|
|
27699
27630
|
name: external_exports.string().trim().min(1).max(200),
|
|
27700
27631
|
skeleton: skeletonSchema,
|
|
27701
27632
|
script: external_exports.object({
|
|
27702
|
-
/** Pod-local path the harness will execute (`python <path>`). */
|
|
27703
27633
|
path: external_exports.string().min(1).max(1024),
|
|
27704
27634
|
sha256: external_exports.string().regex(/^[a-f0-9]{64}$/),
|
|
27705
27635
|
content: external_exports.string().max(SCRIPT_CONTENT_MAX_BYTES)
|
|
27706
27636
|
}),
|
|
27707
|
-
/** Bespoke dashboard HTML captured like the script (the SDK's
|
|
27708
|
-
* dashboard_path): the platform creates or re-versions the draft's
|
|
27709
|
-
* dashboard artifact from it. Omitted = keep the existing dashboard, or
|
|
27710
|
-
* attach the stock one on first registration. */
|
|
27711
27637
|
dashboard: external_exports.object({ content: external_exports.string().max(DASHBOARD_CONTENT_MAX_BYTES) }).optional()
|
|
27712
27638
|
});
|
|
27713
27639
|
var planRegisterResponseSchema = external_exports.object({
|
|
@@ -27734,9 +27660,7 @@ var spanEndEventSchema = external_exports.object({
|
|
|
27734
27660
|
type: external_exports.literal("span-end"),
|
|
27735
27661
|
spanId: spanIdSchema,
|
|
27736
27662
|
status: external_exports.enum(["ok", "error"]),
|
|
27737
|
-
/** Opaque by covenant: captured and charted, never normalized or ranked. */
|
|
27738
27663
|
score: external_exports.number().finite().optional(),
|
|
27739
|
-
/** Artifact Library ids this span produced (candidates, reports). */
|
|
27740
27664
|
artifactIds: external_exports.array(external_exports.string().min(1)).max(20).optional(),
|
|
27741
27665
|
attrs: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
27742
27666
|
ts: isoTimestampSchema
|
|
@@ -27744,7 +27668,6 @@ var spanEndEventSchema = external_exports.object({
|
|
|
27744
27668
|
var customDataEventSchema = external_exports.object({
|
|
27745
27669
|
type: external_exports.literal("custom-data"),
|
|
27746
27670
|
data: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
27747
|
-
/** false replaces the blob instead of shallow-merging into it. */
|
|
27748
27671
|
merge: external_exports.boolean().optional()
|
|
27749
27672
|
});
|
|
27750
27673
|
var heartbeatEventSchema = external_exports.object({
|
|
@@ -27797,8 +27720,6 @@ var knowledgeBaseCreateInputSchema = external_exports.object({
|
|
|
27797
27720
|
connectionIds: external_exports.array(external_exports.string()).optional(),
|
|
27798
27721
|
egressPreset: egressPresetSchema.optional(),
|
|
27799
27722
|
size: agentSizeSchema.optional(),
|
|
27800
|
-
// Which installation procedure to bootstrap the agent with. Defaults to
|
|
27801
|
-
// the sole current template so older callers keep working.
|
|
27802
27723
|
kbTemplateId: knowledgeBaseTemplateIdSchema.default("llm-wiki")
|
|
27803
27724
|
}).refine((d2) => d2.templateId !== void 0 || d2.image !== void 0, {
|
|
27804
27725
|
message: "Either templateId or image is required"
|
|
@@ -30964,7 +30885,7 @@ function bobEnvMappings(pins = {}) {
|
|
|
30964
30885
|
push("BOB_SHELL_MODEL", pins.model);
|
|
30965
30886
|
push("BOB_INSTANCE_ID", pins.agentId);
|
|
30966
30887
|
push("BOB_TEAM_ID", pins.teamId);
|
|
30967
|
-
push("BOB_MAX_COINS", pins.
|
|
30888
|
+
push("BOB_MAX_COINS", pins.maxCost);
|
|
30968
30889
|
push("BOB_CHAT_MODE", pins.chatMode);
|
|
30969
30890
|
return out;
|
|
30970
30891
|
}
|
|
@@ -31019,7 +30940,6 @@ var PROVIDERS = {
|
|
|
31019
30940
|
id: "openai",
|
|
31020
30941
|
displayName: "OpenAI",
|
|
31021
30942
|
hostPattern: "api.openai.com",
|
|
31022
|
-
// Scope injection to /v1/* so other host endpoints don't get a stray Authorization header.
|
|
31023
30943
|
pathPattern: "/v1/*",
|
|
31024
30944
|
modes: [
|
|
31025
30945
|
{
|
|
@@ -31040,7 +30960,6 @@ var PROVIDERS = {
|
|
|
31040
30960
|
label: "API Key",
|
|
31041
30961
|
templateId: "bob",
|
|
31042
30962
|
defaultEnvMappings: bobEnvMappings(),
|
|
31043
|
-
// `Apikey` prefix; `Bearer` would trigger JWT auth.
|
|
31044
30963
|
injection: {
|
|
31045
30964
|
headerName: "Authorization",
|
|
31046
30965
|
valueFormat: "Apikey {value}"
|
|
@@ -31087,7 +31006,6 @@ var secretRef = external_exports.object({
|
|
|
31087
31006
|
var connectionCategory = external_exports.enum(["app", "mcp", "other"]);
|
|
31088
31007
|
var refreshBackoff = external_exports.object({
|
|
31089
31008
|
failures: external_exports.number().int(),
|
|
31090
|
-
/** Epoch seconds; ticks before this skip the connection. */
|
|
31091
31009
|
nextAttempt: external_exports.number().int()
|
|
31092
31010
|
});
|
|
31093
31011
|
var oauthAuth = external_exports.object({
|
|
@@ -31101,8 +31019,6 @@ var oauthAuth = external_exports.object({
|
|
|
31101
31019
|
clientSecretRef: secretRef.optional(),
|
|
31102
31020
|
expiresAt: external_exports.number().int().optional(),
|
|
31103
31021
|
connectedAt: external_exports.number().int().optional(),
|
|
31104
|
-
// Epoch seconds, set only on a *permanent* token rejection: derives
|
|
31105
|
-
// `expired` and parks the connection. Any successful token write clears it.
|
|
31106
31022
|
refreshFailedAt: external_exports.number().int().optional(),
|
|
31107
31023
|
refreshBackoff: refreshBackoff.optional(),
|
|
31108
31024
|
tokenEndpointAcceptJson: external_exports.boolean().optional(),
|
|
@@ -31138,17 +31054,8 @@ var githubAppAuth = external_exports.object({
|
|
|
31138
31054
|
refreshFailedAt: external_exports.number().int().optional(),
|
|
31139
31055
|
refreshBackoff: refreshBackoff.optional(),
|
|
31140
31056
|
host: external_exports.string().min(1).optional(),
|
|
31141
|
-
// Optional narrowing of the minted token, stored because every re-mint must
|
|
31142
|
-
// ask for the same subset — a scope kept only on the create input would widen
|
|
31143
|
-
// back to the whole installation at the first renewal. Absent means the
|
|
31144
|
-
// installation's full authority, which is what every connection made before
|
|
31145
|
-
// this field existed carries.
|
|
31146
31057
|
repositories: external_exports.array(external_exports.string().min(1)).nonempty().optional(),
|
|
31147
31058
|
permissions: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
31148
|
-
// Repositories named by GitHub's numeric id rather than by name — what the
|
|
31149
|
-
// picker records, since an id survives a rename where a name would start
|
|
31150
|
-
// failing at the next renewal. Only one of the two reaches GitHub; ids win
|
|
31151
|
-
// when both are set, and connections predating the picker carry names only.
|
|
31152
31059
|
repositoryIds: external_exports.array(external_exports.number().int()).nonempty().optional()
|
|
31153
31060
|
});
|
|
31154
31061
|
var headerAuth = external_exports.object({
|
|
@@ -31202,13 +31109,7 @@ var connectionView = external_exports.object({
|
|
|
31202
31109
|
hosts: external_exports.array(external_exports.string()),
|
|
31203
31110
|
host: external_exports.string().min(1).optional(),
|
|
31204
31111
|
appSlug: external_exports.string().min(1).optional(),
|
|
31205
|
-
// Only for an OAuth connection storing its own client secret — an
|
|
31206
|
-
// operator-supplied one is deploy config, not replaceable per connection.
|
|
31207
31112
|
hasClientSecret: external_exports.boolean().optional(),
|
|
31208
|
-
// The narrowing a github-app connection currently mints against, so it can
|
|
31209
|
-
// be shown and edited rather than only set once at create. Absent means the
|
|
31210
|
-
// installation's full authority. Carries no secret — names, ids, and levels
|
|
31211
|
-
// are all things the user chose.
|
|
31212
31113
|
githubAppScope: external_exports.object({
|
|
31213
31114
|
repositories: external_exports.array(external_exports.string()).optional(),
|
|
31214
31115
|
repositoryIds: external_exports.array(external_exports.number().int()).optional(),
|
|
@@ -31225,13 +31126,10 @@ var templateInput = external_exports.object({
|
|
|
31225
31126
|
state: templateInputState,
|
|
31226
31127
|
presetValue: external_exports.string().optional(),
|
|
31227
31128
|
secret: external_exports.boolean().optional(),
|
|
31228
|
-
// Renders as a multi-line textarea rather than a single-line input (e.g. a PEM private key).
|
|
31229
31129
|
multiline: external_exports.boolean().optional(),
|
|
31230
|
-
// Marks a config input the form packs into `configInputs` rather than the typed auth fields.
|
|
31231
31130
|
configInput: external_exports.boolean().optional(),
|
|
31232
31131
|
label: external_exports.string().optional(),
|
|
31233
31132
|
hint: external_exports.string().optional(),
|
|
31234
|
-
// Validation a config input declares, surfaced so clients can validate before submit (the server enforces the same).
|
|
31235
31133
|
pattern: external_exports.string().optional(),
|
|
31236
31134
|
patternHint: external_exports.string().optional(),
|
|
31237
31135
|
enumValues: external_exports.array(external_exports.string()).optional()
|
|
@@ -31271,8 +31169,6 @@ var connectionStartOAuthInputSchema = external_exports.object({
|
|
|
31271
31169
|
/^\/(?!\/)/,
|
|
31272
31170
|
"returnTo must be a relative path starting with a single /"
|
|
31273
31171
|
).optional(),
|
|
31274
|
-
// When set, the callback returns a page that postMessages the result to the
|
|
31275
|
-
// opener and closes, instead of redirecting. Used by the popup OAuth flow.
|
|
31276
31172
|
popup: external_exports.boolean().optional()
|
|
31277
31173
|
});
|
|
31278
31174
|
var connectionDiscoverMcpInputSchema = external_exports.object({
|
|
@@ -31288,10 +31184,7 @@ var connectionSetAgentConnectionsInputSchema = external_exports.object({
|
|
|
31288
31184
|
agentId: external_exports.string().min(1),
|
|
31289
31185
|
connectionIds: external_exports.array(external_exports.string().min(1))
|
|
31290
31186
|
});
|
|
31291
|
-
var connectionNameSchema =
|
|
31292
|
-
/^[a-z0-9]+(-[a-z0-9]+)*$/,
|
|
31293
|
-
"name must be lowercase letters, digits, and single hyphens (e.g. my-mcp-server)"
|
|
31294
|
-
);
|
|
31187
|
+
var connectionNameSchema = resourceNameSchema("my-mcp-server");
|
|
31295
31188
|
var commonFields = {
|
|
31296
31189
|
templateId: external_exports.string().min(1),
|
|
31297
31190
|
name: connectionNameSchema
|
|
@@ -31315,24 +31208,17 @@ var headerCreateInput = external_exports.object({
|
|
|
31315
31208
|
/^[A-Za-z_][A-Za-z0-9_]*$/,
|
|
31316
31209
|
"env var name must be letters, digits, and underscores (not starting with a digit)"
|
|
31317
31210
|
).optional(),
|
|
31318
|
-
// Values for the template's declared config inputs, keyed by input name.
|
|
31319
31211
|
configInputs: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
31320
31212
|
value: external_exports.string().min(1),
|
|
31321
|
-
// Upstream CA bundle for hosts whose TLS cert a public root can't verify
|
|
31322
|
-
// (self-signed cluster CAs). PEM, or base64 of PEM (kubeconfig
|
|
31323
|
-
// `certificate-authority-data`).
|
|
31324
31213
|
caData: external_exports.string().optional()
|
|
31325
31214
|
});
|
|
31326
31215
|
var clientCredentialsCreateInput = external_exports.object({
|
|
31327
31216
|
...commonFields,
|
|
31328
31217
|
authKind: external_exports.literal("client-credentials"),
|
|
31329
31218
|
host: external_exports.string().min(1).optional(),
|
|
31330
|
-
// The token endpoint is discovered from the issuer's OAuth metadata.
|
|
31331
31219
|
issuerUrl: external_exports.string().url().optional(),
|
|
31332
31220
|
clientId: external_exports.string().min(1).optional(),
|
|
31333
31221
|
clientSecret: external_exports.string().min(1).optional(),
|
|
31334
|
-
// Space- or comma-separated; the server splits. A single string keeps the
|
|
31335
|
-
// schema-driven forms all-string.
|
|
31336
31222
|
scopes: external_exports.string().optional(),
|
|
31337
31223
|
audience: external_exports.string().min(1).optional(),
|
|
31338
31224
|
headerName: external_exports.string().min(1).optional(),
|
|
@@ -31349,14 +31235,8 @@ var githubAppCreateInput = external_exports.object({
|
|
|
31349
31235
|
appId: external_exports.string().min(1),
|
|
31350
31236
|
installationId: external_exports.string().min(1),
|
|
31351
31237
|
privateKey: external_exports.string().min(1),
|
|
31352
|
-
// Optional narrowing of the minted token. Space- or comma-separated; the
|
|
31353
|
-
// server parses both. Single strings keep the schema-driven forms all-string,
|
|
31354
|
-
// as client-credentials `scopes` does. Blank leaves the token with the
|
|
31355
|
-
// installation's full authority.
|
|
31356
31238
|
repositories: external_exports.string().optional(),
|
|
31357
31239
|
permissions: external_exports.string().optional(),
|
|
31358
|
-
// Repository ids, as picked from the installation. Same all-string shape as
|
|
31359
|
-
// the sibling fields; ids take precedence over names when both arrive.
|
|
31360
31240
|
repositoryIds: external_exports.string().optional()
|
|
31361
31241
|
});
|
|
31362
31242
|
var connectionProbeGitHubAppInputSchema = external_exports.object({
|
|
@@ -31379,8 +31259,6 @@ var noneCreateInput = external_exports.object({
|
|
|
31379
31259
|
...commonFields,
|
|
31380
31260
|
authKind: external_exports.literal("none"),
|
|
31381
31261
|
url: external_exports.string().url().optional(),
|
|
31382
|
-
// Optional header credential (API key) for MCP servers guarded by a
|
|
31383
|
-
// static header — injected at the gateway, never written to harness config.
|
|
31384
31262
|
headerName: external_exports.string().min(1).optional(),
|
|
31385
31263
|
value: external_exports.string().min(1).optional()
|
|
31386
31264
|
});
|
|
@@ -31402,7 +31280,6 @@ var SessionType = {
|
|
|
31402
31280
|
ChannelSlack: "channel_slack",
|
|
31403
31281
|
ChannelTelegram: "channel_telegram",
|
|
31404
31282
|
ScheduleCron: "schedule_cron",
|
|
31405
|
-
/** The turn that launches an experiment script (Execute on a draft). */
|
|
31406
31283
|
ExperimentExecute: "experiment_execute"
|
|
31407
31284
|
};
|
|
31408
31285
|
var SessionMode = /* @__PURE__ */ ((SessionMode2) => {
|
|
@@ -31540,7 +31417,6 @@ var platformTurnEndedNotificationSchema = external_exports.object({
|
|
|
31540
31417
|
var platformPromptAcceptedParamsSchema = external_exports.object({
|
|
31541
31418
|
sessionId: external_exports.string().min(1),
|
|
31542
31419
|
promptId: external_exports.string().min(1),
|
|
31543
|
-
/** True when the prompt was parked behind an in-flight turn. */
|
|
31544
31420
|
queued: external_exports.boolean()
|
|
31545
31421
|
});
|
|
31546
31422
|
var platformPromptAcceptedNotificationSchema = external_exports.object({
|
|
@@ -31667,7 +31543,6 @@ var slackFireMentionInputSchema = external_exports.object({
|
|
|
31667
31543
|
ts: external_exports.string().min(1),
|
|
31668
31544
|
threadTs: external_exports.string().optional(),
|
|
31669
31545
|
text: external_exports.string(),
|
|
31670
|
-
/** Workspace id; present so the fake exercises the live-streaming path. */
|
|
31671
31546
|
teamId: external_exports.string().optional()
|
|
31672
31547
|
}).strict();
|
|
31673
31548
|
var slackFireCommandInputSchema = external_exports.object({
|
|
@@ -31999,6 +31874,11 @@ hint: ${hint}
|
|
|
31999
31874
|
function formatTransportError(reason, host) {
|
|
32000
31875
|
return `cannot reach server \`${host}\`: ${reason}`;
|
|
32001
31876
|
}
|
|
31877
|
+
function serverDetail(e2) {
|
|
31878
|
+
if (!(e2 instanceof TRPCClientError)) return "";
|
|
31879
|
+
const code = e2.data?.code;
|
|
31880
|
+
return e2.message && e2.message !== code ? e2.message : "";
|
|
31881
|
+
}
|
|
32002
31882
|
function printServiceError(error51, host, env = process.env) {
|
|
32003
31883
|
if (error51.kind === "auth-required") {
|
|
32004
31884
|
process.stderr.write(formatAuthRejection(error51.reason, env));
|
|
@@ -35133,9 +35013,6 @@ function buildTokenRevokeCommand(deps) {
|
|
|
35133
35013
|
var authConfigSchema2 = external_exports.object({
|
|
35134
35014
|
issuer: external_exports.string().min(1),
|
|
35135
35015
|
clientId: external_exports.string().min(1),
|
|
35136
|
-
// `cliClientId` is allowed to be absent so we can distinguish "server
|
|
35137
|
-
// too old" from generic malformed-response. The validator below picks
|
|
35138
|
-
// it up explicitly.
|
|
35139
35016
|
cliClientId: external_exports.string().min(1).optional()
|
|
35140
35017
|
});
|
|
35141
35018
|
function errorMessage(e2) {
|
|
@@ -36056,8 +35933,6 @@ var hostEntrySchema = external_exports.object({
|
|
|
36056
35933
|
cli_client_id: external_exports.string().min(1),
|
|
36057
35934
|
access_token: external_exports.string().min(1),
|
|
36058
35935
|
refresh_token: external_exports.string().min(1),
|
|
36059
|
-
// smol-toml parses unquoted `YYYY-MM-DDTHH:MM:SSZ` as Date and quoted as
|
|
36060
|
-
// string. Accept both so a hand-edited file with either shape round-trips.
|
|
36061
35936
|
expires_at: external_exports.union([external_exports.string().min(1), external_exports.date()])
|
|
36062
35937
|
});
|
|
36063
35938
|
var fileSchema = external_exports.object({
|
|
@@ -36096,7 +35971,6 @@ function fromHostAuth(value) {
|
|
|
36096
35971
|
cli_client_id: value.cliClientId,
|
|
36097
35972
|
access_token: value.accessToken,
|
|
36098
35973
|
refresh_token: value.refreshToken,
|
|
36099
|
-
// Always emit a quoted ISO 8601 string for unambiguous round-tripping.
|
|
36100
35974
|
expires_at: value.expiresAt.toISOString()
|
|
36101
35975
|
};
|
|
36102
35976
|
}
|
|
@@ -37665,11 +37539,7 @@ function renderHuman(channels) {
|
|
|
37665
37539
|
return channels.length === 0 ? "No channels connected.\n" : renderTable([
|
|
37666
37540
|
["TYPE", "IDENTIFIER", "AMBIENT"],
|
|
37667
37541
|
...channels.map(
|
|
37668
|
-
(c2) =>
|
|
37669
|
-
// Telegram has no readable identifier — the bot token is write-only.
|
|
37670
|
-
// Ambient is Slack-only.
|
|
37671
|
-
c2.type === "slack" /* Slack */ ? ["slack", c2.slackChannelId, c2.ambient ? "on" : "off"] : ["telegram", "\u2014", "\u2014"]
|
|
37672
|
-
)
|
|
37542
|
+
(c2) => c2.type === "slack" /* Slack */ ? ["slack", c2.slackChannelId, c2.ambient ? "on" : "off"] : ["telegram", "\u2014", "\u2014"]
|
|
37673
37543
|
)
|
|
37674
37544
|
]);
|
|
37675
37545
|
}
|
|
@@ -39871,11 +39741,6 @@ async function withConnection(url2, fn) {
|
|
|
39871
39741
|
};
|
|
39872
39742
|
const connection2 = new ClientSideConnection(
|
|
39873
39743
|
() => ({
|
|
39874
|
-
// Never answer a permission request. `list` can't trigger one; a
|
|
39875
|
-
// `setMode` resume might make the runtime replay a pending request, but
|
|
39876
|
-
// auto-approving (or declining) it from this throwaway connection would
|
|
39877
|
-
// be wrong — leave it unanswered so a real client (the UI) handles it on
|
|
39878
|
-
// its next connection. The connection closes right after the RPC anyway.
|
|
39879
39744
|
requestPermission() {
|
|
39880
39745
|
return new Promise(() => {
|
|
39881
39746
|
});
|
|
@@ -40480,7 +40345,7 @@ function createProcessEnvReader() {
|
|
|
40480
40345
|
|
|
40481
40346
|
// src/modules/cli/infrastructure/package-version.ts
|
|
40482
40347
|
function readPackageVersion() {
|
|
40483
|
-
return true ? "0.2.
|
|
40348
|
+
return true ? "0.2.14-rc1" : DEV_VERSION;
|
|
40484
40349
|
}
|
|
40485
40350
|
|
|
40486
40351
|
// src/modules/cli/infrastructure/version-probe.ts
|
|
@@ -40754,7 +40619,7 @@ function buildConnectCommand(deps) {
|
|
|
40754
40619
|
String(DEFAULT_TIMEOUT_SECONDS3)
|
|
40755
40620
|
).addHelpText(
|
|
40756
40621
|
"after",
|
|
40757
|
-
'\nExamples:\n dam connection connect github\n dam connection connect github --client-id Iv1.\u2026 --client-secret \u2026 # use your own OAuth app\n dam connection connect github --no-browser\n dam connection connect my-api --header-name X-API-Key --value sk-\u2026\n dam connection connect custom-client-credentials --host api.example.com \\\n --issuer-url https://auth.example.com/realms/main --client-id \u2026 --client-secret \u2026\n dam connection connect github-app --app-id 123456 --installation-id 987654 \\\n --private-key "$(cat app.pem)"\n dam connection connect github-enterprise-app --host ghe.acme.com \\\n --app-id 123456 --installation-id 987654 --private-key "$(cat app.pem)"\n dam connection connect bob --value sk-\u2026 --config model=premium-shell --config chatMode=
|
|
40622
|
+
'\nExamples:\n dam connection connect github\n dam connection connect github --client-id Iv1.\u2026 --client-secret \u2026 # use your own OAuth app\n dam connection connect github --no-browser\n dam connection connect my-api --header-name X-API-Key --value sk-\u2026\n dam connection connect custom-client-credentials --host api.example.com \\\n --issuer-url https://auth.example.com/realms/main --client-id \u2026 --client-secret \u2026\n dam connection connect github-app --app-id 123456 --installation-id 987654 \\\n --private-key "$(cat app.pem)"\n dam connection connect github-enterprise-app --host ghe.acme.com \\\n --app-id 123456 --installation-id 987654 --private-key "$(cat app.pem)"\n dam connection connect bob --value sk-\u2026 --config model=premium-shell --config chatMode=agent\n dam connection connect https://mcp.example.com\n dam connection connect https://mcp.example.com --auth none\n'
|
|
40758
40623
|
).action(async (providerOrUrl, opts) => {
|
|
40759
40624
|
const json2 = opts.json ?? false;
|
|
40760
40625
|
const timeoutSeconds = parseTimeout2(opts.timeout);
|
|
@@ -41746,8 +41611,6 @@ var SECRET_LABELS = {
|
|
|
41746
41611
|
header: "New credential value",
|
|
41747
41612
|
"client-credentials": "New client secret",
|
|
41748
41613
|
"github-app": "New private key (PEM)",
|
|
41749
|
-
// Its own client secret, not its tokens — those come from `reauth`. Only
|
|
41750
|
-
// connections carrying their own qualify; the server rejects the rest.
|
|
41751
41614
|
oauth: "New OAuth client secret"
|
|
41752
41615
|
};
|
|
41753
41616
|
function buildUpdateCommand(deps) {
|
|
@@ -42459,8 +42322,9 @@ function printTrpcReadError(e2, path2, host) {
|
|
|
42459
42322
|
return;
|
|
42460
42323
|
}
|
|
42461
42324
|
if (code === "PAYLOAD_TOO_LARGE") {
|
|
42325
|
+
const detail = serverDetail(e2);
|
|
42462
42326
|
process.stderr.write(
|
|
42463
|
-
`error: ${path2} exceeds the
|
|
42327
|
+
`error: ${path2} exceeds the server's per-file cap` + (detail ? ` (${detail})` : "") + `. Streaming transfer for individual large files isn't implemented yet.
|
|
42464
42328
|
`
|
|
42465
42329
|
);
|
|
42466
42330
|
return;
|
|
@@ -42612,9 +42476,7 @@ function buildFilePutCommand(deps) {
|
|
|
42612
42476
|
);
|
|
42613
42477
|
}
|
|
42614
42478
|
function printTrpcUploadError(e2, remotePath, host) {
|
|
42615
|
-
const
|
|
42616
|
-
const code = trpcErr?.data?.code;
|
|
42617
|
-
const message = trpcErr?.data?.message ?? "";
|
|
42479
|
+
const code = e2 instanceof TRPCClientError ? e2.data?.code : void 0;
|
|
42618
42480
|
if (code === "CONFLICT") {
|
|
42619
42481
|
process.stderr.write(
|
|
42620
42482
|
`error: ${remotePath} already exists on the agent; pass --overwrite to clobber
|
|
@@ -42623,13 +42485,14 @@ function printTrpcUploadError(e2, remotePath, host) {
|
|
|
42623
42485
|
return;
|
|
42624
42486
|
}
|
|
42625
42487
|
if (code === "FORBIDDEN") {
|
|
42626
|
-
process.stderr.write(`error: forbidden path: ${
|
|
42488
|
+
process.stderr.write(`error: forbidden path: ${remotePath}
|
|
42627
42489
|
`);
|
|
42628
42490
|
return;
|
|
42629
42491
|
}
|
|
42630
42492
|
if (code === "PAYLOAD_TOO_LARGE") {
|
|
42493
|
+
const detail = serverDetail(e2);
|
|
42631
42494
|
process.stderr.write(
|
|
42632
|
-
`error: ${remotePath} exceeds the server's per-file cap` + (
|
|
42495
|
+
`error: ${remotePath} exceeds the server's per-file cap` + (detail ? ` (${detail})` : "") + `. Streaming transfer for individual large files isn't implemented yet (use \`dam import\` for bulk transfer).
|
|
42633
42496
|
`
|
|
42634
42497
|
);
|
|
42635
42498
|
return;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dam-agents/cli",
|
|
3
3
|
"author": "IBM Corp.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.14-rc1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"homepage": "https://github.com/dam-agents/dam/tree/main/packages/cli#readme",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"vitest": "^4.1.3",
|
|
44
44
|
"ws": "^8.20.0",
|
|
45
45
|
"zod": "^4.4.3",
|
|
46
|
-
"
|
|
46
|
+
"api-server-api": "0.0.1",
|
|
47
47
|
"dev-config": "0.0.1",
|
|
48
|
-
"
|
|
48
|
+
"agent-runtime-api": "0.0.1"
|
|
49
49
|
}
|
|
50
50
|
}
|