@treeseed/sdk 0.1.2 → 0.3.1
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/README.md +97 -506
- package/dist/{src/cli-tools.d.ts → cli-tools.d.ts} +1 -1
- package/dist/cli-tools.js +5 -3
- package/dist/{src/content-store.d.ts → content-store.d.ts} +3 -2
- package/dist/content-store.js +52 -20
- package/dist/{src/d1-store.d.ts → d1-store.d.ts} +62 -1
- package/dist/d1-store.js +625 -65
- package/dist/field-aliases.d.ts +11 -0
- package/dist/field-aliases.js +41 -0
- package/dist/graph/build.d.ts +19 -0
- package/dist/graph/build.js +949 -0
- package/dist/graph/dsl.d.ts +2 -0
- package/dist/graph/dsl.js +243 -0
- package/dist/graph/query.d.ts +47 -0
- package/dist/graph/query.js +447 -0
- package/dist/graph/ranking.d.ts +3 -0
- package/dist/graph/ranking.js +483 -0
- package/dist/graph/schema.d.ts +142 -0
- package/dist/graph/schema.js +133 -0
- package/dist/graph.d.ts +52 -0
- package/dist/graph.js +133 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +91 -2
- package/dist/model-registry.d.ts +8 -0
- package/dist/model-registry.js +351 -25
- package/dist/operations/providers/default.d.ts +10 -0
- package/dist/operations/providers/default.js +514 -0
- package/dist/operations/runtime.d.ts +7 -0
- package/dist/operations/runtime.js +60 -0
- package/dist/operations/services/config-runtime.d.ts +269 -0
- package/dist/operations/services/config-runtime.js +1397 -0
- package/dist/operations/services/d1-migration.d.ts +6 -0
- package/dist/operations/services/d1-migration.js +89 -0
- package/dist/operations/services/deploy.d.ts +371 -0
- package/dist/operations/services/deploy.js +981 -0
- package/dist/operations/services/git-workflow.d.ts +49 -0
- package/dist/operations/services/git-workflow.js +218 -0
- package/dist/operations/services/github-automation.d.ts +156 -0
- package/dist/operations/services/github-automation.js +256 -0
- package/dist/operations/services/local-dev.d.ts +9 -0
- package/dist/operations/services/local-dev.js +106 -0
- package/dist/operations/services/mailpit-runtime.d.ts +4 -0
- package/dist/operations/services/mailpit-runtime.js +59 -0
- package/dist/operations/services/railway-deploy.d.ts +53 -0
- package/dist/operations/services/railway-deploy.js +123 -0
- package/dist/operations/services/runtime-paths.d.ts +19 -0
- package/dist/operations/services/runtime-paths.js +54 -0
- package/dist/operations/services/runtime-tools.d.ts +117 -0
- package/dist/operations/services/runtime-tools.js +358 -0
- package/dist/operations/services/save-deploy-preflight.d.ts +34 -0
- package/dist/operations/services/save-deploy-preflight.js +76 -0
- package/dist/operations/services/template-registry.d.ts +88 -0
- package/dist/operations/services/template-registry.js +407 -0
- package/dist/operations/services/watch-dev.d.ts +21 -0
- package/dist/operations/services/watch-dev.js +284 -0
- package/dist/operations/services/workspace-preflight.d.ts +40 -0
- package/dist/operations/services/workspace-preflight.js +165 -0
- package/dist/operations/services/workspace-save.d.ts +42 -0
- package/dist/operations/services/workspace-save.js +235 -0
- package/dist/operations/services/workspace-tools.d.ts +16 -0
- package/dist/operations/services/workspace-tools.js +270 -0
- package/dist/operations-registry.d.ts +5 -0
- package/dist/operations-registry.js +68 -0
- package/dist/operations-types.d.ts +71 -0
- package/dist/operations-types.js +17 -0
- package/dist/operations.d.ts +6 -0
- package/dist/operations.js +16 -0
- package/dist/platform/books-data.d.ts +1 -0
- package/dist/platform/books-data.js +1 -0
- package/dist/platform/contracts.d.ts +158 -0
- package/dist/platform/contracts.js +0 -0
- package/dist/platform/deploy/config.d.ts +4 -0
- package/dist/platform/deploy/config.js +222 -0
- package/dist/platform/deploy-config.d.ts +1 -0
- package/dist/platform/deploy-config.js +1 -0
- package/dist/platform/deploy-runtime.d.ts +18 -0
- package/dist/platform/deploy-runtime.js +78 -0
- package/dist/platform/env.yaml +394 -0
- package/dist/platform/environment.d.ts +130 -0
- package/dist/platform/environment.js +331 -0
- package/dist/platform/plugin.d.ts +2 -0
- package/dist/platform/plugin.js +4 -0
- package/dist/platform/plugins/constants.d.ts +22 -0
- package/dist/platform/plugins/constants.js +29 -0
- package/dist/platform/plugins/plugin.d.ts +51 -0
- package/dist/platform/plugins/plugin.js +6 -0
- package/dist/platform/plugins/runtime.d.ts +35 -0
- package/dist/platform/plugins/runtime.js +161 -0
- package/dist/platform/plugins.d.ts +6 -0
- package/dist/platform/plugins.js +38 -0
- package/dist/platform/site-config-schema.js +1 -0
- package/dist/platform/tenant/config.d.ts +9 -0
- package/dist/platform/tenant/config.js +154 -0
- package/dist/platform/tenant/runtime-config.d.ts +4 -0
- package/dist/platform/tenant/runtime-config.js +20 -0
- package/dist/platform/tenant-config.d.ts +1 -0
- package/dist/platform/tenant-config.js +1 -0
- package/dist/platform/utils/books-data.d.ts +29 -0
- package/dist/platform/utils/books-data.js +82 -0
- package/dist/platform/utils/site-config-schema.js +321 -0
- package/dist/remote.d.ts +175 -0
- package/dist/remote.js +202 -0
- package/dist/runtime.js +35 -22
- package/dist/scripts/aggregate-book.js +121 -0
- package/dist/scripts/build-dist.js +54 -13
- package/dist/scripts/build-tenant-worker.js +36 -0
- package/dist/scripts/cleanup-markdown.js +373 -0
- package/dist/scripts/cli-test-fixtures.js +48 -0
- package/dist/scripts/config-treeseed.js +95 -0
- package/dist/scripts/ensure-mailpit.js +29 -0
- package/dist/scripts/local-dev.js +129 -0
- package/dist/scripts/logs-mailpit.js +2 -0
- package/dist/scripts/patch-starlight-content-path.js +172 -0
- package/dist/scripts/release-verify.js +34 -6
- package/dist/scripts/run-fixture-astro-command.js +18 -0
- package/dist/scripts/scaffold-site.js +65 -0
- package/dist/scripts/stop-mailpit.js +5 -0
- package/dist/scripts/sync-dev-vars.js +6 -0
- package/dist/scripts/sync-template.js +20 -0
- package/dist/scripts/template-catalog.test.js +100 -0
- package/dist/scripts/template-command.js +31 -0
- package/dist/scripts/tenant-astro-command.js +3 -0
- package/dist/scripts/tenant-build.js +16 -0
- package/dist/scripts/tenant-check.js +7 -0
- package/dist/scripts/tenant-d1-migrate-local.js +11 -0
- package/dist/scripts/tenant-deploy.js +180 -0
- package/dist/scripts/tenant-destroy.js +104 -0
- package/dist/scripts/tenant-dev.js +171 -0
- package/dist/scripts/tenant-lint.js +4 -0
- package/dist/scripts/tenant-test.js +4 -0
- package/dist/scripts/test-cloudflare-local.js +212 -0
- package/dist/scripts/test-scaffold.js +314 -0
- package/dist/scripts/test-smoke.js +71 -13
- package/dist/scripts/treeseed-assert-release-tag-version.js +21 -0
- package/dist/scripts/treeseed-build-dist.js +134 -0
- package/dist/scripts/treeseed-publish-package.js +19 -0
- package/dist/scripts/treeseed-release-verify.js +131 -0
- package/dist/scripts/treeseed-run-ts.js +45 -0
- package/dist/scripts/validate-templates.js +6 -0
- package/dist/scripts/verify-driver.js +29 -0
- package/dist/scripts/workflow-commands.test.js +39 -0
- package/dist/scripts/workspace-close.js +24 -0
- package/dist/scripts/workspace-command-e2e.js +718 -0
- package/dist/scripts/workspace-lint.js +9 -0
- package/dist/scripts/workspace-preflight.js +22 -0
- package/dist/scripts/workspace-publish-changed-packages.js +16 -0
- package/dist/scripts/workspace-release-verify.js +81 -0
- package/dist/scripts/workspace-release.js +42 -0
- package/dist/scripts/workspace-save.js +124 -0
- package/dist/scripts/workspace-start-warning.js +3 -0
- package/dist/scripts/workspace-start.js +71 -0
- package/dist/scripts/workspace-test-unit.js +4 -0
- package/dist/scripts/workspace-test.js +11 -0
- package/dist/sdk-fields.d.ts +11 -0
- package/dist/sdk-fields.js +169 -0
- package/dist/sdk-filters.d.ts +4 -0
- package/dist/sdk-filters.js +12 -15
- package/dist/sdk-types.d.ts +796 -0
- package/dist/sdk-types.js +7 -1
- package/dist/sdk-version.d.ts +2 -0
- package/dist/sdk-version.js +42 -0
- package/dist/sdk.d.ts +215 -0
- package/dist/sdk.js +235 -11
- package/dist/stores/cursor-store.js +9 -3
- package/dist/stores/lease-store.js +8 -2
- package/dist/{src/stores → stores}/message-store.d.ts +1 -1
- package/dist/stores/message-store.js +27 -3
- package/dist/stores/operational-store.d.ts +24 -0
- package/dist/stores/operational-store.js +279 -0
- package/dist/stores/run-store.js +8 -1
- package/dist/stores/subscription-store.js +7 -5
- package/dist/template-catalog.d.ts +13 -0
- package/dist/template-catalog.js +141 -0
- package/dist/treeseed/services/compose.yml +7 -0
- package/dist/treeseed/template-catalog/catalog.fixture.json +55 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.d.ts +2 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.ts +3 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +32 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +40 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/empty/.gitkeep +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/knowledge/handbook/index.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/pages/welcome.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.d.ts +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.ts +3 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/env.yaml +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +19 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +26 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/tsconfig.json +9 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +90 -0
- package/dist/utils/agents/contracts/messages.d.ts +88 -0
- package/dist/utils/agents/contracts/messages.js +138 -0
- package/dist/utils/agents/contracts/run.d.ts +20 -0
- package/dist/utils/agents/contracts/run.js +0 -0
- package/dist/utils/agents/runtime-types.d.ts +117 -0
- package/dist/utils/agents/runtime-types.js +4 -0
- package/dist/verification.d.ts +20 -0
- package/dist/verification.js +98 -0
- package/dist/workflow/operations.d.ts +396 -0
- package/dist/workflow/operations.js +841 -0
- package/dist/workflow-state.d.ts +56 -0
- package/dist/workflow-state.js +195 -0
- package/dist/workflow-support.d.ts +9 -0
- package/dist/workflow-support.js +176 -0
- package/dist/workflow.d.ts +111 -0
- package/dist/workflow.js +97 -0
- package/package.json +111 -5
- package/scripts/verify-driver.mjs +29 -0
- package/dist/scripts/.ts-run-1775630384291-crtqr3izsa.js +0 -22
- package/dist/scripts/.ts-run-1775630388025-vnjle0z75a.js +0 -129
- package/dist/scripts/assert-release-tag-version.d.ts +0 -1
- package/dist/scripts/build-dist.d.ts +0 -1
- package/dist/scripts/fixture-tools.d.ts +0 -5
- package/dist/scripts/package-tools.d.ts +0 -15
- package/dist/scripts/publish-package.d.ts +0 -1
- package/dist/scripts/release-verify.d.ts +0 -1
- package/dist/scripts/test-smoke.d.ts +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/model-registry.d.ts +0 -4
- package/dist/src/sdk-filters.d.ts +0 -4
- package/dist/src/sdk-types.d.ts +0 -285
- package/dist/src/sdk.d.ts +0 -109
- package/dist/test/test-fixture.d.ts +0 -1
- package/dist/test/utils/envelopes.test.d.ts +0 -1
- package/dist/test/utils/sdk.test.d.ts +0 -1
- package/dist/vitest.config.d.ts +0 -2
- /package/dist/{src/frontmatter.d.ts → frontmatter.d.ts} +0 -0
- /package/dist/{src/git-runtime.d.ts → git-runtime.d.ts} +0 -0
- /package/dist/{src/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/{src/stores → stores}/cursor-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/envelopes.d.ts +0 -0
- /package/dist/{src/stores → stores}/helpers.d.ts +0 -0
- /package/dist/{src/stores → stores}/lease-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/run-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/subscription-store.d.ts +0 -0
- /package/dist/{src/types → types}/agents.d.ts +0 -0
- /package/dist/{src/types → types}/cloudflare.d.ts +0 -0
- /package/dist/{src/wrangler-d1.d.ts → wrangler-d1.d.ts} +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{
|
|
4
|
+
"id": "starter-basic",
|
|
5
|
+
"displayName": "TreeSeed Basic",
|
|
6
|
+
"description": "Opinionated first-party TreeSeed starter for documentation-first teams.",
|
|
7
|
+
"summary": "A general-purpose starter for Astro, Cloudflare, docs, and the standard Treeseed workflow.",
|
|
8
|
+
"status": "live",
|
|
9
|
+
"featured": true,
|
|
10
|
+
"category": "starter",
|
|
11
|
+
"audience": [
|
|
12
|
+
"maintainers",
|
|
13
|
+
"teams"
|
|
14
|
+
],
|
|
15
|
+
"tags": [
|
|
16
|
+
"starter",
|
|
17
|
+
"astro",
|
|
18
|
+
"cloudflare",
|
|
19
|
+
"docs"
|
|
20
|
+
],
|
|
21
|
+
"publisher": {
|
|
22
|
+
"id": "treeseed",
|
|
23
|
+
"name": "TreeSeed",
|
|
24
|
+
"url": "https://treeseed.ai"
|
|
25
|
+
},
|
|
26
|
+
"publisherVerified": true,
|
|
27
|
+
"templateVersion": "1.0.0",
|
|
28
|
+
"templateApiVersion": 1,
|
|
29
|
+
"minCliVersion": "0.1.1",
|
|
30
|
+
"minCoreVersion": "0.1.2",
|
|
31
|
+
"fulfillment": {
|
|
32
|
+
"source": {
|
|
33
|
+
"kind": "git",
|
|
34
|
+
"repoUrl": "https://github.com/treeseed-ai/market.git",
|
|
35
|
+
"directory": "templates/starter-basic",
|
|
36
|
+
"ref": "main",
|
|
37
|
+
"integrity": "catalog-fixture"
|
|
38
|
+
},
|
|
39
|
+
"hooksPolicy": "builtin_only",
|
|
40
|
+
"supportsReconcile": true
|
|
41
|
+
},
|
|
42
|
+
"offer": {
|
|
43
|
+
"priceModel": "free",
|
|
44
|
+
"license": "AGPL-3.0-only",
|
|
45
|
+
"support": "community"
|
|
46
|
+
},
|
|
47
|
+
"relatedBooks": [],
|
|
48
|
+
"relatedKnowledge": [],
|
|
49
|
+
"relatedObjectives": []
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"meta": {
|
|
53
|
+
"source": "fixture"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "__SITE_SLUG__",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "npm@11.7.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"setup": "npm install",
|
|
12
|
+
"setup:ci": "npm ci",
|
|
13
|
+
"config": "treeseed config",
|
|
14
|
+
"dev": "treeseed dev",
|
|
15
|
+
"dev:watch": "treeseed dev --watch",
|
|
16
|
+
"check": "treeseed check",
|
|
17
|
+
"build": "treeseed build",
|
|
18
|
+
"deploy": "treeseed deploy",
|
|
19
|
+
"preview": "treeseed preview",
|
|
20
|
+
"sync": "treeseed sync",
|
|
21
|
+
"verify": "npm run check && npm run build"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@treeseed/cli": "__CLI_VERSION__",
|
|
25
|
+
"@treeseed/core": "__CORE_VERSION__",
|
|
26
|
+
"yaml": "^2.8.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.6.0",
|
|
30
|
+
"typescript": "^5.9.3"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
site:
|
|
2
|
+
name: __SITE_NAME__
|
|
3
|
+
statement: A Treeseed site generated from the basic starter template.
|
|
4
|
+
siteUrl: __SITE_URL__
|
|
5
|
+
githubRepository: __REPOSITORY_URL__
|
|
6
|
+
discordLink: __DISCORD_URL__
|
|
7
|
+
headerMenu:
|
|
8
|
+
- label: Learn
|
|
9
|
+
items:
|
|
10
|
+
- label: Handbook
|
|
11
|
+
href: /knowledge/handbook/
|
|
12
|
+
- label: Build
|
|
13
|
+
items:
|
|
14
|
+
- label: Welcome
|
|
15
|
+
href: /welcome/
|
|
16
|
+
footerMenu:
|
|
17
|
+
- label: Project
|
|
18
|
+
items:
|
|
19
|
+
- label: Repository
|
|
20
|
+
href: __REPOSITORY_URL__
|
|
21
|
+
forms:
|
|
22
|
+
apiBaseUrl: /api/form/submit
|
|
23
|
+
emailNotifications:
|
|
24
|
+
contactRouting:
|
|
25
|
+
default:
|
|
26
|
+
- __CONTACT_EMAIL__
|
|
27
|
+
subscribeRecipients:
|
|
28
|
+
- __CONTACT_EMAIL__
|
|
29
|
+
summary: __SITE_NAME__ is a Treeseed site generated from the basic starter.
|
|
30
|
+
projectStage: Initial build
|
|
31
|
+
projectStageDetail: Generated from the Treeseed basic starter template.
|
|
32
|
+
models:
|
|
33
|
+
pages:
|
|
34
|
+
defaults:
|
|
35
|
+
pageLayout: article
|
|
36
|
+
stage: starter
|
|
37
|
+
audience: []
|
|
38
|
+
docs:
|
|
39
|
+
defaults:
|
|
40
|
+
tags: []
|
package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/empty/.gitkeep
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Handbook
|
|
3
|
+
description: Starter handbook for the generated Treeseed site.
|
|
4
|
+
tags:
|
|
5
|
+
- handbook
|
|
6
|
+
- starter
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
`__SITE_NAME__` is connected to the Treeseed runtime through `@treeseed/core`.
|
|
10
|
+
|
|
11
|
+
Use this handbook as the first docs collection entry.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Welcome
|
|
3
|
+
description: Welcome page for the generated Treeseed starter site.
|
|
4
|
+
slug: welcome
|
|
5
|
+
summary: A starter page proving the tenant content pipeline is wired correctly.
|
|
6
|
+
updated: 2026-04-08
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Welcome to `__SITE_NAME__`.
|
|
10
|
+
|
|
11
|
+
This site was generated from the TreeSeed basic starter.
|
package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const collections: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
entries: {}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
id: __SITE_SLUG__
|
|
2
|
+
siteConfigPath: ./src/config.yaml
|
|
3
|
+
content:
|
|
4
|
+
docs: ./src/content/knowledge
|
|
5
|
+
pages: ./src/content/pages
|
|
6
|
+
notes: ./src/content/empty
|
|
7
|
+
questions: ./src/content/empty
|
|
8
|
+
objectives: ./src/content/empty
|
|
9
|
+
people: ./src/content/empty
|
|
10
|
+
agents: ./src/content/empty
|
|
11
|
+
books: ./src/content/empty
|
|
12
|
+
features:
|
|
13
|
+
docs: true
|
|
14
|
+
books: false
|
|
15
|
+
notes: false
|
|
16
|
+
questions: false
|
|
17
|
+
objectives: false
|
|
18
|
+
agents: false
|
|
19
|
+
forms: false
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: __SITE_NAME__
|
|
2
|
+
slug: __SITE_SLUG__
|
|
3
|
+
siteUrl: __SITE_URL__
|
|
4
|
+
contactEmail: __CONTACT_EMAIL__
|
|
5
|
+
cloudflare:
|
|
6
|
+
accountId: replace-with-cloudflare-account-id
|
|
7
|
+
workerName: __SITE_SLUG__
|
|
8
|
+
plugins:
|
|
9
|
+
- package: '@treeseed/core/plugin-default'
|
|
10
|
+
providers:
|
|
11
|
+
forms: store_only
|
|
12
|
+
agents:
|
|
13
|
+
execution: stub
|
|
14
|
+
mutation: local_branch
|
|
15
|
+
repository: stub
|
|
16
|
+
verification: stub
|
|
17
|
+
notification: stub
|
|
18
|
+
research: stub
|
|
19
|
+
deploy: cloudflare
|
|
20
|
+
content:
|
|
21
|
+
docs: default
|
|
22
|
+
site: default
|
|
23
|
+
smtp:
|
|
24
|
+
enabled: false
|
|
25
|
+
turnstile:
|
|
26
|
+
enabled: false
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "starter-basic",
|
|
4
|
+
"displayName": "TreeSeed Basic",
|
|
5
|
+
"description": "Opinionated first-party TreeSeed starter for documentation-first teams.",
|
|
6
|
+
"category": "starter",
|
|
7
|
+
"tags": [
|
|
8
|
+
"starter",
|
|
9
|
+
"astro",
|
|
10
|
+
"cloudflare",
|
|
11
|
+
"docs"
|
|
12
|
+
],
|
|
13
|
+
"templateVersion": "1.0.0",
|
|
14
|
+
"templateApiVersion": 1,
|
|
15
|
+
"minCliVersion": "0.1.1",
|
|
16
|
+
"minCoreVersion": "0.1.2",
|
|
17
|
+
"variables": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Site name",
|
|
20
|
+
"token": "__SITE_NAME__",
|
|
21
|
+
"deriveFrom": "name",
|
|
22
|
+
"required": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Site slug",
|
|
26
|
+
"token": "__SITE_SLUG__",
|
|
27
|
+
"deriveFrom": "slug",
|
|
28
|
+
"required": true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Site URL",
|
|
32
|
+
"token": "__SITE_URL__",
|
|
33
|
+
"deriveFrom": "siteUrl",
|
|
34
|
+
"default": "https://example.com",
|
|
35
|
+
"required": true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Contact email",
|
|
39
|
+
"token": "__CONTACT_EMAIL__",
|
|
40
|
+
"deriveFrom": "contactEmail",
|
|
41
|
+
"default": "hello@example.com",
|
|
42
|
+
"required": true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "Repository URL",
|
|
46
|
+
"token": "__REPOSITORY_URL__",
|
|
47
|
+
"deriveFrom": "repositoryUrl",
|
|
48
|
+
"default": "https://github.com/example/site"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "Discord URL",
|
|
52
|
+
"token": "__DISCORD_URL__",
|
|
53
|
+
"deriveFrom": "discordUrl",
|
|
54
|
+
"default": "https://discord.gg/example"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "CLI version",
|
|
58
|
+
"token": "__CLI_VERSION__",
|
|
59
|
+
"deriveFrom": "cliVersion",
|
|
60
|
+
"required": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "Core version",
|
|
64
|
+
"token": "__CORE_VERSION__",
|
|
65
|
+
"deriveFrom": "coreVersion",
|
|
66
|
+
"required": true
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"managedSurface": {
|
|
70
|
+
"coreManaged": [
|
|
71
|
+
"package.json",
|
|
72
|
+
"astro.config.ts",
|
|
73
|
+
"tsconfig.json",
|
|
74
|
+
"treeseed.site.yaml",
|
|
75
|
+
"src/content.config.ts",
|
|
76
|
+
"src/config.yaml",
|
|
77
|
+
"src/manifest.yaml",
|
|
78
|
+
"src/env.yaml"
|
|
79
|
+
],
|
|
80
|
+
"validatedOnly": [
|
|
81
|
+
"treeseed.site.yaml",
|
|
82
|
+
"src/config.yaml",
|
|
83
|
+
"src/manifest.yaml",
|
|
84
|
+
"src/env.yaml"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"testing": {
|
|
88
|
+
"buildCommand": "npm run build"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface QuestionPriorityUpdatedMessage {
|
|
2
|
+
questionId: string;
|
|
3
|
+
reason: string;
|
|
4
|
+
plannerRunId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ObjectivePriorityUpdatedMessage {
|
|
7
|
+
objectiveId: string;
|
|
8
|
+
reason: string;
|
|
9
|
+
plannerRunId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ArchitectureUpdatedMessage {
|
|
12
|
+
objectiveId: string;
|
|
13
|
+
knowledgeId: string;
|
|
14
|
+
architectRunId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SubscriberNotifiedMessage {
|
|
17
|
+
email: string;
|
|
18
|
+
itemCount: number;
|
|
19
|
+
notifierRunId: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ResearchStartedMessage {
|
|
22
|
+
questionId: string;
|
|
23
|
+
researcherRunId: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ResearchCompletedMessage {
|
|
26
|
+
questionId: string;
|
|
27
|
+
knowledgeId: string | null;
|
|
28
|
+
researcherRunId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface TaskCompleteMessage {
|
|
31
|
+
branchName: string | null;
|
|
32
|
+
changedTargets: string[];
|
|
33
|
+
engineerRunId: string;
|
|
34
|
+
}
|
|
35
|
+
export interface TaskWaitingMessage {
|
|
36
|
+
blockingReason: string;
|
|
37
|
+
engineerRunId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface TaskFailedMessage {
|
|
40
|
+
failureSummary: string;
|
|
41
|
+
engineerRunId: string;
|
|
42
|
+
}
|
|
43
|
+
export interface TaskVerifiedMessage {
|
|
44
|
+
branchName: string | null;
|
|
45
|
+
reviewerRunId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ReviewFailedMessage {
|
|
48
|
+
failureSummary: string;
|
|
49
|
+
reviewerRunId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ReviewWaitingMessage {
|
|
52
|
+
blockingReason: string;
|
|
53
|
+
reviewerRunId: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ReleaseStartedMessage {
|
|
56
|
+
taskRunId: string | null;
|
|
57
|
+
releaserRunId: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ReleaseCompletedMessage {
|
|
60
|
+
releaseSummary: string;
|
|
61
|
+
releaserRunId: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ReleaseFailedMessage {
|
|
64
|
+
failureSummary: string;
|
|
65
|
+
releaserRunId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface AgentMessageContracts {
|
|
68
|
+
question_priority_updated: QuestionPriorityUpdatedMessage;
|
|
69
|
+
objective_priority_updated: ObjectivePriorityUpdatedMessage;
|
|
70
|
+
architecture_updated: ArchitectureUpdatedMessage;
|
|
71
|
+
subscriber_notified: SubscriberNotifiedMessage;
|
|
72
|
+
research_started: ResearchStartedMessage;
|
|
73
|
+
research_completed: ResearchCompletedMessage;
|
|
74
|
+
task_complete: TaskCompleteMessage;
|
|
75
|
+
task_waiting: TaskWaitingMessage;
|
|
76
|
+
task_failed: TaskFailedMessage;
|
|
77
|
+
task_verified: TaskVerifiedMessage;
|
|
78
|
+
review_failed: ReviewFailedMessage;
|
|
79
|
+
review_waiting: ReviewWaitingMessage;
|
|
80
|
+
release_started: ReleaseStartedMessage;
|
|
81
|
+
release_completed: ReleaseCompletedMessage;
|
|
82
|
+
release_failed: ReleaseFailedMessage;
|
|
83
|
+
}
|
|
84
|
+
export type AgentMessageType = keyof AgentMessageContracts;
|
|
85
|
+
export type AgentMessagePayload<TType extends AgentMessageType> = AgentMessageContracts[TType];
|
|
86
|
+
export declare const AGENT_MESSAGE_TYPES: readonly ["question_priority_updated", "objective_priority_updated", "architecture_updated", "subscriber_notified", "research_started", "research_completed", "task_complete", "task_waiting", "task_failed", "task_verified", "review_failed", "review_waiting", "release_started", "release_completed", "release_failed"];
|
|
87
|
+
export declare function parseAgentMessagePayload<TType extends AgentMessageType>(type: TType, payloadJson: string): AgentMessagePayload<TType>;
|
|
88
|
+
export declare function serializeAgentMessagePayload<TType extends AgentMessageType>(type: TType, payload: AgentMessagePayload<TType>): string;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const AGENT_MESSAGE_TYPES = [
|
|
2
|
+
"question_priority_updated",
|
|
3
|
+
"objective_priority_updated",
|
|
4
|
+
"architecture_updated",
|
|
5
|
+
"subscriber_notified",
|
|
6
|
+
"research_started",
|
|
7
|
+
"research_completed",
|
|
8
|
+
"task_complete",
|
|
9
|
+
"task_waiting",
|
|
10
|
+
"task_failed",
|
|
11
|
+
"task_verified",
|
|
12
|
+
"review_failed",
|
|
13
|
+
"review_waiting",
|
|
14
|
+
"release_started",
|
|
15
|
+
"release_completed",
|
|
16
|
+
"release_failed"
|
|
17
|
+
];
|
|
18
|
+
function ensureString(value, label) {
|
|
19
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
20
|
+
throw new Error(`Invalid ${label}: expected non-empty string.`);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
function ensureOptionalString(value, label) {
|
|
25
|
+
if (value === null || value === void 0) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return ensureString(value, label);
|
|
29
|
+
}
|
|
30
|
+
function ensureStringArray(value, label) {
|
|
31
|
+
if (!Array.isArray(value)) {
|
|
32
|
+
throw new Error(`Invalid ${label}: expected array.`);
|
|
33
|
+
}
|
|
34
|
+
return value.map((entry, index) => ensureString(entry, `${label}[${index}]`));
|
|
35
|
+
}
|
|
36
|
+
function ensureNumber(value, label) {
|
|
37
|
+
if (typeof value !== "number" || Number.isNaN(value)) {
|
|
38
|
+
throw new Error(`Invalid ${label}: expected number.`);
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
function parseAgentMessagePayload(type, payloadJson) {
|
|
43
|
+
const parsed = JSON.parse(payloadJson);
|
|
44
|
+
switch (type) {
|
|
45
|
+
case "question_priority_updated":
|
|
46
|
+
return {
|
|
47
|
+
questionId: ensureString(parsed.questionId, "questionId"),
|
|
48
|
+
reason: ensureString(parsed.reason, "reason"),
|
|
49
|
+
plannerRunId: ensureString(parsed.plannerRunId, "plannerRunId")
|
|
50
|
+
};
|
|
51
|
+
case "objective_priority_updated":
|
|
52
|
+
return {
|
|
53
|
+
objectiveId: ensureString(parsed.objectiveId, "objectiveId"),
|
|
54
|
+
reason: ensureString(parsed.reason, "reason"),
|
|
55
|
+
plannerRunId: ensureString(parsed.plannerRunId, "plannerRunId")
|
|
56
|
+
};
|
|
57
|
+
case "architecture_updated":
|
|
58
|
+
return {
|
|
59
|
+
objectiveId: ensureString(parsed.objectiveId, "objectiveId"),
|
|
60
|
+
knowledgeId: ensureString(parsed.knowledgeId, "knowledgeId"),
|
|
61
|
+
architectRunId: ensureString(parsed.architectRunId, "architectRunId")
|
|
62
|
+
};
|
|
63
|
+
case "subscriber_notified":
|
|
64
|
+
return {
|
|
65
|
+
email: ensureString(parsed.email, "email"),
|
|
66
|
+
itemCount: ensureNumber(parsed.itemCount, "itemCount"),
|
|
67
|
+
notifierRunId: ensureString(parsed.notifierRunId, "notifierRunId")
|
|
68
|
+
};
|
|
69
|
+
case "research_started":
|
|
70
|
+
return {
|
|
71
|
+
questionId: ensureString(parsed.questionId, "questionId"),
|
|
72
|
+
researcherRunId: ensureString(parsed.researcherRunId, "researcherRunId")
|
|
73
|
+
};
|
|
74
|
+
case "research_completed":
|
|
75
|
+
return {
|
|
76
|
+
questionId: ensureString(parsed.questionId, "questionId"),
|
|
77
|
+
knowledgeId: ensureOptionalString(parsed.knowledgeId, "knowledgeId"),
|
|
78
|
+
researcherRunId: ensureString(parsed.researcherRunId, "researcherRunId")
|
|
79
|
+
};
|
|
80
|
+
case "task_complete":
|
|
81
|
+
return {
|
|
82
|
+
branchName: ensureOptionalString(parsed.branchName, "branchName"),
|
|
83
|
+
changedTargets: ensureStringArray(parsed.changedTargets, "changedTargets"),
|
|
84
|
+
engineerRunId: ensureString(parsed.engineerRunId, "engineerRunId")
|
|
85
|
+
};
|
|
86
|
+
case "task_waiting":
|
|
87
|
+
return {
|
|
88
|
+
blockingReason: ensureString(parsed.blockingReason, "blockingReason"),
|
|
89
|
+
engineerRunId: ensureString(parsed.engineerRunId, "engineerRunId")
|
|
90
|
+
};
|
|
91
|
+
case "task_failed":
|
|
92
|
+
return {
|
|
93
|
+
failureSummary: ensureString(parsed.failureSummary, "failureSummary"),
|
|
94
|
+
engineerRunId: ensureString(parsed.engineerRunId, "engineerRunId")
|
|
95
|
+
};
|
|
96
|
+
case "task_verified":
|
|
97
|
+
return {
|
|
98
|
+
branchName: ensureOptionalString(parsed.branchName, "branchName"),
|
|
99
|
+
reviewerRunId: ensureString(parsed.reviewerRunId, "reviewerRunId")
|
|
100
|
+
};
|
|
101
|
+
case "review_failed":
|
|
102
|
+
return {
|
|
103
|
+
failureSummary: ensureString(parsed.failureSummary, "failureSummary"),
|
|
104
|
+
reviewerRunId: ensureString(parsed.reviewerRunId, "reviewerRunId")
|
|
105
|
+
};
|
|
106
|
+
case "review_waiting":
|
|
107
|
+
return {
|
|
108
|
+
blockingReason: ensureString(parsed.blockingReason, "blockingReason"),
|
|
109
|
+
reviewerRunId: ensureString(parsed.reviewerRunId, "reviewerRunId")
|
|
110
|
+
};
|
|
111
|
+
case "release_started":
|
|
112
|
+
return {
|
|
113
|
+
taskRunId: ensureOptionalString(parsed.taskRunId, "taskRunId"),
|
|
114
|
+
releaserRunId: ensureString(parsed.releaserRunId, "releaserRunId")
|
|
115
|
+
};
|
|
116
|
+
case "release_completed":
|
|
117
|
+
return {
|
|
118
|
+
releaseSummary: ensureString(parsed.releaseSummary, "releaseSummary"),
|
|
119
|
+
releaserRunId: ensureString(parsed.releaserRunId, "releaserRunId")
|
|
120
|
+
};
|
|
121
|
+
case "release_failed":
|
|
122
|
+
return {
|
|
123
|
+
failureSummary: ensureString(parsed.failureSummary, "failureSummary"),
|
|
124
|
+
releaserRunId: ensureString(parsed.releaserRunId, "releaserRunId")
|
|
125
|
+
};
|
|
126
|
+
default:
|
|
127
|
+
throw new Error(`Unknown agent message type "${String(type)}".`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function serializeAgentMessagePayload(type, payload) {
|
|
131
|
+
parseAgentMessagePayload(type, JSON.stringify(payload));
|
|
132
|
+
return JSON.stringify(payload);
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
AGENT_MESSAGE_TYPES,
|
|
136
|
+
parseAgentMessagePayload,
|
|
137
|
+
serializeAgentMessagePayload
|
|
138
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type AgentErrorCategory = 'trigger_resolution_error' | 'permission_error' | 'message_claim_error' | 'lease_error' | 'execution_error' | 'mutation_error' | 'sdk_error';
|
|
2
|
+
export interface AgentRunTrace {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
runId: string;
|
|
5
|
+
agentSlug: string;
|
|
6
|
+
handlerKind: string;
|
|
7
|
+
triggerKind: string;
|
|
8
|
+
triggerSource: string;
|
|
9
|
+
claimedMessageId: number | null;
|
|
10
|
+
selectedItemKey: string | null;
|
|
11
|
+
branchName: string | null;
|
|
12
|
+
commitSha: string | null;
|
|
13
|
+
changedPaths: string[];
|
|
14
|
+
summary: string | null;
|
|
15
|
+
error: string | null;
|
|
16
|
+
errorCategory: AgentErrorCategory | null;
|
|
17
|
+
startedAt: string;
|
|
18
|
+
finishedAt: string | null;
|
|
19
|
+
status: string;
|
|
20
|
+
}
|
|
File without changes
|