@rynx-ai/plugin-channel-lark 0.1.11-beta.5 → 0.2.0-beta.2
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/.rynx-plugin/plugin.json +0 -12
- package/dist/host-adapters.d.ts +2 -2
- package/dist/host-adapters.js +16 -16
- package/dist/runtime.js +19 -14
- package/dist/settings.js +8 -3
- package/package.json +4 -4
package/.rynx-plugin/plugin.json
CHANGED
|
@@ -5,18 +5,6 @@
|
|
|
5
5
|
"displayName": "Lark",
|
|
6
6
|
"description": "Lark and Feishu channel integration managed by the plugin.",
|
|
7
7
|
"apiRange": "^1.0.0",
|
|
8
|
-
"capabilities": [
|
|
9
|
-
"conversation.run",
|
|
10
|
-
"agent.catalog.read",
|
|
11
|
-
"runtime.catalog.read",
|
|
12
|
-
"session.cancel",
|
|
13
|
-
"session.fork",
|
|
14
|
-
"session.goal.read",
|
|
15
|
-
"session.goal.write",
|
|
16
|
-
"session.meta.read",
|
|
17
|
-
"session.meta.title.write",
|
|
18
|
-
"session.provision"
|
|
19
|
-
],
|
|
20
8
|
"runtime": {
|
|
21
9
|
"entry": "./dist/runtime.js"
|
|
22
10
|
},
|
package/dist/host-adapters.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ interface HostSessionLaunchMeta {
|
|
|
13
13
|
export declare const LARK_RUN_EVENT_QUEUE_MAX_ITEMS = 256;
|
|
14
14
|
export declare const LARK_RUN_EVENT_QUEUE_MAX_BYTES: number;
|
|
15
15
|
/**
|
|
16
|
-
* ConversationRuntime-shaped adapter backed exclusively by
|
|
17
|
-
*
|
|
16
|
+
* ConversationRuntime-shaped adapter backed exclusively by the typed Host API.
|
|
17
|
+
* The plugin never receives the daemon's runtime, abort controller,
|
|
18
18
|
* steer controller, or session bus.
|
|
19
19
|
*/
|
|
20
20
|
export declare class HostConversationRuntime implements LarkConversationRuntime {
|
package/dist/host-adapters.js
CHANGED
|
@@ -6,8 +6,8 @@ import { FileLarkActiveSessionStore, } from "./lark-session-store.js";
|
|
|
6
6
|
export const LARK_RUN_EVENT_QUEUE_MAX_ITEMS = 256;
|
|
7
7
|
export const LARK_RUN_EVENT_QUEUE_MAX_BYTES = 8 * 1024 * 1024;
|
|
8
8
|
/**
|
|
9
|
-
* ConversationRuntime-shaped adapter backed exclusively by
|
|
10
|
-
*
|
|
9
|
+
* ConversationRuntime-shaped adapter backed exclusively by the typed Host API.
|
|
10
|
+
* The plugin never receives the daemon's runtime, abort controller,
|
|
11
11
|
* steer controller, or session bus.
|
|
12
12
|
*/
|
|
13
13
|
export class HostConversationRuntime {
|
|
@@ -37,7 +37,7 @@ export class HostConversationRuntime {
|
|
|
37
37
|
const interrupt = () => {
|
|
38
38
|
if (!runId || terminal)
|
|
39
39
|
return;
|
|
40
|
-
void this.host.
|
|
40
|
+
void this.host.sessions.interrupt({ runId }).catch(() => undefined);
|
|
41
41
|
};
|
|
42
42
|
const accept = (event, payload) => {
|
|
43
43
|
if (!runId) {
|
|
@@ -86,7 +86,7 @@ export class HostConversationRuntime {
|
|
|
86
86
|
unsubscribeEvents();
|
|
87
87
|
let started;
|
|
88
88
|
try {
|
|
89
|
-
started = await this.host.
|
|
89
|
+
started = await this.host.sessions.run({
|
|
90
90
|
sessionId: input.threadId,
|
|
91
91
|
message: input.message,
|
|
92
92
|
});
|
|
@@ -109,7 +109,7 @@ export class HostConversationRuntime {
|
|
|
109
109
|
const unsteer = input.steer?.subscribe((text) => {
|
|
110
110
|
if (!runId || terminal)
|
|
111
111
|
return;
|
|
112
|
-
void this.host.
|
|
112
|
+
void this.host.sessions.steer({ runId, text }).catch(() => undefined);
|
|
113
113
|
});
|
|
114
114
|
input.signal?.addEventListener("abort", interrupt, { once: true });
|
|
115
115
|
const generator = (async function* () {
|
|
@@ -141,16 +141,16 @@ export class HostAgentCapabilities {
|
|
|
141
141
|
this.host = host;
|
|
142
142
|
}
|
|
143
143
|
listModels(runtime) {
|
|
144
|
-
return this.host.
|
|
144
|
+
return this.host.sessions.listModels(runtime ? { runtime } : undefined);
|
|
145
145
|
}
|
|
146
146
|
getGoal(sessionId) {
|
|
147
|
-
return this.host.
|
|
147
|
+
return this.host.sessions.goals.get({ sessionId });
|
|
148
148
|
}
|
|
149
149
|
setGoal(sessionId, objective) {
|
|
150
|
-
return this.host.
|
|
150
|
+
return this.host.sessions.goals.set({ sessionId, objective });
|
|
151
151
|
}
|
|
152
152
|
clearGoal(sessionId) {
|
|
153
|
-
return this.host.
|
|
153
|
+
return this.host.sessions.goals.clear({ sessionId });
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
/** Narrow agent catalog + first-turn execution resolver backed by Host RPC. */
|
|
@@ -160,13 +160,13 @@ export class HostAgentCatalog {
|
|
|
160
160
|
this.host = host;
|
|
161
161
|
}
|
|
162
162
|
list() {
|
|
163
|
-
return this.host.
|
|
163
|
+
return this.host.agents.list();
|
|
164
164
|
}
|
|
165
165
|
get(id) {
|
|
166
|
-
return this.host.
|
|
166
|
+
return this.host.agents.get({ id });
|
|
167
167
|
}
|
|
168
168
|
resolveExecution(input) {
|
|
169
|
-
return this.host.
|
|
169
|
+
return this.host.agents.resolveExecution(input);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
/** Daemon-owned session allocator. operationId must identify one allocation attempt durably. */
|
|
@@ -179,7 +179,7 @@ export class HostSessionProvisioner {
|
|
|
179
179
|
this.instanceId = instanceId;
|
|
180
180
|
}
|
|
181
181
|
async provision(operationId, session = {}) {
|
|
182
|
-
const result = await this.host.
|
|
182
|
+
const result = await this.host.sessions.ensure({
|
|
183
183
|
scopeId: this.instanceId,
|
|
184
184
|
operationId,
|
|
185
185
|
session,
|
|
@@ -203,7 +203,7 @@ export class HostSessionProvisioner {
|
|
|
203
203
|
}
|
|
204
204
|
async existingExecution(sessionId) {
|
|
205
205
|
try {
|
|
206
|
-
const session = await this.host.
|
|
206
|
+
const session = await this.host.sessions.get({ sessionId });
|
|
207
207
|
return {
|
|
208
208
|
runtime: session.execution.provider,
|
|
209
209
|
model: session.execution.model,
|
|
@@ -225,7 +225,7 @@ export class HostSessionProvisioner {
|
|
|
225
225
|
return stableOperationId("fork", this.instanceId, fromSessionId, newSessionKey);
|
|
226
226
|
}
|
|
227
227
|
async fork(operationId, sourceSessionId, title) {
|
|
228
|
-
const result = await this.host.
|
|
228
|
+
const result = await this.host.sessions.fork({
|
|
229
229
|
sourceSessionId,
|
|
230
230
|
operationId,
|
|
231
231
|
...(title ? { title } : {}),
|
|
@@ -235,7 +235,7 @@ export class HostSessionProvisioner {
|
|
|
235
235
|
return result.sessionId;
|
|
236
236
|
}
|
|
237
237
|
async setTitle(sessionId, title) {
|
|
238
|
-
await this.host.
|
|
238
|
+
await this.host.sessions.setTitle({ sessionId, title });
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
/**
|
package/dist/runtime.js
CHANGED
|
@@ -126096,6 +126096,11 @@ var envSchema = external_exports.object({
|
|
|
126096
126096
|
/** The generic control API is local-first and unauthenticated by default. */
|
|
126097
126097
|
HOST: external_exports.string().default("127.0.0.1"),
|
|
126098
126098
|
PORT: external_exports.coerce.number().int().positive().default(3e3),
|
|
126099
|
+
/** Optional, grant-gated native Session Portal listener. It is deliberately separate
|
|
126100
|
+
* from the generic Control Web listener and remains disabled unless a port is
|
|
126101
|
+
* configured explicitly. */
|
|
126102
|
+
RYNX_SESSION_PORTAL_HOST: external_exports.string().default("127.0.0.1"),
|
|
126103
|
+
RYNX_SESSION_PORTAL_PORT: external_exports.coerce.number().int().positive().optional(),
|
|
126099
126104
|
LOG_LEVEL: external_exports.string().default("info"),
|
|
126100
126105
|
/**
|
|
126101
126106
|
* Default agent runtime for conversations that haven't picked one via the
|
|
@@ -126880,7 +126885,7 @@ var HostConversationRuntime = class {
|
|
|
126880
126885
|
};
|
|
126881
126886
|
const interrupt = () => {
|
|
126882
126887
|
if (!runId || terminal) return;
|
|
126883
|
-
void this.host.
|
|
126888
|
+
void this.host.sessions.interrupt({ runId }).catch(() => void 0);
|
|
126884
126889
|
};
|
|
126885
126890
|
const accept = (event, payload) => {
|
|
126886
126891
|
if (!runId) {
|
|
@@ -126926,7 +126931,7 @@ var HostConversationRuntime = class {
|
|
|
126926
126931
|
if (earlyOverflow) unsubscribeEvents();
|
|
126927
126932
|
let started;
|
|
126928
126933
|
try {
|
|
126929
|
-
started = await this.host.
|
|
126934
|
+
started = await this.host.sessions.run({
|
|
126930
126935
|
sessionId: input.threadId,
|
|
126931
126936
|
message: input.message
|
|
126932
126937
|
});
|
|
@@ -126945,7 +126950,7 @@ var HostConversationRuntime = class {
|
|
|
126945
126950
|
}
|
|
126946
126951
|
const unsteer = input.steer?.subscribe((text) => {
|
|
126947
126952
|
if (!runId || terminal) return;
|
|
126948
|
-
void this.host.
|
|
126953
|
+
void this.host.sessions.steer({ runId, text }).catch(() => void 0);
|
|
126949
126954
|
});
|
|
126950
126955
|
input.signal?.addEventListener("abort", interrupt, { once: true });
|
|
126951
126956
|
const generator = (async function* () {
|
|
@@ -126973,16 +126978,16 @@ var HostAgentCapabilities = class {
|
|
|
126973
126978
|
}
|
|
126974
126979
|
host;
|
|
126975
126980
|
listModels(runtime) {
|
|
126976
|
-
return this.host.
|
|
126981
|
+
return this.host.sessions.listModels(runtime ? { runtime } : void 0);
|
|
126977
126982
|
}
|
|
126978
126983
|
getGoal(sessionId) {
|
|
126979
|
-
return this.host.
|
|
126984
|
+
return this.host.sessions.goals.get({ sessionId });
|
|
126980
126985
|
}
|
|
126981
126986
|
setGoal(sessionId, objective) {
|
|
126982
|
-
return this.host.
|
|
126987
|
+
return this.host.sessions.goals.set({ sessionId, objective });
|
|
126983
126988
|
}
|
|
126984
126989
|
clearGoal(sessionId) {
|
|
126985
|
-
return this.host.
|
|
126990
|
+
return this.host.sessions.goals.clear({ sessionId });
|
|
126986
126991
|
}
|
|
126987
126992
|
};
|
|
126988
126993
|
var HostAgentCatalog = class {
|
|
@@ -126991,13 +126996,13 @@ var HostAgentCatalog = class {
|
|
|
126991
126996
|
}
|
|
126992
126997
|
host;
|
|
126993
126998
|
list() {
|
|
126994
|
-
return this.host.
|
|
126999
|
+
return this.host.agents.list();
|
|
126995
127000
|
}
|
|
126996
127001
|
get(id) {
|
|
126997
|
-
return this.host.
|
|
127002
|
+
return this.host.agents.get({ id });
|
|
126998
127003
|
}
|
|
126999
127004
|
resolveExecution(input) {
|
|
127000
|
-
return this.host.
|
|
127005
|
+
return this.host.agents.resolveExecution(input);
|
|
127001
127006
|
}
|
|
127002
127007
|
};
|
|
127003
127008
|
var HostSessionProvisioner = class {
|
|
@@ -127009,7 +127014,7 @@ var HostSessionProvisioner = class {
|
|
|
127009
127014
|
instanceId;
|
|
127010
127015
|
resolvedExecutions = /* @__PURE__ */ new Map();
|
|
127011
127016
|
async provision(operationId, session = {}) {
|
|
127012
|
-
const result = await this.host.
|
|
127017
|
+
const result = await this.host.sessions.ensure({
|
|
127013
127018
|
scopeId: this.instanceId,
|
|
127014
127019
|
operationId,
|
|
127015
127020
|
session
|
|
@@ -127030,7 +127035,7 @@ var HostSessionProvisioner = class {
|
|
|
127030
127035
|
}
|
|
127031
127036
|
async existingExecution(sessionId) {
|
|
127032
127037
|
try {
|
|
127033
|
-
const session = await this.host.
|
|
127038
|
+
const session = await this.host.sessions.get({ sessionId });
|
|
127034
127039
|
return {
|
|
127035
127040
|
runtime: session.execution.provider,
|
|
127036
127041
|
model: session.execution.model,
|
|
@@ -127048,7 +127053,7 @@ var HostSessionProvisioner = class {
|
|
|
127048
127053
|
return stableOperationId("fork", this.instanceId, fromSessionId, newSessionKey);
|
|
127049
127054
|
}
|
|
127050
127055
|
async fork(operationId, sourceSessionId, title) {
|
|
127051
|
-
const result = await this.host.
|
|
127056
|
+
const result = await this.host.sessions.fork({
|
|
127052
127057
|
sourceSessionId,
|
|
127053
127058
|
operationId,
|
|
127054
127059
|
...title ? { title } : {}
|
|
@@ -127057,7 +127062,7 @@ var HostSessionProvisioner = class {
|
|
|
127057
127062
|
return result.sessionId;
|
|
127058
127063
|
}
|
|
127059
127064
|
async setTitle(sessionId, title) {
|
|
127060
|
-
await this.host.
|
|
127065
|
+
await this.host.sessions.setTitle({ sessionId, title });
|
|
127061
127066
|
}
|
|
127062
127067
|
};
|
|
127063
127068
|
var HostProvisionedLarkSessionStore = class extends FileLarkActiveSessionStore {
|
package/dist/settings.js
CHANGED
|
@@ -126032,6 +126032,11 @@ var envSchema = external_exports.object({
|
|
|
126032
126032
|
/** The generic control API is local-first and unauthenticated by default. */
|
|
126033
126033
|
HOST: external_exports.string().default("127.0.0.1"),
|
|
126034
126034
|
PORT: external_exports.coerce.number().int().positive().default(3e3),
|
|
126035
|
+
/** Optional, grant-gated native Session Portal listener. It is deliberately separate
|
|
126036
|
+
* from the generic Control Web listener and remains disabled unless a port is
|
|
126037
|
+
* configured explicitly. */
|
|
126038
|
+
RYNX_SESSION_PORTAL_HOST: external_exports.string().default("127.0.0.1"),
|
|
126039
|
+
RYNX_SESSION_PORTAL_PORT: external_exports.coerce.number().int().positive().optional(),
|
|
126035
126040
|
LOG_LEVEL: external_exports.string().default("info"),
|
|
126036
126041
|
/**
|
|
126037
126042
|
* Default agent runtime for conversations that haven't picked one via the
|
|
@@ -126363,13 +126368,13 @@ var HostAgentCatalog = class {
|
|
|
126363
126368
|
}
|
|
126364
126369
|
host;
|
|
126365
126370
|
list() {
|
|
126366
|
-
return this.host.
|
|
126371
|
+
return this.host.agents.list();
|
|
126367
126372
|
}
|
|
126368
126373
|
get(id) {
|
|
126369
|
-
return this.host.
|
|
126374
|
+
return this.host.agents.get({ id });
|
|
126370
126375
|
}
|
|
126371
126376
|
resolveExecution(input) {
|
|
126372
|
-
return this.host.
|
|
126377
|
+
return this.host.agents.resolveExecution(input);
|
|
126373
126378
|
}
|
|
126374
126379
|
};
|
|
126375
126380
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rynx-ai/plugin-channel-lark",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-beta.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/rynx-ai/rynx.git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@larksuiteoapi/node-sdk": "^1.60.0",
|
|
31
|
-
"@rynx-ai/
|
|
32
|
-
"@rynx-ai/
|
|
31
|
+
"@rynx-ai/core": "0.2.0-beta.2",
|
|
32
|
+
"@rynx-ai/plugin-sdk": "0.2.0-beta.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@fontsource-variable/inter": "^5.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tailwindcss": "^4.0.0",
|
|
47
47
|
"typescript": "^6.0.2",
|
|
48
48
|
"vite": "^6.1.0",
|
|
49
|
-
"@rynx-ai/ui": "0.
|
|
49
|
+
"@rynx-ai/ui": "0.2.0-beta.2"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "pnpm run build:runtime && pnpm run build:ui",
|