@hasna/assistants 1.1.26 → 1.1.27
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/index.js +143 -90
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78406,15 +78406,37 @@ class BuiltinCommands {
|
|
|
78406
78406
|
**About Hasna**
|
|
78407
78407
|
|
|
78408
78408
|
`;
|
|
78409
|
-
message += `Hasna is a
|
|
78409
|
+
message += `Hasna is on a mission to make AI more useful to everyone.
|
|
78410
|
+
`;
|
|
78411
|
+
message += `We build tools that bring the power of AI into your everyday workflow \u2014 no expertise required.
|
|
78410
78412
|
`;
|
|
78411
78413
|
message += `Website: hasna.com
|
|
78412
78414
|
`;
|
|
78413
78415
|
message += `
|
|
78414
|
-
**About
|
|
78416
|
+
**About Hasna Assistants**
|
|
78417
|
+
|
|
78418
|
+
`;
|
|
78419
|
+
message += `Hasna Assistants is a general-purpose AI assistant that lives in your terminal.
|
|
78420
|
+
`;
|
|
78421
|
+
message += `It connects natively to 100+ tools \u2014 email, calendars, databases, cloud storage, CRMs, and more \u2014 so you can get things done without switching apps.
|
|
78415
78422
|
|
|
78416
78423
|
`;
|
|
78417
|
-
message += `
|
|
78424
|
+
message += `What you can do:
|
|
78425
|
+
`;
|
|
78426
|
+
message += `- Ask questions and get answers in plain language
|
|
78427
|
+
`;
|
|
78428
|
+
message += `- Automate repetitive tasks across your tools
|
|
78429
|
+
`;
|
|
78430
|
+
message += `- Read, write, and manage files on your machine
|
|
78431
|
+
`;
|
|
78432
|
+
message += `- Run multi-step workflows with built-in skills
|
|
78433
|
+
`;
|
|
78434
|
+
message += `- Schedule commands to run on a timer
|
|
78435
|
+
`;
|
|
78436
|
+
message += `- Collaborate with multiple AI agents via swarm mode
|
|
78437
|
+
|
|
78438
|
+
`;
|
|
78439
|
+
message += `Whether you are a developer, a founder, or just someone who wants AI to handle the boring stuff \u2014 Assistants is built for you.
|
|
78418
78440
|
`;
|
|
78419
78441
|
context.emit("text", message);
|
|
78420
78442
|
context.emit("done");
|
|
@@ -87154,7 +87176,7 @@ Not a git repository or git not available.
|
|
|
87154
87176
|
context.setProjectContext(projectContext);
|
|
87155
87177
|
}
|
|
87156
87178
|
}
|
|
87157
|
-
var VERSION2 = "1.1.
|
|
87179
|
+
var VERSION2 = "1.1.27";
|
|
87158
87180
|
var init_builtin = __esm(async () => {
|
|
87159
87181
|
init_src2();
|
|
87160
87182
|
init_store();
|
|
@@ -229252,20 +229274,29 @@ function GuardrailsPanel({
|
|
|
229252
229274
|
return;
|
|
229253
229275
|
}
|
|
229254
229276
|
if (mode === "policies") {
|
|
229277
|
+
const policiesListSize = policies.length + 1;
|
|
229255
229278
|
if (key.upArrow) {
|
|
229256
|
-
setSelectedIndex((prev) => prev === 0 ?
|
|
229279
|
+
setSelectedIndex((prev) => prev === 0 ? policiesListSize - 1 : prev - 1);
|
|
229257
229280
|
return;
|
|
229258
229281
|
}
|
|
229259
229282
|
if (key.downArrow) {
|
|
229260
|
-
setSelectedIndex((prev) => prev >=
|
|
229283
|
+
setSelectedIndex((prev) => prev >= policiesListSize - 1 ? 0 : prev + 1);
|
|
229261
229284
|
return;
|
|
229262
229285
|
}
|
|
229263
229286
|
if (key.return) {
|
|
229264
|
-
|
|
229265
|
-
|
|
229266
|
-
|
|
229267
|
-
|
|
229268
|
-
|
|
229287
|
+
if (selectedIndex === policies.length) {
|
|
229288
|
+
setCreateName("");
|
|
229289
|
+
setCreateScopeIdx(2);
|
|
229290
|
+
setCreateActionIdx(0);
|
|
229291
|
+
setCreateField(0);
|
|
229292
|
+
setMode("policy-create");
|
|
229293
|
+
} else {
|
|
229294
|
+
const policy = policies[selectedIndex];
|
|
229295
|
+
if (policy) {
|
|
229296
|
+
setDetailPolicyId(policy.id);
|
|
229297
|
+
setRuleIndex(0);
|
|
229298
|
+
setMode("policy-detail");
|
|
229299
|
+
}
|
|
229269
229300
|
}
|
|
229270
229301
|
return;
|
|
229271
229302
|
}
|
|
@@ -229824,54 +229855,66 @@ function GuardrailsPanel({
|
|
|
229824
229855
|
paddingX: 1,
|
|
229825
229856
|
height: Math.min(12, policies.length + 2),
|
|
229826
229857
|
overflowY: "hidden",
|
|
229827
|
-
children:
|
|
229828
|
-
|
|
229829
|
-
|
|
229830
|
-
dimColor: true,
|
|
229831
|
-
children: "No policies. Press n to create one."
|
|
229832
|
-
}, undefined, false, undefined, this)
|
|
229833
|
-
}, undefined, false, undefined, this) : policies.map((policy, index) => {
|
|
229834
|
-
const isSelected = index === selectedIndex;
|
|
229835
|
-
const scopeColor = SCOPE_COLORS[policy.scope] || "white";
|
|
229836
|
-
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
229858
|
+
children: [
|
|
229859
|
+
policies.length === 0 ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
229860
|
+
paddingY: 1,
|
|
229837
229861
|
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229838
|
-
|
|
229839
|
-
children:
|
|
229840
|
-
|
|
229841
|
-
|
|
229842
|
-
|
|
229843
|
-
|
|
229844
|
-
|
|
229845
|
-
|
|
229846
|
-
|
|
229847
|
-
|
|
229848
|
-
|
|
229849
|
-
|
|
229850
|
-
|
|
229851
|
-
|
|
229852
|
-
|
|
229853
|
-
|
|
229854
|
-
|
|
229855
|
-
|
|
229856
|
-
|
|
229857
|
-
|
|
229858
|
-
|
|
229859
|
-
|
|
229860
|
-
|
|
229861
|
-
|
|
229862
|
-
|
|
229863
|
-
|
|
229864
|
-
|
|
229865
|
-
|
|
229866
|
-
|
|
229867
|
-
|
|
229868
|
-
|
|
229869
|
-
|
|
229862
|
+
dimColor: true,
|
|
229863
|
+
children: "No policies. Press n to create one."
|
|
229864
|
+
}, undefined, false, undefined, this)
|
|
229865
|
+
}, undefined, false, undefined, this) : policies.map((policy, index) => {
|
|
229866
|
+
const isSelected = index === selectedIndex;
|
|
229867
|
+
const scopeColor = SCOPE_COLORS[policy.scope] || "white";
|
|
229868
|
+
return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
229869
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229870
|
+
inverse: isSelected,
|
|
229871
|
+
children: [
|
|
229872
|
+
isSelected ? ">" : " ",
|
|
229873
|
+
" ",
|
|
229874
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229875
|
+
color: policy.enabled ? "green" : "red",
|
|
229876
|
+
children: [
|
|
229877
|
+
"[",
|
|
229878
|
+
policy.enabled ? "on " : "off",
|
|
229879
|
+
"]"
|
|
229880
|
+
]
|
|
229881
|
+
}, undefined, true, undefined, this),
|
|
229882
|
+
" ",
|
|
229883
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229884
|
+
bold: isSelected,
|
|
229885
|
+
children: (policy.name || policy.id).slice(0, 20).padEnd(20)
|
|
229886
|
+
}, undefined, false, undefined, this),
|
|
229887
|
+
" ",
|
|
229888
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229889
|
+
color: scopeColor,
|
|
229890
|
+
children: policy.scope.padEnd(10)
|
|
229891
|
+
}, undefined, false, undefined, this),
|
|
229892
|
+
" ",
|
|
229893
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229894
|
+
dimColor: true,
|
|
229895
|
+
children: policy.location
|
|
229896
|
+
}, undefined, false, undefined, this)
|
|
229897
|
+
]
|
|
229898
|
+
}, undefined, true, undefined, this)
|
|
229899
|
+
}, policy.id, false, undefined, this);
|
|
229900
|
+
}),
|
|
229901
|
+
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
229902
|
+
marginTop: policies.length > 0 ? 1 : 0,
|
|
229903
|
+
paddingY: 0,
|
|
229904
|
+
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229905
|
+
inverse: selectedIndex === policies.length,
|
|
229906
|
+
dimColor: selectedIndex !== policies.length,
|
|
229907
|
+
color: selectedIndex === policies.length ? "cyan" : undefined,
|
|
229908
|
+
children: "+ New policy (n)"
|
|
229909
|
+
}, undefined, false, undefined, this)
|
|
229910
|
+
}, undefined, false, undefined, this)
|
|
229911
|
+
]
|
|
229912
|
+
}, undefined, true, undefined, this),
|
|
229870
229913
|
/* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
|
|
229871
229914
|
marginTop: 1,
|
|
229872
229915
|
children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
|
|
229873
229916
|
dimColor: true,
|
|
229874
|
-
children: "[
|
|
229917
|
+
children: "[e]nable [d]isable [Enter] detail [b]ack [q]uit | \u2191\u2193 navigate"
|
|
229875
229918
|
}, undefined, false, undefined, this)
|
|
229876
229919
|
}, undefined, false, undefined, this)
|
|
229877
229920
|
]
|
|
@@ -231033,7 +231076,7 @@ function BudgetsPanel({
|
|
|
231033
231076
|
const editSessionStatus = showingActiveProfile ? sessionStatus : createDraftStatus("session", activeOrDraftProfileForEdit?.config.session);
|
|
231034
231077
|
const editSwarmStatus = showingActiveProfile ? swarmStatus : createDraftStatus("swarm", activeOrDraftProfileForEdit?.config.swarm);
|
|
231035
231078
|
import_react57.useEffect(() => {
|
|
231036
|
-
setSelectedIndex((prev) => Math.min(prev,
|
|
231079
|
+
setSelectedIndex((prev) => Math.min(prev, profiles.length));
|
|
231037
231080
|
}, [profiles.length]);
|
|
231038
231081
|
import_react57.useEffect(() => {
|
|
231039
231082
|
if (!editingProfileId)
|
|
@@ -231118,7 +231161,9 @@ function BudgetsPanel({
|
|
|
231118
231161
|
return;
|
|
231119
231162
|
}
|
|
231120
231163
|
if (key.return) {
|
|
231121
|
-
if (
|
|
231164
|
+
if (selectedIndex === profiles.length) {
|
|
231165
|
+
startCreateForm();
|
|
231166
|
+
} else if (selectedProfile) {
|
|
231122
231167
|
onSelectProfile(selectedProfile.id);
|
|
231123
231168
|
}
|
|
231124
231169
|
return;
|
|
@@ -231128,15 +231173,11 @@ function BudgetsPanel({
|
|
|
231128
231173
|
return;
|
|
231129
231174
|
}
|
|
231130
231175
|
if (key.upArrow) {
|
|
231131
|
-
|
|
231132
|
-
return;
|
|
231133
|
-
setSelectedIndex((prev) => prev === 0 ? profiles.length - 1 : prev - 1);
|
|
231176
|
+
setSelectedIndex((prev) => prev === 0 ? profiles.length : prev - 1);
|
|
231134
231177
|
return;
|
|
231135
231178
|
}
|
|
231136
231179
|
if (key.downArrow) {
|
|
231137
|
-
|
|
231138
|
-
return;
|
|
231139
|
-
setSelectedIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
231180
|
+
setSelectedIndex((prev) => prev === profiles.length ? 0 : prev + 1);
|
|
231140
231181
|
return;
|
|
231141
231182
|
}
|
|
231142
231183
|
}, { isActive: true });
|
|
@@ -231389,34 +231430,46 @@ function BudgetsPanel({
|
|
|
231389
231430
|
borderStyle: "round",
|
|
231390
231431
|
borderColor: "gray",
|
|
231391
231432
|
paddingX: 1,
|
|
231392
|
-
children:
|
|
231393
|
-
|
|
231394
|
-
|
|
231395
|
-
|
|
231396
|
-
|
|
231397
|
-
|
|
231398
|
-
|
|
231399
|
-
|
|
231400
|
-
|
|
231401
|
-
|
|
231433
|
+
children: [
|
|
231434
|
+
profiles.length === 0 ? /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
231435
|
+
paddingY: 1,
|
|
231436
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
231437
|
+
dimColor: true,
|
|
231438
|
+
children: "No budget profiles. Press n to create one."
|
|
231439
|
+
}, undefined, false, undefined, this)
|
|
231440
|
+
}, undefined, false, undefined, this) : profiles.map((profile, index) => {
|
|
231441
|
+
const isSelected = index === selectedIndex;
|
|
231442
|
+
const isActive = profile.id === activeProfileId;
|
|
231443
|
+
return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
231444
|
+
paddingY: 0,
|
|
231445
|
+
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
231446
|
+
inverse: isSelected,
|
|
231447
|
+
color: isActive ? "green" : undefined,
|
|
231448
|
+
dimColor: !isSelected && !isActive,
|
|
231449
|
+
children: [
|
|
231450
|
+
isActive ? "*" : " ",
|
|
231451
|
+
" ",
|
|
231452
|
+
index + 1,
|
|
231453
|
+
". ",
|
|
231454
|
+
profile.name.padEnd(22),
|
|
231455
|
+
" ",
|
|
231456
|
+
profile.description || ""
|
|
231457
|
+
]
|
|
231458
|
+
}, undefined, true, undefined, this)
|
|
231459
|
+
}, profile.id, false, undefined, this);
|
|
231460
|
+
}),
|
|
231461
|
+
/* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
231462
|
+
marginTop: profiles.length > 0 ? 1 : 0,
|
|
231402
231463
|
paddingY: 0,
|
|
231403
231464
|
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
231404
|
-
inverse:
|
|
231405
|
-
|
|
231406
|
-
|
|
231407
|
-
children:
|
|
231408
|
-
|
|
231409
|
-
|
|
231410
|
-
|
|
231411
|
-
|
|
231412
|
-
profile.name.padEnd(22),
|
|
231413
|
-
" ",
|
|
231414
|
-
profile.description || ""
|
|
231415
|
-
]
|
|
231416
|
-
}, undefined, true, undefined, this)
|
|
231417
|
-
}, profile.id, false, undefined, this);
|
|
231418
|
-
})
|
|
231419
|
-
}, undefined, false, undefined, this),
|
|
231465
|
+
inverse: selectedIndex === profiles.length,
|
|
231466
|
+
dimColor: selectedIndex !== profiles.length,
|
|
231467
|
+
color: selectedIndex === profiles.length ? "cyan" : undefined,
|
|
231468
|
+
children: "+ New profile (n)"
|
|
231469
|
+
}, undefined, false, undefined, this)
|
|
231470
|
+
}, undefined, false, undefined, this)
|
|
231471
|
+
]
|
|
231472
|
+
}, undefined, true, undefined, this),
|
|
231420
231473
|
selectedProfile && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
|
|
231421
231474
|
marginTop: 1,
|
|
231422
231475
|
children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
|
|
@@ -244238,7 +244291,7 @@ Interactive Mode:
|
|
|
244238
244291
|
// packages/terminal/src/index.tsx
|
|
244239
244292
|
var jsx_dev_runtime49 = __toESM(require_jsx_dev_runtime(), 1);
|
|
244240
244293
|
setRuntime(bunRuntime);
|
|
244241
|
-
var VERSION4 = "1.1.
|
|
244294
|
+
var VERSION4 = "1.1.27";
|
|
244242
244295
|
var SYNC_START = "\x1B[?2026h";
|
|
244243
244296
|
var SYNC_END = "\x1B[?2026l";
|
|
244244
244297
|
function enableSynchronizedOutput() {
|
|
@@ -244378,4 +244431,4 @@ export {
|
|
|
244378
244431
|
main
|
|
244379
244432
|
};
|
|
244380
244433
|
|
|
244381
|
-
//# debugId=
|
|
244434
|
+
//# debugId=463A5E72A8326CA464756E2164756E21
|