@treeseed/sdk 0.10.27 → 0.11.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.
- package/README.md +207 -6
- package/dist/capacity-provider.d.ts +3 -1
- package/dist/capacity-provider.js +25 -5
- package/dist/control-plane.d.ts +1 -0
- package/dist/control-plane.js +38 -13
- package/dist/db/market-schema.d.ts +8860 -6172
- package/dist/db/market-schema.js +108 -0
- package/dist/db/node-sqlite.js +7 -2
- package/dist/hosting/apps.d.ts +12 -0
- package/dist/hosting/apps.js +107 -0
- package/dist/hosting/builtins.d.ts +25 -0
- package/dist/hosting/builtins.js +791 -0
- package/dist/hosting/contracts.d.ts +207 -0
- package/dist/hosting/contracts.js +0 -0
- package/dist/hosting/graph.d.ts +192 -0
- package/dist/hosting/graph.js +1106 -0
- package/dist/hosting/index.d.ts +4 -0
- package/dist/hosting/index.js +4 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +71 -7
- package/dist/managed-dependencies.js +1 -2
- package/dist/market-client.d.ts +63 -3
- package/dist/market-client.js +83 -11
- package/dist/operations/services/bootstrap-runner.d.ts +3 -1
- package/dist/operations/services/bootstrap-runner.js +22 -2
- package/dist/operations/services/config-runtime.d.ts +10 -5
- package/dist/operations/services/config-runtime.js +209 -66
- package/dist/operations/services/deploy.d.ts +70 -7
- package/dist/operations/services/deploy.js +579 -64
- package/dist/operations/services/deployment-readiness.d.ts +30 -0
- package/dist/operations/services/deployment-readiness.js +175 -0
- package/dist/operations/services/git-workflow.d.ts +2 -1
- package/dist/operations/services/git-workflow.js +9 -3
- package/dist/operations/services/github-actions-verification.d.ts +1 -0
- package/dist/operations/services/github-actions-verification.js +1 -0
- package/dist/operations/services/github-api.js +1 -1
- package/dist/operations/services/github-automation.d.ts +1 -1
- package/dist/operations/services/github-automation.js +4 -3
- package/dist/operations/services/github-credentials.d.ts +13 -0
- package/dist/operations/services/github-credentials.js +58 -0
- package/dist/operations/services/hosted-service-checks.d.ts +63 -0
- package/dist/operations/services/hosted-service-checks.js +327 -0
- package/dist/operations/services/hub-provider-launch.js +3 -3
- package/dist/operations/services/live-hosted-service-checks.d.ts +25 -0
- package/dist/operations/services/live-hosted-service-checks.js +350 -0
- package/dist/operations/services/managed-host-security.js +1 -1
- package/dist/operations/services/operations-runner-smoke.d.ts +30 -0
- package/dist/operations/services/operations-runner-smoke.js +180 -0
- package/dist/operations/services/package-adapters.d.ts +95 -0
- package/dist/operations/services/package-adapters.js +288 -0
- package/dist/operations/services/package-reference-policy.d.ts +1 -0
- package/dist/operations/services/package-reference-policy.js +15 -2
- package/dist/operations/services/project-platform.d.ts +80 -22
- package/dist/operations/services/project-platform.js +49 -8
- package/dist/operations/services/project-web-monitor.js +26 -4
- package/dist/operations/services/railway-api.d.ts +88 -5
- package/dist/operations/services/railway-api.js +626 -35
- package/dist/operations/services/railway-deploy.d.ts +46 -40
- package/dist/operations/services/railway-deploy.js +261 -293
- package/dist/operations/services/release-candidate.d.ts +19 -0
- package/dist/operations/services/release-candidate.js +375 -38
- package/dist/operations/services/repository-save-orchestrator.d.ts +3 -1
- package/dist/operations/services/repository-save-orchestrator.js +279 -66
- package/dist/operations/services/runtime-tools.d.ts +1 -0
- package/dist/operations/services/runtime-tools.js +10 -9
- package/dist/operations/services/template-registry.js +14 -7
- package/dist/operations/services/verification-cache.d.ts +25 -0
- package/dist/operations/services/verification-cache.js +71 -0
- package/dist/operations/services/workspace-dependency-mode.js +9 -1
- package/dist/operations/services/workspace-save.js +1 -1
- package/dist/operations/services/workspace-tools.js +2 -1
- package/dist/platform/contracts.d.ts +32 -1
- package/dist/platform/deploy-config.js +73 -8
- package/dist/platform/env.yaml +163 -35
- package/dist/platform/environment.d.ts +1 -0
- package/dist/platform/environment.js +74 -5
- package/dist/platform/plugin.d.ts +9 -0
- package/dist/platform-operation-store.js +2 -2
- package/dist/platform-operations.js +1 -1
- package/dist/reconcile/bootstrap-systems.js +2 -2
- package/dist/reconcile/builtin-adapters.js +372 -189
- package/dist/reconcile/contracts.d.ts +9 -5
- package/dist/reconcile/desired-state.d.ts +1 -0
- package/dist/reconcile/desired-state.js +5 -5
- package/dist/reconcile/engine.d.ts +5 -2
- package/dist/reconcile/engine.js +53 -32
- package/dist/reconcile/index.d.ts +2 -0
- package/dist/reconcile/index.js +2 -0
- package/dist/reconcile/live-acceptance.d.ts +79 -0
- package/dist/reconcile/live-acceptance.js +1615 -0
- package/dist/reconcile/platform.d.ts +104 -0
- package/dist/reconcile/platform.js +100 -0
- package/dist/reconcile/state.js +4 -4
- package/dist/reconcile/units.js +2 -2
- package/dist/scripts/deployment-readiness.js +20 -0
- package/dist/scripts/generate-treedx-openapi-types.js +186 -0
- package/dist/scripts/operations-runner-smoke.js +16 -0
- package/dist/scripts/release-verify.js +4 -1
- package/dist/scripts/template-catalog.test.js +7 -7
- package/dist/scripts/tenant-workflow-action.js +10 -1
- package/dist/sdk-types.d.ts +172 -5
- package/dist/sdk-types.js +28 -3
- package/dist/sdk.d.ts +35 -24
- package/dist/sdk.js +186 -17
- package/dist/template-launch-requirements.js +9 -0
- package/dist/treedx/adapters.d.ts +6 -0
- package/dist/treedx/adapters.js +36 -0
- package/dist/treedx/client.d.ts +222 -0
- package/dist/treedx/client.js +871 -0
- package/dist/treedx/errors.d.ts +13 -0
- package/dist/treedx/errors.js +17 -0
- package/dist/treedx/federated-client.d.ts +27 -0
- package/dist/treedx/federated-client.js +158 -0
- package/dist/treedx/generated/openapi-types.d.ts +3558 -0
- package/dist/treedx/generated/openapi-types.js +0 -0
- package/dist/treedx/graph-adapter.d.ts +33 -0
- package/dist/treedx/graph-adapter.js +156 -0
- package/dist/treedx/index.d.ts +14 -0
- package/dist/treedx/index.js +48 -0
- package/dist/treedx/market-integration.d.ts +27 -0
- package/dist/treedx/market-integration.js +131 -0
- package/dist/treedx/ports.d.ts +166 -0
- package/dist/treedx/ports.js +231 -0
- package/dist/treedx/query-adapter.d.ts +19 -0
- package/dist/treedx/query-adapter.js +62 -0
- package/dist/treedx/registry-client.d.ts +11 -0
- package/dist/treedx/registry-client.js +19 -0
- package/dist/treedx/repository-adapter.d.ts +45 -0
- package/dist/treedx/repository-adapter.js +308 -0
- package/dist/treedx/sdk-integration.d.ts +27 -0
- package/dist/treedx/sdk-integration.js +63 -0
- package/dist/treedx/types.d.ts +1084 -0
- package/dist/treedx/types.js +8 -0
- package/dist/treedx/workspace-adapter.d.ts +27 -0
- package/dist/treedx/workspace-adapter.js +65 -0
- package/dist/treedx-backends.d.ts +218 -0
- package/dist/treedx-backends.js +632 -0
- package/dist/treedx-client.d.ts +86 -0
- package/dist/treedx-client.js +175 -0
- package/dist/treeseed/template-catalog/catalog.fixture.json +497 -138
- package/dist/workflow/operations.d.ts +119 -13
- package/dist/workflow/operations.js +309 -53
- package/dist/workflow-state.d.ts +13 -0
- package/dist/workflow-state.js +43 -26
- package/dist/workflow-support.d.ts +11 -3
- package/dist/workflow-support.js +67 -3
- package/dist/workflow.d.ts +5 -0
- package/drizzle/market/0004_treedx_market_integration.sql +99 -0
- package/package.json +34 -3
- package/templates/github/deploy-web.workflow.yml +39 -6
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.d.ts +0 -3
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.ts +0 -6
- package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +0 -35
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/api/server.js +0 -4
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +0 -65
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/decisions/adopt-initial-proposal-loop.mdx +0 -22
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/empty/.gitkeep +0 -1
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/knowledge/handbook/index.mdx +0 -11
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/pages/welcome.mdx +0 -11
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/people/starter-steward.mdx +0 -11
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/proposals/establish-initial-proposal-loop.mdx +0 -17
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.d.ts +0 -1
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.ts +0 -3
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/env.yaml +0 -1
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +0 -26
- package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +0 -74
- package/dist/treeseed/template-catalog/templates/starter-basic/template/tsconfig.json +0 -9
- package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +0 -103
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TreeDxClient } from './client.ts';
|
|
2
|
+
import type { TreeDxCommitRequest, TreeDxCommitResult, TreeDxCreateWorkspaceRequest, TreeDxDiff, TreeDxExecRequest, TreeDxExecResult, TreeDxFile, TreeDxFileMutationResult, TreeDxListTreeRequest, TreeDxPatchFileRequest, TreeDxReadFileRequest, TreeDxSearchRequest, TreeDxSearchResult, TreeDxStatus, TreeDxTreeEntry, TreeDxWorkspace, TreeDxWriteFileRequest, TreeDxDeleteFileRequest } from './types.ts';
|
|
3
|
+
export interface TreeDxWorkspaceAdapterOptions {
|
|
4
|
+
client: TreeDxClient;
|
|
5
|
+
repoId: string;
|
|
6
|
+
workspaceId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class TreeDxWorkspaceAdapter {
|
|
9
|
+
private readonly options;
|
|
10
|
+
private workspaceId?;
|
|
11
|
+
constructor(options: TreeDxWorkspaceAdapterOptions);
|
|
12
|
+
create(input: TreeDxCreateWorkspaceRequest): Promise<TreeDxWorkspace>;
|
|
13
|
+
close(workspaceId?: string): Promise<void>;
|
|
14
|
+
listTree(path?: string): Promise<TreeDxTreeEntry[]>;
|
|
15
|
+
readFile(path: string): Promise<TreeDxFile>;
|
|
16
|
+
writeFile(path: string, content: string, options?: Omit<TreeDxWriteFileRequest, 'workspaceId' | 'path' | 'content'>): Promise<TreeDxFileMutationResult>;
|
|
17
|
+
patchFile(path: string, patch: string, options?: Omit<TreeDxPatchFileRequest, 'workspaceId' | 'path' | 'patch'>): Promise<TreeDxFileMutationResult>;
|
|
18
|
+
deleteFile(path: string, options?: Omit<TreeDxDeleteFileRequest, 'workspaceId' | 'path'>): Promise<TreeDxFileMutationResult>;
|
|
19
|
+
search(input: Omit<TreeDxSearchRequest, 'workspaceId'>): Promise<TreeDxSearchResult>;
|
|
20
|
+
status(): Promise<TreeDxStatus>;
|
|
21
|
+
diff(): Promise<TreeDxDiff>;
|
|
22
|
+
commit(input: Omit<TreeDxCommitRequest, 'workspaceId'>): Promise<TreeDxCommitResult>;
|
|
23
|
+
exec(input: Omit<TreeDxExecRequest, 'workspaceId'>): Promise<TreeDxExecResult>;
|
|
24
|
+
rawListTree(input: TreeDxListTreeRequest): Promise<TreeDxTreeEntry[]>;
|
|
25
|
+
rawReadFile(input: TreeDxReadFileRequest): Promise<TreeDxFile>;
|
|
26
|
+
private requireWorkspaceId;
|
|
27
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TreeDxApiError } from "./errors.js";
|
|
2
|
+
class TreeDxWorkspaceAdapter {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
this.options = options;
|
|
5
|
+
this.workspaceId = options.workspaceId;
|
|
6
|
+
}
|
|
7
|
+
options;
|
|
8
|
+
workspaceId;
|
|
9
|
+
async create(input) {
|
|
10
|
+
const workspace = await this.options.client.createWorkspace({ ...input, repoId: input.repoId ?? this.options.repoId });
|
|
11
|
+
this.workspaceId = workspace.workspaceId;
|
|
12
|
+
return workspace;
|
|
13
|
+
}
|
|
14
|
+
close(workspaceId = this.requireWorkspaceId()) {
|
|
15
|
+
return this.options.client.closeWorkspace(workspaceId);
|
|
16
|
+
}
|
|
17
|
+
listTree(path = "") {
|
|
18
|
+
return this.options.client.listTree({ workspaceId: this.requireWorkspaceId(), path });
|
|
19
|
+
}
|
|
20
|
+
readFile(path) {
|
|
21
|
+
return this.options.client.readFile({ workspaceId: this.requireWorkspaceId(), path });
|
|
22
|
+
}
|
|
23
|
+
writeFile(path, content, options = {}) {
|
|
24
|
+
return this.options.client.writeFile({ ...options, workspaceId: this.requireWorkspaceId(), path, content });
|
|
25
|
+
}
|
|
26
|
+
patchFile(path, patch, options = {}) {
|
|
27
|
+
return this.options.client.patchFile({ ...options, workspaceId: this.requireWorkspaceId(), path, patch });
|
|
28
|
+
}
|
|
29
|
+
deleteFile(path, options = {}) {
|
|
30
|
+
return this.options.client.deleteFile({ ...options, workspaceId: this.requireWorkspaceId(), path });
|
|
31
|
+
}
|
|
32
|
+
search(input) {
|
|
33
|
+
return this.options.client.search({ ...input, workspaceId: this.requireWorkspaceId() });
|
|
34
|
+
}
|
|
35
|
+
status() {
|
|
36
|
+
return this.options.client.status({ workspaceId: this.requireWorkspaceId() });
|
|
37
|
+
}
|
|
38
|
+
diff() {
|
|
39
|
+
return this.options.client.diff({ workspaceId: this.requireWorkspaceId() });
|
|
40
|
+
}
|
|
41
|
+
commit(input) {
|
|
42
|
+
return this.options.client.commit({ ...input, workspaceId: this.requireWorkspaceId() });
|
|
43
|
+
}
|
|
44
|
+
exec(input) {
|
|
45
|
+
return this.options.client.exec({ ...input, workspaceId: this.requireWorkspaceId() });
|
|
46
|
+
}
|
|
47
|
+
rawListTree(input) {
|
|
48
|
+
return this.options.client.listTree(input);
|
|
49
|
+
}
|
|
50
|
+
rawReadFile(input) {
|
|
51
|
+
return this.options.client.readFile(input);
|
|
52
|
+
}
|
|
53
|
+
requireWorkspaceId() {
|
|
54
|
+
if (!this.workspaceId) {
|
|
55
|
+
throw new TreeDxApiError("TreeDX workspace ID is required.", {
|
|
56
|
+
status: 400,
|
|
57
|
+
code: "workspace_required"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return this.workspaceId;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
TreeDxWorkspaceAdapter
|
|
65
|
+
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { TreeDxApiError, TreeDxClient } from './treedx-client.ts';
|
|
2
|
+
import { ContentStore } from './content-store.ts';
|
|
3
|
+
import { ContentGraphRuntime } from './graph.ts';
|
|
4
|
+
import type { SdkContentEntry, SdkContextPackRequest, SdkFollowRequest, SdkGetRequest, SdkGraphDslParseResult, SdkGraphQueryRequest, SdkGraphRefreshRequest, SdkModelRegistry, SdkMutationRequest, SdkPickRequest, SdkPickResult, SdkSearchRequest, SdkUpdateRequest } from './sdk-types.ts';
|
|
5
|
+
export interface TreeSeedTreeDxRepositoryHint {
|
|
6
|
+
name?: string;
|
|
7
|
+
owner?: string;
|
|
8
|
+
remoteUrl?: string;
|
|
9
|
+
defaultBranch?: string;
|
|
10
|
+
purpose?: 'project_content' | 'site_code' | 'optional_project';
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface TreeSeedTreeDxContentPathRule {
|
|
14
|
+
paths: string[];
|
|
15
|
+
repositoryHints?: TreeSeedTreeDxRepositoryHint[];
|
|
16
|
+
}
|
|
17
|
+
export interface AgentSdkTreeDxOptions {
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
token?: string;
|
|
21
|
+
repoId?: string;
|
|
22
|
+
ref?: string;
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
contentPathMap?: Record<string, string | TreeSeedTreeDxContentPathRule>;
|
|
25
|
+
repositoryHints?: TreeSeedTreeDxRepositoryHint[];
|
|
26
|
+
fetchImpl?: typeof fetch;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentSdkContentRepositoryOptions {
|
|
29
|
+
adapter?: 'treedx' | 'local';
|
|
30
|
+
}
|
|
31
|
+
export interface ResolvedTreeDxOptions {
|
|
32
|
+
baseUrl: string;
|
|
33
|
+
token?: string;
|
|
34
|
+
repoId?: string;
|
|
35
|
+
ref?: string;
|
|
36
|
+
workspaceId?: string;
|
|
37
|
+
contentPathMap?: Record<string, string | TreeSeedTreeDxContentPathRule>;
|
|
38
|
+
repositoryHints: TreeSeedTreeDxRepositoryHint[];
|
|
39
|
+
fetchImpl?: typeof fetch;
|
|
40
|
+
}
|
|
41
|
+
export interface ContentBackend {
|
|
42
|
+
list(model: string): Promise<SdkContentEntry[]>;
|
|
43
|
+
get(request: SdkGetRequest): Promise<SdkContentEntry | null>;
|
|
44
|
+
search(request: SdkSearchRequest): Promise<SdkContentEntry[]>;
|
|
45
|
+
follow(request: SdkFollowRequest): Promise<{
|
|
46
|
+
items: SdkContentEntry[];
|
|
47
|
+
since: string;
|
|
48
|
+
}>;
|
|
49
|
+
pick(request: SdkPickRequest): Promise<SdkPickResult<SdkContentEntry>>;
|
|
50
|
+
create(request: SdkMutationRequest): Promise<unknown>;
|
|
51
|
+
update(request: SdkUpdateRequest): Promise<unknown>;
|
|
52
|
+
}
|
|
53
|
+
export interface GraphBackend {
|
|
54
|
+
refresh(request?: SdkGraphRefreshRequest): Promise<unknown>;
|
|
55
|
+
queryGraph(request: SdkGraphQueryRequest): Promise<unknown>;
|
|
56
|
+
buildContextPack(request: SdkContextPackRequest): Promise<unknown>;
|
|
57
|
+
parseGraphDsl(source: string): Promise<SdkGraphDslParseResult>;
|
|
58
|
+
}
|
|
59
|
+
export interface ExecBackend {
|
|
60
|
+
run(input: unknown): Promise<unknown>;
|
|
61
|
+
}
|
|
62
|
+
export interface TreeDxRepositoryCandidate {
|
|
63
|
+
repoId: string;
|
|
64
|
+
ref?: string;
|
|
65
|
+
path: string;
|
|
66
|
+
repository: Record<string, unknown>;
|
|
67
|
+
}
|
|
68
|
+
export interface TreeDxPortfolioResolverOptions {
|
|
69
|
+
client: TreeDxClient;
|
|
70
|
+
repoId?: string;
|
|
71
|
+
ref?: string;
|
|
72
|
+
repositoryHints?: TreeSeedTreeDxRepositoryHint[];
|
|
73
|
+
}
|
|
74
|
+
export declare class TreeDxContentRepositoryConfigError extends Error {
|
|
75
|
+
constructor(message?: string);
|
|
76
|
+
}
|
|
77
|
+
export declare function resolveTreeDxOptions(input?: AgentSdkTreeDxOptions): ResolvedTreeDxOptions | null;
|
|
78
|
+
export declare function createTreeDxClientFromAgentOptions(options: ResolvedTreeDxOptions): TreeDxClient;
|
|
79
|
+
export declare class TreeDxPortfolioResolver {
|
|
80
|
+
private readonly options;
|
|
81
|
+
private repositoryCache;
|
|
82
|
+
private candidateCache;
|
|
83
|
+
constructor(options: TreeDxPortfolioResolverOptions);
|
|
84
|
+
listRepositories(): Promise<Record<string, unknown>[]>;
|
|
85
|
+
resolveCandidates(rule: TreeSeedTreeDxContentPathRule): Promise<TreeDxRepositoryCandidate[] | {
|
|
86
|
+
repoId: string;
|
|
87
|
+
ref: string | undefined;
|
|
88
|
+
path: string;
|
|
89
|
+
repository: {
|
|
90
|
+
repoId: string | undefined;
|
|
91
|
+
};
|
|
92
|
+
}[]>;
|
|
93
|
+
private resolveCandidatesUncached;
|
|
94
|
+
}
|
|
95
|
+
export declare class LocalContentBackend implements ContentBackend {
|
|
96
|
+
private readonly store;
|
|
97
|
+
constructor(store: ContentStore);
|
|
98
|
+
list(model: string): Promise<SdkContentEntry[]>;
|
|
99
|
+
get(request: SdkGetRequest): Promise<SdkContentEntry | null>;
|
|
100
|
+
search(request: SdkSearchRequest): Promise<SdkContentEntry[]>;
|
|
101
|
+
follow(request: SdkFollowRequest): Promise<{
|
|
102
|
+
items: SdkContentEntry[];
|
|
103
|
+
since: string;
|
|
104
|
+
}>;
|
|
105
|
+
pick(request: SdkPickRequest): Promise<SdkPickResult<SdkContentEntry>>;
|
|
106
|
+
create(request: SdkMutationRequest): Promise<{
|
|
107
|
+
item: SdkContentEntry;
|
|
108
|
+
git: import("./git-runtime.ts").GitMutationResult;
|
|
109
|
+
}>;
|
|
110
|
+
update(request: SdkUpdateRequest): Promise<{
|
|
111
|
+
item: SdkContentEntry;
|
|
112
|
+
git: import("./git-runtime.ts").GitMutationResult;
|
|
113
|
+
}>;
|
|
114
|
+
}
|
|
115
|
+
export declare class MissingTreeDxContentBackend implements ContentBackend {
|
|
116
|
+
private fail;
|
|
117
|
+
list(): Promise<SdkContentEntry[]>;
|
|
118
|
+
get(): Promise<SdkContentEntry | null>;
|
|
119
|
+
search(): Promise<SdkContentEntry[]>;
|
|
120
|
+
follow(): Promise<{
|
|
121
|
+
items: SdkContentEntry[];
|
|
122
|
+
since: string;
|
|
123
|
+
}>;
|
|
124
|
+
pick(): Promise<SdkPickResult<SdkContentEntry>>;
|
|
125
|
+
create(): Promise<unknown>;
|
|
126
|
+
update(): Promise<unknown>;
|
|
127
|
+
}
|
|
128
|
+
export declare class TreeDxContentBackend implements ContentBackend {
|
|
129
|
+
private readonly options;
|
|
130
|
+
constructor(options: {
|
|
131
|
+
client: TreeDxClient;
|
|
132
|
+
repoRoot: string;
|
|
133
|
+
models: SdkModelRegistry;
|
|
134
|
+
resolver: TreeDxPortfolioResolver;
|
|
135
|
+
directRepoId?: string;
|
|
136
|
+
ref?: string;
|
|
137
|
+
workspaceId?: string;
|
|
138
|
+
contentPathMap?: Record<string, string | TreeSeedTreeDxContentPathRule>;
|
|
139
|
+
localLeaseStore: ContentStore;
|
|
140
|
+
});
|
|
141
|
+
private definition;
|
|
142
|
+
private pathRule;
|
|
143
|
+
private readEntry;
|
|
144
|
+
list(model: string): Promise<SdkContentEntry[]>;
|
|
145
|
+
get(request: SdkGetRequest): Promise<SdkContentEntry | null>;
|
|
146
|
+
search(request: SdkSearchRequest): Promise<SdkContentEntry[]>;
|
|
147
|
+
follow(request: SdkFollowRequest): Promise<{
|
|
148
|
+
items: SdkContentEntry[];
|
|
149
|
+
since: string;
|
|
150
|
+
}>;
|
|
151
|
+
pick(request: SdkPickRequest): Promise<SdkPickResult<SdkContentEntry>>;
|
|
152
|
+
private resolveWritePath;
|
|
153
|
+
private requireWorkspaceId;
|
|
154
|
+
private createDirectWorkspace;
|
|
155
|
+
private commitDirectWorkspace;
|
|
156
|
+
create(request: SdkMutationRequest): Promise<{
|
|
157
|
+
item: {
|
|
158
|
+
id: string;
|
|
159
|
+
slug: string;
|
|
160
|
+
model: import("./sdk-types.ts").SdkModelName;
|
|
161
|
+
title: string | undefined;
|
|
162
|
+
path: string;
|
|
163
|
+
body: string;
|
|
164
|
+
frontmatter: Record<string, unknown>;
|
|
165
|
+
createdAt: string | null;
|
|
166
|
+
updatedAt: string | null;
|
|
167
|
+
};
|
|
168
|
+
git: null;
|
|
169
|
+
}>;
|
|
170
|
+
update(request: SdkUpdateRequest): Promise<{
|
|
171
|
+
item: {
|
|
172
|
+
title: string | undefined;
|
|
173
|
+
body: string;
|
|
174
|
+
frontmatter: {
|
|
175
|
+
[x: string]: unknown;
|
|
176
|
+
};
|
|
177
|
+
updatedAt: string | null;
|
|
178
|
+
id: string;
|
|
179
|
+
slug: string;
|
|
180
|
+
model: import("./sdk-types.ts").SdkModelName;
|
|
181
|
+
path: string;
|
|
182
|
+
createdAt: string | null;
|
|
183
|
+
};
|
|
184
|
+
git: null;
|
|
185
|
+
}>;
|
|
186
|
+
}
|
|
187
|
+
export declare class LocalGraphBackend implements GraphBackend {
|
|
188
|
+
private readonly runtime;
|
|
189
|
+
constructor(runtime: ContentGraphRuntime);
|
|
190
|
+
refresh(request?: SdkGraphRefreshRequest): Promise<import("./sdk-types.ts").SdkGraphRefreshPayload>;
|
|
191
|
+
queryGraph(request: SdkGraphQueryRequest): Promise<import("./sdk-types.ts").SdkGraphQueryResult>;
|
|
192
|
+
buildContextPack(request: SdkContextPackRequest): Promise<import("./sdk-types.ts").SdkContextPack>;
|
|
193
|
+
parseGraphDsl(source: string): Promise<SdkGraphDslParseResult>;
|
|
194
|
+
}
|
|
195
|
+
export declare class TreeDxGraphBackend implements GraphBackend {
|
|
196
|
+
private readonly options;
|
|
197
|
+
constructor(options: {
|
|
198
|
+
client: TreeDxClient;
|
|
199
|
+
resolver: TreeDxPortfolioResolver;
|
|
200
|
+
localRuntime: ContentGraphRuntime;
|
|
201
|
+
ref?: string;
|
|
202
|
+
});
|
|
203
|
+
refresh(request?: SdkGraphRefreshRequest): Promise<unknown[]>;
|
|
204
|
+
private repoIds;
|
|
205
|
+
queryGraph(request: SdkGraphQueryRequest): Promise<unknown>;
|
|
206
|
+
buildContextPack(request: SdkContextPackRequest): Promise<unknown>;
|
|
207
|
+
parseGraphDsl(source: string): Promise<SdkGraphDslParseResult>;
|
|
208
|
+
}
|
|
209
|
+
export declare class LocalExecBackend implements ExecBackend {
|
|
210
|
+
run(input: unknown): Promise<unknown>;
|
|
211
|
+
}
|
|
212
|
+
export declare class TreeDxExecBackend implements ExecBackend {
|
|
213
|
+
private readonly client;
|
|
214
|
+
private readonly workspaceId?;
|
|
215
|
+
constructor(client: TreeDxClient, workspaceId?: string | undefined);
|
|
216
|
+
run(input: unknown): Promise<unknown>;
|
|
217
|
+
}
|
|
218
|
+
export { TreeDxApiError };
|