@lobu/runtime-device 21.1.0 → 21.2.1

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 (57) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +12 -12
  3. package/npm-shrinkwrap.json +51 -51
  4. package/package.json +1 -1
  5. package/vendor/cli/dist/commands/_lib/apply/client.js +4 -1
  6. package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +1 -1
  7. package/vendor/cli/dist/commands/_lib/apply/diff.js +0 -1
  8. package/vendor/cli/dist/commands/_lib/apply/map-config.js +0 -5
  9. package/vendor/cli/dist/commands/_lib/init-from-org/bootstrap.js +2 -7
  10. package/vendor/cli/dist/commands/chat.d.ts +0 -1
  11. package/vendor/cli/dist/commands/chat.js +3 -65
  12. package/vendor/cli/dist/commands/memory/_lib/errors.d.ts +8 -0
  13. package/vendor/cli/dist/commands/memory/_lib/errors.js +12 -0
  14. package/vendor/cli/dist/commands/memory/_lib/mcp.js +3 -3
  15. package/vendor/cli/dist/commands/memory/_lib/seed-cmd.d.ts +8 -0
  16. package/vendor/cli/dist/commands/memory/_lib/seed-cmd.js +11 -3
  17. package/vendor/cli/dist/config/define.d.ts +0 -5
  18. package/vendor/cli/dist/config/define.js +27 -0
  19. package/vendor/cli/dist/connectors/README.md +6 -3
  20. package/vendor/cli/dist/connectors/github.ts +0 -6
  21. package/vendor/cli/dist/connectors/google_calendar.ts +0 -4
  22. package/vendor/cli/dist/connectors/google_drive.ts +0 -2
  23. package/vendor/cli/dist/connectors/google_gmail.ts +0 -6
  24. package/vendor/cli/dist/connectors/market_quotes.ts +0 -1
  25. package/vendor/cli/dist/connectors/microsoft_outlook.ts +0 -2
  26. package/vendor/cli/dist/connectors/postgres.ts +68 -3
  27. package/vendor/cli/dist/connectors/whatsapp_web.ts +2 -8
  28. package/vendor/cli/dist/connectors/x.ts +3 -9
  29. package/vendor/cli/dist/connectors/youtube.ts +0 -5
  30. package/vendor/cli/dist/index.js +0 -1
  31. package/vendor/cli/dist/runtime-components.json +4 -4
  32. package/vendor/cli/dist/templates/README.md.tmpl +1 -1
  33. package/vendor/cli/package.json +1 -1
  34. package/vendor/connector-sdk/dist/connector-runtime.d.ts +1 -1
  35. package/vendor/connector-sdk/dist/connector-runtime.js +1 -1
  36. package/vendor/connector-sdk/dist/connector-types.d.ts +14 -2
  37. package/vendor/connector-sdk/dist/define-connector.d.ts +3 -5
  38. package/vendor/connector-sdk/dist/define-connector.js +1 -1
  39. package/vendor/connector-sdk/dist/device-manifest.d.ts +0 -1
  40. package/vendor/connector-sdk/dist/extension-network.js +1 -2
  41. package/vendor/connector-sdk/package.json +1 -1
  42. package/vendor/connector-worker/dist/daemon/generated/headless-device-connector-manifests.json +1 -1
  43. package/vendor/connector-worker/dist/executor/interface.d.ts +2 -1
  44. package/vendor/connector-worker/dist/executor/isolate.js +4 -1
  45. package/vendor/connector-worker/package.json +1 -1
  46. package/vendor/core/dist/contracts/agent-settings.d.ts +0 -1
  47. package/vendor/core/dist/contracts/agent-settings.js +0 -1
  48. package/vendor/core/dist/contracts/tools/manage-classifiers.d.ts +6 -6
  49. package/vendor/core/dist/contracts/tools/manage-classifiers.js +4 -6
  50. package/vendor/core/dist/contracts/tools/manage-connections.d.ts +0 -1
  51. package/vendor/core/dist/contracts/tools/manage-connections.js +3 -4
  52. package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -2
  53. package/vendor/core/dist/contracts/tools/manage-entity.js +4 -2
  54. package/vendor/core/dist/logger.js +13 -2
  55. package/vendor/core/dist/worker/wire.d.ts +1 -6
  56. package/vendor/core/dist/worker/wire.js +1 -1
  57. package/vendor/core/package.json +1 -1
@@ -39,6 +39,7 @@ function buildDefinition(spec) {
39
39
  description: spec.description,
40
40
  authSchema: spec.authSchema,
41
41
  optionsSchema: spec.optionsSchema,
42
+ queryCapabilities: spec.queryCapabilities,
42
43
  faviconDomain: spec.faviconDomain,
43
44
  mcpConfig: spec.mcpConfig,
44
45
  openapiConfig: spec.openapiConfig,
@@ -73,7 +74,6 @@ function buildDefinition(spec) {
73
74
  key,
74
75
  name: action.name,
75
76
  description: action.description,
76
- requiresApproval: action.requiresApproval ?? false,
77
77
  // `kind` and `requiredScopes` are semantic policy inputs (read/write
78
78
  // classification and the per-action scope gate). Dropping them here
79
79
  // would silently publish scoped/observational actions with neither,
@@ -48,7 +48,6 @@ export interface DeviceActionDefinition extends DeviceManifestSchema {
48
48
  key: string;
49
49
  name: string;
50
50
  description?: string;
51
- requiresApproval?: boolean;
52
51
  kind?: 'read' | 'write';
53
52
  annotations?: DeviceManifestSchema;
54
53
  inputSchema?: DeviceManifestSchema;
@@ -37,7 +37,7 @@ export async function extensionNetworkSync(opts) {
37
37
  // completes before our start() listener attaches and we miss them.
38
38
  const blankNavObs = await opts.dispatcher.dispatch('navigate', {
39
39
  url: 'about:blank',
40
- open_in_new_tab: true,
40
+ new_tab: true,
41
41
  wait_for_load: true,
42
42
  ...allowedOriginsInput,
43
43
  });
@@ -70,7 +70,6 @@ export async function extensionNetworkSync(opts) {
70
70
  const navObs = await opts.dispatcher.dispatch('navigate', {
71
71
  tab_id: tabId,
72
72
  url: opts.url,
73
- open_in_new_tab: false,
74
73
  wait_for_load: true,
75
74
  ...allowedOriginsInput,
76
75
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/connector-sdk",
3
- "version": "21.1.0",
3
+ "version": "21.2.1",
4
4
  "description": "Lobu memory SDK — build pluggable connectors for Lobu memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +1 @@
1
- [{ "actions_schema": { "run": { "annotations": { "destructiveHint": true, "idempotentHint": false, "openWorldHint": true }, "description": "Run a shell command on the device and return stdout, stderr, and exit_code. Pipes, redirects, and && chains work. A Mac endpoint executes through the signed-in user's login shell (`zsh -l -c`), so host-installed CLIs (gh, git, bun, brew, …) resolve via PATH; a headless endpoint executes through `bash --noprofile --norc -c`, which loads no profile or rc file, so prefer absolute paths over aliases there. Prefer one focused command per call over a long script. Destructive/open-world by nature — gate with approval in production.", "inputSchema": { "additionalProperties": false, "properties": { "command": { "description": "Shell command to execute. Keep commands short and targeted.", "maxLength": 20000, "minLength": 1, "type": "string" }, "cwd": { "description": "Absolute working directory. Defaults to the user's home directory. Must exist.", "type": "string" }, "stdin": { "description": "Optional string piped to the command's stdin.", "maxLength": 1000000, "type": "string" }, "timeout_ms": { "default": 60000, "description": "Wall-clock budget in milliseconds. On timeout the process gets SIGTERM (3s grace) then SIGKILL. Default 60000, max 150000.", "maximum": 150000, "minimum": 100, "type": "integer" } }, "required": ["command"], "type": "object" }, "key": "run", "kind": "write", "name": "Run command", "outputSchema": { "additionalProperties": true, "properties": { "duration_ms": { "type": "integer" }, "exit_code": { "type": "integer" }, "stderr": { "type": "string" }, "stdout": { "type": "string" }, "success": { "type": "boolean" }, "timed_out": { "type": "boolean" } }, "type": "object" }, "requiresApproval": true } }, "auth_schema": { "methods": [{ "type": "none" }] }, "description": "Run shell commands on this device through Lobu. Returns structured stdout/stderr/exit_code. Same trust tier as computer use — commands see the device's real filesystem and PATH. On a Mac they run as the signed-in user in that user's environment; on a headless host they run in a minimal environment with no profile and no inherited secrets. Gate with approval.", "feeds_schema": {}, "key": "os.shell", "name": "Shell", "required_capability": "os.shell", "runtime": { "platforms": ["headless", "macos"] }, "version": "0.3.0" }]
1
+ [{ "actions_schema": { "run": { "annotations": { "destructiveHint": true, "idempotentHint": false, "openWorldHint": true }, "description": "Run a shell command on the device and return stdout, stderr, and exit_code. Pipes, redirects, and && chains work. A Mac endpoint executes through the signed-in user's login shell (`zsh -l -c`), so host-installed CLIs (gh, git, bun, brew, …) resolve via PATH; a headless endpoint executes through `bash --noprofile --norc -c`, which loads no profile or rc file, so prefer absolute paths over aliases there. Prefer one focused command per call over a long script. Destructive/open-world by nature — gate with approval in production.", "inputSchema": { "additionalProperties": false, "properties": { "command": { "description": "Shell command to execute. Keep commands short and targeted.", "maxLength": 20000, "minLength": 1, "type": "string" }, "cwd": { "description": "Absolute working directory. Defaults to the user's home directory. Must exist.", "type": "string" }, "stdin": { "description": "Optional string piped to the command's stdin.", "maxLength": 1000000, "type": "string" }, "timeout_ms": { "default": 60000, "description": "Wall-clock budget in milliseconds. On timeout the process gets SIGTERM (3s grace) then SIGKILL. Default 60000, max 150000.", "maximum": 150000, "minimum": 100, "type": "integer" } }, "required": ["command"], "type": "object" }, "key": "run", "kind": "write", "name": "Run command", "outputSchema": { "additionalProperties": true, "properties": { "duration_ms": { "type": "integer" }, "exit_code": { "type": "integer" }, "stderr": { "type": "string" }, "stdout": { "type": "string" }, "success": { "type": "boolean" }, "timed_out": { "type": "boolean" } }, "type": "object" } } }, "auth_schema": { "methods": [{ "type": "none" }] }, "description": "Run shell commands on this device through Lobu. Returns structured stdout/stderr/exit_code. Same trust tier as computer use — commands see the device's real filesystem and PATH. On a Mac they run as the signed-in user in that user's environment; on a headless host they run in a minimal environment with no profile and no inherited secrets. Gate with approval.", "feeds_schema": {}, "key": "os.shell", "name": "Shell", "required_capability": "os.shell", "runtime": { "platforms": ["headless", "macos"] }, "version": "0.3.1" }]
@@ -1,5 +1,5 @@
1
1
  import type { AgentTurnEvent, AgentTurnInput, AgentTurnOutput, AgentTurnSteer, RuntimeExecRequest, RuntimeExecResult } from '../agent-turn/types.js';
2
- import type { AuthResult, ConnectorWebhookSchema, EventEnvelope, SyncCredentials, WebhookRegistration } from '@lobu/connector-sdk';
2
+ import type { AuthResult, ConnectorWebhookSchema, EventEnvelope, QueryContext, SyncCredentials, WebhookRegistration } from '@lobu/connector-sdk';
3
3
  import type { ConnectorHttpRequest, ConnectorHttpResponse } from '@lobu/core/contracts/worker/protocol';
4
4
  /**
5
5
  * Executor mode discriminator. The executor speaks the same V1 SDK shapes
@@ -36,6 +36,7 @@ export type ExecutorJob = {
36
36
  } | {
37
37
  mode: 'query';
38
38
  query: string;
39
+ exactMatch?: QueryContext['exactMatch'];
39
40
  config: Record<string, unknown>;
40
41
  credentials: SyncCredentials | null;
41
42
  sessionState: Record<string, unknown> | null;
@@ -192,9 +192,12 @@ const GUEST_RUNNER = String.raw `
192
192
  }
193
193
 
194
194
  if (job.mode === 'query') {
195
+ if (job.exactMatch && !(instance.definition.queryCapabilities && instance.definition.queryCapabilities.exactMatch === true)) {
196
+ throw Object.assign(new Error('Connector does not support exact-match queries'), { status: 400 });
197
+ }
195
198
  var queryResult = await instance.query({
196
199
  query: job.query, config: mergedConfig, credentials: job.credentials, sessionState: job.sessionState,
197
- limit: job.limit, offset: job.offset, sort: job.sort
200
+ limit: job.limit, offset: job.offset, sort: job.sort, exactMatch: job.exactMatch
198
201
  });
199
202
  return { mode: 'query', rows: (queryResult && queryResult.rows) || [], columns: queryResult && queryResult.columns, total: queryResult && queryResult.total };
200
203
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/connector-worker",
3
- "version": "21.1.0",
3
+ "version": "21.2.1",
4
4
  "description": "Self-hosted worker for Lobu memory — connectors and embedding generation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -168,7 +168,6 @@ export declare const AgentSettingsStoredSchema: import("@sinclair/typebox").TObj
168
168
  sandboxId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
169
169
  verboseLogging: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
170
170
  showToolCalls: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
171
- preApprovedTools: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
172
171
  updatedAt: import("@sinclair/typebox").TNumber;
173
172
  }>;
174
173
  export type AgentSettingsStored = Static<typeof AgentSettingsStoredSchema>;
@@ -136,7 +136,6 @@ exports.AgentSettingsStoredSchema = typebox_1.Type.Object({
136
136
  sandboxId: typebox_1.Type.Optional(typebox_1.Type.String()),
137
137
  verboseLogging: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
138
138
  showToolCalls: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
139
- preApprovedTools: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
140
139
  updatedAt: typebox_1.Type.Number(),
141
140
  });
142
141
  //# sourceMappingURL=agent-settings.js.map
@@ -9,7 +9,7 @@ export declare const CreateClassifierAction: import("@sinclair/typebox").TObject
9
9
  attribute_key: import("@sinclair/typebox").TString;
10
10
  attribute_values: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
11
11
  description: import("@sinclair/typebox").TString;
12
- examples: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
12
+ examples: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
13
13
  }>>;
14
14
  created_by: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
15
15
  }>;
@@ -27,11 +27,11 @@ export declare const ClassifyContentAction: import("@sinclair/typebox").TObject<
27
27
  classifier_slug: import("@sinclair/typebox").TString;
28
28
  content_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
29
29
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
30
- confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
30
+ confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
31
31
  classifications: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
32
32
  content_id: import("@sinclair/typebox").TNumber;
33
33
  value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
34
- confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
34
+ confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
35
35
  reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
36
36
  }>>>;
37
37
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"llm">, import("@sinclair/typebox").TLiteral<"user">]>>;
@@ -46,7 +46,7 @@ export declare const ManageClassifiersSchema: import("@sinclair/typebox").TUnion
46
46
  attribute_key: import("@sinclair/typebox").TString;
47
47
  attribute_values: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
48
48
  description: import("@sinclair/typebox").TString;
49
- examples: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
49
+ examples: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
50
50
  }>>;
51
51
  created_by: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
52
52
  }>, import("@sinclair/typebox").TObject<{
@@ -61,11 +61,11 @@ export declare const ManageClassifiersSchema: import("@sinclair/typebox").TUnion
61
61
  classifier_slug: import("@sinclair/typebox").TString;
62
62
  content_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
63
63
  value: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
64
- confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
64
+ confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
65
65
  classifications: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
66
66
  content_id: import("@sinclair/typebox").TNumber;
67
67
  value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
68
- confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
68
+ confidence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
69
69
  reasoning: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
70
70
  }>>>;
71
71
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"llm">, import("@sinclair/typebox").TLiteral<"user">]>>;
@@ -18,10 +18,8 @@ const ClassifierId = typebox_1.Type.Number({
18
18
  const ClassifierSlug = typebox_1.Type.String({
19
19
  description: '[classify] Classifier slug (e.g., "sentiment", "bug-severity")',
20
20
  });
21
- const Confidence = typebox_1.Type.Number({
22
- minimum: 0,
23
- maximum: 1,
24
- description: "[classify] Confidence in the value, 0..1 (default: 1)",
21
+ const Confidence = typebox_1.Type.Union([typebox_1.Type.Number({ minimum: 0, maximum: 1 }), typebox_1.Type.Null()], {
22
+ description: "[classify] Confidence in the value, 0..1. Omitted or null: unscored for an 'llm' label, 1 for a 'user' label",
25
23
  });
26
24
  exports.CreateClassifierAction = typebox_1.Type.Object({
27
25
  action: typebox_1.Type.Literal("create", {
@@ -38,7 +36,7 @@ exports.CreateClassifierAction = typebox_1.Type.Object({
38
36
  }),
39
37
  attribute_values: typebox_1.Type.Record(typebox_1.Type.String({ minLength: 1 }), typebox_1.Type.Object({
40
38
  description: typebox_1.Type.String(),
41
- examples: typebox_1.Type.Array(typebox_1.Type.String()),
39
+ examples: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
42
40
  }, { additionalProperties: false }), {
43
41
  minProperties: 1,
44
42
  description: "[create] Map of attribute values to descriptions and examples.",
@@ -85,7 +83,7 @@ exports.ClassifyContentAction = typebox_1.Type.Object({
85
83
  description: "[classify] Array of classifications to update (batch mode)",
86
84
  })),
87
85
  source: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Literal("llm"), typebox_1.Type.Literal("user")], {
88
- description: '[classify] Classification source: "llm" (AI-generated, e.g. an Automation) or "user" (manual). Defaults to "user". Only "user" labels are manual, and they win over "llm" labels at read time.',
86
+ description: '[classify] Classification source: "llm" (AI-generated) or "user" (manual). Defaults to "user" for a person and "llm" for an Automation or agent, which cannot write "user". Only "user" labels are manual, and they win over "llm" labels at read time.',
89
87
  })),
90
88
  reasoning: typebox_1.Type.Optional(typebox_1.Type.String({
91
89
  description: "[classify] Reasoning/justification for the classification(s)",
@@ -516,7 +516,6 @@ export declare const ManageConnectionsResultSchema: import("@sinclair/typebox").
516
516
  version_exists: import("@sinclair/typebox").TBoolean;
517
517
  actions: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
518
518
  kind: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read">, import("@sinclair/typebox").TLiteral<"write">]>;
519
- requires_approval: import("@sinclair/typebox").TBoolean;
520
519
  required_scopes: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
521
520
  }>>;
522
521
  feed_keys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
@@ -414,7 +414,7 @@ exports.UpdateConnectorDefaultConfigAction = typebox_1.Type.Object({
414
414
  }),
415
415
  connector_key: typebox_1.Type.String({ description: "Connector key" }),
416
416
  default_connection_config: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Any(), {
417
- description: "Default connection config (action_modes, etc.)",
417
+ description: "Default connection config",
418
418
  }),
419
419
  });
420
420
  const CHANNEL_ID_DESC = "Platform channel id (may be platform-prefixed, e.g. 'slack:C…').";
@@ -694,12 +694,11 @@ exports.ManageConnectionsResultSchema = typebox_1.Type.Union([
694
694
  installed: typebox_1.Type.Boolean(),
695
695
  active_version: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]),
696
696
  version_exists: typebox_1.Type.Boolean(),
697
- // Extracted per-action semantic-policy summary (kind / requires_approval /
698
- // required_scopes), keyed by action key, so an author can confirm those
697
+ // Extracted per-action semantic-policy summary (kind / required_scopes),
698
+ // keyed by action key, so an author can confirm those
699
699
  // fields survived extraction before persisting. Plus the extracted feed keys.
700
700
  actions: typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Object({
701
701
  kind: typebox_1.Type.Union([typebox_1.Type.Literal("read"), typebox_1.Type.Literal("write")]),
702
- requires_approval: typebox_1.Type.Boolean(),
703
702
  required_scopes: typebox_1.Type.Array(typebox_1.Type.String()),
704
703
  })),
705
704
  feed_keys: typebox_1.Type.Array(typebox_1.Type.String()),
@@ -51,7 +51,7 @@ export declare const ListEntitiesAction: import("@sinclair/typebox").TObject<{
51
51
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
52
52
  action: import("@sinclair/typebox").TLiteral<"list">;
53
53
  entity_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
54
- parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
54
+ parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
55
55
  search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
56
56
  category: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
57
57
  main_market: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -191,7 +191,7 @@ export declare const ManageEntitySchema: import("@sinclair/typebox").TUnion<[imp
191
191
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
192
192
  action: import("@sinclair/typebox").TLiteral<"list">;
193
193
  entity_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
194
- parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
194
+ parent_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
195
195
  search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
196
196
  category: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
197
197
  main_market: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -35,7 +35,7 @@ const EntityFields = {
35
35
  pattern: "^[a-z0-9]+(-[a-z0-9]+)*$",
36
36
  }),
37
37
  parent_id: typebox_1.Type.Number({
38
- description: "[create/update/list] Parent entity ID (for hierarchical entities). On list, only that parent's children.",
38
+ description: "[create/update] Parent entity ID (for hierarchical entities).",
39
39
  }),
40
40
  domain: typebox_1.Type.String({
41
41
  description: "[create/update] Primary domain (e.g., spotify.com)",
@@ -159,7 +159,9 @@ exports.ListEntitiesAction = typebox_1.Type.Object({
159
159
  description: "Paginated entity list with filters.",
160
160
  }),
161
161
  entity_type: typebox_1.Type.Optional(EntityType),
162
- parent_id: typebox_1.Type.Optional(EntityFields.parent_id),
162
+ parent_id: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Number(), typebox_1.Type.Null()], {
163
+ description: "[list] Parent filter: omit for all entities, null for roots, or an ID for that parent's children.",
164
+ })),
163
165
  search: typebox_1.Type.Optional(typebox_1.Type.String({ description: "[list] Search by name" })),
164
166
  category: typebox_1.Type.Optional(EntityFields.category),
165
167
  main_market: typebox_1.Type.Optional(EntityFields.main_market),
@@ -51,7 +51,7 @@ function createConsoleLogger(serviceName) {
51
51
  };
52
52
  const currentLevel = levels[level] ?? 2;
53
53
  const formatMessage = (lvl, message, ...args) => {
54
- const timestamp = new Date().toISOString().replace("T", " ").slice(0, 19);
54
+ const timestamp = new Date().toISOString();
55
55
  let msgStr;
56
56
  // Handle pino-style format: logger.info({ key: value }, "message")
57
57
  if (typeof message === "object" &&
@@ -73,11 +73,22 @@ function createConsoleLogger(serviceName) {
73
73
  else {
74
74
  msgStr = String(message);
75
75
  }
76
+ if (USE_JSON_FORMAT) {
77
+ return safeStringify({
78
+ timestamp,
79
+ level: lvl,
80
+ service: serviceName,
81
+ message: msgStr,
82
+ ...(args.length > 0
83
+ ? { data: args.length === 1 ? args[0] : args }
84
+ : {}),
85
+ });
86
+ }
76
87
  // Append remaining args
77
88
  if (args.length > 0) {
78
89
  msgStr += ` ${safeStringify(args.length === 1 ? args[0] : args)}`;
79
90
  }
80
- return `[${timestamp}] [${lvl}] [${serviceName}] ${msgStr}`;
91
+ return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${msgStr}`;
81
92
  };
82
93
  return {
83
94
  error: (message, ...args) => {
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Before this lived in core, the worker had its own `MessagePayload`
10
10
  * declaration that was a structural subset of the gateway's (missing
11
- * `organizationId`, `networkConfig`, `nixConfig`, `preApprovedTools`). At
11
+ * `organizationId`, `networkConfig`, `nixConfig`). At
12
12
  * runtime the worker's zod schema was patched with
13
13
  * `.passthrough()` so the extra fields survived parsing, but the static type
14
14
  * silently lied. Hoisting closes the gap.
@@ -108,11 +108,6 @@ export interface MessagePayload {
108
108
  guardrailsInline?: AgentInlineGuardrail[];
109
109
  /** Nix environment configuration for the agent workspace. */
110
110
  nixConfig?: NixConfig;
111
- /**
112
- * MCP tool grant patterns the operator has pre-approved.
113
- * Synced to the grant store at deployment time to bypass the approval card.
114
- */
115
- preApprovedTools?: string[];
116
111
  /**
117
112
  * Digest of the org's connector-contributed agent tooling (which connections
118
113
  * contribute, which installation each points at, and what it declares),
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * Before this lived in core, the worker had its own `MessagePayload`
11
11
  * declaration that was a structural subset of the gateway's (missing
12
- * `organizationId`, `networkConfig`, `nixConfig`, `preApprovedTools`). At
12
+ * `organizationId`, `networkConfig`, `nixConfig`). At
13
13
  * runtime the worker's zod schema was patched with
14
14
  * `.passthrough()` so the extra fields survived parsing, but the static type
15
15
  * silently lied. Hoisting closes the gap.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/core",
3
- "version": "21.1.0",
3
+ "version": "21.2.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core types and utilities for Lobu agent platform",
6
6
  "repository": {