@segmentstream/agent 0.17.17 → 0.17.19

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.
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- var version = "0.17.17";
7
+ var version = "0.17.19";
8
8
  function agentBuild(environment = process.env) {
9
9
  return {
10
10
  agent: version,
@@ -4,5 +4,5 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { t as agentBuild } from "../../_chunks/build-metadata-9SHckxvW.mjs";
7
+ import { t as agentBuild } from "../../_chunks/build-metadata-CAKNBzXF.mjs";
8
8
  export { agentBuild };
@@ -22,7 +22,7 @@ import { MAXIMUM_DOWNLOAD_BYTES, connectionProxy } from "../connection-proxy.mjs
22
22
  import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
23
23
  import { scopedAddress, sessionPolicy } from "./sessions.mjs";
24
24
  import { handleWorkspaceCallback, isWorkspaceCallback } from "./callbacks.mjs";
25
- import { t as agentBuild } from "../../../_chunks/build-metadata-9SHckxvW.mjs";
25
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CAKNBzXF.mjs";
26
26
  import { attachmentLifecycle } from "./lifecycle.mjs";
27
27
  import { observedMessages } from "./observed.mjs";
28
28
  import { expireDeferredCards, handleDeferredCallback, isDeferredCallback } from "./deferred-confirmations.mjs";
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { t as agentBuild } from "../../../_chunks/build-metadata-9SHckxvW.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CAKNBzXF.mjs";
8
8
  import { runtimeRequestFailure } from "./runtime-request.mjs";
9
9
  import { GET } from "eve/channels";
10
10
  const HEALTH_ROUTE = "/eve/v1/telegram/health";
@@ -9,7 +9,7 @@ import { object } from "../confirmation-description.mjs";
9
9
  import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-Buuv7b1I.mjs";
10
10
  import { needsConfirmation } from "../confirmations.mjs";
11
11
  import { OntologyActionNotPermitted, actionToolName, ontologyTools } from "../ontology-tools.mjs";
12
- import { t as agentBuild } from "../../../_chunks/build-metadata-9SHckxvW.mjs";
12
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CAKNBzXF.mjs";
13
13
  var AttachmentLifecycleNotPermitted = class extends Error {
14
14
  code = "attachment_lifecycle_not_permitted";
15
15
  };
@@ -1,7 +1,9 @@
1
- import { type ToolDefinition } from "eve/tools";
1
+ import { type BashToolOutput } from "eve/tools/bash";
2
+ import { type ReadFileToolOutput } from "eve/tools/read_file";
3
+ import { type WriteFileToolOutput } from "eve/tools/write_file";
2
4
  declare const _default: import("eve").DynamicSentinel<{
3
- bash: ToolDefinition<import("eve/tools/bash").BashToolInput, import("eve/tools/bash").BashToolOutput>;
4
- read_file: ToolDefinition<import("eve/tools/read_file").ReadFileToolInput, import("eve/tools/read_file").ReadFileToolOutput>;
5
- write_file: ToolDefinition<import("eve/tools/write_file").WriteFileToolInput, import("eve/tools/write_file").WriteFileToolOutput>;
5
+ bash: import("eve/tools").ToolDefinition<import("eve/tools/bash").BashToolInput, BashToolOutput>;
6
+ read_file: import("eve/tools").ToolDefinition<import("eve/tools/read_file").ReadFileToolInput, ReadFileToolOutput>;
7
+ write_file: import("eve/tools").ToolDefinition<import("eve/tools/write_file").WriteFileToolInput, WriteFileToolOutput>;
6
8
  } | null>;
7
9
  export default _default;
@@ -10,22 +10,37 @@ import { defineDynamic, defineTool } from "eve/tools";
10
10
  import { bash } from "eve/tools/bash";
11
11
  import { readFile } from "eve/tools/read_file";
12
12
  import { writeFile } from "eve/tools/write_file";
13
- function gated(tool, description = tool.description) {
14
- return defineTool({
15
- inputSchema: tool.inputSchema,
16
- outputSchema: tool.outputSchema,
17
- label: tool.label,
18
- description,
13
+ const tools = {
14
+ bash: defineTool({
15
+ inputSchema: bash.inputSchema,
16
+ outputSchema: bash.outputSchema,
17
+ label: bash.label,
18
+ description: "Run a shell command in this conversation's isolated sandbox, which has no network. A command still running after 30 seconds keeps running and returns status \"running\" with its output so far and the directory of its stdout, stderr and exit files.",
19
19
  async execute(input, ctx) {
20
20
  await sessionSandbox(ctx);
21
- return await tool.execute(input, ctx);
21
+ return await bash.execute(input, ctx);
22
22
  }
23
- });
24
- }
25
- const tools = {
26
- bash: gated(bash, "Run a shell command in this conversation's isolated sandbox, which has no network. A command still running after 30 seconds keeps running and returns status \"running\" with its output so far and the directory of its stdout, stderr and exit files."),
27
- read_file: gated(readFile),
28
- write_file: gated(writeFile, "Write a complete file in this conversation's isolated sandbox, creating directories as needed. Read an existing file with read_file before overwriting it.")
23
+ }),
24
+ read_file: defineTool({
25
+ inputSchema: readFile.inputSchema,
26
+ outputSchema: readFile.outputSchema,
27
+ label: readFile.label,
28
+ description: readFile.description,
29
+ async execute(input, ctx) {
30
+ await sessionSandbox(ctx);
31
+ return await readFile.execute(input, ctx);
32
+ }
33
+ }),
34
+ write_file: defineTool({
35
+ inputSchema: writeFile.inputSchema,
36
+ outputSchema: writeFile.outputSchema,
37
+ label: writeFile.label,
38
+ description: "Write a complete file in this conversation's isolated sandbox, creating directories as needed. Read an existing file with read_file before overwriting it.",
39
+ async execute(input, ctx) {
40
+ await sessionSandbox(ctx);
41
+ return await writeFile.execute(input, ctx);
42
+ }
43
+ })
29
44
  };
30
45
  var sandbox_default = defineDynamic({ events: { "turn.started": () => segmentstream.config.sandbox ? tools : null } });
31
46
  export { sandbox_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segmentstream/agent",
3
- "version": "0.17.17",
3
+ "version": "0.17.19",
4
4
  "description": "Mount a SegmentStream workspace's agent on eve: the ontology as tools, acting as the member who writes, and Telegram through the workspace's connection.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "SegmentStream",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@chat-adapter/telegram": "4.41.0",
69
- "@segmentstream-cloud/ontology": "0.56.2",
69
+ "@segmentstream-cloud/ontology": "0.56.3",
70
70
  "@vercel/oidc": "^3.8.4",
71
71
  "ai": "^7.0.128",
72
72
  "csv-parse": "^7.0.3",