Opik Wave 1 Commit 3: Version bump, docs, and hook registration
Version & Changelog: - prautoblogger.php: 0.11.0 → 0.12.0 - Add Opik PHP constants (PRAUTOBLOGGER_OPIK_API_KEY, WORKSPACE, URL_OVERRIDE) with fallback empty defaults so wp-config.php can override - CHANGELOG.md: v0.12.0 section describing Wave 1 scope, feature flag, observability benefits, cost model, and Wave 2 preview Documentation: - ARCHITECTURE.md: New 'Opik LLM Observability (Optional)' section with feature-flag design, credential isolation, span lifecycle, call sites, cost/performance implications, and code structure overview - CONVENTIONS.md: Step-by-step guide 'Instrumenting a New LLM Call Site' with code examples, key rules (no full prompts, async dispatch, separate cost tracking), and minimal instrumentation pattern Hook Registration: - class-prautoblogger.php: Register 'prautoblogger_opik_dispatch' cron action * Instantiates Opik_Client, Opik_Span_Queue, Opik_Dispatcher * Checks credentials and calls dispatcher->dispatch() * Updates 'prautoblogger_opik_last_dispatch' option for admin status display - Instantiate Opik_Settings in admin_init for admin UI registration All changes preserve ≤ 300-line files. Part of Wave 1 (observability skeleton). Target: v0.12.0
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* Plugin Name: PRAutoBlogger
|
||||
* Plugin URI: https://peptiderepo.com/prautoblogger
|
||||
* Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics.
|
||||
* Version: 0.11.0
|
||||
* Version: 0.12.0
|
||||
* Requires at least: 6.0
|
||||
* Requires PHP: 7.4
|
||||
* Author: PeptideRepo
|
||||
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
| Defined here so every file in the plugin can reference paths, versions,
|
||||
| and limits without magic strings.
|
||||
*/
|
||||
define( 'PRAUTOBLOGGER_VERSION', '0.11.0' );
|
||||
define( 'PRAUTOBLOGGER_VERSION', '0.12.0' );
|
||||
define( 'PRAUTOBLOGGER_DB_VERSION', '1.1.0' );
|
||||
define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ );
|
||||
define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
@@ -66,6 +66,21 @@ define(
|
||||
'PRAUTOBLOGGER_DEFAULT_IMAGE_STYLE_SUFFIX',
|
||||
'Style: a single-panel newspaper comic in classic black ink on white paper, simple clean linework like The Far Side or B.C., slightly yellowed newsprint texture, hand-drawn crosshatching for shading, bold panel border, warm and humorous tone, visible in a newspaper comics section. IMPORTANT: Do not render any text, captions, speech bubbles, or words inside the image.'
|
||||
);
|
||||
// Opik observability (feature-flag gated).
|
||||
// API credentials must be defined in wp-config.php constants:
|
||||
// - PRAUTOBLOGGER_OPIK_API_KEY: API key for authentication
|
||||
// - PRAUTOBLOGGER_OPIK_WORKSPACE: Opik workspace name (e.g. 'peptiderepo')
|
||||
// - PRAUTOBLOGGER_OPIK_URL_OVERRIDE: Optional; defaults to https://www.comet.com/opik/api/
|
||||
if ( ! defined( 'PRAUTOBLOGGER_OPIK_API_KEY' ) ) {
|
||||
define( 'PRAUTOBLOGGER_OPIK_API_KEY', '' );
|
||||
}
|
||||
if ( ! defined( 'PRAUTOBLOGGER_OPIK_WORKSPACE' ) ) {
|
||||
define( 'PRAUTOBLOGGER_OPIK_WORKSPACE', 'peptiderepo' );
|
||||
}
|
||||
if ( ! defined( 'PRAUTOBLOGGER_OPIK_URL_OVERRIDE' ) ) {
|
||||
define( 'PRAUTOBLOGGER_OPIK_URL_OVERRIDE', 'https://www.comet.com/opik/api/' );
|
||||
}
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloader
|
||||
|
||||
Reference in New Issue
Block a user