create-open-autonomy 2.3.6 → 2.3.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-open-autonomy",
3
- "version": "2.3.6",
3
+ "version": "2.3.8",
4
4
  "description": "The default Open Autonomy starter kit: a complete repository that runs its own Hermes agent against the platform, with the SDK wired in. `bun create open-autonomy <dir>` scaffolds one.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "check": "bunx tsc --noEmit"
29
29
  },
30
30
  "dependencies": {
31
- "@open-autonomy/sdk": "2.3.1"
31
+ "@open-autonomy/sdk": "2.3.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/bun": "^1.3.10",
package/src/kit.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
10
10
  import { dirname, join, relative, resolve } from 'node:path';
11
11
 
12
- export const KIT = { name: 'hermes', version: '2.3.6' } as const;
12
+ export const KIT = { name: 'hermes', version: '2.3.8' } as const;
13
13
  export const KIT_FILE = '.open-autonomy/kit.json';
14
14
  const TEMPLATE = resolve(import.meta.dir, '..', 'template');
15
15
 
@@ -19,10 +19,15 @@ state_file: reporter-state.json
19
19
  # holds whatever a key was minted with. Empty: any model the gateway serves (`GET /v1/catalog` lists them).
20
20
  models: [zai/glm-5.3-flash]
21
21
 
22
- # The most the project's funds may spend on the platform's model rail in a day (UTC): a bound the platform holds at every
23
- # call, so a runaway stops at the owner's number. 0: no bound of the project's own beyond the platform's global rail.
22
+ # The limits the project's funds run under on the platform's model rail, each over its own rolling window, all held at
23
+ # once, the call that would cross one refused with its name: the money (usd_cents), the pace (calls) or the volume
24
+ # (tokens, in and out), for everything or for one model (`model:`). Windows: 1m…60m, 1h…24h, 1d…31d. The kit's
25
+ # defaults: five dollars a day, sixty a month, and a pace no runaway loop keeps up.
24
26
  spend:
25
- daily_usd_cents: 500
27
+ limits:
28
+ - { window: 1d, usd_cents: 500 }
29
+ - { window: 30d, usd_cents: 6000 }
30
+ - { window: 1m, calls: 60 }
26
31
 
27
32
  # The rails the agent may spend through beyond model calls, and the owner's bounds on each. Off unless a
28
33
  # bound is set. Every rail leaves a record on the public audit trail naming itself.
@@ -0,0 +1,25 @@
1
+ """Open Autonomy's Hermes model wire."""
2
+
3
+ from agent.portal_tags import get_conversation_context
4
+ from providers import register_provider
5
+ from providers.base import ProviderProfile
6
+
7
+
8
+ class OpenAutonomyProfile(ProviderProfile):
9
+ """Name the active Hermes session on every request to the platform."""
10
+
11
+ def build_extra_body(
12
+ self, *, session_id: str | None = None, **context
13
+ ) -> dict[str, str]:
14
+ active = session_id or get_conversation_context()
15
+ return {"session_id": active} if active else {}
16
+
17
+
18
+ register_provider(
19
+ OpenAutonomyProfile(
20
+ name="custom",
21
+ display_name="Open Autonomy",
22
+ description="The project's metered Open Autonomy model rail",
23
+ env_vars=("OPEN_AUTONOMY_BASE_URL", "OPEN_AUTONOMY_KEY"),
24
+ )
25
+ )
@@ -0,0 +1,5 @@
1
+ name: open-autonomy
2
+ kind: model-provider
3
+ version: 1.0.0
4
+ description: Names the active Hermes session on Open Autonomy model calls.
5
+ author: Open Autonomy