deepline 0.3.575 → 0.3.577
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 +13 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +145 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +153 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +41 -5
- package/dist/cli/{agents-ULGDKUTM.mjs → agents-SUJRATC2.mjs} +58 -10
- package/dist/cli/{agents-BCLO3KQJ.js → agents-ZIGK3FQ2.js} +84 -36
- package/dist/cli/auth-A5U6GVCF.js +44 -0
- package/dist/cli/{auth-4WCL7A6W.mjs → auth-TRKPRZK6.mjs} +5 -5
- package/dist/cli/{billing-BF5LVXOM.js → billing-6RAF4DQY.js} +102 -102
- package/dist/cli/{billing-7JQ6EUQU.mjs → billing-WPQT3QRS.mjs} +9 -9
- package/dist/cli/{chunk-636GD4IR.js → chunk-2NFDB6CL.js} +2 -2
- package/dist/cli/{chunk-UQZP7XBQ.mjs → chunk-425SUSDJ.mjs} +5 -5
- package/dist/cli/{chunk-TTBZ7QXX.mjs → chunk-4ANO4DM5.mjs} +1 -1
- package/dist/cli/{chunk-V5XLENWK.js → chunk-772IV64Y.js} +5 -5
- package/dist/cli/{chunk-NF722E6C.mjs → chunk-APJ6YIYW.mjs} +1 -1
- package/dist/cli/{chunk-XFV353R2.js → chunk-APOWCBO7.js} +23 -23
- package/dist/cli/{chunk-IOWLFWWG.mjs → chunk-ATW77ZBL.mjs} +2 -2
- package/dist/cli/{chunk-RHRRY2BX.mjs → chunk-CCGFSELM.mjs} +3 -3
- package/dist/cli/{chunk-3PVKXUSJ.mjs → chunk-CWHXE6HJ.mjs} +1 -1
- package/dist/cli/{chunk-5H6254MJ.js → chunk-CZF2LKIT.js} +16 -16
- package/dist/cli/{chunk-GQZFZG6R.mjs → chunk-DA5C5WOI.mjs} +2 -2
- package/dist/cli/{chunk-EZIXKNKM.js → chunk-DJP7CJQC.js} +3 -3
- package/dist/cli/{chunk-G4WPDCXA.js → chunk-EJN43WGD.js} +48 -48
- package/dist/cli/{chunk-ZYSJND73.js → chunk-EKZ6JD6K.js} +9 -9
- package/dist/cli/{chunk-737Y7QGT.js → chunk-EV47DV25.js} +41 -41
- package/dist/cli/{chunk-IBYMGR5Y.mjs → chunk-FHYNK7GL.mjs} +1 -1
- package/dist/cli/{chunk-7DLAJ6JJ.js → chunk-FRYLXDNP.js} +53 -53
- package/dist/cli/{chunk-EV3OPDHF.js → chunk-FXN5WSTY.js} +20 -20
- package/dist/cli/{chunk-MN7JLH2T.mjs → chunk-GFWVBXAK.mjs} +2 -2
- package/dist/cli/{chunk-MWLOBURN.mjs → chunk-H6NF5SNY.mjs} +2 -2
- package/dist/cli/{chunk-E4RYSSXX.mjs → chunk-I44Y4MPK.mjs} +1 -1
- package/dist/cli/{chunk-BM536WWR.mjs → chunk-ID5WQZ2H.mjs} +11 -1
- package/dist/cli/{chunk-ZS6DT4LD.js → chunk-ITK5TGQ7.js} +15 -15
- package/dist/cli/{chunk-AO56MZ7D.js → chunk-JHQ7FORY.js} +3 -3
- package/dist/cli/{chunk-G2H6SQQY.js → chunk-JWLV3XRF.js} +7 -7
- package/dist/cli/{chunk-DMPGJCNZ.js → chunk-KVDIN2YW.js} +29 -1
- package/dist/cli/{chunk-5D7OJY4W.mjs → chunk-LUQMTNFB.mjs} +1 -1
- package/dist/cli/{chunk-H3CG72RZ.mjs → chunk-LXM36EXW.mjs} +11 -11
- package/dist/cli/{chunk-QKP3WYSZ.mjs → chunk-MDP3CNDM.mjs} +2 -2
- package/dist/cli/{chunk-H6JMRLAZ.js → chunk-MOWABWHT.js} +100 -100
- package/dist/cli/{chunk-ZQXJYO5P.js → chunk-MTHAVEQN.js} +5 -5
- package/dist/cli/{chunk-IAJ65IDZ.mjs → chunk-MTM6WNPP.mjs} +4 -4
- package/dist/cli/{chunk-CVY4MBXH.mjs → chunk-MVCKEPWF.mjs} +5 -5
- package/dist/cli/{chunk-JGLCK2XF.mjs → chunk-N6EU2FRF.mjs} +2 -2
- package/dist/cli/{chunk-TMFR2B45.mjs → chunk-NDMKFA6W.mjs} +3 -3
- package/dist/cli/{chunk-HO76C7AE.js → chunk-NMSDMXYS.js} +2 -2
- package/dist/cli/{chunk-FXXERR52.js → chunk-NRBIYZUG.js} +10 -10
- package/dist/cli/{chunk-YNAXKA23.js → chunk-NVJGVNEN.js} +5 -5
- package/dist/cli/{chunk-X47J55ZJ.mjs → chunk-O35BHZLQ.mjs} +2 -2
- package/dist/cli/{chunk-2UM3I2MY.js → chunk-OBZB4J7B.js} +11 -1
- package/dist/cli/{chunk-2T7XOKVL.mjs → chunk-OQQDNJ2D.mjs} +5 -5
- package/dist/cli/{chunk-FDCU3VAJ.mjs → chunk-ORLJIJVX.mjs} +29 -1
- package/dist/cli/{chunk-BQUAE6LQ.mjs → chunk-Q3WDT3YA.mjs} +1 -1
- package/dist/cli/{chunk-GB4IZ5TV.js → chunk-QXAPAHIG.js} +13 -13
- package/dist/cli/{chunk-KNCNFL76.js → chunk-RSZSKTRC.js} +4 -4
- package/dist/cli/{chunk-HEOM3FAC.js → chunk-RVICQWXU.js} +20 -20
- package/dist/cli/{chunk-SYQTBHRX.mjs → chunk-U6Y4HX6J.mjs} +3 -3
- package/dist/cli/{chunk-AS5XGOZY.js → chunk-V5SF5CJ7.js} +2 -2
- package/dist/cli/{chunk-BONMEBWZ.mjs → chunk-WP4Q5PTK.mjs} +4 -4
- package/dist/cli/{chunk-5VSHQG5E.js → chunk-X5ZE7K4J.js} +8 -8
- package/dist/cli/{chunk-56N3XAT6.mjs → chunk-X7Y4T7CV.mjs} +5 -5
- package/dist/cli/{chunk-QEDRUURT.mjs → chunk-XQTJET2Y.mjs} +1 -1
- package/dist/cli/{chunk-6IKLITVH.js → chunk-Y37JQZBP.js} +6 -6
- package/dist/cli/{chunk-PQYDO72W.js → chunk-ZHJIDDYR.js} +26 -26
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-HITK6EOO.mjs → concurrent-runs-help-6CGXMTFQ.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-VJDPVGXM.js +22 -0
- package/dist/cli/{csv-RS7XHQ4P.js → csv-7UZT2LGE.js} +13 -13
- package/dist/cli/{csv-V2T23MXT.mjs → csv-L7P6PC6I.mjs} +4 -4
- package/dist/cli/{db-OQ4RNTGE.mjs → db-4OOEC5KV.mjs} +6 -6
- package/dist/cli/{db-WFIVRPKY.js → db-7KETOIZY.js} +27 -27
- package/dist/cli/{describe-AXV2EEX3.mjs → describe-M6HEFS46.mjs} +18 -18
- package/dist/cli/describe-RLWJYZIR.js +50 -0
- package/dist/cli/{executions-THP5ZDBQ.mjs → executions-U27R2LY4.mjs} +6 -6
- package/dist/cli/{executions-5H2RIWZ3.js → executions-UIR6RQFM.js} +8 -8
- package/dist/cli/{feedback-UOI6UEGA.js → feedback-CQ5FUE4T.js} +14 -14
- package/dist/cli/{feedback-2EJPILGE.mjs → feedback-UUUISTGQ.mjs} +6 -6
- package/dist/cli/{git-DI3LJIAT.mjs → git-DTILSRIQ.mjs} +5 -5
- package/dist/cli/git-ZGDD3BVX.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-TYN2BSQ6.js → integrations-ABBLLEJH.js} +29 -29
- package/dist/cli/{integrations-DJYS5VRK.mjs → integrations-NNACG3HD.mjs} +7 -7
- package/dist/cli/{legacy-noops-GXQHNLGJ.js → legacy-noops-3JLS5OD7.js} +9 -9
- package/dist/cli/{legacy-noops-Z457BB6O.mjs → legacy-noops-KQW7AIYU.mjs} +6 -6
- package/dist/cli/{mcp-NAW3GFNN.mjs → mcp-7NHGPYZH.mjs} +4 -4
- package/dist/cli/{mcp-WMBOOTQL.js → mcp-JPBFKR26.js} +24 -24
- package/dist/cli/{monitors-OOQVE7XR.js → monitors-J6HK5KCN.js} +100 -100
- package/dist/cli/{monitors-A7NYAXSJ.mjs → monitors-JOE2DALW.mjs} +7 -7
- package/dist/cli/{org-7YCDUSZE.mjs → org-VZZ4LN4O.mjs} +6 -6
- package/dist/cli/{org-D2AMIVBS.js → org-WFZFQIXQ.js} +121 -121
- package/dist/cli/{outcomes-TNTKCUEO.mjs → outcomes-H2WEZYNT.mjs} +6 -6
- package/dist/cli/{outcomes-2FKZDJSQ.js → outcomes-RZWL47BJ.js} +14 -14
- package/dist/cli/{play-NWKHCHVZ.js → play-2ZEBUF5T.js} +336 -336
- package/dist/cli/{play-L6CVHSN4.mjs → play-KMWA7GVN.mjs} +19 -19
- package/dist/cli/{providers-22LO747B.mjs → providers-2BIA3OWA.mjs} +6 -6
- package/dist/cli/{providers-PZGOI5CN.js → providers-57AZWFSW.js} +9 -9
- package/dist/cli/{quickstart-LLWOC2GR.js → quickstart-EYJFERQO.js} +6 -6
- package/dist/cli/{quickstart-3ZRVKGMH.mjs → quickstart-NSDM2RXV.mjs} +4 -4
- package/dist/cli/{run-SNF23STR.js → run-BW62DZGQ.js} +44 -44
- package/dist/cli/{run-D46W2GUA.mjs → run-X6H5SCEE.mjs} +23 -23
- package/dist/cli/{search-XWVCICIX.mjs → search-2VN74P5N.mjs} +7 -7
- package/dist/cli/search-HYRDZVPQ.js +32 -0
- package/dist/cli/{search-output-36GHD67U.js → search-output-SFWQVBYU.js} +6 -6
- package/dist/cli/{search-output-YM5QXFQQ.mjs → search-output-VN7XOZEQ.mjs} +4 -4
- package/dist/cli/{secrets-7PTZEFRC.mjs → secrets-4M26N436.mjs} +6 -6
- package/dist/cli/{secrets-UXCIHG5I.js → secrets-OIPKG2H7.js} +15 -15
- package/dist/cli/sessions-5P2KZOQE.js +23 -0
- package/dist/cli/{sessions-DTXJKRP4.mjs → sessions-SYFH23L3.mjs} +6 -6
- package/dist/cli/{settings-74B6UOS4.mjs → settings-4HPF3T4P.mjs} +12 -12
- package/dist/cli/{settings-EYSDZE37.js → settings-5NB4HZYL.js} +85 -85
- package/dist/cli/{setup-2QRZ36CH.mjs → setup-CI74F6CL.mjs} +9 -9
- package/dist/cli/{setup-E7PVXBPL.js → setup-JV3F5C7P.js} +49 -49
- package/dist/cli/{skills-2WZ7N3UW.mjs → skills-76CM4GHO.mjs} +7 -7
- package/dist/cli/skills-PJ5EL32L.js +37 -0
- package/dist/cli/{tools-YK5SCUZD.mjs → tools-SVGLDWOC.mjs} +17 -17
- package/dist/cli/tools-Y5ID2SPK.js +57 -0
- package/dist/cli/update-FSUMCMNZ.js +37 -0
- package/dist/cli/{update-563YQK53.mjs → update-KPMDOZRX.mjs} +9 -9
- package/dist/cli/{views-ISNCRZUP.mjs → views-KW54SAES.mjs} +6 -6
- package/dist/cli/{views-OLPS6TPG.js → views-R37NWN6J.js} +21 -21
- package/dist/cli/{workflow-B3ZKU3OR.mjs → workflow-3MIRQV4Q.mjs} +7 -7
- package/dist/cli/{workflow-CUSCTYMW.js → workflow-BKRKUNYS.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -116
- package/dist/release.d.mts +9 -1
- package/dist/release.d.ts +9 -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-DXUHEL5I.js +0 -44
- package/dist/cli/concurrent-runs-help-JLWY54WL.js +0 -22
- package/dist/cli/describe-33PBWO5O.js +0 -50
- package/dist/cli/git-2OPYEPYW.js +0 -26
- package/dist/cli/search-H57MZPLF.js +0 -32
- package/dist/cli/sessions-JJZMQSH4.js +0 -23
- package/dist/cli/skills-RIF2DCZI.js +0 -37
- package/dist/cli/tools-7VRQ4GSI.js +0 -57
- package/dist/cli/update-CMZAIAES.js +0 -37
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkFXN5WSTYjs = require('./chunk-FXN5WSTY.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkJHQ7FORYjs = require('./chunk-JHQ7FORY.js');
|
|
8
|
+
require('./chunk-RSZSKTRC.js');
|
|
9
9
|
require('./chunk-6VLFQZK6.js');
|
|
10
10
|
require('./chunk-XNYIZMNQ.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
14
14
|
require('./chunk-CFJFUVX2.js');
|
|
15
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-OBZB4J7B.js');
|
|
16
16
|
require('./chunk-OG64RBAC.js');
|
|
17
17
|
require('./chunk-COGTRVWW.js');
|
|
18
18
|
|
|
@@ -31,6 +31,17 @@ var MODEL_PROVIDER_NAMES = {
|
|
|
31
31
|
openai: "OpenAI",
|
|
32
32
|
anthropic: "Anthropic"
|
|
33
33
|
};
|
|
34
|
+
var WAKE_STATUS_WORDS = {
|
|
35
|
+
woken: "started a turn",
|
|
36
|
+
nothing_waiting: "found nothing waiting",
|
|
37
|
+
throttled: "was held back: the hourly turn limit was reached",
|
|
38
|
+
not_woken: "started nothing: the agent was not available"
|
|
39
|
+
};
|
|
40
|
+
function describeOwnedOutcome(owned) {
|
|
41
|
+
const watch = owned.watch ? `watch ${owned.watch.key} (ring ${owned.watch.ringState}${owned.watch.lastRingError ? `, last error: ${owned.watch.lastRingError}` : ""})` : `no watch${owned.refusal ? `: ${owned.refusal}` : ""}`;
|
|
42
|
+
const last = owned.lastWake ? `last ring ${new Date(owned.lastWake.at).toISOString()} ${WAKE_STATUS_WORDS[owned.lastWake.status]}${owned.lastWake.what.length > 0 ? ` (${owned.lastWake.what.join(", ")})` : ""}` : "never rung";
|
|
43
|
+
return `${owned.outcome} \u2014 as ${owned.agent}; ${watch}; ${last}; ${owned.turnsInWindow} of ${owned.turnLimit} turns this hour`;
|
|
44
|
+
}
|
|
34
45
|
var REPLIES_MAX_LIMIT = 100;
|
|
35
46
|
var REPLIES_INVALID_CURSOR = "DEEPLINE_AGENT_REPLIES_INVALID_CURSOR";
|
|
36
47
|
var FEEDBACK_MAX_LIMIT = 100;
|
|
@@ -82,6 +93,11 @@ function parseModel(value) {
|
|
|
82
93
|
const model = value.trim();
|
|
83
94
|
return model === "" || model.toLowerCase() === "default" ? null : model;
|
|
84
95
|
}
|
|
96
|
+
function parseDisplayName(value) {
|
|
97
|
+
if (value === void 0) return void 0;
|
|
98
|
+
const displayName = value.trim();
|
|
99
|
+
return displayName === "" ? null : displayName;
|
|
100
|
+
}
|
|
85
101
|
function describeOutcomeChange(change) {
|
|
86
102
|
const { conversation } = change;
|
|
87
103
|
const where = `#${conversation.conversationName}`;
|
|
@@ -100,7 +116,8 @@ function describeOutcomeChange(change) {
|
|
|
100
116
|
function describeAgentLine(agent) {
|
|
101
117
|
const channels = agent.conversations.length ? agent.conversations.map(describeConversation).join(", ") : "no channels";
|
|
102
118
|
const skills = agent.skillNames.length ? `skills: ${agent.skillNames.join(", ")}` : "no skills";
|
|
103
|
-
|
|
119
|
+
const slackName = agent.displayName ? ` (\u201C${agent.displayName}\u201D in Slack)` : "";
|
|
120
|
+
return `${agent.name}${slackName} \u2014 ${firstLine(agent.instructions, 60)} [${skills}; ${channels}]`;
|
|
104
121
|
}
|
|
105
122
|
function describeAgent(agent) {
|
|
106
123
|
return [
|
|
@@ -109,6 +126,7 @@ function describeAgent(agent) {
|
|
|
109
126
|
...agent.instructions.split("\n").map((line) => ` ${line}`),
|
|
110
127
|
`Skills: ${agent.skillNames.length ? agent.skillNames.join(", ") : "none"}`,
|
|
111
128
|
`Model: ${_nullishCoalesce(agent.model, () => ( "the default (see deepline agents models)"))}`,
|
|
129
|
+
...agent.displayName !== void 0 ? [`Name in Slack: ${_nullishCoalesce(agent.displayName, () => ( "the Slack app\u2019s own name"))}`] : [],
|
|
112
130
|
agent.conversations.length ? `Channels: ${agent.conversations.map(describeConversation).join(", ")}` : `Channels: none. Bind one with: deepline agents channels add ${agent.name} <channel-id>`
|
|
113
131
|
];
|
|
114
132
|
}
|
|
@@ -139,7 +157,7 @@ function describeOverview(overview) {
|
|
|
139
157
|
];
|
|
140
158
|
}
|
|
141
159
|
function print(payload, title, lines, options) {
|
|
142
|
-
|
|
160
|
+
_chunkFXN5WSTYjs.printCommandEnvelope.call(void 0,
|
|
143
161
|
{ ...payload, render: { sections: [{ title, lines }] } },
|
|
144
162
|
{ json: options.json }
|
|
145
163
|
);
|
|
@@ -233,7 +251,7 @@ async function readModelKey() {
|
|
|
233
251
|
return Buffer.concat(chunks).toString("utf8").trim();
|
|
234
252
|
}
|
|
235
253
|
async function sendTestMessage(input2) {
|
|
236
|
-
const { http } =
|
|
254
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
237
255
|
return http.post(
|
|
238
256
|
`${AGENT_PATH}/test`,
|
|
239
257
|
{
|
|
@@ -324,7 +342,7 @@ async function handleChat(channelId, options) {
|
|
|
324
342
|
threadId = reply.threadId;
|
|
325
343
|
const text = describeReply(channelId, reply, true).map((line2) => `agent> ${line2}
|
|
326
344
|
`).join("");
|
|
327
|
-
|
|
345
|
+
_chunkFXN5WSTYjs.printCommandEnvelope.call(void 0, reply, { json: false, text });
|
|
328
346
|
}
|
|
329
347
|
} finally {
|
|
330
348
|
rl.close();
|
|
@@ -334,7 +352,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
334
352
|
agents.command("list").description(
|
|
335
353
|
"Show whether agents are on, their model billing, every agent with its channels, and the skill library."
|
|
336
354
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
337
|
-
const { http } =
|
|
355
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
338
356
|
const overview = await http.get(AGENT_PATH);
|
|
339
357
|
print(overview, "deepline agents", describeOverview(overview), options);
|
|
340
358
|
});
|
|
@@ -345,7 +363,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
345
363
|
printDryRun("POST", `${AGENT_PATH}/enable`, {}, options);
|
|
346
364
|
return;
|
|
347
365
|
}
|
|
348
|
-
const { http } =
|
|
366
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
349
367
|
const result = await http.post(
|
|
350
368
|
`${AGENT_PATH}/enable`,
|
|
351
369
|
{}
|
|
@@ -367,7 +385,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
367
385
|
printDryRun("POST", `${AGENT_PATH}/disable`, {}, options);
|
|
368
386
|
return;
|
|
369
387
|
}
|
|
370
|
-
const { http } =
|
|
388
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
371
389
|
const result = await http.post(
|
|
372
390
|
`${AGENT_PATH}/disable`,
|
|
373
391
|
{}
|
|
@@ -399,7 +417,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
399
417
|
}
|
|
400
418
|
const apiKey = await readKey();
|
|
401
419
|
if (!apiKey) throw new AgentUsageError("No key was given.");
|
|
402
|
-
const { http } =
|
|
420
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
403
421
|
const overview = await http.put(`${AGENT_PATH}/billing`, {
|
|
404
422
|
mode: "own_key",
|
|
405
423
|
provider: _nullishCoalesce(options.provider, () => ( keyProvider(apiKey))),
|
|
@@ -411,7 +429,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
411
429
|
agents.command("models").description(
|
|
412
430
|
"List the models an agent or one of its channels can run on, and which your workspace\u2019s key can run."
|
|
413
431
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
414
|
-
const { http } =
|
|
432
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
415
433
|
const result = await http.get(
|
|
416
434
|
`${AGENT_PATH}/models`
|
|
417
435
|
);
|
|
@@ -432,10 +450,30 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
432
450
|
options
|
|
433
451
|
);
|
|
434
452
|
});
|
|
453
|
+
agents.command("outcomes").description(
|
|
454
|
+
"List the outcomes Bot by Deepline owns by default (those with no home channel), with what woke it last on each."
|
|
455
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
456
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
457
|
+
const result = await http.get(
|
|
458
|
+
`${AGENT_PATH}/outcomes`
|
|
459
|
+
);
|
|
460
|
+
print(
|
|
461
|
+
result,
|
|
462
|
+
"outcomes Bot by Deepline owns",
|
|
463
|
+
result.owners.length === 0 ? [
|
|
464
|
+
"None. Bot by Deepline owns every outcome with no home channel while agents are on (deepline agents enable) and this deployment can be rung."
|
|
465
|
+
] : [
|
|
466
|
+
...result.owners.map(describeOwnedOutcome),
|
|
467
|
+
...result.more ? ["More outcomes than are listed here."] : [],
|
|
468
|
+
"The watch and what waits for it: deepline outcomes watches list <outcome>"
|
|
469
|
+
],
|
|
470
|
+
options
|
|
471
|
+
);
|
|
472
|
+
});
|
|
435
473
|
}
|
|
436
474
|
function registerAgentCommands(agents) {
|
|
437
475
|
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) => {
|
|
438
|
-
const { http } =
|
|
476
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
439
477
|
const result = await http.get(
|
|
440
478
|
`${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`
|
|
441
479
|
);
|
|
@@ -446,10 +484,14 @@ function registerAgentCommands(agents) {
|
|
|
446
484
|
).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
485
|
"--model <model>",
|
|
448
486
|
"The model it runs on, from deepline agents models (for example sonnet)"
|
|
487
|
+
).option(
|
|
488
|
+
"--display-name <name>",
|
|
489
|
+
"The name it posts under in Slack, at most 80 characters (default: the Slack app\u2019s own name)"
|
|
449
490
|
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
450
491
|
async (name, options) => {
|
|
451
492
|
const instructions = readInstructions(options);
|
|
452
493
|
const model = parseModel(options.model);
|
|
494
|
+
const displayName = parseDisplayName(options.displayName);
|
|
453
495
|
if (instructions === void 0) {
|
|
454
496
|
throw new AgentUsageError(
|
|
455
497
|
'Pass --instructions "<what the agent does>" or --instructions-file <path>.'
|
|
@@ -459,13 +501,14 @@ function registerAgentCommands(agents) {
|
|
|
459
501
|
name: requireArgument(name, "an agent name"),
|
|
460
502
|
instructions,
|
|
461
503
|
skills: _nullishCoalesce(parseSkills(options.skills), () => ( [])),
|
|
462
|
-
...typeof model === "string" ? { model } : {}
|
|
504
|
+
...typeof model === "string" ? { model } : {},
|
|
505
|
+
...typeof displayName === "string" ? { displayName } : {}
|
|
463
506
|
};
|
|
464
507
|
if (options.dryRun) {
|
|
465
508
|
printDryRun("POST", `${AGENT_PATH}/agents`, body, options);
|
|
466
509
|
return;
|
|
467
510
|
}
|
|
468
|
-
const { http } =
|
|
511
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
469
512
|
const result = await http.post(
|
|
470
513
|
`${AGENT_PATH}/agents`,
|
|
471
514
|
body
|
|
@@ -482,34 +525,39 @@ function registerAgentCommands(agents) {
|
|
|
482
525
|
}
|
|
483
526
|
);
|
|
484
527
|
agents.command("update").description(
|
|
485
|
-
"Replace an agent\u2019s instructions, skills or
|
|
528
|
+
"Replace an agent\u2019s instructions, skills, model or name in Slack (its creator or an admin)."
|
|
486
529
|
).argument("<name>", "Agent name").option("--instructions <text>", "New instructions").option("--instructions-file <path>", "Read new instructions from a file").option(
|
|
487
530
|
"--skills <names>",
|
|
488
531
|
'Comma-separated library skill names; replaces the list ("" clears it)'
|
|
489
532
|
).option(
|
|
490
533
|
"--model <model>",
|
|
491
534
|
'The model it runs on, from deepline agents models ("default" returns it to the default)'
|
|
535
|
+
).option(
|
|
536
|
+
"--display-name <name>",
|
|
537
|
+
'The name it posts under in Slack, at most 80 characters ("" returns it to the Slack app\u2019s own name)'
|
|
492
538
|
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
493
539
|
async (name, options) => {
|
|
494
540
|
const instructions = readInstructions(options);
|
|
495
541
|
const skills = parseSkills(options.skills);
|
|
496
542
|
const model = parseModel(options.model);
|
|
497
|
-
|
|
543
|
+
const displayName = parseDisplayName(options.displayName);
|
|
544
|
+
if (instructions === void 0 && skills === void 0 && model === void 0 && displayName === void 0) {
|
|
498
545
|
throw new AgentUsageError(
|
|
499
|
-
"Pass --instructions, --instructions-file, --skills or --
|
|
546
|
+
"Pass --instructions, --instructions-file, --skills, --model or --display-name."
|
|
500
547
|
);
|
|
501
548
|
}
|
|
502
549
|
const path = `${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`;
|
|
503
550
|
const body = {
|
|
504
551
|
...instructions !== void 0 ? { instructions } : {},
|
|
505
552
|
...skills !== void 0 ? { skills } : {},
|
|
506
|
-
...model !== void 0 ? { model } : {}
|
|
553
|
+
...model !== void 0 ? { model } : {},
|
|
554
|
+
...displayName !== void 0 ? { displayName } : {}
|
|
507
555
|
};
|
|
508
556
|
if (options.dryRun) {
|
|
509
557
|
printDryRun("PATCH", path, body, options);
|
|
510
558
|
return;
|
|
511
559
|
}
|
|
512
|
-
const { http } =
|
|
560
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
513
561
|
const result = await http.patch(path, body);
|
|
514
562
|
print(result, "agent updated", describeAgent(result.agent), options);
|
|
515
563
|
}
|
|
@@ -522,7 +570,7 @@ function registerAgentCommands(agents) {
|
|
|
522
570
|
printDryRun("DELETE", path, null, options);
|
|
523
571
|
return;
|
|
524
572
|
}
|
|
525
|
-
const { http } =
|
|
573
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
526
574
|
const result = await http.delete(path);
|
|
527
575
|
print(
|
|
528
576
|
result,
|
|
@@ -565,7 +613,7 @@ function registerChannelCommands(agents) {
|
|
|
565
613
|
printDryRun("POST", `${AGENT_PATH}/channels`, body, options);
|
|
566
614
|
return;
|
|
567
615
|
}
|
|
568
|
-
const { http } =
|
|
616
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
569
617
|
const result = await http.post(`${AGENT_PATH}/channels`, body);
|
|
570
618
|
print(
|
|
571
619
|
result,
|
|
@@ -617,7 +665,7 @@ function registerChannelCommands(agents) {
|
|
|
617
665
|
printDryRun("PATCH", path, body, options);
|
|
618
666
|
return;
|
|
619
667
|
}
|
|
620
|
-
const { http } =
|
|
668
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
621
669
|
const result = await http.patch(path, body);
|
|
622
670
|
print(
|
|
623
671
|
result,
|
|
@@ -645,7 +693,7 @@ function registerChannelCommands(agents) {
|
|
|
645
693
|
printDryRun("DELETE", path, null, options);
|
|
646
694
|
return;
|
|
647
695
|
}
|
|
648
|
-
const { http } =
|
|
696
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
649
697
|
const result = await http.delete(path);
|
|
650
698
|
print(
|
|
651
699
|
result,
|
|
@@ -681,7 +729,7 @@ function registerSlackCommands(agents) {
|
|
|
681
729
|
slack.command("install").description(
|
|
682
730
|
"Print a link that adds the agent to a Slack workspace (owners and admins). Open it, pick the Slack workspace and approve."
|
|
683
731
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
684
|
-
const { http } =
|
|
732
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
685
733
|
const result = await http.post(
|
|
686
734
|
`${AGENT_PATH}/slack/install`,
|
|
687
735
|
{}
|
|
@@ -700,7 +748,7 @@ function registerSlackCommands(agents) {
|
|
|
700
748
|
slack.command("link").description(
|
|
701
749
|
"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
750
|
).argument("<code>", "The code from the link, or the whole link").option("--json", "Emit JSON output").action(async (code, options) => {
|
|
703
|
-
const { http } =
|
|
751
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
704
752
|
const result = await http.post(`${AGENT_PATH}/slack/link`, { code: slackLinkCode(code) });
|
|
705
753
|
print(
|
|
706
754
|
result,
|
|
@@ -714,7 +762,7 @@ function registerSlackCommands(agents) {
|
|
|
714
762
|
slack.command("unlink").description(
|
|
715
763
|
"Forget which Slack user you are in this workspace. Your clicks in Slack decide nothing until you link again."
|
|
716
764
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
717
|
-
const { http } =
|
|
765
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
718
766
|
const result = await http.delete(
|
|
719
767
|
`${AGENT_PATH}/slack/link`
|
|
720
768
|
);
|
|
@@ -730,7 +778,7 @@ function registerSlackCommands(agents) {
|
|
|
730
778
|
slack.command("status").description(
|
|
731
779
|
"List the Slack workspaces this workspace installed the agent in."
|
|
732
780
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
733
|
-
const { http } =
|
|
781
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
734
782
|
const result = await http.get(
|
|
735
783
|
`${AGENT_PATH}/slack/installations`
|
|
736
784
|
);
|
|
@@ -749,7 +797,7 @@ function registerSkillCommands(agents) {
|
|
|
749
797
|
"The workspace\u2019s skill library: markdown an agent loads when its description matches the task."
|
|
750
798
|
);
|
|
751
799
|
skills.command("get").description("Show one library skill with its markdown.").argument("<name>", "Skill name").option("--json", "Emit JSON output").action(async (name, options) => {
|
|
752
|
-
const { http } =
|
|
800
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
753
801
|
const result = await http.get(
|
|
754
802
|
`${AGENT_PATH}/skills/${encodeURIComponent(requireArgument(name, "a skill name"))}`
|
|
755
803
|
);
|
|
@@ -787,7 +835,7 @@ function registerSkillCommands(agents) {
|
|
|
787
835
|
printDryRun("PUT", path, body, options);
|
|
788
836
|
return;
|
|
789
837
|
}
|
|
790
|
-
const { http } =
|
|
838
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
791
839
|
const result = await http.put(path, body);
|
|
792
840
|
print(
|
|
793
841
|
result,
|
|
@@ -810,7 +858,7 @@ function registerSkillCommands(agents) {
|
|
|
810
858
|
printDryRun("DELETE", path, null, options);
|
|
811
859
|
return;
|
|
812
860
|
}
|
|
813
|
-
const { http } =
|
|
861
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
814
862
|
const result = await http.delete(path);
|
|
815
863
|
print(
|
|
816
864
|
result,
|
|
@@ -864,7 +912,7 @@ function registerFeedbackCommand(agents) {
|
|
|
864
912
|
params.set("cursor", requireArgument(options.cursor, "--cursor"));
|
|
865
913
|
}
|
|
866
914
|
const query = params.toString();
|
|
867
|
-
const { http } =
|
|
915
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
868
916
|
const page = await http.get(
|
|
869
917
|
`${AGENT_PATH}/feedback${query ? `?${query}` : ""}`
|
|
870
918
|
).catch((error) => {
|
|
@@ -927,7 +975,7 @@ function registerRepliesCommand(agents) {
|
|
|
927
975
|
params.set("cursor", requireArgument(options.cursor, "--cursor"));
|
|
928
976
|
}
|
|
929
977
|
const query = params.toString();
|
|
930
|
-
const { http } =
|
|
978
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
931
979
|
const page = await http.get(`${AGENT_PATH}/replies${query ? `?${query}` : ""}`).catch((error) => {
|
|
932
980
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === REPLIES_INVALID_CURSOR) {
|
|
933
981
|
throw new AgentUsageError(`--cursor: ${error.message}`);
|
|
@@ -953,13 +1001,13 @@ function registerActivityCommand(agents) {
|
|
|
953
1001
|
agents.command("activity").description(
|
|
954
1002
|
"Sum each agent's replies over the last 7 days: how many, how they ended, median time, tokens and the last reply."
|
|
955
1003
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
956
|
-
const { http } =
|
|
1004
|
+
const { http } = _chunkFXN5WSTYjs.getAuthedHttpClient.call(void 0, );
|
|
957
1005
|
const activity = await http.get(`${AGENT_PATH}/activity`);
|
|
958
1006
|
print(activity, "agent activity", describeActivity(activity), options);
|
|
959
1007
|
});
|
|
960
1008
|
}
|
|
961
1009
|
function registerAgentsCommands(program, readKey = readModelKey) {
|
|
962
|
-
const agents = program.command("agents", { hidden: !
|
|
1010
|
+
const agents = program.command("agents", { hidden: !_chunkJHQ7FORYjs.cliFeatureEnabled.call(void 0, AGENT_FEATURE) }).description(
|
|
963
1011
|
"Deepline agents in Slack: create agents with instructions and skills, bind channels to them, and talk to them."
|
|
964
1012
|
);
|
|
965
1013
|
registerWorkspaceCommands(agents, readKey);
|
|
@@ -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 _chunkFRYLXDNPjs = require('./chunk-FRYLXDNP.js');
|
|
18
|
+
require('./chunk-FXN5WSTY.js');
|
|
19
|
+
require('./chunk-JHQ7FORY.js');
|
|
20
|
+
require('./chunk-RSZSKTRC.js');
|
|
21
|
+
require('./chunk-6VLFQZK6.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-LFQJW4S2.js');
|
|
24
|
+
require('./chunk-CFJFUVX2.js');
|
|
25
|
+
require('./chunk-OBZB4J7B.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 = _chunkFRYLXDNPjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkFRYLXDNPjs.authStatusLine; exports.clearPendingClaim = _chunkFRYLXDNPjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkFRYLXDNPjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkFRYLXDNPjs.handleRegister; exports.handleStatus = _chunkFRYLXDNPjs.handleStatus; exports.handleWait = _chunkFRYLXDNPjs.handleWait; exports.httpJson = _chunkFRYLXDNPjs.httpJson; exports.readPendingAuthClaim = _chunkFRYLXDNPjs.readPendingAuthClaim; exports.readStatusBanner = _chunkFRYLXDNPjs.readStatusBanner; exports.registerAuthCommands = _chunkFRYLXDNPjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkFRYLXDNPjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkFRYLXDNPjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkFRYLXDNPjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkFRYLXDNPjs.statusBannerLine;
|
|
@@ -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-NDMKFA6W.mjs";
|
|
18
|
+
import "./chunk-O35BHZLQ.mjs";
|
|
19
|
+
import "./chunk-CWHXE6HJ.mjs";
|
|
20
|
+
import "./chunk-FHYNK7GL.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-ID5WQZ2H.mjs";
|
|
26
26
|
import "./chunk-WZYKRD7T.mjs";
|
|
27
27
|
import "./chunk-KRD6H754.mjs";
|
|
28
28
|
export {
|