@makinbakin/sdk 0.0.0-bootstrap.0 → 0.0.1-rc.2
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 +20 -10
- package/_internal/app/components/integrated-brainstorm/activity.d.ts +23 -0
- package/_internal/app/components/integrated-brainstorm/index.d.ts +6 -1
- package/_internal/app/components/integrated-brainstorm/session.d.ts +16 -0
- package/_internal/app/components/integrated-brainstorm/sse.d.ts +8 -0
- package/_internal/app/components/integrated-brainstorm/types.d.ts +7 -5
- package/_internal/app/components/ui/badge.d.ts +1 -1
- package/_internal/app/components/ui/button.d.ts +1 -1
- package/_internal/core/adapters/runtime/concepts.d.ts +30 -2
- package/_internal/core/adapters/runtime/index.d.ts +1 -1
- package/_internal/core/constants.d.ts +15 -0
- package/_internal/core/content-dir.d.ts +42 -0
- package/_internal/core/generated-version.d.ts +1 -0
- package/_internal/core/logger.d.ts +8 -0
- package/_internal/core/plugin-types.d.ts +66 -5
- package/_internal/core/routing/index.d.ts +1 -1
- package/components/index.d.ts +3 -2
- package/components/index.js +727 -74
- package/hooks/index.d.ts +1 -1
- package/hooks/index.js +10 -0
- package/index.d.ts +8 -8
- package/index.js +327 -0
- package/metadata/index.d.ts +2 -2
- package/package.json +2 -2
- package/routing/index.d.ts +2 -2
- package/routing/index.js +327 -0
- package/slots/index.d.ts +1 -1
- package/types/index.d.ts +90 -4
- package/ui/index.d.ts +2 -2
- package/utils/index.d.ts +6 -1
- package/utils/index.js +269 -1
package/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@
|
|
2
|
+
* `@makinbakin/sdk/hooks` — React hooks plugin authors can use.
|
|
3
3
|
*
|
|
4
4
|
* Three groups, all re-exports so plugins have one import path:
|
|
5
5
|
* 1. Bakin-wide hooks from `src/hooks/*` (SSE, search, query-state, debug, etc.)
|
package/hooks/index.js
CHANGED
|
@@ -392,8 +392,18 @@ function humanizeExecName(name) {
|
|
|
392
392
|
function isNoisyEvent(evt) {
|
|
393
393
|
if (evt.agent === "system" && evt.message.startsWith("Dispatch failed"))
|
|
394
394
|
return true;
|
|
395
|
+
if (evt.eventName && isReadOnlyExecOk(evt.eventName))
|
|
396
|
+
return true;
|
|
395
397
|
return false;
|
|
396
398
|
}
|
|
399
|
+
function isReadOnlyExecOk(eventName) {
|
|
400
|
+
if (!eventName.startsWith("exec.") || !eventName.endsWith(".ok"))
|
|
401
|
+
return false;
|
|
402
|
+
const toolName = eventName.replace(/^exec\./, "").replace(/\.ok$/, "");
|
|
403
|
+
if (toolName === "bakin_exec_get_paths" || toolName === "bakin_exec_heartbeat")
|
|
404
|
+
return true;
|
|
405
|
+
return /_(list|get|query|search)$/.test(toolName);
|
|
406
|
+
}
|
|
397
407
|
|
|
398
408
|
// src/hooks/use-content-store.ts
|
|
399
409
|
var useContentStore = create((set, get) => ({
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@
|
|
2
|
+
* `@makinbakin/sdk` — plugin author SDK.
|
|
3
3
|
*
|
|
4
4
|
* The main entry re-exports types + the single-call `registerPlugin` helper
|
|
5
5
|
* so plugin authors can write `import { registerPlugin } from '@makinbakin/sdk'`
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* `/slots`) to keep the top-level namespace from exploding.
|
|
9
9
|
*
|
|
10
10
|
* Sub-paths:
|
|
11
|
-
* - `@
|
|
12
|
-
* - `@
|
|
13
|
-
* - `@
|
|
14
|
-
* - `@
|
|
15
|
-
* - `@
|
|
16
|
-
* - `@
|
|
11
|
+
* - `@makinbakin/sdk/ui` — shadcn UI primitives (Button, Card, Dialog, ...)
|
|
12
|
+
* - `@makinbakin/sdk/hooks` — React hooks (useAgent, useSSE, useSearch, ...)
|
|
13
|
+
* - `@makinbakin/sdk/components` — shared components (PluginHeader, FacetFilter, ...)
|
|
14
|
+
* - `@makinbakin/sdk/slots` — Slot + registerSlot primitive
|
|
15
|
+
* - `@makinbakin/sdk/types` — full type re-exports
|
|
16
|
+
* - `@makinbakin/sdk/metadata` — docs-aware contract helpers
|
|
17
17
|
*
|
|
18
|
-
* Plugin authors: at build time, mark `@
|
|
18
|
+
* Plugin authors: at build time, mark `@makinbakin/sdk`, `@makinbakin/sdk/*`, and
|
|
19
19
|
* `react`/`react-dom` as externals. At runtime the browser's import map
|
|
20
20
|
* (emitted by Bakin) resolves those to the host's bundled copies so there
|
|
21
21
|
* is a single React instance and a single SDK.
|
package/index.js
CHANGED
|
@@ -13882,6 +13882,333 @@ var errorEnvelope = exports_external.object({
|
|
|
13882
13882
|
error: exports_external.string(),
|
|
13883
13883
|
issues: exports_external.array(exports_external.unknown()).optional()
|
|
13884
13884
|
});
|
|
13885
|
+
|
|
13886
|
+
// packages/core/src/logger.ts
|
|
13887
|
+
import { createWriteStream, existsSync, mkdirSync, renameSync, statSync } from "fs";
|
|
13888
|
+
import { join as join2 } from "path";
|
|
13889
|
+
|
|
13890
|
+
// packages/core/src/content-dir.ts
|
|
13891
|
+
import { join } from "path";
|
|
13892
|
+
import { homedir } from "os";
|
|
13893
|
+
// packages/core/src/constants.ts
|
|
13894
|
+
var APP_SLUG = "bakin";
|
|
13895
|
+
|
|
13896
|
+
// packages/core/src/content-dir.ts
|
|
13897
|
+
function bakinHomeDefault() {
|
|
13898
|
+
return join(homedir(), `.${APP_SLUG}`);
|
|
13899
|
+
}
|
|
13900
|
+
var resolvedContentDir = null;
|
|
13901
|
+
function isTestEnv() {
|
|
13902
|
+
return process.env.VITEST === "true" || !!process.env.VITEST;
|
|
13903
|
+
}
|
|
13904
|
+
function realBakinHome() {
|
|
13905
|
+
const realHome = process.env.HOME || process.env.USERPROFILE || "";
|
|
13906
|
+
if (!realHome)
|
|
13907
|
+
return "";
|
|
13908
|
+
return join(realHome, `.${APP_SLUG}`);
|
|
13909
|
+
}
|
|
13910
|
+
function assertSafeForTest(path) {
|
|
13911
|
+
if (!isTestEnv())
|
|
13912
|
+
return;
|
|
13913
|
+
const real = realBakinHome();
|
|
13914
|
+
if (real && path === real) {
|
|
13915
|
+
throw new Error(`[bakin] getContentDir() resolved to the real Bakin home (${real}) ` + `during a test run. This would write test data to your production instance. ` + `Fix: mock src/core/content-dir in this test, or set BAKIN_HOME to a temp ` + `directory before importing any Bakin module. See CLAUDE.md \xA7 Testing Rules.`);
|
|
13916
|
+
}
|
|
13917
|
+
}
|
|
13918
|
+
function getContentDir() {
|
|
13919
|
+
if (resolvedContentDir)
|
|
13920
|
+
return resolvedContentDir;
|
|
13921
|
+
const resolved = resolveContentDirInner();
|
|
13922
|
+
assertSafeForTest(resolved);
|
|
13923
|
+
resolvedContentDir = resolved;
|
|
13924
|
+
return resolvedContentDir;
|
|
13925
|
+
}
|
|
13926
|
+
function resolveContentDirInner() {
|
|
13927
|
+
if (process.env.BAKIN_HOME)
|
|
13928
|
+
return process.env.BAKIN_HOME;
|
|
13929
|
+
return bakinHomeDefault();
|
|
13930
|
+
}
|
|
13931
|
+
function getBakinPaths() {
|
|
13932
|
+
const home = getContentDir();
|
|
13933
|
+
const assets = join(home, "assets");
|
|
13934
|
+
return {
|
|
13935
|
+
home,
|
|
13936
|
+
memoryLog: join(home, "MEMORY-LOG.md"),
|
|
13937
|
+
audit: join(home, "audit.jsonl"),
|
|
13938
|
+
assets,
|
|
13939
|
+
"assets.store": join(assets, "store"),
|
|
13940
|
+
"assets.inbox": join(assets, "inbox"),
|
|
13941
|
+
"assets.trash": join(assets, ".trash"),
|
|
13942
|
+
agents: join(home, "agents"),
|
|
13943
|
+
personas: join(home, "team", "personas"),
|
|
13944
|
+
team: join(home, "team"),
|
|
13945
|
+
heartbeats: join(home, "heartbeats"),
|
|
13946
|
+
inbox: join(home, "inbox"),
|
|
13947
|
+
tasks: join(home, "tasks"),
|
|
13948
|
+
workflows: join(home, "workflows"),
|
|
13949
|
+
settings: join(home, "settings.json"),
|
|
13950
|
+
logs: join(home, "logs")
|
|
13951
|
+
};
|
|
13952
|
+
}
|
|
13953
|
+
|
|
13954
|
+
// packages/core/src/logger.ts
|
|
13955
|
+
var MAX_LOG_BYTES = 10 * 1024 * 1024;
|
|
13956
|
+
var LEVEL_RANK = {
|
|
13957
|
+
debug: 10,
|
|
13958
|
+
info: 20,
|
|
13959
|
+
warn: 30,
|
|
13960
|
+
error: 40
|
|
13961
|
+
};
|
|
13962
|
+
var COLOR_RESET = "\x1B[0m";
|
|
13963
|
+
var COLORS = {
|
|
13964
|
+
dim: "\x1B[2m",
|
|
13965
|
+
blue: "\x1B[34m",
|
|
13966
|
+
cyan: "\x1B[36m",
|
|
13967
|
+
green: "\x1B[32m",
|
|
13968
|
+
magenta: "\x1B[35m",
|
|
13969
|
+
red: "\x1B[31m",
|
|
13970
|
+
yellow: "\x1B[33m"
|
|
13971
|
+
};
|
|
13972
|
+
var fileStream = null;
|
|
13973
|
+
var fileTransportInitialized = false;
|
|
13974
|
+
var fileTransportDisabled = false;
|
|
13975
|
+
function fileTransportEnabled() {
|
|
13976
|
+
if (fileTransportDisabled)
|
|
13977
|
+
return false;
|
|
13978
|
+
if (false)
|
|
13979
|
+
;
|
|
13980
|
+
if (process.env.VITEST)
|
|
13981
|
+
return false;
|
|
13982
|
+
if (process.env.BAKIN_DISABLE_FILE_LOG === "1")
|
|
13983
|
+
return false;
|
|
13984
|
+
return true;
|
|
13985
|
+
}
|
|
13986
|
+
function ensureFileStream() {
|
|
13987
|
+
if (fileTransportInitialized)
|
|
13988
|
+
return fileStream;
|
|
13989
|
+
fileTransportInitialized = true;
|
|
13990
|
+
if (!fileTransportEnabled())
|
|
13991
|
+
return null;
|
|
13992
|
+
try {
|
|
13993
|
+
const logsDir = getBakinPaths().logs;
|
|
13994
|
+
if (!existsSync(logsDir))
|
|
13995
|
+
mkdirSync(logsDir, { recursive: true });
|
|
13996
|
+
const logPath = join2(logsDir, "server.log");
|
|
13997
|
+
if (existsSync(logPath)) {
|
|
13998
|
+
try {
|
|
13999
|
+
const size = statSync(logPath).size;
|
|
14000
|
+
if (size > MAX_LOG_BYTES) {
|
|
14001
|
+
const rotated = join2(logsDir, "server.log.1");
|
|
14002
|
+
renameSync(logPath, rotated);
|
|
14003
|
+
}
|
|
14004
|
+
} catch {}
|
|
14005
|
+
}
|
|
14006
|
+
fileStream = createWriteStream(logPath, { flags: "a" });
|
|
14007
|
+
fileStream.on("error", () => {
|
|
14008
|
+
fileTransportDisabled = true;
|
|
14009
|
+
fileStream = null;
|
|
14010
|
+
});
|
|
14011
|
+
} catch {
|
|
14012
|
+
fileTransportDisabled = true;
|
|
14013
|
+
fileStream = null;
|
|
14014
|
+
}
|
|
14015
|
+
return fileStream;
|
|
14016
|
+
}
|
|
14017
|
+
function formatEntry(entry) {
|
|
14018
|
+
const parts = [`[${entry.ts}] [${entry.level.toUpperCase()}] [${entry.module}] ${entry.message}`];
|
|
14019
|
+
if (entry.error)
|
|
14020
|
+
parts.push(` error: ${entry.error}`);
|
|
14021
|
+
if (entry.data)
|
|
14022
|
+
parts.push(` data: ${JSON.stringify(entry.data)}`);
|
|
14023
|
+
return parts.join(`
|
|
14024
|
+
`);
|
|
14025
|
+
}
|
|
14026
|
+
function consoleFormat() {
|
|
14027
|
+
const configured = process.env.BAKIN_CONSOLE_FORMAT;
|
|
14028
|
+
if (configured === "pretty" || configured === "verbose" || configured === "plain" || configured === "silent") {
|
|
14029
|
+
return configured;
|
|
14030
|
+
}
|
|
14031
|
+
return process.stdout.isTTY === true ? "pretty" : "plain";
|
|
14032
|
+
}
|
|
14033
|
+
function consoleMinLevel(format) {
|
|
14034
|
+
const configured = process.env.BAKIN_LOG_LEVEL;
|
|
14035
|
+
if (configured === "debug" || configured === "info" || configured === "warn" || configured === "error") {
|
|
14036
|
+
return configured;
|
|
14037
|
+
}
|
|
14038
|
+
if (format === "verbose")
|
|
14039
|
+
return "debug";
|
|
14040
|
+
if (format === "silent")
|
|
14041
|
+
return "error";
|
|
14042
|
+
if (format === "pretty")
|
|
14043
|
+
return "info";
|
|
14044
|
+
return "debug";
|
|
14045
|
+
}
|
|
14046
|
+
function colorEnabled(format) {
|
|
14047
|
+
if (format === "plain")
|
|
14048
|
+
return false;
|
|
14049
|
+
if (process.env.NO_COLOR || process.env.BAKIN_NO_COLOR === "1")
|
|
14050
|
+
return false;
|
|
14051
|
+
return process.stdout.isTTY === true;
|
|
14052
|
+
}
|
|
14053
|
+
function colorize(text, color, enabled) {
|
|
14054
|
+
return enabled ? `${COLORS[color]}${text}${COLOR_RESET}` : text;
|
|
14055
|
+
}
|
|
14056
|
+
function sourceLabel(entry) {
|
|
14057
|
+
const data = entry.data;
|
|
14058
|
+
const explicitSource = typeof data?.source === "string" ? data.source : undefined;
|
|
14059
|
+
const pluginId = typeof data?.pluginId === "string" ? data.pluginId : undefined;
|
|
14060
|
+
if (explicitSource === "antfly")
|
|
14061
|
+
return "antfly";
|
|
14062
|
+
if (explicitSource === "dev")
|
|
14063
|
+
return "dev";
|
|
14064
|
+
if (explicitSource === "plugin" && pluginId)
|
|
14065
|
+
return `plugin:${pluginId}`;
|
|
14066
|
+
if (entry.module === "plugin-registry" && pluginId)
|
|
14067
|
+
return `plugin:${pluginId}`;
|
|
14068
|
+
if (entry.module.startsWith("api:"))
|
|
14069
|
+
return "api";
|
|
14070
|
+
return entry.module;
|
|
14071
|
+
}
|
|
14072
|
+
function sourceColor(source) {
|
|
14073
|
+
if (source === "dev")
|
|
14074
|
+
return "cyan";
|
|
14075
|
+
if (source === "server")
|
|
14076
|
+
return "blue";
|
|
14077
|
+
if (source === "antfly")
|
|
14078
|
+
return "magenta";
|
|
14079
|
+
if (source.startsWith("plugin:"))
|
|
14080
|
+
return "green";
|
|
14081
|
+
if (source.includes("search"))
|
|
14082
|
+
return "cyan";
|
|
14083
|
+
if (source.includes("runtime"))
|
|
14084
|
+
return "magenta";
|
|
14085
|
+
return "dim";
|
|
14086
|
+
}
|
|
14087
|
+
function levelColor(level) {
|
|
14088
|
+
if (level === "debug")
|
|
14089
|
+
return "dim";
|
|
14090
|
+
if (level === "warn")
|
|
14091
|
+
return "yellow";
|
|
14092
|
+
if (level === "error")
|
|
14093
|
+
return "red";
|
|
14094
|
+
return "blue";
|
|
14095
|
+
}
|
|
14096
|
+
function isImportantAntflyInfo(entry) {
|
|
14097
|
+
return [
|
|
14098
|
+
"Metadata API server is ready",
|
|
14099
|
+
"Store HTTP server is ready",
|
|
14100
|
+
"Swarm mode: all servers are ready",
|
|
14101
|
+
"Termite's api server starting"
|
|
14102
|
+
].some((message) => entry.message.includes(message));
|
|
14103
|
+
}
|
|
14104
|
+
function suppressPrettyInfo(entry) {
|
|
14105
|
+
if (entry.level !== "info")
|
|
14106
|
+
return false;
|
|
14107
|
+
if (entry.data?.source === "antfly")
|
|
14108
|
+
return !isImportantAntflyInfo(entry);
|
|
14109
|
+
if (entry.module === "plugin-registry") {
|
|
14110
|
+
return entry.message === "plugin activated" || entry.message.startsWith("Auto-registered ") || entry.message.startsWith("Plugin activation order:");
|
|
14111
|
+
}
|
|
14112
|
+
return [
|
|
14113
|
+
"search-registry",
|
|
14114
|
+
"search-reconcile",
|
|
14115
|
+
"search-cleanup",
|
|
14116
|
+
"hot-reload-coordinator",
|
|
14117
|
+
"mcporter",
|
|
14118
|
+
"dispatch",
|
|
14119
|
+
"watchdog",
|
|
14120
|
+
"doctor",
|
|
14121
|
+
"lifecycle"
|
|
14122
|
+
].includes(entry.module);
|
|
14123
|
+
}
|
|
14124
|
+
function shouldWriteConsole(entry, format) {
|
|
14125
|
+
if (format === "silent")
|
|
14126
|
+
return false;
|
|
14127
|
+
const minLevel = consoleMinLevel(format);
|
|
14128
|
+
if (LEVEL_RANK[entry.level] < LEVEL_RANK[minLevel])
|
|
14129
|
+
return false;
|
|
14130
|
+
if (format === "pretty" && suppressPrettyInfo(entry))
|
|
14131
|
+
return false;
|
|
14132
|
+
return true;
|
|
14133
|
+
}
|
|
14134
|
+
function formatPrettyEntry(entry, format) {
|
|
14135
|
+
const colors = colorEnabled(format);
|
|
14136
|
+
const time3 = new Date(entry.ts).toTimeString().slice(0, 8);
|
|
14137
|
+
const level = entry.level.padEnd(5);
|
|
14138
|
+
const source = sourceLabel(entry);
|
|
14139
|
+
const label = source.padEnd(18);
|
|
14140
|
+
const levelPart = colorize(level, levelColor(entry.level), colors);
|
|
14141
|
+
const sourcePart = colorize(label, sourceColor(source), colors);
|
|
14142
|
+
const messagePart = entry.level === "error" ? colorize(entry.message, "red", colors) : entry.message;
|
|
14143
|
+
const parts = [`${colorize(time3, "dim", colors)} ${levelPart} ${sourcePart} ${messagePart}`];
|
|
14144
|
+
if (entry.error)
|
|
14145
|
+
parts[0] += ` - ${entry.error}`;
|
|
14146
|
+
if (format === "verbose" && entry.data) {
|
|
14147
|
+
parts.push(` data: ${JSON.stringify(entry.data)}`);
|
|
14148
|
+
}
|
|
14149
|
+
return parts.join(`
|
|
14150
|
+
`);
|
|
14151
|
+
}
|
|
14152
|
+
function formatConsoleEntry(entry) {
|
|
14153
|
+
const format = consoleFormat();
|
|
14154
|
+
if (format === "plain")
|
|
14155
|
+
return formatEntry(entry);
|
|
14156
|
+
if (format === "silent")
|
|
14157
|
+
return "";
|
|
14158
|
+
return formatPrettyEntry(entry, format);
|
|
14159
|
+
}
|
|
14160
|
+
function writeToFile(entry) {
|
|
14161
|
+
const stream = ensureFileStream();
|
|
14162
|
+
if (!stream)
|
|
14163
|
+
return;
|
|
14164
|
+
try {
|
|
14165
|
+
stream.write(JSON.stringify(entry) + `
|
|
14166
|
+
`);
|
|
14167
|
+
} catch {
|
|
14168
|
+
fileTransportDisabled = true;
|
|
14169
|
+
fileStream = null;
|
|
14170
|
+
}
|
|
14171
|
+
}
|
|
14172
|
+
function createLogger(module) {
|
|
14173
|
+
function log(level, message, errorOrData, data) {
|
|
14174
|
+
const entry = {
|
|
14175
|
+
ts: new Date().toISOString(),
|
|
14176
|
+
level,
|
|
14177
|
+
module,
|
|
14178
|
+
message
|
|
14179
|
+
};
|
|
14180
|
+
if (errorOrData instanceof Error) {
|
|
14181
|
+
entry.error = errorOrData.message;
|
|
14182
|
+
entry.data = data ? { ...data, stack: errorOrData.stack } : { stack: errorOrData.stack };
|
|
14183
|
+
} else if (typeof errorOrData === "string") {
|
|
14184
|
+
entry.error = errorOrData;
|
|
14185
|
+
entry.data = data;
|
|
14186
|
+
} else if (errorOrData && typeof errorOrData === "object") {
|
|
14187
|
+
entry.data = errorOrData;
|
|
14188
|
+
}
|
|
14189
|
+
const format = consoleFormat();
|
|
14190
|
+
if (shouldWriteConsole(entry, format)) {
|
|
14191
|
+
const formatted = formatConsoleEntry(entry);
|
|
14192
|
+
if (level === "error") {
|
|
14193
|
+
console.error(formatted);
|
|
14194
|
+
} else if (level === "warn") {
|
|
14195
|
+
console.warn(formatted);
|
|
14196
|
+
} else {
|
|
14197
|
+
console.log(formatted);
|
|
14198
|
+
}
|
|
14199
|
+
}
|
|
14200
|
+
writeToFile(entry);
|
|
14201
|
+
}
|
|
14202
|
+
return {
|
|
14203
|
+
debug: (message, data) => log("debug", message, data),
|
|
14204
|
+
info: (message, data) => log("info", message, data),
|
|
14205
|
+
warn: (message, errorOrData, data) => log("warn", message, errorOrData, data),
|
|
14206
|
+
error: (message, errorOrData, data) => log("error", message, errorOrData, data)
|
|
14207
|
+
};
|
|
14208
|
+
}
|
|
14209
|
+
|
|
14210
|
+
// packages/core/src/routing/dispatcher.ts
|
|
14211
|
+
var log = createLogger("dispatcher");
|
|
13885
14212
|
// packages/core/src/routing/search-route.ts
|
|
13886
14213
|
var searchQuery = exports_external.object({
|
|
13887
14214
|
q: exports_external.string().min(1),
|
package/metadata/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@
|
|
2
|
+
* `@makinbakin/sdk/metadata` — docs-aware contract helpers.
|
|
3
3
|
*
|
|
4
4
|
* Re-exports the canonical `RouteContract`, `CliCommandContract`,
|
|
5
5
|
* `HookContract`, `SlotContract`, `ExecToolContract`, and the corresponding
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* `defineApiRoute` / `definePluginRoute` are kept as re-exports for backward
|
|
12
12
|
* compatibility with existing call sites; new code should use `defineRoute`
|
|
13
|
-
* from `@
|
|
13
|
+
* from `@makinbakin/sdk/routing` (the typed declarative shape).
|
|
14
14
|
*/
|
|
15
15
|
export type { ContractMetadata, ContractStability, ContractVisibility, CliCommandContract, DocsAwareAPIRoute, DocsExample, ExecToolContract, HookContract, HookKind, PublicContract, RouteContract, SchemaLike, SlotContract, SourceLocation, } from '../_internal/core/docs';
|
|
16
16
|
export { defineApiRoute, defineCliCommandContract, defineExecToolContract, defineHookContract, definePluginRoute, defineRouteContract, defineSlotContract, } from '../_internal/core/docs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makinbakin/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1-rc.2",
|
|
4
4
|
"description": "SDK for building Bakin plugins — UI components, slot types, hooks, and the runtime registerPlugin helper.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"url": "https://github.com/markhayden/bakin/issues"
|
|
74
74
|
},
|
|
75
75
|
"author": "markhayden",
|
|
76
|
-
"license": "
|
|
76
|
+
"license": "Apache-2.0",
|
|
77
77
|
"keywords": [
|
|
78
78
|
"bakin",
|
|
79
79
|
"plugin",
|
package/routing/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@
|
|
2
|
+
* `@makinbakin/sdk/routing` — typed route contracts for plugin authors.
|
|
3
3
|
*
|
|
4
4
|
* Re-exports from `@bakin/core/routing` for a single source of truth. The
|
|
5
|
-
* SDK's general type module (`@
|
|
5
|
+
* SDK's general type module (`@makinbakin/sdk/types`) keeps duplicated primitives
|
|
6
6
|
* for self-containment, but the routing surface re-exports because keeping
|
|
7
7
|
* two parallel `APIRoute<...>` definitions in sync is a debt we are
|
|
8
8
|
* deliberately avoiding.
|