@corenel/sidecar 0.10.0 → 0.13.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.
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ *.tgz
3
+ *.orig
4
+ *~
@@ -0,0 +1,11 @@
1
+ apiVersion: v2
2
+ name: corenel-sidecar
3
+ description: One Corenel sidecar, served at a URL, configured by SIDECAR_* environment variables.
4
+ type: application
5
+ # Versioned WITH @corenel/sidecar: both fields equal packages/sidecar/package.json's
6
+ # version, and packages/sidecar/src/containerInit.test.ts fails when they drift.
7
+ version: 0.12.0
8
+ appVersion: "0.12.0"
9
+ home: https://corenel.ai
10
+ sources:
11
+ - https://github.com/Prompd/prompd-web
@@ -0,0 +1,14 @@
1
+ corenel-sidecar {{ .Chart.AppVersion }} ({{ include "corenel-sidecar.mode" . }} mode, exposed by {{ include "corenel-sidecar.expose" . }}).
2
+
3
+ Each device pairs once with a single-use code, valid ten minutes. The start
4
+ log prints one:
5
+ kubectl logs -n {{ .Release.Namespace }} deploy/{{ include "corenel-sidecar.fullname" . }}
6
+ For another device, print a fresh one:
7
+ kubectl exec -n {{ .Release.Namespace }} deploy/{{ include "corenel-sidecar.fullname" . }} -- corenel-sidecar pair --state-dir /state
8
+
9
+ {{- if eq (include "corenel-sidecar.team" .) "true" }}
10
+ Team mode: only members of the Clerk organization {{ .Values.env.SIDECAR_ORG | default "(SIDECAR_ORG is NOT SET: the sidecar will refuse to start)" }} may connect.
11
+ {{- else }}
12
+ Solo mode: only the account in CORENEL_TOKEN may connect.
13
+ {{- end }}
14
+ Keep the origin list short and treat a code like a password while it is valid.
@@ -0,0 +1,26 @@
1
+ {{/* The resource name: the release name, or release-chart when the release
2
+ name does not already say which chart it is. */}}
3
+ {{- define "corenel-sidecar.fullname" -}}
4
+ {{- if contains .Chart.Name .Release.Name -}}
5
+ {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
6
+ {{- else -}}
7
+ {{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}}
8
+ {{- end -}}
9
+ {{- end -}}
10
+
11
+ {{- define "corenel-sidecar.selectorLabels" -}}
12
+ app.kubernetes.io/name: {{ .Chart.Name }}
13
+ app.kubernetes.io/instance: {{ .Release.Name }}
14
+ {{- end -}}
15
+
16
+ {{- define "corenel-sidecar.labels" -}}
17
+ {{ include "corenel-sidecar.selectorLabels" . }}
18
+ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
19
+ {{- end -}}
20
+
21
+ {{/* The same defaults `corenel-sidecar container` applies to an unset value. */}}
22
+ {{- define "corenel-sidecar.mode" -}}{{ default "agent" .Values.env.SIDECAR_MODE }}{{- end -}}
23
+ {{- define "corenel-sidecar.expose" -}}{{ default "proxy" .Values.env.SIDECAR_EXPOSE }}{{- end -}}
24
+ {{- define "corenel-sidecar.port" -}}{{ default "4858" .Values.env.SIDECAR_PORT }}{{- end -}}
25
+ {{- define "corenel-sidecar.team" -}}{{ has (toString (default "1" .Values.env.SIDECAR_TEAM)) (list "1" "true") }}{{- end -}}
26
+ {{- define "corenel-sidecar.clone" -}}{{ has (toString (default "0" .Values.env.SIDECAR_CLONE)) (list "1" "true") }}{{- end -}}
@@ -0,0 +1,147 @@
1
+ {{- $fullname := include "corenel-sidecar.fullname" . -}}
2
+ {{- $mode := include "corenel-sidecar.mode" . -}}
3
+ {{- $expose := include "corenel-sidecar.expose" . -}}
4
+ {{- $clone := include "corenel-sidecar.clone" . -}}
5
+ {{- $team := include "corenel-sidecar.team" . -}}
6
+ apiVersion: apps/v1
7
+ kind: Deployment
8
+ metadata:
9
+ name: {{ $fullname }}
10
+ labels:
11
+ {{- include "corenel-sidecar.labels" . | nindent 4 }}
12
+ spec:
13
+ # ONE replica, always: /state is one sidecar identity on a ReadWriteOnce
14
+ # volume, and Recreate stops the old pod before the new one mounts it.
15
+ replicas: 1
16
+ strategy:
17
+ type: Recreate
18
+ selector:
19
+ matchLabels:
20
+ {{- include "corenel-sidecar.selectorLabels" . | nindent 6 }}
21
+ template:
22
+ metadata:
23
+ labels:
24
+ {{- include "corenel-sidecar.selectorLabels" . | nindent 8 }}
25
+ spec:
26
+ # No Kubernetes API access is needed, and without the token mount nothing
27
+ # else claims /run/secrets (which /var/run/secrets resolves to).
28
+ automountServiceAccountToken: false
29
+ # Service links would inject SIDECAR_PORT=tcp://... for any Service named
30
+ # "sidecar" in the namespace, which the container refuses to start on.
31
+ enableServiceLinks: false
32
+ securityContext:
33
+ runAsNonRoot: true
34
+ runAsUser: 10001
35
+ runAsGroup: 10001
36
+ fsGroup: 10001
37
+ seccompProfile:
38
+ type: RuntimeDefault
39
+ containers:
40
+ - name: sidecar
41
+ image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
42
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
43
+ securityContext:
44
+ allowPrivilegeEscalation: false
45
+ readOnlyRootFilesystem: true
46
+ capabilities:
47
+ drop: ["ALL"]
48
+ env:
49
+ {{- range $name, $value := .Values.env }}
50
+ - name: {{ $name }}
51
+ value: {{ $value | toString | quote }}
52
+ {{- end }}
53
+ {{- /* Model runs need it, and so does solo admission (only the
54
+ signed-in account may connect). */}}
55
+ {{- if or (ne $mode "files") (ne $team "true") }}
56
+ - name: CORENEL_TOKEN
57
+ valueFrom:
58
+ secretKeyRef:
59
+ name: {{ .Values.secrets.corenelToken.name }}
60
+ key: {{ .Values.secrets.corenelToken.key }}
61
+ {{- end }}
62
+ ports:
63
+ - name: sidecar
64
+ containerPort: {{ include "corenel-sidecar.port" . | int }}
65
+ protocol: TCP
66
+ # The sidecar has no HTTP health route (a plain GET on its port is
67
+ # answered 426 Upgrade Required), so the probe is a TCP connect to
68
+ # loopback made from inside the container. That works for every
69
+ # exposure, including a tunnel's loopback-only bind.
70
+ readinessProbe:
71
+ exec:
72
+ command: ["sidecar-healthcheck"]
73
+ periodSeconds: 10
74
+ timeoutSeconds: 5
75
+ livenessProbe:
76
+ exec:
77
+ command: ["sidecar-healthcheck"]
78
+ initialDelaySeconds: 30
79
+ periodSeconds: 30
80
+ timeoutSeconds: 5
81
+ failureThreshold: 3
82
+ volumeMounts:
83
+ - name: state
84
+ mountPath: /state
85
+ {{- range .Values.workspaces }}
86
+ - name: ws-{{ .name }}
87
+ mountPath: /workspace/{{ .name }}
88
+ {{- end }}
89
+ {{- if or (eq $expose "tls") (eq $clone "true") }}
90
+ - name: secrets
91
+ mountPath: /run/secrets
92
+ readOnly: true
93
+ {{- end }}
94
+ - name: tmp
95
+ mountPath: /tmp
96
+ - name: home
97
+ mountPath: /home/corenel
98
+ {{- with .Values.resources }}
99
+ resources:
100
+ {{- toYaml . | nindent 12 }}
101
+ {{- end }}
102
+ volumes:
103
+ - name: state
104
+ persistentVolumeClaim:
105
+ claimName: {{ $fullname }}-state
106
+ {{- range .Values.workspaces }}
107
+ - name: ws-{{ .name }}
108
+ persistentVolumeClaim:
109
+ claimName: {{ $fullname }}-ws-{{ .name }}
110
+ {{- end }}
111
+ {{- if or (eq $expose "tls") (eq $clone "true") }}
112
+ - name: secrets
113
+ projected:
114
+ sources:
115
+ {{- if eq $expose "tls" }}
116
+ - secret:
117
+ name: {{ .Values.secrets.tls.name }}
118
+ items:
119
+ - key: tls.crt
120
+ path: sidecar-tls.crt
121
+ - key: tls.key
122
+ path: sidecar-tls.key
123
+ {{- end }}
124
+ {{- if eq $clone "true" }}
125
+ - secret:
126
+ name: {{ .Values.secrets.gitCredentials.name }}
127
+ items:
128
+ - key: {{ .Values.secrets.gitCredentials.key }}
129
+ path: git-credentials
130
+ {{- end }}
131
+ {{- end }}
132
+ - name: tmp
133
+ emptyDir: {}
134
+ - name: home
135
+ emptyDir: {}
136
+ {{- with .Values.nodeSelector }}
137
+ nodeSelector:
138
+ {{- toYaml . | nindent 8 }}
139
+ {{- end }}
140
+ {{- with .Values.affinity }}
141
+ affinity:
142
+ {{- toYaml . | nindent 8 }}
143
+ {{- end }}
144
+ {{- with .Values.tolerations }}
145
+ tolerations:
146
+ {{- toYaml . | nindent 8 }}
147
+ {{- end }}
@@ -0,0 +1,35 @@
1
+ {{- if and .Values.ingress.enabled (eq (include "corenel-sidecar.expose" .) "proxy") }}
2
+ {{- $fullname := include "corenel-sidecar.fullname" . -}}
3
+ apiVersion: networking.k8s.io/v1
4
+ kind: Ingress
5
+ metadata:
6
+ name: {{ $fullname }}
7
+ labels:
8
+ {{- include "corenel-sidecar.labels" . | nindent 4 }}
9
+ {{- with .Values.ingress.annotations }}
10
+ annotations:
11
+ {{- toYaml . | nindent 4 }}
12
+ {{- end }}
13
+ spec:
14
+ {{- if .Values.ingress.className }}
15
+ ingressClassName: {{ .Values.ingress.className | quote }}
16
+ {{- end }}
17
+ {{- if and .Values.ingress.host .Values.ingress.tlsSecretName }}
18
+ tls:
19
+ - hosts: [{{ .Values.ingress.host | quote }}]
20
+ secretName: {{ .Values.ingress.tlsSecretName | quote }}
21
+ {{- end }}
22
+ rules:
23
+ - http:
24
+ paths:
25
+ - path: /
26
+ pathType: Prefix
27
+ backend:
28
+ service:
29
+ name: {{ $fullname }}
30
+ port:
31
+ name: sidecar
32
+ {{- if .Values.ingress.host }}
33
+ host: {{ .Values.ingress.host | quote }}
34
+ {{- end }}
35
+ {{- end }}
@@ -0,0 +1,36 @@
1
+ {{- $fullname := include "corenel-sidecar.fullname" . -}}
2
+ apiVersion: v1
3
+ kind: PersistentVolumeClaim
4
+ metadata:
5
+ name: {{ $fullname }}-state
6
+ labels:
7
+ {{- include "corenel-sidecar.labels" . | nindent 4 }}
8
+ annotations:
9
+ helm.sh/resource-policy: keep
10
+ spec:
11
+ accessModes: [{{ .Values.state.accessMode | quote }}]
12
+ {{- if .Values.state.storageClassName }}
13
+ storageClassName: {{ .Values.state.storageClassName | quote }}
14
+ {{- end }}
15
+ resources:
16
+ requests:
17
+ storage: {{ .Values.state.size }}
18
+ {{- range .Values.workspaces }}
19
+ ---
20
+ apiVersion: v1
21
+ kind: PersistentVolumeClaim
22
+ metadata:
23
+ name: {{ $fullname }}-ws-{{ .name }}
24
+ labels:
25
+ {{- include "corenel-sidecar.labels" $ | nindent 4 }}
26
+ annotations:
27
+ helm.sh/resource-policy: keep
28
+ spec:
29
+ accessModes: [{{ .accessMode | quote }}]
30
+ {{- if .storageClassName }}
31
+ storageClassName: {{ .storageClassName | quote }}
32
+ {{- end }}
33
+ resources:
34
+ requests:
35
+ storage: {{ .size }}
36
+ {{- end }}
@@ -0,0 +1,17 @@
1
+ {{- if ne (include "corenel-sidecar.expose" .) "tunnel" }}
2
+ apiVersion: v1
3
+ kind: Service
4
+ metadata:
5
+ name: {{ include "corenel-sidecar.fullname" . }}
6
+ labels:
7
+ {{- include "corenel-sidecar.labels" . | nindent 4 }}
8
+ spec:
9
+ type: {{ .Values.service.type }}
10
+ selector:
11
+ {{- include "corenel-sidecar.selectorLabels" . | nindent 4 }}
12
+ ports:
13
+ - name: sidecar
14
+ port: {{ .Values.service.port }}
15
+ targetPort: sidecar
16
+ protocol: TCP
17
+ {{- end }}
@@ -0,0 +1,81 @@
1
+ # Values for the corenel-sidecar chart.
2
+ #
3
+ # `corenel-sidecar container init --target helm` writes a filled-in copy of
4
+ # this file. The `env` block is passed to the container verbatim and is
5
+ # exactly what `corenel-sidecar container` reads at start; see
6
+ # deployment/sidecar/README.md for every variable. An unknown SIDECAR_*
7
+ # variable or an unknown value makes the container refuse to start.
8
+ #
9
+ # NO SECRET VALUES BELONG IN THIS FILE. Secrets are referenced by name under
10
+ # `secrets:` and created with kubectl (see the generated README.md).
11
+
12
+ image:
13
+ repository: prompd/corenel-sidecar
14
+ # Empty means the chart's appVersion.
15
+ tag: ""
16
+ pullPolicy: IfNotPresent
17
+
18
+ env:
19
+ SIDECAR_MODE: "agent"
20
+ SIDECAR_EXPOSE: "proxy"
21
+ SIDECAR_PORT: "4858"
22
+ SIDECAR_TEAM: "1"
23
+ # Required while SIDECAR_TEAM is 1: the Clerk organization ID (org_..., not a
24
+ # slug) whose members may connect. Empty refuses to start and says so. Set
25
+ # SIDECAR_TEAM to "0" (solo) for one person: only the account in
26
+ # CORENEL_TOKEN may connect, and SIDECAR_ORG must then be unset.
27
+ SIDECAR_ORG: ""
28
+
29
+ # One PersistentVolumeClaim per root, mounted at /workspace/<name>. Every
30
+ # directory mounted directly under /workspace is served as a root.
31
+ workspaces:
32
+ - name: work
33
+ size: 10Gi
34
+ storageClassName: ""
35
+ accessMode: ReadWriteOnce
36
+
37
+ # /state: the sidecar's key and identity, paired devices, crew agents,
38
+ # sessions, audit log.
39
+ # Kept on uninstall (helm.sh/resource-policy: keep) -- losing it makes this
40
+ # a new sidecar that every paired browser has to pair with again.
41
+ state:
42
+ size: 1Gi
43
+ storageClassName: ""
44
+ accessMode: ReadWriteOnce
45
+
46
+ # Rendered unless SIDECAR_EXPOSE is tunnel (a tunnel needs no inbound path).
47
+ service:
48
+ type: ClusterIP
49
+ port: 4858
50
+
51
+ # Rendered only when SIDECAR_EXPOSE is proxy: the Ingress terminates TLS and
52
+ # forwards plain WebSocket traffic to the sidecar. Long-lived WebSockets may
53
+ # need controller-specific timeout annotations (see the README).
54
+ ingress:
55
+ enabled: true
56
+ className: ""
57
+ host: ""
58
+ # A kubernetes.io/tls Secret for the host; empty means no TLS block.
59
+ tlsSecretName: ""
60
+ annotations: {}
61
+
62
+ # Secrets, by NAME only.
63
+ secrets:
64
+ # CORENEL_TOKEN: model-run sign-in. Required unless SIDECAR_MODE is files in
65
+ # team mode (solo admits only this account, so it needs it too).
66
+ corenelToken:
67
+ name: corenel-sidecar-token
68
+ key: token
69
+ # SIDECAR_EXPOSE=tls: a kubernetes.io/tls Secret (tls.crt, tls.key).
70
+ tls:
71
+ name: corenel-sidecar-tls
72
+ # SIDECAR_CLONE=1: a git-credential-store file, mounted at
73
+ # /run/secrets/git-credentials where the image's git config reads it.
74
+ gitCredentials:
75
+ name: corenel-sidecar-git
76
+ key: credentials
77
+
78
+ resources: {}
79
+ nodeSelector: {}
80
+ tolerations: []
81
+ affinity: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corenel/sidecar",
3
- "version": "0.10.0",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "license": "Elastic-2.0",
6
6
  "description": "Prompd sidecar — a local capability server. Run it next to Prompd (prompd.app) so the browser app can reach your machine: local LLMs (Ollama/LM Studio/vLLM) without CORS, your filesystem, and (opt-in) shell.",
@@ -21,7 +21,7 @@
21
21
  "CHANGELOG.md"
22
22
  ],
23
23
  "engines": {
24
- "node": ">=18"
24
+ "node": ">=22"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"
@@ -36,11 +36,11 @@
36
36
  "esbuild": "^0.21.5",
37
37
  "tsx": "^4.19.2",
38
38
  "typescript": "^5.9.3",
39
- "@corenel/config": "0.3.0",
40
- "@corenel/mcp": "0.2.0",
41
- "@corenel/protocol": "0.9.0",
42
- "@corenel/harness": "0.10.0",
43
- "@corenel/tools-node": "0.5.0",
39
+ "@corenel/mcp": "0.4.0",
40
+ "@corenel/config": "0.6.0",
41
+ "@corenel/tools-node": "0.7.0",
42
+ "@corenel/protocol": "0.12.0",
43
+ "@corenel/harness": "0.13.0",
44
44
  "@corenel/crew": "0.0.0"
45
45
  },
46
46
  "repository": {