@xenosystem/agent-interface-panel 0.1.28 → 0.1.30

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 CHANGED
@@ -40,6 +40,7 @@
40
40
  */
41
41
  import type { PanelModule } from '@xenosystem/panel-sdk';
42
42
  import type { AgentHostClient } from '@xenosystem/agent-interface-client';
43
+ import { type XenoAgentConversationProps } from '@xenosystem/agent-conversation';
43
44
  /**
44
45
  * The platform bridge, structurally. Deliberately not `XenoAPI`: a panel host implements the
45
46
  * capabilities the interface reaches and refuses the rest by name, so demanding the full type
@@ -69,6 +70,18 @@ export type AgentPlatformBridgeLike = object;
69
70
  * The client is the embed lifecycle; the component reads the bridge.
70
71
  */
71
72
  export interface CreateXenoAgentInterfacePanelOptions {
73
+ /**
74
+ * Which conversation this panel opens, and how it behaves.
75
+ *
76
+ * Omitted, it opens the same personal assistant the full interface shows — from the same
77
+ * constants, so the panel and the desktop app open the SAME conversation rather than two that
78
+ * merely look alike.
79
+ *
80
+ * ⚠️ Merged OVER the defaults, so a host overrides one field without restating the rest. A host
81
+ * that wants a specific conversation passes `conversationId`; one embedding a project agent
82
+ * passes `agentId`/`agentName`/`model`.
83
+ */
84
+ conversation?: Partial<XenoAgentConversationProps>;
72
85
  /**
73
86
  * Build the client this panel mounts against — the EMBED path.
74
87
  *
@@ -1 +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;AAOzE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAA;AAc5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,oCAAoC;IACnD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,CAAA;CACnC;AAED,6CAA6C;AAC7C,eAAO,MAAM,mBAAmB,EAAG,aAAsB,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,oCAAoC,GAC5C,WAAW,CAuFb"}
package/dist/index.js CHANGED
@@ -42,18 +42,46 @@ import { createElement } from 'react';
42
42
  import { createRoot } from 'react-dom/client';
43
43
  import { createAgentPanel } from '@xenosystem/panel-agent';
44
44
  import { mountXenoAgentInterface } from '@xenosystem/agent-interface-embed';
45
- import { XenoAgentInterface, configureAgentPlatformBridge, } from '@xenosystem/agent-interface-ui';
46
45
  /*
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.
46
+ * 🔴 The conversation comes from its OWN package, not through the shell.
51
47
  *
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.
48
+ * That is the inversion this panel exists for. While the conversation lived inside
49
+ * `agent-interface-ui`, the shell was the canonical thing and this was a wrapper around it —
50
+ * improving the panel reached nobody, because nothing downstream depended on it. Now the shell and
51
+ * this panel are peers that render the same conversation.
55
52
  */
56
- const AgentInterfaceComponent = XenoAgentInterface;
53
+ import { MAIN_ASSISTANT_ID, MAIN_ASSISTANT_MODEL, MAIN_ASSISTANT_NAME, XenoAgentConversation, configureAgentPlatformBridge, } from '@xenosystem/agent-conversation';
54
+ /**
55
+ * What this panel actually renders: the CONVERSATION, not the shell around it.
56
+ *
57
+ * 🔴 Until now both mount paths rendered `XenoAgentInterface` — the whole desktop shell, with its
58
+ * session sidebar, its tab header and its editor/browser split. Dropped into a host that owns its
59
+ * own window that is an application inside a panel: a second sidebar beside the host's, a second
60
+ * tab strip, and two things competing to decide what "the current session" means.
61
+ *
62
+ * The panel is the conversation — the transcript and the composer and the logic behind them — and
63
+ * nothing else. The host supplies the surrounding chrome, because the host already has some.
64
+ */
65
+ const AgentConversationComponent = XenoAgentConversation;
66
+ /**
67
+ * The conversation this panel opens when the host does not name one.
68
+ *
69
+ * Identical to what the full interface shows for the personal inbox, from the same constants —
70
+ * so a panel and the desktop app open the SAME conversation rather than two that merely look
71
+ * alike. Inventing an agent id here is how those quietly diverge.
72
+ */
73
+ function defaultConversationProps() {
74
+ return {
75
+ agentId: MAIN_ASSISTANT_ID,
76
+ agentName: MAIN_ASSISTANT_NAME,
77
+ model: MAIN_ASSISTANT_MODEL,
78
+ isMainAssistant: true,
79
+ capabilities: { terminal: true, fileRead: true, fileWrite: true, appLaunch: true },
80
+ permissionProfile: 'standard',
81
+ // A host chrome draws its own workbench; the conversation must not draw a second one.
82
+ renderWorkbenchPanel: false,
83
+ };
84
+ }
57
85
  /** The surface kind this panel mounts as. */
58
86
  export const AGENT_PANEL_SURFACE = 'panel-embed';
59
87
  /**
@@ -95,7 +123,10 @@ export function createXenoAgentInterfacePanel(options) {
95
123
  }
96
124
  restoreBridge = configureAgentPlatformBridge(bridge);
97
125
  root = createRoot(el);
98
- root.render(createElement(AgentInterfaceComponent, { surface: 'embedded' }));
126
+ root.render(createElement(AgentConversationComponent, {
127
+ ...defaultConversationProps(),
128
+ ...options.conversation,
129
+ }));
99
130
  return;
100
131
  }
101
132
  if (!options.createClient) {
@@ -113,7 +144,10 @@ export function createXenoAgentInterfacePanel(options) {
113
144
  * boundary can end up with two Reacts, and every hook throws "Invalid hook call".
114
145
  */
115
146
  root = createRoot(container);
116
- root.render(createElement(AgentInterfaceComponent, { surface: 'embedded' }));
147
+ root.render(createElement(AgentConversationComponent, {
148
+ ...defaultConversationProps(),
149
+ ...options.conversation,
150
+ }));
117
151
  },
118
152
  unmount() {
119
153
  root?.unmount();
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"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O;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;gBACX,aAAa,EAAE,EAAE,CAAA;gBACjB,aAAa,GAAG,IAAI,CAAA;YACtB,CAAC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/agent-interface-panel",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@xenosystem/panel-agent": "^0.1.0",
27
- "@xenosystem/agent-interface-client": "0.1.28",
28
- "@xenosystem/agent-interface-contract": "0.1.28",
29
- "@xenosystem/agent-interface-embed": "0.1.28",
30
- "@xenosystem/agent-interface-ui": "0.1.28"
27
+ "@xenosystem/agent-conversation": "0.1.30",
28
+ "@xenosystem/agent-interface-client": "0.1.30",
29
+ "@xenosystem/agent-interface-embed": "0.1.30",
30
+ "@xenosystem/agent-interface-contract": "0.1.30"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@xenosystem/panel-sdk": "^1.1.0",