@xenosystem/agent-interface-panel 0.1.26

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/LICENSE ADDED
@@ -0,0 +1,67 @@
1
+ XENO Agent — Proprietary Software License
2
+ Copyright © 2026 XENO Corporation. All rights reserved.
3
+
4
+ This software, including its source code, compiled binaries, published packages,
5
+ assets, and accompanying documentation (collectively, the "Software"), is the
6
+ proprietary and confidential property of XENO Corporation ("XENO"). The Software
7
+ is licensed for use, not sold, and no title to or ownership of the Software is
8
+ transferred to any user.
9
+
10
+ 1. GRANT OF USE
11
+ Subject to a separate written agreement and/or the terms of service published
12
+ at https://xenostudio.ai, XENO grants the end user a limited, non-exclusive,
13
+ non-transferable, revocable license to install and use the Software for its
14
+ intended purpose. The standalone desktop application ("the Agent") may be used
15
+ locally at no charge; connected platform features — hosted agent runs, model
16
+ inference, credits, and account services — are governed by the applicable
17
+ subscription and the XENO terms of service.
18
+
19
+ 2. PACKAGE DISTRIBUTION
20
+ The `@xeno-corporation/xeno-agent-interface-*` and
21
+ `@xeno-corporation/xeno-agents-client` packages are published to a PRIVATE
22
+ registry and are licensed for use solely by XENO products and by parties
23
+ holding a separate written agreement with XENO. Access credentials to that
24
+ registry do not grant redistribution rights. Publication of any package in
25
+ this repository to a public registry is prohibited without written
26
+ authorization from XENO.
27
+
28
+ 3. RESTRICTIONS
29
+ Except to the extent expressly permitted by applicable law or by a separate
30
+ written agreement with XENO, you may NOT: (a) copy, redistribute, sell, rent,
31
+ lease, sublicense, or otherwise transfer the Software; (b) modify, adapt,
32
+ translate, or create derivative works of the Software; (c) reverse-engineer,
33
+ decompile, or disassemble the Software, or attempt to derive its source code;
34
+ (d) remove, obscure, or alter any proprietary notices; or (e) use the Software
35
+ to build a competing product.
36
+
37
+ 4. RESERVATION OF RIGHTS
38
+ All rights not expressly granted are reserved by XENO Corporation. The Software
39
+ is protected by copyright and other intellectual-property laws and treaties.
40
+
41
+ 5. DISCLAIMER OF WARRANTY
42
+ THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY
43
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE
45
+ SOFTWARE EXECUTES AGENT-DIRECTED OPERATIONS AGAINST A USER-SELECTED WORKSPACE,
46
+ INCLUDING FILE AND PROCESS ACTIONS; THE USER IS RESPONSIBLE FOR THE WORKSPACES
47
+ AND PERMISSIONS THEY GRANT IT.
48
+
49
+ 6. LIMITATION OF LIABILITY
50
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL XENO CORPORATION BE
51
+ LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE
52
+ DAMAGES, OR ANY LOSS OF PROFITS OR DATA, ARISING FROM OR RELATED TO THE USE OF
53
+ OR INABILITY TO USE THE SOFTWARE.
54
+
55
+ 7. THIRD-PARTY COMPONENTS
56
+ The Software includes third-party open-source components, each licensed under
57
+ its own terms; those terms govern those components and are not superseded by
58
+ this license. It also composes third-party agent providers over the Agent
59
+ Client Protocol and hosted APIs; use of those providers is governed by their
60
+ own terms.
61
+
62
+ For licensing inquiries, contact: legal@xenostudio.ai
63
+
64
+ NOTE TO OPERATOR: confirm the exact legal entity name and notice/contact details
65
+ with counsel before public distribution and code-signing (the code-signing
66
+ publisher name must match the registered entity). No public distribution of this
67
+ product is authorized by this file — see docs/PRODUCT_STATUS.md.
@@ -0,0 +1,67 @@
1
+ /**
2
+ * `@xenosystem/agent-interface-panel` — the XENO Agent panel that renders the REAL interface.
3
+ *
4
+ * ONE agent surface, mounted wherever a XENO Panel host can put a tile: xeno-apps, Pixel,
5
+ * Motion, Canvas. Update the interface once and every host that mounts this panel gets it,
6
+ * because there is nothing here to keep in sync — this package contributes a mount, not a UI.
7
+ *
8
+ * ## What this is, precisely
9
+ *
10
+ * `@xenosystem/panel-agent` (xeno-core) is the GENERIC half: manifest, controller, projections,
11
+ * wiring, diff parsing, host-event translation. It depends on no product, which is why it lives
12
+ * in core, and it ships a deliberately minimal default view whose own docblock says what is not
13
+ * in it — no transcript, no tool timeline, no diff, no terminal.
14
+ *
15
+ * This package is the PRODUCT half. It supplies the view, and the view is the shipping XENO Agent
16
+ * interface itself, mounted through `@xenosystem/agent-interface-embed`.
17
+ *
18
+ * 🔴 **It renders the real interface rather than reproducing it, and that is the whole point.**
19
+ * `XENO AGENT PANEL - SPEC.md` D7d refuses a port: three agent UIs already exist because each
20
+ * began as a reasonable copy, and a fourth would drift from the day it was written. The
21
+ * conversation view is ~11.5k lines bound to six stores with no tests — reproducing it is not a
22
+ * task, it is a second product to maintain.
23
+ *
24
+ * ## What a host must supply
25
+ *
26
+ * 1. An `AgentHostClient` whose `surface` is `'panel-embed'`. The embed layer refuses a client
27
+ * whose surface disagrees with the mount, deliberately — a surface that lies about which kind
28
+ * it is gets the wrong chrome and the wrong lifecycle.
29
+ * 2. A platform bridge, installed before mount. The interface reads its data from the bridge, not
30
+ * from props, exactly as it does under `hub-embed`.
31
+ *
32
+ * ⚠️ **Known limit, stated rather than hidden.** The mounted interface holds its own connection to
33
+ * the agent host. The panel's input ports still carry status and intents for host wiring, but they
34
+ * are not yet the interface's source of truth — D7c's "the panel OWNS the conversation" is only
35
+ * half done here. Closing it needs the interface to accept an injected session source, which does
36
+ * not exist today. Until it does, a host should treat this panel as the interface in a tile, and
37
+ * not wire a second conversation into it and expect them to agree.
38
+ *
39
+ * @packageDocumentation
40
+ */
41
+ import type { PanelModule } from '@xenosystem/panel-sdk';
42
+ import type { AgentHostClient } from '@xenosystem/agent-interface-client';
43
+ /** Options for {@link createXenoAgentInterfacePanel}. */
44
+ export interface CreateXenoAgentInterfacePanelOptions {
45
+ /**
46
+ * Build the client this panel mounts against.
47
+ *
48
+ * 🔴 A FACTORY, not a client. A panel can be mounted more than once in one layout and can be
49
+ * closed and reopened without the host restarting; sharing a single client across those
50
+ * lifetimes means the second mount inherits the first one's teardown. One mount, one client.
51
+ *
52
+ * The client's `surface` must be `'panel-embed'` or the embed layer refuses the mount.
53
+ */
54
+ createClient: () => AgentHostClient | Promise<AgentHostClient>;
55
+ /** Called when a mount fails, so a host can surface it rather than showing an empty tile. */
56
+ onError?: (error: unknown) => void;
57
+ }
58
+ /** The surface kind this panel mounts as. */
59
+ export declare const AGENT_PANEL_SURFACE: "panel-embed";
60
+ /**
61
+ * Build the panel module: the generic agent panel, rendered by the real XENO Agent interface.
62
+ *
63
+ * @param options - How to build a client, and where to report a failed mount.
64
+ * @returns A `PanelModule` any XENO Panel host can register.
65
+ */
66
+ export declare function createXenoAgentInterfacePanel(options: CreateXenoAgentInterfacePanelOptions): PanelModule;
67
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAezE,yDAAyD;AACzD,MAAM,WAAW,oCAAoC;IACnD;;;;;;;;OAQG;IACH,YAAY,EAAE,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;IAC9D,6FAA6F;IAC7F,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC;AAED,6CAA6C;AAC7C,eAAO,MAAM,mBAAmB,EAAG,aAAsB,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oCAAoC,GAC5C,WAAW,CAsDb"}
package/dist/index.js ADDED
@@ -0,0 +1,119 @@
1
+ /**
2
+ * `@xenosystem/agent-interface-panel` — the XENO Agent panel that renders the REAL interface.
3
+ *
4
+ * ONE agent surface, mounted wherever a XENO Panel host can put a tile: xeno-apps, Pixel,
5
+ * Motion, Canvas. Update the interface once and every host that mounts this panel gets it,
6
+ * because there is nothing here to keep in sync — this package contributes a mount, not a UI.
7
+ *
8
+ * ## What this is, precisely
9
+ *
10
+ * `@xenosystem/panel-agent` (xeno-core) is the GENERIC half: manifest, controller, projections,
11
+ * wiring, diff parsing, host-event translation. It depends on no product, which is why it lives
12
+ * in core, and it ships a deliberately minimal default view whose own docblock says what is not
13
+ * in it — no transcript, no tool timeline, no diff, no terminal.
14
+ *
15
+ * This package is the PRODUCT half. It supplies the view, and the view is the shipping XENO Agent
16
+ * interface itself, mounted through `@xenosystem/agent-interface-embed`.
17
+ *
18
+ * 🔴 **It renders the real interface rather than reproducing it, and that is the whole point.**
19
+ * `XENO AGENT PANEL - SPEC.md` D7d refuses a port: three agent UIs already exist because each
20
+ * began as a reasonable copy, and a fourth would drift from the day it was written. The
21
+ * conversation view is ~11.5k lines bound to six stores with no tests — reproducing it is not a
22
+ * task, it is a second product to maintain.
23
+ *
24
+ * ## What a host must supply
25
+ *
26
+ * 1. An `AgentHostClient` whose `surface` is `'panel-embed'`. The embed layer refuses a client
27
+ * whose surface disagrees with the mount, deliberately — a surface that lies about which kind
28
+ * it is gets the wrong chrome and the wrong lifecycle.
29
+ * 2. A platform bridge, installed before mount. The interface reads its data from the bridge, not
30
+ * from props, exactly as it does under `hub-embed`.
31
+ *
32
+ * ⚠️ **Known limit, stated rather than hidden.** The mounted interface holds its own connection to
33
+ * the agent host. The panel's input ports still carry status and intents for host wiring, but they
34
+ * are not yet the interface's source of truth — D7c's "the panel OWNS the conversation" is only
35
+ * half done here. Closing it needs the interface to accept an injected session source, which does
36
+ * not exist today. Until it does, a host should treat this panel as the interface in a tile, and
37
+ * not wire a second conversation into it and expect them to agree.
38
+ *
39
+ * @packageDocumentation
40
+ */
41
+ import { createElement } from 'react';
42
+ import { createRoot } from 'react-dom/client';
43
+ import { createAgentPanel } from '@xenosystem/panel-agent';
44
+ import { mountXenoAgentInterface } from '@xenosystem/agent-interface-embed';
45
+ import { XenoAgentInterface } from '@xenosystem/agent-interface-ui';
46
+ /*
47
+ * ⚠️ The cast is not laziness. `AgentInterface` declares its props parameter as OPTIONAL —
48
+ * `(props?: AgentInterfaceProps)` — and `createElement` narrows such a component to `{}`, so
49
+ * passing `surface` is rejected as an unknown attribute even though the built `.d.ts` types it
50
+ * correctly. Naming the props type restores it.
51
+ *
52
+ * Deliberately NOT solved by omitting the prop. `surface` defaults to `'embedded'` today, and
53
+ * relying on that default would make this panel's chrome depend on a value it never states —
54
+ * silently wrong the day the default changes.
55
+ */
56
+ const AgentInterfaceComponent = XenoAgentInterface;
57
+ /** The surface kind this panel mounts as. */
58
+ export const AGENT_PANEL_SURFACE = 'panel-embed';
59
+ /**
60
+ * Build the panel module: the generic agent panel, rendered by the real XENO Agent interface.
61
+ *
62
+ * @param options - How to build a client, and where to report a failed mount.
63
+ * @returns A `PanelModule` any XENO Panel host can register.
64
+ */
65
+ export function createXenoAgentInterfacePanel(options) {
66
+ return createAgentPanel({
67
+ render(el) {
68
+ let handle = null;
69
+ let root = null;
70
+ /*
71
+ * 🔴 Disposal can be requested BEFORE the mount resolves, and a panel closed during its own
72
+ * startup is an ordinary thing in a dockable layout — drag a tile away while it is opening.
73
+ * Without this flag the late `.then` mounts into a container the host has already discarded
74
+ * and nothing ever unmounts it, which is the leak `panel-template` records for this shape.
75
+ */
76
+ let disposed = false;
77
+ void (async () => {
78
+ try {
79
+ const client = await options.createClient();
80
+ const mounted = await mountXenoAgentInterface(el, {
81
+ surface: AGENT_PANEL_SURFACE,
82
+ client,
83
+ renderer: {
84
+ mount(container) {
85
+ /*
86
+ * Mounted HERE, inside this package, so `react` and `react-dom` resolve to one
87
+ * copy. A host that calls `createRoot` on a view imported across a package
88
+ * boundary can end up with two Reacts, and every hook throws "Invalid hook call".
89
+ */
90
+ root = createRoot(container);
91
+ root.render(createElement(AgentInterfaceComponent, { surface: 'embedded' }));
92
+ },
93
+ unmount() {
94
+ root?.unmount();
95
+ root = null;
96
+ },
97
+ },
98
+ });
99
+ if (disposed) {
100
+ await mounted.unmount();
101
+ return;
102
+ }
103
+ handle = mounted;
104
+ }
105
+ catch (error) {
106
+ options.onError?.(error);
107
+ }
108
+ })();
109
+ return () => {
110
+ disposed = true;
111
+ void handle?.unmount();
112
+ handle = null;
113
+ root?.unmount();
114
+ root = null;
115
+ };
116
+ },
117
+ });
118
+ }
119
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,aAAa,EAA0B,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAa,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,EAAE,uBAAuB,EAAsC,MAAM,mCAAmC,CAAA;AAE/G,OAAO,EAAE,kBAAkB,EAA4B,MAAM,gCAAgC,CAAA;AAE7F;;;;;;;;;GASG;AACH,MAAM,uBAAuB,GAAG,kBAA4D,CAAA;AAkB5F,6CAA6C;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAsB,CAAA;AAEzD;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,OAA6C;IAE7C,OAAO,gBAAgB,CAAC;QACtB,MAAM,CAAC,EAAe;YACpB,IAAI,MAAM,GAAyC,IAAI,CAAA;YACvD,IAAI,IAAI,GAAgB,IAAI,CAAA;YAC5B;;;;;eAKG;YACH,IAAI,QAAQ,GAAG,KAAK,CAAA;YAEpB,KAAK,CAAC,KAAK,IAAI,EAAE;gBACf,IAAI,CAAC;oBACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,YAAY,EAAE,CAAA;oBAC3C,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,EAAE,EAAE;wBAChD,OAAO,EAAE,mBAAmB;wBAC5B,MAAM;wBACN,QAAQ,EAAE;4BACR,KAAK,CAAC,SAAsB;gCAC1B;;;;mCAIG;gCACH,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;gCAC5B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;4BAC9E,CAAC;4BACD,OAAO;gCACL,IAAI,EAAE,OAAO,EAAE,CAAA;gCACf,IAAI,GAAG,IAAI,CAAA;4BACb,CAAC;yBACF;qBACF,CAAC,CAAA;oBACF,IAAI,QAAQ,EAAE,CAAC;wBACb,MAAM,OAAO,CAAC,OAAO,EAAE,CAAA;wBACvB,OAAM;oBACR,CAAC;oBACD,MAAM,GAAG,OAAO,CAAA;gBAClB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAA;gBAC1B,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;YAEJ,OAAO,GAAG,EAAE;gBACV,QAAQ,GAAG,IAAI,CAAA;gBACf,KAAK,MAAM,EAAE,OAAO,EAAE,CAAA;gBACtB,MAAM,GAAG,IAAI,CAAA;gBACb,IAAI,EAAE,OAAO,EAAE,CAAA;gBACf,IAAI,GAAG,IAAI,CAAA;YACb,CAAC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@xenosystem/agent-interface-panel",
3
+ "version": "0.1.26",
4
+ "license": "UNLICENSED",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "//sideEffects": "Only stylesheets are un-droppable; unused JS may be tree-shaken.",
15
+ "sideEffects": [
16
+ "**/*.css"
17
+ ],
18
+ "files": [
19
+ "dist",
20
+ "README.md"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "dependencies": {
26
+ "@xenosystem/panel-agent": "^0.1.0",
27
+ "@xenosystem/agent-interface-client": "0.1.26",
28
+ "@xenosystem/agent-interface-embed": "0.1.26",
29
+ "@xenosystem/agent-interface-ui": "0.1.26",
30
+ "@xenosystem/agent-interface-contract": "0.1.26"
31
+ },
32
+ "peerDependencies": {
33
+ "@xenosystem/panel-sdk": "^1.1.0",
34
+ "@xenosystem/workbench": "^1.0.0",
35
+ "react": ">=18.0.0",
36
+ "react-dom": ">=18.0.0"
37
+ },
38
+ "devDependencies": {
39
+ "@types/react": "^19.0.2",
40
+ "@types/react-dom": "^19.0.2",
41
+ "@xenosystem/panel-sdk": "^1.1.0",
42
+ "@xenosystem/workbench": "^1.0.0",
43
+ "react": "^19.0.0",
44
+ "react-dom": "^19.0.0"
45
+ },
46
+ "scripts": {
47
+ "build": "tsc -p tsconfig.json"
48
+ }
49
+ }