@jungjaehoon/mama-os 0.32.0 → 0.32.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.
- package/dist/agent/agent-loop.d.ts +5 -1
- package/dist/agent/agent-loop.d.ts.map +1 -1
- package/dist/agent/agent-loop.js +62 -49
- package/dist/agent/agent-loop.js.map +1 -1
- package/dist/agent/code-act/host-bridge.d.ts.map +1 -1
- package/dist/agent/code-act/host-bridge.js +35 -74
- package/dist/agent/code-act/host-bridge.js.map +1 -1
- package/dist/agent/gateway-tool-catalog.d.ts +14 -0
- package/dist/agent/gateway-tool-catalog.d.ts.map +1 -0
- package/dist/agent/gateway-tool-catalog.js +41 -0
- package/dist/agent/gateway-tool-catalog.js.map +1 -0
- package/dist/agent/gateway-tool-executor.d.ts +12 -1
- package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
- package/dist/agent/gateway-tool-executor.js +149 -15
- package/dist/agent/gateway-tool-executor.js.map +1 -1
- package/dist/agent/gateway-tools.md +5 -7
- package/dist/agent/tool-registry.d.ts +6 -4
- package/dist/agent/tool-registry.d.ts.map +1 -1
- package/dist/agent/tool-registry.js +62 -30
- package/dist/agent/tool-registry.js.map +1 -1
- package/dist/agent/types.d.ts +18 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +7 -16
- package/dist/api/index.js.map +1 -1
- package/dist/cli/commands/connector.d.ts +6 -1
- package/dist/cli/commands/connector.d.ts.map +1 -1
- package/dist/cli/commands/connector.js +61 -45
- package/dist/cli/commands/connector.js.map +1 -1
- package/dist/cli/commands/start.d.ts +11 -8
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +155 -88
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/config/types.d.ts.map +1 -1
- package/dist/cli/config/types.js +0 -4
- package/dist/cli/config/types.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.d.ts +38 -1
- package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +150 -30
- package/dist/cli/runtime/api-routes-init.js.map +1 -1
- package/dist/cli/runtime/api-server-init.d.ts +4 -0
- package/dist/cli/runtime/api-server-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-server-init.js +3 -1
- package/dist/cli/runtime/api-server-init.js.map +1 -1
- package/dist/cli/runtime/connector-bootstrap.d.ts +8 -0
- package/dist/cli/runtime/connector-bootstrap.d.ts.map +1 -0
- package/dist/cli/runtime/connector-bootstrap.js +14 -0
- package/dist/cli/runtime/connector-bootstrap.js.map +1 -0
- package/dist/cli/runtime/connector-init.d.ts +4 -1
- package/dist/cli/runtime/connector-init.d.ts.map +1 -1
- package/dist/cli/runtime/connector-init.js +2 -8
- package/dist/cli/runtime/connector-init.js.map +1 -1
- package/dist/cli/runtime/envelope-bootstrap.d.ts +2 -1
- package/dist/cli/runtime/envelope-bootstrap.d.ts.map +1 -1
- package/dist/cli/runtime/envelope-bootstrap.js +7 -15
- package/dist/cli/runtime/envelope-bootstrap.js.map +1 -1
- package/dist/connectors/index.d.ts +4 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/index.js +3 -2
- package/dist/connectors/index.js.map +1 -1
- package/dist/connectors/private-connector-policy.d.ts +150 -0
- package/dist/connectors/private-connector-policy.d.ts.map +1 -0
- package/dist/connectors/private-connector-policy.js +289 -0
- package/dist/connectors/private-connector-policy.js.map +1 -0
- package/dist/connectors/private-prompt-overlay.d.ts +17 -0
- package/dist/connectors/private-prompt-overlay.d.ts.map +1 -0
- package/dist/connectors/private-prompt-overlay.js +156 -0
- package/dist/connectors/private-prompt-overlay.js.map +1 -0
- package/dist/db/migrations/operator-task-external-lifecycle.d.ts +8 -0
- package/dist/db/migrations/operator-task-external-lifecycle.d.ts.map +1 -0
- package/dist/db/migrations/operator-task-external-lifecycle.js +169 -0
- package/dist/db/migrations/operator-task-external-lifecycle.js.map +1 -0
- package/dist/envelope/enforcer.js +8 -7
- package/dist/envelope/enforcer.js.map +1 -1
- package/dist/envelope/reactive-config.d.ts.map +1 -1
- package/dist/envelope/reactive-config.js +2 -1
- package/dist/envelope/reactive-config.js.map +1 -1
- package/dist/envelope/tool-connector-scope.d.ts.map +1 -1
- package/dist/envelope/tool-connector-scope.js +4 -0
- package/dist/envelope/tool-connector-scope.js.map +1 -1
- package/dist/gateways/message-router.d.ts +11 -1
- package/dist/gateways/message-router.d.ts.map +1 -1
- package/dist/gateways/message-router.js +121 -41
- package/dist/gateways/message-router.js.map +1 -1
- package/dist/gateways/telegram-message-ledger.d.ts +8 -1
- package/dist/gateways/telegram-message-ledger.d.ts.map +1 -1
- package/dist/gateways/telegram-message-ledger.js +141 -24
- package/dist/gateways/telegram-message-ledger.js.map +1 -1
- package/dist/gateways/telegram.d.ts +2 -0
- package/dist/gateways/telegram.d.ts.map +1 -1
- package/dist/gateways/telegram.js +19 -12
- package/dist/gateways/telegram.js.map +1 -1
- package/dist/multi-agent/agent-process-manager.d.ts +9 -1
- package/dist/multi-agent/agent-process-manager.d.ts.map +1 -1
- package/dist/multi-agent/agent-process-manager.js +48 -20
- package/dist/multi-agent/agent-process-manager.js.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.d.ts +3 -3
- package/dist/multi-agent/dashboard-agent-persona.d.ts.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.js +10 -13
- package/dist/multi-agent/dashboard-agent-persona.js.map +1 -1
- package/dist/multi-agent/memory-agent-persona.d.ts +1 -1
- package/dist/multi-agent/memory-agent-persona.d.ts.map +1 -1
- package/dist/multi-agent/memory-agent-persona.js +1 -1
- package/dist/multi-agent/wiki-agent-persona.d.ts +2 -2
- package/dist/multi-agent/wiki-agent-persona.js +2 -2
- package/dist/operator/board-slot-instructions.d.ts +1 -1
- package/dist/operator/board-slot-instructions.js +2 -2
- package/dist/operator/board-slot-instructions.js.map +1 -1
- package/dist/operator/briefs.d.ts +3 -0
- package/dist/operator/briefs.d.ts.map +1 -1
- package/dist/operator/briefs.js +64 -3
- package/dist/operator/briefs.js.map +1 -1
- package/dist/operator/console-brief.d.ts +6 -3
- package/dist/operator/console-brief.d.ts.map +1 -1
- package/dist/operator/console-brief.js +39 -9
- package/dist/operator/console-brief.js.map +1 -1
- package/dist/operator/external-lifecycle-candidates.d.ts +56 -0
- package/dist/operator/external-lifecycle-candidates.d.ts.map +1 -0
- package/dist/operator/external-lifecycle-candidates.js +415 -0
- package/dist/operator/external-lifecycle-candidates.js.map +1 -0
- package/dist/operator/external-lifecycle.d.ts +82 -0
- package/dist/operator/external-lifecycle.d.ts.map +1 -0
- package/dist/operator/external-lifecycle.js +27 -0
- package/dist/operator/external-lifecycle.js.map +1 -0
- package/dist/operator/file-coordination.d.ts +7 -0
- package/dist/operator/file-coordination.d.ts.map +1 -0
- package/dist/operator/file-coordination.js +84 -0
- package/dist/operator/file-coordination.js.map +1 -0
- package/dist/operator/operator-trigger-loop.d.ts +19 -4
- package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.js +151 -23
- package/dist/operator/operator-trigger-loop.js.map +1 -1
- package/dist/operator/pending-report-store.d.ts +62 -3
- package/dist/operator/pending-report-store.d.ts.map +1 -1
- package/dist/operator/pending-report-store.js +297 -40
- package/dist/operator/pending-report-store.js.map +1 -1
- package/dist/operator/report-carry-delivery.d.ts +35 -0
- package/dist/operator/report-carry-delivery.d.ts.map +1 -0
- package/dist/operator/report-carry-delivery.js +55 -0
- package/dist/operator/report-carry-delivery.js.map +1 -0
- package/dist/operator/report-carry.d.ts +50 -30
- package/dist/operator/report-carry.d.ts.map +1 -1
- package/dist/operator/report-carry.js +323 -71
- package/dist/operator/report-carry.js.map +1 -1
- package/dist/operator/situation-report.d.ts +30 -11
- package/dist/operator/situation-report.d.ts.map +1 -1
- package/dist/operator/situation-report.js +42 -13
- package/dist/operator/situation-report.js.map +1 -1
- package/dist/operator/task-ledger.d.ts +101 -0
- package/dist/operator/task-ledger.d.ts.map +1 -1
- package/dist/operator/task-ledger.js +599 -124
- package/dist/operator/task-ledger.js.map +1 -1
- package/dist/operator/temporal-worker.js +1 -1
- package/dist/operator/worker-run.d.ts +1 -1
- package/dist/operator/worker-run.d.ts.map +1 -1
- package/dist/operator/worker-run.js +17 -5
- package/dist/operator/worker-run.js.map +1 -1
- package/dist/operator/workorder-consumer.d.ts +12 -1
- package/dist/operator/workorder-consumer.d.ts.map +1 -1
- package/dist/operator/workorder-consumer.js +125 -6
- package/dist/operator/workorder-consumer.js.map +1 -1
- package/dist/operator/workorder-hooks.d.ts +7 -2
- package/dist/operator/workorder-hooks.d.ts.map +1 -1
- package/dist/operator/workorder-hooks.js +22 -0
- package/dist/operator/workorder-hooks.js.map +1 -1
- package/dist/operator/workorder-publishers.d.ts +9 -2
- package/dist/operator/workorder-publishers.d.ts.map +1 -1
- package/dist/operator/workorder-publishers.js +167 -5
- package/dist/operator/workorder-publishers.js.map +1 -1
- package/package.json +2 -2
- package/scripts/generate-gateway-tools.ts +13 -3
|
@@ -26,7 +26,6 @@ const node_os_1 = require("node:os");
|
|
|
26
26
|
const node_path_1 = require("node:path");
|
|
27
27
|
const debug_logger_1 = require("@jungjaehoon/mama-core/debug-logger");
|
|
28
28
|
const raw_store_js_1 = require("../../connectors/framework/raw-store.js");
|
|
29
|
-
const config_loader_js_1 = require("../../connectors/config-loader.js");
|
|
30
29
|
const logger = new debug_logger_1.DebugLogger('connector-init');
|
|
31
30
|
/**
|
|
32
31
|
* Resolve the unified connector batch poll cadence in minutes (M2.4).
|
|
@@ -57,7 +56,7 @@ function resolvePollMinutes(raw) {
|
|
|
57
56
|
*/
|
|
58
57
|
async function initConnectors(
|
|
59
58
|
/** @deprecated Direct LLM connector-to-memory extraction is disabled in M0. */
|
|
60
|
-
_connectorExtractionFn, options
|
|
59
|
+
_connectorExtractionFn, options) {
|
|
61
60
|
// M2.4: unified batch poll cadence. UNSET -> 60 (unchanged default); a bad value fails loud HERE,
|
|
62
61
|
// before any stateful connector init below.
|
|
63
62
|
const pollMinutes = resolvePollMinutes(process.env.MAMA_CONNECTOR_POLL_MINUTES);
|
|
@@ -94,15 +93,10 @@ _connectorExtractionFn, options = {}) {
|
|
|
94
93
|
}
|
|
95
94
|
return idsBySourceId;
|
|
96
95
|
};
|
|
97
|
-
const configLoadResult = (0, config_loader_js_1.loadConnectorConfig)();
|
|
98
|
-
if (!configLoadResult.ok) {
|
|
99
|
-
console.error(`[connector] failed to load connector configuration (${configLoadResult.error.code}): ` +
|
|
100
|
-
configLoadResult.error.message);
|
|
101
|
-
}
|
|
102
96
|
// The loader's empty success/failure boundaries are frozen. Connector initialization owns a
|
|
103
97
|
// fresh top-level map because it may auto-enable claude-code; validated nested records remain
|
|
104
98
|
// shared read-only inputs to connector construction.
|
|
105
|
-
const connectorsConfig = Object.assign(Object.create(null),
|
|
99
|
+
const connectorsConfig = Object.assign(Object.create(null), options.connectorConfigLoadResult.config);
|
|
106
100
|
// Auto-enable claude-code connector (local, no auth needed)
|
|
107
101
|
if (!connectorsConfig['claude-code']) {
|
|
108
102
|
connectorsConfig['claude-code'] = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector-init.js","sourceRoot":"","sources":["../../../src/cli/runtime/connector-init.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAwBH,gDAWC;
|
|
1
|
+
{"version":3,"file":"connector-init.js","sourceRoot":"","sources":["../../../src/cli/runtime/connector-init.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAwBH,gDAWC;AAiCD,wCAkPC;AApTD,qCAAkC;AAClC,yCAAiC;AAEjC,sEAAkE;AAElE,0EAIiD;AAGjD,MAAM,MAAM,GAAG,IAAI,0BAAW,CAAC,gBAAgB,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,GA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../config/types.js';
|
|
3
|
+
import type { ConnectorConfigLoadResult } from '../../connectors/config-loader.js';
|
|
3
4
|
import { EnvelopeAuthority } from '../../envelope/authority.js';
|
|
4
5
|
import type { EnvLike, ReactiveEnvelopeConfig } from '../../envelope/reactive-config.js';
|
|
5
6
|
export type EnvelopeIssuanceMode = 'off' | 'enabled' | 'required';
|
|
@@ -12,5 +13,5 @@ export interface RuntimeEnvelopeBootstrap {
|
|
|
12
13
|
key_version?: number;
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
export declare function buildRuntimeEnvelopeBootstrap(db: SQLiteDatabase, config: MAMAConfig, env
|
|
16
|
+
export declare function buildRuntimeEnvelopeBootstrap(db: SQLiteDatabase, config: MAMAConfig, env: EnvLike, connectorConfigLoadResult: ConnectorConfigLoadResult): RuntimeEnvelopeBootstrap;
|
|
16
17
|
//# sourceMappingURL=envelope-bootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope-bootstrap.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/envelope-bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"envelope-bootstrap.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/envelope-bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAOhE,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAGzF,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,EAAE;QACR,QAAQ,EAAE,oBAAoB,CAAC;QAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAmBD,wBAAgB,6BAA6B,CAC3C,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,OAAO,EACZ,yBAAyB,EAAE,yBAAyB,GACnD,wBAAwB,CAgD1B"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildRuntimeEnvelopeBootstrap = buildRuntimeEnvelopeBootstrap;
|
|
4
|
-
const node_os_1 = require("node:os");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
6
|
-
const debug_logger_1 = require("@jungjaehoon/mama-core/debug-logger");
|
|
7
|
-
const config_loader_js_1 = require("../../connectors/config-loader.js");
|
|
8
4
|
const envelope_tables_js_1 = require("../../db/migrations/envelope-tables.js");
|
|
9
5
|
const authority_js_1 = require("../../envelope/authority.js");
|
|
10
6
|
const key_provider_js_1 = require("../../envelope/key-provider.js");
|
|
11
7
|
const reactive_config_js_1 = require("../../envelope/reactive-config.js");
|
|
12
8
|
const store_js_1 = require("../../envelope/store.js");
|
|
13
|
-
const logger = new debug_logger_1.DebugLogger('envelope-bootstrap');
|
|
14
9
|
function parseEnvelopeIssuanceMode(env) {
|
|
15
10
|
const configured = env.MAMA_ENVELOPE_ISSUANCE;
|
|
16
11
|
if (configured === undefined) {
|
|
@@ -25,22 +20,19 @@ function parseEnvelopeIssuanceMode(env) {
|
|
|
25
20
|
}
|
|
26
21
|
throw new Error(`[envelope] MAMA_ENVELOPE_ISSUANCE must be one of off, false, enabled, required; got ${env.MAMA_ENVELOPE_ISSUANCE}`);
|
|
27
22
|
}
|
|
28
|
-
function buildRuntimeEnvelopeBootstrap(db, config, env
|
|
23
|
+
function buildRuntimeEnvelopeBootstrap(db, config, env, connectorConfigLoadResult) {
|
|
24
|
+
if (!connectorConfigLoadResult) {
|
|
25
|
+
throw new Error('[envelope] connectorConfigLoadResult is required');
|
|
26
|
+
}
|
|
29
27
|
const issuance = parseEnvelopeIssuanceMode(env);
|
|
30
28
|
if (issuance === 'off') {
|
|
31
29
|
return {
|
|
32
30
|
metadata: { issuance },
|
|
33
31
|
};
|
|
34
32
|
}
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
logger.error(`[envelope] failed to load connector configuration (${connectorConfig.error.code}): ` +
|
|
39
|
-
connectorConfig.error.message);
|
|
40
|
-
}
|
|
41
|
-
const enabledConnectorNames = Object.freeze([...connectorConfig.enabledNames]);
|
|
42
|
-
const driveDestinations = Object.freeze(connectorConfig.ok && connectorConfig.config.drive?.enabled
|
|
43
|
-
? Object.values(connectorConfig.config.drive.channels)
|
|
33
|
+
const enabledConnectorNames = Object.freeze([...connectorConfigLoadResult.enabledNames]);
|
|
34
|
+
const driveDestinations = Object.freeze(connectorConfigLoadResult.ok && connectorConfigLoadResult.config.drive?.enabled
|
|
35
|
+
? Object.values(connectorConfigLoadResult.config.drive.channels)
|
|
44
36
|
.filter((channel) => channel.role === 'deliverable')
|
|
45
37
|
.map((channel) => channel.folderId ?? channel.driveId)
|
|
46
38
|
.filter((id) => typeof id === 'string' && id.trim().length > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope-bootstrap.js","sourceRoot":"","sources":["../../../src/cli/runtime/envelope-bootstrap.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"envelope-bootstrap.js","sourceRoot":"","sources":["../../../src/cli/runtime/envelope-bootstrap.ts"],"names":[],"mappings":";;AA2CA,sEAqDC;AA7FD,+EAAsF;AACtF,8DAAgE;AAChE,oEAIwC;AACxC,0EAAwF;AAExF,sDAAwD;AAcxD,SAAS,yBAAyB,CAAC,GAAY;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AAO,CAAC,IAAI,KAAK,aAAa,CAAC;aACnD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;aACrD,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;aAC5E,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAgB,EAAE,EAAE,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,EAAE,CACP,CAAC;IAEF,MAAM,UAAU,GACd,QAAQ,KAAK,UAAU;QACrB,CAAC,CAAC,IAAA,+CAA6B,EAAC,GAAG,CAAC;QACpC,CAAC,CAAC,IAAA,qDAAmC,EAAC,GAAG,CAAC,CAAC;IAC/C,IAAA,iDAA4B,EAAC,EAAE,CAAC,CAAC;IACjC,MAAM,iBAAiB,GAAG,IAAI,gCAAiB,CAC7C,IAAI,wBAAa,CAAC,EAAE,CAAC,EACrB,UAAU,EACV,IAAA,kCAAgB,EAAC,UAAU,CAAC,CAC7B,CAAC;IAEF,OAAO;QACL,cAAc,EAAE,IAAA,wDAAmC,EACjD,MAAM,EACN,GAAG,EACH,qBAAqB,EACrB,iBAAiB,CAClB;QACD,iBAAiB;QACjB,QAAQ,EAAE;YACR,QAAQ;YACR,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,WAAW,EAAE,UAAU,CAAC,WAAW;SACpC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './framework/index.js';
|
|
2
|
-
export declare const AVAILABLE_CONNECTORS: readonly ["slack", "telegram", "discord", "chatwork", "gmail", "calendar", "notion", "obsidian", "
|
|
2
|
+
export declare const AVAILABLE_CONNECTORS: readonly ["slack", "telegram", "discord", "chatwork", "gmail", "calendar", "notion", "obsidian", "sheets", "trello", "drive", "imessage", "claude-code"];
|
|
3
|
+
export declare const PRIVATE_CONNECTORS: readonly ["kagemusha"];
|
|
4
|
+
export declare const LOADABLE_CONNECTORS: readonly ["slack", "telegram", "discord", "chatwork", "gmail", "calendar", "notion", "obsidian", "sheets", "trello", "drive", "imessage", "claude-code", "kagemusha"];
|
|
3
5
|
export type AvailableConnector = (typeof AVAILABLE_CONNECTORS)[number];
|
|
6
|
+
export type LoadableConnector = (typeof LOADABLE_CONNECTORS)[number];
|
|
4
7
|
/**
|
|
5
8
|
* Dynamic connector loader — avoids importing all connector deps at startup.
|
|
6
9
|
* Optionally accepts a ConnectorConfig; if omitted, a minimal disabled config is used
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AAErC,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AAErC,eAAO,MAAM,oBAAoB,0JAcvB,CAAC;AAEX,eAAO,MAAM,kBAAkB,wBAAyB,CAAC;AAEzD,eAAO,MAAM,mBAAmB,uKAA4D,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,OAAO,sBAAsB,EAAE,eAAe,GACtD,OAAO,CAAC,OAAO,sBAAsB,EAAE,UAAU,CAAC,CAcpD"}
|
package/dist/connectors/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AVAILABLE_CONNECTORS = void 0;
|
|
17
|
+
exports.LOADABLE_CONNECTORS = exports.PRIVATE_CONNECTORS = exports.AVAILABLE_CONNECTORS = void 0;
|
|
18
18
|
exports.loadConnector = loadConnector;
|
|
19
19
|
__exportStar(require("./framework/index.js"), exports);
|
|
20
20
|
exports.AVAILABLE_CONNECTORS = [
|
|
@@ -26,13 +26,14 @@ exports.AVAILABLE_CONNECTORS = [
|
|
|
26
26
|
'calendar',
|
|
27
27
|
'notion',
|
|
28
28
|
'obsidian',
|
|
29
|
-
'kagemusha',
|
|
30
29
|
'sheets',
|
|
31
30
|
'trello',
|
|
32
31
|
'drive',
|
|
33
32
|
'imessage',
|
|
34
33
|
'claude-code',
|
|
35
34
|
];
|
|
35
|
+
exports.PRIVATE_CONNECTORS = ['kagemusha'];
|
|
36
|
+
exports.LOADABLE_CONNECTORS = [...exports.AVAILABLE_CONNECTORS, ...exports.PRIVATE_CONNECTORS];
|
|
36
37
|
/**
|
|
37
38
|
* Dynamic connector loader — avoids importing all connector deps at startup.
|
|
38
39
|
* Optionally accepts a ConnectorConfig; if omitted, a minimal disabled config is used
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8BA,sCAiBC;AA/CD,uDAAqC;AAExB,QAAA,oBAAoB,GAAG;IAClC,OAAO;IACP,UAAU;IACV,SAAS;IACT,UAAU;IACV,OAAO;IACP,UAAU;IACV,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,UAAU;IACV,aAAa;CACL,CAAC;AAEE,QAAA,kBAAkB,GAAG,CAAC,WAAW,CAAU,CAAC;AAE5C,QAAA,mBAAmB,GAAG,CAAC,GAAG,4BAAoB,EAAE,GAAG,0BAAkB,CAAU,CAAC;AAK7F;;;;GAIG;AACI,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,MAAuD;IAEvD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC,CAAC;IAC/C,6CAA6C;IAC7C,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAC3E,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,EAAE,CAAC,CAAC;IAElF,MAAM,eAAe,GAAmD,MAAM,IAAI;QAChF,OAAO,EAAE,KAAK;QACd,mBAAmB,EAAE,CAAC;QACtB,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACvB,CAAC;IAEF,OAAO,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,eAAe,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { GatewayToolExecutionContext, GatewayToolName } from '../agent/types.js';
|
|
2
|
+
import type { RoleConfig } from '../cli/config/types.js';
|
|
3
|
+
import type { ConnectorConfigLoadResult } from './config-loader.js';
|
|
4
|
+
export type ConnectorCapabilitySurface = 'owner_console' | 'os_agent' | 'legacy-unbound' | 'multi-agent-generic' | 'workorder-board' | 'workorder-memory-curation' | 'workorder-temporal' | 'operator-report';
|
|
5
|
+
export type PrivateWorkOrderKind = 'board' | 'wiki' | 'memory-curation' | 'temporal';
|
|
6
|
+
export interface PrivateConnectorToolDefinition {
|
|
7
|
+
readonly name: GatewayToolName;
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly category: 'business_data';
|
|
10
|
+
readonly params?: string;
|
|
11
|
+
readonly codeAct: {
|
|
12
|
+
readonly params: readonly {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly type: string;
|
|
15
|
+
readonly required: boolean;
|
|
16
|
+
readonly description?: string;
|
|
17
|
+
}[];
|
|
18
|
+
readonly returnType: string;
|
|
19
|
+
readonly category: 'memory';
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface PrivateConnectorPolicy {
|
|
23
|
+
readonly fingerprint: string;
|
|
24
|
+
readonly configuredPrivateConnectors: readonly string[];
|
|
25
|
+
readonly enabledPrivateConnectors: readonly string[];
|
|
26
|
+
isConfigured(name: string): boolean;
|
|
27
|
+
isEnabled(name: string): boolean;
|
|
28
|
+
toolsFor(surface: ConnectorCapabilitySurface): readonly string[];
|
|
29
|
+
toolDefinitionsFor(surface: ConnectorCapabilitySurface): readonly PrivateConnectorToolDefinition[];
|
|
30
|
+
projectRawConnectors(surface: ConnectorCapabilitySurface, connectors: readonly string[]): readonly string[];
|
|
31
|
+
projectRole(surface: ConnectorCapabilitySurface, role: RoleConfig): RoleConfig;
|
|
32
|
+
promptOverlayFor(surface: ConnectorCapabilitySurface): string;
|
|
33
|
+
}
|
|
34
|
+
export interface ProjectedToolPolicy {
|
|
35
|
+
readonly allowedTools: readonly string[];
|
|
36
|
+
readonly blockedTools: readonly string[];
|
|
37
|
+
}
|
|
38
|
+
export declare const PRIVATE_CONNECTOR_TOOL_DEFINITIONS: readonly (Readonly<{
|
|
39
|
+
name: "kagemusha_overview";
|
|
40
|
+
description: "Get overview: room/task/message counts across all channels";
|
|
41
|
+
category: "business_data";
|
|
42
|
+
params: "(none)";
|
|
43
|
+
codeAct: Readonly<{
|
|
44
|
+
params: readonly never[];
|
|
45
|
+
returnType: "{ rooms: { total: number; byChannel: Record<string, number> }; tasks: { total: number; byStatus: Record<string, number> }; messages: { total: number; recent30d: number } }";
|
|
46
|
+
category: "memory";
|
|
47
|
+
}>;
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
name: "kagemusha_entities";
|
|
50
|
+
description: "List people and project channels with activity stats";
|
|
51
|
+
category: "business_data";
|
|
52
|
+
params: "channel?, activeOnly?, limit?";
|
|
53
|
+
codeAct: Readonly<{
|
|
54
|
+
params: readonly (Readonly<{
|
|
55
|
+
name: "channel";
|
|
56
|
+
type: "string";
|
|
57
|
+
required: false;
|
|
58
|
+
description: "Filter by platform: 'kakao', 'slack', 'chatwork', 'line', 'telegram'";
|
|
59
|
+
}> | Readonly<{
|
|
60
|
+
name: "activeOnly";
|
|
61
|
+
type: "boolean";
|
|
62
|
+
required: false;
|
|
63
|
+
description: "Only entities active in last 30 days";
|
|
64
|
+
}> | Readonly<{
|
|
65
|
+
name: "limit";
|
|
66
|
+
type: "number";
|
|
67
|
+
required: false;
|
|
68
|
+
}>)[];
|
|
69
|
+
returnType: "{ entities: Array<{ id: string; name: string; channel: string; type: string; totalMessages: number; recentMessages: number; activeTasks: number; totalTasks: number; lastActive: string }> }";
|
|
70
|
+
category: "memory";
|
|
71
|
+
}>;
|
|
72
|
+
}> | Readonly<{
|
|
73
|
+
name: "kagemusha_tasks";
|
|
74
|
+
description: "Query tasks by room, status, priority, or text search. READ-ONLY project-task truth. Status vocabulary: pending|in_progress|review|done|completed|cancelled|dismissed|active (no \"blocked\" - an empty result for an unknown status is a vocabulary miss, not missing work).";
|
|
75
|
+
category: "business_data";
|
|
76
|
+
params: "sourceRoom?, status?, priority?, search?, limit?";
|
|
77
|
+
codeAct: Readonly<{
|
|
78
|
+
params: readonly (Readonly<{
|
|
79
|
+
name: "sourceRoom";
|
|
80
|
+
type: "string";
|
|
81
|
+
required: false;
|
|
82
|
+
description: "Room ID from kagemusha_entities (e.g., \"slack:CHANNEL_ID\")";
|
|
83
|
+
}> | Readonly<{
|
|
84
|
+
name: "status";
|
|
85
|
+
type: "string";
|
|
86
|
+
required: false;
|
|
87
|
+
description: "pending, in_progress, review, done, completed, cancelled, dismissed, active";
|
|
88
|
+
}> | Readonly<{
|
|
89
|
+
name: "priority";
|
|
90
|
+
type: "string";
|
|
91
|
+
required: false;
|
|
92
|
+
description: "urgent, high, normal";
|
|
93
|
+
}> | Readonly<{
|
|
94
|
+
name: "search";
|
|
95
|
+
type: "string";
|
|
96
|
+
required: false;
|
|
97
|
+
description: "Text search in title";
|
|
98
|
+
}> | Readonly<{
|
|
99
|
+
name: "limit";
|
|
100
|
+
type: "number";
|
|
101
|
+
required: false;
|
|
102
|
+
}>)[];
|
|
103
|
+
returnType: "{ tasks: Array<{ id: number; title: string; status: string; priority: string; deadline: string | null; sourceRoom: string | null; createdAt: string }> }";
|
|
104
|
+
category: "memory";
|
|
105
|
+
}>;
|
|
106
|
+
}> | Readonly<{
|
|
107
|
+
name: "kagemusha_messages";
|
|
108
|
+
description: "Read raw messages from a specific channel (follow entities -> tasks -> messages)";
|
|
109
|
+
category: "business_data";
|
|
110
|
+
params: "channelId (required), since?, limit?, search?";
|
|
111
|
+
codeAct: Readonly<{
|
|
112
|
+
params: readonly (Readonly<{
|
|
113
|
+
name: "channelId";
|
|
114
|
+
type: "string";
|
|
115
|
+
required: true;
|
|
116
|
+
description: "Channel ID from kagemusha_entities result (e.g., \"kakao:ROOM_NAME\")";
|
|
117
|
+
}> | Readonly<{
|
|
118
|
+
name: "since";
|
|
119
|
+
type: "string";
|
|
120
|
+
required: false;
|
|
121
|
+
description: "ISO date (default: 7 days ago)";
|
|
122
|
+
}> | Readonly<{
|
|
123
|
+
name: "limit";
|
|
124
|
+
type: "number";
|
|
125
|
+
required: false;
|
|
126
|
+
}> | Readonly<{
|
|
127
|
+
name: "search";
|
|
128
|
+
type: "string";
|
|
129
|
+
required: false;
|
|
130
|
+
description: "Text search in content";
|
|
131
|
+
}>)[];
|
|
132
|
+
returnType: "{ messages: Array<{ id: number; channel: string; author: string; content: string; timestamp: string }> }";
|
|
133
|
+
category: "memory";
|
|
134
|
+
}>;
|
|
135
|
+
}>)[];
|
|
136
|
+
export declare const PRIVATE_CONNECTOR_PROMPT_OVERLAY: string;
|
|
137
|
+
export declare function resolveWorkOrderPrivateSurface(kind: PrivateWorkOrderKind): ConnectorCapabilitySurface;
|
|
138
|
+
export declare function projectPrivateToolPolicy(surface: ConnectorCapabilitySurface, role: Pick<RoleConfig, 'allowedTools' | 'blockedTools'>, policy: PrivateConnectorPolicy): ProjectedToolPolicy;
|
|
139
|
+
/**
|
|
140
|
+
* Attenuate a host-issued raw connector snapshot for one trusted execution surface.
|
|
141
|
+
*
|
|
142
|
+
* Public connectors pass through unchanged. A private connector survives only when the
|
|
143
|
+
* surface is eligible and the connector is enabled in the boot policy. This function never
|
|
144
|
+
* adds authority that was absent from the supplied snapshot.
|
|
145
|
+
*/
|
|
146
|
+
export declare function projectPrivateRawConnectorScope(surface: ConnectorCapabilitySurface, connectors: readonly string[], policy: PrivateConnectorPolicy): readonly string[];
|
|
147
|
+
export declare function resolvePrivateConnectorPolicy(result: ConnectorConfigLoadResult): PrivateConnectorPolicy;
|
|
148
|
+
export declare function visibleConnectorNames(configuredNames: readonly string[]): readonly string[];
|
|
149
|
+
export declare function resolvePrivatePrincipalSurface(context: Pick<GatewayToolExecutionContext, 'agentContext'>): ConnectorCapabilitySurface;
|
|
150
|
+
//# sourceMappingURL=private-connector-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-connector-policy.d.ts","sourceRoot":"","sources":["../../src/connectors/private-connector-policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAGpE,MAAM,MAAM,0BAA0B,GAClC,eAAe,GACf,UAAU,GACV,gBAAgB,GAChB,qBAAqB,GACrB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