deepline 0.3.574 → 0.3.576
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/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 +149 -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/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/governor/governor.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +190 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +41 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +6 -66
- package/dist/cli/{agents-6WN5LYUP.mjs → agents-BLJR2Y3X.mjs} +213 -19
- package/dist/cli/{agents-7ZZSF4FS.js → agents-CJQ7KBFT.js} +235 -41
- package/dist/cli/auth-GSDYP4ZN.js +44 -0
- package/dist/cli/{auth-I2QVO677.mjs → auth-SLZIRCPE.mjs} +5 -5
- package/dist/cli/{billing-YPH4GEWU.mjs → billing-6Q4SK5KF.mjs} +9 -9
- package/dist/cli/{billing-44QFBUWA.js → billing-IECMVARO.js} +102 -102
- package/dist/cli/{chunk-MGF3MK27.mjs → chunk-2UHEJPSS.mjs} +5 -5
- package/dist/cli/{chunk-2QYU57RG.js → chunk-36254433.js} +3 -3
- package/dist/cli/{chunk-ECLCRE5P.js → chunk-45POZK3F.js} +3 -3
- package/dist/cli/{chunk-5E2PAGF5.js → chunk-4KIIXV5Z.js} +21 -21
- package/dist/cli/{chunk-7334X74C.mjs → chunk-5VABOJ4M.mjs} +2 -2
- package/dist/cli/{chunk-YR4REP4D.mjs → chunk-66K7F7LR.mjs} +1 -1
- package/dist/cli/{chunk-6GZIT3TH.js → chunk-6JQZC6HX.js} +20 -20
- package/dist/cli/{chunk-ID3LGPOE.js → chunk-6RY5COUY.js} +23 -23
- package/dist/cli/{chunk-VGIDPJXM.mjs → chunk-7DI34I73.mjs} +3 -3
- package/dist/cli/{chunk-Z3XFXFRT.js → chunk-ANPHEXTT.js} +9 -9
- package/dist/cli/{chunk-NRVEVKXR.mjs → chunk-AUR24RQB.mjs} +2 -2
- package/dist/cli/{chunk-JCO226JM.mjs → chunk-AZFSCPYK.mjs} +89 -10
- package/dist/cli/{chunk-2RPRSTHD.js → chunk-BRPUB6UA.js} +5 -5
- package/dist/cli/{chunk-XVBEEGI4.mjs → chunk-CUIFDMNP.mjs} +11 -1
- package/dist/cli/{chunk-OIZUFRTE.mjs → chunk-D5LWYP2H.mjs} +3 -3
- package/dist/cli/{chunk-PP5RMEQQ.js → chunk-DGY4EYIX.js} +5 -5
- package/dist/cli/{chunk-Q3A53SWK.mjs → chunk-DWUESXDD.mjs} +1 -1
- package/dist/cli/{chunk-7UR57HPJ.js → chunk-E4M4QZBP.js} +11 -1
- package/dist/cli/{chunk-DOZIWA66.js → chunk-EQO77FQZ.js} +5 -5
- package/dist/cli/{chunk-N6I3BB2O.js → chunk-F4H26PP6.js} +274 -274
- package/dist/cli/{chunk-L2NXB4WG.mjs → chunk-FYKHAT2F.mjs} +64 -3
- package/dist/cli/{chunk-QPSBV4FD.mjs → chunk-GI57Q7JU.mjs} +2 -2
- package/dist/cli/{chunk-H7PVSG3L.js → chunk-GZ7KYGYE.js} +15 -15
- package/dist/cli/{chunk-PW6NKI2A.mjs → chunk-HE53AI2E.mjs} +3 -3
- package/dist/cli/{chunk-LJLM4BUL.js → chunk-HHMO3CON.js} +6 -6
- package/dist/cli/{chunk-2TMAKJBT.mjs → chunk-JPFAD6G6.mjs} +2 -2
- package/dist/cli/{chunk-VLUBEMWM.js → chunk-JSIOLCTK.js} +20 -20
- package/dist/cli/{chunk-B2XLIQPH.mjs → chunk-KQTZO6NT.mjs} +2 -2
- package/dist/cli/{chunk-SLXCVPN7.js → chunk-L6H72AIX.js} +2 -2
- package/dist/cli/{chunk-X7RKCAMX.mjs → chunk-LKC7PHDX.mjs} +4 -4
- package/dist/cli/{chunk-DG56RWI2.js → chunk-M23G33MH.js} +2 -2
- package/dist/cli/{chunk-IB225ZK4.js → chunk-MDJ4LPQ5.js} +4 -4
- package/dist/cli/{chunk-AFPGYZBH.js → chunk-MXK4M7HP.js} +17 -17
- package/dist/cli/{chunk-KSHZY52O.js → chunk-MXPCTF57.js} +89 -10
- package/dist/cli/{chunk-6B5EZOI3.js → chunk-NQFZ7FYN.js} +10 -10
- package/dist/cli/{chunk-OH6WOID2.mjs → chunk-OMVBBAQP.mjs} +2 -2
- package/dist/cli/{chunk-D6ZVRKJ2.js → chunk-OXRG325T.js} +41 -41
- package/dist/cli/{chunk-G7OR3GVD.mjs → chunk-PU5VCDCJ.mjs} +5 -5
- package/dist/cli/{chunk-VYSUJMB5.js → chunk-PYFMNPTA.js} +8 -8
- package/dist/cli/{chunk-LCAXLGAY.mjs → chunk-QCD7BQ5Z.mjs} +2 -2
- package/dist/cli/{chunk-4T2U72SP.mjs → chunk-R5NKLZL2.mjs} +1 -1
- package/dist/cli/{chunk-ZTCP5BHH.mjs → chunk-RW3URFZK.mjs} +2 -2
- package/dist/cli/{chunk-IA2LTIWO.mjs → chunk-S4IW4NAI.mjs} +2 -2
- package/dist/cli/{chunk-UXIUAIL2.js → chunk-SBZSJQEI.js} +53 -53
- package/dist/cli/{chunk-XMBTAPHR.js → chunk-SKHUWQZE.js} +7 -7
- package/dist/cli/{chunk-S22FSNNC.mjs → chunk-SY3OKOI5.mjs} +1 -1
- package/dist/cli/{chunk-MAMGREBW.mjs → chunk-TZHS2W5Z.mjs} +1 -1
- package/dist/cli/{chunk-BUBOZKH2.js → chunk-UD6M2ZTY.js} +2 -2
- package/dist/cli/{chunk-W6UCS3O6.mjs → chunk-UGIH4462.mjs} +5 -5
- package/dist/cli/{chunk-7GQU46SZ.js → chunk-V25CXBR2.js} +26 -26
- package/dist/cli/{chunk-G2HW2SAP.js → chunk-WDWV77SJ.js} +13 -13
- package/dist/cli/{chunk-I62ZBEKH.js → chunk-WPGZ6V36.js} +48 -48
- package/dist/cli/{chunk-GMQZFWQU.mjs → chunk-X5V6S5KI.mjs} +7 -7
- package/dist/cli/{chunk-ZFXDD7VM.mjs → chunk-XJNJ3BWU.mjs} +1 -1
- package/dist/cli/{chunk-NDDGFX4X.js → chunk-Y4A6Y5EY.js} +11 -11
- package/dist/cli/{chunk-LLSCFLFU.mjs → chunk-YHM64N5C.mjs} +1 -1
- package/dist/cli/{chunk-JY7RKJ65.mjs → chunk-ZIGMC2X4.mjs} +13 -13
- package/dist/cli/{chunk-IXYVHTRZ.js → chunk-ZO65VJRJ.js} +70 -9
- package/dist/cli/{chunk-SRUNYWQ2.mjs → chunk-ZRC52APB.mjs} +1 -1
- package/dist/cli/{chunk-DX646HO7.mjs → chunk-ZYN6S6G2.mjs} +4 -4
- 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-H3SA7J6H.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-PB7GT6F2.js +22 -0
- package/dist/cli/{csv-FWGSY4GE.js → csv-6DEKR3QQ.js} +13 -13
- package/dist/cli/{csv-R7GV33BC.mjs → csv-ICXI7JAS.mjs} +4 -4
- package/dist/cli/{db-OCH35YJG.js → db-AG7INMLP.js} +27 -27
- package/dist/cli/{db-UWXA4RRV.mjs → db-VI7T5E6O.mjs} +6 -6
- package/dist/cli/describe-LMHIG3DP.js +50 -0
- package/dist/cli/{describe-QI4HMUGE.mjs → describe-S6NFWWGK.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-M5R5QHIA.js} +8 -8
- package/dist/cli/{executions-YF3KMZZN.mjs → executions-MK7H4Q2H.mjs} +6 -6
- package/dist/cli/{feedback-YCZHHSBS.js → feedback-L3L4FEQL.js} +14 -14
- package/dist/cli/{feedback-DWIWBS7O.mjs → feedback-ZHATL2XF.mjs} +6 -6
- package/dist/cli/{git-XCGMQQOD.mjs → git-W5DHNH2Q.mjs} +5 -5
- package/dist/cli/git-WYNCLDHD.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-5ABAJBSW.mjs → integrations-73YSN2LI.mjs} +7 -7
- package/dist/cli/{integrations-IEZA3TGK.js → integrations-IBWNO3YP.js} +29 -29
- package/dist/cli/{legacy-noops-OZMY73Y3.mjs → legacy-noops-4LFZJTDX.mjs} +6 -6
- package/dist/cli/{legacy-noops-KNFLJ5P2.js → legacy-noops-AE6DBYJM.js} +9 -9
- package/dist/cli/{mcp-NLQAO7KP.js → mcp-BKL6M6OI.js} +24 -24
- package/dist/cli/{mcp-WSPFKQPZ.mjs → mcp-E6PTSNDE.mjs} +4 -4
- package/dist/cli/{monitors-LPKFFTOX.mjs → monitors-MXJ27KQK.mjs} +7 -7
- package/dist/cli/{monitors-BJYOB4S3.js → monitors-SW7ZCPPT.js} +100 -100
- package/dist/cli/{org-RYPMUYUW.mjs → org-HYAJ2MIK.mjs} +6 -6
- package/dist/cli/{org-WIVHI4WT.js → org-XJ44KZ5I.js} +121 -121
- package/dist/cli/{outcomes-QKX7IE3O.js → outcomes-PTXGG4BZ.js} +14 -14
- package/dist/cli/{outcomes-FADJYC4I.mjs → outcomes-PUMAXRGD.mjs} +6 -6
- package/dist/cli/{play-ID73J3NP.js → play-EPDZ3GDV.js} +349 -349
- package/dist/cli/{play-4ZKK5Q7U.mjs → play-QN3X6IAE.mjs} +20 -20
- package/dist/cli/{providers-WCCGYGW6.js → providers-GNJFGNDH.js} +9 -9
- package/dist/cli/{providers-LURYBSNO.mjs → providers-JIN5UQ7Z.mjs} +6 -6
- package/dist/cli/{quickstart-KCCSEE5J.mjs → quickstart-4EBFHGB7.mjs} +4 -4
- package/dist/cli/{quickstart-LVPOU25V.js → quickstart-YH6NNC5I.js} +6 -6
- package/dist/cli/{run-2QMJRCVA.js → run-4DRF7KQJ.js} +70 -49
- package/dist/cli/{run-XXK7DDUF.mjs → run-5467KBCP.mjs} +48 -27
- package/dist/cli/search-B2KCWPUV.js +32 -0
- package/dist/cli/{search-ZYAWW3CK.mjs → search-ZERTOGH6.mjs} +7 -7
- package/dist/cli/{search-output-N45AIOB4.mjs → search-output-OAVJXRFO.mjs} +5 -5
- package/dist/cli/{search-output-YNXAZSKT.js → search-output-OMNZN2LP.js} +8 -8
- package/dist/cli/{secrets-MHT27L2M.js → secrets-7XK2BGYX.js} +15 -15
- package/dist/cli/{secrets-7Q3AOUAS.mjs → secrets-KAVDYB4P.mjs} +6 -6
- package/dist/cli/sessions-PUQURPPC.js +23 -0
- package/dist/cli/{sessions-6QKOM7M3.mjs → sessions-TNPI6XWB.mjs} +6 -6
- package/dist/cli/{settings-NPVIDENI.mjs → settings-KUABXRAJ.mjs} +12 -12
- package/dist/cli/{settings-OP7Q6YX6.js → settings-RQ3Z3JCM.js} +85 -85
- package/dist/cli/{setup-OOT3EIMF.mjs → setup-6IX6BSS7.mjs} +9 -9
- package/dist/cli/{setup-RT6GHL3W.js → setup-TDOWNKYN.js} +49 -49
- package/dist/cli/skills-AACRY2TV.js +37 -0
- package/dist/cli/{skills-TEXI4CLZ.mjs → skills-Z6NBJ4KP.mjs} +7 -7
- package/dist/cli/{tools-G5L36M3X.mjs → tools-LQKFWK7J.mjs} +19 -19
- package/dist/cli/tools-OTYA4722.js +57 -0
- package/dist/cli/update-JTGMI6OJ.js +37 -0
- package/dist/cli/{update-YNKQTE4D.mjs → update-RUB4EIKW.mjs} +9 -9
- package/dist/cli/{views-IQFMUMLU.mjs → views-D7WY5QPR.mjs} +6 -6
- package/dist/cli/{views-OVQ5AQAU.js → views-FFLXLAGC.js} +21 -21
- package/dist/cli/{workflow-Y5IFMI7N.mjs → workflow-BV2OTEQD.mjs} +7 -7
- package/dist/cli/{workflow-RCBYXIFZ.js → workflow-QW7QVODA.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 +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-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
|
"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 _chunkJSIOLCTKjs = require('./chunk-JSIOLCTK.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunk36254433js = require('./chunk-36254433.js');
|
|
8
|
+
require('./chunk-MDJ4LPQ5.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-E4M4QZBP.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;
|
|
@@ -69,7 +80,33 @@ function firstLine(text, max = 100) {
|
|
|
69
80
|
}
|
|
70
81
|
function describeConversation(conversation) {
|
|
71
82
|
const where = conversation.platform === "slack" ? `#${conversation.conversationName}` : `test ${conversation.conversationName}`;
|
|
72
|
-
|
|
83
|
+
const settings = [
|
|
84
|
+
...conversation.model ? [`model ${conversation.model}`] : [],
|
|
85
|
+
...conversation.outcome ? [
|
|
86
|
+
`${conversation.outcome.role === "home" ? "home of" : "linked to"} outcome ${conversation.outcome.slug}`
|
|
87
|
+
] : []
|
|
88
|
+
];
|
|
89
|
+
return `${where} (${conversation.conversationId}${settings.length ? `; ${settings.join("; ")}` : ""})`;
|
|
90
|
+
}
|
|
91
|
+
function parseModel(value) {
|
|
92
|
+
if (value === void 0) return void 0;
|
|
93
|
+
const model = value.trim();
|
|
94
|
+
return model === "" || model.toLowerCase() === "default" ? null : model;
|
|
95
|
+
}
|
|
96
|
+
function describeOutcomeChange(change) {
|
|
97
|
+
const { conversation } = change;
|
|
98
|
+
const where = `#${conversation.conversationName}`;
|
|
99
|
+
if (!conversation.outcome) {
|
|
100
|
+
return [
|
|
101
|
+
change.changed ? `${change.agentName} no longer works toward an outcome in ${where}.` : `${change.agentName} works toward no outcome in ${where}.`
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
const { slug, role } = conversation.outcome;
|
|
105
|
+
return [
|
|
106
|
+
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.`,
|
|
107
|
+
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.",
|
|
108
|
+
`See the outcome with: deepline outcomes describe ${slug}`
|
|
109
|
+
];
|
|
73
110
|
}
|
|
74
111
|
function describeAgentLine(agent) {
|
|
75
112
|
const channels = agent.conversations.length ? agent.conversations.map(describeConversation).join(", ") : "no channels";
|
|
@@ -82,6 +119,7 @@ function describeAgent(agent) {
|
|
|
82
119
|
"Instructions:",
|
|
83
120
|
...agent.instructions.split("\n").map((line) => ` ${line}`),
|
|
84
121
|
`Skills: ${agent.skillNames.length ? agent.skillNames.join(", ") : "none"}`,
|
|
122
|
+
`Model: ${_nullishCoalesce(agent.model, () => ( "the default (see deepline agents models)"))}`,
|
|
85
123
|
agent.conversations.length ? `Channels: ${agent.conversations.map(describeConversation).join(", ")}` : `Channels: none. Bind one with: deepline agents channels add ${agent.name} <channel-id>`
|
|
86
124
|
];
|
|
87
125
|
}
|
|
@@ -112,7 +150,7 @@ function describeOverview(overview) {
|
|
|
112
150
|
];
|
|
113
151
|
}
|
|
114
152
|
function print(payload, title, lines, options) {
|
|
115
|
-
|
|
153
|
+
_chunkJSIOLCTKjs.printCommandEnvelope.call(void 0,
|
|
116
154
|
{ ...payload, render: { sections: [{ title, lines }] } },
|
|
117
155
|
{ json: options.json }
|
|
118
156
|
);
|
|
@@ -206,7 +244,7 @@ async function readModelKey() {
|
|
|
206
244
|
return Buffer.concat(chunks).toString("utf8").trim();
|
|
207
245
|
}
|
|
208
246
|
async function sendTestMessage(input2) {
|
|
209
|
-
const { http } =
|
|
247
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
210
248
|
return http.post(
|
|
211
249
|
`${AGENT_PATH}/test`,
|
|
212
250
|
{
|
|
@@ -297,7 +335,7 @@ async function handleChat(channelId, options) {
|
|
|
297
335
|
threadId = reply.threadId;
|
|
298
336
|
const text = describeReply(channelId, reply, true).map((line2) => `agent> ${line2}
|
|
299
337
|
`).join("");
|
|
300
|
-
|
|
338
|
+
_chunkJSIOLCTKjs.printCommandEnvelope.call(void 0, reply, { json: false, text });
|
|
301
339
|
}
|
|
302
340
|
} finally {
|
|
303
341
|
rl.close();
|
|
@@ -307,7 +345,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
307
345
|
agents.command("list").description(
|
|
308
346
|
"Show whether agents are on, their model billing, every agent with its channels, and the skill library."
|
|
309
347
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
310
|
-
const { http } =
|
|
348
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
311
349
|
const overview = await http.get(AGENT_PATH);
|
|
312
350
|
print(overview, "deepline agents", describeOverview(overview), options);
|
|
313
351
|
});
|
|
@@ -318,7 +356,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
318
356
|
printDryRun("POST", `${AGENT_PATH}/enable`, {}, options);
|
|
319
357
|
return;
|
|
320
358
|
}
|
|
321
|
-
const { http } =
|
|
359
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
322
360
|
const result = await http.post(
|
|
323
361
|
`${AGENT_PATH}/enable`,
|
|
324
362
|
{}
|
|
@@ -340,7 +378,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
340
378
|
printDryRun("POST", `${AGENT_PATH}/disable`, {}, options);
|
|
341
379
|
return;
|
|
342
380
|
}
|
|
343
|
-
const { http } =
|
|
381
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
344
382
|
const result = await http.post(
|
|
345
383
|
`${AGENT_PATH}/disable`,
|
|
346
384
|
{}
|
|
@@ -372,7 +410,7 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
372
410
|
}
|
|
373
411
|
const apiKey = await readKey();
|
|
374
412
|
if (!apiKey) throw new AgentUsageError("No key was given.");
|
|
375
|
-
const { http } =
|
|
413
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
376
414
|
const overview = await http.put(`${AGENT_PATH}/billing`, {
|
|
377
415
|
mode: "own_key",
|
|
378
416
|
provider: _nullishCoalesce(options.provider, () => ( keyProvider(apiKey))),
|
|
@@ -381,10 +419,54 @@ function registerWorkspaceCommands(agents, readKey) {
|
|
|
381
419
|
print(overview, "agents billing", describeOverview(overview), options);
|
|
382
420
|
}
|
|
383
421
|
);
|
|
422
|
+
agents.command("models").description(
|
|
423
|
+
"List the models an agent or one of its channels can run on, and which your workspace\u2019s key can run."
|
|
424
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
425
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
426
|
+
const result = await http.get(
|
|
427
|
+
`${AGENT_PATH}/models`
|
|
428
|
+
);
|
|
429
|
+
const keySet = result.models.some((model) => model.available);
|
|
430
|
+
print(
|
|
431
|
+
result,
|
|
432
|
+
"agent models",
|
|
433
|
+
[
|
|
434
|
+
...keySet ? [] : [
|
|
435
|
+
"No model key is set, so no model can run yet. An admin runs: deepline agents billing set < key.txt"
|
|
436
|
+
],
|
|
437
|
+
...result.models.map(
|
|
438
|
+
(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`}`
|
|
439
|
+
),
|
|
440
|
+
"Set an agent\u2019s model with: deepline agents update <agent> --model <model>",
|
|
441
|
+
"Set one channel\u2019s with: deepline agents channels set <channel-id> --model <model>, or ask the agent there to switch."
|
|
442
|
+
],
|
|
443
|
+
options
|
|
444
|
+
);
|
|
445
|
+
});
|
|
446
|
+
agents.command("outcomes").description(
|
|
447
|
+
"List the outcomes Bot by Deepline owns by default (those with no home channel), with what woke it last on each."
|
|
448
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
449
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
450
|
+
const result = await http.get(
|
|
451
|
+
`${AGENT_PATH}/outcomes`
|
|
452
|
+
);
|
|
453
|
+
print(
|
|
454
|
+
result,
|
|
455
|
+
"outcomes Bot by Deepline owns",
|
|
456
|
+
result.owners.length === 0 ? [
|
|
457
|
+
"None. Bot by Deepline owns every outcome with no home channel while agents are on (deepline agents enable) and this deployment can be rung."
|
|
458
|
+
] : [
|
|
459
|
+
...result.owners.map(describeOwnedOutcome),
|
|
460
|
+
...result.more ? ["More outcomes than are listed here."] : [],
|
|
461
|
+
"The watch and what waits for it: deepline outcomes watches list <outcome>"
|
|
462
|
+
],
|
|
463
|
+
options
|
|
464
|
+
);
|
|
465
|
+
});
|
|
384
466
|
}
|
|
385
467
|
function registerAgentCommands(agents) {
|
|
386
468
|
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) => {
|
|
387
|
-
const { http } =
|
|
469
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
388
470
|
const result = await http.get(
|
|
389
471
|
`${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`
|
|
390
472
|
);
|
|
@@ -392,9 +474,13 @@ function registerAgentCommands(agents) {
|
|
|
392
474
|
});
|
|
393
475
|
agents.command("create").description(
|
|
394
476
|
"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(
|
|
477
|
+
).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(
|
|
478
|
+
"--model <model>",
|
|
479
|
+
"The model it runs on, from deepline agents models (for example sonnet)"
|
|
480
|
+
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
396
481
|
async (name, options) => {
|
|
397
482
|
const instructions = readInstructions(options);
|
|
483
|
+
const model = parseModel(options.model);
|
|
398
484
|
if (instructions === void 0) {
|
|
399
485
|
throw new AgentUsageError(
|
|
400
486
|
'Pass --instructions "<what the agent does>" or --instructions-file <path>.'
|
|
@@ -403,13 +489,14 @@ function registerAgentCommands(agents) {
|
|
|
403
489
|
const body = {
|
|
404
490
|
name: requireArgument(name, "an agent name"),
|
|
405
491
|
instructions,
|
|
406
|
-
skills: _nullishCoalesce(parseSkills(options.skills), () => ( []))
|
|
492
|
+
skills: _nullishCoalesce(parseSkills(options.skills), () => ( [])),
|
|
493
|
+
...typeof model === "string" ? { model } : {}
|
|
407
494
|
};
|
|
408
495
|
if (options.dryRun) {
|
|
409
496
|
printDryRun("POST", `${AGENT_PATH}/agents`, body, options);
|
|
410
497
|
return;
|
|
411
498
|
}
|
|
412
|
-
const { http } =
|
|
499
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
413
500
|
const result = await http.post(
|
|
414
501
|
`${AGENT_PATH}/agents`,
|
|
415
502
|
body
|
|
@@ -426,29 +513,34 @@ function registerAgentCommands(agents) {
|
|
|
426
513
|
}
|
|
427
514
|
);
|
|
428
515
|
agents.command("update").description(
|
|
429
|
-
"Replace an agent\u2019s instructions or
|
|
516
|
+
"Replace an agent\u2019s instructions, skills or model (its creator or an admin)."
|
|
430
517
|
).argument("<name>", "Agent name").option("--instructions <text>", "New instructions").option("--instructions-file <path>", "Read new instructions from a file").option(
|
|
431
518
|
"--skills <names>",
|
|
432
519
|
'Comma-separated library skill names; replaces the list ("" clears it)'
|
|
520
|
+
).option(
|
|
521
|
+
"--model <model>",
|
|
522
|
+
'The model it runs on, from deepline agents models ("default" returns it to the default)'
|
|
433
523
|
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
434
524
|
async (name, options) => {
|
|
435
525
|
const instructions = readInstructions(options);
|
|
436
526
|
const skills = parseSkills(options.skills);
|
|
437
|
-
|
|
527
|
+
const model = parseModel(options.model);
|
|
528
|
+
if (instructions === void 0 && skills === void 0 && model === void 0) {
|
|
438
529
|
throw new AgentUsageError(
|
|
439
|
-
"Pass --instructions, --instructions-file or --
|
|
530
|
+
"Pass --instructions, --instructions-file, --skills or --model."
|
|
440
531
|
);
|
|
441
532
|
}
|
|
442
533
|
const path = `${AGENT_PATH}/agents/${encodeURIComponent(requireArgument(name, "an agent name"))}`;
|
|
443
534
|
const body = {
|
|
444
535
|
...instructions !== void 0 ? { instructions } : {},
|
|
445
|
-
...skills !== void 0 ? { skills } : {}
|
|
536
|
+
...skills !== void 0 ? { skills } : {},
|
|
537
|
+
...model !== void 0 ? { model } : {}
|
|
446
538
|
};
|
|
447
539
|
if (options.dryRun) {
|
|
448
540
|
printDryRun("PATCH", path, body, options);
|
|
449
541
|
return;
|
|
450
542
|
}
|
|
451
|
-
const { http } =
|
|
543
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
452
544
|
const result = await http.patch(path, body);
|
|
453
545
|
print(result, "agent updated", describeAgent(result.agent), options);
|
|
454
546
|
}
|
|
@@ -461,7 +553,7 @@ function registerAgentCommands(agents) {
|
|
|
461
553
|
printDryRun("DELETE", path, null, options);
|
|
462
554
|
return;
|
|
463
555
|
}
|
|
464
|
-
const { http } =
|
|
556
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
465
557
|
const result = await http.delete(path);
|
|
466
558
|
print(
|
|
467
559
|
result,
|
|
@@ -473,40 +565,104 @@ function registerAgentCommands(agents) {
|
|
|
473
565
|
}
|
|
474
566
|
function registerChannelCommands(agents) {
|
|
475
567
|
const channels = agents.command("channels").description(
|
|
476
|
-
"Bind Slack channels to agents. A channel answers @mentions with one agent."
|
|
568
|
+
"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
569
|
);
|
|
478
570
|
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").
|
|
571
|
+
"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."
|
|
572
|
+
).argument("<agent>", "Agent name").argument("<channel-id>", "Slack channel id, for example C0123456789").option(
|
|
573
|
+
"--outcome <outcome>",
|
|
574
|
+
"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."
|
|
575
|
+
).option(
|
|
576
|
+
"--linked",
|
|
577
|
+
"With --outcome: link the channel instead. The agent answers here with the outcome in view; its home channel is another one."
|
|
578
|
+
).addOption(new (0, _commander.Option)("--test-channel").hideHelp()).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
481
579
|
async (agentName, channelId, options) => {
|
|
580
|
+
if (options.linked && options.outcome === void 0) {
|
|
581
|
+
throw new AgentUsageError("--linked goes with --outcome <outcome>.");
|
|
582
|
+
}
|
|
482
583
|
const body = {
|
|
483
584
|
agent: requireArgument(agentName, "an agent name"),
|
|
484
585
|
channel_id: requireArgument(
|
|
485
586
|
channelId,
|
|
486
587
|
"a channel id such as C0123456789"
|
|
487
588
|
),
|
|
488
|
-
...options.testChannel ? { test_channel: true } : {}
|
|
589
|
+
...options.testChannel ? { test_channel: true } : {},
|
|
590
|
+
...options.outcome !== void 0 ? {
|
|
591
|
+
outcome: requireArgument(options.outcome, "an outcome name"),
|
|
592
|
+
outcome_role: options.linked ? "linked" : "home"
|
|
593
|
+
} : {}
|
|
489
594
|
};
|
|
490
595
|
if (options.dryRun) {
|
|
491
596
|
printDryRun("POST", `${AGENT_PATH}/channels`, body, options);
|
|
492
597
|
return;
|
|
493
598
|
}
|
|
494
|
-
const { http } =
|
|
495
|
-
const result = await http.post(
|
|
496
|
-
`${AGENT_PATH}/channels`,
|
|
497
|
-
body
|
|
498
|
-
);
|
|
599
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
600
|
+
const result = await http.post(`${AGENT_PATH}/channels`, body);
|
|
499
601
|
print(
|
|
500
602
|
result,
|
|
501
603
|
"agent channel",
|
|
502
604
|
[
|
|
503
605
|
result.created ? `Bound ${body.channel_id} to ${result.agent.name}.` : `${body.channel_id} already answers with ${result.agent.name}.`,
|
|
606
|
+
...result.outcome ? describeOutcomeChange(result.outcome) : [],
|
|
504
607
|
...describeAgent(result.agent)
|
|
505
608
|
],
|
|
506
609
|
options
|
|
507
610
|
);
|
|
508
611
|
}
|
|
509
612
|
);
|
|
613
|
+
channels.command("set").description(
|
|
614
|
+
"Change what a bound channel\u2019s agent runs on or works toward there (the agent\u2019s creator or an admin)."
|
|
615
|
+
).argument("<channel-id>", "A bound channel id").option(
|
|
616
|
+
"--model <model>",
|
|
617
|
+
'This channel\u2019s own model, over its agent\u2019s, from deepline agents models ("default" follows the agent again)'
|
|
618
|
+
).option(
|
|
619
|
+
"--outcome <outcome>",
|
|
620
|
+
"The outcome the agent works toward here. The channel becomes the outcome\u2019s home."
|
|
621
|
+
).option(
|
|
622
|
+
"--linked",
|
|
623
|
+
"With --outcome: link the channel instead of making it the home"
|
|
624
|
+
).option("--no-outcome", "The agent works toward no outcome here").option(
|
|
625
|
+
"--platform <platform>",
|
|
626
|
+
"slack or test, when the id is bound on both"
|
|
627
|
+
).option("--dry-run", "Print the request without sending it").option("--json", "Emit JSON output").action(
|
|
628
|
+
async (channelId, options) => {
|
|
629
|
+
const platform = requirePlatform(options.platform);
|
|
630
|
+
const model = parseModel(options.model);
|
|
631
|
+
const outcome = typeof options.outcome === "string" ? requireArgument(options.outcome, "an outcome name") : options.outcome === false ? null : void 0;
|
|
632
|
+
if (model === void 0 && outcome === void 0) {
|
|
633
|
+
throw new AgentUsageError(
|
|
634
|
+
"Pass --model, --outcome <outcome> or --no-outcome."
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
if (options.linked && typeof outcome !== "string") {
|
|
638
|
+
throw new AgentUsageError("--linked goes with --outcome <outcome>.");
|
|
639
|
+
}
|
|
640
|
+
const id = requireArgument(channelId, "a channel id");
|
|
641
|
+
const path = `${AGENT_PATH}/channels/${encodeURIComponent(id)}${platform ? `?platform=${platform}` : ""}`;
|
|
642
|
+
const body = {
|
|
643
|
+
...model !== void 0 ? { model } : {},
|
|
644
|
+
...outcome !== void 0 ? { outcome } : {},
|
|
645
|
+
...typeof outcome === "string" ? { outcome_role: options.linked ? "linked" : "home" } : {}
|
|
646
|
+
};
|
|
647
|
+
if (options.dryRun) {
|
|
648
|
+
printDryRun("PATCH", path, body, options);
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
652
|
+
const result = await http.patch(path, body);
|
|
653
|
+
print(
|
|
654
|
+
result,
|
|
655
|
+
"agent channel",
|
|
656
|
+
[
|
|
657
|
+
...result.model ? [
|
|
658
|
+
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}).`
|
|
659
|
+
] : [],
|
|
660
|
+
...result.outcome ? describeOutcomeChange(result.outcome) : []
|
|
661
|
+
],
|
|
662
|
+
options
|
|
663
|
+
);
|
|
664
|
+
}
|
|
665
|
+
);
|
|
510
666
|
channels.command("remove").description(
|
|
511
667
|
"Unbind a channel from its agent (the agent\u2019s creator or an admin). Unbound channels are a no-op."
|
|
512
668
|
).argument("<channel-id>", "Channel id").option(
|
|
@@ -520,7 +676,7 @@ function registerChannelCommands(agents) {
|
|
|
520
676
|
printDryRun("DELETE", path, null, options);
|
|
521
677
|
return;
|
|
522
678
|
}
|
|
523
|
-
const { http } =
|
|
679
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
524
680
|
const result = await http.delete(path);
|
|
525
681
|
print(
|
|
526
682
|
result,
|
|
@@ -541,6 +697,14 @@ function describeSlackInstallation(installation) {
|
|
|
541
697
|
const reason = installation.uninstallReason === "tokens_revoked" ? "its token was revoked" : "removed from Slack";
|
|
542
698
|
return `${team}: not installed since ${new Date(_nullishCoalesce(installation.uninstalledAt, () => ( installation.updatedAt))).toISOString()} (${reason}); install it again to bring its channels back`;
|
|
543
699
|
}
|
|
700
|
+
function slackLinkCode(value) {
|
|
701
|
+
const text = requireArgument(value, "the code from the link");
|
|
702
|
+
try {
|
|
703
|
+
return _nullishCoalesce(new URL(text).searchParams.get("code"), () => ( text));
|
|
704
|
+
} catch (e2) {
|
|
705
|
+
return text;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
544
708
|
function registerSlackCommands(agents) {
|
|
545
709
|
const slack = agents.command("slack").description(
|
|
546
710
|
"Add the agent to Slack workspaces, each with its own bot token, and see where it is installed."
|
|
@@ -548,7 +712,7 @@ function registerSlackCommands(agents) {
|
|
|
548
712
|
slack.command("install").description(
|
|
549
713
|
"Print a link that adds the agent to a Slack workspace (owners and admins). Open it, pick the Slack workspace and approve."
|
|
550
714
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
551
|
-
const { http } =
|
|
715
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
552
716
|
const result = await http.post(
|
|
553
717
|
`${AGENT_PATH}/slack/install`,
|
|
554
718
|
{}
|
|
@@ -564,10 +728,40 @@ function registerSlackCommands(agents) {
|
|
|
564
728
|
options
|
|
565
729
|
);
|
|
566
730
|
});
|
|
731
|
+
slack.command("link").description(
|
|
732
|
+
"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."
|
|
733
|
+
).argument("<code>", "The code from the link, or the whole link").option("--json", "Emit JSON output").action(async (code, options) => {
|
|
734
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
735
|
+
const result = await http.post(`${AGENT_PATH}/slack/link`, { code: slackLinkCode(code) });
|
|
736
|
+
print(
|
|
737
|
+
result,
|
|
738
|
+
"agent slack link",
|
|
739
|
+
[
|
|
740
|
+
`Linked Slack user ${result.slackUserId} in ${result.slackTeamId} to your Deepline account. Click again in Slack.`
|
|
741
|
+
],
|
|
742
|
+
options
|
|
743
|
+
);
|
|
744
|
+
});
|
|
745
|
+
slack.command("unlink").description(
|
|
746
|
+
"Forget which Slack user you are in this workspace. Your clicks in Slack decide nothing until you link again."
|
|
747
|
+
).option("--json", "Emit JSON output").action(async (options) => {
|
|
748
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
749
|
+
const result = await http.delete(
|
|
750
|
+
`${AGENT_PATH}/slack/link`
|
|
751
|
+
);
|
|
752
|
+
print(
|
|
753
|
+
result,
|
|
754
|
+
"agent slack unlink",
|
|
755
|
+
[
|
|
756
|
+
result.removed ? "Unlinked your Slack user." : "No Slack user was linked to your account."
|
|
757
|
+
],
|
|
758
|
+
options
|
|
759
|
+
);
|
|
760
|
+
});
|
|
567
761
|
slack.command("status").description(
|
|
568
762
|
"List the Slack workspaces this workspace installed the agent in."
|
|
569
763
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
570
|
-
const { http } =
|
|
764
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
571
765
|
const result = await http.get(
|
|
572
766
|
`${AGENT_PATH}/slack/installations`
|
|
573
767
|
);
|
|
@@ -586,7 +780,7 @@ function registerSkillCommands(agents) {
|
|
|
586
780
|
"The workspace\u2019s skill library: markdown an agent loads when its description matches the task."
|
|
587
781
|
);
|
|
588
782
|
skills.command("get").description("Show one library skill with its markdown.").argument("<name>", "Skill name").option("--json", "Emit JSON output").action(async (name, options) => {
|
|
589
|
-
const { http } =
|
|
783
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
590
784
|
const result = await http.get(
|
|
591
785
|
`${AGENT_PATH}/skills/${encodeURIComponent(requireArgument(name, "a skill name"))}`
|
|
592
786
|
);
|
|
@@ -624,7 +818,7 @@ function registerSkillCommands(agents) {
|
|
|
624
818
|
printDryRun("PUT", path, body, options);
|
|
625
819
|
return;
|
|
626
820
|
}
|
|
627
|
-
const { http } =
|
|
821
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
628
822
|
const result = await http.put(path, body);
|
|
629
823
|
print(
|
|
630
824
|
result,
|
|
@@ -647,7 +841,7 @@ function registerSkillCommands(agents) {
|
|
|
647
841
|
printDryRun("DELETE", path, null, options);
|
|
648
842
|
return;
|
|
649
843
|
}
|
|
650
|
-
const { http } =
|
|
844
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
651
845
|
const result = await http.delete(path);
|
|
652
846
|
print(
|
|
653
847
|
result,
|
|
@@ -701,7 +895,7 @@ function registerFeedbackCommand(agents) {
|
|
|
701
895
|
params.set("cursor", requireArgument(options.cursor, "--cursor"));
|
|
702
896
|
}
|
|
703
897
|
const query = params.toString();
|
|
704
|
-
const { http } =
|
|
898
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
705
899
|
const page = await http.get(
|
|
706
900
|
`${AGENT_PATH}/feedback${query ? `?${query}` : ""}`
|
|
707
901
|
).catch((error) => {
|
|
@@ -764,7 +958,7 @@ function registerRepliesCommand(agents) {
|
|
|
764
958
|
params.set("cursor", requireArgument(options.cursor, "--cursor"));
|
|
765
959
|
}
|
|
766
960
|
const query = params.toString();
|
|
767
|
-
const { http } =
|
|
961
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
768
962
|
const page = await http.get(`${AGENT_PATH}/replies${query ? `?${query}` : ""}`).catch((error) => {
|
|
769
963
|
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === REPLIES_INVALID_CURSOR) {
|
|
770
964
|
throw new AgentUsageError(`--cursor: ${error.message}`);
|
|
@@ -790,13 +984,13 @@ function registerActivityCommand(agents) {
|
|
|
790
984
|
agents.command("activity").description(
|
|
791
985
|
"Sum each agent's replies over the last 7 days: how many, how they ended, median time, tokens and the last reply."
|
|
792
986
|
).option("--json", "Emit JSON output").action(async (options) => {
|
|
793
|
-
const { http } =
|
|
987
|
+
const { http } = _chunkJSIOLCTKjs.getAuthedHttpClient.call(void 0, );
|
|
794
988
|
const activity = await http.get(`${AGENT_PATH}/activity`);
|
|
795
989
|
print(activity, "agent activity", describeActivity(activity), options);
|
|
796
990
|
});
|
|
797
991
|
}
|
|
798
992
|
function registerAgentsCommands(program, readKey = readModelKey) {
|
|
799
|
-
const agents = program.command("agents", { hidden: !
|
|
993
|
+
const agents = program.command("agents", { hidden: !_chunk36254433js.cliFeatureEnabled.call(void 0, AGENT_FEATURE) }).description(
|
|
800
994
|
"Deepline agents in Slack: create agents with instructions and skills, bind channels to them, and talk to them."
|
|
801
995
|
);
|
|
802
996
|
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 _chunkSBZSJQEIjs = require('./chunk-SBZSJQEI.js');
|
|
18
|
+
require('./chunk-JSIOLCTK.js');
|
|
19
|
+
require('./chunk-36254433.js');
|
|
20
|
+
require('./chunk-MDJ4LPQ5.js');
|
|
21
|
+
require('./chunk-6VLFQZK6.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-LFQJW4S2.js');
|
|
24
|
+
require('./chunk-CFJFUVX2.js');
|
|
25
|
+
require('./chunk-E4M4QZBP.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 = _chunkSBZSJQEIjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkSBZSJQEIjs.authStatusLine; exports.clearPendingClaim = _chunkSBZSJQEIjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkSBZSJQEIjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkSBZSJQEIjs.handleRegister; exports.handleStatus = _chunkSBZSJQEIjs.handleStatus; exports.handleWait = _chunkSBZSJQEIjs.handleWait; exports.httpJson = _chunkSBZSJQEIjs.httpJson; exports.readPendingAuthClaim = _chunkSBZSJQEIjs.readPendingAuthClaim; exports.readStatusBanner = _chunkSBZSJQEIjs.readStatusBanner; exports.registerAuthCommands = _chunkSBZSJQEIjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkSBZSJQEIjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkSBZSJQEIjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkSBZSJQEIjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkSBZSJQEIjs.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-HE53AI2E.mjs";
|
|
18
|
+
import "./chunk-JPFAD6G6.mjs";
|
|
19
|
+
import "./chunk-ZRC52APB.mjs";
|
|
20
|
+
import "./chunk-XJNJ3BWU.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-CUIFDMNP.mjs";
|
|
26
26
|
import "./chunk-WZYKRD7T.mjs";
|
|
27
27
|
import "./chunk-KRD6H754.mjs";
|
|
28
28
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
concurrentRunsLine
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KQTZO6NT.mjs";
|
|
4
|
+
import "./chunk-HE53AI2E.mjs";
|
|
5
5
|
import {
|
|
6
6
|
DeeplineClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QCD7BQ5Z.mjs";
|
|
8
8
|
import {
|
|
9
9
|
PUBLIC_PLAN_SKUS,
|
|
10
10
|
iterateCursorPages,
|
|
11
11
|
requireBillingIdempotencyKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R5NKLZL2.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-AZFSCPYK.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-JPFAD6G6.mjs";
|
|
36
|
+
import "./chunk-ZRC52APB.mjs";
|
|
37
|
+
import "./chunk-XJNJ3BWU.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-CUIFDMNP.mjs";
|
|
48
48
|
import "./chunk-WZYKRD7T.mjs";
|
|
49
49
|
import "./chunk-KRD6H754.mjs";
|
|
50
50
|
|