barndog 0.1.1 → 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.
- package/README.md +8 -7
- package/dist/cli.js +11 -7
- package/dist/commands/add.js +33 -21
- package/dist/commands/arguments.js +12 -0
- package/dist/commands/asset-install.js +160 -0
- package/dist/commands/asset-list.js +121 -0
- package/dist/commands/asset-share.js +94 -0
- package/dist/commands/auth.js +4 -0
- package/dist/commands/availability.js +54 -26
- package/dist/commands/capabilities.js +71 -415
- package/dist/commands/collaboration.js +194 -110
- package/dist/commands/environment.js +18 -411
- package/dist/commands/github.js +200 -0
- package/dist/commands/helpers.js +39 -0
- package/dist/commands/hooks.js +87 -0
- package/dist/commands/init.js +4 -2
- package/dist/commands/knowledge.js +73 -0
- package/dist/commands/mcp.js +62 -0
- package/dist/commands/origin.js +21 -23
- package/dist/commands/people.js +51 -0
- package/dist/commands/sets.js +141 -0
- package/dist/commands/status.js +34 -24
- package/dist/commands/sync.js +11 -4
- package/dist/commands/workspace.js +33 -19
- package/dist/config/environment.js +13 -27
- package/dist/config/paths.js +62 -0
- package/dist/config/selection.js +30 -0
- package/dist/config/settings.js +97 -108
- package/dist/config/state.js +57 -57
- package/dist/entry/knowledge-startup.js +32 -0
- package/dist/entry/mcp-launch.js +71 -0
- package/dist/entry/opencode-plugin.js +62 -0
- package/dist/{features/git-workspace/startup.js → entry/workspace-startup.js} +7 -2
- package/dist/errors.js +198 -55
- package/dist/features/asset-kinds/index.js +120 -0
- package/dist/features/asset-selection/index.js +51 -19
- package/dist/features/auth/credentials.js +80 -47
- package/dist/features/auth/session.js +80 -45
- package/dist/features/auth/transport.js +66 -15
- package/dist/features/catalog/index.js +32 -61
- package/dist/features/collaboration/api.js +160 -0
- package/dist/features/collaboration/index.js +321 -233
- package/dist/features/collaboration/remote.js +35 -115
- package/dist/features/collaboration/results.js +2 -0
- package/dist/features/collaboration/workspace-git.js +233 -149
- package/dist/features/collaboration/workspace-github.js +117 -54
- package/dist/features/collaboration/workspace-store.js +140 -100
- package/dist/features/collaboration/workspace.js +257 -172
- package/dist/features/discovery/index.js +68 -57
- package/dist/features/doctor/index.js +32 -24
- package/dist/features/environment/auto-sync.js +28 -27
- package/dist/features/environment/names.js +67 -47
- package/dist/features/environment/operations.js +321 -228
- package/dist/features/environment/own-entries.js +89 -0
- package/dist/features/environment/settle-names.js +91 -0
- package/dist/features/environment/stage.js +178 -0
- package/dist/features/environment/sync.js +113 -484
- package/dist/features/environment/transaction.js +179 -147
- package/dist/features/environment/writes.js +196 -0
- package/dist/features/github/account.js +25 -0
- package/dist/features/github/connections.js +119 -0
- package/dist/features/github/pulls.js +118 -0
- package/dist/features/hooks/adapt.js +32 -25
- package/dist/features/hooks/catalog.js +28 -0
- package/dist/features/hooks/compatibility.js +49 -0
- package/dist/features/hooks/divergence.js +9 -6
- package/dist/features/hooks/test.js +74 -49
- package/dist/features/hooks/types.js +1 -0
- package/dist/features/imports/discover.js +134 -61
- package/dist/features/imports/folder.js +48 -14
- package/dist/features/imports/local.js +113 -134
- package/dist/features/imports/remote.js +44 -25
- package/dist/features/inspection/index.js +17 -17
- package/dist/features/inventory/index.js +99 -110
- package/dist/features/knowledge/index.js +69 -49
- package/dist/features/mcps/catalog.js +31 -0
- package/dist/features/mcps/import.js +316 -0
- package/dist/features/mcps/index.js +98 -49
- package/dist/features/migration/migrate.js +263 -0
- package/dist/features/{git-workspace → migration}/move.js +165 -109
- package/dist/features/migration/promote.js +24 -0
- package/dist/features/native/adapters.js +53 -94
- package/dist/features/native/configuration.js +128 -82
- package/dist/features/native/hook-shell.js +55 -0
- package/dist/features/native/plugin-module.js +56 -0
- package/dist/features/onboarding/environment.js +67 -34
- package/dist/features/onboarding/setup.js +43 -40
- package/dist/features/repositories/context.js +30 -13
- package/dist/features/server/catalog.js +58 -0
- package/dist/features/server/client.js +13 -0
- package/dist/features/server/connection.js +37 -0
- package/dist/features/server/origin.js +74 -0
- package/dist/features/server/pages.js +24 -0
- package/dist/features/skills/catalog.js +42 -0
- package/dist/features/workspace/assets.js +57 -0
- package/dist/features/workspace/cloud-source.js +34 -0
- package/dist/features/workspace/directory.js +38 -0
- package/dist/features/{git-workspace → workspace}/format.js +114 -51
- package/dist/features/workspace/git.js +214 -0
- package/dist/features/workspace/installed.js +92 -0
- package/dist/features/{git-workspace → workspace}/overlay.js +43 -23
- package/dist/features/workspace/packages.js +160 -0
- package/dist/features/{git-workspace → workspace}/publish.js +120 -64
- package/dist/features/workspace/repo-source.js +192 -0
- package/dist/features/{git-workspace → workspace}/setup.js +60 -42
- package/dist/features/{git-workspace → workspace}/snapshot.js +53 -18
- package/dist/features/workspace/source.js +1 -0
- package/dist/features/workspace/tree.js +52 -0
- package/dist/features/workspace/workspace-source.js +27 -0
- package/dist/harnesses/claude.js +23 -1
- package/dist/harnesses/codex.js +57 -1
- package/dist/harnesses/cursor.js +22 -1
- package/dist/harnesses/detect.js +6 -50
- package/dist/harnesses/formats.js +45 -0
- package/dist/harnesses/opencode.js +111 -0
- package/dist/harnesses/registry.js +35 -2
- package/dist/platform.js +375 -0
- package/dist/program.js +225 -54
- package/dist/runtime.js +1 -0
- package/dist/shared/cli-error.js +22 -0
- package/dist/shared/constants.js +32 -0
- package/dist/shared/files.js +72 -0
- package/dist/shared/lock.js +49 -0
- package/dist/shared/lookup.js +11 -0
- package/dist/shared/patterns.js +94 -0
- package/dist/shared/shell.js +22 -0
- package/dist/shared/values.js +26 -0
- package/dist/ui/add-asset.js +41 -400
- package/dist/ui/add-hook.js +213 -0
- package/dist/ui/add-mcp.js +107 -0
- package/dist/ui/add-prompts.js +47 -0
- package/dist/ui/add-skills.js +115 -0
- package/dist/ui/asset-list.js +31 -13
- package/dist/ui/assets.js +33 -44
- package/dist/ui/auth.js +43 -33
- package/dist/ui/clash.js +11 -6
- package/dist/ui/collaboration.js +116 -44
- package/dist/ui/connection.js +10 -4
- package/dist/ui/decision-error.js +24 -0
- package/dist/ui/environment-onboarding.js +35 -13
- package/dist/ui/format.js +66 -18
- package/dist/ui/hook-compatibility.js +14 -6
- package/dist/ui/mcp.js +28 -3
- package/dist/ui/move.js +10 -5
- package/dist/ui/onboarding.js +113 -73
- package/dist/ui/options.js +9 -0
- package/dist/ui/output.js +106 -43
- package/dist/ui/pick.js +45 -33
- package/dist/ui/scope-install.js +15 -7
- package/dist/ui/selection.js +15 -11
- package/dist/ui/theme.js +37 -14
- package/dist/version.js +6 -3
- package/package.json +13 -3
- package/dist/features/capabilities/index.js +0 -106
- package/dist/features/collaboration/domain.js +0 -90
- package/dist/features/environment/cloud-source.js +0 -27
- package/dist/features/environment/installed.js +0 -124
- package/dist/features/environment/packages.js +0 -120
- package/dist/features/environment/remote.js +0 -71
- package/dist/features/environment/workspace-source.js +0 -19
- package/dist/features/git-hosts/index.js +0 -148
- package/dist/features/git-workspace/assets.js +0 -71
- package/dist/features/git-workspace/git.js +0 -135
- package/dist/features/git-workspace/migrate.js +0 -188
- package/dist/features/git-workspace/source.js +0 -159
- package/dist/features/imports/mcp.js +0 -219
- package/dist/features/knowledge/startup.js +0 -25
- package/dist/features/native/mcp-launch.js +0 -57
- package/dist/features/skills/install.js +0 -25
- package/dist/features/skills/remote.js +0 -177
- package/dist/features/skills/sync.js +0 -121
- package/dist/features/skills/validation.js +0 -34
- /package/dist/features/environment/{source.js → events.js} +0 -0
|
@@ -1,46 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { mcpListSchema } from "@barndog-ai/api-contract";
|
|
1
|
+
import { SHORT_COMMIT_LENGTH } from "../../shared/constants.js";
|
|
3
2
|
import { readSettings } from "../../config/settings.js";
|
|
4
3
|
import { CliError } from "../../errors.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { openRepoSource } from "../
|
|
9
|
-
import { activeLocal, localOverlay } from "../
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
origin: mcp.origin,
|
|
24
|
-
version: {
|
|
25
|
-
number: mcp.version.number,
|
|
26
|
-
description: mcp.version.definition.description,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (page.nextCursor && seen.has(page.nextCursor))
|
|
31
|
-
throw new Error("Invalid catalog pagination");
|
|
32
|
-
if (page.nextCursor)
|
|
33
|
-
seen.add(page.nextCursor);
|
|
34
|
-
cursor = page.nextCursor ?? undefined;
|
|
35
|
-
} while (cursor);
|
|
36
|
-
return rows;
|
|
37
|
-
}
|
|
38
|
-
export async function searchCatalog(kind, home = homedir()) {
|
|
39
|
-
const shared = await sharedCatalog(kind, home);
|
|
4
|
+
import { hookCatalog } from "../hooks/catalog.js";
|
|
5
|
+
import { mcpCatalog } from "../mcps/catalog.js";
|
|
6
|
+
import { skillCatalog } from "../skills/catalog.js";
|
|
7
|
+
import { openRepoSource } from "../workspace/workspace-source.js";
|
|
8
|
+
import { activeLocal, localOverlay } from "../workspace/overlay.js";
|
|
9
|
+
/** Beside the code that calls them, because each imports a network module. */
|
|
10
|
+
const catalogFetchers = {
|
|
11
|
+
skill: skillCatalog,
|
|
12
|
+
mcp: mcpCatalog,
|
|
13
|
+
hook: hookCatalog,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Combines the shared Git or Cloud catalog with valid active local assets of
|
|
17
|
+
* the requested kind.
|
|
18
|
+
*/
|
|
19
|
+
export async function searchCatalog(kind, runtime) {
|
|
20
|
+
const { home } = runtime;
|
|
21
|
+
const shared = await sharedCatalog(kind, runtime);
|
|
40
22
|
const settings = await readSettings(home);
|
|
41
|
-
const overlay = settings && localOverlay(settings,
|
|
42
|
-
if (!overlay)
|
|
23
|
+
const overlay = settings && localOverlay(settings, runtime);
|
|
24
|
+
if (!overlay) {
|
|
43
25
|
return shared;
|
|
26
|
+
}
|
|
44
27
|
const { model, assets } = await activeLocal(overlay, shared);
|
|
45
28
|
return [
|
|
46
29
|
...shared,
|
|
@@ -59,15 +42,16 @@ export async function searchCatalog(kind, home = homedir()) {
|
|
|
59
42
|
version: {
|
|
60
43
|
number: 0,
|
|
61
44
|
description: asset.description,
|
|
62
|
-
label: asset.publishedVersion.slice(0,
|
|
45
|
+
label: asset.publishedVersion.slice(0, SHORT_COMMIT_LENGTH),
|
|
63
46
|
},
|
|
64
47
|
})),
|
|
65
48
|
];
|
|
66
49
|
}
|
|
67
|
-
async function sharedCatalog(kind,
|
|
50
|
+
async function sharedCatalog(kind, runtime) {
|
|
51
|
+
const { home } = runtime;
|
|
68
52
|
const settings = await readSettings(home);
|
|
69
|
-
const repo = settings && openRepoSource(settings,
|
|
70
|
-
if (repo)
|
|
53
|
+
const repo = settings && openRepoSource(settings, runtime, { refresh: "auto" });
|
|
54
|
+
if (repo) {
|
|
71
55
|
return (await repo.model()).assets
|
|
72
56
|
.filter((asset) => asset.kind === kind && !asset.invalid)
|
|
73
57
|
.map((asset) => ({
|
|
@@ -78,25 +62,12 @@ async function sharedCatalog(kind, home) {
|
|
|
78
62
|
version: {
|
|
79
63
|
number: 0,
|
|
80
64
|
description: asset.description,
|
|
81
|
-
label: asset.publishedVersion.slice(0,
|
|
65
|
+
label: asset.publishedVersion.slice(0, SHORT_COMMIT_LENGTH),
|
|
82
66
|
},
|
|
83
67
|
}));
|
|
84
|
-
|
|
68
|
+
}
|
|
69
|
+
if (!settings || !settings.connection) {
|
|
85
70
|
throw new CliError("This machine isn't connected to a BarnDog workspace.", "barndog init");
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return mcpCatalog(conn, home);
|
|
89
|
-
const packages = kind === "skill"
|
|
90
|
-
? await skillCatalog(conn, home)
|
|
91
|
-
: await hookCatalog(conn, home);
|
|
92
|
-
return packages.map((item) => ({
|
|
93
|
-
id: item.id,
|
|
94
|
-
kind,
|
|
95
|
-
name: item.name,
|
|
96
|
-
origin: item.origin,
|
|
97
|
-
version: {
|
|
98
|
-
number: item.version.number,
|
|
99
|
-
description: item.version.description,
|
|
100
|
-
},
|
|
101
|
-
}));
|
|
71
|
+
}
|
|
72
|
+
return catalogFetchers[kind](settings.connection, runtime);
|
|
102
73
|
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { changeSchema, changeUploadSchema, hookChangeSchema, hookChangeUploadSchema, hookSchema, hookVersionSchema, skillSchema, versionSchema, } from "@barndog-ai/api-contract";
|
|
3
|
+
import { apiClient } from "../auth/transport.js";
|
|
4
|
+
import { parsed, responseData } from "../server/client.js";
|
|
5
|
+
/** The multipart body both kinds' proposal routes take. */
|
|
6
|
+
function uploadForm(metadata, archive) {
|
|
7
|
+
const form = new FormData();
|
|
8
|
+
form.set("metadata", JSON.stringify(metadata));
|
|
9
|
+
form.set("package", archive, "package.tar.gz");
|
|
10
|
+
return form;
|
|
11
|
+
}
|
|
12
|
+
const byId = (id) => ({ path: { id } });
|
|
13
|
+
const thread = (id, threadId) => ({ path: { id, threadId } });
|
|
14
|
+
/** The upload without its neutral asset ID, which each kind names its own way. */
|
|
15
|
+
function uploadFields({ assetId, ...fields }) {
|
|
16
|
+
return { assetId, fields };
|
|
17
|
+
}
|
|
18
|
+
function skillApi(client) {
|
|
19
|
+
const metadata = (upload) => {
|
|
20
|
+
const { assetId, fields } = uploadFields(upload);
|
|
21
|
+
return changeUploadSchema.parse({ ...fields, skillId: assetId });
|
|
22
|
+
};
|
|
23
|
+
const change = (call) => parsed(changeSchema, call);
|
|
24
|
+
return {
|
|
25
|
+
published: (id) => parsed(skillSchema, client.GET("/v1/skills/{id}", { params: byId(id) })),
|
|
26
|
+
versions: (id) => parsed(z.array(versionSchema), client.GET("/v1/skills/{id}/versions", { params: byId(id) })),
|
|
27
|
+
content: async (id, version) => responseData(await client.GET("/v1/skills/{id}/content", {
|
|
28
|
+
params: { ...byId(id), query: { version } },
|
|
29
|
+
})),
|
|
30
|
+
diff: async (id, range) => responseData(await client.GET("/v1/skills/{id}/diff", {
|
|
31
|
+
params: { ...byId(id), query: range },
|
|
32
|
+
})),
|
|
33
|
+
versionPackage: (id, version) => client.GET("/v1/skills/{id}/versions/{version}/package", {
|
|
34
|
+
params: { path: { id, version } },
|
|
35
|
+
parseAs: "stream",
|
|
36
|
+
}),
|
|
37
|
+
changes: async (cursor) => {
|
|
38
|
+
const page = responseData(await client.GET("/v1/skill-changes", {
|
|
39
|
+
params: { query: { cursor } },
|
|
40
|
+
}));
|
|
41
|
+
return {
|
|
42
|
+
items: page.changes.map((item) => changeSchema.parse(item)),
|
|
43
|
+
nextCursor: page.nextCursor,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
change: (id) => change(client.GET("/v1/skill-changes/{id}", { params: byId(id) })),
|
|
47
|
+
changeDiff: async (id, query) => responseData(await client.GET("/v1/skill-changes/{id}/diff", {
|
|
48
|
+
params: { ...byId(id), query },
|
|
49
|
+
})),
|
|
50
|
+
changePackage: (id, revision) => client.GET("/v1/skill-changes/{id}/package", {
|
|
51
|
+
params: { ...byId(id), query: { revision } },
|
|
52
|
+
parseAs: "stream",
|
|
53
|
+
}),
|
|
54
|
+
submit: (upload, archive) => change(client.POST("/v1/skill-changes", {
|
|
55
|
+
body: uploadForm(metadata(upload), archive),
|
|
56
|
+
})),
|
|
57
|
+
revise: (id, upload, archive) => change(client.PUT("/v1/skill-changes/{id}/revisions", {
|
|
58
|
+
params: byId(id),
|
|
59
|
+
body: uploadForm(metadata(upload), archive),
|
|
60
|
+
})),
|
|
61
|
+
review: (id, body) => change(client.POST("/v1/skill-changes/{id}/reviews", {
|
|
62
|
+
params: byId(id),
|
|
63
|
+
body,
|
|
64
|
+
})),
|
|
65
|
+
reject: (id, body) => change(client.POST("/v1/skill-changes/{id}/reject", {
|
|
66
|
+
params: byId(id),
|
|
67
|
+
body,
|
|
68
|
+
})),
|
|
69
|
+
merge: (id, body) => change(client.POST("/v1/skill-changes/{id}/merge", { params: byId(id), body })),
|
|
70
|
+
discuss: (id, body) => change(client.POST("/v1/skill-changes/{id}/discussions", {
|
|
71
|
+
params: byId(id),
|
|
72
|
+
body,
|
|
73
|
+
})),
|
|
74
|
+
comment: (id, threadId, body) => change(client.POST("/v1/skill-changes/{id}/discussions/{threadId}/comments", {
|
|
75
|
+
params: thread(id, threadId),
|
|
76
|
+
body,
|
|
77
|
+
})),
|
|
78
|
+
applySuggestion: (id, threadId, body) => change(client.POST("/v1/skill-changes/{id}/discussions/{threadId}/apply", {
|
|
79
|
+
params: thread(id, threadId),
|
|
80
|
+
body,
|
|
81
|
+
})),
|
|
82
|
+
resolve: (id, threadId, body) => change(client.POST("/v1/skill-changes/{id}/discussions/{threadId}/resolve", {
|
|
83
|
+
params: thread(id, threadId),
|
|
84
|
+
body,
|
|
85
|
+
})),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function hookApi(client) {
|
|
89
|
+
const metadata = (upload) => {
|
|
90
|
+
const { assetId, fields } = uploadFields(upload);
|
|
91
|
+
return hookChangeUploadSchema.parse({ ...fields, hookId: assetId });
|
|
92
|
+
};
|
|
93
|
+
const change = (call) => parsed(hookChangeSchema, call);
|
|
94
|
+
return {
|
|
95
|
+
published: (id) => parsed(hookSchema, client.GET("/v1/hooks/{id}", { params: byId(id) })),
|
|
96
|
+
versions: (id) => parsed(z.array(hookVersionSchema), client.GET("/v1/hooks/{id}/versions", { params: byId(id) })),
|
|
97
|
+
content: async (id, version) => responseData(await client.GET("/v1/hooks/{id}/content", {
|
|
98
|
+
params: { ...byId(id), query: { version } },
|
|
99
|
+
})),
|
|
100
|
+
diff: async (id, range) => responseData(await client.GET("/v1/hooks/{id}/diff", {
|
|
101
|
+
params: { ...byId(id), query: range },
|
|
102
|
+
})),
|
|
103
|
+
versionPackage: (id, version) => client.GET("/v1/hooks/{id}/versions/{version}/package", {
|
|
104
|
+
params: { path: { id, version } },
|
|
105
|
+
parseAs: "stream",
|
|
106
|
+
}),
|
|
107
|
+
changes: async (cursor) => {
|
|
108
|
+
const page = responseData(await client.GET("/v1/hook-changes", { params: { query: { cursor } } }));
|
|
109
|
+
return {
|
|
110
|
+
items: page.changes.map((item) => hookChangeSchema.parse(item)),
|
|
111
|
+
nextCursor: page.nextCursor,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
change: (id) => change(client.GET("/v1/hook-changes/{id}", { params: byId(id) })),
|
|
115
|
+
changeDiff: async (id, query) => responseData(await client.GET("/v1/hook-changes/{id}/diff", {
|
|
116
|
+
params: { ...byId(id), query },
|
|
117
|
+
})),
|
|
118
|
+
changePackage: (id, revision) => client.GET("/v1/hook-changes/{id}/package", {
|
|
119
|
+
params: { ...byId(id), query: { revision } },
|
|
120
|
+
parseAs: "stream",
|
|
121
|
+
}),
|
|
122
|
+
submit: (upload, archive) => change(client.POST("/v1/hook-changes", {
|
|
123
|
+
body: uploadForm(metadata(upload), archive),
|
|
124
|
+
})),
|
|
125
|
+
revise: (id, upload, archive) => change(client.PUT("/v1/hook-changes/{id}/revisions", {
|
|
126
|
+
params: byId(id),
|
|
127
|
+
body: uploadForm(metadata(upload), archive),
|
|
128
|
+
})),
|
|
129
|
+
review: (id, body) => change(client.POST("/v1/hook-changes/{id}/reviews", {
|
|
130
|
+
params: byId(id),
|
|
131
|
+
body,
|
|
132
|
+
})),
|
|
133
|
+
reject: (id, body) => change(client.POST("/v1/hook-changes/{id}/reject", { params: byId(id), body })),
|
|
134
|
+
merge: (id, body) => change(client.POST("/v1/hook-changes/{id}/merge", { params: byId(id), body })),
|
|
135
|
+
discuss: (id, body) => change(client.POST("/v1/hook-changes/{id}/discussions", {
|
|
136
|
+
params: byId(id),
|
|
137
|
+
body,
|
|
138
|
+
})),
|
|
139
|
+
comment: (id, threadId, body) => change(client.POST("/v1/hook-changes/{id}/discussions/{threadId}/comments", {
|
|
140
|
+
params: thread(id, threadId),
|
|
141
|
+
body,
|
|
142
|
+
})),
|
|
143
|
+
applySuggestion: (id, threadId, body) => change(client.POST("/v1/hook-changes/{id}/discussions/{threadId}/apply", {
|
|
144
|
+
params: thread(id, threadId),
|
|
145
|
+
body,
|
|
146
|
+
})),
|
|
147
|
+
resolve: (id, threadId, body) => change(client.POST("/v1/hook-changes/{id}/discussions/{threadId}/resolve", {
|
|
148
|
+
params: thread(id, threadId),
|
|
149
|
+
body,
|
|
150
|
+
})),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const apis = {
|
|
154
|
+
skill: skillApi,
|
|
155
|
+
hook: hookApi,
|
|
156
|
+
};
|
|
157
|
+
/** The review and working-copy routes of `kind` on the connection's server. */
|
|
158
|
+
export function packageApi(kind, conn, runtime) {
|
|
159
|
+
return apis[kind](apiClient(conn.server, runtime));
|
|
160
|
+
}
|