@zibby/skills 0.1.95 → 0.2.0

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/artifact.d.ts +1 -115
  3. package/dist/browser.d.ts +10 -19
  4. package/dist/chartRender.d.ts +46 -57
  5. package/dist/chartRender.js +1 -1
  6. package/dist/chat-memory.d.ts +26 -330
  7. package/dist/chat-notify.d.ts +30 -409
  8. package/dist/chat-notify.js +3 -3
  9. package/dist/chatProgress.d.ts +28 -47
  10. package/dist/code-scan.d.ts +52 -58
  11. package/dist/codeStats.d.ts +36 -136
  12. package/dist/codeStats.js +1 -1
  13. package/dist/codebaseMemory.d.ts +52 -32
  14. package/dist/codebaseMemory.js +2 -2
  15. package/dist/core-tools.d.ts +10 -131
  16. package/dist/datasetStore.d.ts +52 -179
  17. package/dist/datasetStore.js +12 -3
  18. package/dist/discord.d.ts +32 -68
  19. package/dist/figma.d.ts +5 -408
  20. package/dist/function-skill.d.ts +23 -135
  21. package/dist/function-skill.js +1 -1
  22. package/dist/gbrain.d.ts +46 -114
  23. package/dist/git-write.d.ts +45 -137
  24. package/dist/git-write.js +6 -6
  25. package/dist/git.d.ts +2 -73
  26. package/dist/github.d.ts +2 -1202
  27. package/dist/gitlab.d.ts +55 -1059
  28. package/dist/gitlab.js +2 -2
  29. package/dist/googleDocs.d.ts +39 -175
  30. package/dist/hubspot.d.ts +1 -381
  31. package/dist/index.d.ts +19 -12
  32. package/dist/index.js +157 -148
  33. package/dist/integrations.d.ts +2 -2
  34. package/dist/jira.d.ts +2 -532
  35. package/dist/jira.js +4 -4
  36. package/dist/kvMemory.d.ts +47 -78
  37. package/dist/lark.d.ts +2 -161
  38. package/dist/lark.js +1 -1
  39. package/dist/larkDocs.d.ts +35 -236
  40. package/dist/linear.d.ts +36 -343
  41. package/dist/linkedin.d.ts +10 -120
  42. package/dist/llm-billing.d.ts +92 -180
  43. package/dist/llm-billing.js +1 -1
  44. package/dist/memory.d.ts +11 -137
  45. package/dist/notion.d.ts +28 -276
  46. package/dist/notion.js +4 -4
  47. package/dist/opendesign.d.ts +24 -202
  48. package/dist/opendesign.js +2 -2
  49. package/dist/package.json +3 -2
  50. package/dist/plane.d.ts +40 -24
  51. package/dist/report.d.ts +153 -110
  52. package/dist/review-dedup.d.ts +8 -8
  53. package/dist/review.d.ts +12 -2
  54. package/dist/reviewMemoryIo.d.ts +37 -3
  55. package/dist/reviewRecord.d.ts +41 -47
  56. package/dist/sentry.d.ts +25 -22
  57. package/dist/skill-installer.d.ts +11 -86
  58. package/dist/slack.d.ts +1 -284
  59. package/dist/socialCard.d.ts +35 -89
  60. package/dist/test-runner.d.ts +1 -220
  61. package/dist/trackers/github-adapter.d.ts +39 -94
  62. package/dist/trackers/index.d.ts +25 -18
  63. package/dist/trackers/jira-adapter.d.ts +20 -88
  64. package/dist/trackers/linear-adapter.d.ts +24 -87
  65. package/dist/trackers/plane-adapter.d.ts +29 -85
  66. package/dist/trackers/plane-adapter.js +1 -1
  67. package/dist/trackers/types.d.ts +1 -186
  68. package/dist/triggerAgent.d.ts +26 -42
  69. package/dist/triggerAgent.js +1 -1
  70. package/dist/workflow-builder.d.ts +11 -245
  71. package/docs/cli-reference.md +33 -0
  72. package/docs/concepts/designing-agents.md +201 -0
  73. package/docs/self-host/backup-restore.md +52 -0
  74. package/docs/self-host/index.md +75 -0
  75. package/docs/self-host/storage.md +50 -0
  76. package/docs/self-host/troubleshooting.md +48 -0
  77. package/docs/self-host/upgrade.md +81 -0
  78. package/package.json +3 -2
package/dist/gbrain.d.ts CHANGED
@@ -1,115 +1,47 @@
1
- export namespace gbrainSkill {
2
- let id: string;
3
- let serverName: string;
4
- let allowedTools: string[];
5
- let meta: any;
6
- let description: string;
7
- let promptFragment: string;
8
- /**
9
- * Spawn the GENERIC skill MCP server (bin/mcp-skill.mjs) pointing at this
10
- * module's gbrainSkill export same FIXED pattern as datasetStore. Forwards
11
- * the backend-auth env + every bound-store mapping the spawned process needs.
12
- */
13
- function resolve(): {
14
- command: any;
15
- args: any[];
16
- env: {};
17
- description: string;
18
- type?: undefined;
19
- alwaysLoad?: undefined;
20
- } | {
21
- type: string;
22
- command: string;
23
- args: any[];
24
- env: {};
25
- description: string;
26
- alwaysLoad: boolean;
27
- };
28
- function handleToolCall(name: any, args: any): Promise<string>;
29
- let tools: ({
30
- name: string;
31
- description: string;
32
- input_schema: {
33
- type: string;
34
- properties: {
35
- docs: {
36
- type: string;
37
- description: string;
38
- items: {
39
- type: string;
40
- properties: {
41
- sourceId: {
42
- type: string;
43
- description: string;
44
- };
45
- markdown: {
46
- type: string;
47
- description: string;
48
- };
49
- deleted: {
50
- type: string;
51
- description: string;
52
- };
53
- };
54
- required: string[];
55
- };
56
- };
57
- store: {
58
- type: string;
59
- description: string;
60
- };
61
- query?: undefined;
62
- topK?: undefined;
63
- sourceIds?: undefined;
64
- };
65
- required: string[];
66
- };
67
- } | {
68
- name: string;
69
- description: string;
70
- input_schema: {
71
- type: string;
72
- properties: {
73
- query: {
74
- type: string;
75
- description: string;
76
- };
77
- topK: {
78
- type: string;
79
- description: string;
80
- };
81
- store: {
82
- type: string;
83
- description: string;
84
- };
85
- docs?: undefined;
86
- sourceIds?: undefined;
87
- };
88
- required: string[];
89
- };
90
- } | {
91
- name: string;
92
- description: string;
93
- input_schema: {
94
- type: string;
95
- properties: {
96
- sourceIds: {
97
- type: string;
98
- description: string;
99
- items: {
100
- type: string;
101
- };
102
- };
103
- store: {
104
- type: string;
105
- description: string;
106
- };
107
- docs?: undefined;
108
- query?: undefined;
109
- topK?: undefined;
110
- };
111
- required: string[];
112
- };
113
- })[];
114
- }
1
+ /**
2
+ * gbrain.js — knowledge-base (KB) skill, brokered through the control-plane.
3
+ *
4
+ * WHAT IT IS
5
+ * ──────────
6
+ * Gives an agent an ingest / query / delete surface over a per-tenant KNOWLEDGE
7
+ * BASE (Postgres + pgvector). The brain is persisted as a Stores-v2 store whose
8
+ * TYPE is the engine protocol — `postgres` — NOT `gbrain` (a product name never
9
+ * belongs in a store `type`; `gbrain` is only THIS skill). Naming the type after
10
+ * the protocol keeps the contract stable if the engine is ever swapped.
11
+ *
12
+ * ARCHITECTURE — brokered, NOT a direct sidecar dial (security)
13
+ * ─────────────────────────────────────────────────────────────
14
+ * The KB engine holds tenant data and is TOO heavy to bake into every run, so it
15
+ * runs as an on-demand SIDECAR. But run containers are network-isolated by design
16
+ * (they can reach ONLY the control-plane, never a datastore/sidecar). So this
17
+ * skill does NOT dial the sidecar directly. It behaves EXACTLY like the
18
+ * dataset-store skill: it hits the token-gated control-plane store API
19
+ *
20
+ * POST {ZIBBY_ACCOUNT_API_URL}/datasets/stores/{storeId}/ingest {docs}
21
+ * POST {ZIBBY_ACCOUNT_API_URL}/datasets/stores/{storeId}/query {query, topK}
22
+ * POST {ZIBBY_ACCOUNT_API_URL}/datasets/stores/{storeId}/delete {sourceIds}
23
+ *
24
+ * with the run's PROJECT_API_TOKEN (Bearer). The control-plane resolves +
25
+ * authorizes the tenant from the token, then (postgres-store.js) launches/reuses
26
+ * the sidecar on the ISOLATED infra network and proxies the call, deriving the
27
+ * sidecar's `kbId` SERVER-SIDE from (account, project, storeId). The agent never
28
+ * sees the sidecar URL or a kbId — the engine is never exposed to the run.
29
+ *
30
+ * STORES v2 — NAME-BASED RESOLUTION (the shared contract, same as dataset-store)
31
+ * ─────────────────────────────────────────────────────────────────────────────
32
+ * Stores are auto-provisioned at DEPLOY and resolved at runtime BY NAME via env:
33
+ * - The run carries one `ZIBBY_STORE__<name> = <storeId>` per bound store.
34
+ * - The agent reads the injected "AVAILABLE STORES" catalog (name + type +
35
+ * description), picks one, and passes the chosen logical `store` NAME.
36
+ * - That name→storeId env map is BOTH the allowlist AND the resolver.
37
+ * A knowledge-base agent typically has ONE postgres store bound, so `store` may
38
+ * be omitted and defaults to it.
39
+ *
40
+ * TIER / GATING
41
+ * ─────────────
42
+ * Tier ③ (heavy resident runtime → sidecar), but the sidecar is brokered by the
43
+ * control-plane (above), not dialled by the run. Fully server-side, no user
44
+ * connection → UNGATED. No-connection TOGGLEABLE via SKILL_META['gbrain'].
45
+ */
46
+ export declare const gbrainSkill: any;
115
47
  export default gbrainSkill;
@@ -1,147 +1,55 @@
1
+ /**
2
+ * git-write — REQUIRED, provider-agnostic git skill, NOW create-PR-capable.
3
+ *
4
+ * This is an EXTENSION of `gitSkill` (git.js): it inherits the EXACT SAME
5
+ * read tools (git_checkout / git_list_repos / git_explore), resolve() and
6
+ * handleToolCall, and ADDS provider-agnostic mutation tools —
7
+ * `git_open_pr` (opens a pull request / merge request off an already-pushed
8
+ * branch) and `git_merge_pr` (merges/accepts an open PR/MR by number) — each
9
+ * returning the REAL provider value (pr_url / merge sha). The ONLY
10
+ * gate difference (vs `git`) is the backend's integration map:
11
+ *
12
+ * - `git` → OPTIONAL_INTEGRATION_MAP (deploy NOT blocked; the
13
+ * meta-skill works anonymously on public repos).
14
+ * - `git-write` → REQUIRED_INTEGRATION_MAP ({any:[github,gitlab]}) — at
15
+ * least one provider MUST be connected before deploy.
16
+ *
17
+ * Repo-MUTATING agents (push a branch / open a PR / MR) declare
18
+ * SKILLS.GIT_WRITE instead of SKILLS.GIT: you cannot write to a repo
19
+ * anonymously, so deploying with neither GitHub nor GitLab connected would
20
+ * leave the agent unable to push/PR. The required OR-group makes the deploy
21
+ * modal render "GitHub OR GitLab" as a hard requirement.
22
+ *
23
+ * Why expose create-PR THROUGH git-write rather than declaring
24
+ * SKILLS.GITHUB + SKILLS.GITLAB on the node? Those two skills each carry
25
+ * `requiresIntegration`, so declaring BOTH would force BOTH providers
26
+ * connected (an AND gate) — breaking the "GitHub OR GitLab" OR-group. By
27
+ * folding the create-PR/MR capability into git-write (whose gate is the
28
+ * {any:[github,gitlab]} OR-group) the agent gets a real create-PR tool with
29
+ * NO change to the deploy gating.
30
+ *
31
+ * `git_open_pr` does NOT reimplement the provider API calls. It detects the
32
+ * provider from the repoUrl and DELEGATES to the already-published, already-
33
+ * tested `github_create_pr` (github.js) / `gitlab_create_mr` (gitlab.js) tools
34
+ * — so the returned pr_url is the REAL html_url / web_url from the provider
35
+ * response, never a value the model could fabricate, and all the expected-
36
+ * business-error handling ({ success:false, skippedReason }) is inherited.
37
+ *
38
+ * Read-only clone/explore agents keep SKILLS.GIT (optional).
39
+ *
40
+ * We REUSE gitSkill's read-tool implementation (spread it) rather than
41
+ * duplicate the clone/explore logic — they must never drift. handleToolCall
42
+ * handles git_open_pr here and delegates everything else to gitSkill.
43
+ */
1
44
  /**
2
45
  * Detect the provider from a repo/clone URL. Returns { provider, owner, repo }
3
46
  * for github / gitlab, or null for an unrecognized host. Mirrors the
4
47
  * sentry-triage fix-node's parseRepo so the dispatch agrees with the
5
48
  * deterministic fallback path.
6
49
  */
7
- export function detectProvider(url: any): {
50
+ export declare function detectProvider(url: any): {
8
51
  provider: string;
9
52
  owner: any;
10
53
  repo: any;
11
54
  };
12
- export const gitWriteSkill: {
13
- id: string;
14
- envKeys: string[];
15
- promptFragment: string;
16
- /**
17
- * Handle git_open_pr in-process by DELEGATING to the github/gitlab skills'
18
- * already-tested create tools (so the API call + real-url guarantee + the
19
- * expected-business-error handling are reused, not re-implemented). Every
20
- * other tool (git_checkout / git_list_repos / git_explore) is delegated to
21
- * gitSkill — the read surface is unchanged.
22
- */
23
- handleToolCall(name: any, args: any, context: any): Promise<string>;
24
- tools: ({
25
- name: string;
26
- description: string;
27
- input_schema: {
28
- type: string;
29
- properties: {
30
- url: {
31
- type: string;
32
- description: string;
33
- };
34
- branch: {
35
- type: string;
36
- description: string;
37
- };
38
- shallow: {
39
- type: string;
40
- description: string;
41
- };
42
- name: {
43
- type: string;
44
- description: string;
45
- };
46
- repo?: undefined;
47
- depth?: undefined;
48
- };
49
- required: string[];
50
- };
51
- } | {
52
- name: string;
53
- description: string;
54
- input_schema: {
55
- type: string;
56
- properties: {
57
- url?: undefined;
58
- branch?: undefined;
59
- shallow?: undefined;
60
- name?: undefined;
61
- repo?: undefined;
62
- depth?: undefined;
63
- };
64
- required?: undefined;
65
- };
66
- } | {
67
- name: string;
68
- description: string;
69
- input_schema: {
70
- type: string;
71
- properties: {
72
- repo: {
73
- type: string;
74
- description: string;
75
- };
76
- depth: {
77
- type: string;
78
- description: string;
79
- };
80
- url?: undefined;
81
- branch?: undefined;
82
- shallow?: undefined;
83
- name?: undefined;
84
- };
85
- required: string[];
86
- };
87
- } | {
88
- name: string;
89
- description: string;
90
- input_schema: {
91
- type: string;
92
- properties: {
93
- repoUrl: {
94
- type: string;
95
- description: string;
96
- };
97
- head: {
98
- type: string;
99
- description: string;
100
- };
101
- base: {
102
- type: string;
103
- description: string;
104
- };
105
- title: {
106
- type: string;
107
- description: string;
108
- };
109
- body: {
110
- type: string;
111
- description: string;
112
- };
113
- number?: undefined;
114
- mergeMethod?: undefined;
115
- };
116
- required: string[];
117
- };
118
- } | {
119
- name: string;
120
- description: string;
121
- input_schema: {
122
- type: string;
123
- properties: {
124
- repoUrl: {
125
- type: string;
126
- description: string;
127
- };
128
- number: {
129
- type: string;
130
- description: string;
131
- };
132
- mergeMethod: {
133
- type: string;
134
- enum: string[];
135
- description: string;
136
- };
137
- head?: undefined;
138
- base?: undefined;
139
- title?: undefined;
140
- body?: undefined;
141
- };
142
- required: string[];
143
- };
144
- })[];
145
- description: string;
146
- resolve(): any;
147
- };
55
+ export declare const gitWriteSkill: any;