@rivus/gateway 0.16.6 → 0.18.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.
Files changed (36) hide show
  1. package/LICENSE +674 -21
  2. package/README.md +25 -0
  3. package/dist/bootstrap/herdr-feishu.d.ts +37 -0
  4. package/dist/bootstrap/herdr-feishu.js +853 -0
  5. package/dist/bootstrap/pi-feishu.d.ts +281 -16
  6. package/dist/bootstrap/pi-feishu.js +17315 -345
  7. package/dist/chunks/background-session-authority.js +2 -38
  8. package/dist/chunks/rivus-daemon-cli.d.ts +1115 -0
  9. package/dist/chunks/rivus-node-entrypoint.js +735 -847
  10. package/dist/chunks/{node-rivus-deployment-manifest.js → runtime-cache.js} +1118 -1476
  11. package/dist/cli.d.ts +2 -1
  12. package/dist/cli.js +1 -0
  13. package/dist/index.d.ts +65 -3
  14. package/dist/index.js +3 -1215
  15. package/dist/mcp.d.ts +7 -63
  16. package/dist/mcp.js +3 -250
  17. package/package.json +21 -13
  18. package/templates/a-share-briefing-analysis.mjs +3 -1
  19. package/templates/a-share-briefing-renderer.mjs +15 -5
  20. package/templates/a-share-index-evidence.mjs +9 -3
  21. package/templates/a-share-market-briefing.mjs +3 -1
  22. package/templates/a-share-overseas-evidence.mjs +12 -4
  23. package/templates/a-share-policy-evidence.mjs +30 -10
  24. package/templates/a-share-sector-evidence.mjs +3 -1
  25. package/templates/acp-stdio-proxy.mjs +10 -4
  26. package/templates/current-weather.mjs +36 -12
  27. package/templates/herdr-feishu.mjs +30 -0
  28. package/templates/html-drive-tools.mjs +36 -12
  29. package/templates/pi-feishu-deployment.bootstrap.ts +1 -3
  30. package/templates/pi-feishu.bootstrap.ts +1 -242
  31. package/templates/rivus-agents.plugin.mjs +3 -1
  32. package/dist/chunks/background-session-control-input.js +0 -45
  33. package/dist/chunks/background-session-service.d.ts +0 -390
  34. package/dist/chunks/index.d.ts +0 -4703
  35. package/dist/chunks/service.js +0 -12112
  36. package/templates/langfuse-drive-e2e.mjs +0 -175
@@ -1,21 +1,4 @@
1
- //#region src/core/application/background-session/authority/background-session-identity.ts
2
- const BACKGROUND_SESSION_SESSION_KEY_PREFIX = "background";
3
- function createBackgroundSessionKey(sessionId) {
4
- return `${BACKGROUND_SESSION_SESSION_KEY_PREFIX}:${sessionId}`;
5
- }
6
- function createBackgroundSessionStepSourceMessageId(sessionId, stepCount) {
7
- return `bg:${sessionId}:step:${stepCount}`;
8
- }
9
- //#endregion
10
1
  //#region src/core/application/background-session/authority/background-session-authority.ts
11
- const BACKGROUND_SESSION_TOOL_IDS = [
12
- "background.start",
13
- "background.wait",
14
- "background.list",
15
- "background.status",
16
- "background.send",
17
- "background.stop"
18
- ];
19
2
  const BACKGROUND_SESSION_START_TOOL_ID = "background.start";
20
3
  const BACKGROUND_SESSION_TOOL_PLUGIN_ID = "rivus-core";
21
4
  const BACKGROUND_SESSION_TOOL_VERSION = "1.0.0";
@@ -188,26 +171,6 @@ function createBackgroundSessionToolContracts() {
188
171
  })
189
172
  ];
190
173
  }
191
- function backgroundSessionToolIds() {
192
- return [...BACKGROUND_SESSION_TOOL_IDS];
193
- }
194
- function isBackgroundSessionToolId(toolId) {
195
- return BACKGROUND_SESSION_TOOL_IDS.includes(toolId);
196
- }
197
- function extendBackgroundSessionDefinition(definition, digest) {
198
- const contracts = createBackgroundSessionToolContracts();
199
- const existingIds = new Set(definition.tools.map(({ id }) => id));
200
- const additions = contracts.filter((contract) => !existingIds.has(contract.id));
201
- const toolGrantSet = Object.freeze({
202
- revision: grantRevision(digest, definition.toolGrantSet.revision, additions.map(({ id }) => id)),
203
- toolIds: Object.freeze([...definition.toolGrantSet.toolIds, ...additions.map(({ id }) => id)].sort())
204
- });
205
- return Object.freeze({
206
- ...definition,
207
- tools: Object.freeze([...definition.tools, ...additions]),
208
- toolGrantSet
209
- });
210
- }
211
174
  function narrowBackgroundSessionDefinition(definition, digest) {
212
175
  const childToolIds = definition.toolGrantSet.toolIds.filter((id) => id !== BACKGROUND_SESSION_START_TOOL_ID);
213
176
  const toolGrantSet = Object.freeze({
@@ -227,4 +190,5 @@ function grantRevision(digest, parentRevision, toolIds) {
227
190
  }));
228
191
  }
229
192
  //#endregion
230
- export { backgroundSessionToolIds as a, isBackgroundSessionToolId as c, createBackgroundSessionKey as d, createBackgroundSessionStepSourceMessageId as f, BACKGROUND_SESSION_TOOL_VERSION as i, narrowBackgroundSessionDefinition as l, BACKGROUND_SESSION_TOOL_IDS as n, createBackgroundSessionToolContracts as o, BACKGROUND_SESSION_TOOL_PLUGIN_ID as r, extendBackgroundSessionDefinition as s, BACKGROUND_SESSION_START_TOOL_ID as t, BACKGROUND_SESSION_SESSION_KEY_PREFIX as u };
193
+ export { narrowBackgroundSessionDefinition as n, createBackgroundSessionToolContracts as t };
194
+