studiograph 1.1.2 → 1.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/LICENSE +191 -0
- package/README.md +307 -10
- package/dist/agent/orchestrator.d.ts +17 -9
- package/dist/agent/orchestrator.js +95 -95
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/prompts/system.md +168 -0
- package/dist/agent/skills/bundled/enrich-entities.md +124 -0
- package/dist/agent/skills/bundled/gather-context.md +46 -0
- package/dist/agent/skills/skill-loader.d.ts +48 -0
- package/dist/agent/skills/skill-loader.js +166 -0
- package/dist/agent/skills/skill-loader.js.map +1 -0
- package/dist/agent/tools/graph-tools.d.ts +20 -2
- package/dist/agent/tools/graph-tools.js +64 -8
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/load-skill.d.ts +42 -0
- package/dist/agent/tools/load-skill.js +45 -0
- package/dist/agent/tools/load-skill.js.map +1 -0
- package/dist/agent/tools/tool-loader.d.ts +25 -0
- package/dist/agent/tools/tool-loader.js +73 -0
- package/dist/agent/tools/tool-loader.js.map +1 -0
- package/dist/cli/commands/app.d.ts +7 -0
- package/dist/cli/commands/app.js +167 -0
- package/dist/cli/commands/app.js.map +1 -0
- package/dist/cli/commands/config.d.ts +13 -0
- package/dist/cli/commands/config.js +276 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/connector.d.ts +33 -0
- package/dist/cli/commands/connector.js +170 -0
- package/dist/cli/commands/connector.js.map +1 -0
- package/dist/cli/commands/deploy.d.ts +11 -0
- package/dist/cli/commands/deploy.js +153 -0
- package/dist/cli/commands/deploy.js.map +1 -0
- package/dist/cli/commands/index.d.ts +15 -0
- package/dist/cli/commands/index.js +117 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/init.js +110 -28
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/join.js +67 -22
- package/dist/cli/commands/join.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +8 -0
- package/dist/cli/commands/lint.js +70 -0
- package/dist/cli/commands/lint.js.map +1 -0
- package/dist/cli/commands/mcp.d.ts +27 -0
- package/dist/cli/commands/mcp.js +56 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/provision.d.ts +8 -0
- package/dist/cli/commands/provision.js +112 -0
- package/dist/cli/commands/provision.js.map +1 -0
- package/dist/cli/commands/r2.d.ts +2 -0
- package/dist/cli/commands/r2.js +87 -6
- package/dist/cli/commands/r2.js.map +1 -1
- package/dist/cli/commands/serve.js +47 -2
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/start.js +210 -71
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/sync.js +4 -4
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/commands/update.d.ts +8 -0
- package/dist/cli/commands/update.js +155 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/index.js +83 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/scaffolding.d.ts +9 -0
- package/dist/cli/scaffolding.js +288 -0
- package/dist/cli/scaffolding.js.map +1 -0
- package/dist/core/graph.d.ts +12 -1
- package/dist/core/graph.js +147 -78
- package/dist/core/graph.js.map +1 -1
- package/dist/core/migration-runner.d.ts +39 -0
- package/dist/core/migration-runner.js +221 -0
- package/dist/core/migration-runner.js.map +1 -0
- package/dist/core/migration-types.d.ts +101 -0
- package/dist/core/migration-types.js +21 -0
- package/dist/core/migration-types.js.map +1 -0
- package/dist/core/migrations/20260219-formalize-memory-location.d.ts +2 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js +35 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.d.ts +12 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js +65 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-readme.d.ts +11 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js +82 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js.map +1 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.d.ts +9 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js +64 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js.map +1 -0
- package/dist/core/migrations/index.d.ts +11 -0
- package/dist/core/migrations/index.js +23 -0
- package/dist/core/migrations/index.js.map +1 -0
- package/dist/core/schema-registry.d.ts +36 -0
- package/dist/core/schema-registry.js +161 -0
- package/dist/core/schema-registry.js.map +1 -0
- package/dist/core/types.d.ts +242 -0
- package/dist/core/types.js +21 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-config.d.ts +10 -0
- package/dist/core/user-config.js +8 -0
- package/dist/core/user-config.js.map +1 -1
- package/dist/core/validation.d.ts +973 -32
- package/dist/core/validation.js +163 -4
- package/dist/core/validation.js.map +1 -1
- package/dist/core/workspace-manager.d.ts +26 -2
- package/dist/core/workspace-manager.js +113 -15
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.d.ts +8 -7
- package/dist/core/workspace.js +25 -13
- package/dist/core/workspace.js.map +1 -1
- package/dist/mcp/connector-manager.d.ts +61 -0
- package/dist/mcp/connector-manager.js +178 -0
- package/dist/mcp/connector-manager.js.map +1 -0
- package/dist/mcp/connectors/definitions.d.ts +43 -0
- package/dist/mcp/connectors/definitions.js +140 -0
- package/dist/mcp/connectors/definitions.js.map +1 -0
- package/dist/mcp/server.d.ts +11 -0
- package/dist/mcp/server.js +28 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +14 -0
- package/dist/mcp/tools.js +172 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/server/index.js +17 -4
- package/dist/server/index.js.map +1 -1
- package/dist/server/plugin-loader.d.ts +8 -0
- package/dist/server/plugin-loader.js +14 -0
- package/dist/server/plugin-loader.js.map +1 -1
- package/dist/server/routes/graph-api.js +1 -1
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/webhook.js +33 -0
- package/dist/server/routes/webhook.js.map +1 -1
- package/dist/services/github-provisioner.d.ts +1 -0
- package/dist/services/github-provisioner.js +11 -0
- package/dist/services/github-provisioner.js.map +1 -1
- package/dist/services/lint-service.d.ts +27 -0
- package/dist/services/lint-service.js +76 -0
- package/dist/services/lint-service.js.map +1 -0
- package/dist/services/markdown.d.ts +9 -0
- package/dist/services/markdown.js +23 -2
- package/dist/services/markdown.js.map +1 -1
- package/dist/services/memory-service.d.ts +1 -2
- package/dist/services/memory-service.js +6 -4
- package/dist/services/memory-service.js.map +1 -1
- package/dist/services/vector-service.d.ts +77 -0
- package/dist/services/vector-service.js +280 -0
- package/dist/services/vector-service.js.map +1 -0
- package/dist/utils/version-checker.d.ts +23 -0
- package/dist/utils/version-checker.js +116 -0
- package/dist/utils/version-checker.js.map +1 -0
- package/package.json +10 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 Studiograph
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,18 +1,315 @@
|
|
|
1
1
|
# Studiograph
|
|
2
2
|
|
|
3
|
-
Team-based AI agent platform with Git-backed knowledge graphs.
|
|
3
|
+
Team-based AI agent platform with Git-backed knowledge graphs. Studiograph helps creative services teams capture operational knowledge as Markdown entities with YAML frontmatter, organized into Git repositories, and enables AI agents to produce work reflecting real team context.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Project repos**: cooper-hewitt/, globalance/, etc.
|
|
9
|
-
- **Function repos**: new-business/, accounting/, hr/, etc.
|
|
10
|
-
- **Shared resources**: templates/, research/, resources/, etc.
|
|
7
|
+
### Prerequisites
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
- **Node.js** 20+
|
|
10
|
+
- **Git** installed and configured
|
|
11
|
+
- An API key from a supported LLM provider (Anthropic, OpenAI, Google, xAI, Groq, or OpenRouter)
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
### Install
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g studiograph
|
|
17
|
+
```
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
### Create a Workspace
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
studiograph init "My Studio"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The interactive setup will ask you to choose a firm template (design studio, marketing agency, architecture studio, etc.) or start bare. This creates a workspace directory with a `.studiograph/` config folder — similar to how Git uses `.git/`.
|
|
26
|
+
|
|
27
|
+
To create repos on GitHub during init:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
studiograph init "My Studio" --github --github-org my-org
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
To skip the interactive template picker:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
studiograph init "My Studio" --template design-studio
|
|
37
|
+
studiograph init "My Studio" --bare
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Join an Existing Workspace
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
studiograph join https://github.com/my-org/.studiograph.git
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This clones the config repo, identifies your role from the team roster, and clones all repos you have access to.
|
|
47
|
+
|
|
48
|
+
### Start the Agent
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
cd my-studio
|
|
52
|
+
studiograph start
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
On first run, you'll be prompted to select an AI provider and model. The agent provides a chat interface where you can create, search, and manage entities across your knowledge graph.
|
|
56
|
+
|
|
57
|
+
## How It Works
|
|
58
|
+
|
|
59
|
+
### Workspace Structure
|
|
60
|
+
|
|
61
|
+
A Studiograph workspace is a directory containing a `.studiograph/` configuration folder and one or more content repositories:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
my-studio/
|
|
65
|
+
├── .studiograph/ # Config repo (workspace.json, team roster, migrations)
|
|
66
|
+
├── acme-rebrand/ # Project repo (one per client engagement)
|
|
67
|
+
├── website-redesign/ # Another project repo
|
|
68
|
+
├── new-business/ # Function repo (business operations)
|
|
69
|
+
├── accounting/ # Function repo
|
|
70
|
+
├── templates/ # Shared resource repo (team knowledge)
|
|
71
|
+
└── private/ # Local-only, gitignored
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Repository Types
|
|
75
|
+
|
|
76
|
+
| Type | Purpose | Examples |
|
|
77
|
+
|------|---------|---------|
|
|
78
|
+
| **Project** | One per client or engagement | `meridian-rebrand/`, `terra-dashboard/` |
|
|
79
|
+
| **Function** | Business operations | `new-business/`, `accounting/`, `hr/` |
|
|
80
|
+
| **Shared Resource** | Team knowledge | `templates/`, `research/`, `design-systems/` |
|
|
81
|
+
|
|
82
|
+
### Entities
|
|
83
|
+
|
|
84
|
+
Entities are Markdown files with YAML frontmatter, stored in type-based directories within repos:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
acme-rebrand/
|
|
88
|
+
├── project/
|
|
89
|
+
│ └── acme-rebrand.md
|
|
90
|
+
├── meeting/
|
|
91
|
+
│ └── kickoff-2024-01-15.md
|
|
92
|
+
├── deliverable/
|
|
93
|
+
│ └── brand-guidelines-v1.md
|
|
94
|
+
└── person/
|
|
95
|
+
└── jane-doe.md
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Each entity file looks like:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
---
|
|
102
|
+
entity_type: project
|
|
103
|
+
entity_id: acme-rebrand
|
|
104
|
+
name: "Acme Rebrand"
|
|
105
|
+
status: active
|
|
106
|
+
team:
|
|
107
|
+
- [[alice-smith]]
|
|
108
|
+
- [[bob-jones]]
|
|
109
|
+
related_projects:
|
|
110
|
+
- [[website-redesign]]
|
|
111
|
+
created_at: 2024-01-15T10:00:00Z
|
|
112
|
+
updated_at: 2024-02-20T14:30:00Z
|
|
113
|
+
created_by: alice
|
|
114
|
+
updated_by: alice
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
# Acme Rebrand
|
|
118
|
+
|
|
119
|
+
Project notes and context go here...
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Entity IDs are always kebab-case. Entities link to each other with wikilinks (`[[entity-id]]`), which work across repos.
|
|
123
|
+
|
|
124
|
+
There are 30+ built-in entity types (project, meeting, client, deliverable, proposal, contract, etc.), and workspaces can define custom types via `schema_extensions` in `workspace.json`.
|
|
125
|
+
|
|
126
|
+
## CLI Commands
|
|
127
|
+
|
|
128
|
+
### Getting Started
|
|
129
|
+
|
|
130
|
+
| Command | Description |
|
|
131
|
+
|---------|-------------|
|
|
132
|
+
| `studiograph init <team-name> [dir]` | Initialize a new workspace |
|
|
133
|
+
| `studiograph join <url> [dir]` | Join an existing workspace via GitHub URL |
|
|
134
|
+
| `studiograph auth` | Manage GitHub authentication |
|
|
135
|
+
|
|
136
|
+
### Daily Workflow
|
|
137
|
+
|
|
138
|
+
| Command | Description |
|
|
139
|
+
|---------|-------------|
|
|
140
|
+
| `studiograph start` | Launch the AI agent chat interface |
|
|
141
|
+
| `studiograph pull` | Pull latest changes from remote |
|
|
142
|
+
| `studiograph push` | Push local commits to remote |
|
|
143
|
+
|
|
144
|
+
### Workspace Management
|
|
145
|
+
|
|
146
|
+
| Command | Description |
|
|
147
|
+
|---------|-------------|
|
|
148
|
+
| `studiograph provision` | Push workspace config to GitHub as a separate repo |
|
|
149
|
+
| `studiograph members` | Manage team members and roles |
|
|
150
|
+
| `studiograph index` | Rebuild search index |
|
|
151
|
+
| `studiograph lint` | Check entity completeness and broken wikilinks |
|
|
152
|
+
| `studiograph config` | View and update workspace configuration |
|
|
153
|
+
|
|
154
|
+
### Server & Deployment
|
|
155
|
+
|
|
156
|
+
| Command | Description |
|
|
157
|
+
|---------|-------------|
|
|
158
|
+
| `studiograph serve` | Start the HTTP server (Graph API, Chat API, webhooks) |
|
|
159
|
+
| `studiograph deploy railway` | Guided Railway deployment wizard |
|
|
160
|
+
|
|
161
|
+
### Integrations
|
|
162
|
+
|
|
163
|
+
| Command | Description |
|
|
164
|
+
|---------|-------------|
|
|
165
|
+
| `studiograph mcp` | Start the MCP server for Claude Desktop |
|
|
166
|
+
| `studiograph connector` | Configure third-party integrations (Linear, Slack, Figma, etc.) |
|
|
167
|
+
| `studiograph app` | Manage installed app plugins |
|
|
168
|
+
| `studiograph r2` | Configure Cloudflare R2 for asset storage |
|
|
169
|
+
|
|
170
|
+
## Integrations
|
|
171
|
+
|
|
172
|
+
### Claude Desktop & Claude Code (MCP)
|
|
173
|
+
|
|
174
|
+
Studiograph exposes a [Model Context Protocol](https://modelcontextprotocol.io/) server so any MCP client can read and write your knowledge graph directly.
|
|
175
|
+
|
|
176
|
+
**Claude Desktop** — add to your config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"mcpServers": {
|
|
181
|
+
"studiograph": {
|
|
182
|
+
"command": "studiograph",
|
|
183
|
+
"args": ["mcp"],
|
|
184
|
+
"cwd": "/absolute/path/to/your/workspace"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Claude Code** — add to your project's `.mcp.json`:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"mcpServers": {
|
|
195
|
+
"studiograph": {
|
|
196
|
+
"command": "studiograph",
|
|
197
|
+
"args": ["mcp"],
|
|
198
|
+
"cwd": "/absolute/path/to/your/workspace"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
MCP tools available: `list_repos`, `list_entities`, `get_entity`, `search_entities`, `create_entity`, `update_entity`, `delete_entity`.
|
|
205
|
+
|
|
206
|
+
### Third-Party Connectors
|
|
207
|
+
|
|
208
|
+
Studiograph can connect to external services via MCP connectors. Built-in connector configs are available for:
|
|
209
|
+
|
|
210
|
+
- **Linear** — issues and project tracking
|
|
211
|
+
- **Slack** — messages and channels
|
|
212
|
+
- **Figma** — design files
|
|
213
|
+
- **Google Workspace** — docs, sheets, calendar
|
|
214
|
+
- **Granola** — meeting notes
|
|
215
|
+
- **Pipedrive** — CRM deals and contacts
|
|
216
|
+
|
|
217
|
+
Configure with:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
studiograph connector add linear
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Connector credentials are stored at `~/.studiograph/connectors/` with restricted file permissions.
|
|
224
|
+
|
|
225
|
+
## HTTP Server
|
|
226
|
+
|
|
227
|
+
`studiograph serve` starts a Fastify server with:
|
|
228
|
+
|
|
229
|
+
| Route | Method | Description |
|
|
230
|
+
|-------|--------|-------------|
|
|
231
|
+
| `/api/repos` | GET | List all repositories |
|
|
232
|
+
| `/api/repos/:repo/entities/:type` | GET | List entities by type |
|
|
233
|
+
| `/api/repos/:repo/entities/:type/:id` | GET | Get a single entity |
|
|
234
|
+
| `/api/repos/:repo/search` | GET | Search within a repo |
|
|
235
|
+
| `/api/search` | GET | Search across all repos |
|
|
236
|
+
| `/api/chat` | POST | Send a message to the agent |
|
|
237
|
+
| `/api/chat/stream` | GET | SSE streaming chat |
|
|
238
|
+
| `/webhooks/github` | POST | GitHub push webhook (auto-pull) |
|
|
239
|
+
|
|
240
|
+
Authentication uses bearer tokens set via the `API_KEYS` environment variable (semicolon-separated). When no keys are configured, the server runs in open dev mode.
|
|
241
|
+
|
|
242
|
+
## Deployment
|
|
243
|
+
|
|
244
|
+
### Railway
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
studiograph deploy railway
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
The guided wizard walks through setup. Required environment variables:
|
|
251
|
+
|
|
252
|
+
| Variable | Description |
|
|
253
|
+
|----------|-------------|
|
|
254
|
+
| `STUDIOGRAPH_CONFIG_REPO` | GitHub URL to your `.studiograph` config repo |
|
|
255
|
+
| `GITHUB_TOKEN` | Fine-grained PAT with repo Contents read access |
|
|
256
|
+
| `API_KEYS` | Semicolon-separated bearer tokens for client auth |
|
|
257
|
+
| `WEBHOOK_SECRET` | GitHub webhook HMAC-SHA256 secret (optional) |
|
|
258
|
+
| `PORT` | Set automatically by Railway |
|
|
259
|
+
|
|
260
|
+
On first boot, the server clones the config repo and all content repos automatically.
|
|
261
|
+
|
|
262
|
+
## Development
|
|
263
|
+
|
|
264
|
+
### Setup
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
git clone <repo-url>
|
|
268
|
+
cd studiograph
|
|
269
|
+
npm install
|
|
270
|
+
npm run build
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Scripts
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
npm run build # Compile TypeScript + copy prompt/skill files to dist/
|
|
277
|
+
npm run dev # Watch mode (tsc --watch)
|
|
278
|
+
npm run test # Run tests in watch mode (Vitest)
|
|
279
|
+
npm run lint # ESLint
|
|
280
|
+
npx vitest run # Run tests once (CI mode)
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Run a Single Test
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
npx vitest run src/core/__tests__/graph.test.ts
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Project Layout
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
src/
|
|
293
|
+
├── cli/ # Commander.js commands
|
|
294
|
+
├── core/ # Workspace, graph, validation, schema registry, types
|
|
295
|
+
├── services/ # Git, Markdown, CSV, vector search, assets, memory, lint
|
|
296
|
+
├── agent/ # AI orchestrator, tools, skills, system prompts
|
|
297
|
+
├── server/ # Fastify HTTP server and API routes
|
|
298
|
+
├── mcp/ # Model Context Protocol server and connector manager
|
|
299
|
+
├── auth/ # GitHub authentication (OAuth device flow)
|
|
300
|
+
└── utils/ # Preflight checks, version checking, git helpers
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Key Files
|
|
304
|
+
|
|
305
|
+
- `src/core/types.ts` — Zod schemas for workspace config, entities, repos
|
|
306
|
+
- `src/core/validation.ts` — All 30+ built-in entity type schemas
|
|
307
|
+
- `src/core/graph.ts` — `BaseGraphManager` (CRUD for a single repo)
|
|
308
|
+
- `src/core/workspace-manager.ts` — `WorkspaceManager` (multi-repo coordination)
|
|
309
|
+
- `src/core/workspace.ts` — `.studiograph/` directory management
|
|
310
|
+
- `src/agent/orchestrator.ts` — AI agent setup with multi-provider support
|
|
311
|
+
- `src/server/index.ts` — Fastify server factory
|
|
312
|
+
|
|
313
|
+
## License
|
|
314
|
+
|
|
315
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -11,7 +11,10 @@ export interface AgentConfig {
|
|
|
11
11
|
workspacePath: string;
|
|
12
12
|
workspaceConfig: WorkspaceConfig;
|
|
13
13
|
gitUser: GitUser;
|
|
14
|
-
|
|
14
|
+
/** Additional skill directories from installed apps (highest-priority first). */
|
|
15
|
+
skillsDirs?: string[];
|
|
16
|
+
/** Additional custom tool directories from installed apps (highest-priority first). */
|
|
17
|
+
toolsDirs?: string[];
|
|
15
18
|
}
|
|
16
19
|
export interface AgentResponse {
|
|
17
20
|
content: string;
|
|
@@ -27,24 +30,29 @@ export declare class AgentOrchestrator {
|
|
|
27
30
|
private agent;
|
|
28
31
|
private config;
|
|
29
32
|
private gitUser;
|
|
30
|
-
private
|
|
33
|
+
private skillsDirs;
|
|
34
|
+
private toolsDirs;
|
|
31
35
|
constructor(config: AgentConfig);
|
|
32
36
|
/**
|
|
33
|
-
* Create Pi-Mono agent with tools and system prompt
|
|
37
|
+
* Create Pi-Mono agent with tools and system prompt.
|
|
38
|
+
* Custom tools and skills are loaded asynchronously via initAsync().
|
|
34
39
|
*/
|
|
35
40
|
private createAgent;
|
|
36
41
|
/**
|
|
37
|
-
* Load
|
|
42
|
+
* Load custom JS tools from app/workspace tool dirs and append to the agent.
|
|
43
|
+
* Runs async after construction — custom tools may not be available for the
|
|
44
|
+
* very first message if initialisation is extremely fast, but in practice
|
|
45
|
+
* the first user message arrives well after startup.
|
|
38
46
|
*/
|
|
39
|
-
private
|
|
47
|
+
private loadCustomToolsAsync;
|
|
40
48
|
/**
|
|
41
|
-
*
|
|
49
|
+
* Build the full system prompt: base prompt + eager skill content + skill index.
|
|
42
50
|
*/
|
|
43
|
-
private
|
|
51
|
+
private buildSystemPrompt;
|
|
44
52
|
/**
|
|
45
|
-
*
|
|
53
|
+
* Fallback system prompt when prompts/system.md is not found.
|
|
46
54
|
*/
|
|
47
|
-
private
|
|
55
|
+
private getDefaultSystemPrompt;
|
|
48
56
|
/**
|
|
49
57
|
* Send a message to the agent
|
|
50
58
|
*/
|