@on-mission/sdk 0.1.2 → 0.1.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.
- package/dist/api.d.ts +2 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js +2 -2
- package/dist/auth.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +12 -12
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +8 -8
- package/dist/context.js.map +1 -1
- package/dist/events.d.ts +7 -7
- package/dist/events.js +5 -5
- package/dist/events.js.map +1 -1
- package/dist/http-server.d.ts +6 -6
- package/dist/http-server.d.ts.map +1 -1
- package/dist/http-server.js +8 -8
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/ingress.d.ts +8 -8
- package/dist/ingress.js +4 -4
- package/dist/ingress.js.map +1 -1
- package/dist/logging.d.ts +4 -4
- package/dist/logging.js +5 -5
- package/dist/logging.js.map +1 -1
- package/dist/sdk.d.ts +13 -13
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +11 -11
- package/dist/sdk.js.map +1 -1
- package/dist/tool-registry.d.ts +1 -1
- package/dist/tool-registry.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { GatewayRouter } from '@mission/api/gateway';
|
|
9
9
|
import { createTRPCProxyClient } from '@trpc/client';
|
|
10
|
-
import type {
|
|
10
|
+
import type { SkillContext } from './context';
|
|
11
11
|
type GatewayClient = ReturnType<typeof createTRPCProxyClient<GatewayRouter>>;
|
|
12
12
|
export type ApiClient = {
|
|
13
13
|
trpc: GatewayClient;
|
|
@@ -15,6 +15,6 @@ export type ApiClient = {
|
|
|
15
15
|
setToken: (token: string) => void;
|
|
16
16
|
getToken: () => string;
|
|
17
17
|
};
|
|
18
|
-
export declare const createApiClient: (ctx:
|
|
18
|
+
export declare const createApiClient: (ctx: SkillContext) => ApiClient;
|
|
19
19
|
export {};
|
|
20
20
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,qBAAqB,EAAiB,MAAM,cAAc,CAAA;AACnE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,qBAAqB,EAAiB,MAAM,cAAc,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAE7C,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAA;AAE5E,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,QAAQ,EAAE,MAAM,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,KAAK,YAAY,KAAG,SA+BnD,CAAA"}
|
package/dist/api.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
|
|
9
9
|
export const createApiClient = (ctx) => {
|
|
10
10
|
const baseUrl = ctx.apiUrl.replace(/\/$/, '');
|
|
11
|
-
let currentToken = ctx.
|
|
11
|
+
let currentToken = ctx.skillToken;
|
|
12
12
|
const trpc = createTRPCProxyClient({
|
|
13
13
|
links: [
|
|
14
14
|
httpBatchLink({
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAYnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAYnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAiB,EAAa,EAAE;IAC9D,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC7C,IAAI,YAAY,GAAG,GAAG,CAAC,UAAU,CAAA;IAEjC,MAAM,IAAI,GAAG,qBAAqB,CAAgB;QAChD,KAAK,EAAE;YACL,aAAa,CAAC;gBACZ,GAAG,EAAE,GAAG,OAAO,WAAW;gBAC1B,OAAO;oBACL,MAAM,OAAO,GAA2B;wBACtC,2BAA2B,EAAE,GAAG,CAAC,cAAc;qBAChD,CAAA;oBACD,IAAI,YAAY,EAAE,CAAC;wBACjB,OAAO,CAAC,aAAa,GAAG,UAAU,YAAY,EAAE,CAAA;oBAClD,CAAC;oBACD,OAAO,OAAO,CAAA;gBAChB,CAAC;aACF,CAAC;SACH;KACF,CAAC,CAAA;IAEF,OAAO;QACL,IAAI;QACJ,OAAO;QACP,QAAQ,EAAE,CAAC,KAAa,EAAQ,EAAE;YAChC,YAAY,GAAG,KAAK,CAAA;QACtB,CAAC;QACD,QAAQ,EAAE,GAAW,EAAE;YACrB,OAAO,YAAY,CAAA;QACrB,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/dist/auth.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - User-provided credentials (API keys, tokens, secrets from the connection form)
|
|
7
7
|
* - OAuth token data (for managed auth providers like Google, Slack)
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Skill authors always call `auth.get()` regardless of auth type.
|
|
10
10
|
*
|
|
11
11
|
* For managed auth (Nango-backed), the SDK caches tokens and refreshes
|
|
12
12
|
* transparently. See docs/technical-designs/managed-auth-nango.md.
|
|
@@ -51,7 +51,7 @@ export type AuthCredentials = {
|
|
|
51
51
|
};
|
|
52
52
|
export type AuthModule = {
|
|
53
53
|
/**
|
|
54
|
-
* Get all authentication data for this
|
|
54
|
+
* Get all authentication data for this skill installation.
|
|
55
55
|
*
|
|
56
56
|
* Returns user-provided credentials (API keys, tokens from the
|
|
57
57
|
* connection form) and, for managed OAuth providers, a current
|
package/dist/auth.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - User-provided credentials (API keys, tokens, secrets from the connection form)
|
|
7
7
|
* - OAuth token data (for managed auth providers like Google, Slack)
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Skill authors always call `auth.get()` regardless of auth type.
|
|
10
10
|
*
|
|
11
11
|
* For managed auth (Nango-backed), the SDK caches tokens and refreshes
|
|
12
12
|
* transparently. See docs/technical-designs/managed-auth-nango.md.
|
|
@@ -36,7 +36,7 @@ export function createAuthModule(api) {
|
|
|
36
36
|
if (isCacheValid()) {
|
|
37
37
|
return cachedAuth.data;
|
|
38
38
|
}
|
|
39
|
-
const auth = (await api.trpc.
|
|
39
|
+
const auth = (await api.trpc.skill.getAuth.query({}));
|
|
40
40
|
cachedAuth = { data: auth, fetchedAt: Date.now() };
|
|
41
41
|
return auth;
|
|
42
42
|
}
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqDH,gFAAgF;AAEhF,MAAM,UAAU,gBAAgB,CAAC,GAAc;IAC7C,iCAAiC;IACjC,IAAI,UAAU,GAAwD,IAAI,CAAA;IAC1E,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,yCAAyC;IAE5E,SAAS,YAAY;QACnB,IAAI,CAAC,UAAU;YAAE,OAAO,KAAK,CAAA;QAC7B,wEAAwE;QACxE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAA;QACvC,uDAAuD;QACvD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,SAAS,CAAA;QACjD,OAAO,OAAO,GAAG,YAAY,CAAA;IAC/B,CAAC;IAED,OAAO;QACL,GAAG,EAAE,KAAK,IAA8B,EAAE;YACxC,IAAI,YAAY,EAAE,EAAE,CAAC;gBACnB,OAAO,UAAW,CAAC,IAAI,CAAA;YACzB,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqDH,gFAAgF;AAEhF,MAAM,UAAU,gBAAgB,CAAC,GAAc;IAC7C,iCAAiC;IACjC,IAAI,UAAU,GAAwD,IAAI,CAAA;IAC1E,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,yCAAyC;IAE5E,SAAS,YAAY;QACnB,IAAI,CAAC,UAAU;YAAE,OAAO,KAAK,CAAA;QAC7B,wEAAwE;QACxE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAA;QACvC,uDAAuD;QACvD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,SAAS,CAAA;QACjD,OAAO,OAAO,GAAG,YAAY,CAAA;IAC/B,CAAC;IAED,OAAO;QACL,GAAG,EAAE,KAAK,IAA8B,EAAE;YACxC,IAAI,YAAY,EAAE,EAAE,CAAC;gBACnB,OAAO,UAAW,CAAC,IAAI,CAAA;YACzB,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAoB,CAAA;YACxE,UAAU,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAA;YAClD,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Config Module
|
|
3
3
|
*
|
|
4
4
|
* Fetches per-installation configuration from the control plane.
|
|
5
|
-
* Accepts optional defaults so
|
|
5
|
+
* Accepts optional defaults so skills always get a complete config
|
|
6
6
|
* object without manual merging.
|
|
7
7
|
*
|
|
8
8
|
* The control plane stores config per AppConnection. Values are set
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import type { ApiClient } from './api';
|
|
18
18
|
export type ConfigModule = {
|
|
19
19
|
/**
|
|
20
|
-
* Fetch the full configuration object for this
|
|
20
|
+
* Fetch the full configuration object for this skill installation.
|
|
21
21
|
*
|
|
22
22
|
* If `defaults` are provided, the SDK merges platform-stored values
|
|
23
23
|
* over them, so the result is always a complete `T` with no undefined
|
package/dist/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Config Module
|
|
3
3
|
*
|
|
4
4
|
* Fetches per-installation configuration from the control plane.
|
|
5
|
-
* Accepts optional defaults so
|
|
5
|
+
* Accepts optional defaults so skills always get a complete config
|
|
6
6
|
* object without manual merging.
|
|
7
7
|
*
|
|
8
8
|
* The control plane stores config per AppConnection. Values are set
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
export function createConfigModule(api) {
|
|
18
18
|
return {
|
|
19
19
|
get: async (defaults) => {
|
|
20
|
-
const platformValues = (await api.trpc.
|
|
20
|
+
const platformValues = (await api.trpc.skill.getConfig.query({}));
|
|
21
21
|
if (defaults) {
|
|
22
22
|
return { ...defaults, ...platformValues };
|
|
23
23
|
}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyBH,MAAM,UAAU,kBAAkB,CAAC,GAAc;IAC/C,OAAO;QACL,GAAG,EAAE,KAAK,EACR,QAAqB,EACT,EAAE;YACd,MAAM,cAAc,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyBH,MAAM,UAAU,kBAAkB,CAAC,GAAc;IAC/C,OAAO;QACL,GAAG,EAAE,KAAK,EACR,QAAqB,EACT,EAAE;YACd,MAAM,cAAc,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAC1D,EAAE,CACH,CAAe,CAAA;YAEhB,IAAI,QAAQ,EAAE,CAAC;gBACb,OAAO,EAAE,GAAG,QAAQ,EAAE,GAAG,cAAc,EAAO,CAAA;YAChD,CAAC;YAED,OAAO,cAAmB,CAAA;QAC5B,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/context.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Skill Context
|
|
3
3
|
*
|
|
4
4
|
* Bootstrapped from environment variables injected by the Mission control plane
|
|
5
|
-
* when it starts the
|
|
5
|
+
* when it starts the skill process inside the Daytona sandbox.
|
|
6
6
|
*
|
|
7
|
-
* See docs/technical-designs/
|
|
7
|
+
* See docs/technical-designs/skill-architecture.md §4.5.
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
9
|
+
export type SkillContext = {
|
|
10
10
|
/** Mission control plane API base URL. */
|
|
11
11
|
apiUrl: string;
|
|
12
|
-
/** JWT scoped to this
|
|
13
|
-
|
|
14
|
-
/** Stable identifier for this
|
|
12
|
+
/** JWT scoped to this skill installation (for outbound API calls). */
|
|
13
|
+
skillToken: string;
|
|
14
|
+
/** Stable identifier for this skill installation (per-workspace). */
|
|
15
15
|
installationId: string;
|
|
16
|
-
/** Port assigned by the control plane for this
|
|
17
|
-
|
|
16
|
+
/** Port assigned by the control plane for this skill's HTTP server. */
|
|
17
|
+
skillPort: number;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* Read
|
|
21
|
-
* These are injected by the Mission control plane when starting the
|
|
20
|
+
* Read skill context from process environment variables.
|
|
21
|
+
* These are injected by the Mission control plane when starting the skill.
|
|
22
22
|
*/
|
|
23
|
-
export declare function readContextFromEnv():
|
|
23
|
+
export declare function readContextFromEnv(): SkillContext;
|
|
24
24
|
//# sourceMappingURL=context.d.ts.map
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,YAAY,GAAG;IACzB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAA;IAClB,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAA;IACtB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,CAQjD"}
|
package/dist/context.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Skill Context
|
|
3
3
|
*
|
|
4
4
|
* Bootstrapped from environment variables injected by the Mission control plane
|
|
5
|
-
* when it starts the
|
|
5
|
+
* when it starts the skill process inside the Daytona sandbox.
|
|
6
6
|
*
|
|
7
|
-
* See docs/technical-designs/
|
|
7
|
+
* See docs/technical-designs/skill-architecture.md §4.5.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
* Read
|
|
11
|
-
* These are injected by the Mission control plane when starting the
|
|
10
|
+
* Read skill context from process environment variables.
|
|
11
|
+
* These are injected by the Mission control plane when starting the skill.
|
|
12
12
|
*/
|
|
13
13
|
export function readContextFromEnv() {
|
|
14
|
-
const portStr = process.env.
|
|
14
|
+
const portStr = process.env.MISSION_SKILL_PORT;
|
|
15
15
|
return {
|
|
16
16
|
apiUrl: process.env.MISSION_API_URL ?? 'http://localhost:8665',
|
|
17
|
-
|
|
17
|
+
skillToken: process.env.MISSION_SKILL_TOKEN ?? '',
|
|
18
18
|
installationId: process.env.MISSION_INSTALLATION_ID ?? '',
|
|
19
|
-
|
|
19
|
+
skillPort: portStr ? Number.parseInt(portStr, 10) : 3000
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=context.js.map
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAA;IAC9C,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,uBAAuB;QAC9D,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE;QACjD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE;QACzD,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI;KACzD,CAAA;AACH,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Events Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* This is the ONLY event type
|
|
4
|
+
* Skills send messages to the agent when external events occur.
|
|
5
|
+
* This is the ONLY event type skills emit — there are no domain-specific
|
|
6
6
|
* event types (no 'gmail.push_notification', no 'sentry.issue.created').
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
8
|
+
* The skill's job is to:
|
|
9
9
|
* 1. Receive external data (webhooks, streams) via ingress
|
|
10
10
|
* 2. Process and interpret that data
|
|
11
11
|
* 3. Tell the agent what happened and what to do about it
|
|
12
12
|
*
|
|
13
13
|
* The platform routes the message to the appropriate agent(s) based
|
|
14
|
-
* on the
|
|
14
|
+
* on the skill's App configuration and the workspace's agent routing.
|
|
15
15
|
*
|
|
16
16
|
* Transport: tRPC mutation via Mission gateway API.
|
|
17
17
|
*
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { ApiClient } from './api';
|
|
21
21
|
/**
|
|
22
|
-
* A message from a
|
|
22
|
+
* A message from a skill to the agent.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Skills process their domain-specific inbound data and produce
|
|
25
25
|
* human-readable messages that agents can reason about.
|
|
26
26
|
*/
|
|
27
27
|
export type AgentMessage = {
|
|
@@ -37,7 +37,7 @@ export type AgentMessage = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Structured context data the agent can reference.
|
|
39
39
|
* Include IDs, metadata, and any data that helps the agent
|
|
40
|
-
* take follow-up actions using the
|
|
40
|
+
* take follow-up actions using the skill's tools.
|
|
41
41
|
*/
|
|
42
42
|
context?: Record<string, unknown>;
|
|
43
43
|
/**
|
package/dist/events.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Events Module
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* This is the ONLY event type
|
|
4
|
+
* Skills send messages to the agent when external events occur.
|
|
5
|
+
* This is the ONLY event type skills emit — there are no domain-specific
|
|
6
6
|
* event types (no 'gmail.push_notification', no 'sentry.issue.created').
|
|
7
7
|
*
|
|
8
|
-
* The
|
|
8
|
+
* The skill's job is to:
|
|
9
9
|
* 1. Receive external data (webhooks, streams) via ingress
|
|
10
10
|
* 2. Process and interpret that data
|
|
11
11
|
* 3. Tell the agent what happened and what to do about it
|
|
12
12
|
*
|
|
13
13
|
* The platform routes the message to the appropriate agent(s) based
|
|
14
|
-
* on the
|
|
14
|
+
* on the skill's App configuration and the workspace's agent routing.
|
|
15
15
|
*
|
|
16
16
|
* Transport: tRPC mutation via Mission gateway API.
|
|
17
17
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
export function createEventsModule(api) {
|
|
22
22
|
return {
|
|
23
23
|
send: async (message) => {
|
|
24
|
-
void api.trpc.
|
|
24
|
+
void api.trpc.skill.sendEvent.mutate(message).catch((err) => {
|
|
25
25
|
console.error('[Events] send failed:', err);
|
|
26
26
|
});
|
|
27
27
|
}
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkDH,gFAAgF;AAEhF,MAAM,UAAU,kBAAkB,CAAC,GAAc;IAC/C,OAAO;QACL,IAAI,EAAE,KAAK,EAAE,OAAqB,EAAiB,EAAE;YACnD,KAAK,GAAG,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkDH,gFAAgF;AAEhF,MAAM,UAAU,kBAAkB,CAAC,GAAc;IAC/C,OAAO;QACL,IAAI,EAAE,KAAK,EAAE,OAAqB,EAAiB,EAAE;YACnD,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBACnE,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/http-server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTP Server
|
|
3
3
|
*
|
|
4
|
-
* Internal HTTP server that runs inside the
|
|
5
|
-
* This is the inbound entrypoint for all traffic to the
|
|
4
|
+
* Internal HTTP server that runs inside the skill's Daytona sandbox.
|
|
5
|
+
* This is the inbound entrypoint for all traffic to the skill:
|
|
6
6
|
*
|
|
7
7
|
* Mission API → Daytona Preview URL → this server:
|
|
8
8
|
* POST /_mission/tools/:toolName — tool call dispatch
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* GET /{ingressPath} (ws upgrade) — WebSocket stream (e.g., Twilio media)
|
|
15
15
|
*
|
|
16
16
|
* The server is started by mission.connect() and stopped during graceful shutdown.
|
|
17
|
-
*
|
|
17
|
+
* Skill authors never interact with it directly — they register tool handlers
|
|
18
18
|
* and ingress handlers through the SDK, and this server routes to them.
|
|
19
19
|
*
|
|
20
|
-
* See docs/technical-designs/
|
|
20
|
+
* See docs/technical-designs/skill-architecture.md §4.1.
|
|
21
21
|
* See docs/technical-designs/daytona-sandbox-runtime.md §2-3.
|
|
22
22
|
*/
|
|
23
23
|
import * as http from 'node:http';
|
|
@@ -35,7 +35,7 @@ export type ParsedRequest = {
|
|
|
35
35
|
/** The matched route parameter, e.g., the tool name from /_mission/tools/:name */
|
|
36
36
|
params: Record<string, string>;
|
|
37
37
|
};
|
|
38
|
-
export type
|
|
38
|
+
export type SkillHttpServer = {
|
|
39
39
|
/** Start listening on the given port. */
|
|
40
40
|
start: (port: number) => Promise<void>;
|
|
41
41
|
/** Stop the server gracefully. */
|
|
@@ -47,5 +47,5 @@ export type PluginHttpServer = {
|
|
|
47
47
|
/** The port the server is listening on. */
|
|
48
48
|
port: number;
|
|
49
49
|
};
|
|
50
|
-
export declare function createHttpServer():
|
|
50
|
+
export declare function createHttpServer(): SkillHttpServer;
|
|
51
51
|
//# sourceMappingURL=http-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.d.ts","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAIjC,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC;IACzD,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EA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AAO,EAAE,YAAY,KAAK,IAAI,CAAA;IACvE,0EAA0E;IAC1E,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;IAC1B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAmED,wBAAgB,gBAAgB,IAAI,eAAe,CAwGlD"}
|
package/dist/http-server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTP Server
|
|
3
3
|
*
|
|
4
|
-
* Internal HTTP server that runs inside the
|
|
5
|
-
* This is the inbound entrypoint for all traffic to the
|
|
4
|
+
* Internal HTTP server that runs inside the skill's Daytona sandbox.
|
|
5
|
+
* This is the inbound entrypoint for all traffic to the skill:
|
|
6
6
|
*
|
|
7
7
|
* Mission API → Daytona Preview URL → this server:
|
|
8
8
|
* POST /_mission/tools/:toolName — tool call dispatch
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* GET /{ingressPath} (ws upgrade) — WebSocket stream (e.g., Twilio media)
|
|
15
15
|
*
|
|
16
16
|
* The server is started by mission.connect() and stopped during graceful shutdown.
|
|
17
|
-
*
|
|
17
|
+
* Skill authors never interact with it directly — they register tool handlers
|
|
18
18
|
* and ingress handlers through the SDK, and this server routes to them.
|
|
19
19
|
*
|
|
20
|
-
* See docs/technical-designs/
|
|
20
|
+
* See docs/technical-designs/skill-architecture.md §4.1.
|
|
21
21
|
* See docs/technical-designs/daytona-sandbox-runtime.md §2-3.
|
|
22
22
|
*/
|
|
23
23
|
import * as http from 'node:http';
|
|
@@ -73,7 +73,7 @@ export function createHttpServer() {
|
|
|
73
73
|
const routes = [];
|
|
74
74
|
let server = null;
|
|
75
75
|
let _listenPort = 0;
|
|
76
|
-
const
|
|
76
|
+
const skillServer = {
|
|
77
77
|
server: null,
|
|
78
78
|
port: 0,
|
|
79
79
|
route(method, pattern, handler) {
|
|
@@ -133,8 +133,8 @@ export function createHttpServer() {
|
|
|
133
133
|
server.on('error', reject);
|
|
134
134
|
server.listen(port, () => {
|
|
135
135
|
_listenPort = port;
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
skillServer.server = server;
|
|
137
|
+
skillServer.port = port;
|
|
138
138
|
console.error(`[HttpServer] Listening on port ${port}`);
|
|
139
139
|
resolve();
|
|
140
140
|
});
|
|
@@ -158,6 +158,6 @@ export function createHttpServer() {
|
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
return
|
|
161
|
+
return skillServer;
|
|
162
162
|
}
|
|
163
163
|
//# sourceMappingURL=http-server.js.map
|
package/dist/http-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-server.js","sourceRoot":"","sources":["../src/http-server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAiCjC,gFAAgF;AAEhF,SAAS,gBAAgB,CAAC,EAAU;IAClC,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,IAAI,CAAC,EAAE;QAAE,OAAO,MAAM,CAAA;IACtB,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACpC,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,GAAyB;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAa,EAAE,CAAA;QAC3B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,K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ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mission SDK
|
|
3
3
|
*
|
|
4
|
-
* The SDK that
|
|
4
|
+
* The SDK that skill runtimes use to interact with the Mission platform.
|
|
5
5
|
* Communication is HTTP-native: outbound REST calls to the Mission API,
|
|
6
6
|
* inbound HTTP requests via Daytona Preview URLs.
|
|
7
7
|
*
|
|
8
|
-
* See docs/technical-designs/
|
|
8
|
+
* See docs/technical-designs/skill-architecture.md.
|
|
9
9
|
* See docs/technical-designs/daytona-sandbox-runtime.md.
|
|
10
10
|
*/
|
|
11
11
|
export type { Tool, ToolFunction, ToolFunctionPermission, ToolKind } from '@mission/models';
|
|
12
12
|
export type { ApiClient } from './api';
|
|
13
13
|
export type { AuthCredentials, AuthModule, OAuthCredentials } from './auth';
|
|
14
14
|
export type { ConfigModule } from './config';
|
|
15
|
-
export type {
|
|
15
|
+
export type { SkillContext } from './context';
|
|
16
16
|
export type { AgentMessage, EventsModule } from './events';
|
|
17
17
|
export type { IngressHandler, IngressModule, IngressRequest, IngressResponse, IngressStreamEvents, IngressUrl } from './ingress';
|
|
18
18
|
export type { LogModule } from './logging';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EACV,IAAI,EACJ,YAAY,EACZ,sBAAsB,EACtB,QAAQ,EACT,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EACV,IAAI,EACJ,YAAY,EACZ,sBAAsB,EACtB,QAAQ,EACT,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC1D,YAAY,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,UAAU,EACX,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAC1C,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mission SDK
|
|
3
3
|
*
|
|
4
|
-
* The SDK that
|
|
4
|
+
* The SDK that skill runtimes use to interact with the Mission platform.
|
|
5
5
|
* Communication is HTTP-native: outbound REST calls to the Mission API,
|
|
6
6
|
* inbound HTTP requests via Daytona Preview URLs.
|
|
7
7
|
*
|
|
8
|
-
* See docs/technical-designs/
|
|
8
|
+
* See docs/technical-designs/skill-architecture.md.
|
|
9
9
|
* See docs/technical-designs/daytona-sandbox-runtime.md.
|
|
10
10
|
*/
|
|
11
11
|
export { createMissionSDK } from './sdk.js';
|
package/dist/ingress.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Ingress Module
|
|
3
3
|
*
|
|
4
4
|
* Handles inbound traffic from external services (webhooks, WebSocket streams).
|
|
5
|
-
*
|
|
5
|
+
* Skills register handlers per endpoint name; the HTTP server routes traffic
|
|
6
6
|
* to them.
|
|
7
7
|
*
|
|
8
8
|
* Traffic flow (HTTP-native, no WebSocket control plane):
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
* For WebSocket endpoints: event-based model (connect, message, disconnect).
|
|
23
23
|
* WebSocket support depends on Daytona Preview URL proxy supporting upgrades.
|
|
24
24
|
*
|
|
25
|
-
* Endpoint names are chosen by the
|
|
25
|
+
* Endpoint names are chosen by the skill author at registration time.
|
|
26
26
|
* There is no need to pre-declare them in mission.json — the SDK registers
|
|
27
27
|
* them dynamically and reports them to the control plane at ready().
|
|
28
28
|
*
|
|
29
|
-
* See docs/technical-designs/
|
|
29
|
+
* See docs/technical-designs/skill-architecture.md §4.4.
|
|
30
30
|
* See docs/technical-designs/daytona-sandbox-runtime.md §2-3.
|
|
31
31
|
*/
|
|
32
32
|
import type { ApiClient } from './api';
|
|
@@ -62,7 +62,7 @@ export type IngressStreamEvents = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Result from requesting a public ingress URL.
|
|
64
64
|
* The URL is a Daytona Signed Preview URL with a configurable TTL.
|
|
65
|
-
* The
|
|
65
|
+
* The skill is responsible for monitoring expiry and re-requesting.
|
|
66
66
|
*/
|
|
67
67
|
export type IngressUrl = {
|
|
68
68
|
/** The public URL to register with external services. */
|
|
@@ -73,7 +73,7 @@ export type IngressUrl = {
|
|
|
73
73
|
export type IngressModule = {
|
|
74
74
|
/**
|
|
75
75
|
* Register a handler for an HTTP ingress endpoint.
|
|
76
|
-
* The endpoint name is chosen by the
|
|
76
|
+
* The endpoint name is chosen by the skill author.
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
* ```ts
|
|
@@ -87,7 +87,7 @@ export type IngressModule = {
|
|
|
87
87
|
on: (endpointName: string, handler: IngressHandler) => void;
|
|
88
88
|
/**
|
|
89
89
|
* Register handlers for a WebSocket ingress endpoint.
|
|
90
|
-
* The endpoint name is chosen by the
|
|
90
|
+
* The endpoint name is chosen by the skill author.
|
|
91
91
|
*
|
|
92
92
|
* @example
|
|
93
93
|
* ```ts
|
|
@@ -103,12 +103,12 @@ export type IngressModule = {
|
|
|
103
103
|
* Get a public URL for a named ingress endpoint.
|
|
104
104
|
*
|
|
105
105
|
* The control plane generates a Daytona Signed Preview URL with a
|
|
106
|
-
* configurable TTL. The
|
|
106
|
+
* configurable TTL. The skill is responsible for:
|
|
107
107
|
* 1. Registering this URL with the external service.
|
|
108
108
|
* 2. Monitoring `expiresAt` and calling this again before expiry.
|
|
109
109
|
* 3. Re-registering the new URL with the external service.
|
|
110
110
|
*
|
|
111
|
-
* On sandbox restart,
|
|
111
|
+
* On sandbox restart, skill processes restart and naturally
|
|
112
112
|
* re-register during their startup sequence.
|
|
113
113
|
*
|
|
114
114
|
* @example
|
package/dist/ingress.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Ingress Module
|
|
3
3
|
*
|
|
4
4
|
* Handles inbound traffic from external services (webhooks, WebSocket streams).
|
|
5
|
-
*
|
|
5
|
+
* Skills register handlers per endpoint name; the HTTP server routes traffic
|
|
6
6
|
* to them.
|
|
7
7
|
*
|
|
8
8
|
* Traffic flow (HTTP-native, no WebSocket control plane):
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
* For WebSocket endpoints: event-based model (connect, message, disconnect).
|
|
23
23
|
* WebSocket support depends on Daytona Preview URL proxy supporting upgrades.
|
|
24
24
|
*
|
|
25
|
-
* Endpoint names are chosen by the
|
|
25
|
+
* Endpoint names are chosen by the skill author at registration time.
|
|
26
26
|
* There is no need to pre-declare them in mission.json — the SDK registers
|
|
27
27
|
* them dynamically and reports them to the control plane at ready().
|
|
28
28
|
*
|
|
29
|
-
* See docs/technical-designs/
|
|
29
|
+
* See docs/technical-designs/skill-architecture.md §4.4.
|
|
30
30
|
* See docs/technical-designs/daytona-sandbox-runtime.md §2-3.
|
|
31
31
|
*/
|
|
32
32
|
// ─── Factory ─────────────────────────────────────────────────────────────────
|
|
@@ -47,7 +47,7 @@ export function createIngressRegistry(api) {
|
|
|
47
47
|
streamHandlers.set(endpointName, handlers);
|
|
48
48
|
},
|
|
49
49
|
getPublicUrl: async (endpointName) => {
|
|
50
|
-
const result = (await api.trpc.
|
|
50
|
+
const result = (await api.trpc.skill.getIngressUrl.query({
|
|
51
51
|
name: endpointName
|
|
52
52
|
}));
|
|
53
53
|
return result;
|
package/dist/ingress.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingress.js","sourceRoot":"","sources":["../src/ingress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAmIH,gFAAgF;AAEhF,MAAM,UAAU,qBAAqB,CAAC,GAAc;IAClD,MAAM,YAAY,GAAG,IAAI,GAAG,EAA0B,CAAA;IACtD,MAAM,cAAc,GAAG,IAAI,GAAG,EAA+B,CAAA;IAE7D,OAAO;QACL,EAAE,CAAC,YAAoB,EAAE,OAAuB;YAC9C,IAAI,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,KAAK,CACX,+CAA+C,YAAY,GAAG,CAC/D,CAAA;YACH,CAAC;YACD,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QACzC,CAAC;QAED,QAAQ,CAAC,YAAoB,EAAE,QAA6B;YAC1D,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACrC,OAAO,CAAC,KAAK,CACX,uDAAuD,YAAY,GAAG,CACvE,CAAA;YACH,CAAC;YACD,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;QAC5C,CAAC;QAED,YAAY,EAAE,KAAK,EAAE,YAAoB,EAAuB,EAAE;YAChE,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,CA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ACjE,CAAA;gBACD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,4BAA4B,YAAY,EAAE,EAAE,CAAA;YAC1E,CAAC;YACD,OAAO,OAAO,CAAC,OAAO,CAAC,CAAA;QACzB,CAAC;QAED,mBAAmB,CACjB,YAAoB,EACpB,KAA2C,EAC3C,QAAgB,EAChB,IAAa,EACb,QAAiC;YAEjC,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;YACjD,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,OAAO,CAAC,KAAK,CACX,8CAA8C,YAAY,GAAG,CAC9D,CAAA;gBACD,OAAM;YACR,CAAC;YACD,QAAQ,KAAK,EAAE,CAAC;gBACd,KAAK,SAAS;oBACZ,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAA;oBAC5C,MAAK;gBACP,KAAK,SAAS;oBACZ,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,CAAA;oBACxC,MAAK;gBACP,KAAK,YAAY;oBACf,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA;oBAC/B,MAAK;YACT,CAAC;QACH,CAAC;QAED,oBAAoB;YAClB,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAA;QACxC,CAAC;QAED,sBAAsB;YACpB,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAA;QAC1C,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/logging.d.ts
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
* Provides two logging mechanisms:
|
|
5
5
|
*
|
|
6
6
|
* 1. Console capture — overrides the global `console` object so that
|
|
7
|
-
*
|
|
7
|
+
* skill authors who use `console.log()` naturally get their logs
|
|
8
8
|
* forwarded to the Mission logging pipeline.
|
|
9
9
|
*
|
|
10
|
-
* 2. Structured logger — `mission.log.info(message, data?)` for
|
|
10
|
+
* 2. Structured logger — `mission.log.info(message, data?)` for skills
|
|
11
11
|
* that want explicit, structured logging with context.
|
|
12
12
|
*
|
|
13
13
|
* Both paths feed into the same batched transport. Log entries are
|
|
14
14
|
* buffered in memory and flushed every few seconds (or on threshold)
|
|
15
|
-
* to the Gateway via `
|
|
15
|
+
* to the Gateway via `skill.ingestLogs`. The Gateway enriches entries
|
|
16
16
|
* with installation metadata and forwards them to Better Stack.
|
|
17
17
|
*
|
|
18
|
-
* Transport:
|
|
18
|
+
* Transport: skill.ingestLogs tRPC mutation (batched, fire-and-forget).
|
|
19
19
|
*/
|
|
20
20
|
import type { ApiClient } from './api';
|
|
21
21
|
type LogLevel = 'log' | 'error' | 'warn' | 'info' | 'debug';
|
package/dist/logging.js
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
* Provides two logging mechanisms:
|
|
5
5
|
*
|
|
6
6
|
* 1. Console capture — overrides the global `console` object so that
|
|
7
|
-
*
|
|
7
|
+
* skill authors who use `console.log()` naturally get their logs
|
|
8
8
|
* forwarded to the Mission logging pipeline.
|
|
9
9
|
*
|
|
10
|
-
* 2. Structured logger — `mission.log.info(message, data?)` for
|
|
10
|
+
* 2. Structured logger — `mission.log.info(message, data?)` for skills
|
|
11
11
|
* that want explicit, structured logging with context.
|
|
12
12
|
*
|
|
13
13
|
* Both paths feed into the same batched transport. Log entries are
|
|
14
14
|
* buffered in memory and flushed every few seconds (or on threshold)
|
|
15
|
-
* to the Gateway via `
|
|
15
|
+
* to the Gateway via `skill.ingestLogs`. The Gateway enriches entries
|
|
16
16
|
* with installation metadata and forwards them to Better Stack.
|
|
17
17
|
*
|
|
18
|
-
* Transport:
|
|
18
|
+
* Transport: skill.ingestLogs tRPC mutation (batched, fire-and-forget).
|
|
19
19
|
*/
|
|
20
20
|
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
21
21
|
/** How often to flush the log buffer (ms). */
|
|
@@ -50,7 +50,7 @@ async function flush() {
|
|
|
50
50
|
const entries = buffer;
|
|
51
51
|
buffer = [];
|
|
52
52
|
try {
|
|
53
|
-
await apiRef.trpc.
|
|
53
|
+
await apiRef.trpc.skill.ingestLogs.mutate({ entries });
|
|
54
54
|
}
|
|
55
55
|
catch (err) {
|
|
56
56
|
getOriginal().error('[Logging] Flush failed:', err);
|