dna-sdk 0.1.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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/adapters/embedding/onnx.d.ts +32 -0
- package/dist/adapters/embedding/onnx.js +51 -0
- package/dist/adapters/filesystem/cache.d.ts +16 -0
- package/dist/adapters/filesystem/cache.js +113 -0
- package/dist/adapters/filesystem/index.d.ts +2 -0
- package/dist/adapters/filesystem/index.js +2 -0
- package/dist/adapters/filesystem/source.d.ts +82 -0
- package/dist/adapters/filesystem/source.js +357 -0
- package/dist/adapters/postgres/index.d.ts +2 -0
- package/dist/adapters/postgres/index.js +2 -0
- package/dist/adapters/postgres/migrations.d.ts +14 -0
- package/dist/adapters/postgres/migrations.js +88 -0
- package/dist/adapters/postgres/source.d.ts +172 -0
- package/dist/adapters/postgres/source.js +569 -0
- package/dist/adapters/resolvers/github.d.ts +12 -0
- package/dist/adapters/resolvers/github.js +47 -0
- package/dist/adapters/resolvers/http.d.ts +22 -0
- package/dist/adapters/resolvers/http.js +145 -0
- package/dist/adapters/resolvers/index.d.ts +3 -0
- package/dist/adapters/resolvers/index.js +3 -0
- package/dist/adapters/resolvers/local.d.ts +24 -0
- package/dist/adapters/resolvers/local.js +132 -0
- package/dist/adapters/search/driver.d.ts +45 -0
- package/dist/adapters/search/driver.js +138 -0
- package/dist/adapters/search/migrations.d.ts +26 -0
- package/dist/adapters/search/migrations.js +58 -0
- package/dist/adapters/search/rrf.d.ts +23 -0
- package/dist/adapters/search/rrf.js +42 -0
- package/dist/adapters/search/sqlite-vec.d.ts +66 -0
- package/dist/adapters/search/sqlite-vec.js +294 -0
- package/dist/bootstrap.d.ts +45 -0
- package/dist/bootstrap.js +134 -0
- package/dist/extensions/agentskills/DOCS.md +18 -0
- package/dist/extensions/agentskills.d.ts +28 -0
- package/dist/extensions/agentskills.js +252 -0
- package/dist/extensions/agentsmd/DOCS.md +18 -0
- package/dist/extensions/agentsmd.d.ts +22 -0
- package/dist/extensions/agentsmd.js +170 -0
- package/dist/extensions/audit/kinds/audit-log.kind.yaml +148 -0
- package/dist/extensions/audit.d.ts +25 -0
- package/dist/extensions/audit.js +62 -0
- package/dist/extensions/automation/kinds/automation.kind.yaml +296 -0
- package/dist/extensions/automation/query.d.ts +49 -0
- package/dist/extensions/automation/query.js +77 -0
- package/dist/extensions/automation/write-guards.d.ts +59 -0
- package/dist/extensions/automation/write-guards.js +153 -0
- package/dist/extensions/automation.d.ts +41 -0
- package/dist/extensions/automation.js +54 -0
- package/dist/extensions/collab.d.ts +16 -0
- package/dist/extensions/collab.js +79 -0
- package/dist/extensions/doc/kinds/doc.kind.yaml +118 -0
- package/dist/extensions/doc.d.ts +25 -0
- package/dist/extensions/doc.js +10 -0
- package/dist/extensions/eval/kinds/eval-baseline.kind.yaml +65 -0
- package/dist/extensions/eval/kinds/eval-case.kind.yaml +140 -0
- package/dist/extensions/eval/kinds/eval-run.kind.yaml +134 -0
- package/dist/extensions/eval/kinds/eval-suite.kind.yaml +87 -0
- package/dist/extensions/eval.d.ts +24 -0
- package/dist/extensions/eval.js +31 -0
- package/dist/extensions/evidence/kinds/evidence.kind.yaml +92 -0
- package/dist/extensions/evidence.d.ts +17 -0
- package/dist/extensions/evidence.js +94 -0
- package/dist/extensions/federation.d.ts +22 -0
- package/dist/extensions/federation.js +173 -0
- package/dist/extensions/guardrails/DOCS.md +20 -0
- package/dist/extensions/guardrails.d.ts +31 -0
- package/dist/extensions/guardrails.js +228 -0
- package/dist/extensions/helix/DOCS-Actor.md +20 -0
- package/dist/extensions/helix/DOCS-Agent.md +20 -0
- package/dist/extensions/helix/DOCS-UseCase.md +20 -0
- package/dist/extensions/helix/layers.d.ts +12 -0
- package/dist/extensions/helix/layers.js +18 -0
- package/dist/extensions/helix/write-guards.d.ts +70 -0
- package/dist/extensions/helix/write-guards.js +172 -0
- package/dist/extensions/helix.d.ts +29 -0
- package/dist/extensions/helix.js +963 -0
- package/dist/extensions/helix_extras.d.ts +124 -0
- package/dist/extensions/helix_extras.js +328 -0
- package/dist/extensions/hooks.d.ts +31 -0
- package/dist/extensions/hooks.js +247 -0
- package/dist/extensions/kinddef/DOCS.md +24 -0
- package/dist/extensions/kinddef.d.ts +40 -0
- package/dist/extensions/kinddef.js +171 -0
- package/dist/extensions/lesson.d.ts +6 -0
- package/dist/extensions/lesson.js +194 -0
- package/dist/extensions/modelreg/kinds/model-profile.kind.yaml +155 -0
- package/dist/extensions/modelreg.d.ts +30 -0
- package/dist/extensions/modelreg.js +38 -0
- package/dist/extensions/recognizer.d.ts +34 -0
- package/dist/extensions/recognizer.js +272 -0
- package/dist/extensions/research.d.ts +32 -0
- package/dist/extensions/research.js +292 -0
- package/dist/extensions/safety.d.ts +33 -0
- package/dist/extensions/safety.js +230 -0
- package/dist/extensions/sdlc/kinds/adr.kind.yaml +136 -0
- package/dist/extensions/sdlc/kinds/archive-proposal.kind.yaml +107 -0
- package/dist/extensions/sdlc/kinds/changelog.kind.yaml +108 -0
- package/dist/extensions/sdlc/kinds/cognitive-policy.kind.yaml +470 -0
- package/dist/extensions/sdlc/kinds/forecast.kind.yaml +125 -0
- package/dist/extensions/sdlc/kinds/insight.kind.yaml +87 -0
- package/dist/extensions/sdlc/kinds/kaizen.kind.yaml +106 -0
- package/dist/extensions/sdlc/kinds/lesson-learned.kind.yaml +270 -0
- package/dist/extensions/sdlc/kinds/narrative.kind.yaml +189 -0
- package/dist/extensions/sdlc/kinds/pattern-insight.kind.yaml +204 -0
- package/dist/extensions/sdlc/kinds/postmortem.kind.yaml +168 -0
- package/dist/extensions/sdlc/kinds/pre-mortem.kind.yaml +145 -0
- package/dist/extensions/sdlc/kinds/prompt-template.kind.yaml +109 -0
- package/dist/extensions/sdlc/kinds/retrospective.kind.yaml +186 -0
- package/dist/extensions/sdlc/kinds/risk-register.kind.yaml +178 -0
- package/dist/extensions/sdlc/kinds/saved-view.kind.yaml +127 -0
- package/dist/extensions/sdlc/kinds/status-report.kind.yaml +129 -0
- package/dist/extensions/sdlc/kinds/synthesis-run.kind.yaml +279 -0
- package/dist/extensions/sdlc/kinds/synthesizer-state.kind.yaml +196 -0
- package/dist/extensions/sdlc/kinds/workflow-event.kind.yaml +195 -0
- package/dist/extensions/sdlc.d.ts +32 -0
- package/dist/extensions/sdlc.js +1318 -0
- package/dist/extensions/soulspec/DOCS.md +19 -0
- package/dist/extensions/soulspec.d.ts +22 -0
- package/dist/extensions/soulspec.js +287 -0
- package/dist/extensions/tenant.d.ts +6 -0
- package/dist/extensions/tenant.js +291 -0
- package/dist/extensions/testkit.d.ts +24 -0
- package/dist/extensions/testkit.js +211 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +102 -0
- package/dist/kernel/_text.d.ts +28 -0
- package/dist/kernel/_text.js +42 -0
- package/dist/kernel/bundle-handle.d.ts +83 -0
- package/dist/kernel/bundle-handle.js +184 -0
- package/dist/kernel/capabilities.d.ts +157 -0
- package/dist/kernel/capabilities.js +109 -0
- package/dist/kernel/collaborator-ports.d.ts +91 -0
- package/dist/kernel/collaborator-ports.js +1 -0
- package/dist/kernel/composition-resolver.d.ts +215 -0
- package/dist/kernel/composition-resolver.js +558 -0
- package/dist/kernel/composition.d.ts +10 -0
- package/dist/kernel/composition.js +1 -0
- package/dist/kernel/descriptor-loader.d.ts +13 -0
- package/dist/kernel/descriptor-loader.js +48 -0
- package/dist/kernel/document.d.ts +43 -0
- package/dist/kernel/document.js +71 -0
- package/dist/kernel/embedding.d.ts +28 -0
- package/dist/kernel/embedding.js +78 -0
- package/dist/kernel/errors.d.ts +62 -0
- package/dist/kernel/errors.js +82 -0
- package/dist/kernel/events.d.ts +6 -0
- package/dist/kernel/events.js +21 -0
- package/dist/kernel/evidence-capture.d.ts +69 -0
- package/dist/kernel/evidence-capture.js +138 -0
- package/dist/kernel/fs.d.ts +20 -0
- package/dist/kernel/fs.js +128 -0
- package/dist/kernel/generic-rw.d.ts +33 -0
- package/dist/kernel/generic-rw.js +235 -0
- package/dist/kernel/hooks.d.ts +172 -0
- package/dist/kernel/hooks.js +256 -0
- package/dist/kernel/index.d.ts +624 -0
- package/dist/kernel/index.js +1638 -0
- package/dist/kernel/instance.d.ts +211 -0
- package/dist/kernel/instance.js +487 -0
- package/dist/kernel/kind-registry.d.ts +183 -0
- package/dist/kernel/kind-registry.js +710 -0
- package/dist/kernel/kind_base.d.ts +106 -0
- package/dist/kernel/kind_base.js +244 -0
- package/dist/kernel/layer-resolver.d.ts +48 -0
- package/dist/kernel/layer-resolver.js +284 -0
- package/dist/kernel/lock-manager.d.ts +21 -0
- package/dist/kernel/lock-manager.js +43 -0
- package/dist/kernel/lock.d.ts +38 -0
- package/dist/kernel/lock.js +115 -0
- package/dist/kernel/meta.d.ts +135 -0
- package/dist/kernel/meta.js +817 -0
- package/dist/kernel/models.d.ts +3089 -0
- package/dist/kernel/models.js +764 -0
- package/dist/kernel/navigator.d.ts +36 -0
- package/dist/kernel/navigator.js +132 -0
- package/dist/kernel/port-surface.d.ts +33 -0
- package/dist/kernel/port-surface.js +180 -0
- package/dist/kernel/preview.d.ts +60 -0
- package/dist/kernel/preview.js +54 -0
- package/dist/kernel/prompt-budget.d.ts +39 -0
- package/dist/kernel/prompt-budget.js +43 -0
- package/dist/kernel/prompt-builder.d.ts +25 -0
- package/dist/kernel/prompt-builder.js +237 -0
- package/dist/kernel/protocols.d.ts +751 -0
- package/dist/kernel/protocols.js +493 -0
- package/dist/kernel/reports.d.ts +26 -0
- package/dist/kernel/reports.js +215 -0
- package/dist/kernel/resolver.d.ts +146 -0
- package/dist/kernel/resolver.js +232 -0
- package/dist/kernel/resource.d.ts +57 -0
- package/dist/kernel/resource.js +97 -0
- package/dist/kernel/runtime.d.ts +16 -0
- package/dist/kernel/runtime.js +18 -0
- package/dist/kernel/safety-scanner.d.ts +38 -0
- package/dist/kernel/safety-scanner.js +228 -0
- package/dist/kernel/serialize-to-files.d.ts +29 -0
- package/dist/kernel/serialize-to-files.js +23 -0
- package/dist/kernel/spec-access.d.ts +23 -0
- package/dist/kernel/spec-access.js +40 -0
- package/dist/kernel/studio_ui.d.ts +88 -0
- package/dist/kernel/studio_ui.js +135 -0
- package/dist/kernel/templates.d.ts +77 -0
- package/dist/kernel/templates.js +116 -0
- package/dist/kernel/tool-registry.d.ts +52 -0
- package/dist/kernel/tool-registry.js +89 -0
- package/dist/kernel/write-pipeline.d.ts +65 -0
- package/dist/kernel/write-pipeline.js +271 -0
- package/dist/kernel/writer-helpers.d.ts +24 -0
- package/dist/kernel/writer-helpers.js +42 -0
- package/dist/memory/decay.d.ts +31 -0
- package/dist/memory/decay.js +97 -0
- package/dist/memory/ecphory.d.ts +25 -0
- package/dist/memory/ecphory.js +178 -0
- package/dist/memory/encodingContext.d.ts +21 -0
- package/dist/memory/encodingContext.js +62 -0
- package/dist/memory/index.d.ts +23 -0
- package/dist/memory/index.js +23 -0
- package/dist/memory/memoryType.d.ts +7 -0
- package/dist/memory/memoryType.js +24 -0
- package/dist/memory/policy.d.ts +35 -0
- package/dist/memory/policy.js +35 -0
- package/dist/memory/retrieval.d.ts +21 -0
- package/dist/memory/retrieval.js +145 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.js +8 -0
- package/dist/testing/recordSearchConformance.d.ts +43 -0
- package/dist/testing/recordSearchConformance.js +147 -0
- package/dist/viz/ascii.d.ts +7 -0
- package/dist/viz/ascii.js +60 -0
- package/dist/viz/health.d.ts +8 -0
- package/dist/viz/health.js +161 -0
- package/dist/viz/index.d.ts +10 -0
- package/dist/viz/index.js +10 -0
- package/dist/viz/matrix.d.ts +8 -0
- package/dist/viz/matrix.js +84 -0
- package/dist/viz/mermaid.d.ts +38 -0
- package/dist/viz/mermaid.js +706 -0
- package/package.json +82 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helix-extras Kinds — Setting, Theme, UserProfile, Canvas.
|
|
3
|
+
*
|
|
4
|
+
* 1:1 TS parity with dna.extensions.helix._extras (Py).
|
|
5
|
+
* See that file for full documentation of each Kind's purpose.
|
|
6
|
+
*
|
|
7
|
+
* Absorbed from claude-code-templates catalog (MIT) — 2026-05-26.
|
|
8
|
+
*/
|
|
9
|
+
import { KindBase } from "../kernel/kind_base.js";
|
|
10
|
+
import type { Document } from "../kernel/document.js";
|
|
11
|
+
import type { PreviewBlock } from "../kernel/preview.js";
|
|
12
|
+
export declare class SettingKind extends KindBase {
|
|
13
|
+
readonly apiVersion = "github.com/ruinosus/dna/v1";
|
|
14
|
+
readonly kind = "Setting";
|
|
15
|
+
readonly scope: "global";
|
|
16
|
+
readonly alias = "helix-setting";
|
|
17
|
+
readonly origin = "github.com/ruinosus/dna";
|
|
18
|
+
readonly isPromptTarget = false;
|
|
19
|
+
readonly promptTargetPriority = 0;
|
|
20
|
+
readonly flattenInContext = false;
|
|
21
|
+
readonly storage: import("../index.js").StorageDescriptor;
|
|
22
|
+
readonly graphStyle: {
|
|
23
|
+
fill: string;
|
|
24
|
+
stroke: string;
|
|
25
|
+
textColor: string;
|
|
26
|
+
};
|
|
27
|
+
readonly asciiIcon = "\u2699\uFE0F";
|
|
28
|
+
readonly displayLabel = "Settings";
|
|
29
|
+
readonly _sourceUrl: string;
|
|
30
|
+
readonly descriptionFallbackField = "purpose";
|
|
31
|
+
readonly docs: string;
|
|
32
|
+
schema(): Record<string, unknown>;
|
|
33
|
+
summary(doc: Document): {
|
|
34
|
+
title: string;
|
|
35
|
+
config_scope: string;
|
|
36
|
+
env_vars_count: number;
|
|
37
|
+
};
|
|
38
|
+
preview(doc: Document): PreviewBlock[];
|
|
39
|
+
}
|
|
40
|
+
export declare class ThemeKind extends KindBase {
|
|
41
|
+
readonly apiVersion = "github.com/ruinosus/dna/v1";
|
|
42
|
+
readonly kind = "Theme";
|
|
43
|
+
readonly alias = "helix-theme";
|
|
44
|
+
readonly origin = "github.com/ruinosus/dna";
|
|
45
|
+
readonly isPromptTarget = false;
|
|
46
|
+
readonly promptTargetPriority = 0;
|
|
47
|
+
readonly flattenInContext = false;
|
|
48
|
+
readonly storage: import("../index.js").StorageDescriptor;
|
|
49
|
+
readonly graphStyle: {
|
|
50
|
+
fill: string;
|
|
51
|
+
stroke: string;
|
|
52
|
+
textColor: string;
|
|
53
|
+
};
|
|
54
|
+
readonly asciiIcon = "\uD83C\uDFA8";
|
|
55
|
+
readonly displayLabel = "Themes";
|
|
56
|
+
readonly _sourceUrl: string;
|
|
57
|
+
readonly descriptionFallbackField = "tagline";
|
|
58
|
+
readonly docs: string;
|
|
59
|
+
schema(): Record<string, unknown>;
|
|
60
|
+
summary(doc: Document): {
|
|
61
|
+
display_label: string;
|
|
62
|
+
vibe: string;
|
|
63
|
+
hue: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
preview(doc: Document): PreviewBlock[];
|
|
66
|
+
}
|
|
67
|
+
export declare const PROFILE_LANGUAGES: readonly ["pt-BR", "en-US", "es-ES", "fr-FR", "de-DE", "it-IT", "ja-JP", "zh-CN"];
|
|
68
|
+
export declare class UserProfileKind extends KindBase {
|
|
69
|
+
readonly apiVersion = "github.com/ruinosus/dna/v1";
|
|
70
|
+
readonly kind = "UserProfile";
|
|
71
|
+
readonly scope: "tenanted";
|
|
72
|
+
readonly alias = "helix-user-profile";
|
|
73
|
+
readonly origin = "github.com/ruinosus/dna";
|
|
74
|
+
readonly isPromptTarget = false;
|
|
75
|
+
readonly promptTargetPriority = 0;
|
|
76
|
+
readonly flattenInContext = false;
|
|
77
|
+
readonly storage: import("../index.js").StorageDescriptor;
|
|
78
|
+
readonly graphStyle: {
|
|
79
|
+
fill: string;
|
|
80
|
+
stroke: string;
|
|
81
|
+
textColor: string;
|
|
82
|
+
};
|
|
83
|
+
readonly asciiIcon = "\uD83D\uDC64";
|
|
84
|
+
readonly displayLabel = "User Profiles";
|
|
85
|
+
readonly _sourceUrl: string;
|
|
86
|
+
readonly descriptionFallbackField = "display_name";
|
|
87
|
+
readonly docs: string;
|
|
88
|
+
schema(): Record<string, unknown>;
|
|
89
|
+
summary(doc: Document): {
|
|
90
|
+
display_name: string;
|
|
91
|
+
default_language: string;
|
|
92
|
+
consent_active: boolean;
|
|
93
|
+
};
|
|
94
|
+
preview(doc: Document): PreviewBlock[];
|
|
95
|
+
}
|
|
96
|
+
export declare class CanvasKind extends KindBase {
|
|
97
|
+
readonly apiVersion = "github.com/ruinosus/dna/v1";
|
|
98
|
+
readonly kind = "Canvas";
|
|
99
|
+
readonly scope: "tenanted";
|
|
100
|
+
readonly alias = "helix-canvas";
|
|
101
|
+
readonly origin = "github.com/ruinosus/dna";
|
|
102
|
+
readonly isPromptTarget = false;
|
|
103
|
+
readonly promptTargetPriority = 0;
|
|
104
|
+
readonly flattenInContext = false;
|
|
105
|
+
readonly storage: import("../index.js").StorageDescriptor;
|
|
106
|
+
readonly graphStyle: {
|
|
107
|
+
fill: string;
|
|
108
|
+
stroke: string;
|
|
109
|
+
textColor: string;
|
|
110
|
+
};
|
|
111
|
+
readonly asciiIcon = "\uD83C\uDFA8";
|
|
112
|
+
readonly displayLabel = "Canvases";
|
|
113
|
+
readonly _sourceUrl: string;
|
|
114
|
+
readonly descriptionFallbackField = "title";
|
|
115
|
+
readonly docs: string;
|
|
116
|
+
depFilters(): {};
|
|
117
|
+
schema(): Record<string, unknown>;
|
|
118
|
+
summary(doc: Document): {
|
|
119
|
+
title: string;
|
|
120
|
+
shape_count: number;
|
|
121
|
+
last_drawn_by: string;
|
|
122
|
+
};
|
|
123
|
+
preview(doc: Document): PreviewBlock[];
|
|
124
|
+
}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helix-extras Kinds — Setting, Theme, UserProfile, Canvas.
|
|
3
|
+
*
|
|
4
|
+
* 1:1 TS parity with dna.extensions.helix._extras (Py).
|
|
5
|
+
* See that file for full documentation of each Kind's purpose.
|
|
6
|
+
*
|
|
7
|
+
* Absorbed from claude-code-templates catalog (MIT) — 2026-05-26.
|
|
8
|
+
*/
|
|
9
|
+
import { KindBase } from "../kernel/kind_base.js";
|
|
10
|
+
import { SD, TenantScope } from "../kernel/protocols.js";
|
|
11
|
+
const MOD_URL = import.meta.url;
|
|
12
|
+
const SETTING_SCOPES = ["api", "auth", "environment", "git", "global", "hooks", "model"];
|
|
13
|
+
// ─────────────────────────────────────────────────────────────────
|
|
14
|
+
// Setting
|
|
15
|
+
// ─────────────────────────────────────────────────────────────────
|
|
16
|
+
export class SettingKind extends KindBase {
|
|
17
|
+
apiVersion = "github.com/ruinosus/dna/v1";
|
|
18
|
+
kind = "Setting";
|
|
19
|
+
scope = TenantScope.GLOBAL; // parity w/ Py (_extras) — i-180
|
|
20
|
+
alias = "helix-setting";
|
|
21
|
+
origin = "github.com/ruinosus/dna";
|
|
22
|
+
isPromptTarget = false;
|
|
23
|
+
promptTargetPriority = 0;
|
|
24
|
+
flattenInContext = false;
|
|
25
|
+
storage = SD.bundle("settings", "SETTING.md", "text", "body");
|
|
26
|
+
graphStyle = { fill: "#8B5CF6", stroke: "#7C3AED", textColor: "#fff" };
|
|
27
|
+
asciiIcon = "⚙️";
|
|
28
|
+
displayLabel = "Settings";
|
|
29
|
+
_sourceUrl = MOD_URL;
|
|
30
|
+
descriptionFallbackField = "purpose";
|
|
31
|
+
docs = "A Setting is a reusable configuration snippet (env vars + nested config). " +
|
|
32
|
+
"Composed into .claude/settings.json or the runtime env.";
|
|
33
|
+
schema() {
|
|
34
|
+
return {
|
|
35
|
+
type: "object",
|
|
36
|
+
required: ["title", "purpose"],
|
|
37
|
+
properties: {
|
|
38
|
+
title: { type: "string" },
|
|
39
|
+
purpose: { type: "string" },
|
|
40
|
+
config_scope: {
|
|
41
|
+
type: "string",
|
|
42
|
+
enum: [...SETTING_SCOPES],
|
|
43
|
+
default: "global",
|
|
44
|
+
},
|
|
45
|
+
env_vars: {
|
|
46
|
+
type: "object",
|
|
47
|
+
additionalProperties: { type: "string" },
|
|
48
|
+
default: {},
|
|
49
|
+
},
|
|
50
|
+
config: { type: "object", default: {} },
|
|
51
|
+
instructions: { type: "array", items: { type: "string" }, default: [] },
|
|
52
|
+
verifies_with: { type: "string" },
|
|
53
|
+
tags: { type: "array", items: { type: "string" }, default: [] },
|
|
54
|
+
owner: { type: "string" },
|
|
55
|
+
body: { type: "string" },
|
|
56
|
+
created_at: { type: "string", format: "date-time" },
|
|
57
|
+
updated_at: { type: "string", format: "date-time" },
|
|
58
|
+
},
|
|
59
|
+
additionalProperties: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
summary(doc) {
|
|
63
|
+
const s = (doc.spec ?? {});
|
|
64
|
+
const env = (s.env_vars ?? {});
|
|
65
|
+
return {
|
|
66
|
+
title: s.title ?? "",
|
|
67
|
+
config_scope: s.config_scope ?? "global",
|
|
68
|
+
env_vars_count: Object.keys(env).length,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
preview(doc) {
|
|
72
|
+
const s = (doc.spec ?? {});
|
|
73
|
+
const body = typeof s.body === "string" ? s.body : "";
|
|
74
|
+
if (!body)
|
|
75
|
+
return [{ kind: "empty", title: `Setting ${doc.name}` }];
|
|
76
|
+
return [{ kind: "markdown", title: "SETTING.md", body }];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// ─────────────────────────────────────────────────────────────────
|
|
80
|
+
// Theme — Studio palette as data
|
|
81
|
+
// ─────────────────────────────────────────────────────────────────
|
|
82
|
+
const THEME_VIBES = [
|
|
83
|
+
"neutral", "playful", "professional", "warm", "cool",
|
|
84
|
+
"minimal", "vibrant", "high-contrast",
|
|
85
|
+
];
|
|
86
|
+
export class ThemeKind extends KindBase {
|
|
87
|
+
apiVersion = "github.com/ruinosus/dna/v1";
|
|
88
|
+
kind = "Theme";
|
|
89
|
+
alias = "helix-theme";
|
|
90
|
+
origin = "github.com/ruinosus/dna";
|
|
91
|
+
isPromptTarget = false;
|
|
92
|
+
promptTargetPriority = 0;
|
|
93
|
+
flattenInContext = false;
|
|
94
|
+
storage = SD.yaml("themes");
|
|
95
|
+
graphStyle = { fill: "#A855F7", stroke: "#7E22CE", textColor: "#fff" };
|
|
96
|
+
asciiIcon = "🎨";
|
|
97
|
+
displayLabel = "Themes";
|
|
98
|
+
_sourceUrl = MOD_URL;
|
|
99
|
+
descriptionFallbackField = "tagline";
|
|
100
|
+
docs = "A Theme declares a Studio color palette (primary/accent/success in light + dark HSL) " +
|
|
101
|
+
"+ optional typography. ThemeApplier reads the active theme from localStorage and writes " +
|
|
102
|
+
"CSS variables on :root — instant switch, no rebuild.";
|
|
103
|
+
schema() {
|
|
104
|
+
const hslTriplet = {
|
|
105
|
+
type: "object",
|
|
106
|
+
required: ["h", "s", "l"],
|
|
107
|
+
properties: {
|
|
108
|
+
h: { type: "integer", minimum: 0, maximum: 360 },
|
|
109
|
+
s: { type: "integer", minimum: 0, maximum: 100 },
|
|
110
|
+
l: { type: "integer", minimum: 0, maximum: 100 },
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
const palettePair = {
|
|
114
|
+
type: "object",
|
|
115
|
+
required: ["light", "dark"],
|
|
116
|
+
properties: { light: hslTriplet, dark: hslTriplet },
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
type: "object",
|
|
120
|
+
required: ["display_label", "palette"],
|
|
121
|
+
properties: {
|
|
122
|
+
display_label: { type: "string" },
|
|
123
|
+
tagline: { type: "string" },
|
|
124
|
+
vibe: { type: "string", enum: [...THEME_VIBES], default: "neutral" },
|
|
125
|
+
inspiration: { type: "string" },
|
|
126
|
+
palette: {
|
|
127
|
+
type: "object",
|
|
128
|
+
required: ["primary"],
|
|
129
|
+
properties: {
|
|
130
|
+
primary: palettePair,
|
|
131
|
+
accent: palettePair,
|
|
132
|
+
success: palettePair,
|
|
133
|
+
warning: palettePair,
|
|
134
|
+
destructive: palettePair,
|
|
135
|
+
info: palettePair,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
radius: { type: "string" },
|
|
139
|
+
font_sans: { type: "string" },
|
|
140
|
+
font_mono: { type: "string" },
|
|
141
|
+
preview_swatch_hex: { type: "string" },
|
|
142
|
+
tags: { type: "array", items: { type: "string" }, default: [] },
|
|
143
|
+
owner: { type: "string" },
|
|
144
|
+
body: { type: "string" },
|
|
145
|
+
created_at: { type: "string", format: "date-time" },
|
|
146
|
+
updated_at: { type: "string", format: "date-time" },
|
|
147
|
+
},
|
|
148
|
+
additionalProperties: true,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
summary(doc) {
|
|
152
|
+
const s = (doc.spec ?? {});
|
|
153
|
+
const palette = (s.palette ?? {});
|
|
154
|
+
const primary = (palette.primary ?? {}).light;
|
|
155
|
+
return {
|
|
156
|
+
display_label: s.display_label ?? "",
|
|
157
|
+
vibe: s.vibe ?? "neutral",
|
|
158
|
+
hue: primary?.h,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
preview(doc) {
|
|
162
|
+
const s = (doc.spec ?? {});
|
|
163
|
+
return [{ kind: "fields", title: `Theme ${doc.name}`, fields: [
|
|
164
|
+
{ label: "vibe", value: String(s.vibe ?? "neutral") },
|
|
165
|
+
{ label: "label", value: String(s.display_label ?? "") },
|
|
166
|
+
] }];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// ───────────────────────────────────────────────────────────────
|
|
170
|
+
// UserProfile — per-user personalization data for AI agents
|
|
171
|
+
// ───────────────────────────────────────────────────────────────
|
|
172
|
+
//
|
|
173
|
+
// Responsible-AI requirement (s-jarvis-user-profile, 2026-05-26):
|
|
174
|
+
// Personalization MUST NOT come from hardcoded prompts. Each user has
|
|
175
|
+
// their own UserProfile doc; agents inject only THAT user's context at
|
|
176
|
+
// session bootstrap via the get_my_profile tool. Server-side stamps
|
|
177
|
+
// the user_id from the request; clients cannot forge.
|
|
178
|
+
export const PROFILE_LANGUAGES = [
|
|
179
|
+
"pt-BR", "en-US", "es-ES", "fr-FR", "de-DE", "it-IT", "ja-JP", "zh-CN",
|
|
180
|
+
];
|
|
181
|
+
export class UserProfileKind extends KindBase {
|
|
182
|
+
apiVersion = "github.com/ruinosus/dna/v1";
|
|
183
|
+
kind = "UserProfile";
|
|
184
|
+
scope = TenantScope.TENANTED; // per-tenant data — parity w/ Py — i-180
|
|
185
|
+
alias = "helix-user-profile";
|
|
186
|
+
origin = "github.com/ruinosus/dna";
|
|
187
|
+
isPromptTarget = false;
|
|
188
|
+
promptTargetPriority = 0;
|
|
189
|
+
flattenInContext = false;
|
|
190
|
+
storage = SD.yaml("users");
|
|
191
|
+
graphStyle = { fill: "#0EA5E9", stroke: "#0284C7", textColor: "#fff" };
|
|
192
|
+
asciiIcon = "👤";
|
|
193
|
+
displayLabel = "User Profiles";
|
|
194
|
+
_sourceUrl = MOD_URL;
|
|
195
|
+
descriptionFallbackField = "display_name";
|
|
196
|
+
docs = "A UserProfile holds per-user personalization data for AI agents (display name, " +
|
|
197
|
+
"language preference, communication style, opt-in personal/project context). " +
|
|
198
|
+
"Consent-gated: agents only inject the block when consent.profile_used_in_prompts " +
|
|
199
|
+
"is true. Each user can read/write only their own profile via get_my_profile / " +
|
|
200
|
+
"update_my_profile — never another user's.";
|
|
201
|
+
schema() {
|
|
202
|
+
return {
|
|
203
|
+
type: "object",
|
|
204
|
+
required: ["user_id", "display_name"],
|
|
205
|
+
properties: {
|
|
206
|
+
user_id: { type: "string", description: "Stable IdP identifier (email/sub claim). Server-stamped." },
|
|
207
|
+
display_name: { type: "string", description: "How the user wants to appear." },
|
|
208
|
+
preferred_name: { type: "string", description: "What the agent should call them." },
|
|
209
|
+
pronouns: { type: "string", description: "Optional pronoun preference." },
|
|
210
|
+
languages: {
|
|
211
|
+
type: "object",
|
|
212
|
+
properties: {
|
|
213
|
+
default: { type: "string", enum: [...PROFILE_LANGUAGES], default: "pt-BR" },
|
|
214
|
+
accepted: { type: "array", items: { type: "string", enum: [...PROFILE_LANGUAGES] }, default: [] },
|
|
215
|
+
switch_on_request: { type: "boolean", default: true },
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
communication_style: { type: "string", description: "Free-text tone/length/formality preference." },
|
|
219
|
+
personal_context: { type: "string", description: "OPT-IN free text — family/locale/hobbies." },
|
|
220
|
+
project_context: { type: "string", description: "OPT-IN free text — projects + current focus." },
|
|
221
|
+
do_not_share: {
|
|
222
|
+
type: "array", items: { type: "string" }, default: [],
|
|
223
|
+
description: "Topics the agent must NEVER volunteer unprompted.",
|
|
224
|
+
},
|
|
225
|
+
consent: {
|
|
226
|
+
type: "object",
|
|
227
|
+
required: ["profile_used_in_prompts"],
|
|
228
|
+
properties: {
|
|
229
|
+
profile_used_in_prompts: { type: "boolean", default: false },
|
|
230
|
+
memory_persistence: { type: "boolean", default: true },
|
|
231
|
+
voice_recording_consent: { type: "boolean", default: false },
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
created_at: { type: "string", format: "date-time" },
|
|
235
|
+
updated_at: { type: "string", format: "date-time" },
|
|
236
|
+
last_seen_at: { type: "string", format: "date-time" },
|
|
237
|
+
tags: { type: "array", items: { type: "string" }, default: [] },
|
|
238
|
+
},
|
|
239
|
+
additionalProperties: true,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
summary(doc) {
|
|
243
|
+
const s = (doc.spec ?? {});
|
|
244
|
+
const languages = (s.languages ?? {});
|
|
245
|
+
const consent = (s.consent ?? {});
|
|
246
|
+
return {
|
|
247
|
+
display_name: s.display_name ?? "",
|
|
248
|
+
default_language: languages.default ?? "pt-BR",
|
|
249
|
+
consent_active: Boolean(consent.profile_used_in_prompts),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
preview(doc) {
|
|
253
|
+
const s = (doc.spec ?? {});
|
|
254
|
+
return [{ kind: "fields", title: `Profile ${doc.name}`, fields: [
|
|
255
|
+
{ label: "display_name", value: String(s.display_name ?? "") },
|
|
256
|
+
{ label: "preferred_name", value: String(s.preferred_name ?? "") },
|
|
257
|
+
] }];
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
// ─────────────────────────────────────────────────────────────────
|
|
261
|
+
// Canvas — shared whiteboard JARVIS ↔ user (1:1 twin of Py CanvasKind)
|
|
262
|
+
// ─────────────────────────────────────────────────────────────────
|
|
263
|
+
export class CanvasKind extends KindBase {
|
|
264
|
+
apiVersion = "github.com/ruinosus/dna/v1";
|
|
265
|
+
kind = "Canvas";
|
|
266
|
+
scope = TenantScope.TENANTED; // per-tenant data — parity w/ Py — i-180
|
|
267
|
+
alias = "helix-canvas";
|
|
268
|
+
origin = "github.com/ruinosus/dna";
|
|
269
|
+
isPromptTarget = false;
|
|
270
|
+
promptTargetPriority = 0;
|
|
271
|
+
flattenInContext = false;
|
|
272
|
+
storage = SD.yaml("canvases");
|
|
273
|
+
graphStyle = { fill: "#06B6D4", stroke: "#0891B2", textColor: "#fff" };
|
|
274
|
+
asciiIcon = "🎨";
|
|
275
|
+
displayLabel = "Canvases";
|
|
276
|
+
_sourceUrl = MOD_URL;
|
|
277
|
+
descriptionFallbackField = "title";
|
|
278
|
+
docs = "A Canvas is a shared whiteboard between JARVIS and the user — " +
|
|
279
|
+
"tldraw-backed. User draws with mouse/touch/3D hand; JARVIS reads " +
|
|
280
|
+
"shapes (JSON) + optionally vision-interprets free strokes, and " +
|
|
281
|
+
"writes back via discrete shape tools.";
|
|
282
|
+
depFilters() { return {}; }
|
|
283
|
+
schema() {
|
|
284
|
+
return {
|
|
285
|
+
type: "object",
|
|
286
|
+
required: ["title"],
|
|
287
|
+
properties: {
|
|
288
|
+
title: { type: "string" },
|
|
289
|
+
summary: { type: "string" },
|
|
290
|
+
engine: {
|
|
291
|
+
type: "string",
|
|
292
|
+
enum: ["tldraw", "excalidraw", "drawio"],
|
|
293
|
+
default: "tldraw",
|
|
294
|
+
},
|
|
295
|
+
tldraw_store: { type: "object", additionalProperties: true },
|
|
296
|
+
excalidraw_store: { type: "object", additionalProperties: true },
|
|
297
|
+
drawio_xml: { type: "string" },
|
|
298
|
+
thumbnail_url: { type: "string" },
|
|
299
|
+
tags: { type: "array", items: { type: "string" }, default: [] },
|
|
300
|
+
created_by: { type: "string" },
|
|
301
|
+
created_at: { type: "string", format: "date-time" },
|
|
302
|
+
updated_at: { type: "string", format: "date-time" },
|
|
303
|
+
last_drawn_by: { type: "string", enum: ["user", "jarvis", "mixed"] },
|
|
304
|
+
},
|
|
305
|
+
additionalProperties: true,
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
summary(doc) {
|
|
309
|
+
const s = (doc.spec ?? {});
|
|
310
|
+
const store = (s.tldraw_store ?? {});
|
|
311
|
+
const shapes = (store.shapes ?? {});
|
|
312
|
+
return {
|
|
313
|
+
title: s.title ?? "",
|
|
314
|
+
shape_count: typeof shapes === "object" ? Object.keys(shapes).length : 0,
|
|
315
|
+
last_drawn_by: s.last_drawn_by ?? "?",
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
preview(doc) {
|
|
319
|
+
const s = (doc.spec ?? {});
|
|
320
|
+
return [{
|
|
321
|
+
kind: "fields", title: `Canvas ${doc.name}`, fields: [
|
|
322
|
+
{ label: "title", value: String(s.title ?? "") },
|
|
323
|
+
{ label: "summary", value: String(s.summary ?? "") },
|
|
324
|
+
{ label: "last_drawn_by", value: String(s.last_drawn_by ?? "?") },
|
|
325
|
+
],
|
|
326
|
+
}];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HookExtension — Hook kind for declarative hook configuration.
|
|
3
|
+
*
|
|
4
|
+
* Hooks declared as YAML documents in the manifest. The kernel auto-registers
|
|
5
|
+
* them on the HookRegistry during instance creation.
|
|
6
|
+
*/
|
|
7
|
+
import type { BundleHandle } from "../kernel/bundle-handle.js";
|
|
8
|
+
import type { FSLike } from "../kernel/fs.js";
|
|
9
|
+
import type { ExtensionHost, Extension, ReaderPort, SerializedFile, WriterPort } from "../kernel/protocols.js";
|
|
10
|
+
export declare class HookReader implements ReaderPort {
|
|
11
|
+
private fs;
|
|
12
|
+
readonly _marker = "HOOK.md";
|
|
13
|
+
constructor(fs?: FSLike);
|
|
14
|
+
detect(bundle: BundleHandle): boolean;
|
|
15
|
+
read(bundle: BundleHandle): Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export declare class HookWriter implements WriterPort {
|
|
18
|
+
private fs;
|
|
19
|
+
readonly _kind = "Hook";
|
|
20
|
+
constructor(fs?: FSLike);
|
|
21
|
+
canWrite(raw: Record<string, unknown>): boolean;
|
|
22
|
+
write(bundle: BundleHandle, raw: Record<string, unknown>): void;
|
|
23
|
+
serialize(raw: Record<string, unknown>): SerializedFile[];
|
|
24
|
+
}
|
|
25
|
+
export declare class HookExtension implements Extension {
|
|
26
|
+
private fs;
|
|
27
|
+
readonly name = "hooks";
|
|
28
|
+
readonly version = "1.0.0";
|
|
29
|
+
constructor(fs?: FSLike);
|
|
30
|
+
register(kernel: ExtensionHost): void;
|
|
31
|
+
}
|