chore: strip pre-fork version comments across 72 files
Removes standalone "// v0.X.X:" comment lines and inline trailing version annotations. Keeps version references in config field docs and compatibility notes where they describe requirements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — connections_module.go
|
||||
//
|
||||
// v0.38.1: Connections module for Starlark extensions.
|
||||
// Requires permission: connections.read
|
||||
//
|
||||
// Starlark API:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — db_module.go
|
||||
//
|
||||
// v0.29.2 CS1: Structured db module for Starlark extensions.
|
||||
//
|
||||
// Permissions:
|
||||
// db.read → db.query(), db.view(), db.list_tables()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — http_module.go
|
||||
//
|
||||
// v0.29.1 CS0: HTTP outbound module for Starlark extensions.
|
||||
// Requires permission: api.http
|
||||
//
|
||||
// Starlark API:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — lib_module.go
|
||||
//
|
||||
// v0.38.2: Library loading module for Starlark extensions.
|
||||
// No permission required — any starlark package can use lib.require().
|
||||
//
|
||||
// Starlark API:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — modules.go
|
||||
//
|
||||
// v0.29.0 CS3: Module factories for Starlark sandbox.
|
||||
// Each factory returns a starlarkstruct.Module that the runner
|
||||
// injects into the script namespace based on granted permissions.
|
||||
package sandbox
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — realtime_module.go
|
||||
//
|
||||
// v0.5.0: Starlark realtime.publish() module.
|
||||
//
|
||||
// Allows extensions to publish events to WebSocket channels.
|
||||
// Events are scoped to rooms — only clients subscribed to the
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
// Package sandbox — runner.go
|
||||
//
|
||||
// v0.29.0 CS3: Runner loads a package's Starlark script, assembles
|
||||
// the module set based on granted permissions, and executes it.
|
||||
//
|
||||
// v0.29.1 CS0: Wires api.http permission to BuildHTTPModule with
|
||||
// network_access config from package manifest.
|
||||
//
|
||||
// v0.29.1 CS2: Adds RunContext for per-invocation state (user_id),
|
||||
// vault for provider key decryption, and provider.complete module.
|
||||
//
|
||||
// v0.29.2 CS1: Adds db *sql.DB for the db module. SetDB() wires it
|
||||
// at startup. db.read grants query/view/list_tables; db.write adds
|
||||
// insert/update/delete. If both are granted, db.write wins (superset).
|
||||
//
|
||||
// v0.38.2: Adds lib.load() for library packages. Libraries run with
|
||||
// their own permission context. Per-invocation lib cache + cycle detection.
|
||||
//
|
||||
// The runner is the bridge between the package/permission system
|
||||
@@ -57,13 +52,13 @@ type RunContext struct {
|
||||
type Runner struct {
|
||||
sandbox *Sandbox
|
||||
stores store.Stores
|
||||
packagesDir string // v0.38.0: disk path for load() support
|
||||
packagesDir string
|
||||
notifier NotificationSender // nil = notifications module unavailable
|
||||
connResolver ConnectionResolver // nil = connections module unavailable (v0.38.1)
|
||||
db *sql.DB // nil = db module unavailable
|
||||
dbPostgres bool // true = use $N placeholders; false = use ?
|
||||
allowPrivateIPs bool // v0.38.5: disable SSRF private IP check
|
||||
bus *events.Bus // v0.5.0: event bus for realtime module
|
||||
allowPrivateIPs bool
|
||||
bus *events.Bus
|
||||
}
|
||||
|
||||
// NewRunner creates a runner with the given sandbox and dependencies.
|
||||
@@ -94,7 +89,6 @@ func (r *Runner) SetDB(db *sql.DB, isPostgres bool) {
|
||||
|
||||
// SetPackagesDir sets the disk path where package archives are extracted.
|
||||
// Required for load() support — scripts are read from disk at runtime.
|
||||
// v0.38.0.
|
||||
func (r *Runner) SetPackagesDir(dir string) {
|
||||
r.packagesDir = dir
|
||||
}
|
||||
@@ -114,7 +108,6 @@ func (r *Runner) SetAllowPrivateIPs(allow bool) {
|
||||
// ExecPackage loads a package's script from disk (primary) or manifest
|
||||
// (legacy) and executes it with modules gated by granted permissions.
|
||||
//
|
||||
// v0.38.0: Disk-based loading + package-scoped load() support.
|
||||
//
|
||||
// The RunContext carries per-invocation state (user_id for provider
|
||||
// resolution). Pass nil if no per-invocation context is needed.
|
||||
@@ -136,7 +129,6 @@ func (r *Runner) ExecPackage(ctx context.Context, pkg *store.PackageRegistration
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// v0.38.2: per-invocation lib context for lib.load() caching + cycle detection
|
||||
lc := newLibContext()
|
||||
|
||||
// Build modules based on granted permissions
|
||||
@@ -352,7 +344,6 @@ func (r *Runner) buildModulesWithLibCtx(ctx context.Context, packageID string, m
|
||||
})
|
||||
}
|
||||
|
||||
// v0.30.0: settings module — always injected, no permission required.
|
||||
// A package reads its own admin + team + user settings (v0.2.0 cascade).
|
||||
userID := ""
|
||||
teamID := ""
|
||||
@@ -362,7 +353,6 @@ func (r *Runner) buildModulesWithLibCtx(ctx context.Context, packageID string, m
|
||||
}
|
||||
modules["settings"] = BuildSettingsModule(ctx, r.stores, packageID, userID, teamID)
|
||||
|
||||
// v0.38.2: lib module — always injected, no permission required.
|
||||
// Allows any starlark package to load declared library dependencies.
|
||||
if lc != nil {
|
||||
modules["lib"] = BuildLibModule(ctx, r, packageID, rc, lc)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — sandboxed Starlark interpreter.
|
||||
//
|
||||
// v0.29.0 CS1: Provides execution with timeout, step limits,
|
||||
// captured output, and injectable predeclared modules.
|
||||
//
|
||||
// The sandbox is intentionally restrictive:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sandbox
|
||||
|
||||
// settings_module.go — v0.2.0
|
||||
// settings_module.go
|
||||
//
|
||||
// The settings module lets extensions read their resolved settings via
|
||||
// the three-tier cascade: global → team → user, respecting the
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Package sandbox — unicode_scan.go
|
||||
//
|
||||
// v0.5.1: Invisible Unicode scanning gate.
|
||||
//
|
||||
// Defends against GlassWorm (variation selector payloads), Trojan Source
|
||||
// (bidi override attacks / CVE-2021-42574), and other invisible Unicode
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package sandbox
|
||||
|
||||
// workflow_module.go — v0.30.2 CS1, v0.3.2 instance API
|
||||
// workflow_module.go
|
||||
//
|
||||
// The workflow module lets extensions read workflow definitions,
|
||||
// manage instances, and programmatically advance workflow stages.
|
||||
@@ -27,7 +27,6 @@ import (
|
||||
// BuildWorkflowModule creates the "workflow" Starlark module for a package.
|
||||
// Requires the workflow.access permission.
|
||||
//
|
||||
// v0.3.2: added get_instance and list_instances for read-only instance access.
|
||||
// Mutating operations (start/advance/cancel) are available via HTTP API;
|
||||
// Starlark builtins for them will be added when the engine interface is
|
||||
// extracted to a shared package to avoid circular imports.
|
||||
|
||||
Reference in New Issue
Block a user