@silo-code/sdk 0.42.0 → 0.44.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/dist/AgentIconGlyph.d.ts +30 -0
- package/dist/AgentIconGlyph.d.ts.map +1 -0
- package/dist/AgentIconGlyph.js +28 -0
- package/dist/AgentIconGlyph.js.map +1 -0
- package/dist/MenuButton.d.ts +20 -4
- package/dist/MenuButton.d.ts.map +1 -1
- package/dist/MenuButton.js +15 -4
- package/dist/MenuButton.js.map +1 -1
- package/dist/agents-service.d.ts +70 -1
- package/dist/agents-service.d.ts.map +1 -1
- package/dist/domain-types.d.ts +25 -0
- package/dist/domain-types.d.ts.map +1 -1
- package/dist/extension-storage.d.ts +56 -8
- package/dist/extension-storage.d.ts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/menu-button-classes.d.ts +15 -3
- package/dist/menu-button-classes.d.ts.map +1 -1
- package/dist/menu-button-classes.js +10 -6
- package/dist/menu-button-classes.js.map +1 -1
- package/dist/terminal-service.d.ts +8 -1
- package/dist/terminal-service.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AgentIconGlyph.tsx +56 -0
- package/src/MenuButton.tsx +25 -4
- package/src/agents-service.ts +73 -1
- package/src/domain-types.ts +25 -0
- package/src/extension-storage.ts +58 -8
- package/src/index.ts +11 -2
- package/src/menu-button-classes.test.ts +13 -0
- package/src/menu-button-classes.ts +23 -6
- package/src/terminal-service.ts +8 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AgentIcon, AgentIconMode } from "./agents-service.js";
|
|
2
|
+
/**
|
|
3
|
+
* Renders a Catalog Agent's brand mark from its {@link AgentIcon} data (get one
|
|
4
|
+
* from {@link AgentsService.catalog}). Data-driven on purpose — it takes the
|
|
5
|
+
* icon, not an agent id, so it has no dependency on the sealed catalog and one
|
|
6
|
+
* renderer serves the host `+` menu, `silo.agents`, and third-party extensions.
|
|
7
|
+
*
|
|
8
|
+
* Returns `null` when `mode` is `"none"` or `icon` is absent — callers that
|
|
9
|
+
* gate tab chrome on "is there an icon" should check the return value, not
|
|
10
|
+
* construct the element unconditionally.
|
|
11
|
+
*
|
|
12
|
+
* `"color"` tints the glyph with the brand's own hex (picking
|
|
13
|
+
* {@link AgentIcon.hexLight} / {@link AgentIcon.hexDark} by `colorScheme`, since
|
|
14
|
+
* one hex can't contrast against both a light and a dark tab strip);
|
|
15
|
+
* `"monotone"` leaves `color` unset so it inherits `currentColor` from an
|
|
16
|
+
* ancestor. A duotone source (OpenCode's frame + panel) layers a second
|
|
17
|
+
* 40%-opacity path rather than flattening to one fill.
|
|
18
|
+
*
|
|
19
|
+
* @category Consumer Services
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare function AgentIconGlyph({ icon, mode, colorScheme, className, }: {
|
|
23
|
+
icon: AgentIcon | undefined;
|
|
24
|
+
mode: AgentIconMode;
|
|
25
|
+
/** The host's active light/dark base — selects `hexLight` / `hexDark` in
|
|
26
|
+
* `"color"` mode. */
|
|
27
|
+
colorScheme: "dark" | "light";
|
|
28
|
+
className?: string;
|
|
29
|
+
}): import("react").JSX.Element | null;
|
|
30
|
+
//# sourceMappingURL=AgentIconGlyph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentIconGlyph.d.ts","sourceRoot":"","sources":["../src/AgentIconGlyph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,SAAS,GACV,EAAE;IACD,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB;0BACsB;IACtB,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,sCAqBA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Renders a Catalog Agent's brand mark from its {@link AgentIcon} data (get one
|
|
4
|
+
* from {@link AgentsService.catalog}). Data-driven on purpose — it takes the
|
|
5
|
+
* icon, not an agent id, so it has no dependency on the sealed catalog and one
|
|
6
|
+
* renderer serves the host `+` menu, `silo.agents`, and third-party extensions.
|
|
7
|
+
*
|
|
8
|
+
* Returns `null` when `mode` is `"none"` or `icon` is absent — callers that
|
|
9
|
+
* gate tab chrome on "is there an icon" should check the return value, not
|
|
10
|
+
* construct the element unconditionally.
|
|
11
|
+
*
|
|
12
|
+
* `"color"` tints the glyph with the brand's own hex (picking
|
|
13
|
+
* {@link AgentIcon.hexLight} / {@link AgentIcon.hexDark} by `colorScheme`, since
|
|
14
|
+
* one hex can't contrast against both a light and a dark tab strip);
|
|
15
|
+
* `"monotone"` leaves `color` unset so it inherits `currentColor` from an
|
|
16
|
+
* ancestor. A duotone source (OpenCode's frame + panel) layers a second
|
|
17
|
+
* 40%-opacity path rather than flattening to one fill.
|
|
18
|
+
*
|
|
19
|
+
* @category Consumer Services
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export function AgentIconGlyph({ icon, mode, colorScheme, className, }) {
|
|
23
|
+
if (mode === "none" || !icon)
|
|
24
|
+
return null;
|
|
25
|
+
const hex = colorScheme === "light" ? icon.hexLight : icon.hexDark;
|
|
26
|
+
return (_jsxs("svg", { viewBox: "0 0 24 24", className: className, style: mode === "color" ? { color: `#${hex}` } : undefined, "aria-hidden": "true", children: [_jsx("path", { d: icon.path, fill: "currentColor", fillRule: icon.fillRule }), icon.accentPath && (_jsx("path", { d: icon.accentPath, fill: "currentColor", fillRule: icon.accentFillRule, opacity: 0.4 }))] }));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=AgentIconGlyph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentIconGlyph.js","sourceRoot":"","sources":["../src/AgentIconGlyph.tsx"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,SAAS,GAQV;IACC,IAAI,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,MAAM,GAAG,GAAG,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACnE,OAAO,CACL,eACE,OAAO,EAAC,WAAW,EACnB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,iBAC9C,MAAM,aAElB,eAAM,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,cAAc,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,EAClE,IAAI,CAAC,UAAU,IAAI,CAClB,eACE,CAAC,EAAE,IAAI,CAAC,UAAU,EAClB,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,OAAO,EAAE,GAAG,GACZ,CACH,IACG,CACP,CAAC;AACJ,CAAC"}
|
package/dist/MenuButton.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import { type MenuButtonSize } from "./menu-button-classes.js";
|
|
3
|
-
export type { MenuButtonSize };
|
|
2
|
+
import { type MenuButtonSize, type MenuButtonVariant } from "./menu-button-classes.js";
|
|
3
|
+
export type { MenuButtonSize, MenuButtonVariant };
|
|
4
4
|
/**
|
|
5
5
|
* A **labelled** button that opens a menu — the counterpart to
|
|
6
6
|
* {@link IconButton} for the cases where a bare `⋮` doesn't tell anyone what
|
|
@@ -17,7 +17,9 @@ export type { MenuButtonSize };
|
|
|
17
17
|
* lines up under the button.
|
|
18
18
|
*
|
|
19
19
|
* Styled purely via host-provided `.silo-menu-button*` classes — no stylesheet
|
|
20
|
-
* import is needed in the extension.
|
|
20
|
+
* import is needed in the extension. `variant="field"` gives it `Input` /
|
|
21
|
+
* `Select` chrome (border, full width, trailing chevron) for use as a value
|
|
22
|
+
* picker in a form, where a rich menu (icons, checks) beats a native `<select>`.
|
|
21
23
|
*
|
|
22
24
|
* @example
|
|
23
25
|
* ```tsx
|
|
@@ -36,16 +38,30 @@ export type { MenuButtonSize };
|
|
|
36
38
|
*
|
|
37
39
|
* // compact — e.g. in a card footer or a ListRow's trailing slot
|
|
38
40
|
* <MenuButton size="sm" label="More" onClick={openMenu} />
|
|
41
|
+
*
|
|
42
|
+
* // as a form field — a value picker inside a `Section`
|
|
43
|
+
* <MenuButton
|
|
44
|
+
* variant="field"
|
|
45
|
+
* label={agent?.displayName ?? "Auto-detect"}
|
|
46
|
+
* onClick={(e) => ctx.ui.showMenu({ anchor: e.currentTarget, items })}
|
|
47
|
+
* >
|
|
48
|
+
* <AgentIconGlyph icon={agent?.icon} mode="color" colorScheme={scheme} />
|
|
49
|
+
* </MenuButton>
|
|
39
50
|
* ```
|
|
40
51
|
*
|
|
41
52
|
* @category Consumer Services
|
|
42
53
|
* @public
|
|
43
54
|
*/
|
|
44
|
-
export declare function MenuButton({ label, size, className, type, children, ...rest }: {
|
|
55
|
+
export declare function MenuButton({ label, size, variant, className, type, children, ...rest }: {
|
|
45
56
|
/** The visible label — the whole point of reaching for this over `IconButton`. */
|
|
46
57
|
label: ReactNode;
|
|
47
58
|
/** `sm` for compact contexts (card footers, list rows). */
|
|
48
59
|
size?: MenuButtonSize;
|
|
60
|
+
/**
|
|
61
|
+
* `"bare"` (default) is a borderless label + chevron for toolbars and rows;
|
|
62
|
+
* `"field"` wears `Input` / `Select` chrome so it lines up as a form field.
|
|
63
|
+
*/
|
|
64
|
+
variant?: MenuButtonVariant;
|
|
49
65
|
/** Optional leading content, e.g. an icon before the label. */
|
|
50
66
|
children?: ReactNode;
|
|
51
67
|
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">): import("react").JSX.Element;
|
package/dist/MenuButton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../src/MenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"MenuButton.d.ts","sourceRoot":"","sources":["../src/MenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAe,EACf,OAAgB,EAChB,SAAS,EACT,IAAe,EACf,QAAQ,EACR,GAAG,IAAI,EACR,EAAE;IACD,kFAAkF;IAClF,KAAK,EAAE,SAAS,CAAC;IACjB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,+BA6B5D"}
|
package/dist/MenuButton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { menuButtonClass } from "./menu-button-classes.js";
|
|
2
|
+
import { menuButtonClass, } from "./menu-button-classes.js";
|
|
3
3
|
/**
|
|
4
4
|
* A **labelled** button that opens a menu — the counterpart to
|
|
5
5
|
* {@link IconButton} for the cases where a bare `⋮` doesn't tell anyone what
|
|
@@ -16,7 +16,9 @@ import { menuButtonClass } from "./menu-button-classes.js";
|
|
|
16
16
|
* lines up under the button.
|
|
17
17
|
*
|
|
18
18
|
* Styled purely via host-provided `.silo-menu-button*` classes — no stylesheet
|
|
19
|
-
* import is needed in the extension.
|
|
19
|
+
* import is needed in the extension. `variant="field"` gives it `Input` /
|
|
20
|
+
* `Select` chrome (border, full width, trailing chevron) for use as a value
|
|
21
|
+
* picker in a form, where a rich menu (icons, checks) beats a native `<select>`.
|
|
20
22
|
*
|
|
21
23
|
* @example
|
|
22
24
|
* ```tsx
|
|
@@ -35,13 +37,22 @@ import { menuButtonClass } from "./menu-button-classes.js";
|
|
|
35
37
|
*
|
|
36
38
|
* // compact — e.g. in a card footer or a ListRow's trailing slot
|
|
37
39
|
* <MenuButton size="sm" label="More" onClick={openMenu} />
|
|
40
|
+
*
|
|
41
|
+
* // as a form field — a value picker inside a `Section`
|
|
42
|
+
* <MenuButton
|
|
43
|
+
* variant="field"
|
|
44
|
+
* label={agent?.displayName ?? "Auto-detect"}
|
|
45
|
+
* onClick={(e) => ctx.ui.showMenu({ anchor: e.currentTarget, items })}
|
|
46
|
+
* >
|
|
47
|
+
* <AgentIconGlyph icon={agent?.icon} mode="color" colorScheme={scheme} />
|
|
48
|
+
* </MenuButton>
|
|
38
49
|
* ```
|
|
39
50
|
*
|
|
40
51
|
* @category Consumer Services
|
|
41
52
|
* @public
|
|
42
53
|
*/
|
|
43
|
-
export function MenuButton({ label, size = "normal", className, type = "button", children, ...rest }) {
|
|
44
|
-
const classes = menuButtonClass(size);
|
|
54
|
+
export function MenuButton({ label, size = "normal", variant = "bare", className, type = "button", children, ...rest }) {
|
|
55
|
+
const classes = menuButtonClass(size, variant);
|
|
45
56
|
return (_jsxs("button", { type: type, className: className ? `${classes} ${className}` : classes, "aria-haspopup": "menu", ...rest, children: [children, _jsx("span", { className: "silo-menu-button-label", children: label }), _jsx("svg", { className: "silo-menu-button-chevron", viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "M4 6l4 4 4-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }));
|
|
46
57
|
}
|
|
47
58
|
//# sourceMappingURL=MenuButton.js.map
|
package/dist/MenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../src/MenuButton.tsx"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../src/MenuButton.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,eAAe,GAGhB,MAAM,uBAAuB,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,MAAM,EAChB,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,QAAQ,EACR,GAAG,IAAI,EAaoD;IAC3D,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,CACL,kBACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,mBAG5C,MAAM,KAChB,IAAI,aAEP,QAAQ,EACT,eAAM,SAAS,EAAC,wBAAwB,YAAE,KAAK,GAAQ,EACvD,cACE,SAAS,EAAC,0BAA0B,EACpC,OAAO,EAAC,WAAW,iBACP,MAAM,YAElB,eACE,CAAC,EAAC,cAAc,EAChB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,IACC,CACV,CAAC;AACJ,CAAC"}
|
package/dist/agents-service.d.ts
CHANGED
|
@@ -36,7 +36,15 @@ export interface AgentInfo {
|
|
|
36
36
|
readonly terminalId: string;
|
|
37
37
|
/** The workspace this terminal belongs to. */
|
|
38
38
|
readonly workspaceId: string;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* The terminal's kind at registration time.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated Always `"shell"` after RFC 0033 — the deprecated `"claude"` /
|
|
43
|
+
* `"pi"` kinds are normalized away at load and nothing creates them, so a
|
|
44
|
+
* consumer branching on this is reading a constant. Use
|
|
45
|
+
* {@link AgentInfo.agentId} for which agent is running, and
|
|
46
|
+
* {@link AgentInfo.isAgent} for whether one is.
|
|
47
|
+
*/
|
|
40
48
|
readonly kind: TerminalKind;
|
|
41
49
|
/**
|
|
42
50
|
* Whether this terminal currently hosts an agent — true if it was created
|
|
@@ -104,6 +112,54 @@ export interface AgentInfo {
|
|
|
104
112
|
*/
|
|
105
113
|
readonly agentId?: string;
|
|
106
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* A Catalog Agent's brand mark — SVG path data plus the two theme-dependent
|
|
117
|
+
* hexes. Consumed by {@link AgentIconGlyph}; a single hex cannot have enough
|
|
118
|
+
* contrast against both a light and a dark tab strip, so `"color"` mode picks
|
|
119
|
+
* `hexLight` / `hexDark` by the host's active base.
|
|
120
|
+
*
|
|
121
|
+
* @category Consumer Services
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
export interface AgentIcon {
|
|
125
|
+
/** Display name, for the glyph's accessible label. */
|
|
126
|
+
title: string;
|
|
127
|
+
/** The brand's color against a light background, no leading `#`. */
|
|
128
|
+
hexLight: string;
|
|
129
|
+
/** The brand's color against a dark background, no leading `#`. */
|
|
130
|
+
hexDark: string;
|
|
131
|
+
/** SVG path data, `viewBox="0 0 24 24"`. */
|
|
132
|
+
path: string;
|
|
133
|
+
/** Set when the source path assumes `fill-rule: evenodd`; omit for the SVG
|
|
134
|
+
* default (`nonzero`). */
|
|
135
|
+
fillRule?: "evenodd";
|
|
136
|
+
/** A second path (same viewBox) layered on {@link AgentIcon.path} at 40%
|
|
137
|
+
* opacity, for a genuinely duotone mark (OpenCode's frame + inner panel). */
|
|
138
|
+
accentPath?: string;
|
|
139
|
+
/** `fill-rule` for {@link AgentIcon.accentPath}, independent of `fillRule`. */
|
|
140
|
+
accentFillRule?: "evenodd";
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* How {@link AgentIconGlyph} renders: `"none"` draws nothing, `"color"` tints
|
|
144
|
+
* with the brand hex, `"monotone"` inherits `currentColor`.
|
|
145
|
+
*
|
|
146
|
+
* @category Consumer Services
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
export type AgentIconMode = "none" | "color" | "monotone";
|
|
150
|
+
/**
|
|
151
|
+
* One Catalog Agent as an extension may read it through
|
|
152
|
+
* {@link AgentsService.catalog}. Read-only — detection stays sealed (ADR 0028)
|
|
153
|
+
* and there is no way to register into the catalog.
|
|
154
|
+
*
|
|
155
|
+
* @category Consumer Services
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
export interface CatalogAgentSummary {
|
|
159
|
+
readonly id: string;
|
|
160
|
+
readonly displayName: string;
|
|
161
|
+
readonly icon?: AgentIcon;
|
|
162
|
+
}
|
|
107
163
|
/**
|
|
108
164
|
* Host-computed coding-agent observability — exposed as
|
|
109
165
|
* {@link ExtensionContext.agents}. Detection (what OSC/output signals mean
|
|
@@ -170,5 +226,18 @@ export interface AgentsService {
|
|
|
170
226
|
* ```
|
|
171
227
|
*/
|
|
172
228
|
acknowledge(terminalId: string): void;
|
|
229
|
+
/**
|
|
230
|
+
* Every coding agent Silo knows about, as read-only
|
|
231
|
+
* {@link CatalogAgentSummary} records. Detection stays sealed (ADR 0028) —
|
|
232
|
+
* there is no way to register into this list.
|
|
233
|
+
*
|
|
234
|
+
* The returned array is **memoized and deeply frozen**: it is read inside
|
|
235
|
+
* tab-icon rendering (`ctx.terminals.bindIcon`), so a fresh allocation per
|
|
236
|
+
* call would be a per-render cost and a mutable one a correctness hazard.
|
|
237
|
+
*
|
|
238
|
+
* @category Consumer Services
|
|
239
|
+
* @public
|
|
240
|
+
*/
|
|
241
|
+
catalog(): readonly CatalogAgentSummary[];
|
|
173
242
|
}
|
|
174
243
|
//# sourceMappingURL=agents-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-service.d.ts","sourceRoot":"","sources":["../src/agents-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B
|
|
1
|
+
{"version":3,"file":"agents-service.d.ts","sourceRoot":"","sources":["../src/agents-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAA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IACb;+BAC2B;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;kFAC8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,EAAE,CAAC;IAC7D,8EAA8E;IAC9E,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3D;;;;OAIG;IACH,SAAS,CACP,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,EACtC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,UAAU,CAAC;IACd;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC;;;;;;;;;;;OAWG;IACH,OAAO,IAAI,SAAS,mBAAmB,EAAE,CAAC;CAC3C"}
|
package/dist/domain-types.d.ts
CHANGED
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* The kind of a terminal session.
|
|
12
12
|
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The `"claude"` and `"pi"` values are **deprecated** (RFC 0033). Nothing in
|
|
15
|
+
* Silo creates a terminal with those kinds any more, and a persisted record
|
|
16
|
+
* carrying one is normalized to `"shell"` at load. Use an **Agent Profile** to
|
|
17
|
+
* start an agent in a terminal — it is the launch-time vocabulary for "which
|
|
18
|
+
* agent"; `TerminalKind` is neither the launch nor the identity vocabulary.
|
|
19
|
+
* `ctx.terminals.create({ kind: "claude" | "pi" })` still works (it creates a
|
|
20
|
+
* `"shell"` terminal and launches a matching profile if one exists), and the
|
|
21
|
+
* type keeps both values so third-party code compiles — removal is gated on a
|
|
22
|
+
* later engine bump.
|
|
23
|
+
*
|
|
13
24
|
* @category Core Types
|
|
14
25
|
* @public
|
|
15
26
|
*/
|
|
@@ -48,6 +59,20 @@ export interface TerminalRecord {
|
|
|
48
59
|
cwd?: string;
|
|
49
60
|
/** ISO timestamp of the last output we observed; used to pick a workspace's "primary" terminal. */
|
|
50
61
|
lastActiveAt?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The id of the Agent Profile this terminal was launched from (RFC 0033),
|
|
64
|
+
* when Silo launched it with one. A terminal created any other way — "New
|
|
65
|
+
* Terminal", the watermark, `core.newTerminal`, `ctx.terminals.create` — has
|
|
66
|
+
* no `profileId`; Silo never guesses one for a hand-typed agent.
|
|
67
|
+
*
|
|
68
|
+
* Written at launch and maintained by the host: renaming a profile's id
|
|
69
|
+
* rewrites this, deleting the profile clears it. It is written and kept
|
|
70
|
+
* current in phase 1 but not yet read — its first consumer is resume
|
|
71
|
+
* composition (RFC 0033 phase 4).
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
profileId?: string;
|
|
51
76
|
}
|
|
52
77
|
/**
|
|
53
78
|
* The two modes of the one editor surface: a read-write text editor, or a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-types.d.ts","sourceRoot":"","sources":["../src/domain-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH
|
|
1
|
+
{"version":3,"file":"domain-types.d.ts","sourceRoot":"","sources":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AE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAEhC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,mFAAmF;IACnF,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,OAAO,EAAE,CAAC,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -33,6 +33,24 @@ export interface ExtensionStorage {
|
|
|
33
33
|
*/
|
|
34
34
|
subscribe(listener: () => void): Disposable;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* One workspace's per-extension storage directory, as returned by
|
|
38
|
+
* {@link ExtensionStorageScopes.workspaceDirs}: the workspace's id paired with
|
|
39
|
+
* the absolute path to that workspace's directory for the calling extension.
|
|
40
|
+
*
|
|
41
|
+
* @category Core Types
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface WorkspaceStorageDir {
|
|
45
|
+
/** The workspace this directory belongs to. */
|
|
46
|
+
readonly workspaceId: string;
|
|
47
|
+
/**
|
|
48
|
+
* Absolute path to `~/.config/silo/extension-storage/<your-id>/workspaces/<workspaceId>`.
|
|
49
|
+
* Readable and writable through {@link ExtensionContext.files} with no
|
|
50
|
+
* `fs:*` permission, like every other own-storage path.
|
|
51
|
+
*/
|
|
52
|
+
readonly dir: string;
|
|
53
|
+
}
|
|
36
54
|
/**
|
|
37
55
|
* The persisted-storage scopes available to an extension, exposed as
|
|
38
56
|
* {@link ExtensionContext.storage}: two key/value bags for settings-sized
|
|
@@ -85,23 +103,53 @@ export interface ExtensionStorageScopes {
|
|
|
85
103
|
*/
|
|
86
104
|
globalDir(): Promise<string>;
|
|
87
105
|
/**
|
|
88
|
-
* An absolute path to a directory of your own scoped to
|
|
89
|
-
*
|
|
90
|
-
* {@link ExtensionStorageScopes.workspace}. Created on first call, at
|
|
106
|
+
* An absolute path to a directory of your own scoped to a **workspace** — the
|
|
107
|
+
* filesystem counterpart to {@link ExtensionStorageScopes.workspace}. Lives at
|
|
91
108
|
* `~/.config/silo/extension-storage/<your-id>/workspaces/<workspaceId>`.
|
|
92
109
|
*
|
|
93
110
|
* Everything {@link ExtensionStorageScopes.globalDir} says about permissions
|
|
94
|
-
* and relative paths applies here too.
|
|
95
|
-
*
|
|
96
|
-
* workspace
|
|
111
|
+
* and relative paths applies here too.
|
|
112
|
+
*
|
|
113
|
+
* @param workspaceId - Which workspace's directory to resolve. Omit for the
|
|
114
|
+
* **active** workspace — the path then changes as the active workspace
|
|
115
|
+
* switches, so don't cache it across a switch, and the call rejects with
|
|
116
|
+
* `NoWorkspaceError` when no workspace is open. Pass an id (from
|
|
117
|
+
* {@link ExtensionContext.workspaces}) to resolve **any** workspace's
|
|
118
|
+
* directory, active or not — the aggregating case (a view over every
|
|
119
|
+
* workspace's data).
|
|
120
|
+
* @param options - `create` (default `true`) creates the directory if it is
|
|
121
|
+
* missing, matching the historical behaviour — every caller that then
|
|
122
|
+
* **writes** into the path needs this, because {@link FileService.writeText}
|
|
123
|
+
* does not create parent directories. Pass `create: false` when you only
|
|
124
|
+
* need the path to **read** from (a missing file already reads as absent);
|
|
125
|
+
* nothing is written to disk for a workspace that has no data yet.
|
|
97
126
|
*
|
|
98
127
|
* The directory follows the workspace's **identity**, not its folder path:
|
|
99
128
|
* deleting a workspace and re-adding the same folder gives you a new, empty
|
|
100
129
|
* directory (the same rule {@link ExtensionStorageScopes.workspace} follows).
|
|
101
130
|
* Deleting a workspace leaves the directory on disk.
|
|
131
|
+
*/
|
|
132
|
+
workspaceDir(workspaceId?: string, options?: {
|
|
133
|
+
create?: boolean;
|
|
134
|
+
}): Promise<string>;
|
|
135
|
+
/**
|
|
136
|
+
* Resolve a storage directory for **every open workspace** in one call — the
|
|
137
|
+
* building block for a surface that aggregates per-workspace data (a
|
|
138
|
+
* cross-workspace list, say) without making a separate
|
|
139
|
+
* {@link ExtensionStorageScopes.workspaceDir} call per workspace.
|
|
140
|
+
*
|
|
141
|
+
* Returns one entry per workspace in
|
|
142
|
+
* {@link WorkspaceService.getState}`().open`, each `{ workspaceId, dir }`.
|
|
143
|
+
* There is no ordering guarantee — match entries to workspaces by
|
|
144
|
+
* `workspaceId`.
|
|
102
145
|
*
|
|
103
|
-
*
|
|
146
|
+
* @param options - `create` (default `true`) behaves exactly as it does on
|
|
147
|
+
* {@link ExtensionStorageScopes.workspaceDir}. The aggregating case passes
|
|
148
|
+
* `create: false`: it only reads each workspace's data, so no directory is
|
|
149
|
+
* created for a workspace that has none.
|
|
104
150
|
*/
|
|
105
|
-
|
|
151
|
+
workspaceDirs(options?: {
|
|
152
|
+
create?: boolean;
|
|
153
|
+
}): Promise<readonly WorkspaceStorageDir[]>;
|
|
106
154
|
}
|
|
107
155
|
//# sourceMappingURL=extension-storage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension-storage.d.ts","sourceRoot":"","sources":["../src/extension-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IACnC,GAAG,CAAC,CAAC,EAAE,GAAG,EA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,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,YAAY,CACV,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAC7B,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CAAC,OAAO,CAAC,EAAE;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB,GAAG,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC;CAC7C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export type { EditorService, EditorSaveHandlers, OpenFileOptions, EditorViewInfo
|
|
|
22
22
|
export type { LayoutService, LayoutState, SidePanelColumnState, SideLocation, SheetOptions, } from "./layout-service.js";
|
|
23
23
|
export type { ProcessService, ProcessSession, ProcessSpawnOptions, ProcessExecOptions, ProcessExecResult, } from "./process-service.js";
|
|
24
24
|
export type { ProcessesService, ProcessInfo, ProcessStats, ProcessTreeNode, } from "./processes-service.js";
|
|
25
|
-
export type { AgentsService, AgentInfo, AgentActivity } from "./agents-service.js";
|
|
25
|
+
export type { AgentsService, AgentInfo, AgentActivity, AgentIcon, AgentIconMode, CatalogAgentSummary, } from "./agents-service.js";
|
|
26
26
|
export type { TerminalService, CreateTerminalInput, TerminalKind, TerminalRecord, TerminalTabDecoration, TerminalTabDecorationProvider, OscEvent, } from "./terminal-service.js";
|
|
27
27
|
export type { TabAdornmentColor, TabIconAdornment, TabHighlightAdornment, TabIndicatorAdornment, TabIndicatorFlash, TabActivityAdornment, TabActivityFlash, TabIconContribution, TabHighlightContribution, TabIndicatorContribution, TabActivityContribution, TabIconBinder, TabHighlightBinder, TabIndicatorBinder, TabActivityBinder, TabAdornmentMethods, } from "./tab-adornment.js";
|
|
28
28
|
export type { Activity, ActivitySize } from "./activity.js";
|
|
@@ -35,7 +35,7 @@ export type { SearchService, SearchOptions, SearchMatch, SearchFileResult, Searc
|
|
|
35
35
|
export type { Permission } from "./permissions.js";
|
|
36
36
|
export { PathDeniedError, NoWorkspaceError } from "./permissions.js";
|
|
37
37
|
export type { ThemeService, ThemeState, ThemePreset, ResolvedTheme, ThemeBase, ThemeVars, CustomTheme, ThemeExport, } from "./theme-service.js";
|
|
38
|
-
export type { ExtensionStorage, ExtensionStorageScopes, } from "./extension-storage.js";
|
|
38
|
+
export type { ExtensionStorage, ExtensionStorageScopes, WorkspaceStorageDir, } from "./extension-storage.js";
|
|
39
39
|
export type { DndService, DndItem, DndMime, DragInit, DndMode, DropContext, DropTargetHandlers, } from "./dnd-service.js";
|
|
40
40
|
export { DND_MIME } from "./dnd-service.js";
|
|
41
41
|
export type { UiService, FileFilter, MenuItem, MenuItemTrailing, MenuSeparator, MenuHeader, MenuEntry, ShowMenuOptions, ConfirmOptions, PromptOptions, ModalOptions, ConfirmDontShowAgainMode, ConfirmDontShowAgainOptions, NotifyAction, NotifyOptions, BusyStatusUrgency, BusyStatusEntry, BusyStatusApi, } from "./ui-service.js";
|
|
@@ -53,7 +53,7 @@ export type { ButtonVariant, ButtonSize } from "./Button.js";
|
|
|
53
53
|
export { IconButton } from "./IconButton.js";
|
|
54
54
|
export type { IconButtonSize, IconButtonVariant } from "./IconButton.js";
|
|
55
55
|
export { MenuButton } from "./MenuButton.js";
|
|
56
|
-
export type { MenuButtonSize } from "./MenuButton.js";
|
|
56
|
+
export type { MenuButtonSize, MenuButtonVariant } from "./MenuButton.js";
|
|
57
57
|
export { Input } from "./Input.js";
|
|
58
58
|
export { Textarea } from "./Textarea.js";
|
|
59
59
|
export { SearchInput } from "./SearchInput.js";
|
|
@@ -73,6 +73,7 @@ export type { ListRowProps, ListRowTruncate } from "./List.js";
|
|
|
73
73
|
export { AddRow } from "./AddRow.js";
|
|
74
74
|
export { Badge } from "./Badge.js";
|
|
75
75
|
export type { BadgeSize, BadgeTone } from "./Badge.js";
|
|
76
|
+
export { AgentIconGlyph } from "./AgentIconGlyph.js";
|
|
76
77
|
export { EmptyState } from "./EmptyState.js";
|
|
77
78
|
export type { EmptyStateTone } from "./EmptyState.js";
|
|
78
79
|
export { Callout } from "./Callout.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,QAAQ,EACR,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAKjB,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,YAAY,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,QAAQ,EACR,OAAO,EACP,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAKjB,YAAY,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,kBAAkB,E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} from "./AddRow.js";
|
|
50
50
|
export { Badge } from "./Badge.js";
|
|
51
|
+
export { AgentIconGlyph } from "./AgentIconGlyph.js";
|
|
51
52
|
export { EmptyState } from "./EmptyState.js";
|
|
52
53
|
export { Callout } from "./Callout.js";
|
|
53
54
|
export { Section } from "./Section.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA6HH,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiChD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA8BlE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAyBzC,sEAAsE;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAkCjD,8EAA8E;AAC9E,8EAA8E;AAC9E,6DAA6D;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,yEAAyE;AACzE,iFAAiF;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,4EAA4E;AAC5E,qDAAqD;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,E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|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
9
|
+
* {@link MenuButton} chrome:
|
|
10
|
+
* - `"bare"` (default) — a borderless label + chevron, for toolbars and list
|
|
11
|
+
* rows where the trigger sits among other inline controls.
|
|
12
|
+
* - `"field"` — input chrome (border, input background, full width, chevron
|
|
13
|
+
* pushed to the trailing edge) so it lines up with `Input` / `Select` as a
|
|
14
|
+
* form field. Reach for it when the menu is a value picker in a form.
|
|
11
15
|
*
|
|
12
16
|
* @internal
|
|
13
17
|
*/
|
|
14
|
-
export
|
|
18
|
+
export type MenuButtonVariant = "bare" | "field";
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the host `.silo-menu-button*` class string for a MenuButton's `size`
|
|
21
|
+
* and `variant`. `sm` and `field` each compose onto the base class, matching
|
|
22
|
+
* how `.silo-button-sm` / `.silo-button-primary` work.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function menuButtonClass(size?: MenuButtonSize, variant?: MenuButtonVariant): string;
|
|
15
27
|
//# sourceMappingURL=menu-button-classes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button-classes.d.ts","sourceRoot":"","sources":["../src/menu-button-classes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,IAAI,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"menu-button-classes.d.ts","sourceRoot":"","sources":["../src/menu-button-classes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,IAAI,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,GAAE,cAAyB,EAC/B,OAAO,GAAE,iBAA0B,GAClC,MAAM,CAKR"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Resolve the host `.silo-menu-button*` class string for a MenuButton's `size
|
|
3
|
-
* `sm`
|
|
2
|
+
* Resolve the host `.silo-menu-button*` class string for a MenuButton's `size`
|
|
3
|
+
* and `variant`. `sm` and `field` each compose onto the base class, matching
|
|
4
|
+
* how `.silo-button-sm` / `.silo-button-primary` work.
|
|
4
5
|
*
|
|
5
6
|
* @internal
|
|
6
7
|
*/
|
|
7
|
-
export function menuButtonClass(size = "normal") {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export function menuButtonClass(size = "normal", variant = "bare") {
|
|
9
|
+
const classes = ["silo-menu-button"];
|
|
10
|
+
if (size === "sm")
|
|
11
|
+
classes.push("silo-menu-button-sm");
|
|
12
|
+
if (variant === "field")
|
|
13
|
+
classes.push("silo-menu-button-field");
|
|
14
|
+
return classes.join(" ");
|
|
11
15
|
}
|
|
12
16
|
//# sourceMappingURL=menu-button-classes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-button-classes.js","sourceRoot":"","sources":["../src/menu-button-classes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu-button-classes.js","sourceRoot":"","sources":["../src/menu-button-classes.ts"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAuB,QAAQ,EAC/B,UAA6B,MAAM;IAEnC,MAAM,OAAO,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACrC,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACvD,IAAI,OAAO,KAAK,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAChE,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -54,7 +54,14 @@ export interface TerminalTabDecorationProvider {
|
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
56
|
export interface CreateTerminalInput {
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Terminal kind. Defaults to `"shell"`.
|
|
59
|
+
*
|
|
60
|
+
* @deprecated Pass `"shell"` (or omit). The `"claude"` / `"pi"` values are
|
|
61
|
+
* kept for compatibility (RFC 0033): they create a `"shell"` terminal and, if
|
|
62
|
+
* a matching Agent Profile exists, launch it — otherwise the bare command is
|
|
63
|
+
* typed. Start agents via an Agent Profile instead.
|
|
64
|
+
*/
|
|
58
65
|
kind?: TerminalKind;
|
|
59
66
|
/** Working directory; falls back to the workspace folder when absent. */
|
|
60
67
|
cwd?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal-service.d.ts","sourceRoot":"","sources":["../src/terminal-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAAC;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AE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,UAAU,CAAC;CAC5E"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { AgentIcon, AgentIconMode } from "./agents-service";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Renders a Catalog Agent's brand mark from its {@link AgentIcon} data (get one
|
|
5
|
+
* from {@link AgentsService.catalog}). Data-driven on purpose — it takes the
|
|
6
|
+
* icon, not an agent id, so it has no dependency on the sealed catalog and one
|
|
7
|
+
* renderer serves the host `+` menu, `silo.agents`, and third-party extensions.
|
|
8
|
+
*
|
|
9
|
+
* Returns `null` when `mode` is `"none"` or `icon` is absent — callers that
|
|
10
|
+
* gate tab chrome on "is there an icon" should check the return value, not
|
|
11
|
+
* construct the element unconditionally.
|
|
12
|
+
*
|
|
13
|
+
* `"color"` tints the glyph with the brand's own hex (picking
|
|
14
|
+
* {@link AgentIcon.hexLight} / {@link AgentIcon.hexDark} by `colorScheme`, since
|
|
15
|
+
* one hex can't contrast against both a light and a dark tab strip);
|
|
16
|
+
* `"monotone"` leaves `color` unset so it inherits `currentColor` from an
|
|
17
|
+
* ancestor. A duotone source (OpenCode's frame + panel) layers a second
|
|
18
|
+
* 40%-opacity path rather than flattening to one fill.
|
|
19
|
+
*
|
|
20
|
+
* @category Consumer Services
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export function AgentIconGlyph({
|
|
24
|
+
icon,
|
|
25
|
+
mode,
|
|
26
|
+
colorScheme,
|
|
27
|
+
className,
|
|
28
|
+
}: {
|
|
29
|
+
icon: AgentIcon | undefined;
|
|
30
|
+
mode: AgentIconMode;
|
|
31
|
+
/** The host's active light/dark base — selects `hexLight` / `hexDark` in
|
|
32
|
+
* `"color"` mode. */
|
|
33
|
+
colorScheme: "dark" | "light";
|
|
34
|
+
className?: string;
|
|
35
|
+
}) {
|
|
36
|
+
if (mode === "none" || !icon) return null;
|
|
37
|
+
const hex = colorScheme === "light" ? icon.hexLight : icon.hexDark;
|
|
38
|
+
return (
|
|
39
|
+
<svg
|
|
40
|
+
viewBox="0 0 24 24"
|
|
41
|
+
className={className}
|
|
42
|
+
style={mode === "color" ? { color: `#${hex}` } : undefined}
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
>
|
|
45
|
+
<path d={icon.path} fill="currentColor" fillRule={icon.fillRule} />
|
|
46
|
+
{icon.accentPath && (
|
|
47
|
+
<path
|
|
48
|
+
d={icon.accentPath}
|
|
49
|
+
fill="currentColor"
|
|
50
|
+
fillRule={icon.accentFillRule}
|
|
51
|
+
opacity={0.4}
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
</svg>
|
|
55
|
+
);
|
|
56
|
+
}
|
package/src/MenuButton.tsx
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
menuButtonClass,
|
|
4
|
+
type MenuButtonSize,
|
|
5
|
+
type MenuButtonVariant,
|
|
6
|
+
} from "./menu-button-classes";
|
|
3
7
|
|
|
4
|
-
export type { MenuButtonSize };
|
|
8
|
+
export type { MenuButtonSize, MenuButtonVariant };
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* A **labelled** button that opens a menu — the counterpart to
|
|
@@ -19,7 +23,9 @@ export type { MenuButtonSize };
|
|
|
19
23
|
* lines up under the button.
|
|
20
24
|
*
|
|
21
25
|
* Styled purely via host-provided `.silo-menu-button*` classes — no stylesheet
|
|
22
|
-
* import is needed in the extension.
|
|
26
|
+
* import is needed in the extension. `variant="field"` gives it `Input` /
|
|
27
|
+
* `Select` chrome (border, full width, trailing chevron) for use as a value
|
|
28
|
+
* picker in a form, where a rich menu (icons, checks) beats a native `<select>`.
|
|
23
29
|
*
|
|
24
30
|
* @example
|
|
25
31
|
* ```tsx
|
|
@@ -38,6 +44,15 @@ export type { MenuButtonSize };
|
|
|
38
44
|
*
|
|
39
45
|
* // compact — e.g. in a card footer or a ListRow's trailing slot
|
|
40
46
|
* <MenuButton size="sm" label="More" onClick={openMenu} />
|
|
47
|
+
*
|
|
48
|
+
* // as a form field — a value picker inside a `Section`
|
|
49
|
+
* <MenuButton
|
|
50
|
+
* variant="field"
|
|
51
|
+
* label={agent?.displayName ?? "Auto-detect"}
|
|
52
|
+
* onClick={(e) => ctx.ui.showMenu({ anchor: e.currentTarget, items })}
|
|
53
|
+
* >
|
|
54
|
+
* <AgentIconGlyph icon={agent?.icon} mode="color" colorScheme={scheme} />
|
|
55
|
+
* </MenuButton>
|
|
41
56
|
* ```
|
|
42
57
|
*
|
|
43
58
|
* @category Consumer Services
|
|
@@ -46,6 +61,7 @@ export type { MenuButtonSize };
|
|
|
46
61
|
export function MenuButton({
|
|
47
62
|
label,
|
|
48
63
|
size = "normal",
|
|
64
|
+
variant = "bare",
|
|
49
65
|
className,
|
|
50
66
|
type = "button",
|
|
51
67
|
children,
|
|
@@ -55,10 +71,15 @@ export function MenuButton({
|
|
|
55
71
|
label: ReactNode;
|
|
56
72
|
/** `sm` for compact contexts (card footers, list rows). */
|
|
57
73
|
size?: MenuButtonSize;
|
|
74
|
+
/**
|
|
75
|
+
* `"bare"` (default) is a borderless label + chevron for toolbars and rows;
|
|
76
|
+
* `"field"` wears `Input` / `Select` chrome so it lines up as a form field.
|
|
77
|
+
*/
|
|
78
|
+
variant?: MenuButtonVariant;
|
|
58
79
|
/** Optional leading content, e.g. an icon before the label. */
|
|
59
80
|
children?: ReactNode;
|
|
60
81
|
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">) {
|
|
61
|
-
const classes = menuButtonClass(size);
|
|
82
|
+
const classes = menuButtonClass(size, variant);
|
|
62
83
|
return (
|
|
63
84
|
<button
|
|
64
85
|
type={type}
|
package/src/agents-service.ts
CHANGED
|
@@ -44,7 +44,15 @@ export interface AgentInfo {
|
|
|
44
44
|
readonly terminalId: string;
|
|
45
45
|
/** The workspace this terminal belongs to. */
|
|
46
46
|
readonly workspaceId: string;
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The terminal's kind at registration time.
|
|
49
|
+
*
|
|
50
|
+
* @deprecated Always `"shell"` after RFC 0033 — the deprecated `"claude"` /
|
|
51
|
+
* `"pi"` kinds are normalized away at load and nothing creates them, so a
|
|
52
|
+
* consumer branching on this is reading a constant. Use
|
|
53
|
+
* {@link AgentInfo.agentId} for which agent is running, and
|
|
54
|
+
* {@link AgentInfo.isAgent} for whether one is.
|
|
55
|
+
*/
|
|
48
56
|
readonly kind: TerminalKind;
|
|
49
57
|
/**
|
|
50
58
|
* Whether this terminal currently hosts an agent — true if it was created
|
|
@@ -113,6 +121,57 @@ export interface AgentInfo {
|
|
|
113
121
|
readonly agentId?: string;
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
/**
|
|
125
|
+
* A Catalog Agent's brand mark — SVG path data plus the two theme-dependent
|
|
126
|
+
* hexes. Consumed by {@link AgentIconGlyph}; a single hex cannot have enough
|
|
127
|
+
* contrast against both a light and a dark tab strip, so `"color"` mode picks
|
|
128
|
+
* `hexLight` / `hexDark` by the host's active base.
|
|
129
|
+
*
|
|
130
|
+
* @category Consumer Services
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
export interface AgentIcon {
|
|
134
|
+
/** Display name, for the glyph's accessible label. */
|
|
135
|
+
title: string;
|
|
136
|
+
/** The brand's color against a light background, no leading `#`. */
|
|
137
|
+
hexLight: string;
|
|
138
|
+
/** The brand's color against a dark background, no leading `#`. */
|
|
139
|
+
hexDark: string;
|
|
140
|
+
/** SVG path data, `viewBox="0 0 24 24"`. */
|
|
141
|
+
path: string;
|
|
142
|
+
/** Set when the source path assumes `fill-rule: evenodd`; omit for the SVG
|
|
143
|
+
* default (`nonzero`). */
|
|
144
|
+
fillRule?: "evenodd";
|
|
145
|
+
/** A second path (same viewBox) layered on {@link AgentIcon.path} at 40%
|
|
146
|
+
* opacity, for a genuinely duotone mark (OpenCode's frame + inner panel). */
|
|
147
|
+
accentPath?: string;
|
|
148
|
+
/** `fill-rule` for {@link AgentIcon.accentPath}, independent of `fillRule`. */
|
|
149
|
+
accentFillRule?: "evenodd";
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* How {@link AgentIconGlyph} renders: `"none"` draws nothing, `"color"` tints
|
|
154
|
+
* with the brand hex, `"monotone"` inherits `currentColor`.
|
|
155
|
+
*
|
|
156
|
+
* @category Consumer Services
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
export type AgentIconMode = "none" | "color" | "monotone";
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* One Catalog Agent as an extension may read it through
|
|
163
|
+
* {@link AgentsService.catalog}. Read-only — detection stays sealed (ADR 0028)
|
|
164
|
+
* and there is no way to register into the catalog.
|
|
165
|
+
*
|
|
166
|
+
* @category Consumer Services
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export interface CatalogAgentSummary {
|
|
170
|
+
readonly id: string;
|
|
171
|
+
readonly displayName: string;
|
|
172
|
+
readonly icon?: AgentIcon;
|
|
173
|
+
}
|
|
174
|
+
|
|
116
175
|
/**
|
|
117
176
|
* Host-computed coding-agent observability — exposed as
|
|
118
177
|
* {@link ExtensionContext.agents}. Detection (what OSC/output signals mean
|
|
@@ -178,4 +237,17 @@ export interface AgentsService {
|
|
|
178
237
|
* ```
|
|
179
238
|
*/
|
|
180
239
|
acknowledge(terminalId: string): void;
|
|
240
|
+
/**
|
|
241
|
+
* Every coding agent Silo knows about, as read-only
|
|
242
|
+
* {@link CatalogAgentSummary} records. Detection stays sealed (ADR 0028) —
|
|
243
|
+
* there is no way to register into this list.
|
|
244
|
+
*
|
|
245
|
+
* The returned array is **memoized and deeply frozen**: it is read inside
|
|
246
|
+
* tab-icon rendering (`ctx.terminals.bindIcon`), so a fresh allocation per
|
|
247
|
+
* call would be a per-render cost and a mutable one a correctness hazard.
|
|
248
|
+
*
|
|
249
|
+
* @category Consumer Services
|
|
250
|
+
* @public
|
|
251
|
+
*/
|
|
252
|
+
catalog(): readonly CatalogAgentSummary[];
|
|
181
253
|
}
|
package/src/domain-types.ts
CHANGED
|
@@ -11,6 +11,17 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* The kind of a terminal session.
|
|
13
13
|
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The `"claude"` and `"pi"` values are **deprecated** (RFC 0033). Nothing in
|
|
16
|
+
* Silo creates a terminal with those kinds any more, and a persisted record
|
|
17
|
+
* carrying one is normalized to `"shell"` at load. Use an **Agent Profile** to
|
|
18
|
+
* start an agent in a terminal — it is the launch-time vocabulary for "which
|
|
19
|
+
* agent"; `TerminalKind` is neither the launch nor the identity vocabulary.
|
|
20
|
+
* `ctx.terminals.create({ kind: "claude" | "pi" })` still works (it creates a
|
|
21
|
+
* `"shell"` terminal and launches a matching profile if one exists), and the
|
|
22
|
+
* type keeps both values so third-party code compiles — removal is gated on a
|
|
23
|
+
* later engine bump.
|
|
24
|
+
*
|
|
14
25
|
* @category Core Types
|
|
15
26
|
* @public
|
|
16
27
|
*/
|
|
@@ -50,6 +61,20 @@ export interface TerminalRecord {
|
|
|
50
61
|
cwd?: string;
|
|
51
62
|
/** ISO timestamp of the last output we observed; used to pick a workspace's "primary" terminal. */
|
|
52
63
|
lastActiveAt?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The id of the Agent Profile this terminal was launched from (RFC 0033),
|
|
66
|
+
* when Silo launched it with one. A terminal created any other way — "New
|
|
67
|
+
* Terminal", the watermark, `core.newTerminal`, `ctx.terminals.create` — has
|
|
68
|
+
* no `profileId`; Silo never guesses one for a hand-typed agent.
|
|
69
|
+
*
|
|
70
|
+
* Written at launch and maintained by the host: renaming a profile's id
|
|
71
|
+
* rewrites this, deleting the profile clears it. It is written and kept
|
|
72
|
+
* current in phase 1 but not yet read — its first consumer is resume
|
|
73
|
+
* composition (RFC 0033 phase 4).
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
profileId?: string;
|
|
53
78
|
}
|
|
54
79
|
|
|
55
80
|
/**
|
package/src/extension-storage.ts
CHANGED
|
@@ -35,6 +35,25 @@ export interface ExtensionStorage {
|
|
|
35
35
|
subscribe(listener: () => void): Disposable;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* One workspace's per-extension storage directory, as returned by
|
|
40
|
+
* {@link ExtensionStorageScopes.workspaceDirs}: the workspace's id paired with
|
|
41
|
+
* the absolute path to that workspace's directory for the calling extension.
|
|
42
|
+
*
|
|
43
|
+
* @category Core Types
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export interface WorkspaceStorageDir {
|
|
47
|
+
/** The workspace this directory belongs to. */
|
|
48
|
+
readonly workspaceId: string;
|
|
49
|
+
/**
|
|
50
|
+
* Absolute path to `~/.config/silo/extension-storage/<your-id>/workspaces/<workspaceId>`.
|
|
51
|
+
* Readable and writable through {@link ExtensionContext.files} with no
|
|
52
|
+
* `fs:*` permission, like every other own-storage path.
|
|
53
|
+
*/
|
|
54
|
+
readonly dir: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
38
57
|
/**
|
|
39
58
|
* The persisted-storage scopes available to an extension, exposed as
|
|
40
59
|
* {@link ExtensionContext.storage}: two key/value bags for settings-sized
|
|
@@ -87,22 +106,53 @@ export interface ExtensionStorageScopes {
|
|
|
87
106
|
*/
|
|
88
107
|
globalDir(): Promise<string>;
|
|
89
108
|
/**
|
|
90
|
-
* An absolute path to a directory of your own scoped to
|
|
91
|
-
*
|
|
92
|
-
* {@link ExtensionStorageScopes.workspace}. Created on first call, at
|
|
109
|
+
* An absolute path to a directory of your own scoped to a **workspace** — the
|
|
110
|
+
* filesystem counterpart to {@link ExtensionStorageScopes.workspace}. Lives at
|
|
93
111
|
* `~/.config/silo/extension-storage/<your-id>/workspaces/<workspaceId>`.
|
|
94
112
|
*
|
|
95
113
|
* Everything {@link ExtensionStorageScopes.globalDir} says about permissions
|
|
96
|
-
* and relative paths applies here too.
|
|
97
|
-
*
|
|
98
|
-
* workspace
|
|
114
|
+
* and relative paths applies here too.
|
|
115
|
+
*
|
|
116
|
+
* @param workspaceId - Which workspace's directory to resolve. Omit for the
|
|
117
|
+
* **active** workspace — the path then changes as the active workspace
|
|
118
|
+
* switches, so don't cache it across a switch, and the call rejects with
|
|
119
|
+
* `NoWorkspaceError` when no workspace is open. Pass an id (from
|
|
120
|
+
* {@link ExtensionContext.workspaces}) to resolve **any** workspace's
|
|
121
|
+
* directory, active or not — the aggregating case (a view over every
|
|
122
|
+
* workspace's data).
|
|
123
|
+
* @param options - `create` (default `true`) creates the directory if it is
|
|
124
|
+
* missing, matching the historical behaviour — every caller that then
|
|
125
|
+
* **writes** into the path needs this, because {@link FileService.writeText}
|
|
126
|
+
* does not create parent directories. Pass `create: false` when you only
|
|
127
|
+
* need the path to **read** from (a missing file already reads as absent);
|
|
128
|
+
* nothing is written to disk for a workspace that has no data yet.
|
|
99
129
|
*
|
|
100
130
|
* The directory follows the workspace's **identity**, not its folder path:
|
|
101
131
|
* deleting a workspace and re-adding the same folder gives you a new, empty
|
|
102
132
|
* directory (the same rule {@link ExtensionStorageScopes.workspace} follows).
|
|
103
133
|
* Deleting a workspace leaves the directory on disk.
|
|
134
|
+
*/
|
|
135
|
+
workspaceDir(
|
|
136
|
+
workspaceId?: string,
|
|
137
|
+
options?: { create?: boolean },
|
|
138
|
+
): Promise<string>;
|
|
139
|
+
/**
|
|
140
|
+
* Resolve a storage directory for **every open workspace** in one call — the
|
|
141
|
+
* building block for a surface that aggregates per-workspace data (a
|
|
142
|
+
* cross-workspace list, say) without making a separate
|
|
143
|
+
* {@link ExtensionStorageScopes.workspaceDir} call per workspace.
|
|
144
|
+
*
|
|
145
|
+
* Returns one entry per workspace in
|
|
146
|
+
* {@link WorkspaceService.getState}`().open`, each `{ workspaceId, dir }`.
|
|
147
|
+
* There is no ordering guarantee — match entries to workspaces by
|
|
148
|
+
* `workspaceId`.
|
|
104
149
|
*
|
|
105
|
-
*
|
|
150
|
+
* @param options - `create` (default `true`) behaves exactly as it does on
|
|
151
|
+
* {@link ExtensionStorageScopes.workspaceDir}. The aggregating case passes
|
|
152
|
+
* `create: false`: it only reads each workspace's data, so no directory is
|
|
153
|
+
* created for a workspace that has none.
|
|
106
154
|
*/
|
|
107
|
-
|
|
155
|
+
workspaceDirs(options?: {
|
|
156
|
+
create?: boolean;
|
|
157
|
+
}): Promise<readonly WorkspaceStorageDir[]>;
|
|
108
158
|
}
|
package/src/index.ts
CHANGED
|
@@ -103,7 +103,14 @@ export type {
|
|
|
103
103
|
ProcessStats,
|
|
104
104
|
ProcessTreeNode,
|
|
105
105
|
} from "./processes-service";
|
|
106
|
-
export type {
|
|
106
|
+
export type {
|
|
107
|
+
AgentsService,
|
|
108
|
+
AgentInfo,
|
|
109
|
+
AgentActivity,
|
|
110
|
+
AgentIcon,
|
|
111
|
+
AgentIconMode,
|
|
112
|
+
CatalogAgentSummary,
|
|
113
|
+
} from "./agents-service";
|
|
107
114
|
export type {
|
|
108
115
|
TerminalService,
|
|
109
116
|
CreateTerminalInput,
|
|
@@ -183,6 +190,7 @@ export type {
|
|
|
183
190
|
export type {
|
|
184
191
|
ExtensionStorage,
|
|
185
192
|
ExtensionStorageScopes,
|
|
193
|
+
WorkspaceStorageDir,
|
|
186
194
|
} from "./extension-storage";
|
|
187
195
|
// The drag-and-drop domain: the consumer service + its payload/handler shapes.
|
|
188
196
|
// DND_MIME is a value (the well-known MIME vocabulary), so it's a runtime export.
|
|
@@ -271,7 +279,7 @@ export type { ButtonVariant, ButtonSize } from "./Button";
|
|
|
271
279
|
export { IconButton } from "./IconButton";
|
|
272
280
|
export type { IconButtonSize, IconButtonVariant } from "./IconButton";
|
|
273
281
|
export { MenuButton } from "./MenuButton";
|
|
274
|
-
export type { MenuButtonSize } from "./MenuButton";
|
|
282
|
+
export type { MenuButtonSize, MenuButtonVariant } from "./MenuButton";
|
|
275
283
|
export { Input } from "./Input";
|
|
276
284
|
export { Textarea } from "./Textarea";
|
|
277
285
|
export { SearchInput } from "./SearchInput";
|
|
@@ -293,6 +301,7 @@ export type { ListRowProps, ListRowTruncate } from "./List";
|
|
|
293
301
|
export { AddRow } from "./AddRow";
|
|
294
302
|
export { Badge } from "./Badge";
|
|
295
303
|
export type { BadgeSize, BadgeTone } from "./Badge";
|
|
304
|
+
export { AgentIconGlyph } from "./AgentIconGlyph";
|
|
296
305
|
export { EmptyState } from "./EmptyState";
|
|
297
306
|
export type { EmptyStateTone } from "./EmptyState";
|
|
298
307
|
export { Callout } from "./Callout";
|
|
@@ -7,9 +7,22 @@ describe("menuButtonClass", () => {
|
|
|
7
7
|
it("defaults to the base class", () => {
|
|
8
8
|
expect(menuButtonClass()).toBe("silo-menu-button");
|
|
9
9
|
expect(menuButtonClass("normal")).toBe("silo-menu-button");
|
|
10
|
+
expect(menuButtonClass("normal", "bare")).toBe("silo-menu-button");
|
|
10
11
|
});
|
|
11
12
|
|
|
12
13
|
it("composes the compact modifier onto the base, like .silo-button-sm", () => {
|
|
13
14
|
expect(menuButtonClass("sm")).toBe("silo-menu-button silo-menu-button-sm");
|
|
14
15
|
});
|
|
16
|
+
|
|
17
|
+
it("composes the field variant onto the base", () => {
|
|
18
|
+
expect(menuButtonClass("normal", "field")).toBe(
|
|
19
|
+
"silo-menu-button silo-menu-button-field",
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it("composes size and variant together", () => {
|
|
24
|
+
expect(menuButtonClass("sm", "field")).toBe(
|
|
25
|
+
"silo-menu-button silo-menu-button-sm silo-menu-button-field",
|
|
26
|
+
);
|
|
27
|
+
});
|
|
15
28
|
});
|
|
@@ -7,13 +7,30 @@
|
|
|
7
7
|
export type MenuButtonSize = "normal" | "sm";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* `
|
|
10
|
+
* {@link MenuButton} chrome:
|
|
11
|
+
* - `"bare"` (default) — a borderless label + chevron, for toolbars and list
|
|
12
|
+
* rows where the trigger sits among other inline controls.
|
|
13
|
+
* - `"field"` — input chrome (border, input background, full width, chevron
|
|
14
|
+
* pushed to the trailing edge) so it lines up with `Input` / `Select` as a
|
|
15
|
+
* form field. Reach for it when the menu is a value picker in a form.
|
|
12
16
|
*
|
|
13
17
|
* @internal
|
|
14
18
|
*/
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
export type MenuButtonVariant = "bare" | "field";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the host `.silo-menu-button*` class string for a MenuButton's `size`
|
|
23
|
+
* and `variant`. `sm` and `field` each compose onto the base class, matching
|
|
24
|
+
* how `.silo-button-sm` / `.silo-button-primary` work.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export function menuButtonClass(
|
|
29
|
+
size: MenuButtonSize = "normal",
|
|
30
|
+
variant: MenuButtonVariant = "bare",
|
|
31
|
+
): string {
|
|
32
|
+
const classes = ["silo-menu-button"];
|
|
33
|
+
if (size === "sm") classes.push("silo-menu-button-sm");
|
|
34
|
+
if (variant === "field") classes.push("silo-menu-button-field");
|
|
35
|
+
return classes.join(" ");
|
|
19
36
|
}
|
package/src/terminal-service.ts
CHANGED
|
@@ -63,7 +63,14 @@ export interface TerminalTabDecorationProvider {
|
|
|
63
63
|
* @public
|
|
64
64
|
*/
|
|
65
65
|
export interface CreateTerminalInput {
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Terminal kind. Defaults to `"shell"`.
|
|
68
|
+
*
|
|
69
|
+
* @deprecated Pass `"shell"` (or omit). The `"claude"` / `"pi"` values are
|
|
70
|
+
* kept for compatibility (RFC 0033): they create a `"shell"` terminal and, if
|
|
71
|
+
* a matching Agent Profile exists, launch it — otherwise the bare command is
|
|
72
|
+
* typed. Start agents via an Agent Profile instead.
|
|
73
|
+
*/
|
|
67
74
|
kind?: TerminalKind;
|
|
68
75
|
/** Working directory; falls back to the workspace folder when absent. */
|
|
69
76
|
cwd?: string;
|