@tangle-network/agent-app 0.58.15 → 0.58.17

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 (77) hide show
  1. package/dist/VaultPane-RIJM452Y.js +7 -0
  2. package/dist/assistant/index.js +13 -11
  3. package/dist/assistant/index.js.map +1 -1
  4. package/dist/chat-react/index.js +4 -4
  5. package/dist/chat-routes/index.js +4 -4
  6. package/dist/chat-store/index.js +2 -2
  7. package/dist/{chunk-POE5UUUT.js → chunk-55JJKE7S.js} +3 -3
  8. package/dist/chunk-B7CL7ENS.js +118 -0
  9. package/dist/chunk-B7CL7ENS.js.map +1 -0
  10. package/dist/{chunk-EXBAVMMK.js → chunk-DECJLOS4.js} +347 -311
  11. package/dist/chunk-DECJLOS4.js.map +1 -0
  12. package/dist/{chunk-NWR5CERQ.js → chunk-FNRUXPXE.js} +2 -2
  13. package/dist/{chunk-T5U7LDQW.js → chunk-HG4OONJA.js} +53 -15
  14. package/dist/chunk-HG4OONJA.js.map +1 -0
  15. package/dist/{chunk-WTGSLW5X.js → chunk-HTAFI247.js} +4 -4
  16. package/dist/{chunk-MLG7YSTS.js → chunk-KHCJKVQN.js} +3 -3
  17. package/dist/{chunk-GIBNG64C.js → chunk-LYDOZKSX.js} +2607 -1438
  18. package/dist/chunk-LYDOZKSX.js.map +1 -0
  19. package/dist/{chunk-57TTYY6T.js → chunk-NJDQ2JCP.js} +2 -2
  20. package/dist/chunk-PV33JZKV.js +115 -0
  21. package/dist/chunk-PV33JZKV.js.map +1 -0
  22. package/dist/{chunk-EN5CP7T7.js → chunk-T5PPQPOD.js} +5 -111
  23. package/dist/chunk-T5PPQPOD.js.map +1 -0
  24. package/dist/{chunk-DWUBICLW.js → chunk-UGPV7VEW.js} +569 -236
  25. package/dist/chunk-UGPV7VEW.js.map +1 -0
  26. package/dist/{chunk-TUNRLEDH.js → chunk-XEURJVS5.js} +2 -2
  27. package/dist/{mention-editor-W2GG2NZ7.js → mention-editor-5KXHSBDJ.js} +2 -2
  28. package/dist/preset-cloudflare/index.js +3 -3
  29. package/dist/profile/index.js +4 -2
  30. package/dist/profile/index.js.map +1 -1
  31. package/dist/profile-editor/index.d.ts +185 -0
  32. package/dist/profile-editor/index.js +18 -0
  33. package/dist/profile-editor/index.js.map +1 -0
  34. package/dist/profile-editor/server.d.ts +112 -0
  35. package/dist/profile-editor/server.js +635 -0
  36. package/dist/profile-editor/server.js.map +1 -0
  37. package/dist/public-consultation/index.js +4 -4
  38. package/dist/skills/frontmatter.d.ts +43 -0
  39. package/dist/skills/index.d.ts +1 -38
  40. package/dist/skills/index.js +4 -2
  41. package/dist/skills-placement/index.js +2 -1
  42. package/dist/skills-placement/index.js.map +1 -1
  43. package/dist/stories/fixtures/profile-editor.d.ts +17 -0
  44. package/dist/studio-react/index.js +3 -3
  45. package/dist/teams/invitations-api.js +3 -3
  46. package/dist/vault/VaultPane.d.ts +4 -4
  47. package/dist/vault/VaultTree.d.ts +39 -0
  48. package/dist/vault/contracts.d.ts +17 -7
  49. package/dist/vault/index.d.ts +5 -4
  50. package/dist/vault/index.js +7 -3
  51. package/dist/vault/lazy.js +1 -1
  52. package/dist/web-react/agent-profile-editor.d.ts +63 -1
  53. package/dist/web-react/agent-profile-files.d.ts +38 -0
  54. package/dist/web-react/agent-profile-form-kit.d.ts +87 -0
  55. package/dist/web-react/agent-profile-github-source.d.ts +35 -0
  56. package/dist/web-react/agent-profile-mcp-servers.d.ts +20 -0
  57. package/dist/web-react/agent-profile-suggest-input.d.ts +31 -0
  58. package/dist/web-react/agent-session-controls.d.ts +51 -0
  59. package/dist/web-react/controls.d.ts +29 -3
  60. package/dist/web-react/index.d.ts +3 -2
  61. package/dist/web-react/index.js +23 -15
  62. package/dist/workspace-react/index.js +4 -4
  63. package/package.json +11 -1
  64. package/dist/VaultPane-SPXE7XAC.js +0 -7
  65. package/dist/chunk-DWUBICLW.js.map +0 -1
  66. package/dist/chunk-EN5CP7T7.js.map +0 -1
  67. package/dist/chunk-EXBAVMMK.js.map +0 -1
  68. package/dist/chunk-GIBNG64C.js.map +0 -1
  69. package/dist/chunk-T5U7LDQW.js.map +0 -1
  70. /package/dist/{VaultPane-SPXE7XAC.js.map → VaultPane-RIJM452Y.js.map} +0 -0
  71. /package/dist/{chunk-POE5UUUT.js.map → chunk-55JJKE7S.js.map} +0 -0
  72. /package/dist/{chunk-NWR5CERQ.js.map → chunk-FNRUXPXE.js.map} +0 -0
  73. /package/dist/{chunk-WTGSLW5X.js.map → chunk-HTAFI247.js.map} +0 -0
  74. /package/dist/{chunk-MLG7YSTS.js.map → chunk-KHCJKVQN.js.map} +0 -0
  75. /package/dist/{chunk-57TTYY6T.js.map → chunk-NJDQ2JCP.js.map} +0 -0
  76. /package/dist/{chunk-TUNRLEDH.js.map → chunk-XEURJVS5.js.map} +0 -0
  77. /package/dist/{mention-editor-W2GG2NZ7.js.map → mention-editor-5KXHSBDJ.js.map} +0 -0
@@ -0,0 +1,18 @@
1
+ import {
2
+ PROFILE_EDITOR_ROUTES,
3
+ createProfileEditorClient,
4
+ isCommitSha,
5
+ parseGitHubLocation,
6
+ publicHttpsUrlProblem,
7
+ readSkillFrontmatter
8
+ } from "../chunk-B7CL7ENS.js";
9
+ import "../chunk-PV33JZKV.js";
10
+ export {
11
+ PROFILE_EDITOR_ROUTES,
12
+ createProfileEditorClient,
13
+ isCommitSha,
14
+ parseGitHubLocation,
15
+ publicHttpsUrlProblem,
16
+ readSkillFrontmatter
17
+ };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,112 @@
1
+ import type { AgentProfileMcpServer } from '@tangle-network/agent-interface/profile';
2
+ import { type McpHealth, type ProfileEditorGitHubPort, type ProfileEditorMcpPort } from './index';
3
+ export * from './index';
4
+ /**
5
+ * A GitHub read failure. `status` is the HTTP status GitHub returned, or
6
+ * `not-connected` when the workspace has no usable connection, or
7
+ * `unsupported` when the transport cannot perform the operation.
8
+ */
9
+ export declare class GitHubReadError extends Error {
10
+ readonly status: number | 'not-connected' | 'unsupported';
11
+ readonly rateLimited: boolean;
12
+ constructor(status: number | 'not-connected' | 'unsupported', message: string, rateLimited?: boolean);
13
+ }
14
+ export interface GitHubRepositoryRecord {
15
+ fullName: string;
16
+ private: boolean;
17
+ defaultBranch: string;
18
+ description?: string | null;
19
+ }
20
+ export interface GitHubCommitRecord {
21
+ sha: string;
22
+ treeSha: string;
23
+ committedAt?: string;
24
+ message?: string;
25
+ }
26
+ export interface GitHubTreeRecord {
27
+ entries: {
28
+ path: string;
29
+ type: 'blob' | 'tree' | 'commit';
30
+ sha: string;
31
+ size?: number;
32
+ }[];
33
+ truncated: boolean;
34
+ }
35
+ /**
36
+ * The GitHub operations the source service needs. Implementations throw
37
+ * {@link GitHubReadError} for GitHub refusals so the service can explain them.
38
+ */
39
+ export interface GitHubSourceReader {
40
+ /** Repositories the credential can read, most recently pushed first. Omit when the transport cannot list them. */
41
+ listRepositories?(signal?: AbortSignal): Promise<GitHubRepositoryRecord[]>;
42
+ getRepository(owner: string, repo: string, signal?: AbortSignal): Promise<GitHubRepositoryRecord>;
43
+ getBranchHead(owner: string, repo: string, branch: string, signal?: AbortSignal): Promise<GitHubCommitRecord>;
44
+ /** Resolve a full commit SHA, throwing a 404 or 422 when it is absent. */
45
+ getCommit(owner: string, repo: string, sha: string, signal?: AbortSignal): Promise<GitHubCommitRecord>;
46
+ /** The recursive tree of a commit or tree SHA. */
47
+ getTree(owner: string, repo: string, sha: string, signal?: AbortSignal): Promise<GitHubTreeRecord>;
48
+ /** A blob's bytes. */
49
+ getBlob(owner: string, repo: string, sha: string, signal?: AbortSignal): Promise<Uint8Array>;
50
+ }
51
+ export interface GitHubRestReaderOptions {
52
+ /** A token for the person or installation. Without one, only public repositories resolve and listing is unavailable. */
53
+ token?: string;
54
+ fetch?: typeof fetch;
55
+ baseUrl?: string;
56
+ timeoutMs?: number;
57
+ }
58
+ /** Parse GitHub REST payloads shared by the REST reader and other transports that relay GitHub's JSON. */
59
+ export declare const githubPayload: {
60
+ repository(value: unknown): GitHubRepositoryRecord;
61
+ repositories(value: unknown): GitHubRepositoryRecord[];
62
+ branch(value: unknown): GitHubCommitRecord;
63
+ commit(value: unknown): GitHubCommitRecord;
64
+ tree(value: unknown): GitHubTreeRecord;
65
+ blob(value: unknown): Uint8Array;
66
+ };
67
+ /** A reader over GitHub's REST API with a person or installation token. */
68
+ export declare function createGitHubRestReader(options?: GitHubRestReaderOptions): GitHubSourceReader;
69
+ export interface GitHubSourceServiceOptions {
70
+ /** Largest file the product stores or fetches, in bytes. Defaults to 256 KiB. */
71
+ maxFileBytes?: number;
72
+ /** Most paths returned for suggestions. Defaults to 5,000. */
73
+ maxFiles?: number;
74
+ }
75
+ /**
76
+ * The editor's GitHub port, computed from a reader. Lookups are typed
77
+ * outcomes; nothing here throws for a GitHub refusal.
78
+ */
79
+ export declare function createGitHubSourceService(reader: GitHubSourceReader, options?: GitHubSourceServiceOptions): ProfileEditorGitHubPort;
80
+ export declare function formatBytes(bytes: number): string;
81
+ export interface McpHealthCheckOptions {
82
+ fetch?: typeof fetch;
83
+ /** Total time for the whole check. Defaults to 8 seconds. */
84
+ timeoutMs?: number;
85
+ /** The address policy. Return the reason an address is refused, or null. Defaults to {@link publicHttpsUrlProblem}. */
86
+ urlProblem?: (url: string) => string | null;
87
+ clientInfo?: {
88
+ name: string;
89
+ version: string;
90
+ };
91
+ }
92
+ /**
93
+ * Connect to a remote MCP server, initialize a session, and list its tools.
94
+ * Speaks Streamable HTTP, and the HTTP+SSE transport when the server declares
95
+ * `transport: 'sse'`. Public header values are sent; secret references are not
96
+ * resolved here, so a server that requires them reports `auth-required`.
97
+ */
98
+ export declare function checkMcpServer(server: AgentProfileMcpServer, options?: McpHealthCheckOptions): Promise<McpHealth>;
99
+ /** The editor's MCP port, running checks in this process with the given address policy. */
100
+ export declare function createMcpHealthChecker(options?: McpHealthCheckOptions): ProfileEditorMcpPort;
101
+ export interface ProfileEditorHandlerOptions {
102
+ /** GitHub lookups for this workspace. Null when the product offers no GitHub sources. */
103
+ github: ProfileEditorGitHubPort | null;
104
+ /** MCP checks. Null when the product offers no MCP servers. */
105
+ mcp: ProfileEditorMcpPort | null;
106
+ }
107
+ /**
108
+ * Serve the editor's checks. Call it after authenticating the user and
109
+ * authorizing the workspace, with the path below the editor endpoint
110
+ * (for example `github/files`). Unknown paths answer 404.
111
+ */
112
+ export declare function handleProfileEditorRequest(request: Request, path: string, options: ProfileEditorHandlerOptions): Promise<Response>;