loopengine 0.1.30 → 0.1.32
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.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/web/abilities-admin.js +15 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,10 @@ export { listDeclaredEnvVars, setEnvVar, EnvVarNameError } from './web/env-admin
|
|
|
57
57
|
export type { DeclaredEnvVar } from './web/env-admin.js';
|
|
58
58
|
export { readActauthConfig, addActauthRule, updateActauthRule, removeActauthRule, setDefaultDecision, ActauthRuleExistsError, ActauthRuleNotFoundError, } from './web/actauth-admin.js';
|
|
59
59
|
export type { ActauthRuleInput, ActauthConfigView } from './web/actauth-admin.js';
|
|
60
|
+
export { installAbility, listInstalledAbilities, AbilityManifestError, AbilityVersionError, AbilityCollisionError, AbilityAlreadyInstalledError, } from './bin/ability-manager.js';
|
|
61
|
+
export type { InstalledAbilityRecord, AbilityEnvDecl } from './bin/ability-manager.js';
|
|
62
|
+
export { searchPublicAbilities } from './web/abilities-admin.js';
|
|
63
|
+
export type { PublicAbilitySearchResult } from './web/abilities-admin.js';
|
|
60
64
|
export { describeModelProviders, describeGateways } from './web/global-config.js';
|
|
61
65
|
export type { ModelProviderInfo, AgentModelUsage, ModelsView, GatewayProviderInfo, GatewaysView } from './web/global-config.js';
|
|
62
66
|
export { createTrackedApprover, listApprovals, decideApproval, findApproval } from './web/web-approver.js';
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,8 @@ export { playgroundHtml } from './web/playground.js';
|
|
|
51
51
|
export { readSkill, writeSkill, deleteSkill, SkillInvalidIdError, SkillNotFoundError } from './web/skills-admin.js';
|
|
52
52
|
export { listDeclaredEnvVars, setEnvVar, EnvVarNameError } from './web/env-admin.js';
|
|
53
53
|
export { readActauthConfig, addActauthRule, updateActauthRule, removeActauthRule, setDefaultDecision, ActauthRuleExistsError, ActauthRuleNotFoundError, } from './web/actauth-admin.js';
|
|
54
|
+
export { installAbility, listInstalledAbilities, AbilityManifestError, AbilityVersionError, AbilityCollisionError, AbilityAlreadyInstalledError, } from './bin/ability-manager.js';
|
|
55
|
+
export { searchPublicAbilities } from './web/abilities-admin.js';
|
|
54
56
|
export { describeModelProviders, describeGateways } from './web/global-config.js';
|
|
55
57
|
export { createTrackedApprover, listApprovals, decideApproval, findApproval } from './web/web-approver.js';
|
|
56
58
|
export { scaffoldAgent, scaffoldSubagent, AgentNameError, AgentExistsError, AgentNotFoundError, AgentModelError } from './bin/cli.js';
|
|
@@ -18,9 +18,23 @@ export async function searchPublicAbilities(query) {
|
|
|
18
18
|
if (!res.ok)
|
|
19
19
|
throw new Error(`npm registry search failed (HTTP ${res.status})`);
|
|
20
20
|
const data = (await res.json());
|
|
21
|
-
|
|
21
|
+
const results = (data.objects ?? []).map((o) => ({
|
|
22
22
|
name: o.package.name,
|
|
23
23
|
description: o.package.description ?? '',
|
|
24
24
|
version: o.package.version,
|
|
25
25
|
}));
|
|
26
|
+
// npm's own search is a relevance *ranker*, not a filter — a query
|
|
27
|
+
// like "keywords:loopengine-ability docs" boosts a matching package's
|
|
28
|
+
// score but doesn't drop the non-matching ones from the response at
|
|
29
|
+
// all (confirmed live: every ability in this ecosystem still came
|
|
30
|
+
// back regardless of the extra query text, just reordered). With this
|
|
31
|
+
// few, brand-new, all-zero-download packages, that reordering barely
|
|
32
|
+
// moves, so an operator typing a search term would otherwise see the
|
|
33
|
+
// exact same full list every time. Filtering here on name/description
|
|
34
|
+
// gives the strict, expected "search box" behavior npm's own API
|
|
35
|
+
// doesn't provide on its own.
|
|
36
|
+
if (!query)
|
|
37
|
+
return results;
|
|
38
|
+
const needle = query.toLowerCase();
|
|
39
|
+
return results.filter((r) => r.name.toLowerCase().includes(needle) || r.description.toLowerCase().includes(needle));
|
|
26
40
|
}
|