@inline-openclaw/inline 0.0.19 → 0.0.21

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 (45) hide show
  1. package/README.md +15 -0
  2. package/dist/index.d.ts +10 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +2335 -181
  5. package/dist/index.js.map +20 -14
  6. package/dist/inline/accounts.d.ts +20 -0
  7. package/dist/inline/accounts.d.ts.map +1 -0
  8. package/dist/inline/actions.d.ts +4 -0
  9. package/dist/inline/actions.d.ts.map +1 -0
  10. package/dist/inline/bot-commands-api.d.ts +16 -0
  11. package/dist/inline/bot-commands-api.d.ts.map +1 -0
  12. package/dist/inline/bot-commands-sync.d.ts +16 -0
  13. package/dist/inline/bot-commands-sync.d.ts.map +1 -0
  14. package/dist/inline/bot-commands-tool.d.ts +6 -0
  15. package/dist/inline/bot-commands-tool.d.ts.map +1 -0
  16. package/dist/inline/channel.d.ts +4 -0
  17. package/dist/inline/channel.d.ts.map +1 -0
  18. package/dist/inline/command-menu-compat.d.ts +24 -0
  19. package/dist/inline/command-menu-compat.d.ts.map +1 -0
  20. package/dist/inline/config-schema.d.ts +495 -0
  21. package/dist/inline/config-schema.d.ts.map +1 -0
  22. package/dist/inline/media.d.ts +9 -0
  23. package/dist/inline/media.d.ts.map +1 -0
  24. package/dist/inline/members-tool.d.ts +6 -0
  25. package/dist/inline/members-tool.d.ts.map +1 -0
  26. package/dist/inline/message-content.d.ts +51 -0
  27. package/dist/inline/message-content.d.ts.map +1 -0
  28. package/dist/inline/message-formatting.d.ts +4 -0
  29. package/dist/inline/message-formatting.d.ts.map +1 -0
  30. package/dist/inline/message-tools.d.ts +10 -0
  31. package/dist/inline/message-tools.d.ts.map +1 -0
  32. package/dist/inline/monitor.d.ts +26 -0
  33. package/dist/inline/monitor.d.ts.map +1 -0
  34. package/dist/inline/normalize.d.ts +3 -0
  35. package/dist/inline/normalize.d.ts.map +1 -0
  36. package/dist/inline/policy.d.ts +19 -0
  37. package/dist/inline/policy.d.ts.map +1 -0
  38. package/dist/inline/profile-tool.d.ts +6 -0
  39. package/dist/inline/profile-tool.d.ts.map +1 -0
  40. package/dist/inline/space-members.d.ts +22 -0
  41. package/dist/inline/space-members.d.ts.map +1 -0
  42. package/dist/runtime.d.ts +4 -0
  43. package/dist/runtime.d.ts.map +1 -0
  44. package/dist/tsconfig.tsbuildinfo +1 -0
  45. package/package.json +4 -4
@@ -0,0 +1,51 @@
1
+ import type { Message } from "@inline-chat/realtime-sdk";
2
+ export type InlineMessageMediaSummary = {
3
+ kind: "photo" | "video" | "document" | "nudge";
4
+ id: string | null;
5
+ url: string | null;
6
+ fileName?: string | null;
7
+ mimeType?: string | null;
8
+ sizeBytes?: number | null;
9
+ width?: number | null;
10
+ height?: number | null;
11
+ durationSeconds?: number | null;
12
+ } | null;
13
+ export type InlineMessageAttachmentSummary = {
14
+ kind: "urlPreview";
15
+ id: string | null;
16
+ url: string | null;
17
+ siteName: string | null;
18
+ title: string | null;
19
+ description: string | null;
20
+ previewImageUrl: string | null;
21
+ } | {
22
+ kind: "externalTask";
23
+ id: string | null;
24
+ url: string | null;
25
+ application: string | null;
26
+ title: string | null;
27
+ taskId: string | null;
28
+ number: string | null;
29
+ };
30
+ export type InlineMessageContent = {
31
+ text: string;
32
+ rawText: string;
33
+ attachmentText: string;
34
+ entityText: string;
35
+ links: string[];
36
+ attachmentUrls: string[];
37
+ media: InlineMessageMediaSummary;
38
+ attachments: InlineMessageAttachmentSummary[];
39
+ entities: InlineMessageEntitySummary[];
40
+ };
41
+ export type InlineMessageEntitySummary = {
42
+ type: "mention" | "url" | "text_link" | "email" | "bold" | "italic" | "username_mention" | "code" | "pre" | "phone_number" | "unknown";
43
+ offset: number;
44
+ length: number;
45
+ text?: string;
46
+ userId?: string;
47
+ url?: string;
48
+ language?: string;
49
+ };
50
+ export declare function summarizeInlineMessageContent(message: Message): InlineMessageContent;
51
+ //# sourceMappingURL=message-content.d.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,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,CAAA;AAEL,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,KAAK,EAAE,yBAAyB,CAAA;IAChC,WAAW,EAAE,8BAA8B,EAAE,CAAA;IAC7C,QAAQ,EAAE,0BAA0B,EAAE,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EACA,SAAS,GACT,KAAK,GACL,WAAW,GACX,OAAO,GACP,MAAM,GACN,QAAQ,GACR,kBAAkB,GAClB,MAAM,GACN,KAAK,GACL,cAAc,GACd,SAAS,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAwRD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,OAAO,GAAG,oBAAoB,CAuCpF"}
@@ -0,0 +1,4 @@
1
+ export declare const INLINE_FORMATTING_NOTE = "Inline formatting note: prefer bullet lists over markdown tables. If a table is necessary, render it inside a fenced code block. Do not wrap bare URLs in inline code or backticks. Use plain URLs or markdown links. Use inline code only for actual code, commands, file paths, env vars, or identifiers.";
2
+ export declare function buildInlineSystemPrompt(extraPrompt?: string): string;
3
+ export declare function sanitizeInlineOutgoingText(text: string): string;
4
+ //# sourceMappingURL=message-formatting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-formatting.d.ts","sourceRoot":"","sources":["../../src/inline/message-formatting.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,gTAC4Q,CAAA;AAe/S,wBAAgB,uBAAuB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAIpE;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/D"}
@@ -0,0 +1,10 @@
1
+ import { type AnyAgentTool, type OpenClawConfig } from "openclaw/plugin-sdk";
2
+ type InlineMessageToolContext = {
3
+ config?: OpenClawConfig;
4
+ agentAccountId?: string;
5
+ sessionKey?: string;
6
+ messageChannel?: string;
7
+ };
8
+ export declare function createInlineMessageTools(ctx: InlineMessageToolContext): AnyAgentTool[];
9
+ export {};
10
+ //# sourceMappingURL=message-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-tools.d.ts","sourceRoot":"","sources":["../../src/inline/message-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAA;AAK5B,KAAK,wBAAwB,GAAG;IAC9B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAycD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,wBAAwB,GAAG,YAAY,EAAE,CAGtF"}
@@ -0,0 +1,26 @@
1
+ import { type OpenClawConfig, type RuntimeEnv } from "openclaw/plugin-sdk";
2
+ import { type ResolvedInlineAccount } from "./accounts.js";
3
+ type InlineMonitorHandle = {
4
+ stop: () => Promise<void>;
5
+ done: Promise<void>;
6
+ };
7
+ type StatusSink = (patch: {
8
+ lastInboundAt?: number;
9
+ lastOutboundAt?: number;
10
+ lastError?: string;
11
+ }) => void;
12
+ export declare function monitorInlineProvider(params: {
13
+ cfg: OpenClawConfig;
14
+ account: ResolvedInlineAccount;
15
+ runtime: RuntimeEnv;
16
+ abortSignal: AbortSignal;
17
+ log?: {
18
+ info: (msg: string) => void;
19
+ warn: (msg: string) => void;
20
+ error: (msg: string) => void;
21
+ debug?: (msg: string) => void;
22
+ };
23
+ statusSink?: StatusSink;
24
+ }): Promise<InlineMonitorHandle>;
25
+ export {};
26
+ //# sourceMappingURL=monitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/inline/monitor.ts"],"names":[],"mappings":"AAEA,OAAO,EAUL,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAsB,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAU9E,KAAK,mBAAmB,GAAG;IACzB,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;CACpB,CAAA;AAED,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,CAAA;AAovB1G,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,GAAG,EAAE,cAAc,CAAA;IACnB,OAAO,EAAE,qBAAqB,CAAA;IAC9B,OAAO,EAAE,UAAU,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;IACxB,GAAG,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;IAC/H,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA+5B/B"}
@@ -0,0 +1,3 @@
1
+ export declare function normalizeInlineTarget(raw: string): string | undefined;
2
+ export declare function looksLikeInlineTargetId(raw: string, normalizedInput?: string): boolean;
3
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/inline/normalize.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiBrE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAKtF"}
@@ -0,0 +1,19 @@
1
+ import { type OpenClawConfig } from "openclaw/plugin-sdk";
2
+ type InlineToolPolicy = Record<string, unknown>;
3
+ export declare function resolveInlineGroupRequireMention(params: {
4
+ cfg: OpenClawConfig;
5
+ accountId: string | null | undefined;
6
+ groupId: string | null | undefined;
7
+ requireMentionDefault: boolean;
8
+ }): boolean;
9
+ export declare function resolveInlineGroupToolPolicy(params: {
10
+ cfg: OpenClawConfig;
11
+ accountId: string | null | undefined;
12
+ groupId: string | null | undefined;
13
+ senderId: string | null | undefined;
14
+ senderName: string | null | undefined;
15
+ senderUsername: string | null | undefined;
16
+ senderE164: string | null | undefined;
17
+ }): InlineToolPolicy | undefined;
18
+ export {};
19
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/inline/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzG,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AA2F/C,wBAAgB,gCAAgC,CAAC,MAAM,EAAE;IACvD,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACpC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,qBAAqB,EAAE,OAAO,CAAA;CAC/B,GAAG,OAAO,CAOV;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IACnD,GAAG,EAAE,cAAc,CAAA;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACpC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACtC,GAAG,gBAAgB,GAAG,SAAS,CAwB/B"}
@@ -0,0 +1,6 @@
1
+ import { type AnyAgentTool, type OpenClawConfig } from "openclaw/plugin-sdk";
2
+ export declare function createInlineProfileTool(ctx: {
3
+ config?: OpenClawConfig;
4
+ agentAccountId?: string;
5
+ }): AnyAgentTool | null;
6
+ //# sourceMappingURL=profile-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-tool.d.ts","sourceRoot":"","sources":["../../src/inline/profile-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAA;AA8G5B,wBAAgB,uBAAuB,CAAC,GAAG,EAAE;IAC3C,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,YAAY,GAAG,IAAI,CAyDtB"}
@@ -0,0 +1,22 @@
1
+ import { InlineSdkClient } from "@inline-chat/realtime-sdk";
2
+ export type InlineSpaceMemberRecord = {
3
+ userId: string;
4
+ role: "owner" | "admin" | "member" | null;
5
+ canAccessPublicChats: boolean | undefined;
6
+ date: number;
7
+ user: {
8
+ id: string;
9
+ name: string;
10
+ username: string | null;
11
+ } | null;
12
+ };
13
+ export declare function buildInlineUserDisplayName(user: {
14
+ firstName?: string;
15
+ lastName?: string;
16
+ username?: string;
17
+ }): string;
18
+ export declare function getSpaceMembersWithUsers(params: {
19
+ client: InlineSdkClient;
20
+ spaceId: bigint;
21
+ }): Promise<InlineSpaceMemberRecord[]>;
22
+ //# sourceMappingURL=space-members.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-members.d.ts","sourceRoot":"","sources":["../../src/inline/space-members.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,2BAA2B,CAAA;AAElC,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAA;IACzC,oBAAoB,EAAE,OAAO,GAAG,SAAS,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KACxB,GAAG,IAAI,CAAA;CACT,CAAA;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,CAMT;AAkBD,wBAAsB,wBAAwB,CAAC,MAAM,EAAE;IACrD,MAAM,EAAE,eAAe,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA4BrC"}
@@ -0,0 +1,4 @@
1
+ import type { PluginRuntime } from "openclaw/plugin-sdk";
2
+ export declare function setInlineRuntime(next: PluginRuntime): void;
3
+ export declare function getInlineRuntime(): PluginRuntime;
4
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAE1D;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAKhD"}