deepline 0.3.574 → 0.3.575
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +0 -18
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/builtin-pacing.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +0 -14
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +45 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +6 -66
- package/dist/cli/{agents-7ZZSF4FS.js → agents-BCLO3KQJ.js} +204 -41
- package/dist/cli/{agents-6WN5LYUP.mjs → agents-ULGDKUTM.mjs} +182 -19
- package/dist/cli/{auth-I2QVO677.mjs → auth-4WCL7A6W.mjs} +5 -5
- package/dist/cli/auth-DXUHEL5I.js +44 -0
- package/dist/cli/{billing-YPH4GEWU.mjs → billing-7JQ6EUQU.mjs} +9 -9
- package/dist/cli/{billing-44QFBUWA.js → billing-BF5LVXOM.js} +102 -102
- package/dist/cli/{chunk-MGF3MK27.mjs → chunk-2T7XOKVL.mjs} +5 -5
- package/dist/cli/{chunk-7UR57HPJ.js → chunk-2UM3I2MY.js} +1 -1
- package/dist/cli/{chunk-SRUNYWQ2.mjs → chunk-3PVKXUSJ.mjs} +1 -1
- package/dist/cli/{chunk-W6UCS3O6.mjs → chunk-56N3XAT6.mjs} +5 -5
- package/dist/cli/{chunk-LLSCFLFU.mjs → chunk-5D7OJY4W.mjs} +1 -1
- package/dist/cli/{chunk-5E2PAGF5.js → chunk-5H6254MJ.js} +21 -21
- package/dist/cli/{chunk-VYSUJMB5.js → chunk-5VSHQG5E.js} +8 -8
- package/dist/cli/{chunk-SLXCVPN7.js → chunk-636GD4IR.js} +2 -2
- package/dist/cli/{chunk-LJLM4BUL.js → chunk-6IKLITVH.js} +6 -6
- package/dist/cli/{chunk-D6ZVRKJ2.js → chunk-737Y7QGT.js} +41 -41
- package/dist/cli/{chunk-UXIUAIL2.js → chunk-7DLAJ6JJ.js} +53 -53
- package/dist/cli/{chunk-2QYU57RG.js → chunk-AO56MZ7D.js} +3 -3
- package/dist/cli/{chunk-BUBOZKH2.js → chunk-AS5XGOZY.js} +2 -2
- package/dist/cli/{chunk-XVBEEGI4.mjs → chunk-BM536WWR.mjs} +1 -1
- package/dist/cli/{chunk-DX646HO7.mjs → chunk-BONMEBWZ.mjs} +4 -4
- package/dist/cli/{chunk-S22FSNNC.mjs → chunk-BQUAE6LQ.mjs} +1 -1
- package/dist/cli/{chunk-G7OR3GVD.mjs → chunk-CVY4MBXH.mjs} +5 -5
- package/dist/cli/{chunk-KSHZY52O.js → chunk-DMPGJCNZ.js} +72 -10
- package/dist/cli/{chunk-Q3A53SWK.mjs → chunk-DWUESXDD.mjs} +1 -1
- package/dist/cli/{chunk-IA2LTIWO.mjs → chunk-E4RYSSXX.mjs} +2 -2
- package/dist/cli/{chunk-VLUBEMWM.js → chunk-EV3OPDHF.js} +20 -20
- package/dist/cli/{chunk-ECLCRE5P.js → chunk-EZIXKNKM.js} +3 -3
- package/dist/cli/{chunk-JCO226JM.mjs → chunk-FDCU3VAJ.mjs} +72 -10
- package/dist/cli/{chunk-6B5EZOI3.js → chunk-FXXERR52.js} +10 -10
- package/dist/cli/{chunk-L2NXB4WG.mjs → chunk-FYKHAT2F.mjs} +64 -3
- package/dist/cli/{chunk-NDDGFX4X.js → chunk-G2H6SQQY.js} +11 -11
- package/dist/cli/{chunk-I62ZBEKH.js → chunk-G4WPDCXA.js} +48 -48
- package/dist/cli/{chunk-G2HW2SAP.js → chunk-GB4IZ5TV.js} +13 -13
- package/dist/cli/{chunk-7334X74C.mjs → chunk-GQZFZG6R.mjs} +2 -2
- package/dist/cli/{chunk-JY7RKJ65.mjs → chunk-H3CG72RZ.mjs} +13 -13
- package/dist/cli/{chunk-N6I3BB2O.js → chunk-H6JMRLAZ.js} +274 -274
- package/dist/cli/{chunk-6GZIT3TH.js → chunk-HEOM3FAC.js} +20 -20
- package/dist/cli/{chunk-DG56RWI2.js → chunk-HO76C7AE.js} +2 -2
- package/dist/cli/{chunk-X7RKCAMX.mjs → chunk-IAJ65IDZ.mjs} +4 -4
- package/dist/cli/{chunk-ZFXDD7VM.mjs → chunk-IBYMGR5Y.mjs} +1 -1
- package/dist/cli/{chunk-LCAXLGAY.mjs → chunk-IOWLFWWG.mjs} +2 -2
- package/dist/cli/{chunk-NRVEVKXR.mjs → chunk-JGLCK2XF.mjs} +2 -2
- package/dist/cli/{chunk-IB225ZK4.js → chunk-KNCNFL76.js} +4 -4
- package/dist/cli/{chunk-QPSBV4FD.mjs → chunk-MN7JLH2T.mjs} +2 -2
- package/dist/cli/{chunk-OH6WOID2.mjs → chunk-MWLOBURN.mjs} +2 -2
- package/dist/cli/{chunk-AFPGYZBH.js → chunk-MXK4M7HP.js} +17 -17
- package/dist/cli/{chunk-MAMGREBW.mjs → chunk-NF722E6C.mjs} +1 -1
- package/dist/cli/{chunk-7GQU46SZ.js → chunk-PQYDO72W.js} +26 -26
- package/dist/cli/{chunk-4T2U72SP.mjs → chunk-QEDRUURT.mjs} +1 -1
- package/dist/cli/{chunk-B2XLIQPH.mjs → chunk-QKP3WYSZ.mjs} +2 -2
- package/dist/cli/{chunk-VGIDPJXM.mjs → chunk-RHRRY2BX.mjs} +3 -3
- package/dist/cli/{chunk-ZTCP5BHH.mjs → chunk-RW3URFZK.mjs} +2 -2
- package/dist/cli/{chunk-XMBTAPHR.js → chunk-SKHUWQZE.js} +7 -7
- package/dist/cli/{chunk-OIZUFRTE.mjs → chunk-SYQTBHRX.mjs} +3 -3
- package/dist/cli/{chunk-PW6NKI2A.mjs → chunk-TMFR2B45.mjs} +3 -3
- package/dist/cli/{chunk-YR4REP4D.mjs → chunk-TTBZ7QXX.mjs} +1 -1
- package/dist/cli/{chunk-GMQZFWQU.mjs → chunk-UQZP7XBQ.mjs} +7 -7
- package/dist/cli/{chunk-DOZIWA66.js → chunk-V5XLENWK.js} +5 -5
- package/dist/cli/{chunk-2TMAKJBT.mjs → chunk-X47J55ZJ.mjs} +2 -2
- package/dist/cli/{chunk-ID3LGPOE.js → chunk-XFV353R2.js} +23 -23
- package/dist/cli/{chunk-2RPRSTHD.js → chunk-YNAXKA23.js} +5 -5
- package/dist/cli/{chunk-IXYVHTRZ.js → chunk-ZO65VJRJ.js} +70 -9
- package/dist/cli/{chunk-PP5RMEQQ.js → chunk-ZQXJYO5P.js} +5 -5
- package/dist/cli/{chunk-H7PVSG3L.js → chunk-ZS6DT4LD.js} +15 -15
- package/dist/cli/{chunk-Z3XFXFRT.js → chunk-ZYSJND73.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-ROQM6UB3.mjs → concurrent-runs-help-HITK6EOO.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-JLWY54WL.js +22 -0
- package/dist/cli/{csv-FWGSY4GE.js → csv-RS7XHQ4P.js} +13 -13
- package/dist/cli/{csv-R7GV33BC.mjs → csv-V2T23MXT.mjs} +4 -4
- package/dist/cli/{db-UWXA4RRV.mjs → db-OQ4RNTGE.mjs} +6 -6
- package/dist/cli/{db-OCH35YJG.js → db-WFIVRPKY.js} +27 -27
- package/dist/cli/describe-33PBWO5O.js +50 -0
- package/dist/cli/{describe-QI4HMUGE.mjs → describe-AXV2EEX3.mjs} +21 -21
- package/dist/cli/describe-core.d.mts +10 -1
- package/dist/cli/describe-core.d.ts +10 -1
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-7CFGC24E.js → executions-5H2RIWZ3.js} +8 -8
- package/dist/cli/{executions-YF3KMZZN.mjs → executions-THP5ZDBQ.mjs} +6 -6
- package/dist/cli/{feedback-DWIWBS7O.mjs → feedback-2EJPILGE.mjs} +6 -6
- package/dist/cli/{feedback-YCZHHSBS.js → feedback-UOI6UEGA.js} +14 -14
- package/dist/cli/git-2OPYEPYW.js +26 -0
- package/dist/cli/{git-XCGMQQOD.mjs → git-DI3LJIAT.mjs} +5 -5
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-5ABAJBSW.mjs → integrations-DJYS5VRK.mjs} +7 -7
- package/dist/cli/{integrations-IEZA3TGK.js → integrations-TYN2BSQ6.js} +29 -29
- package/dist/cli/{legacy-noops-KNFLJ5P2.js → legacy-noops-GXQHNLGJ.js} +9 -9
- package/dist/cli/{legacy-noops-OZMY73Y3.mjs → legacy-noops-Z457BB6O.mjs} +6 -6
- package/dist/cli/{mcp-WSPFKQPZ.mjs → mcp-NAW3GFNN.mjs} +4 -4
- package/dist/cli/{mcp-NLQAO7KP.js → mcp-WMBOOTQL.js} +24 -24
- package/dist/cli/{monitors-LPKFFTOX.mjs → monitors-A7NYAXSJ.mjs} +7 -7
- package/dist/cli/{monitors-BJYOB4S3.js → monitors-OOQVE7XR.js} +100 -100
- package/dist/cli/{org-RYPMUYUW.mjs → org-7YCDUSZE.mjs} +6 -6
- package/dist/cli/{org-WIVHI4WT.js → org-D2AMIVBS.js} +121 -121
- package/dist/cli/{outcomes-QKX7IE3O.js → outcomes-2FKZDJSQ.js} +14 -14
- package/dist/cli/{outcomes-FADJYC4I.mjs → outcomes-TNTKCUEO.mjs} +6 -6
- package/dist/cli/{play-4ZKK5Q7U.mjs → play-L6CVHSN4.mjs} +20 -20
- package/dist/cli/{play-ID73J3NP.js → play-NWKHCHVZ.js} +349 -349
- package/dist/cli/{providers-LURYBSNO.mjs → providers-22LO747B.mjs} +6 -6
- package/dist/cli/{providers-WCCGYGW6.js → providers-PZGOI5CN.js} +9 -9
- package/dist/cli/{quickstart-KCCSEE5J.mjs → quickstart-3ZRVKGMH.mjs} +4 -4
- package/dist/cli/{quickstart-LVPOU25V.js → quickstart-LLWOC2GR.js} +6 -6
- package/dist/cli/{run-XXK7DDUF.mjs → run-D46W2GUA.mjs} +48 -27
- package/dist/cli/{run-2QMJRCVA.js → run-SNF23STR.js} +70 -49
- package/dist/cli/search-H57MZPLF.js +32 -0
- package/dist/cli/{search-ZYAWW3CK.mjs → search-XWVCICIX.mjs} +7 -7
- package/dist/cli/{search-output-YNXAZSKT.js → search-output-36GHD67U.js} +8 -8
- package/dist/cli/{search-output-N45AIOB4.mjs → search-output-YM5QXFQQ.mjs} +5 -5
- package/dist/cli/{secrets-7Q3AOUAS.mjs → secrets-7PTZEFRC.mjs} +6 -6
- package/dist/cli/{secrets-MHT27L2M.js → secrets-UXCIHG5I.js} +15 -15
- package/dist/cli/{sessions-6QKOM7M3.mjs → sessions-DTXJKRP4.mjs} +6 -6
- package/dist/cli/sessions-JJZMQSH4.js +23 -0
- package/dist/cli/{settings-NPVIDENI.mjs → settings-74B6UOS4.mjs} +12 -12
- package/dist/cli/{settings-OP7Q6YX6.js → settings-EYSDZE37.js} +85 -85
- package/dist/cli/{setup-OOT3EIMF.mjs → setup-2QRZ36CH.mjs} +9 -9
- package/dist/cli/{setup-RT6GHL3W.js → setup-E7PVXBPL.js} +49 -49
- package/dist/cli/{skills-TEXI4CLZ.mjs → skills-2WZ7N3UW.mjs} +7 -7
- package/dist/cli/skills-RIF2DCZI.js +37 -0
- package/dist/cli/tools-7VRQ4GSI.js +57 -0
- package/dist/cli/{tools-G5L36M3X.mjs → tools-YK5SCUZD.mjs} +19 -19
- package/dist/cli/{update-YNKQTE4D.mjs → update-563YQK53.mjs} +9 -9
- package/dist/cli/update-CMZAIAES.js +37 -0
- package/dist/cli/{views-IQFMUMLU.mjs → views-ISNCRZUP.mjs} +6 -6
- package/dist/cli/{views-OVQ5AQAU.js → views-OLPS6TPG.js} +21 -21
- package/dist/cli/{workflow-Y5IFMI7N.mjs → workflow-B3ZKU3OR.mjs} +7 -7
- package/dist/cli/{workflow-RCBYXIFZ.js → workflow-CUSCTYMW.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +122 -122
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UKPV5U2B.js +0 -44
- package/dist/cli/concurrent-runs-help-BFVCUJF4.js +0 -22
- package/dist/cli/describe-6OI5K2SH.js +0 -50
- package/dist/cli/git-TGLNZRS3.js +0 -26
- package/dist/cli/search-AQSAXA6D.js +0 -32
- package/dist/cli/sessions-RGD7L4LC.js +0 -23
- package/dist/cli/skills-ERAA734H.js +0 -37
- package/dist/cli/tools-D5SZSIIH.js +0 -57
- package/dist/cli/update-WZ6527EF.js +0 -37
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
printCommandEnvelope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X47J55ZJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
cliFeatureEnabled
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-3PVKXUSJ.mjs";
|
|
8
|
+
import "./chunk-IBYMGR5Y.mjs";
|
|
9
9
|
import "./chunk-ASB47RXJ.mjs";
|
|
10
10
|
import "./chunk-DLIRSHV6.mjs";
|
|
11
11
|
import {
|
|
12
12
|
DeeplineError
|
|
13
13
|
} from "./chunk-Z3A2S3QM.mjs";
|
|
14
14
|
import "./chunk-2MGZAI54.mjs";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-BM536WWR.mjs";
|
|
16
16
|
import "./chunk-WZYKRD7T.mjs";
|
|
17
17
|
import "./chunk-KRD6H754.mjs";
|
|
18
18
|
|
|
@@ -69,7 +69,33 @@ function firstLine(text, max = 100) {
|
|
|
69
69
|
}
|
|
70
70
|
function describeConversation(conversation) {
|
|
71
71
|
const where = conversation.platform === "slack" ? `#${conversation.conversationName}` : `test ${conversation.conversationName}`;
|
|
72
|
-
|
|
72
|
+
const settings = [
|
|
73
|
+
...conversation.model ? [`model ${conversation.model}`] : [],
|
|
74
|
+
...conversation.outcome ? [
|
|
75
|
+
`${conversation.outcome.role === "home" ? "home of" : "linked to"} outcome ${conversation.outcome.slug}`
|
|
76
|
+
] : []
|
|
77
|
+
];
|
|
78
|
+
return `${where} (${conversation.conversationId}${settings.length ? `; ${settings.join("; ")}` : ""})`;
|
|
79
|
+
}
|
|
80
|
+
function parseModel(value) {
|
|
81
|
+
if (value === void 0) return void 0;
|
|
82
|
+
const model = value.trim();
|
|
83
|
+
return model === "" || model.toLowerCase() === "default" ? null : model;
|
|
84
|
+
}
|
|
85
|
+
function describeOutcomeChange(change) {
|
|
86
|
+
const { conversation } = change;
|
|
87
|
+
const where = `#${conversation.conversationName}`;
|
|
88
|
+
if (!conversation.outcome) {
|
|
89
|
+
return [
|
|
90
|
+
change.changed ? `${change.agentName} no longer works toward an outcome in ${where}.` : `${change.agentName} works toward no outcome in ${where}.`
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
const { slug, role } = conversation.outcome;
|
|
94
|
+
return [
|
|
95
|
+
role === "home" ? `${where} is the home of outcome ${slug}: ${change.agentName} works toward it there.` : `${where} is linked to outcome ${slug}: ${change.agentName} answers there with it in view.`,
|
|
96
|
+
role === "linked" ? "It is woken in the outcome\u2019s home channel, not here." : change.woken ? "It is woken when something on the outcome concerns it: a schedule firing, a task for it, an answered ask." : "It is not woken between mentions here: this deployment\u2019s app cannot be rung.",
|
|
97
|
+
`See the outcome with: deepline outcomes describe ${slug}`
|
|
98
|
+
];
|
|
73
99
|
}
|
|
74
100
|
function describeAgentLine(agent) {
|
|
75
101
|
const channels = agent.conversations.length ? agent.conversations.map(describeConversation).join(", ") : "no channels";
|
|
@@ -82,6 +108,7 @@ function describeAgent(agent) {
|
|
|
82
108
|
"Instructions:",
|
|
83
109
|
...agent.instructions.split("\n").map((line) => ` ${line}`),
|
|
84
110
|
`Skills: ${agent.skillNames.length ? agent.skillNames.join(", ") : "none"}`,
|
|
111
|
+
`Model: ${agent.model ?? "the default (see deepline agents models)"}`,
|
|
85
112
|
agent.conversations.length ? `Channels: ${agent.conversations.map(describeConversation).join(", ")}` : `Channels: none. Bind one with: deepline agents channels add ${agent.name} <channel-id>`
|
|
86
113
|
];
|
|
87
114
|
}
|
|
@@ -381,6 +408,30 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
381
408
|
print(overview, "agents billing", describeOverview(overview), options);
|
|
382
409
|
}
|
|
383
410
|
);
|
|
411
|
+
agents.command("models").description(
|
|
412
|
+
"List the models an agent or one of its channels can run on, and which your workspace\u2019s key can run."
|
|
413
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
414
|
+
const { http } = getAuthedHttpClient();
|
|
415
|
+
const result = await http.get(
|
|
416
|
+
`${AGENT_PATH}/models`
|
|
417
|
+
);
|
|
418
|
+
const keySet = result.models.some((model) => model.available);
|
|
419
|
+
print(
|
|
420
|
+
result,
|
|
421
|
+
"agent models",
|
|
422
|
+
[
|
|
423
|
+
...keySet ? [] : [
|
|
424
|
+
"No model key is set, so no model can run yet. An admin runs: deepline agents billing set < key.txt"
|
|
425
|
+
],
|
|
426
|
+
...result.models.map(
|
|
427
|
+
(model) => `${model.id} \u2014 ${model.label}${model.id === result.default ? " (the default)" : ""}; say: ${model.aliases.join(", ")}; ${model.available ? "ready" : keySet ? `runs on an ${MODEL_PROVIDER_NAMES[model.provider]} key, which is not the key your agents run on` : `runs on an ${MODEL_PROVIDER_NAMES[model.provider]} key`}`
|
|
428
|
+
),
|
|
429
|
+
"Set an agent\u2019s model with: deepline agents update <agent> --model <model>",
|
|
430
|
+
"Set one channel\u2019s with: deepline agents channels set <channel-id> --model <model>, or ask the agent there to switch."
|
|
431
|
+
],
|
|
432
|
+
options
|
|
433
|
+
);
|
|
434
|
+
});
|
|
384
435
|
}
|
|
385
436
|
function registerAgentCommands(agents) {
|
|
386
437
|
agents.command("get").description("Show one agent: its instructions, skills and channels.").argument("<name>", "Agent name").option("--json", "Emit JSON output").action(async (name, options) => {
|
|
@@ -392,9 +443,13 @@ function registerAgentCommands(agents) {
|
|
|
392
443
|
});
|
|
393
444
|
agents.command("create").description(
|
|
394
445
|
"Create an agent you own, with instructions and optional skills from the workspace library."
|
|
395
|
-
).argument("<name>", "Agent name: lower-case letters, digits and dashes").option("--instructions <text>", "What the agent does and never does").option("--instructions-file <path>", "Read the instructions from a file").option("--skills <names>", "Comma-separated library skill names").option(
|
|
446
|
+
).argument("<name>", "Agent name: lower-case letters, digits and dashes").option("--instructions <text>", "What the agent does and never does").option("--instructions-file <path>", "Read the instructions from a file").option("--skills <names>", "Comma-separated library skill names").option(
|
|
447
|
+
"--model <model>",
|
|
448
|
+
"The model it runs on, from deepline agents models (for example sonnet)"
|
|
449
|
+
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
396
450
|
async (name, options) => {
|
|
397
451
|
const instructions = readInstructions(options);
|
|
452
|
+
const model = parseModel(options.model);
|
|
398
453
|
if (instructions === void 0) {
|
|
399
454
|
throw new AgentUsageError(
|
|
400
455
|
'Pass --instructions "<what the agent does>" or --instructions-file <path>.'
|
|
@@ -403,7 +458,8 @@ function registerAgentCommands(agents) {
|
|
|
403
458
|
const body = {
|
|
404
459
|
name: requireArgument(name, "an agent name"),
|
|
405
460
|
instructions,
|
|
406
|
-
skills: parseSkills(options.skills) ?? []
|
|
461
|
+
skills: parseSkills(options.skills) ?? [],
|
|
462
|
+
...typeof model === "string" ? { model } : {}
|
|
407
463
|
};
|
|
408
464
|
if (options.dryRun) {
|
|
409
465
|
printDryRun("POST", `${AGENT_PATH}/agents`, body, options);
|
|
@@ -426,23 +482,28 @@ function registerAgentCommands(agents) {
|
|
|
426
482
|
}
|
|
427
483
|
);
|
|
428
484
|
agents.command("update").description(
|
|
429
|
-
"Replace an agent\u2019s instructions or
|
|
485
|
+
"Replace an agent\u2019s instructions, skills or model (its creator or an admin)."
|
|
430
486
|
).argument("<name>", "Agent name").option("--instructions <text>", "New instructions").option("--instructions-file <path>", "Read new instructions from a file").option(
|
|
431
487
|
"--skills <names>",
|
|
432
488
|
'Comma-separated library skill names; replaces the list ("" clears it)'
|
|
489
|
+
).option(
|
|
490
|
+
"--model <model>",
|
|
491
|
+
'The model it runs on, from deepline agents models ("default" returns it to the default)'
|
|
433
492
|
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
434
493
|
async (name, options) => {
|
|
435
494
|
const instructions = readInstructions(options);
|
|
436
495
|
const skills = parseSkills(options.skills);
|
|
437
|
-
|
|
496
|
+
const model = parseModel(options.model);
|
|
497
|
+
if (instructions === void 0 && skills === void 0 && model === void 0) {
|
|
438
498
|
throw new AgentUsageError(
|
|
439
|
-
"Pass --instructions, --instructions-file or --
|
|
499
|
+
"Pass --instructions, --instructions-file, --skills or --model."
|
|
440
500
|
);
|
|
441
501
|
}
|
|
442
502
|
const path = `${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`;
|
|
443
503
|
const body = {
|
|
444
504
|
...instructions !== void 0 ? { instructions } : {},
|
|
445
|
-
...skills !== void 0 ? { skills } : {}
|
|
505
|
+
...skills !== void 0 ? { skills } : {},
|
|
506
|
+
...model !== void 0 ? { model } : {}
|
|
446
507
|
};
|
|
447
508
|
if (options.dryRun) {
|
|
448
509
|
printDryRun("PATCH", path, body, options);
|
|
@@ -473,40 +534,104 @@ function registerAgentCommands(agents) {
|
|
|
473
534
|
}
|
|
474
535
|
function registerChannelCommands(agents) {
|
|
475
536
|
const channels = agents.command("channels").description(
|
|
476
|
-
"Bind Slack channels to agents. A channel answers @mentions with one agent."
|
|
537
|
+
"Bind Slack channels to agents, and say what an agent runs on and works toward in each. A channel answers @mentions with one agent."
|
|
477
538
|
);
|
|
478
539
|
channels.command("add").description(
|
|
479
|
-
"Bind a channel the agent\u2019s Slack app was invited to (the agent\u2019s creator or an admin)."
|
|
480
|
-
).argument("<agent>", "Agent name").argument("<channel-id>", "Slack channel id, for example C0123456789").
|
|
540
|
+
"Bind a channel the agent\u2019s Slack app was invited to (the agent\u2019s creator or an admin). With --outcome the channel is where the agent works toward that outcome."
|
|
541
|
+
).argument("<agent>", "Agent name").argument("<channel-id>", "Slack channel id, for example C0123456789").option(
|
|
542
|
+
"--outcome <outcome>",
|
|
543
|
+
"The outcome the agent works toward here, as deepline outcomes list names it. The channel becomes the outcome\u2019s home: the agent is woken there."
|
|
544
|
+
).option(
|
|
545
|
+
"--linked",
|
|
546
|
+
"With --outcome: link the channel instead. The agent answers here with the outcome in view; its home channel is another one."
|
|
547
|
+
).addOption(new Option("--test-channel").hideHelp()).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
481
548
|
async (agentName, channelId, options) => {
|
|
549
|
+
if (options.linked && options.outcome === void 0) {
|
|
550
|
+
throw new AgentUsageError("--linked goes with --outcome <outcome>.");
|
|
551
|
+
}
|
|
482
552
|
const body = {
|
|
483
553
|
agent: requireArgument(agentName, "an agent name"),
|
|
484
554
|
channel_id: requireArgument(
|
|
485
555
|
channelId,
|
|
486
556
|
"a channel id such as C0123456789"
|
|
487
557
|
),
|
|
488
|
-
...options.testChannel ? { test_channel: true } : {}
|
|
558
|
+
...options.testChannel ? { test_channel: true } : {},
|
|
559
|
+
...options.outcome !== void 0 ? {
|
|
560
|
+
outcome: requireArgument(options.outcome, "an outcome name"),
|
|
561
|
+
outcome_role: options.linked ? "linked" : "home"
|
|
562
|
+
} : {}
|
|
489
563
|
};
|
|
490
564
|
if (options.dryRun) {
|
|
491
565
|
printDryRun("POST", `${AGENT_PATH}/channels`, body, options);
|
|
492
566
|
return;
|
|
493
567
|
}
|
|
494
568
|
const { http } = getAuthedHttpClient();
|
|
495
|
-
const result = await http.post(
|
|
496
|
-
`${AGENT_PATH}/channels`,
|
|
497
|
-
body
|
|
498
|
-
);
|
|
569
|
+
const result = await http.post(`${AGENT_PATH}/channels`, body);
|
|
499
570
|
print(
|
|
500
571
|
result,
|
|
501
572
|
"agent channel",
|
|
502
573
|
[
|
|
503
574
|
result.created ? `Bound ${body.channel_id} to ${result.agent.name}.` : `${body.channel_id} already answers with ${result.agent.name}.`,
|
|
575
|
+
...result.outcome ? describeOutcomeChange(result.outcome) : [],
|
|
504
576
|
...describeAgent(result.agent)
|
|
505
577
|
],
|
|
506
578
|
options
|
|
507
579
|
);
|
|
508
580
|
}
|
|
509
581
|
);
|
|
582
|
+
channels.command("set").description(
|
|
583
|
+
"Change what a bound channel\u2019s agent runs on or works toward there (the agent\u2019s creator or an admin)."
|
|
584
|
+
).argument("<channel-id>", "A bound channel id").option(
|
|
585
|
+
"--model <model>",
|
|
586
|
+
'This channel\u2019s own model, over its agent\u2019s, from deepline agents models ("default" follows the agent again)'
|
|
587
|
+
).option(
|
|
588
|
+
"--outcome <outcome>",
|
|
589
|
+
"The outcome the agent works toward here. The channel becomes the outcome\u2019s home."
|
|
590
|
+
).option(
|
|
591
|
+
"--linked",
|
|
592
|
+
"With --outcome: link the channel instead of making it the home"
|
|
593
|
+
).option("--no-outcome", "The agent works toward no outcome here").option(
|
|
594
|
+
"--platform <platform>",
|
|
595
|
+
"slack or test, when the id is bound on both"
|
|
596
|
+
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
597
|
+
async (channelId, options) => {
|
|
598
|
+
const platform = requirePlatform(options.platform);
|
|
599
|
+
const model = parseModel(options.model);
|
|
600
|
+
const outcome = typeof options.outcome === "string" ? requireArgument(options.outcome, "an outcome name") : options.outcome === false ? null : void 0;
|
|
601
|
+
if (model === void 0 && outcome === void 0) {
|
|
602
|
+
throw new AgentUsageError(
|
|
603
|
+
"Pass --model, --outcome <outcome> or --no-outcome."
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
if (options.linked && typeof outcome !== "string") {
|
|
607
|
+
throw new AgentUsageError("--linked goes with --outcome <outcome>.");
|
|
608
|
+
}
|
|
609
|
+
const id = requireArgument(channelId, "a channel id");
|
|
610
|
+
const path = `${AGENT_PATH}/channels/${encodeURIComponent(id)}${platform ? `?platform=${platform}` : ""}`;
|
|
611
|
+
const body = {
|
|
612
|
+
...model !== void 0 ? { model } : {},
|
|
613
|
+
...outcome !== void 0 ? { outcome } : {},
|
|
614
|
+
...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {}
|
|
615
|
+
};
|
|
616
|
+
if (options.dryRun) {
|
|
617
|
+
printDryRun("PATCH", path, body, options);
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
const { http } = getAuthedHttpClient();
|
|
621
|
+
const result = await http.patch(path, body);
|
|
622
|
+
print(
|
|
623
|
+
result,
|
|
624
|
+
"agent channel",
|
|
625
|
+
[
|
|
626
|
+
...result.model ? [
|
|
627
|
+
result.model.from === "conversation" ? `${id} runs on ${result.model.model.label} (${result.model.model.id}). Its agent\u2019s other channels are unchanged.` : `${id} follows its agent\u2019s model: ${result.model.model.label} (${result.model.model.id}).`
|
|
628
|
+
] : [],
|
|
629
|
+
...result.outcome ? describeOutcomeChange(result.outcome) : []
|
|
630
|
+
],
|
|
631
|
+
options
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
);
|
|
510
635
|
channels.command("remove").description(
|
|
511
636
|
"Unbind a channel from its agent (the agent\u2019s creator or an admin). Unbound channels are a no-op."
|
|
512
637
|
).argument("<channel-id>", "Channel id").option(
|
|
@@ -541,6 +666,14 @@ function describeSlackInstallation(installation) {
|
|
|
541
666
|
const reason = installation.uninstallReason === "tokens_revoked" ? "its token was revoked" : "removed from Slack";
|
|
542
667
|
return `${team}: not installed since ${new Date(installation.uninstalledAt ?? installation.updatedAt).toISOString()} (${reason}); install it again to bring its channels back`;
|
|
543
668
|
}
|
|
669
|
+
function slackLinkCode(value) {
|
|
670
|
+
const text = requireArgument(value, "the code from the link");
|
|
671
|
+
try {
|
|
672
|
+
return new URL(text).searchParams.get("code") ?? text;
|
|
673
|
+
} catch {
|
|
674
|
+
return text;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
544
677
|
function registerSlackCommands(agents) {
|
|
545
678
|
const slack = agents.command("slack").description(
|
|
546
679
|
"Add the agent to Slack workspaces, each with its own bot token, and see where it is installed."
|
|
@@ -564,6 +697,36 @@ function registerSlackCommands(agents) {
|
|
|
564
697
|
options
|
|
565
698
|
);
|
|
566
699
|
});
|
|
700
|
+
slack.command("link").description(
|
|
701
|
+
"Say which Slack user you are, with the code from the link the agent showed you in Slack. Your clicks there (answering an ask, connecting a channel) are then made as you."
|
|
702
|
+
).argument("<code>", "The code from the link, or the whole link").option("--json", "Emit JSON output").action(async (code, options) => {
|
|
703
|
+
const { http } = getAuthedHttpClient();
|
|
704
|
+
const result = await http.post(`${AGENT_PATH}/slack/link`, { code: slackLinkCode(code) });
|
|
705
|
+
print(
|
|
706
|
+
result,
|
|
707
|
+
"agent slack link",
|
|
708
|
+
[
|
|
709
|
+
`Linked Slack user ${result.slackUserId} in ${result.slackTeamId} to your Deepline account. Click again in Slack.`
|
|
710
|
+
],
|
|
711
|
+
options
|
|
712
|
+
);
|
|
713
|
+
});
|
|
714
|
+
slack.command("unlink").description(
|
|
715
|
+
"Forget which Slack user you are in this workspace. Your clicks in Slack decide nothing until you link again."
|
|
716
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
717
|
+
const { http } = getAuthedHttpClient();
|
|
718
|
+
const result = await http.delete(
|
|
719
|
+
`${AGENT_PATH}/slack/link`
|
|
720
|
+
);
|
|
721
|
+
print(
|
|
722
|
+
result,
|
|
723
|
+
"agent slack unlink",
|
|
724
|
+
[
|
|
725
|
+
result.removed ? "Unlinked your Slack user." : "No Slack user was linked to your account."
|
|
726
|
+
],
|
|
727
|
+
options
|
|
728
|
+
);
|
|
729
|
+
});
|
|
567
730
|
slack.command("status").description(
|
|
568
731
|
"List the Slack workspaces this workspace installed the agent in."
|
|
569
732
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-TMFR2B45.mjs";
|
|
18
|
+
import "./chunk-X47J55ZJ.mjs";
|
|
19
|
+
import "./chunk-3PVKXUSJ.mjs";
|
|
20
|
+
import "./chunk-IBYMGR5Y.mjs";
|
|
21
21
|
import "./chunk-ASB47RXJ.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-Z3A2S3QM.mjs";
|
|
24
24
|
import "./chunk-2MGZAI54.mjs";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-BM536WWR.mjs";
|
|
26
26
|
import "./chunk-WZYKRD7T.mjs";
|
|
27
27
|
import "./chunk-KRD6H754.mjs";
|
|
28
28
|
export {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunk7DLAJ6JJjs = require('./chunk-7DLAJ6JJ.js');
|
|
18
|
+
require('./chunk-EV3OPDHF.js');
|
|
19
|
+
require('./chunk-AO56MZ7D.js');
|
|
20
|
+
require('./chunk-KNCNFL76.js');
|
|
21
|
+
require('./chunk-6VLFQZK6.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-LFQJW4S2.js');
|
|
24
|
+
require('./chunk-CFJFUVX2.js');
|
|
25
|
+
require('./chunk-2UM3I2MY.js');
|
|
26
|
+
require('./chunk-OG64RBAC.js');
|
|
27
|
+
require('./chunk-COGTRVWW.js');
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunk7DLAJ6JJjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunk7DLAJ6JJjs.authStatusLine; exports.clearPendingClaim = _chunk7DLAJ6JJjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunk7DLAJ6JJjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunk7DLAJ6JJjs.handleRegister; exports.handleStatus = _chunk7DLAJ6JJjs.handleStatus; exports.handleWait = _chunk7DLAJ6JJjs.handleWait; exports.httpJson = _chunk7DLAJ6JJjs.httpJson; exports.readPendingAuthClaim = _chunk7DLAJ6JJjs.readPendingAuthClaim; exports.readStatusBanner = _chunk7DLAJ6JJjs.readStatusBanner; exports.registerAuthCommands = _chunk7DLAJ6JJjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunk7DLAJ6JJjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunk7DLAJ6JJjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunk7DLAJ6JJjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunk7DLAJ6JJjs.statusBannerLine;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
concurrentRunsLine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QKP3WYSZ.mjs";
|
|
4
|
+
import "./chunk-TMFR2B45.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DeeplineClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IOWLFWWG.mjs";
|
|
8
8
|
import {
|
|
9
9
|
PUBLIC_PLAN_SKUS,
|
|
10
10
|
iterateCursorPages,
|
|
11
11
|
requireBillingIdempotencyKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QEDRUURT.mjs";
|
|
13
13
|
import "./chunk-FZHMNK6F.mjs";
|
|
14
14
|
import "./chunk-5TYLSS4Q.mjs";
|
|
15
15
|
import "./chunk-PSX3WHIH.mjs";
|
|
16
16
|
import {
|
|
17
17
|
PLAY_RUNTIME_PRICING_NOTE
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FDCU3VAJ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PRICING_PAGE_NOTE
|
|
21
21
|
} from "./chunk-HECXJBED.mjs";
|
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
openInBrowser,
|
|
33
33
|
printCommandEnvelope,
|
|
34
34
|
shouldEmitJson
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-X47J55ZJ.mjs";
|
|
36
|
+
import "./chunk-3PVKXUSJ.mjs";
|
|
37
|
+
import "./chunk-IBYMGR5Y.mjs";
|
|
38
38
|
import {
|
|
39
39
|
AuthError,
|
|
40
40
|
ConfigError
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
DeeplineError
|
|
45
45
|
} from "./chunk-Z3A2S3QM.mjs";
|
|
46
46
|
import "./chunk-2MGZAI54.mjs";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-BM536WWR.mjs";
|
|
48
48
|
import "./chunk-WZYKRD7T.mjs";
|
|
49
49
|
import "./chunk-KRD6H754.mjs";
|
|
50
50
|
|