loopengine 0.1.2 → 0.1.4
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/core/agent-config.d.ts +9 -5
- package/dist/core/durable-approvals.d.ts +106 -0
- package/dist/core/durable-approvals.js +158 -0
- package/dist/core/gateway-tools.js +10 -9
- package/dist/core/run-agent.js +20 -3
- package/dist/index.d.ts +24 -1
- package/dist/index.js +26 -1
- package/dist/web/actauth-admin.d.ts +36 -0
- package/dist/web/actauth-admin.js +108 -0
- package/dist/web/agent-file-admin.d.ts +30 -0
- package/dist/web/agent-file-admin.js +165 -0
- package/dist/web/agents-config-page.d.ts +1 -0
- package/dist/web/agents-config-page.js +1628 -0
- package/dist/web/agents-list-page.d.ts +1 -0
- package/dist/web/agents-list-page.js +246 -0
- package/dist/web/dev-ui-styles.d.ts +1 -0
- package/dist/web/dev-ui-styles.js +63 -0
- package/dist/web/global-config-page.d.ts +1 -0
- package/dist/web/global-config-page.js +303 -0
- package/dist/web/global-config.d.ts +57 -0
- package/dist/web/global-config.js +67 -0
- package/dist/web/playground.d.ts +1 -0
- package/dist/web/playground.js +1271 -0
- package/dist/web/skills-admin.d.ts +23 -0
- package/dist/web/skills-admin.js +67 -0
- package/dist/web/web-approver.d.ts +35 -0
- package/dist/web/web-approver.js +88 -0
- package/package.json +5 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getComposioAuthStatus } from '../core/gateway-tools.js';
|
|
2
|
+
// One entry per provider agent-config.ts's own AgentModelConfig union
|
|
3
|
+
// actually supports (see its own doc comment) — kept here, not derived
|
|
4
|
+
// from that type, since there's no runtime list to introspect a TS
|
|
5
|
+
// union from; adding a fourth provider means one more line here and one
|
|
6
|
+
// more arm in that union, not a rewrite.
|
|
7
|
+
const KNOWN_PROVIDERS = [
|
|
8
|
+
{ provider: 'anthropic', envVar: 'ANTHROPIC_API_KEY' },
|
|
9
|
+
{ provider: 'openai', envVar: 'OPENAI_API_KEY' },
|
|
10
|
+
{ provider: 'deepseek', envVar: 'DEEPSEEK_API_KEY' },
|
|
11
|
+
];
|
|
12
|
+
/** Every registered agent's resolved model, alongside whether each
|
|
13
|
+
* supported provider actually has credentials available in this
|
|
14
|
+
* process's environment — an operator's first question when a request
|
|
15
|
+
* fails isn't "what does this one agent request?" (Overview's own Model
|
|
16
|
+
* section already answers that) but "is this deployment even set up to
|
|
17
|
+
* call that provider at all?". Read-only: providers/env vars are wired
|
|
18
|
+
* into the actual model-call modules (model-calls/*.ts), not something
|
|
19
|
+
* this page can add support for by itself. An agent with a custom
|
|
20
|
+
* `createModelCall` (no `config.model`) is skipped — there's no
|
|
21
|
+
* provider/model pair to report for it, the same "custom" case
|
|
22
|
+
* describeAgent's own model field already carves out.
|
|
23
|
+
*
|
|
24
|
+
* Takes the registered agent names and a config lookup as parameters,
|
|
25
|
+
* rather than importing core/agent-registry.ts's listAgents/getEntry
|
|
26
|
+
* directly — that module is this repo's own reference app, not part of
|
|
27
|
+
* the published package (see index.ts's own header comment), and its
|
|
28
|
+
* top-level-await agent scan is resolved relative to *its own* file
|
|
29
|
+
* location, which would be meaningless run from inside node_modules.
|
|
30
|
+
* Every caller already has its own local registry's listAgents/getEntry
|
|
31
|
+
* on hand (adapters/http.ts, in this repo or a scaffolded project alike)
|
|
32
|
+
* to pass straight through. */
|
|
33
|
+
export function describeModelProviders(agentNames, getConfig) {
|
|
34
|
+
const providers = KNOWN_PROVIDERS.map(({ provider, envVar }) => ({
|
|
35
|
+
provider,
|
|
36
|
+
envVar,
|
|
37
|
+
configured: Boolean(process.env[envVar]),
|
|
38
|
+
}));
|
|
39
|
+
const agents = [];
|
|
40
|
+
for (const name of agentNames) {
|
|
41
|
+
const config = getConfig(name);
|
|
42
|
+
if (config?.model) {
|
|
43
|
+
agents.push({ agent: name, provider: config.model.provider, model: config.model.model ?? '(provider default)' });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { providers, agents };
|
|
47
|
+
}
|
|
48
|
+
/** The provider-level counterpart to gateway-tools.ts's own registry
|
|
49
|
+
* (which is scoped to one agent's chosen tools within an already-
|
|
50
|
+
* connected provider) — this is "is Composio itself usable from this
|
|
51
|
+
* machine at all", not "what has agent X registered". Nango/Arcade/
|
|
52
|
+
* Scalekit are listed as not-yet-supported placeholders, matching
|
|
53
|
+
* gateway-tools.ts's own header comment about them slotting in later as
|
|
54
|
+
* thin mcpplug ToolSource adapters once this mechanism is proven —
|
|
55
|
+
* shown so the Gateways panel isn't silently missing them, not because
|
|
56
|
+
* there's anything to check for them yet. */
|
|
57
|
+
export async function describeGateways(cliCommand = 'composio') {
|
|
58
|
+
const composio = await getComposioAuthStatus(cliCommand);
|
|
59
|
+
return {
|
|
60
|
+
gateways: [
|
|
61
|
+
{ provider: 'composio', supported: true, connected: composio.connected, email: composio.email, org: composio.org },
|
|
62
|
+
{ provider: 'scalekit', supported: false, connected: false },
|
|
63
|
+
{ provider: 'nango', supported: false, connected: false },
|
|
64
|
+
{ provider: 'arcade', supported: false, connected: false },
|
|
65
|
+
],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const playgroundHtml: string;
|