hiveagents-runtime 0.1.0-beta.1 → 0.1.0-beta.3

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 (62) hide show
  1. package/README.md +9 -5
  2. package/dist/adapter-kit.d.ts +4 -4
  3. package/dist/adapter-kit.js +2 -1
  4. package/dist/{agent-D0HS38G3.d.ts → agent-Bj5YPrO7.d.ts} +2 -2
  5. package/dist/{agent-OLSXNGNN.js → agent-D6OXR7UF.js} +9 -8
  6. package/dist/{agent-readiness-V36OJME4.js → agent-readiness-KSGNKTGK.js} +3 -3
  7. package/dist/chunk-2RK74GCA.js +2397 -0
  8. package/dist/chunk-2RK74GCA.js.map +1 -0
  9. package/dist/chunk-6FIXXWNM.js +1 -0
  10. package/dist/{chunk-ALLOMOUN.js → chunk-DAXPAV2L.js} +2 -2
  11. package/dist/{chunk-3B3JW4U3.js → chunk-DQEMIGKC.js} +5 -5
  12. package/dist/{chunk-SRJUZJKV.js → chunk-G6JV7WV6.js} +2 -2
  13. package/dist/{chunk-SRJUZJKV.js.map → chunk-G6JV7WV6.js.map} +1 -1
  14. package/dist/{chunk-TIZKGD4R.js → chunk-RH5A5U7G.js} +2 -2
  15. package/dist/{chunk-DBFXFWQZ.js → chunk-RX3XZENU.js} +93 -93
  16. package/dist/chunk-RX3XZENU.js.map +1 -0
  17. package/dist/{chunk-2RUEC63U.js → chunk-TWGEYWMO.js} +2 -2
  18. package/dist/{chunk-GJ4FTDBJ.js → chunk-UZPDDQVJ.js} +6 -6
  19. package/dist/{chunk-COKYQUTK.js → chunk-WVT5SEKC.js} +2 -2
  20. package/dist/cli.js +9 -8
  21. package/dist/cli.js.map +1 -1
  22. package/dist/{errors-DgehLwqI.d.ts → errors-BNHvvjn9.d.ts} +1 -1
  23. package/dist/{execution-halt-CW0Oi9s9.d.ts → execution-halt-B8G0fOKS.d.ts} +1 -1
  24. package/dist/{execution-types-UJ6gAF48.d.ts → execution-types-ClYYqPQP.d.ts} +1 -1
  25. package/dist/hosted-runtime.d.ts +3 -3
  26. package/dist/hosted-runtime.js +5 -4
  27. package/dist/hosted-runtime.js.map +1 -1
  28. package/dist/index.d.ts +25 -8
  29. package/dist/index.js +16 -9
  30. package/dist/index.js.map +1 -1
  31. package/dist/orchestration/dynamic.d.ts +3 -3
  32. package/dist/orchestration/dynamic.js +4 -4
  33. package/dist/orchestration/index.d.ts +7 -7
  34. package/dist/orchestration/index.js +19 -13
  35. package/dist/orchestration/index.js.map +1 -1
  36. package/dist/orchestration/log.d.ts +4 -4
  37. package/dist/{provider-XCpWjJ6a.d.ts → provider-DX5Mf0uq.d.ts} +1 -1
  38. package/dist/routing/index.d.ts +6 -6
  39. package/dist/routing/index.js +9 -8
  40. package/dist/routing/index.js.map +1 -1
  41. package/dist/routing/learning/index.d.ts +5 -5
  42. package/dist/routing/learning/index.js +9 -8
  43. package/dist/routing/learning/index.js.map +1 -1
  44. package/dist/{runtime-C6Cu2fvw.d.ts → runtime-BSjrnxeF.d.ts} +2 -2
  45. package/dist/{runtime-Y72XJFFO.js → runtime-OISPXS4I.js} +6 -5
  46. package/dist/runtime-OISPXS4I.js.map +1 -0
  47. package/dist/{types-BBRKjIc7.d.ts → types-CIqkKXix.d.ts} +1 -1
  48. package/docs/releases/0.1.0-beta.3.md +13 -0
  49. package/package.json +3 -3
  50. package/dist/chunk-C2DN6KL4.js +0 -853
  51. package/dist/chunk-C2DN6KL4.js.map +0 -1
  52. package/dist/chunk-DBFXFWQZ.js.map +0 -1
  53. package/docs/releases/0.1.0-beta.1.md +0 -13
  54. /package/dist/{agent-OLSXNGNN.js.map → agent-D6OXR7UF.js.map} +0 -0
  55. /package/dist/{agent-readiness-V36OJME4.js.map → agent-readiness-KSGNKTGK.js.map} +0 -0
  56. /package/dist/{runtime-Y72XJFFO.js.map → chunk-6FIXXWNM.js.map} +0 -0
  57. /package/dist/{chunk-ALLOMOUN.js.map → chunk-DAXPAV2L.js.map} +0 -0
  58. /package/dist/{chunk-3B3JW4U3.js.map → chunk-DQEMIGKC.js.map} +0 -0
  59. /package/dist/{chunk-TIZKGD4R.js.map → chunk-RH5A5U7G.js.map} +0 -0
  60. /package/dist/{chunk-2RUEC63U.js.map → chunk-TWGEYWMO.js.map} +0 -0
  61. /package/dist/{chunk-GJ4FTDBJ.js.map → chunk-UZPDDQVJ.js.map} +0 -0
  62. /package/dist/{chunk-COKYQUTK.js.map → chunk-WVT5SEKC.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { J as JsonValue } from '../types-DYex3p7_.js';
2
2
  import { U as Usage, d as AgentOptions } from '../types-DTFc1qO6.js';
3
- import { R as Runtime } from '../runtime-C6Cu2fvw.js';
4
- import { i as RuntimeErrorCode } from '../errors-DgehLwqI.js';
3
+ import { R as Runtime } from '../runtime-BSjrnxeF.js';
4
+ import { R as RuntimeErrorCode } from '../errors-BNHvvjn9.js';
5
5
  import '../capture-runtime-GP6NZ2ee.js';
6
6
  import '../types-BB7KqceP.js';
7
- import '../provider-XCpWjJ6a.js';
7
+ import '../provider-DX5Mf0uq.js';
8
8
 
9
9
  /**
10
10
  * Dynamic workflows: the public contract.
@@ -2428,7 +2428,7 @@ async function planWorkflow(input) {
2428
2428
  }
2429
2429
  };
2430
2430
  if (runtime) refuseProvider(runtime.resolveModel(options.model).provider);
2431
- const { Agent } = await import("../agent-OLSXNGNN.js");
2431
+ const { Agent } = await import("../agent-D6OXR7UF.js");
2432
2432
  let previous;
2433
2433
  for (let attempt = 1; attempt <= maxRepairs + 1; attempt += 1) {
2434
2434
  signal?.throwIfAborted();
@@ -2532,9 +2532,9 @@ function agentRunner(input) {
2532
2532
  return {
2533
2533
  async run(request) {
2534
2534
  const { options, turn } = prepare(request, fixed, policy, base, allowed, ceiling);
2535
- const { Agent } = await import("../agent-OLSXNGNN.js");
2536
- const { agentTransport } = await import("../agent-readiness-V36OJME4.js");
2537
- const activeRuntime = runtime ?? (await import("../runtime-Y72XJFFO.js")).defaultRuntime;
2535
+ const { Agent } = await import("../agent-D6OXR7UF.js");
2536
+ const { agentTransport } = await import("../agent-readiness-KSGNKTGK.js");
2537
+ const activeRuntime = runtime ?? (await import("../runtime-OISPXS4I.js")).defaultRuntime;
2538
2538
  let agent;
2539
2539
  try {
2540
2540
  agent = new Agent(options, activeRuntime);
@@ -4,20 +4,20 @@ export { g as WorkflowRearmAcknowledgement, h as WorkflowStep, i as WorkflowStep
4
4
  import { MemoryPersistencePort, MemoryQueryPort, SystemMemoryOptions, MemoryActor, MemoryStatus, ScopedMemoryRecord, MemoryRecordLookup, MemoryRevocation, MemoryQuery, MemoryListQuery, MemoryRecordView, MemoryPromotion, MemoryPromotionResult, MemoryRollback, MemoryGrantRequest, MemoryGrant, MemoryGrantRevocation, RunLogReader, MemoryLogSearch, MemoryLogSearchResult, MemoryScope, MeasureMemoryOptions, MemoryEmbedder, MemoryConditionTally, MemoryGateRefusal } from './memory.js';
5
5
  export { AgentDbMcpProfile, AgentDbMcpServerOptions, EmbeddingIdentity, MAX_LESSONS_CEILING, MAX_LESSONS_PER_RECALL, McpRecipeLaunch, McpServerRecipe, MemoryCaptureGate, MemoryCondition, MemoryConditionSummary, MemoryDocument, MemoryGateEvidence, MemoryGateVerdict, MemoryLogMatch, MemoryMeasurementReport, MemoryMeasurementTask, MemoryPorts, MemoryPortsProviderOptions, MemoryProvenance, MemoryRankingOptions, MemoryRecordState, MemoryRunContext, MemoryRunOutcome, MemoryScores, MemoryStoreError, MemoryStoreErrorCode, MemoryTaskOutcome, RankedMemory, RuvectorMcpProfile, RuvectorMcpServerOptions, agentDbMcpServer, claudeMcpConfig, evaluateMemoryGate, isMemoryStoreError, measureMemory, memoryProviderFromPorts, rankMemories, ruvectorMcpServer } from './memory.js';
6
6
  export { M as MEMORY_LABEL_MAX, a as MEMORY_OBSERVED_AT_MAX, i as isMemoryLabel, r as recallableMemory } from '../memory-items-BSTC0_R0.js';
7
- import { R as Runtime } from '../runtime-C6Cu2fvw.js';
7
+ import { R as Runtime } from '../runtime-BSjrnxeF.js';
8
8
  import { d as AgentOptions, a as Turn, q as AgentInput, p as MemoryOption, g as AgentMemoryProvider, h as AgentMemoryScope, U as Usage, A as AgentEvent, S as SessionRef, ar as ConstraintStore, as as TaskMaterial, at as ContextBudget, au as ConstraintExpectation, av as CompiledContext, aw as PinnedChannel } from '../types-DTFc1qO6.js';
9
9
  export { ax as ConstraintAuthority, ay as ConstraintAuthorityError, az as ConstraintConflictError, aA as ConstraintIntegrityError, aB as ConstraintRef, aC as ConstraintRevocation, aD as ConstraintStoreCreateOptions, aE as ConstraintStoreOptions, aF as ConstraintVersion, aG as ConstraintWrite, aH as ContextBudgetError, aI as ContextReference, aJ as HistoryEntry, aK as NothingPinnedError, aL as PinnedConstraint, aM as UnverifiedPinnedChannelError } from '../types-DTFc1qO6.js';
10
- import { A as Agent } from '../agent-D0HS38G3.js';
10
+ import { A as Agent } from '../agent-Bj5YPrO7.js';
11
11
  import { O as ObservedTaskBudget } from '../index-B86C6VAD.js';
12
12
  export { a as ObservedTaskError, b as ObservedTaskHandle, c as ObservedTaskHooks, d as ObservedTaskStarter, r as runObservedTask } from '../index-B86C6VAD.js';
13
- import { D as DecisionBinding, b as DecisionStore, m as DecisionRunOptions, a as DecisionRecord, c as DecisionLease, n as TraceStore, o as TraceIdentity, p as TraceRecorder, q as TraceEpisode, r as TraceLease, s as DecisionContext, t as DecisionEffectContext, M as ManagedEffectAssociation } from '../execution-types-UJ6gAF48.js';
14
- export { u as DecisionAuthorization, v as DecisionReceipt, w as TraceEntry, T as TraceEventInput, x as TraceTerminalStatus, y as TraceWriter } from '../execution-types-UJ6gAF48.js';
13
+ import { D as DecisionBinding, b as DecisionStore, m as DecisionRunOptions, a as DecisionRecord, c as DecisionLease, n as TraceStore, o as TraceIdentity, p as TraceRecorder, q as TraceEpisode, r as TraceLease, s as DecisionContext, t as DecisionEffectContext, M as ManagedEffectAssociation } from '../execution-types-ClYYqPQP.js';
14
+ export { u as DecisionAuthorization, v as DecisionReceipt, w as TraceEntry, T as TraceEventInput, x as TraceTerminalStatus, y as TraceWriter } from '../execution-types-ClYYqPQP.js';
15
15
  import '../types-BB7KqceP.js';
16
16
  import '../store-types-2YdceOMy.js';
17
17
  import '../capture-runtime-GP6NZ2ee.js';
18
- import '../provider-XCpWjJ6a.js';
19
- import '../errors-DgehLwqI.js';
20
- import '../execution-halt-CW0Oi9s9.js';
18
+ import '../provider-DX5Mf0uq.js';
19
+ import '../errors-BNHvvjn9.js';
20
+ import '../execution-halt-B8G0fOKS.js';
21
21
 
22
22
  /** Executes finite dependency waves, holding a single durable run lease through all active work. */
23
23
  declare class WorkflowRunner {
@@ -54,7 +54,7 @@ import {
54
54
  deliverPinned,
55
55
  name,
56
56
  requirePinned
57
- } from "../chunk-ALLOMOUN.js";
57
+ } from "../chunk-DAXPAV2L.js";
58
58
  import {
59
59
  MEMORY_LABEL_MAX,
60
60
  MEMORY_OBSERVED_AT_MAX,
@@ -66,7 +66,7 @@ import {
66
66
  busyTimeout,
67
67
  integer
68
68
  } from "../chunk-RXU2Q2HF.js";
69
- import "../chunk-2RUEC63U.js";
69
+ import "../chunk-TWGEYWMO.js";
70
70
  import {
71
71
  MAX_TRACE_ENTRIES,
72
72
  identifier as identifier2,
@@ -88,7 +88,7 @@ import {
88
88
  jsonClone,
89
89
  ownObject
90
90
  } from "../chunk-EEUYQFCP.js";
91
- import "../chunk-DBFXFWQZ.js";
91
+ import "../chunk-RX3XZENU.js";
92
92
  import "../chunk-7LDQKJKI.js";
93
93
  import {
94
94
  isExecutionHalted
@@ -1324,13 +1324,13 @@ var RECALL_POOL = 512;
1324
1324
  var UTC = "oar_memory_utc";
1325
1325
  var RECALL = `
1326
1326
  SELECT r.* FROM memory_readable r
1327
- WHERE r.tenant = ?1 AND r.namespace = ?2 AND r.subject = ?3
1327
+ WHERE r.tenant = $tenant AND r.namespace = $namespace AND r.subject = $subject
1328
1328
  AND r.promoted_at IS NOT NULL AND r.invalidated_at IS NULL
1329
- AND (r.valid_until IS NULL OR r.valid_until >= ?5)
1330
- AND EXISTS (SELECT 1 FROM memory_systems s WHERE s.system_id = ?4 AND s.enabled = 1)
1331
- AND (r.tenant = ?4 OR EXISTS (
1329
+ AND (r.valid_until IS NULL OR r.valid_until >= $now)
1330
+ AND EXISTS (SELECT 1 FROM memory_systems s WHERE s.system_id = $reader AND s.enabled = 1)
1331
+ AND (r.tenant = $reader OR EXISTS (
1332
1332
  SELECT 1 FROM memory_usable_grants g
1333
- WHERE g.owner = r.tenant AND g.grantee = ?4 AND g.namespace = r.namespace AND g.subject = r.subject))
1333
+ WHERE g.owner = r.tenant AND g.grantee = $reader AND g.namespace = r.namespace AND g.subject = r.subject))
1334
1334
  ORDER BY ${UTC}(r.promoted_at) DESC, r.id
1335
1335
  LIMIT ${RECALL_POOL}`;
1336
1336
  var FIND = "SELECT * FROM memory_records WHERE tenant = ? AND namespace = ? AND subject = ? AND id = ?";
@@ -1516,7 +1516,13 @@ var SqliteSystemMemory = class {
1516
1516
  input.signal?.throwIfAborted();
1517
1517
  const { tenant, namespace, subject } = input.scope;
1518
1518
  const now = this.#now();
1519
- const rows = this.#read((db) => db.prepare(RECALL).all(tenant, namespace, subject, this.systemId, now));
1519
+ const rows = this.#read((db) => db.prepare(RECALL).all({
1520
+ $tenant: tenant,
1521
+ $namespace: namespace,
1522
+ $subject: subject,
1523
+ $reader: this.systemId,
1524
+ $now: now
1525
+ }));
1520
1526
  const limit2 = Math.min(input.limit, this.#maxLessons);
1521
1527
  if (rows.length === 0 || limit2 === 0) return [];
1522
1528
  if (!input.embedding) {
@@ -1655,11 +1661,11 @@ var SqliteSystemMemory = class {
1655
1661
  async listGrants() {
1656
1662
  const rows = this.#read((db) => db.prepare(`
1657
1663
  SELECT * FROM (
1658
- SELECT * FROM memory_grants WHERE owner = ?1
1664
+ SELECT * FROM memory_grants WHERE owner = $reader
1659
1665
  UNION ALL
1660
- SELECT * FROM memory_usable_grants WHERE grantee = ?1)
1666
+ SELECT * FROM memory_usable_grants WHERE grantee = $reader)
1661
1667
  ORDER BY ${UTC}(granted_at), grant_id
1662
- `).all(this.systemId));
1668
+ `).all({ $reader: this.systemId }));
1663
1669
  return rows.map(toGrant);
1664
1670
  }
1665
1671
  /**
@@ -3384,7 +3390,7 @@ ${instructions}` : DISTILLER_INSTRUCTIONS,
3384
3390
  return async (episodes, { signal, maxCandidates }) => {
3385
3391
  const { prompt, labels } = distillerPrompt(episodes, maxCandidates, { maxEpisodeChars, maxPromptChars });
3386
3392
  if (labels.size === 0) return [];
3387
- const { Agent } = await import("../agent-OLSXNGNN.js");
3393
+ const { Agent } = await import("../agent-D6OXR7UF.js");
3388
3394
  const distiller = runtime ? new Agent(options, runtime) : new Agent(options);
3389
3395
  try {
3390
3396
  refuseProvider(distiller.model.provider);