@ai-ecoverse/slicc-agent 7.8.15 → 7.9.0
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/README.md +6 -6
- package/dist/client.js +12 -4
- package/dist/client.js.map +2 -2
- package/dist/guests/client.js +3 -1
- package/dist/guests/client.js.map +2 -2
- package/dist/host.js +21 -10
- package/dist/host.js.map +2 -2
- package/dist/mcp/accounts.js +38 -5
- package/dist/mcp/accounts.js.map +2 -2
- package/dist/mcp/config.js +17 -5
- package/dist/mcp/config.js.map +2 -2
- package/dist/mcp/file.js +102 -0
- package/dist/mcp/file.js.map +7 -0
- package/dist/mcp/index.js +3 -0
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/runtime.js +10 -3
- package/dist/mcp/runtime.js.map +2 -2
- package/dist/readonly.js +4 -1
- package/dist/readonly.js.map +2 -2
- package/dist/services.js +7 -0
- package/dist/services.js.map +2 -2
- package/dist/settings.js +3 -0
- package/dist/settings.js.map +2 -2
- package/dist/spectrum/index.js +4 -1
- package/dist/spectrum/index.js.map +2 -2
- package/dist/spectrum/settings-port.js +13 -1
- package/dist/spectrum/settings-port.js.map +2 -2
- package/dist/types/client.d.ts +1 -0
- package/dist/types/host.d.ts +8 -0
- package/dist/types/mcp/accounts.d.ts +7 -2
- package/dist/types/mcp/config.d.ts +6 -0
- package/dist/types/mcp/file.d.ts +13 -0
- package/dist/types/readonly.d.ts +2 -1
- package/dist/types/services.d.ts +12 -1
- package/dist/types/spectrum/settings-port.d.ts +5 -2
- package/package.json +1 -1
package/dist/types/readonly.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import type { AgentRemote } from './remote/host.ts';
|
|
|
2
2
|
import type { AgentPages } from './remote/pages.ts';
|
|
3
3
|
import { VIEW_ONLY } from './view-only.ts';
|
|
4
4
|
export { VIEW_ONLY };
|
|
5
|
+
export declare const NOT_OWNER = "Only the owner's page can change MCP servers.";
|
|
5
6
|
type Answer = (...args: unknown[]) => Promise<unknown>;
|
|
6
7
|
export declare const controlAnswer: (name: string) => Answer;
|
|
7
|
-
export declare const settingsAnswer: () => Answer;
|
|
8
|
+
export declare const settingsAnswer: (name: string) => Answer;
|
|
8
9
|
export declare const remoteAnswer: (name: string) => Answer;
|
|
9
10
|
export declare function viewPages(): AgentPages;
|
|
10
11
|
export declare const pageAnswer: (name: string) => Answer;
|
package/dist/types/services.d.ts
CHANGED
|
@@ -363,7 +363,7 @@ export interface AccountState {
|
|
|
363
363
|
provider: string;
|
|
364
364
|
identity: string;
|
|
365
365
|
status: 'connected' | 'disconnected' | 'expired';
|
|
366
|
-
auth: 'api-key' | 'oauth';
|
|
366
|
+
auth: 'api-key' | 'oauth' | 'local';
|
|
367
367
|
needs: 'cors-free-transport' | null;
|
|
368
368
|
blocked?: 'cors-free-transport';
|
|
369
369
|
group?: 'providers' | 'mcp';
|
|
@@ -373,7 +373,15 @@ export interface AccountState {
|
|
|
373
373
|
description?: string;
|
|
374
374
|
keyUrl?: string;
|
|
375
375
|
vaultName?: string;
|
|
376
|
+
state?: McpServerState;
|
|
376
377
|
}
|
|
378
|
+
export type McpServerState = 'connecting' | 'connected' | 'needs-secret' | 'needs-auth' | 'failed' | 'disabled' | 'refused';
|
|
379
|
+
export type McpEdit = {
|
|
380
|
+
ok: true;
|
|
381
|
+
} | {
|
|
382
|
+
ok: false;
|
|
383
|
+
reason: string;
|
|
384
|
+
};
|
|
377
385
|
export interface AccountField {
|
|
378
386
|
name: string;
|
|
379
387
|
label: string;
|
|
@@ -434,6 +442,9 @@ export interface AgentSettings {
|
|
|
434
442
|
serverUrl(providerId: string, context: Context): Promise<string | null>;
|
|
435
443
|
signIn(providerId: string, context: Context): Promise<SignIn | McpSignIn | DeviceSignIn | null>;
|
|
436
444
|
dismissMoved(context: Context): Promise<void>;
|
|
445
|
+
addServer(name: string, entry: unknown, context: Context): Promise<McpEdit>;
|
|
446
|
+
removeServer(id: string, context: Context): Promise<McpEdit>;
|
|
437
447
|
}
|
|
438
448
|
export declare const SETTINGS_METHODS: ("connect" | "disconnect" | "dismissMoved" | "remove" | "serverUrl" | "signIn")[];
|
|
449
|
+
export declare const OWNER_SETTINGS_METHODS: readonly (keyof Omit<AgentSettings, 'state'> & string)[];
|
|
439
450
|
export declare const AgentSettings: RemoteContract;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Account, ModelOption, Settings, SettingsEvents, SettingsPort } from '@ai-ecoverse/slicc-spectrum/ui';
|
|
2
|
-
import type { AgentSettings, ProviderOption, SignIn } from '../services.ts';
|
|
2
|
+
import type { AgentSettings, McpEdit, ProviderOption, SignIn } from '../services.ts';
|
|
3
3
|
import { type ConnectOptions } from '../sign-ins.ts';
|
|
4
4
|
import type { AgentAdapter } from './agent-port.ts';
|
|
5
5
|
import { Emitter } from './emitter.ts';
|
|
@@ -13,13 +13,16 @@ export type Login = (providerId: string, signIn: () => Promise<SignIn | null>, o
|
|
|
13
13
|
}) => Promise<string | Sealed>;
|
|
14
14
|
export declare const SIGN_IN_NEEDS_VAULT = "Adobe sign-in needs seven's vault: update seven";
|
|
15
15
|
export declare const UNFINISHED = "The sign-in didn't finish. Try again.";
|
|
16
|
+
export declare const NOTHING_TO_CONNECT = "This MCP server has no sign-in to connect: it needs none, or it's off in mcp.json.";
|
|
16
17
|
export declare function readable(error: unknown): Error;
|
|
17
18
|
type Events = SettingsEvents & {
|
|
18
19
|
providers: readonly ProviderOption[];
|
|
19
20
|
};
|
|
20
21
|
export declare class SettingsAdapter extends Emitter<Events> implements SettingsPort {
|
|
21
22
|
#private;
|
|
22
|
-
|
|
23
|
+
readonly addServer?: (name: string, entry: unknown) => Promise<McpEdit>;
|
|
24
|
+
readonly removeServer?: (id: string) => Promise<McpEdit>;
|
|
25
|
+
constructor(settings: AgentSettings, agent: AgentAdapter, storage: Pick<Storage, 'getItem' | 'setItem'> | null, login?: Login | null, mcp?: Login, popups?: SignInWindow, owner?: boolean);
|
|
23
26
|
get(): Settings;
|
|
24
27
|
update(patch: Partial<Settings>): void;
|
|
25
28
|
models(): readonly ModelOption[];
|
package/package.json
CHANGED